diff --git a/.yarn/cache/@fern-fern-ir-v35-sdk-npm-0.0.15-59a0d14149-85762cb65e.zip b/.yarn/cache/@fern-fern-ir-v35-sdk-npm-0.0.15-59a0d14149-85762cb65e.zip new file mode 100644 index 00000000000..d11282144eb Binary files /dev/null and b/.yarn/cache/@fern-fern-ir-v35-sdk-npm-0.0.15-59a0d14149-85762cb65e.zip differ diff --git a/generators/go/internal/fern/ir.json b/generators/go/internal/fern/ir.json index 68ab7b82f7a..ddfc557a374 100644 --- a/generators/go/internal/fern/ir.json +++ b/generators/go/internal/fern/ir.json @@ -19,7 +19,7 @@ } }, "apiDisplayName": null, - "apiDocs": "Adds support for simple object query parameters.", + "apiDocs": "Adds support for auto-paginated endpoints.", "auth": { "requirement": "ALL", "schemes": [], @@ -4329,25 +4329,25 @@ "availability": null, "docs": null }, - "type_commons:WebsocketChannelId": { + "type_commons:WebSocketChannelId": { "name": { "name": { - "originalName": "WebsocketChannelId", + "originalName": "WebSocketChannelId", "camelCase": { - "unsafeName": "websocketChannelId", - "safeName": "websocketChannelId" + "unsafeName": "webSocketChannelId", + "safeName": "webSocketChannelId" }, "snakeCase": { - "unsafeName": "websocket_channel_id", - "safeName": "websocket_channel_id" + "unsafeName": "web_socket_channel_id", + "safeName": "web_socket_channel_id" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_CHANNEL_ID", - "safeName": "WEBSOCKET_CHANNEL_ID" + "unsafeName": "WEB_SOCKET_CHANNEL_ID", + "safeName": "WEB_SOCKET_CHANNEL_ID" }, "pascalCase": { - "unsafeName": "WebsocketChannelId", - "safeName": "WebsocketChannelId" + "unsafeName": "WebSocketChannelId", + "safeName": "WebSocketChannelId" } }, "fernFilepath": { @@ -4393,7 +4393,7 @@ } } }, - "typeId": "type_commons:WebsocketChannelId" + "typeId": "type_commons:WebSocketChannelId" }, "shape": { "_type": "alias", @@ -9459,6 +9459,8 @@ "type_http:FileUploadRequest", "type_http:FileUploadRequestProperty", "type_http:FileProperty", + "type_http:FilePropertySingle", + "type_http:FilePropertyArray", "type_http:BytesRequest", "type_http:SdkRequest", "type_http:SdkRequestShape", @@ -9477,6 +9479,8 @@ "type_http:ResponseError", "type_errors:DeclaredErrorName", "type_commons:ErrorId", + "type_http:Pagination", + "type_http:PaginationProperty", "type_http:ExampleEndpointCall", "type_http:ExamplePathParameter", "type_types:ExampleTypeReference", @@ -11255,6 +11259,104 @@ "availability": null, "docs": null }, + { + "name": { + "name": { + "originalName": "pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "wireValue": "pagination" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Pagination", + "camelCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "snakeCase": { + "unsafeName": "pagination", + "safeName": "pagination" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" + }, + "pascalCase": { + "unsafeName": "Pagination", + "safeName": "Pagination" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:Pagination" + } + } + }, + "availability": null, + "docs": null + }, { "name": { "name": { @@ -11389,6 +11491,8 @@ "type_http:FileUploadRequest", "type_http:FileUploadRequestProperty", "type_http:FileProperty", + "type_http:FilePropertySingle", + "type_http:FilePropertyArray", "type_http:BytesRequest", "type_http:SdkRequest", "type_http:SdkRequestShape", @@ -11407,6 +11511,8 @@ "type_http:ResponseError", "type_errors:DeclaredErrorName", "type_commons:ErrorId", + "type_http:Pagination", + "type_http:PaginationProperty", "type_http:ExampleEndpointCall", "type_http:ExamplePathParameter", "type_types:ExampleTypeReference", @@ -14085,6 +14191,8 @@ "type_http:FileUploadRequest", "type_http:FileUploadRequestProperty", "type_http:FileProperty", + "type_http:FilePropertySingle", + "type_http:FilePropertyArray", "type_http:BytesRequest" ], "examples": [], @@ -15113,7 +15221,9 @@ "type_commons:SafeAndUnsafeString", "type_http:FileUploadRequestProperty", "type_http:FileProperty", + "type_http:FilePropertySingle", "type_commons:NameAndWireValue", + "type_http:FilePropertyArray", "type_http:InlinedRequestBodyProperty", "type_commons:WithDocs", "type_types:TypeReference", @@ -15388,25 +15498,141 @@ }, "wireValue": "file" }, + "shape": { + "_type": "singleProperty", + "name": { + "name": { + "originalName": "value", + "camelCase": { + "unsafeName": "value", + "safeName": "value" + }, + "snakeCase": { + "unsafeName": "value", + "safeName": "value" + }, + "screamingSnakeCase": { + "unsafeName": "VALUE", + "safeName": "VALUE" + }, + "pascalCase": { + "unsafeName": "Value", + "safeName": "Value" + } + }, + "wireValue": "value" + }, + "type": { + "_type": "named", + "name": { + "originalName": "FileProperty", + "camelCase": { + "unsafeName": "fileProperty", + "safeName": "fileProperty" + }, + "snakeCase": { + "unsafeName": "file_property", + "safeName": "file_property" + }, + "screamingSnakeCase": { + "unsafeName": "FILE_PROPERTY", + "safeName": "FILE_PROPERTY" + }, + "pascalCase": { + "unsafeName": "FileProperty", + "safeName": "FileProperty" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:FileProperty" + } + }, + "docs": null + }, + { + "discriminantValue": { + "name": { + "originalName": "bodyProperty", + "camelCase": { + "unsafeName": "bodyProperty", + "safeName": "bodyProperty" + }, + "snakeCase": { + "unsafeName": "body_property", + "safeName": "body_property" + }, + "screamingSnakeCase": { + "unsafeName": "BODY_PROPERTY", + "safeName": "BODY_PROPERTY" + }, + "pascalCase": { + "unsafeName": "BodyProperty", + "safeName": "BodyProperty" + } + }, + "wireValue": "bodyProperty" + }, "shape": { "_type": "samePropertiesAsObject", "name": { - "originalName": "FileProperty", + "originalName": "InlinedRequestBodyProperty", "camelCase": { - "unsafeName": "fileProperty", - "safeName": "fileProperty" + "unsafeName": "inlinedRequestBodyProperty", + "safeName": "inlinedRequestBodyProperty" }, "snakeCase": { - "unsafeName": "file_property", - "safeName": "file_property" + "unsafeName": "inlined_request_body_property", + "safeName": "inlined_request_body_property" }, "screamingSnakeCase": { - "unsafeName": "FILE_PROPERTY", - "safeName": "FILE_PROPERTY" + "unsafeName": "INLINED_REQUEST_BODY_PROPERTY", + "safeName": "INLINED_REQUEST_BODY_PROPERTY" }, "pascalCase": { - "unsafeName": "FileProperty", - "safeName": "FileProperty" + "unsafeName": "InlinedRequestBodyProperty", + "safeName": "InlinedRequestBodyProperty" } }, "fernFilepath": { @@ -15452,52 +15678,169 @@ } } }, - "typeId": "type_http:FileProperty" + "typeId": "type_http:InlinedRequestBodyProperty" }, "docs": null + } + ] + }, + "referencedTypes": [ + "type_http:FileProperty", + "type_http:FilePropertySingle", + "type_commons:NameAndWireValue", + "type_commons:Name", + "type_commons:SafeAndUnsafeString", + "type_http:FilePropertyArray", + "type_http:InlinedRequestBodyProperty", + "type_commons:WithDocs", + "type_types:TypeReference", + "type_types:ContainerType", + "type_types:MapType", + "type_types:Literal", + "type_types:DeclaredTypeName", + "type_commons:TypeId", + "type_commons:FernFilepath", + "type_types:PrimitiveType" + ], + "examples": [], + "availability": null, + "docs": null + }, + "type_http:FileProperty": { + "name": { + "name": { + "originalName": "FileProperty", + "camelCase": { + "unsafeName": "fileProperty", + "safeName": "fileProperty" + }, + "snakeCase": { + "unsafeName": "file_property", + "safeName": "file_property" }, + "screamingSnakeCase": { + "unsafeName": "FILE_PROPERTY", + "safeName": "FILE_PROPERTY" + }, + "pascalCase": { + "unsafeName": "FileProperty", + "safeName": "FileProperty" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:FileProperty" + }, + "shape": { + "_type": "union", + "discriminant": { + "name": { + "originalName": "type", + "camelCase": { + "unsafeName": "type", + "safeName": "type" + }, + "snakeCase": { + "unsafeName": "type", + "safeName": "type" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE", + "safeName": "TYPE" + }, + "pascalCase": { + "unsafeName": "Type", + "safeName": "Type" + } + }, + "wireValue": "type" + }, + "extends": [], + "baseProperties": [], + "types": [ { "discriminantValue": { "name": { - "originalName": "bodyProperty", + "originalName": "file", "camelCase": { - "unsafeName": "bodyProperty", - "safeName": "bodyProperty" + "unsafeName": "file", + "safeName": "file" }, "snakeCase": { - "unsafeName": "body_property", - "safeName": "body_property" + "unsafeName": "file", + "safeName": "file" }, "screamingSnakeCase": { - "unsafeName": "BODY_PROPERTY", - "safeName": "BODY_PROPERTY" + "unsafeName": "FILE", + "safeName": "FILE" }, "pascalCase": { - "unsafeName": "BodyProperty", - "safeName": "BodyProperty" + "unsafeName": "File", + "safeName": "File" } }, - "wireValue": "bodyProperty" + "wireValue": "file" }, "shape": { "_type": "samePropertiesAsObject", "name": { - "originalName": "InlinedRequestBodyProperty", + "originalName": "FilePropertySingle", "camelCase": { - "unsafeName": "inlinedRequestBodyProperty", - "safeName": "inlinedRequestBodyProperty" + "unsafeName": "filePropertySingle", + "safeName": "filePropertySingle" }, "snakeCase": { - "unsafeName": "inlined_request_body_property", - "safeName": "inlined_request_body_property" + "unsafeName": "file_property_single", + "safeName": "file_property_single" }, "screamingSnakeCase": { - "unsafeName": "INLINED_REQUEST_BODY_PROPERTY", - "safeName": "INLINED_REQUEST_BODY_PROPERTY" + "unsafeName": "FILE_PROPERTY_SINGLE", + "safeName": "FILE_PROPERTY_SINGLE" }, "pascalCase": { - "unsafeName": "InlinedRequestBodyProperty", - "safeName": "InlinedRequestBodyProperty" + "unsafeName": "FilePropertySingle", + "safeName": "FilePropertySingle" } }, "fernFilepath": { @@ -15543,51 +15886,133 @@ } } }, - "typeId": "type_http:InlinedRequestBodyProperty" + "typeId": "type_http:FilePropertySingle" + }, + "docs": null + }, + { + "discriminantValue": { + "name": { + "originalName": "fileArray", + "camelCase": { + "unsafeName": "fileArray", + "safeName": "fileArray" + }, + "snakeCase": { + "unsafeName": "file_array", + "safeName": "file_array" + }, + "screamingSnakeCase": { + "unsafeName": "FILE_ARRAY", + "safeName": "FILE_ARRAY" + }, + "pascalCase": { + "unsafeName": "FileArray", + "safeName": "FileArray" + } + }, + "wireValue": "fileArray" + }, + "shape": { + "_type": "samePropertiesAsObject", + "name": { + "originalName": "FilePropertyArray", + "camelCase": { + "unsafeName": "filePropertyArray", + "safeName": "filePropertyArray" + }, + "snakeCase": { + "unsafeName": "file_property_array", + "safeName": "file_property_array" + }, + "screamingSnakeCase": { + "unsafeName": "FILE_PROPERTY_ARRAY", + "safeName": "FILE_PROPERTY_ARRAY" + }, + "pascalCase": { + "unsafeName": "FilePropertyArray", + "safeName": "FilePropertyArray" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:FilePropertyArray" }, "docs": null } ] }, "referencedTypes": [ - "type_http:FileProperty", + "type_http:FilePropertySingle", "type_commons:NameAndWireValue", "type_commons:Name", "type_commons:SafeAndUnsafeString", - "type_http:InlinedRequestBodyProperty", - "type_commons:WithDocs", - "type_types:TypeReference", - "type_types:ContainerType", - "type_types:MapType", - "type_types:Literal", - "type_types:DeclaredTypeName", - "type_commons:TypeId", - "type_commons:FernFilepath", - "type_types:PrimitiveType" + "type_http:FilePropertyArray" ], "examples": [], "availability": null, "docs": null }, - "type_http:FileProperty": { + "type_http:FilePropertySingle": { "name": { "name": { - "originalName": "FileProperty", + "originalName": "FilePropertySingle", "camelCase": { - "unsafeName": "fileProperty", - "safeName": "fileProperty" + "unsafeName": "filePropertySingle", + "safeName": "filePropertySingle" }, "snakeCase": { - "unsafeName": "file_property", - "safeName": "file_property" + "unsafeName": "file_property_single", + "safeName": "file_property_single" }, "screamingSnakeCase": { - "unsafeName": "FILE_PROPERTY", - "safeName": "FILE_PROPERTY" + "unsafeName": "FILE_PROPERTY_SINGLE", + "safeName": "FILE_PROPERTY_SINGLE" }, "pascalCase": { - "unsafeName": "FileProperty", - "safeName": "FileProperty" + "unsafeName": "FilePropertySingle", + "safeName": "FilePropertySingle" } }, "fernFilepath": { @@ -15633,7 +16058,210 @@ } } }, - "typeId": "type_http:FileProperty" + "typeId": "type_http:FilePropertySingle" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "key", + "camelCase": { + "unsafeName": "key", + "safeName": "key" + }, + "snakeCase": { + "unsafeName": "key", + "safeName": "key" + }, + "screamingSnakeCase": { + "unsafeName": "KEY", + "safeName": "KEY" + }, + "pascalCase": { + "unsafeName": "Key", + "safeName": "Key" + } + }, + "wireValue": "key" + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "NameAndWireValue", + "camelCase": { + "unsafeName": "nameAndWireValue", + "safeName": "nameAndWireValue" + }, + "snakeCase": { + "unsafeName": "name_and_wire_value", + "safeName": "name_and_wire_value" + }, + "screamingSnakeCase": { + "unsafeName": "NAME_AND_WIRE_VALUE", + "safeName": "NAME_AND_WIRE_VALUE" + }, + "pascalCase": { + "unsafeName": "NameAndWireValue", + "safeName": "NameAndWireValue" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + }, + "typeId": "type_commons:NameAndWireValue" + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "isOptional", + "camelCase": { + "unsafeName": "isOptional", + "safeName": "isOptional" + }, + "snakeCase": { + "unsafeName": "is_optional", + "safeName": "is_optional" + }, + "screamingSnakeCase": { + "unsafeName": "IS_OPTIONAL", + "safeName": "IS_OPTIONAL" + }, + "pascalCase": { + "unsafeName": "IsOptional", + "safeName": "IsOptional" + } + }, + "wireValue": "isOptional" + }, + "valueType": { + "_type": "primitive", + "primitive": "BOOLEAN" + }, + "availability": null, + "docs": null + } + ] + }, + "referencedTypes": [ + "type_commons:NameAndWireValue", + "type_commons:Name", + "type_commons:SafeAndUnsafeString" + ], + "examples": [], + "availability": null, + "docs": null + }, + "type_http:FilePropertyArray": { + "name": { + "name": { + "originalName": "FilePropertyArray", + "camelCase": { + "unsafeName": "filePropertyArray", + "safeName": "filePropertyArray" + }, + "snakeCase": { + "unsafeName": "file_property_array", + "safeName": "file_property_array" + }, + "screamingSnakeCase": { + "unsafeName": "FILE_PROPERTY_ARRAY", + "safeName": "FILE_PROPERTY_ARRAY" + }, + "pascalCase": { + "unsafeName": "FilePropertyArray", + "safeName": "FilePropertyArray" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:FilePropertyArray" }, "shape": { "_type": "object", @@ -19922,25 +20550,25 @@ "availability": null, "docs": null }, - "type_http:ExampleEndpointCall": { + "type_http:Pagination": { "name": { "name": { - "originalName": "ExampleEndpointCall", + "originalName": "Pagination", "camelCase": { - "unsafeName": "exampleEndpointCall", - "safeName": "exampleEndpointCall" + "unsafeName": "pagination", + "safeName": "pagination" }, "snakeCase": { - "unsafeName": "example_endpoint_call", - "safeName": "example_endpoint_call" + "unsafeName": "pagination", + "safeName": "pagination" }, "screamingSnakeCase": { - "unsafeName": "EXAMPLE_ENDPOINT_CALL", - "safeName": "EXAMPLE_ENDPOINT_CALL" + "unsafeName": "PAGINATION", + "safeName": "PAGINATION" }, "pascalCase": { - "unsafeName": "ExampleEndpointCall", - "safeName": "ExampleEndpointCall" + "unsafeName": "Pagination", + "safeName": "Pagination" } }, "fernFilepath": { @@ -19986,172 +20614,100 @@ } } }, - "typeId": "type_http:ExampleEndpointCall" + "typeId": "type_http:Pagination" }, "shape": { "_type": "object", - "extends": [ + "extends": [], + "properties": [ { "name": { - "originalName": "WithDocs", - "camelCase": { - "unsafeName": "withDocs", - "safeName": "withDocs" - }, - "snakeCase": { - "unsafeName": "with_docs", - "safeName": "with_docs" - }, - "screamingSnakeCase": { - "unsafeName": "WITH_DOCS", - "safeName": "WITH_DOCS" - }, - "pascalCase": { - "unsafeName": "WithDocs", - "safeName": "WithDocs" - } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "commons", - "camelCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" - }, - "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" - } - } - ], - "packagePath": [], - "file": { - "originalName": "commons", + "name": { + "originalName": "page", "camelCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "page", + "safeName": "page" }, "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "page", + "safeName": "page" }, "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" + "unsafeName": "PAGE", + "safeName": "PAGE" }, "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" + "unsafeName": "Page", + "safeName": "Page" } - } + }, + "wireValue": "page" }, - "typeId": "type_commons:WithDocs" - } - ], - "properties": [ - { - "name": { + "valueType": { + "_type": "named", "name": { - "originalName": "name", + "originalName": "QueryParameter", "camelCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "queryParameter", + "safeName": "queryParameter" }, "snakeCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "query_parameter", + "safeName": "query_parameter" }, "screamingSnakeCase": { - "unsafeName": "NAME", - "safeName": "NAME" + "unsafeName": "QUERY_PARAMETER", + "safeName": "QUERY_PARAMETER" }, "pascalCase": { - "unsafeName": "Name", - "safeName": "Name" + "unsafeName": "QueryParameter", + "safeName": "QueryParameter" } }, - "wireValue": "name" - }, - "valueType": { - "_type": "container", - "container": { - "_type": "optional", - "optional": { - "_type": "named", - "name": { - "originalName": "Name", + "fernFilepath": { + "allParts": [ + { + "originalName": "http", "camelCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "http", + "safeName": "http" }, "snakeCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "http", + "safeName": "http" }, "screamingSnakeCase": { - "unsafeName": "NAME", - "safeName": "NAME" + "unsafeName": "HTTP", + "safeName": "HTTP" }, "pascalCase": { - "unsafeName": "Name", - "safeName": "Name" + "unsafeName": "Http", + "safeName": "Http" } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" }, - "fernFilepath": { - "allParts": [ - { - "originalName": "commons", - "camelCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" - }, - "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" - } - } - ], - "packagePath": [], - "file": { - "originalName": "commons", - "camelCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" - }, - "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" - } - } + "snakeCase": { + "unsafeName": "http", + "safeName": "http" }, - "typeId": "type_commons:Name" + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } } - } + }, + "typeId": "type_http:QueryParameter" }, "availability": null, "docs": null @@ -20159,127 +20715,91 @@ { "name": { "name": { - "originalName": "url", + "originalName": "next", "camelCase": { - "unsafeName": "url", - "safeName": "url" + "unsafeName": "next", + "safeName": "next" }, "snakeCase": { - "unsafeName": "url", - "safeName": "url" + "unsafeName": "next", + "safeName": "next" }, "screamingSnakeCase": { - "unsafeName": "URL", - "safeName": "URL" + "unsafeName": "NEXT", + "safeName": "NEXT" }, "pascalCase": { - "unsafeName": "Url", - "safeName": "Url" + "unsafeName": "Next", + "safeName": "Next" } }, - "wireValue": "url" + "wireValue": "next" }, "valueType": { - "_type": "primitive", - "primitive": "STRING" - }, - "availability": null, - "docs": null - }, - { - "name": { + "_type": "named", "name": { - "originalName": "rootPathParameters", + "originalName": "PaginationProperty", "camelCase": { - "unsafeName": "rootPathParameters", - "safeName": "rootPathParameters" + "unsafeName": "paginationProperty", + "safeName": "paginationProperty" }, "snakeCase": { - "unsafeName": "root_path_parameters", - "safeName": "root_path_parameters" + "unsafeName": "pagination_property", + "safeName": "pagination_property" }, "screamingSnakeCase": { - "unsafeName": "ROOT_PATH_PARAMETERS", - "safeName": "ROOT_PATH_PARAMETERS" + "unsafeName": "PAGINATION_PROPERTY", + "safeName": "PAGINATION_PROPERTY" }, "pascalCase": { - "unsafeName": "RootPathParameters", - "safeName": "RootPathParameters" + "unsafeName": "PaginationProperty", + "safeName": "PaginationProperty" } }, - "wireValue": "rootPathParameters" - }, - "valueType": { - "_type": "container", - "container": { - "_type": "list", - "list": { - "_type": "named", - "name": { - "originalName": "ExamplePathParameter", + "fernFilepath": { + "allParts": [ + { + "originalName": "http", "camelCase": { - "unsafeName": "examplePathParameter", - "safeName": "examplePathParameter" + "unsafeName": "http", + "safeName": "http" }, "snakeCase": { - "unsafeName": "example_path_parameter", - "safeName": "example_path_parameter" + "unsafeName": "http", + "safeName": "http" }, "screamingSnakeCase": { - "unsafeName": "EXAMPLE_PATH_PARAMETER", - "safeName": "EXAMPLE_PATH_PARAMETER" + "unsafeName": "HTTP", + "safeName": "HTTP" }, "pascalCase": { - "unsafeName": "ExamplePathParameter", - "safeName": "ExamplePathParameter" + "unsafeName": "Http", + "safeName": "Http" } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" }, - "fernFilepath": { - "allParts": [ - { - "originalName": "http", - "camelCase": { - "unsafeName": "http", - "safeName": "http" - }, - "snakeCase": { - "unsafeName": "http", - "safeName": "http" - }, - "screamingSnakeCase": { - "unsafeName": "HTTP", - "safeName": "HTTP" - }, - "pascalCase": { - "unsafeName": "Http", - "safeName": "Http" - } - } - ], - "packagePath": [], - "file": { - "originalName": "http", - "camelCase": { - "unsafeName": "http", - "safeName": "http" - }, - "snakeCase": { - "unsafeName": "http", - "safeName": "http" - }, - "screamingSnakeCase": { - "unsafeName": "HTTP", - "safeName": "HTTP" - }, - "pascalCase": { - "unsafeName": "Http", - "safeName": "Http" - } - } + "snakeCase": { + "unsafeName": "http", + "safeName": "http" }, - "typeId": "type_http:ExamplePathParameter" + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } } - } + }, + "typeId": "type_http:PaginationProperty" }, "availability": null, "docs": null @@ -20287,193 +20807,639 @@ { "name": { "name": { - "originalName": "servicePathParameters", + "originalName": "results", "camelCase": { - "unsafeName": "servicePathParameters", - "safeName": "servicePathParameters" + "unsafeName": "results", + "safeName": "results" }, "snakeCase": { - "unsafeName": "service_path_parameters", - "safeName": "service_path_parameters" + "unsafeName": "results", + "safeName": "results" }, "screamingSnakeCase": { - "unsafeName": "SERVICE_PATH_PARAMETERS", - "safeName": "SERVICE_PATH_PARAMETERS" + "unsafeName": "RESULTS", + "safeName": "RESULTS" }, "pascalCase": { - "unsafeName": "ServicePathParameters", - "safeName": "ServicePathParameters" + "unsafeName": "Results", + "safeName": "Results" } }, - "wireValue": "servicePathParameters" + "wireValue": "results" }, "valueType": { - "_type": "container", - "container": { - "_type": "list", - "list": { - "_type": "named", - "name": { - "originalName": "ExamplePathParameter", + "_type": "named", + "name": { + "originalName": "PaginationProperty", + "camelCase": { + "unsafeName": "paginationProperty", + "safeName": "paginationProperty" + }, + "snakeCase": { + "unsafeName": "pagination_property", + "safeName": "pagination_property" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION_PROPERTY", + "safeName": "PAGINATION_PROPERTY" + }, + "pascalCase": { + "unsafeName": "PaginationProperty", + "safeName": "PaginationProperty" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", "camelCase": { - "unsafeName": "examplePathParameter", - "safeName": "examplePathParameter" + "unsafeName": "http", + "safeName": "http" }, "snakeCase": { - "unsafeName": "example_path_parameter", - "safeName": "example_path_parameter" + "unsafeName": "http", + "safeName": "http" }, "screamingSnakeCase": { - "unsafeName": "EXAMPLE_PATH_PARAMETER", - "safeName": "EXAMPLE_PATH_PARAMETER" + "unsafeName": "HTTP", + "safeName": "HTTP" }, "pascalCase": { - "unsafeName": "ExamplePathParameter", - "safeName": "ExamplePathParameter" + "unsafeName": "Http", + "safeName": "Http" } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" }, - "fernFilepath": { - "allParts": [ - { - "originalName": "http", - "camelCase": { - "unsafeName": "http", - "safeName": "http" - }, - "snakeCase": { - "unsafeName": "http", - "safeName": "http" - }, - "screamingSnakeCase": { - "unsafeName": "HTTP", - "safeName": "HTTP" - }, - "pascalCase": { - "unsafeName": "Http", - "safeName": "Http" - } - } - ], - "packagePath": [], - "file": { - "originalName": "http", - "camelCase": { - "unsafeName": "http", - "safeName": "http" - }, - "snakeCase": { - "unsafeName": "http", - "safeName": "http" - }, - "screamingSnakeCase": { - "unsafeName": "HTTP", - "safeName": "HTTP" - }, - "pascalCase": { - "unsafeName": "Http", - "safeName": "Http" - } - } + "snakeCase": { + "unsafeName": "http", + "safeName": "http" }, - "typeId": "type_http:ExamplePathParameter" + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } } - } + }, + "typeId": "type_http:PaginationProperty" }, "availability": null, "docs": null + } + ] + }, + "referencedTypes": [ + "type_http:QueryParameter", + "type_commons:Declaration", + "type_commons:WithDocs", + "type_commons:Availability", + "type_commons:AvailabilityStatus", + "type_commons:NameAndWireValue", + "type_commons:Name", + "type_commons:SafeAndUnsafeString", + "type_types:TypeReference", + "type_types:ContainerType", + "type_types:MapType", + "type_types:Literal", + "type_types:DeclaredTypeName", + "type_commons:TypeId", + "type_commons:FernFilepath", + "type_types:PrimitiveType", + "type_http:PaginationProperty", + "type_types:ObjectProperty" + ], + "examples": [], + "availability": null, + "docs": "If set, the endpoint will be generated with auto-pagination features.\n\nThe page must be defined as a query parameter included in the request,\nwhereas the next page and results are resolved from properties defined\non the response." + }, + "type_http:PaginationProperty": { + "name": { + "name": { + "originalName": "PaginationProperty", + "camelCase": { + "unsafeName": "paginationProperty", + "safeName": "paginationProperty" }, + "snakeCase": { + "unsafeName": "pagination_property", + "safeName": "pagination_property" + }, + "screamingSnakeCase": { + "unsafeName": "PAGINATION_PROPERTY", + "safeName": "PAGINATION_PROPERTY" + }, + "pascalCase": { + "unsafeName": "PaginationProperty", + "safeName": "PaginationProperty" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:PaginationProperty" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ { "name": { "name": { - "originalName": "endpointPathParameters", + "originalName": "propertyPath", "camelCase": { - "unsafeName": "endpointPathParameters", - "safeName": "endpointPathParameters" + "unsafeName": "propertyPath", + "safeName": "propertyPath" }, "snakeCase": { - "unsafeName": "endpoint_path_parameters", - "safeName": "endpoint_path_parameters" + "unsafeName": "property_path", + "safeName": "property_path" }, "screamingSnakeCase": { - "unsafeName": "ENDPOINT_PATH_PARAMETERS", - "safeName": "ENDPOINT_PATH_PARAMETERS" + "unsafeName": "PROPERTY_PATH", + "safeName": "PROPERTY_PATH" }, "pascalCase": { - "unsafeName": "EndpointPathParameters", - "safeName": "EndpointPathParameters" + "unsafeName": "PropertyPath", + "safeName": "PropertyPath" } }, - "wireValue": "endpointPathParameters" + "wireValue": "propertyPath" }, "valueType": { "_type": "container", "container": { - "_type": "list", - "list": { - "_type": "named", - "name": { - "originalName": "ExamplePathParameter", - "camelCase": { - "unsafeName": "examplePathParameter", - "safeName": "examplePathParameter" + "_type": "optional", + "optional": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "Name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + }, + "typeId": "type_commons:Name" + } + } + } + } + }, + "availability": null, + "docs": "If empty, the property is defined at the top-level.\nOtherwise, the property is defined on the nested object identified\nby the path." + }, + { + "name": { + "name": { + "originalName": "property", + "camelCase": { + "unsafeName": "property", + "safeName": "property" + }, + "snakeCase": { + "unsafeName": "property", + "safeName": "property" + }, + "screamingSnakeCase": { + "unsafeName": "PROPERTY", + "safeName": "PROPERTY" + }, + "pascalCase": { + "unsafeName": "Property", + "safeName": "Property" + } + }, + "wireValue": "property" + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "ObjectProperty", + "camelCase": { + "unsafeName": "objectProperty", + "safeName": "objectProperty" + }, + "snakeCase": { + "unsafeName": "object_property", + "safeName": "object_property" + }, + "screamingSnakeCase": { + "unsafeName": "OBJECT_PROPERTY", + "safeName": "OBJECT_PROPERTY" + }, + "pascalCase": { + "unsafeName": "ObjectProperty", + "safeName": "ObjectProperty" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" }, "snakeCase": { - "unsafeName": "example_path_parameter", - "safeName": "example_path_parameter" + "unsafeName": "types", + "safeName": "types" }, "screamingSnakeCase": { - "unsafeName": "EXAMPLE_PATH_PARAMETER", - "safeName": "EXAMPLE_PATH_PARAMETER" + "unsafeName": "TYPES", + "safeName": "TYPES" }, "pascalCase": { - "unsafeName": "ExamplePathParameter", - "safeName": "ExamplePathParameter" + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "packagePath": [], + "file": { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + }, + "typeId": "type_types:ObjectProperty" + }, + "availability": null, + "docs": null + } + ] + }, + "referencedTypes": [ + "type_commons:Name", + "type_commons:SafeAndUnsafeString", + "type_types:ObjectProperty", + "type_commons:Declaration", + "type_commons:WithDocs", + "type_commons:Availability", + "type_commons:AvailabilityStatus", + "type_commons:NameAndWireValue", + "type_types:TypeReference", + "type_types:ContainerType", + "type_types:MapType", + "type_types:Literal", + "type_types:DeclaredTypeName", + "type_commons:TypeId", + "type_commons:FernFilepath", + "type_types:PrimitiveType" + ], + "examples": [], + "availability": null, + "docs": "A property associated with a paginated endpoint's request or response." + }, + "type_http:ExampleEndpointCall": { + "name": { + "name": { + "originalName": "ExampleEndpointCall", + "camelCase": { + "unsafeName": "exampleEndpointCall", + "safeName": "exampleEndpointCall" + }, + "snakeCase": { + "unsafeName": "example_endpoint_call", + "safeName": "example_endpoint_call" + }, + "screamingSnakeCase": { + "unsafeName": "EXAMPLE_ENDPOINT_CALL", + "safeName": "EXAMPLE_ENDPOINT_CALL" + }, + "pascalCase": { + "unsafeName": "ExampleEndpointCall", + "safeName": "ExampleEndpointCall" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:ExampleEndpointCall" + }, + "shape": { + "_type": "object", + "extends": [ + { + "name": { + "originalName": "WithDocs", + "camelCase": { + "unsafeName": "withDocs", + "safeName": "withDocs" + }, + "snakeCase": { + "unsafeName": "with_docs", + "safeName": "with_docs" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_DOCS", + "safeName": "WITH_DOCS" + }, + "pascalCase": { + "unsafeName": "WithDocs", + "safeName": "WithDocs" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + }, + "typeId": "type_commons:WithDocs" + } + ], + "properties": [ + { + "name": { + "name": { + "originalName": "name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + }, + "wireValue": "name" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" } }, "fernFilepath": { "allParts": [ { - "originalName": "http", + "originalName": "commons", "camelCase": { - "unsafeName": "http", - "safeName": "http" + "unsafeName": "commons", + "safeName": "commons" }, "snakeCase": { - "unsafeName": "http", - "safeName": "http" + "unsafeName": "commons", + "safeName": "commons" }, "screamingSnakeCase": { - "unsafeName": "HTTP", - "safeName": "HTTP" + "unsafeName": "COMMONS", + "safeName": "COMMONS" }, "pascalCase": { - "unsafeName": "Http", - "safeName": "Http" + "unsafeName": "Commons", + "safeName": "Commons" } } ], "packagePath": [], "file": { - "originalName": "http", + "originalName": "commons", "camelCase": { - "unsafeName": "http", - "safeName": "http" + "unsafeName": "commons", + "safeName": "commons" }, "snakeCase": { - "unsafeName": "http", - "safeName": "http" + "unsafeName": "commons", + "safeName": "commons" }, "screamingSnakeCase": { - "unsafeName": "HTTP", - "safeName": "HTTP" + "unsafeName": "COMMONS", + "safeName": "COMMONS" }, "pascalCase": { - "unsafeName": "Http", - "safeName": "Http" + "unsafeName": "Commons", + "safeName": "Commons" } } }, - "typeId": "type_http:ExamplePathParameter" + "typeId": "type_commons:Name" } } }, @@ -20483,25 +21449,55 @@ { "name": { "name": { - "originalName": "serviceHeaders", + "originalName": "url", "camelCase": { - "unsafeName": "serviceHeaders", - "safeName": "serviceHeaders" + "unsafeName": "url", + "safeName": "url" }, "snakeCase": { - "unsafeName": "service_headers", - "safeName": "service_headers" + "unsafeName": "url", + "safeName": "url" }, "screamingSnakeCase": { - "unsafeName": "SERVICE_HEADERS", - "safeName": "SERVICE_HEADERS" + "unsafeName": "URL", + "safeName": "URL" }, "pascalCase": { - "unsafeName": "ServiceHeaders", - "safeName": "ServiceHeaders" + "unsafeName": "Url", + "safeName": "Url" } }, - "wireValue": "serviceHeaders" + "wireValue": "url" + }, + "valueType": { + "_type": "primitive", + "primitive": "STRING" + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "rootPathParameters", + "camelCase": { + "unsafeName": "rootPathParameters", + "safeName": "rootPathParameters" + }, + "snakeCase": { + "unsafeName": "root_path_parameters", + "safeName": "root_path_parameters" + }, + "screamingSnakeCase": { + "unsafeName": "ROOT_PATH_PARAMETERS", + "safeName": "ROOT_PATH_PARAMETERS" + }, + "pascalCase": { + "unsafeName": "RootPathParameters", + "safeName": "RootPathParameters" + } + }, + "wireValue": "rootPathParameters" }, "valueType": { "_type": "container", @@ -20510,22 +21506,22 @@ "list": { "_type": "named", "name": { - "originalName": "ExampleHeader", + "originalName": "ExamplePathParameter", "camelCase": { - "unsafeName": "exampleHeader", - "safeName": "exampleHeader" + "unsafeName": "examplePathParameter", + "safeName": "examplePathParameter" }, "snakeCase": { - "unsafeName": "example_header", - "safeName": "example_header" + "unsafeName": "example_path_parameter", + "safeName": "example_path_parameter" }, "screamingSnakeCase": { - "unsafeName": "EXAMPLE_HEADER", - "safeName": "EXAMPLE_HEADER" + "unsafeName": "EXAMPLE_PATH_PARAMETER", + "safeName": "EXAMPLE_PATH_PARAMETER" }, "pascalCase": { - "unsafeName": "ExampleHeader", - "safeName": "ExampleHeader" + "unsafeName": "ExamplePathParameter", + "safeName": "ExamplePathParameter" } }, "fernFilepath": { @@ -20571,7 +21567,7 @@ } } }, - "typeId": "type_http:ExampleHeader" + "typeId": "type_http:ExamplePathParameter" } } }, @@ -20581,25 +21577,25 @@ { "name": { "name": { - "originalName": "endpointHeaders", + "originalName": "servicePathParameters", "camelCase": { - "unsafeName": "endpointHeaders", - "safeName": "endpointHeaders" + "unsafeName": "servicePathParameters", + "safeName": "servicePathParameters" }, "snakeCase": { - "unsafeName": "endpoint_headers", - "safeName": "endpoint_headers" + "unsafeName": "service_path_parameters", + "safeName": "service_path_parameters" }, "screamingSnakeCase": { - "unsafeName": "ENDPOINT_HEADERS", - "safeName": "ENDPOINT_HEADERS" + "unsafeName": "SERVICE_PATH_PARAMETERS", + "safeName": "SERVICE_PATH_PARAMETERS" }, "pascalCase": { - "unsafeName": "EndpointHeaders", - "safeName": "EndpointHeaders" + "unsafeName": "ServicePathParameters", + "safeName": "ServicePathParameters" } }, - "wireValue": "endpointHeaders" + "wireValue": "servicePathParameters" }, "valueType": { "_type": "container", @@ -20608,22 +21604,22 @@ "list": { "_type": "named", "name": { - "originalName": "ExampleHeader", + "originalName": "ExamplePathParameter", "camelCase": { - "unsafeName": "exampleHeader", - "safeName": "exampleHeader" + "unsafeName": "examplePathParameter", + "safeName": "examplePathParameter" }, "snakeCase": { - "unsafeName": "example_header", - "safeName": "example_header" + "unsafeName": "example_path_parameter", + "safeName": "example_path_parameter" }, "screamingSnakeCase": { - "unsafeName": "EXAMPLE_HEADER", - "safeName": "EXAMPLE_HEADER" + "unsafeName": "EXAMPLE_PATH_PARAMETER", + "safeName": "EXAMPLE_PATH_PARAMETER" }, "pascalCase": { - "unsafeName": "ExampleHeader", - "safeName": "ExampleHeader" + "unsafeName": "ExamplePathParameter", + "safeName": "ExamplePathParameter" } }, "fernFilepath": { @@ -20669,7 +21665,7 @@ } } }, - "typeId": "type_http:ExampleHeader" + "typeId": "type_http:ExamplePathParameter" } } }, @@ -20679,15 +21675,309 @@ { "name": { "name": { - "originalName": "queryParameters", + "originalName": "endpointPathParameters", "camelCase": { - "unsafeName": "queryParameters", - "safeName": "queryParameters" + "unsafeName": "endpointPathParameters", + "safeName": "endpointPathParameters" }, "snakeCase": { - "unsafeName": "query_parameters", - "safeName": "query_parameters" - }, + "unsafeName": "endpoint_path_parameters", + "safeName": "endpoint_path_parameters" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINT_PATH_PARAMETERS", + "safeName": "ENDPOINT_PATH_PARAMETERS" + }, + "pascalCase": { + "unsafeName": "EndpointPathParameters", + "safeName": "EndpointPathParameters" + } + }, + "wireValue": "endpointPathParameters" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ExamplePathParameter", + "camelCase": { + "unsafeName": "examplePathParameter", + "safeName": "examplePathParameter" + }, + "snakeCase": { + "unsafeName": "example_path_parameter", + "safeName": "example_path_parameter" + }, + "screamingSnakeCase": { + "unsafeName": "EXAMPLE_PATH_PARAMETER", + "safeName": "EXAMPLE_PATH_PARAMETER" + }, + "pascalCase": { + "unsafeName": "ExamplePathParameter", + "safeName": "ExamplePathParameter" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:ExamplePathParameter" + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "serviceHeaders", + "camelCase": { + "unsafeName": "serviceHeaders", + "safeName": "serviceHeaders" + }, + "snakeCase": { + "unsafeName": "service_headers", + "safeName": "service_headers" + }, + "screamingSnakeCase": { + "unsafeName": "SERVICE_HEADERS", + "safeName": "SERVICE_HEADERS" + }, + "pascalCase": { + "unsafeName": "ServiceHeaders", + "safeName": "ServiceHeaders" + } + }, + "wireValue": "serviceHeaders" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ExampleHeader", + "camelCase": { + "unsafeName": "exampleHeader", + "safeName": "exampleHeader" + }, + "snakeCase": { + "unsafeName": "example_header", + "safeName": "example_header" + }, + "screamingSnakeCase": { + "unsafeName": "EXAMPLE_HEADER", + "safeName": "EXAMPLE_HEADER" + }, + "pascalCase": { + "unsafeName": "ExampleHeader", + "safeName": "ExampleHeader" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:ExampleHeader" + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "endpointHeaders", + "camelCase": { + "unsafeName": "endpointHeaders", + "safeName": "endpointHeaders" + }, + "snakeCase": { + "unsafeName": "endpoint_headers", + "safeName": "endpoint_headers" + }, + "screamingSnakeCase": { + "unsafeName": "ENDPOINT_HEADERS", + "safeName": "ENDPOINT_HEADERS" + }, + "pascalCase": { + "unsafeName": "EndpointHeaders", + "safeName": "EndpointHeaders" + } + }, + "wireValue": "endpointHeaders" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ExampleHeader", + "camelCase": { + "unsafeName": "exampleHeader", + "safeName": "exampleHeader" + }, + "snakeCase": { + "unsafeName": "example_header", + "safeName": "example_header" + }, + "screamingSnakeCase": { + "unsafeName": "EXAMPLE_HEADER", + "safeName": "EXAMPLE_HEADER" + }, + "pascalCase": { + "unsafeName": "ExampleHeader", + "safeName": "ExampleHeader" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:ExampleHeader" + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "queryParameters", + "camelCase": { + "unsafeName": "queryParameters", + "safeName": "queryParameters" + }, + "snakeCase": { + "unsafeName": "query_parameters", + "safeName": "query_parameters" + }, "screamingSnakeCase": { "unsafeName": "QUERY_PARAMETERS", "safeName": "QUERY_PARAMETERS" @@ -26075,22 +27365,22 @@ "keyType": { "_type": "named", "name": { - "originalName": "WebsocketChannelId", + "originalName": "WebSocketChannelId", "camelCase": { - "unsafeName": "websocketChannelId", - "safeName": "websocketChannelId" + "unsafeName": "webSocketChannelId", + "safeName": "webSocketChannelId" }, "snakeCase": { - "unsafeName": "websocket_channel_id", - "safeName": "websocket_channel_id" + "unsafeName": "web_socket_channel_id", + "safeName": "web_socket_channel_id" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_CHANNEL_ID", - "safeName": "WEBSOCKET_CHANNEL_ID" + "unsafeName": "WEB_SOCKET_CHANNEL_ID", + "safeName": "WEB_SOCKET_CHANNEL_ID" }, "pascalCase": { - "unsafeName": "WebsocketChannelId", - "safeName": "WebsocketChannelId" + "unsafeName": "WebSocketChannelId", + "safeName": "WebSocketChannelId" } }, "fernFilepath": { @@ -26136,27 +27426,27 @@ } } }, - "typeId": "type_commons:WebsocketChannelId" + "typeId": "type_commons:WebSocketChannelId" }, "valueType": { "_type": "named", "name": { - "originalName": "WebsocketChannel", + "originalName": "WebSocketChannel", "camelCase": { - "unsafeName": "websocketChannel", - "safeName": "websocketChannel" + "unsafeName": "webSocketChannel", + "safeName": "webSocketChannel" }, "snakeCase": { - "unsafeName": "websocket_channel", - "safeName": "websocket_channel" + "unsafeName": "web_socket_channel", + "safeName": "web_socket_channel" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_CHANNEL", - "safeName": "WEBSOCKET_CHANNEL" + "unsafeName": "WEB_SOCKET_CHANNEL", + "safeName": "WEB_SOCKET_CHANNEL" }, "pascalCase": { - "unsafeName": "WebsocketChannel", - "safeName": "WebsocketChannel" + "unsafeName": "WebSocketChannel", + "safeName": "WebSocketChannel" } }, "fernFilepath": { @@ -26202,7 +27492,7 @@ } } }, - "typeId": "type_websocket:WebsocketChannel" + "typeId": "type_websocket:WebSocketChannel" } } } @@ -27473,6 +28763,8 @@ "type_http:FileUploadRequest", "type_http:FileUploadRequestProperty", "type_http:FileProperty", + "type_http:FilePropertySingle", + "type_http:FilePropertyArray", "type_http:BytesRequest", "type_http:SdkRequest", "type_http:SdkRequestShape", @@ -27490,6 +28782,8 @@ "type_http:ResponseError", "type_errors:DeclaredErrorName", "type_commons:ErrorId", + "type_http:Pagination", + "type_http:PaginationProperty", "type_http:ExampleEndpointCall", "type_http:ExamplePathParameter", "type_http:ExampleHeader", @@ -27513,15 +28807,19 @@ "type_webhooks:InlinedWebhookPayload", "type_webhooks:InlinedWebhookPayloadProperty", "type_webhooks:WebhookPayloadReference", - "type_commons:WebsocketChannelId", - "type_websocket:WebsocketChannel", - "type_websocket:WebsocketMessageId", - "type_websocket:WebsocketMessage", - "type_websocket:WebsocketMessageOrigin", - "type_websocket:WebsocketMessageBody", - "type_websocket:InlinedWebsocketMessageBody", - "type_websocket:InlinedWebsocketMessageBodyProperty", - "type_websocket:WebsocketMessageBodyReference", + "type_commons:WebSocketChannelId", + "type_websocket:WebSocketChannel", + "type_websocket:WebSocketName", + "type_websocket:WebSocketMessage", + "type_websocket:WebSocketMessageId", + "type_websocket:WebSocketMessageOrigin", + "type_websocket:WebSocketMessageBody", + "type_websocket:InlinedWebSocketMessageBody", + "type_websocket:InlinedWebSocketMessageBodyProperty", + "type_websocket:WebSocketMessageBodyReference", + "type_websocket:ExampleWebSocketSession", + "type_websocket:ExampleWebSocketMessage", + "type_websocket:ExampleWebSocketMessageBody", "type_errors:ErrorDeclaration", "type_commons:SubpackageId", "type_ir:Subpackage", @@ -29115,22 +30413,22 @@ "optional": { "_type": "named", "name": { - "originalName": "WebsocketChannelId", + "originalName": "WebSocketChannelId", "camelCase": { - "unsafeName": "websocketChannelId", - "safeName": "websocketChannelId" + "unsafeName": "webSocketChannelId", + "safeName": "webSocketChannelId" }, "snakeCase": { - "unsafeName": "websocket_channel_id", - "safeName": "websocket_channel_id" + "unsafeName": "web_socket_channel_id", + "safeName": "web_socket_channel_id" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_CHANNEL_ID", - "safeName": "WEBSOCKET_CHANNEL_ID" + "unsafeName": "WEB_SOCKET_CHANNEL_ID", + "safeName": "WEB_SOCKET_CHANNEL_ID" }, "pascalCase": { - "unsafeName": "WebsocketChannelId", - "safeName": "WebsocketChannelId" + "unsafeName": "WebSocketChannelId", + "safeName": "WebSocketChannelId" } }, "fernFilepath": { @@ -29176,7 +30474,7 @@ } } }, - "typeId": "type_commons:WebsocketChannelId" + "typeId": "type_commons:WebSocketChannelId" } } }, @@ -29420,7 +30718,7 @@ "type_commons:TypeId", "type_commons:ErrorId", "type_commons:WebhookGroupId", - "type_commons:WebsocketChannelId", + "type_commons:WebSocketChannelId", "type_commons:SubpackageId", "type_ir:PackageNavigationConfig" ], @@ -29668,7 +30966,7 @@ "type_commons:TypeId", "type_commons:ErrorId", "type_commons:WebhookGroupId", - "type_commons:WebsocketChannelId", + "type_commons:WebSocketChannelId", "type_commons:SubpackageId", "type_ir:PackageNavigationConfig" ], @@ -46576,25 +47874,25 @@ "availability": null, "docs": null }, - "type_websocket:WebsocketMessageId": { + "type_websocket:WebSocketMessageId": { "name": { "name": { - "originalName": "WebsocketMessageId", + "originalName": "WebSocketMessageId", "camelCase": { - "unsafeName": "websocketMessageId", - "safeName": "websocketMessageId" + "unsafeName": "webSocketMessageId", + "safeName": "webSocketMessageId" }, "snakeCase": { - "unsafeName": "websocket_message_id", - "safeName": "websocket_message_id" + "unsafeName": "web_socket_message_id", + "safeName": "web_socket_message_id" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE_ID", - "safeName": "WEBSOCKET_MESSAGE_ID" + "unsafeName": "WEB_SOCKET_MESSAGE_ID", + "safeName": "WEB_SOCKET_MESSAGE_ID" }, "pascalCase": { - "unsafeName": "WebsocketMessageId", - "safeName": "WebsocketMessageId" + "unsafeName": "WebSocketMessageId", + "safeName": "WebSocketMessageId" } }, "fernFilepath": { @@ -46640,7 +47938,7 @@ } } }, - "typeId": "type_websocket:WebsocketMessageId" + "typeId": "type_websocket:WebSocketMessageId" }, "shape": { "_type": "alias", @@ -46658,25 +47956,25 @@ "availability": null, "docs": null }, - "type_websocket:WebsocketChannel": { + "type_websocket:WebSocketChannel": { "name": { "name": { - "originalName": "WebsocketChannel", + "originalName": "WebSocketChannel", "camelCase": { - "unsafeName": "websocketChannel", - "safeName": "websocketChannel" + "unsafeName": "webSocketChannel", + "safeName": "webSocketChannel" }, "snakeCase": { - "unsafeName": "websocket_channel", - "safeName": "websocket_channel" + "unsafeName": "web_socket_channel", + "safeName": "web_socket_channel" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_CHANNEL", - "safeName": "WEBSOCKET_CHANNEL" + "unsafeName": "WEB_SOCKET_CHANNEL", + "safeName": "WEB_SOCKET_CHANNEL" }, "pascalCase": { - "unsafeName": "WebsocketChannel", - "safeName": "WebsocketChannel" + "unsafeName": "WebSocketChannel", + "safeName": "WebSocketChannel" } }, "fernFilepath": { @@ -46722,7 +48020,7 @@ } } }, - "typeId": "type_websocket:WebsocketChannel" + "typeId": "type_websocket:WebSocketChannel" }, "shape": { "_type": "object", @@ -46794,6 +48092,134 @@ } ], "properties": [ + { + "name": { + "name": { + "originalName": "name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + }, + "wireValue": "name" + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "WebSocketName", + "camelCase": { + "unsafeName": "webSocketName", + "safeName": "webSocketName" + }, + "snakeCase": { + "unsafeName": "web_socket_name", + "safeName": "web_socket_name" + }, + "screamingSnakeCase": { + "unsafeName": "WEB_SOCKET_NAME", + "safeName": "WEB_SOCKET_NAME" + }, + "pascalCase": { + "unsafeName": "WebSocketName", + "safeName": "WebSocketName" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:WebSocketName" + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "displayName", + "camelCase": { + "unsafeName": "displayName", + "safeName": "displayName" + }, + "snakeCase": { + "unsafeName": "display_name", + "safeName": "display_name" + }, + "screamingSnakeCase": { + "unsafeName": "DISPLAY_NAME", + "safeName": "DISPLAY_NAME" + }, + "pascalCase": { + "unsafeName": "DisplayName", + "safeName": "DisplayName" + } + }, + "wireValue": "displayName" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": "STRING" + } + } + }, + "availability": null, + "docs": null + }, { "name": { "name": { @@ -47236,26 +48662,26 @@ "valueType": { "_type": "container", "container": { - "_type": "map", - "keyType": { + "_type": "list", + "list": { "_type": "named", "name": { - "originalName": "WebsocketMessageId", + "originalName": "WebSocketMessage", "camelCase": { - "unsafeName": "websocketMessageId", - "safeName": "websocketMessageId" + "unsafeName": "webSocketMessage", + "safeName": "webSocketMessage" }, "snakeCase": { - "unsafeName": "websocket_message_id", - "safeName": "websocket_message_id" + "unsafeName": "web_socket_message", + "safeName": "web_socket_message" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE_ID", - "safeName": "WEBSOCKET_MESSAGE_ID" + "unsafeName": "WEB_SOCKET_MESSAGE", + "safeName": "WEB_SOCKET_MESSAGE" }, "pascalCase": { - "unsafeName": "WebsocketMessageId", - "safeName": "WebsocketMessageId" + "unsafeName": "WebSocketMessage", + "safeName": "WebSocketMessage" } }, "fernFilepath": { @@ -47301,27 +48727,1596 @@ } } }, - "typeId": "type_websocket:WebsocketMessageId" + "typeId": "type_websocket:WebSocketMessage" + } + } + }, + "availability": null, + "docs": "The messages that can be sent and received on this channel" + }, + { + "name": { + "name": { + "originalName": "examples", + "camelCase": { + "unsafeName": "examples", + "safeName": "examples" }, - "valueType": { + "snakeCase": { + "unsafeName": "examples", + "safeName": "examples" + }, + "screamingSnakeCase": { + "unsafeName": "EXAMPLES", + "safeName": "EXAMPLES" + }, + "pascalCase": { + "unsafeName": "Examples", + "safeName": "Examples" + } + }, + "wireValue": "examples" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ExampleWebSocketSession", + "camelCase": { + "unsafeName": "exampleWebSocketSession", + "safeName": "exampleWebSocketSession" + }, + "snakeCase": { + "unsafeName": "example_web_socket_session", + "safeName": "example_web_socket_session" + }, + "screamingSnakeCase": { + "unsafeName": "EXAMPLE_WEB_SOCKET_SESSION", + "safeName": "EXAMPLE_WEB_SOCKET_SESSION" + }, + "pascalCase": { + "unsafeName": "ExampleWebSocketSession", + "safeName": "ExampleWebSocketSession" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:ExampleWebSocketSession" + } + } + }, + "availability": null, + "docs": null + } + ] + }, + "referencedTypes": [ + "type_commons:Declaration", + "type_commons:WithDocs", + "type_commons:Availability", + "type_commons:AvailabilityStatus", + "type_websocket:WebSocketName", + "type_commons:Name", + "type_commons:SafeAndUnsafeString", + "type_http:HttpPath", + "type_http:HttpPathPart", + "type_http:HttpHeader", + "type_commons:NameAndWireValue", + "type_types:TypeReference", + "type_types:ContainerType", + "type_types:MapType", + "type_types:Literal", + "type_types:DeclaredTypeName", + "type_commons:TypeId", + "type_commons:FernFilepath", + "type_types:PrimitiveType", + "type_http:QueryParameter", + "type_http:PathParameter", + "type_http:PathParameterLocation", + "type_variables:VariableId", + "type_websocket:WebSocketMessage", + "type_websocket:WebSocketMessageId", + "type_websocket:WebSocketMessageOrigin", + "type_websocket:WebSocketMessageBody", + "type_websocket:InlinedWebSocketMessageBody", + "type_websocket:InlinedWebSocketMessageBodyProperty", + "type_websocket:WebSocketMessageBodyReference", + "type_websocket:ExampleWebSocketSession", + "type_http:ExamplePathParameter", + "type_types:ExampleTypeReference", + "type_commons:WithJsonExample", + "type_types:ExampleTypeReferenceShape", + "type_types:ExamplePrimitive", + "type_commons:EscapedString", + "type_types:ExampleContainer", + "type_types:ExampleKeyValuePair", + "type_types:ExampleNamedType", + "type_types:ExampleTypeShape", + "type_types:ExampleAliasType", + "type_types:ExampleEnumType", + "type_types:ExampleObjectType", + "type_types:ExampleObjectProperty", + "type_types:ExampleUnionType", + "type_types:ExampleSingleUnionType", + "type_types:ExampleSingleUnionTypeProperties", + "type_types:ExampleObjectTypeWithTypeId", + "type_types:ExampleUndiscriminatedUnionType", + "type_http:ExampleHeader", + "type_http:ExampleQueryParameter", + "type_websocket:ExampleWebSocketMessage", + "type_websocket:ExampleWebSocketMessageBody", + "type_http:ExampleInlinedRequestBody", + "type_http:ExampleInlinedRequestBodyProperty" + ], + "examples": [], + "availability": null, + "docs": null + }, + "type_websocket:WebSocketName": { + "name": { + "name": { + "originalName": "WebSocketName", + "camelCase": { + "unsafeName": "webSocketName", + "safeName": "webSocketName" + }, + "snakeCase": { + "unsafeName": "web_socket_name", + "safeName": "web_socket_name" + }, + "screamingSnakeCase": { + "unsafeName": "WEB_SOCKET_NAME", + "safeName": "WEB_SOCKET_NAME" + }, + "pascalCase": { + "unsafeName": "WebSocketName", + "safeName": "WebSocketName" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:WebSocketName" + }, + "shape": { + "_type": "alias", + "aliasOf": { + "_type": "named", + "name": { + "originalName": "Name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + }, + "typeId": "type_commons:Name" + }, + "resolvedType": { + "_type": "named", + "name": { + "name": { + "originalName": "Name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + }, + "typeId": "type_commons:Name" + }, + "shape": "OBJECT" + } + }, + "referencedTypes": [ + "type_commons:Name", + "type_commons:SafeAndUnsafeString" + ], + "examples": [], + "availability": null, + "docs": null + }, + "type_websocket:WebSocketMessage": { + "name": { + "name": { + "originalName": "WebSocketMessage", + "camelCase": { + "unsafeName": "webSocketMessage", + "safeName": "webSocketMessage" + }, + "snakeCase": { + "unsafeName": "web_socket_message", + "safeName": "web_socket_message" + }, + "screamingSnakeCase": { + "unsafeName": "WEB_SOCKET_MESSAGE", + "safeName": "WEB_SOCKET_MESSAGE" + }, + "pascalCase": { + "unsafeName": "WebSocketMessage", + "safeName": "WebSocketMessage" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:WebSocketMessage" + }, + "shape": { + "_type": "object", + "extends": [ + { + "name": { + "originalName": "Declaration", + "camelCase": { + "unsafeName": "declaration", + "safeName": "declaration" + }, + "snakeCase": { + "unsafeName": "declaration", + "safeName": "declaration" + }, + "screamingSnakeCase": { + "unsafeName": "DECLARATION", + "safeName": "DECLARATION" + }, + "pascalCase": { + "unsafeName": "Declaration", + "safeName": "Declaration" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + }, + "typeId": "type_commons:Declaration" + } + ], + "properties": [ + { + "name": { + "name": { + "originalName": "type", + "camelCase": { + "unsafeName": "type", + "safeName": "type" + }, + "snakeCase": { + "unsafeName": "type", + "safeName": "type" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE", + "safeName": "TYPE" + }, + "pascalCase": { + "unsafeName": "Type", + "safeName": "Type" + } + }, + "wireValue": "type" + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "WebSocketMessageId", + "camelCase": { + "unsafeName": "webSocketMessageId", + "safeName": "webSocketMessageId" + }, + "snakeCase": { + "unsafeName": "web_socket_message_id", + "safeName": "web_socket_message_id" + }, + "screamingSnakeCase": { + "unsafeName": "WEB_SOCKET_MESSAGE_ID", + "safeName": "WEB_SOCKET_MESSAGE_ID" + }, + "pascalCase": { + "unsafeName": "WebSocketMessageId", + "safeName": "WebSocketMessageId" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:WebSocketMessageId" + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "displayName", + "camelCase": { + "unsafeName": "displayName", + "safeName": "displayName" + }, + "snakeCase": { + "unsafeName": "display_name", + "safeName": "display_name" + }, + "screamingSnakeCase": { + "unsafeName": "DISPLAY_NAME", + "safeName": "DISPLAY_NAME" + }, + "pascalCase": { + "unsafeName": "DisplayName", + "safeName": "DisplayName" + } + }, + "wireValue": "displayName" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "primitive", + "primitive": "STRING" + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "origin", + "camelCase": { + "unsafeName": "origin", + "safeName": "origin" + }, + "snakeCase": { + "unsafeName": "origin", + "safeName": "origin" + }, + "screamingSnakeCase": { + "unsafeName": "ORIGIN", + "safeName": "ORIGIN" + }, + "pascalCase": { + "unsafeName": "Origin", + "safeName": "Origin" + } + }, + "wireValue": "origin" + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "WebSocketMessageOrigin", + "camelCase": { + "unsafeName": "webSocketMessageOrigin", + "safeName": "webSocketMessageOrigin" + }, + "snakeCase": { + "unsafeName": "web_socket_message_origin", + "safeName": "web_socket_message_origin" + }, + "screamingSnakeCase": { + "unsafeName": "WEB_SOCKET_MESSAGE_ORIGIN", + "safeName": "WEB_SOCKET_MESSAGE_ORIGIN" + }, + "pascalCase": { + "unsafeName": "WebSocketMessageOrigin", + "safeName": "WebSocketMessageOrigin" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:WebSocketMessageOrigin" + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "body", + "camelCase": { + "unsafeName": "body", + "safeName": "body" + }, + "snakeCase": { + "unsafeName": "body", + "safeName": "body" + }, + "screamingSnakeCase": { + "unsafeName": "BODY", + "safeName": "BODY" + }, + "pascalCase": { + "unsafeName": "Body", + "safeName": "Body" + } + }, + "wireValue": "body" + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "WebSocketMessageBody", + "camelCase": { + "unsafeName": "webSocketMessageBody", + "safeName": "webSocketMessageBody" + }, + "snakeCase": { + "unsafeName": "web_socket_message_body", + "safeName": "web_socket_message_body" + }, + "screamingSnakeCase": { + "unsafeName": "WEB_SOCKET_MESSAGE_BODY", + "safeName": "WEB_SOCKET_MESSAGE_BODY" + }, + "pascalCase": { + "unsafeName": "WebSocketMessageBody", + "safeName": "WebSocketMessageBody" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:WebSocketMessageBody" + }, + "availability": null, + "docs": null + } + ] + }, + "referencedTypes": [ + "type_commons:Declaration", + "type_commons:WithDocs", + "type_commons:Availability", + "type_commons:AvailabilityStatus", + "type_websocket:WebSocketMessageId", + "type_websocket:WebSocketMessageOrigin", + "type_websocket:WebSocketMessageBody", + "type_websocket:InlinedWebSocketMessageBody", + "type_commons:Name", + "type_commons:SafeAndUnsafeString", + "type_types:DeclaredTypeName", + "type_commons:TypeId", + "type_commons:FernFilepath", + "type_websocket:InlinedWebSocketMessageBodyProperty", + "type_commons:NameAndWireValue", + "type_types:TypeReference", + "type_types:ContainerType", + "type_types:MapType", + "type_types:Literal", + "type_types:PrimitiveType", + "type_websocket:WebSocketMessageBodyReference" + ], + "examples": [], + "availability": null, + "docs": null + }, + "type_websocket:WebSocketMessageOrigin": { + "name": { + "name": { + "originalName": "WebSocketMessageOrigin", + "camelCase": { + "unsafeName": "webSocketMessageOrigin", + "safeName": "webSocketMessageOrigin" + }, + "snakeCase": { + "unsafeName": "web_socket_message_origin", + "safeName": "web_socket_message_origin" + }, + "screamingSnakeCase": { + "unsafeName": "WEB_SOCKET_MESSAGE_ORIGIN", + "safeName": "WEB_SOCKET_MESSAGE_ORIGIN" + }, + "pascalCase": { + "unsafeName": "WebSocketMessageOrigin", + "safeName": "WebSocketMessageOrigin" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:WebSocketMessageOrigin" + }, + "shape": { + "_type": "enum", + "values": [ + { + "name": { + "name": { + "originalName": "client", + "camelCase": { + "unsafeName": "client", + "safeName": "client" + }, + "snakeCase": { + "unsafeName": "client", + "safeName": "client" + }, + "screamingSnakeCase": { + "unsafeName": "CLIENT", + "safeName": "CLIENT" + }, + "pascalCase": { + "unsafeName": "Client", + "safeName": "Client" + } + }, + "wireValue": "client" + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "server", + "camelCase": { + "unsafeName": "server", + "safeName": "server" + }, + "snakeCase": { + "unsafeName": "server", + "safeName": "server" + }, + "screamingSnakeCase": { + "unsafeName": "SERVER", + "safeName": "SERVER" + }, + "pascalCase": { + "unsafeName": "Server", + "safeName": "Server" + } + }, + "wireValue": "server" + }, + "availability": null, + "docs": null + } + ] + }, + "referencedTypes": [], + "examples": [], + "availability": null, + "docs": null + }, + "type_websocket:WebSocketMessageBody": { + "name": { + "name": { + "originalName": "WebSocketMessageBody", + "camelCase": { + "unsafeName": "webSocketMessageBody", + "safeName": "webSocketMessageBody" + }, + "snakeCase": { + "unsafeName": "web_socket_message_body", + "safeName": "web_socket_message_body" + }, + "screamingSnakeCase": { + "unsafeName": "WEB_SOCKET_MESSAGE_BODY", + "safeName": "WEB_SOCKET_MESSAGE_BODY" + }, + "pascalCase": { + "unsafeName": "WebSocketMessageBody", + "safeName": "WebSocketMessageBody" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:WebSocketMessageBody" + }, + "shape": { + "_type": "union", + "discriminant": { + "name": { + "originalName": "type", + "camelCase": { + "unsafeName": "type", + "safeName": "type" + }, + "snakeCase": { + "unsafeName": "type", + "safeName": "type" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE", + "safeName": "TYPE" + }, + "pascalCase": { + "unsafeName": "Type", + "safeName": "Type" + } + }, + "wireValue": "type" + }, + "extends": [], + "baseProperties": [], + "types": [ + { + "discriminantValue": { + "name": { + "originalName": "inlinedBody", + "camelCase": { + "unsafeName": "inlinedBody", + "safeName": "inlinedBody" + }, + "snakeCase": { + "unsafeName": "inlined_body", + "safeName": "inlined_body" + }, + "screamingSnakeCase": { + "unsafeName": "INLINED_BODY", + "safeName": "INLINED_BODY" + }, + "pascalCase": { + "unsafeName": "InlinedBody", + "safeName": "InlinedBody" + } + }, + "wireValue": "inlinedBody" + }, + "shape": { + "_type": "samePropertiesAsObject", + "name": { + "originalName": "InlinedWebSocketMessageBody", + "camelCase": { + "unsafeName": "inlinedWebSocketMessageBody", + "safeName": "inlinedWebSocketMessageBody" + }, + "snakeCase": { + "unsafeName": "inlined_web_socket_message_body", + "safeName": "inlined_web_socket_message_body" + }, + "screamingSnakeCase": { + "unsafeName": "INLINED_WEB_SOCKET_MESSAGE_BODY", + "safeName": "INLINED_WEB_SOCKET_MESSAGE_BODY" + }, + "pascalCase": { + "unsafeName": "InlinedWebSocketMessageBody", + "safeName": "InlinedWebSocketMessageBody" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:InlinedWebSocketMessageBody" + }, + "docs": null + }, + { + "discriminantValue": { + "name": { + "originalName": "reference", + "camelCase": { + "unsafeName": "reference", + "safeName": "reference" + }, + "snakeCase": { + "unsafeName": "reference", + "safeName": "reference" + }, + "screamingSnakeCase": { + "unsafeName": "REFERENCE", + "safeName": "REFERENCE" + }, + "pascalCase": { + "unsafeName": "Reference", + "safeName": "Reference" + } + }, + "wireValue": "reference" + }, + "shape": { + "_type": "samePropertiesAsObject", + "name": { + "originalName": "WebSocketMessageBodyReference", + "camelCase": { + "unsafeName": "webSocketMessageBodyReference", + "safeName": "webSocketMessageBodyReference" + }, + "snakeCase": { + "unsafeName": "web_socket_message_body_reference", + "safeName": "web_socket_message_body_reference" + }, + "screamingSnakeCase": { + "unsafeName": "WEB_SOCKET_MESSAGE_BODY_REFERENCE", + "safeName": "WEB_SOCKET_MESSAGE_BODY_REFERENCE" + }, + "pascalCase": { + "unsafeName": "WebSocketMessageBodyReference", + "safeName": "WebSocketMessageBodyReference" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:WebSocketMessageBodyReference" + }, + "docs": null + } + ] + }, + "referencedTypes": [ + "type_websocket:InlinedWebSocketMessageBody", + "type_commons:Name", + "type_commons:SafeAndUnsafeString", + "type_types:DeclaredTypeName", + "type_commons:TypeId", + "type_commons:FernFilepath", + "type_websocket:InlinedWebSocketMessageBodyProperty", + "type_commons:WithDocs", + "type_commons:NameAndWireValue", + "type_types:TypeReference", + "type_types:ContainerType", + "type_types:MapType", + "type_types:Literal", + "type_types:PrimitiveType", + "type_websocket:WebSocketMessageBodyReference" + ], + "examples": [], + "availability": null, + "docs": null + }, + "type_websocket:InlinedWebSocketMessageBody": { + "name": { + "name": { + "originalName": "InlinedWebSocketMessageBody", + "camelCase": { + "unsafeName": "inlinedWebSocketMessageBody", + "safeName": "inlinedWebSocketMessageBody" + }, + "snakeCase": { + "unsafeName": "inlined_web_socket_message_body", + "safeName": "inlined_web_socket_message_body" + }, + "screamingSnakeCase": { + "unsafeName": "INLINED_WEB_SOCKET_MESSAGE_BODY", + "safeName": "INLINED_WEB_SOCKET_MESSAGE_BODY" + }, + "pascalCase": { + "unsafeName": "InlinedWebSocketMessageBody", + "safeName": "InlinedWebSocketMessageBody" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + ], + "packagePath": [], + "file": { + "originalName": "websocket", + "camelCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "snakeCase": { + "unsafeName": "websocket", + "safeName": "websocket" + }, + "screamingSnakeCase": { + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" + }, + "pascalCase": { + "unsafeName": "Websocket", + "safeName": "Websocket" + } + } + }, + "typeId": "type_websocket:InlinedWebSocketMessageBody" + }, + "shape": { + "_type": "object", + "extends": [], + "properties": [ + { + "name": { + "name": { + "originalName": "name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + }, + "wireValue": "name" + }, + "valueType": { + "_type": "named", + "name": { + "originalName": "Name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + }, + "typeId": "type_commons:Name" + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "extends", + "camelCase": { + "unsafeName": "extends", + "safeName": "extends" + }, + "snakeCase": { + "unsafeName": "extends", + "safeName": "extends" + }, + "screamingSnakeCase": { + "unsafeName": "EXTENDS", + "safeName": "EXTENDS" + }, + "pascalCase": { + "unsafeName": "Extends", + "safeName": "Extends" + } + }, + "wireValue": "extends" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "DeclaredTypeName", + "camelCase": { + "unsafeName": "declaredTypeName", + "safeName": "declaredTypeName" + }, + "snakeCase": { + "unsafeName": "declared_type_name", + "safeName": "declared_type_name" + }, + "screamingSnakeCase": { + "unsafeName": "DECLARED_TYPE_NAME", + "safeName": "DECLARED_TYPE_NAME" + }, + "pascalCase": { + "unsafeName": "DeclaredTypeName", + "safeName": "DeclaredTypeName" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + ], + "packagePath": [], + "file": { + "originalName": "types", + "camelCase": { + "unsafeName": "types", + "safeName": "types" + }, + "snakeCase": { + "unsafeName": "types", + "safeName": "types" + }, + "screamingSnakeCase": { + "unsafeName": "TYPES", + "safeName": "TYPES" + }, + "pascalCase": { + "unsafeName": "Types", + "safeName": "Types" + } + } + }, + "typeId": "type_types:DeclaredTypeName" + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "properties", + "camelCase": { + "unsafeName": "properties", + "safeName": "properties" + }, + "snakeCase": { + "unsafeName": "properties", + "safeName": "properties" + }, + "screamingSnakeCase": { + "unsafeName": "PROPERTIES", + "safeName": "PROPERTIES" + }, + "pascalCase": { + "unsafeName": "Properties", + "safeName": "Properties" + } + }, + "wireValue": "properties" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { "_type": "named", "name": { - "originalName": "WebsocketMessage", + "originalName": "InlinedWebSocketMessageBodyProperty", "camelCase": { - "unsafeName": "websocketMessage", - "safeName": "websocketMessage" + "unsafeName": "inlinedWebSocketMessageBodyProperty", + "safeName": "inlinedWebSocketMessageBodyProperty" }, "snakeCase": { - "unsafeName": "websocket_message", - "safeName": "websocket_message" + "unsafeName": "inlined_web_socket_message_body_property", + "safeName": "inlined_web_socket_message_body_property" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE", - "safeName": "WEBSOCKET_MESSAGE" + "unsafeName": "INLINED_WEB_SOCKET_MESSAGE_BODY_PROPERTY", + "safeName": "INLINED_WEB_SOCKET_MESSAGE_BODY_PROPERTY" }, "pascalCase": { - "unsafeName": "WebsocketMessage", - "safeName": "WebsocketMessage" + "unsafeName": "InlinedWebSocketMessageBodyProperty", + "safeName": "InlinedWebSocketMessageBodyProperty" } }, "fernFilepath": { @@ -47367,69 +50362,53 @@ } } }, - "typeId": "type_websocket:WebsocketMessage" + "typeId": "type_websocket:InlinedWebSocketMessageBodyProperty" } } }, "availability": null, - "docs": "The messages that can be sent and received on this channel" + "docs": null } ] }, "referencedTypes": [ - "type_commons:Declaration", - "type_commons:WithDocs", - "type_commons:Availability", - "type_commons:AvailabilityStatus", - "type_http:HttpPath", - "type_http:HttpPathPart", - "type_http:HttpHeader", - "type_commons:NameAndWireValue", "type_commons:Name", "type_commons:SafeAndUnsafeString", + "type_types:DeclaredTypeName", + "type_commons:TypeId", + "type_commons:FernFilepath", + "type_websocket:InlinedWebSocketMessageBodyProperty", + "type_commons:WithDocs", + "type_commons:NameAndWireValue", "type_types:TypeReference", "type_types:ContainerType", "type_types:MapType", "type_types:Literal", - "type_types:DeclaredTypeName", - "type_commons:TypeId", - "type_commons:FernFilepath", - "type_types:PrimitiveType", - "type_http:QueryParameter", - "type_http:PathParameter", - "type_http:PathParameterLocation", - "type_variables:VariableId", - "type_websocket:WebsocketMessageId", - "type_websocket:WebsocketMessage", - "type_websocket:WebsocketMessageOrigin", - "type_websocket:WebsocketMessageBody", - "type_websocket:InlinedWebsocketMessageBody", - "type_websocket:InlinedWebsocketMessageBodyProperty", - "type_websocket:WebsocketMessageBodyReference" + "type_types:PrimitiveType" ], "examples": [], "availability": null, "docs": null }, - "type_websocket:WebsocketMessage": { + "type_websocket:InlinedWebSocketMessageBodyProperty": { "name": { "name": { - "originalName": "WebsocketMessage", + "originalName": "InlinedWebSocketMessageBodyProperty", "camelCase": { - "unsafeName": "websocketMessage", - "safeName": "websocketMessage" + "unsafeName": "inlinedWebSocketMessageBodyProperty", + "safeName": "inlinedWebSocketMessageBodyProperty" }, "snakeCase": { - "unsafeName": "websocket_message", - "safeName": "websocket_message" + "unsafeName": "inlined_web_socket_message_body_property", + "safeName": "inlined_web_socket_message_body_property" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE", - "safeName": "WEBSOCKET_MESSAGE" + "unsafeName": "INLINED_WEB_SOCKET_MESSAGE_BODY_PROPERTY", + "safeName": "INLINED_WEB_SOCKET_MESSAGE_BODY_PROPERTY" }, "pascalCase": { - "unsafeName": "WebsocketMessage", - "safeName": "WebsocketMessage" + "unsafeName": "InlinedWebSocketMessageBodyProperty", + "safeName": "InlinedWebSocketMessageBodyProperty" } }, "fernFilepath": { @@ -47475,29 +50454,29 @@ } } }, - "typeId": "type_websocket:WebsocketMessage" + "typeId": "type_websocket:InlinedWebSocketMessageBodyProperty" }, "shape": { "_type": "object", "extends": [ { "name": { - "originalName": "Declaration", + "originalName": "WithDocs", "camelCase": { - "unsafeName": "declaration", - "safeName": "declaration" + "unsafeName": "withDocs", + "safeName": "withDocs" }, "snakeCase": { - "unsafeName": "declaration", - "safeName": "declaration" + "unsafeName": "with_docs", + "safeName": "with_docs" }, "screamingSnakeCase": { - "unsafeName": "DECLARATION", - "safeName": "DECLARATION" + "unsafeName": "WITH_DOCS", + "safeName": "WITH_DOCS" }, "pascalCase": { - "unsafeName": "Declaration", - "safeName": "Declaration" + "unsafeName": "WithDocs", + "safeName": "WithDocs" } }, "fernFilepath": { @@ -47543,134 +50522,98 @@ } } }, - "typeId": "type_commons:Declaration" + "typeId": "type_commons:WithDocs" } ], "properties": [ { "name": { "name": { - "originalName": "displayName", - "camelCase": { - "unsafeName": "displayName", - "safeName": "displayName" - }, - "snakeCase": { - "unsafeName": "display_name", - "safeName": "display_name" - }, - "screamingSnakeCase": { - "unsafeName": "DISPLAY_NAME", - "safeName": "DISPLAY_NAME" - }, - "pascalCase": { - "unsafeName": "DisplayName", - "safeName": "DisplayName" - } - }, - "wireValue": "displayName" - }, - "valueType": { - "_type": "container", - "container": { - "_type": "optional", - "optional": { - "_type": "primitive", - "primitive": "STRING" - } - } - }, - "availability": null, - "docs": null - }, - { - "name": { - "name": { - "originalName": "origin", + "originalName": "name", "camelCase": { - "unsafeName": "origin", - "safeName": "origin" + "unsafeName": "name", + "safeName": "name" }, "snakeCase": { - "unsafeName": "origin", - "safeName": "origin" + "unsafeName": "name", + "safeName": "name" }, "screamingSnakeCase": { - "unsafeName": "ORIGIN", - "safeName": "ORIGIN" + "unsafeName": "NAME", + "safeName": "NAME" }, "pascalCase": { - "unsafeName": "Origin", - "safeName": "Origin" + "unsafeName": "Name", + "safeName": "Name" } }, - "wireValue": "origin" + "wireValue": "name" }, "valueType": { "_type": "named", "name": { - "originalName": "WebsocketMessageOrigin", + "originalName": "NameAndWireValue", "camelCase": { - "unsafeName": "websocketMessageOrigin", - "safeName": "websocketMessageOrigin" + "unsafeName": "nameAndWireValue", + "safeName": "nameAndWireValue" }, "snakeCase": { - "unsafeName": "websocket_message_origin", - "safeName": "websocket_message_origin" + "unsafeName": "name_and_wire_value", + "safeName": "name_and_wire_value" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE_ORIGIN", - "safeName": "WEBSOCKET_MESSAGE_ORIGIN" + "unsafeName": "NAME_AND_WIRE_VALUE", + "safeName": "NAME_AND_WIRE_VALUE" }, "pascalCase": { - "unsafeName": "WebsocketMessageOrigin", - "safeName": "WebsocketMessageOrigin" + "unsafeName": "NameAndWireValue", + "safeName": "NameAndWireValue" } }, "fernFilepath": { "allParts": [ { - "originalName": "websocket", + "originalName": "commons", "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "commons", + "safeName": "commons" }, "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "commons", + "safeName": "commons" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" + "unsafeName": "COMMONS", + "safeName": "COMMONS" }, "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" + "unsafeName": "Commons", + "safeName": "Commons" } } ], "packagePath": [], "file": { - "originalName": "websocket", + "originalName": "commons", "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "commons", + "safeName": "commons" }, "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "commons", + "safeName": "commons" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" + "unsafeName": "COMMONS", + "safeName": "COMMONS" }, "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" + "unsafeName": "Commons", + "safeName": "Commons" } } }, - "typeId": "type_websocket:WebsocketMessageOrigin" + "typeId": "type_commons:NameAndWireValue" }, "availability": null, "docs": null @@ -47678,91 +50621,91 @@ { "name": { "name": { - "originalName": "body", + "originalName": "valueType", "camelCase": { - "unsafeName": "body", - "safeName": "body" + "unsafeName": "valueType", + "safeName": "valueType" }, "snakeCase": { - "unsafeName": "body", - "safeName": "body" + "unsafeName": "value_type", + "safeName": "value_type" }, "screamingSnakeCase": { - "unsafeName": "BODY", - "safeName": "BODY" + "unsafeName": "VALUE_TYPE", + "safeName": "VALUE_TYPE" }, "pascalCase": { - "unsafeName": "Body", - "safeName": "Body" + "unsafeName": "ValueType", + "safeName": "ValueType" } }, - "wireValue": "body" + "wireValue": "valueType" }, "valueType": { "_type": "named", "name": { - "originalName": "WebsocketMessageBody", + "originalName": "TypeReference", "camelCase": { - "unsafeName": "websocketMessageBody", - "safeName": "websocketMessageBody" + "unsafeName": "typeReference", + "safeName": "typeReference" }, "snakeCase": { - "unsafeName": "websocket_message_body", - "safeName": "websocket_message_body" + "unsafeName": "type_reference", + "safeName": "type_reference" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE_BODY", - "safeName": "WEBSOCKET_MESSAGE_BODY" + "unsafeName": "TYPE_REFERENCE", + "safeName": "TYPE_REFERENCE" }, "pascalCase": { - "unsafeName": "WebsocketMessageBody", - "safeName": "WebsocketMessageBody" + "unsafeName": "TypeReference", + "safeName": "TypeReference" } }, "fernFilepath": { "allParts": [ { - "originalName": "websocket", + "originalName": "types", "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "types", + "safeName": "types" }, "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "types", + "safeName": "types" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" + "unsafeName": "TYPES", + "safeName": "TYPES" }, "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" + "unsafeName": "Types", + "safeName": "Types" } } ], "packagePath": [], "file": { - "originalName": "websocket", + "originalName": "types", "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "types", + "safeName": "types" }, "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "types", + "safeName": "types" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" + "unsafeName": "TYPES", + "safeName": "TYPES" }, "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" + "unsafeName": "Types", + "safeName": "Types" } } }, - "typeId": "type_websocket:WebsocketMessageBody" + "typeId": "type_types:TypeReference" }, "availability": null, "docs": null @@ -47770,50 +50713,42 @@ ] }, "referencedTypes": [ - "type_commons:Declaration", "type_commons:WithDocs", - "type_commons:Availability", - "type_commons:AvailabilityStatus", - "type_websocket:WebsocketMessageOrigin", - "type_websocket:WebsocketMessageBody", - "type_websocket:InlinedWebsocketMessageBody", + "type_commons:NameAndWireValue", "type_commons:Name", "type_commons:SafeAndUnsafeString", - "type_types:DeclaredTypeName", - "type_commons:TypeId", - "type_commons:FernFilepath", - "type_websocket:InlinedWebsocketMessageBodyProperty", - "type_commons:NameAndWireValue", "type_types:TypeReference", "type_types:ContainerType", "type_types:MapType", "type_types:Literal", - "type_types:PrimitiveType", - "type_websocket:WebsocketMessageBodyReference" + "type_types:DeclaredTypeName", + "type_commons:TypeId", + "type_commons:FernFilepath", + "type_types:PrimitiveType" ], "examples": [], "availability": null, "docs": null }, - "type_websocket:WebsocketMessageOrigin": { + "type_websocket:WebSocketMessageBodyReference": { "name": { "name": { - "originalName": "WebsocketMessageOrigin", + "originalName": "WebSocketMessageBodyReference", "camelCase": { - "unsafeName": "websocketMessageOrigin", - "safeName": "websocketMessageOrigin" + "unsafeName": "webSocketMessageBodyReference", + "safeName": "webSocketMessageBodyReference" }, "snakeCase": { - "unsafeName": "websocket_message_origin", - "safeName": "websocket_message_origin" + "unsafeName": "web_socket_message_body_reference", + "safeName": "web_socket_message_body_reference" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE_ORIGIN", - "safeName": "WEBSOCKET_MESSAGE_ORIGIN" + "unsafeName": "WEB_SOCKET_MESSAGE_BODY_REFERENCE", + "safeName": "WEB_SOCKET_MESSAGE_BODY_REFERENCE" }, "pascalCase": { - "unsafeName": "WebsocketMessageOrigin", - "safeName": "WebsocketMessageOrigin" + "unsafeName": "WebSocketMessageBodyReference", + "safeName": "WebSocketMessageBodyReference" } }, "fernFilepath": { @@ -47859,387 +50794,208 @@ } } }, - "typeId": "type_websocket:WebsocketMessageOrigin" + "typeId": "type_websocket:WebSocketMessageBodyReference" }, "shape": { - "_type": "enum", - "values": [ - { - "name": { - "name": { - "originalName": "client", - "camelCase": { - "unsafeName": "client", - "safeName": "client" - }, - "snakeCase": { - "unsafeName": "client", - "safeName": "client" - }, - "screamingSnakeCase": { - "unsafeName": "CLIENT", - "safeName": "CLIENT" - }, - "pascalCase": { - "unsafeName": "Client", - "safeName": "Client" - } - }, - "wireValue": "client" - }, - "availability": null, - "docs": null - }, + "_type": "object", + "extends": [ { "name": { - "name": { - "originalName": "server", - "camelCase": { - "unsafeName": "server", - "safeName": "server" - }, - "snakeCase": { - "unsafeName": "server", - "safeName": "server" - }, - "screamingSnakeCase": { - "unsafeName": "SERVER", - "safeName": "SERVER" - }, - "pascalCase": { - "unsafeName": "Server", - "safeName": "Server" - } - }, - "wireValue": "server" - }, - "availability": null, - "docs": null - } - ] - }, - "referencedTypes": [], - "examples": [], - "availability": null, - "docs": null - }, - "type_websocket:WebsocketMessageBody": { - "name": { - "name": { - "originalName": "WebsocketMessageBody", - "camelCase": { - "unsafeName": "websocketMessageBody", - "safeName": "websocketMessageBody" - }, - "snakeCase": { - "unsafeName": "websocket_message_body", - "safeName": "websocket_message_body" - }, - "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE_BODY", - "safeName": "WEBSOCKET_MESSAGE_BODY" - }, - "pascalCase": { - "unsafeName": "WebsocketMessageBody", - "safeName": "WebsocketMessageBody" - } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "websocket", + "originalName": "WithDocs", "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "withDocs", + "safeName": "withDocs" }, "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "with_docs", + "safeName": "with_docs" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" + "unsafeName": "WITH_DOCS", + "safeName": "WITH_DOCS" }, "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" + "unsafeName": "WithDocs", + "safeName": "WithDocs" } - } - ], - "packagePath": [], - "file": { - "originalName": "websocket", - "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" - }, - "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" - }, - "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" - }, - "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" - } - } - }, - "typeId": "type_websocket:WebsocketMessageBody" - }, - "shape": { - "_type": "union", - "discriminant": { - "name": { - "originalName": "type", - "camelCase": { - "unsafeName": "type", - "safeName": "type" - }, - "snakeCase": { - "unsafeName": "type", - "safeName": "type" - }, - "screamingSnakeCase": { - "unsafeName": "TYPE", - "safeName": "TYPE" - }, - "pascalCase": { - "unsafeName": "Type", - "safeName": "Type" - } - }, - "wireValue": "type" - }, - "extends": [], - "baseProperties": [], - "types": [ - { - "discriminantValue": { - "name": { - "originalName": "inlinedBody", - "camelCase": { - "unsafeName": "inlinedBody", - "safeName": "inlinedBody" - }, - "snakeCase": { - "unsafeName": "inlined_body", - "safeName": "inlined_body" - }, - "screamingSnakeCase": { - "unsafeName": "INLINED_BODY", - "safeName": "INLINED_BODY" - }, - "pascalCase": { - "unsafeName": "InlinedBody", - "safeName": "InlinedBody" - } - }, - "wireValue": "inlinedBody" }, - "shape": { - "_type": "samePropertiesAsObject", - "name": { - "originalName": "InlinedWebsocketMessageBody", - "camelCase": { - "unsafeName": "inlinedWebsocketMessageBody", - "safeName": "inlinedWebsocketMessageBody" - }, - "snakeCase": { - "unsafeName": "inlined_websocket_message_body", - "safeName": "inlined_websocket_message_body" - }, - "screamingSnakeCase": { - "unsafeName": "INLINED_WEBSOCKET_MESSAGE_BODY", - "safeName": "INLINED_WEBSOCKET_MESSAGE_BODY" - }, - "pascalCase": { - "unsafeName": "InlinedWebsocketMessageBody", - "safeName": "InlinedWebsocketMessageBody" - } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "websocket", - "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" - }, - "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" - }, - "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" - }, - "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" - } - } - ], - "packagePath": [], - "file": { - "originalName": "websocket", + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "commons", + "safeName": "commons" }, "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "commons", + "safeName": "commons" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" + "unsafeName": "COMMONS", + "safeName": "COMMONS" }, "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" + "unsafeName": "Commons", + "safeName": "Commons" } } - }, - "typeId": "type_websocket:InlinedWebsocketMessageBody" + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } }, - "docs": null - }, + "typeId": "type_commons:WithDocs" + } + ], + "properties": [ { - "discriminantValue": { + "name": { "name": { - "originalName": "reference", + "originalName": "bodyType", "camelCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "bodyType", + "safeName": "bodyType" }, "snakeCase": { - "unsafeName": "reference", - "safeName": "reference" + "unsafeName": "body_type", + "safeName": "body_type" }, "screamingSnakeCase": { - "unsafeName": "REFERENCE", - "safeName": "REFERENCE" + "unsafeName": "BODY_TYPE", + "safeName": "BODY_TYPE" }, "pascalCase": { - "unsafeName": "Reference", - "safeName": "Reference" + "unsafeName": "BodyType", + "safeName": "BodyType" } }, - "wireValue": "reference" + "wireValue": "bodyType" }, - "shape": { - "_type": "samePropertiesAsObject", + "valueType": { + "_type": "named", "name": { - "originalName": "WebsocketMessageBodyReference", + "originalName": "TypeReference", "camelCase": { - "unsafeName": "websocketMessageBodyReference", - "safeName": "websocketMessageBodyReference" + "unsafeName": "typeReference", + "safeName": "typeReference" }, "snakeCase": { - "unsafeName": "websocket_message_body_reference", - "safeName": "websocket_message_body_reference" + "unsafeName": "type_reference", + "safeName": "type_reference" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE_BODY_REFERENCE", - "safeName": "WEBSOCKET_MESSAGE_BODY_REFERENCE" + "unsafeName": "TYPE_REFERENCE", + "safeName": "TYPE_REFERENCE" }, "pascalCase": { - "unsafeName": "WebsocketMessageBodyReference", - "safeName": "WebsocketMessageBodyReference" + "unsafeName": "TypeReference", + "safeName": "TypeReference" } }, "fernFilepath": { "allParts": [ { - "originalName": "websocket", + "originalName": "types", "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "types", + "safeName": "types" }, "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "types", + "safeName": "types" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" + "unsafeName": "TYPES", + "safeName": "TYPES" }, "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" + "unsafeName": "Types", + "safeName": "Types" } } ], "packagePath": [], "file": { - "originalName": "websocket", + "originalName": "types", "camelCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "types", + "safeName": "types" }, "snakeCase": { - "unsafeName": "websocket", - "safeName": "websocket" + "unsafeName": "types", + "safeName": "types" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET", - "safeName": "WEBSOCKET" + "unsafeName": "TYPES", + "safeName": "TYPES" }, "pascalCase": { - "unsafeName": "Websocket", - "safeName": "Websocket" + "unsafeName": "Types", + "safeName": "Types" } } }, - "typeId": "type_websocket:WebsocketMessageBodyReference" + "typeId": "type_types:TypeReference" }, + "availability": null, "docs": null } ] }, "referencedTypes": [ - "type_websocket:InlinedWebsocketMessageBody", - "type_commons:Name", - "type_commons:SafeAndUnsafeString", - "type_types:DeclaredTypeName", - "type_commons:TypeId", - "type_commons:FernFilepath", - "type_websocket:InlinedWebsocketMessageBodyProperty", "type_commons:WithDocs", - "type_commons:NameAndWireValue", "type_types:TypeReference", "type_types:ContainerType", "type_types:MapType", "type_types:Literal", - "type_types:PrimitiveType", - "type_websocket:WebsocketMessageBodyReference" + "type_types:DeclaredTypeName", + "type_commons:TypeId", + "type_commons:FernFilepath", + "type_commons:Name", + "type_commons:SafeAndUnsafeString", + "type_types:PrimitiveType" ], "examples": [], "availability": null, "docs": null }, - "type_websocket:InlinedWebsocketMessageBody": { + "type_websocket:ExampleWebSocketSession": { "name": { "name": { - "originalName": "InlinedWebsocketMessageBody", + "originalName": "ExampleWebSocketSession", "camelCase": { - "unsafeName": "inlinedWebsocketMessageBody", - "safeName": "inlinedWebsocketMessageBody" + "unsafeName": "exampleWebSocketSession", + "safeName": "exampleWebSocketSession" }, "snakeCase": { - "unsafeName": "inlined_websocket_message_body", - "safeName": "inlined_websocket_message_body" + "unsafeName": "example_web_socket_session", + "safeName": "example_web_socket_session" }, "screamingSnakeCase": { - "unsafeName": "INLINED_WEBSOCKET_MESSAGE_BODY", - "safeName": "INLINED_WEBSOCKET_MESSAGE_BODY" + "unsafeName": "EXAMPLE_WEB_SOCKET_SESSION", + "safeName": "EXAMPLE_WEB_SOCKET_SESSION" }, "pascalCase": { - "unsafeName": "InlinedWebsocketMessageBody", - "safeName": "InlinedWebsocketMessageBody" + "unsafeName": "ExampleWebSocketSession", + "safeName": "ExampleWebSocketSession" } }, "fernFilepath": { @@ -48285,11 +51041,77 @@ } } }, - "typeId": "type_websocket:InlinedWebsocketMessageBody" + "typeId": "type_websocket:ExampleWebSocketSession" }, "shape": { "_type": "object", - "extends": [], + "extends": [ + { + "name": { + "originalName": "WithDocs", + "camelCase": { + "unsafeName": "withDocs", + "safeName": "withDocs" + }, + "snakeCase": { + "unsafeName": "with_docs", + "safeName": "with_docs" + }, + "screamingSnakeCase": { + "unsafeName": "WITH_DOCS", + "safeName": "WITH_DOCS" + }, + "pascalCase": { + "unsafeName": "WithDocs", + "safeName": "WithDocs" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + }, + "typeId": "type_commons:WithDocs" + } + ], "properties": [ { "name": { @@ -48315,70 +51137,302 @@ "wireValue": "name" }, "valueType": { - "_type": "named", + "_type": "container", + "container": { + "_type": "optional", + "optional": { + "_type": "named", + "name": { + "originalName": "Name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + ], + "packagePath": [], + "file": { + "originalName": "commons", + "camelCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "snakeCase": { + "unsafeName": "commons", + "safeName": "commons" + }, + "screamingSnakeCase": { + "unsafeName": "COMMONS", + "safeName": "COMMONS" + }, + "pascalCase": { + "unsafeName": "Commons", + "safeName": "Commons" + } + } + }, + "typeId": "type_commons:Name" + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { "name": { - "originalName": "Name", + "originalName": "url", "camelCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "url", + "safeName": "url" }, "snakeCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "url", + "safeName": "url" }, "screamingSnakeCase": { - "unsafeName": "NAME", - "safeName": "NAME" + "unsafeName": "URL", + "safeName": "URL" }, "pascalCase": { - "unsafeName": "Name", - "safeName": "Name" + "unsafeName": "Url", + "safeName": "Url" } }, - "fernFilepath": { - "allParts": [ - { - "originalName": "commons", + "wireValue": "url" + }, + "valueType": { + "_type": "primitive", + "primitive": "STRING" + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "pathParameters", + "camelCase": { + "unsafeName": "pathParameters", + "safeName": "pathParameters" + }, + "snakeCase": { + "unsafeName": "path_parameters", + "safeName": "path_parameters" + }, + "screamingSnakeCase": { + "unsafeName": "PATH_PARAMETERS", + "safeName": "PATH_PARAMETERS" + }, + "pascalCase": { + "unsafeName": "PathParameters", + "safeName": "PathParameters" + } + }, + "wireValue": "pathParameters" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ExamplePathParameter", "camelCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "examplePathParameter", + "safeName": "examplePathParameter" }, "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "example_path_parameter", + "safeName": "example_path_parameter" }, "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" + "unsafeName": "EXAMPLE_PATH_PARAMETER", + "safeName": "EXAMPLE_PATH_PARAMETER" }, "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" + "unsafeName": "ExamplePathParameter", + "safeName": "ExamplePathParameter" } - } - ], - "packagePath": [], - "file": { - "originalName": "commons", - "camelCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" }, - "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } }, - "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" - } + "typeId": "type_http:ExamplePathParameter" + } + } + }, + "availability": null, + "docs": null + }, + { + "name": { + "name": { + "originalName": "headers", + "camelCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "snakeCase": { + "unsafeName": "headers", + "safeName": "headers" + }, + "screamingSnakeCase": { + "unsafeName": "HEADERS", + "safeName": "HEADERS" + }, + "pascalCase": { + "unsafeName": "Headers", + "safeName": "Headers" } }, - "typeId": "type_commons:Name" + "wireValue": "headers" + }, + "valueType": { + "_type": "container", + "container": { + "_type": "list", + "list": { + "_type": "named", + "name": { + "originalName": "ExampleHeader", + "camelCase": { + "unsafeName": "exampleHeader", + "safeName": "exampleHeader" + }, + "snakeCase": { + "unsafeName": "example_header", + "safeName": "example_header" + }, + "screamingSnakeCase": { + "unsafeName": "EXAMPLE_HEADER", + "safeName": "EXAMPLE_HEADER" + }, + "pascalCase": { + "unsafeName": "ExampleHeader", + "safeName": "ExampleHeader" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + }, + "typeId": "type_http:ExampleHeader" + } + } }, "availability": null, "docs": null @@ -48386,25 +51440,25 @@ { "name": { "name": { - "originalName": "extends", + "originalName": "queryParameters", "camelCase": { - "unsafeName": "extends", - "safeName": "extends" + "unsafeName": "queryParameters", + "safeName": "queryParameters" }, "snakeCase": { - "unsafeName": "extends", - "safeName": "extends" + "unsafeName": "query_parameters", + "safeName": "query_parameters" }, "screamingSnakeCase": { - "unsafeName": "EXTENDS", - "safeName": "EXTENDS" + "unsafeName": "QUERY_PARAMETERS", + "safeName": "QUERY_PARAMETERS" }, "pascalCase": { - "unsafeName": "Extends", - "safeName": "Extends" + "unsafeName": "QueryParameters", + "safeName": "QueryParameters" } }, - "wireValue": "extends" + "wireValue": "queryParameters" }, "valueType": { "_type": "container", @@ -48413,68 +51467,68 @@ "list": { "_type": "named", "name": { - "originalName": "DeclaredTypeName", + "originalName": "ExampleQueryParameter", "camelCase": { - "unsafeName": "declaredTypeName", - "safeName": "declaredTypeName" + "unsafeName": "exampleQueryParameter", + "safeName": "exampleQueryParameter" }, "snakeCase": { - "unsafeName": "declared_type_name", - "safeName": "declared_type_name" + "unsafeName": "example_query_parameter", + "safeName": "example_query_parameter" }, "screamingSnakeCase": { - "unsafeName": "DECLARED_TYPE_NAME", - "safeName": "DECLARED_TYPE_NAME" + "unsafeName": "EXAMPLE_QUERY_PARAMETER", + "safeName": "EXAMPLE_QUERY_PARAMETER" }, "pascalCase": { - "unsafeName": "DeclaredTypeName", - "safeName": "DeclaredTypeName" + "unsafeName": "ExampleQueryParameter", + "safeName": "ExampleQueryParameter" } }, "fernFilepath": { "allParts": [ { - "originalName": "types", + "originalName": "http", "camelCase": { - "unsafeName": "types", - "safeName": "types" + "unsafeName": "http", + "safeName": "http" }, "snakeCase": { - "unsafeName": "types", - "safeName": "types" + "unsafeName": "http", + "safeName": "http" }, "screamingSnakeCase": { - "unsafeName": "TYPES", - "safeName": "TYPES" + "unsafeName": "HTTP", + "safeName": "HTTP" }, "pascalCase": { - "unsafeName": "Types", - "safeName": "Types" + "unsafeName": "Http", + "safeName": "Http" } } ], "packagePath": [], "file": { - "originalName": "types", + "originalName": "http", "camelCase": { - "unsafeName": "types", - "safeName": "types" + "unsafeName": "http", + "safeName": "http" }, "snakeCase": { - "unsafeName": "types", - "safeName": "types" + "unsafeName": "http", + "safeName": "http" }, "screamingSnakeCase": { - "unsafeName": "TYPES", - "safeName": "TYPES" + "unsafeName": "HTTP", + "safeName": "HTTP" }, "pascalCase": { - "unsafeName": "Types", - "safeName": "Types" + "unsafeName": "Http", + "safeName": "Http" } } }, - "typeId": "type_types:DeclaredTypeName" + "typeId": "type_http:ExampleQueryParameter" } } }, @@ -48484,25 +51538,25 @@ { "name": { "name": { - "originalName": "properties", + "originalName": "messages", "camelCase": { - "unsafeName": "properties", - "safeName": "properties" + "unsafeName": "messages", + "safeName": "messages" }, "snakeCase": { - "unsafeName": "properties", - "safeName": "properties" + "unsafeName": "messages", + "safeName": "messages" }, "screamingSnakeCase": { - "unsafeName": "PROPERTIES", - "safeName": "PROPERTIES" + "unsafeName": "MESSAGES", + "safeName": "MESSAGES" }, "pascalCase": { - "unsafeName": "Properties", - "safeName": "Properties" + "unsafeName": "Messages", + "safeName": "Messages" } }, - "wireValue": "properties" + "wireValue": "messages" }, "valueType": { "_type": "container", @@ -48511,22 +51565,22 @@ "list": { "_type": "named", "name": { - "originalName": "InlinedWebsocketMessageBodyProperty", + "originalName": "ExampleWebSocketMessage", "camelCase": { - "unsafeName": "inlinedWebsocketMessageBodyProperty", - "safeName": "inlinedWebsocketMessageBodyProperty" + "unsafeName": "exampleWebSocketMessage", + "safeName": "exampleWebSocketMessage" }, "snakeCase": { - "unsafeName": "inlined_websocket_message_body_property", - "safeName": "inlined_websocket_message_body_property" + "unsafeName": "example_web_socket_message", + "safeName": "example_web_socket_message" }, "screamingSnakeCase": { - "unsafeName": "INLINED_WEBSOCKET_MESSAGE_BODY_PROPERTY", - "safeName": "INLINED_WEBSOCKET_MESSAGE_BODY_PROPERTY" + "unsafeName": "EXAMPLE_WEB_SOCKET_MESSAGE", + "safeName": "EXAMPLE_WEB_SOCKET_MESSAGE" }, "pascalCase": { - "unsafeName": "InlinedWebsocketMessageBodyProperty", - "safeName": "InlinedWebsocketMessageBodyProperty" + "unsafeName": "ExampleWebSocketMessage", + "safeName": "ExampleWebSocketMessage" } }, "fernFilepath": { @@ -48572,7 +51626,7 @@ } } }, - "typeId": "type_websocket:InlinedWebsocketMessageBodyProperty" + "typeId": "type_websocket:ExampleWebSocketMessage" } } }, @@ -48582,43 +51636,63 @@ ] }, "referencedTypes": [ + "type_commons:WithDocs", "type_commons:Name", "type_commons:SafeAndUnsafeString", + "type_http:ExamplePathParameter", + "type_types:ExampleTypeReference", + "type_commons:WithJsonExample", + "type_types:ExampleTypeReferenceShape", + "type_types:ExamplePrimitive", + "type_commons:EscapedString", + "type_types:ExampleContainer", + "type_types:ExampleKeyValuePair", + "type_types:ExampleNamedType", "type_types:DeclaredTypeName", "type_commons:TypeId", "type_commons:FernFilepath", - "type_websocket:InlinedWebsocketMessageBodyProperty", - "type_commons:WithDocs", + "type_types:ExampleTypeShape", + "type_types:ExampleAliasType", + "type_types:ExampleEnumType", "type_commons:NameAndWireValue", - "type_types:TypeReference", - "type_types:ContainerType", - "type_types:MapType", - "type_types:Literal", - "type_types:PrimitiveType" + "type_types:ExampleObjectType", + "type_types:ExampleObjectProperty", + "type_types:ExampleUnionType", + "type_types:ExampleSingleUnionType", + "type_types:ExampleSingleUnionTypeProperties", + "type_types:ExampleObjectTypeWithTypeId", + "type_types:ExampleUndiscriminatedUnionType", + "type_http:ExampleHeader", + "type_http:ExampleQueryParameter", + "type_websocket:ExampleWebSocketMessage", + "type_websocket:WebSocketMessageId", + "type_websocket:ExampleWebSocketMessageBody", + "type_http:ExampleInlinedRequestBody", + "type_http:ExampleInlinedRequestBodyProperty" ], "examples": [], "availability": null, "docs": null }, - "type_websocket:InlinedWebsocketMessageBodyProperty": { + "type_websocket:ExampleWebSocketMessage": { "name": { "name": { - "originalName": "InlinedWebsocketMessageBodyProperty", + "originalName": "ExampleWebSocketMessage", "camelCase": { - "unsafeName": "inlinedWebsocketMessageBodyProperty", - "safeName": "inlinedWebsocketMessageBodyProperty" + "unsafeName": "exampleWebSocketMessage", + "safeName": "exampleWebSocketMessage" }, "snakeCase": { - "unsafeName": "inlined_websocket_message_body_property", - "safeName": "inlined_websocket_message_body_property" + "unsafeName": "example_web_socket_message", + "safeName": "example_web_socket_message" }, "screamingSnakeCase": { - "unsafeName": "INLINED_WEBSOCKET_MESSAGE_BODY_PROPERTY", - "safeName": "INLINED_WEBSOCKET_MESSAGE_BODY_PROPERTY" + "unsafeName": "EXAMPLE_WEB_SOCKET_MESSAGE", + "safeName": "EXAMPLE_WEB_SOCKET_MESSAGE" }, "pascalCase": { - "unsafeName": "InlinedWebsocketMessageBodyProperty", - "safeName": "InlinedWebsocketMessageBodyProperty" + "unsafeName": "ExampleWebSocketMessage", + "safeName": "ExampleWebSocketMessage" } }, "fernFilepath": { @@ -48664,166 +51738,100 @@ } } }, - "typeId": "type_websocket:InlinedWebsocketMessageBodyProperty" + "typeId": "type_websocket:ExampleWebSocketMessage" }, "shape": { "_type": "object", - "extends": [ - { - "name": { - "originalName": "WithDocs", - "camelCase": { - "unsafeName": "withDocs", - "safeName": "withDocs" - }, - "snakeCase": { - "unsafeName": "with_docs", - "safeName": "with_docs" - }, - "screamingSnakeCase": { - "unsafeName": "WITH_DOCS", - "safeName": "WITH_DOCS" - }, - "pascalCase": { - "unsafeName": "WithDocs", - "safeName": "WithDocs" - } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "commons", - "camelCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" - }, - "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" - } - } - ], - "packagePath": [], - "file": { - "originalName": "commons", - "camelCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" - }, - "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" - } - } - }, - "typeId": "type_commons:WithDocs" - } - ], + "extends": [], "properties": [ { "name": { "name": { - "originalName": "name", + "originalName": "type", "camelCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "type", + "safeName": "type" }, "snakeCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "type", + "safeName": "type" }, "screamingSnakeCase": { - "unsafeName": "NAME", - "safeName": "NAME" + "unsafeName": "TYPE", + "safeName": "TYPE" }, "pascalCase": { - "unsafeName": "Name", - "safeName": "Name" + "unsafeName": "Type", + "safeName": "Type" } }, - "wireValue": "name" + "wireValue": "type" }, "valueType": { "_type": "named", "name": { - "originalName": "NameAndWireValue", + "originalName": "WebSocketMessageId", "camelCase": { - "unsafeName": "nameAndWireValue", - "safeName": "nameAndWireValue" + "unsafeName": "webSocketMessageId", + "safeName": "webSocketMessageId" }, "snakeCase": { - "unsafeName": "name_and_wire_value", - "safeName": "name_and_wire_value" + "unsafeName": "web_socket_message_id", + "safeName": "web_socket_message_id" }, "screamingSnakeCase": { - "unsafeName": "NAME_AND_WIRE_VALUE", - "safeName": "NAME_AND_WIRE_VALUE" + "unsafeName": "WEB_SOCKET_MESSAGE_ID", + "safeName": "WEB_SOCKET_MESSAGE_ID" }, "pascalCase": { - "unsafeName": "NameAndWireValue", - "safeName": "NameAndWireValue" + "unsafeName": "WebSocketMessageId", + "safeName": "WebSocketMessageId" } }, "fernFilepath": { "allParts": [ { - "originalName": "commons", + "originalName": "websocket", "camelCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "websocket", + "safeName": "websocket" }, "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "websocket", + "safeName": "websocket" }, "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" }, "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" + "unsafeName": "Websocket", + "safeName": "Websocket" } } ], "packagePath": [], "file": { - "originalName": "commons", + "originalName": "websocket", "camelCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "websocket", + "safeName": "websocket" }, "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "websocket", + "safeName": "websocket" }, "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" }, "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" + "unsafeName": "Websocket", + "safeName": "Websocket" } } }, - "typeId": "type_commons:NameAndWireValue" + "typeId": "type_websocket:WebSocketMessageId" }, "availability": null, "docs": null @@ -48831,91 +51839,91 @@ { "name": { "name": { - "originalName": "valueType", + "originalName": "body", "camelCase": { - "unsafeName": "valueType", - "safeName": "valueType" + "unsafeName": "body", + "safeName": "body" }, "snakeCase": { - "unsafeName": "value_type", - "safeName": "value_type" + "unsafeName": "body", + "safeName": "body" }, "screamingSnakeCase": { - "unsafeName": "VALUE_TYPE", - "safeName": "VALUE_TYPE" + "unsafeName": "BODY", + "safeName": "BODY" }, "pascalCase": { - "unsafeName": "ValueType", - "safeName": "ValueType" + "unsafeName": "Body", + "safeName": "Body" } }, - "wireValue": "valueType" + "wireValue": "body" }, "valueType": { "_type": "named", "name": { - "originalName": "TypeReference", + "originalName": "ExampleWebSocketMessageBody", "camelCase": { - "unsafeName": "typeReference", - "safeName": "typeReference" + "unsafeName": "exampleWebSocketMessageBody", + "safeName": "exampleWebSocketMessageBody" }, "snakeCase": { - "unsafeName": "type_reference", - "safeName": "type_reference" + "unsafeName": "example_web_socket_message_body", + "safeName": "example_web_socket_message_body" }, "screamingSnakeCase": { - "unsafeName": "TYPE_REFERENCE", - "safeName": "TYPE_REFERENCE" + "unsafeName": "EXAMPLE_WEB_SOCKET_MESSAGE_BODY", + "safeName": "EXAMPLE_WEB_SOCKET_MESSAGE_BODY" }, "pascalCase": { - "unsafeName": "TypeReference", - "safeName": "TypeReference" + "unsafeName": "ExampleWebSocketMessageBody", + "safeName": "ExampleWebSocketMessageBody" } }, "fernFilepath": { "allParts": [ { - "originalName": "types", + "originalName": "websocket", "camelCase": { - "unsafeName": "types", - "safeName": "types" + "unsafeName": "websocket", + "safeName": "websocket" }, "snakeCase": { - "unsafeName": "types", - "safeName": "types" + "unsafeName": "websocket", + "safeName": "websocket" }, "screamingSnakeCase": { - "unsafeName": "TYPES", - "safeName": "TYPES" + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" }, "pascalCase": { - "unsafeName": "Types", - "safeName": "Types" + "unsafeName": "Websocket", + "safeName": "Websocket" } } ], "packagePath": [], "file": { - "originalName": "types", + "originalName": "websocket", "camelCase": { - "unsafeName": "types", - "safeName": "types" + "unsafeName": "websocket", + "safeName": "websocket" }, "snakeCase": { - "unsafeName": "types", - "safeName": "types" + "unsafeName": "websocket", + "safeName": "websocket" }, "screamingSnakeCase": { - "unsafeName": "TYPES", - "safeName": "TYPES" + "unsafeName": "WEBSOCKET", + "safeName": "WEBSOCKET" }, "pascalCase": { - "unsafeName": "Types", - "safeName": "Types" + "unsafeName": "Websocket", + "safeName": "Websocket" } } }, - "typeId": "type_types:TypeReference" + "typeId": "type_websocket:ExampleWebSocketMessageBody" }, "availability": null, "docs": null @@ -48923,42 +51931,58 @@ ] }, "referencedTypes": [ - "type_commons:WithDocs", + "type_websocket:WebSocketMessageId", + "type_websocket:ExampleWebSocketMessageBody", + "type_http:ExampleInlinedRequestBody", + "type_commons:WithJsonExample", + "type_http:ExampleInlinedRequestBodyProperty", "type_commons:NameAndWireValue", "type_commons:Name", "type_commons:SafeAndUnsafeString", - "type_types:TypeReference", - "type_types:ContainerType", - "type_types:MapType", - "type_types:Literal", + "type_types:ExampleTypeReference", + "type_types:ExampleTypeReferenceShape", + "type_types:ExamplePrimitive", + "type_commons:EscapedString", + "type_types:ExampleContainer", + "type_types:ExampleKeyValuePair", + "type_types:ExampleNamedType", "type_types:DeclaredTypeName", "type_commons:TypeId", "type_commons:FernFilepath", - "type_types:PrimitiveType" + "type_types:ExampleTypeShape", + "type_types:ExampleAliasType", + "type_types:ExampleEnumType", + "type_types:ExampleObjectType", + "type_types:ExampleObjectProperty", + "type_types:ExampleUnionType", + "type_types:ExampleSingleUnionType", + "type_types:ExampleSingleUnionTypeProperties", + "type_types:ExampleObjectTypeWithTypeId", + "type_types:ExampleUndiscriminatedUnionType" ], "examples": [], "availability": null, "docs": null }, - "type_websocket:WebsocketMessageBodyReference": { + "type_websocket:ExampleWebSocketMessageBody": { "name": { "name": { - "originalName": "WebsocketMessageBodyReference", + "originalName": "ExampleWebSocketMessageBody", "camelCase": { - "unsafeName": "websocketMessageBodyReference", - "safeName": "websocketMessageBodyReference" + "unsafeName": "exampleWebSocketMessageBody", + "safeName": "exampleWebSocketMessageBody" }, "snakeCase": { - "unsafeName": "websocket_message_body_reference", - "safeName": "websocket_message_body_reference" + "unsafeName": "example_web_socket_message_body", + "safeName": "example_web_socket_message_body" }, "screamingSnakeCase": { - "unsafeName": "WEBSOCKET_MESSAGE_BODY_REFERENCE", - "safeName": "WEBSOCKET_MESSAGE_BODY_REFERENCE" + "unsafeName": "EXAMPLE_WEB_SOCKET_MESSAGE_BODY", + "safeName": "EXAMPLE_WEB_SOCKET_MESSAGE_BODY" }, "pascalCase": { - "unsafeName": "WebsocketMessageBodyReference", - "safeName": "WebsocketMessageBodyReference" + "unsafeName": "ExampleWebSocketMessageBody", + "safeName": "ExampleWebSocketMessageBody" } }, "fernFilepath": { @@ -49004,120 +52028,168 @@ } } }, - "typeId": "type_websocket:WebsocketMessageBodyReference" + "typeId": "type_websocket:ExampleWebSocketMessageBody" }, "shape": { - "_type": "object", - "extends": [ + "_type": "union", + "discriminant": { + "name": { + "originalName": "type", + "camelCase": { + "unsafeName": "type", + "safeName": "type" + }, + "snakeCase": { + "unsafeName": "type", + "safeName": "type" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE", + "safeName": "TYPE" + }, + "pascalCase": { + "unsafeName": "Type", + "safeName": "Type" + } + }, + "wireValue": "type" + }, + "extends": [], + "baseProperties": [], + "types": [ { - "name": { - "originalName": "WithDocs", - "camelCase": { - "unsafeName": "withDocs", - "safeName": "withDocs" - }, - "snakeCase": { - "unsafeName": "with_docs", - "safeName": "with_docs" - }, - "screamingSnakeCase": { - "unsafeName": "WITH_DOCS", - "safeName": "WITH_DOCS" + "discriminantValue": { + "name": { + "originalName": "inlinedBody", + "camelCase": { + "unsafeName": "inlinedBody", + "safeName": "inlinedBody" + }, + "snakeCase": { + "unsafeName": "inlined_body", + "safeName": "inlined_body" + }, + "screamingSnakeCase": { + "unsafeName": "INLINED_BODY", + "safeName": "INLINED_BODY" + }, + "pascalCase": { + "unsafeName": "InlinedBody", + "safeName": "InlinedBody" + } }, - "pascalCase": { - "unsafeName": "WithDocs", - "safeName": "WithDocs" - } + "wireValue": "inlinedBody" }, - "fernFilepath": { - "allParts": [ - { - "originalName": "commons", + "shape": { + "_type": "samePropertiesAsObject", + "name": { + "originalName": "ExampleInlinedRequestBody", + "camelCase": { + "unsafeName": "exampleInlinedRequestBody", + "safeName": "exampleInlinedRequestBody" + }, + "snakeCase": { + "unsafeName": "example_inlined_request_body", + "safeName": "example_inlined_request_body" + }, + "screamingSnakeCase": { + "unsafeName": "EXAMPLE_INLINED_REQUEST_BODY", + "safeName": "EXAMPLE_INLINED_REQUEST_BODY" + }, + "pascalCase": { + "unsafeName": "ExampleInlinedRequestBody", + "safeName": "ExampleInlinedRequestBody" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "http", + "camelCase": { + "unsafeName": "http", + "safeName": "http" + }, + "snakeCase": { + "unsafeName": "http", + "safeName": "http" + }, + "screamingSnakeCase": { + "unsafeName": "HTTP", + "safeName": "HTTP" + }, + "pascalCase": { + "unsafeName": "Http", + "safeName": "Http" + } + } + ], + "packagePath": [], + "file": { + "originalName": "http", "camelCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "http", + "safeName": "http" }, "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" + "unsafeName": "http", + "safeName": "http" }, "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" + "unsafeName": "HTTP", + "safeName": "HTTP" }, "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" + "unsafeName": "Http", + "safeName": "Http" } } - ], - "packagePath": [], - "file": { - "originalName": "commons", - "camelCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "snakeCase": { - "unsafeName": "commons", - "safeName": "commons" - }, - "screamingSnakeCase": { - "unsafeName": "COMMONS", - "safeName": "COMMONS" - }, - "pascalCase": { - "unsafeName": "Commons", - "safeName": "Commons" - } - } + }, + "typeId": "type_http:ExampleInlinedRequestBody" }, - "typeId": "type_commons:WithDocs" - } - ], - "properties": [ + "docs": null + }, { - "name": { + "discriminantValue": { "name": { - "originalName": "bodyType", + "originalName": "reference", "camelCase": { - "unsafeName": "bodyType", - "safeName": "bodyType" + "unsafeName": "reference", + "safeName": "reference" }, "snakeCase": { - "unsafeName": "body_type", - "safeName": "body_type" + "unsafeName": "reference", + "safeName": "reference" }, "screamingSnakeCase": { - "unsafeName": "BODY_TYPE", - "safeName": "BODY_TYPE" + "unsafeName": "REFERENCE", + "safeName": "REFERENCE" }, "pascalCase": { - "unsafeName": "BodyType", - "safeName": "BodyType" + "unsafeName": "Reference", + "safeName": "Reference" } }, - "wireValue": "bodyType" + "wireValue": "reference" }, - "valueType": { - "_type": "named", + "shape": { + "_type": "samePropertiesAsObject", "name": { - "originalName": "TypeReference", + "originalName": "ExampleTypeReference", "camelCase": { - "unsafeName": "typeReference", - "safeName": "typeReference" + "unsafeName": "exampleTypeReference", + "safeName": "exampleTypeReference" }, "snakeCase": { - "unsafeName": "type_reference", - "safeName": "type_reference" + "unsafeName": "example_type_reference", + "safeName": "example_type_reference" }, "screamingSnakeCase": { - "unsafeName": "TYPE_REFERENCE", - "safeName": "TYPE_REFERENCE" + "unsafeName": "EXAMPLE_TYPE_REFERENCE", + "safeName": "EXAMPLE_TYPE_REFERENCE" }, "pascalCase": { - "unsafeName": "TypeReference", - "safeName": "TypeReference" + "unsafeName": "ExampleTypeReference", + "safeName": "ExampleTypeReference" } }, "fernFilepath": { @@ -49163,25 +52235,39 @@ } } }, - "typeId": "type_types:TypeReference" + "typeId": "type_types:ExampleTypeReference" }, - "availability": null, "docs": null } ] }, "referencedTypes": [ - "type_commons:WithDocs", - "type_types:TypeReference", - "type_types:ContainerType", - "type_types:MapType", - "type_types:Literal", + "type_http:ExampleInlinedRequestBody", + "type_commons:WithJsonExample", + "type_http:ExampleInlinedRequestBodyProperty", + "type_commons:NameAndWireValue", + "type_commons:Name", + "type_commons:SafeAndUnsafeString", + "type_types:ExampleTypeReference", + "type_types:ExampleTypeReferenceShape", + "type_types:ExamplePrimitive", + "type_commons:EscapedString", + "type_types:ExampleContainer", + "type_types:ExampleKeyValuePair", + "type_types:ExampleNamedType", "type_types:DeclaredTypeName", "type_commons:TypeId", "type_commons:FernFilepath", - "type_commons:Name", - "type_commons:SafeAndUnsafeString", - "type_types:PrimitiveType" + "type_types:ExampleTypeShape", + "type_types:ExampleAliasType", + "type_types:ExampleEnumType", + "type_types:ExampleObjectType", + "type_types:ExampleObjectProperty", + "type_types:ExampleUnionType", + "type_types:ExampleSingleUnionType", + "type_types:ExampleSingleUnionTypeProperties", + "type_types:ExampleObjectTypeWithTypeId", + "type_types:ExampleUndiscriminatedUnionType" ], "examples": [], "availability": null, @@ -49244,7 +52330,7 @@ "type_commons:TypeId", "type_commons:ErrorId", "type_commons:WebhookGroupId", - "type_commons:WebsocketChannelId", + "type_commons:WebSocketChannelId", "type_commons:Declaration", "type_commons:Availability", "type_commons:AvailabilityStatus", @@ -49280,6 +52366,8 @@ "type_http:BytesRequest", "type_http:FileUploadRequestProperty", "type_http:FileProperty", + "type_http:FilePropertySingle", + "type_http:FilePropertyArray", "type_http:HttpRequestBodyReference", "type_http:SdkRequestBodyType", "type_http:SdkRequest", @@ -49295,6 +52383,8 @@ "type_http:StreamingResponseChunkType", "type_http:ResponseErrors", "type_http:ResponseError", + "type_http:Pagination", + "type_http:PaginationProperty", "type_http:ExampleEndpointCall", "type_http:ExampleCodeSample", "type_http:ExampleCodeSampleLanguage", @@ -49367,14 +52457,18 @@ "type_webhooks:InlinedWebhookPayload", "type_webhooks:InlinedWebhookPayloadProperty", "type_webhooks:WebhookHttpMethod", - "type_websocket:WebsocketMessageId", - "type_websocket:WebsocketChannel", - "type_websocket:WebsocketMessage", - "type_websocket:WebsocketMessageOrigin", - "type_websocket:WebsocketMessageBody", - "type_websocket:InlinedWebsocketMessageBody", - "type_websocket:InlinedWebsocketMessageBodyProperty", - "type_websocket:WebsocketMessageBodyReference" + "type_websocket:WebSocketMessageId", + "type_websocket:WebSocketChannel", + "type_websocket:WebSocketName", + "type_websocket:WebSocketMessage", + "type_websocket:WebSocketMessageOrigin", + "type_websocket:WebSocketMessageBody", + "type_websocket:InlinedWebSocketMessageBody", + "type_websocket:InlinedWebSocketMessageBodyProperty", + "type_websocket:WebSocketMessageBodyReference", + "type_websocket:ExampleWebSocketSession", + "type_websocket:ExampleWebSocketMessage", + "type_websocket:ExampleWebSocketMessageBody" ] }, "webhookGroups": {}, @@ -49537,7 +52631,7 @@ "type_commons:TypeId", "type_commons:ErrorId", "type_commons:WebhookGroupId", - "type_commons:WebsocketChannelId", + "type_commons:WebSocketChannelId", "type_commons:Declaration", "type_commons:Availability", "type_commons:AvailabilityStatus" @@ -49865,6 +52959,8 @@ "type_http:BytesRequest", "type_http:FileUploadRequestProperty", "type_http:FileProperty", + "type_http:FilePropertySingle", + "type_http:FilePropertyArray", "type_http:HttpRequestBodyReference", "type_http:SdkRequestBodyType", "type_http:SdkRequest", @@ -49880,6 +52976,8 @@ "type_http:StreamingResponseChunkType", "type_http:ResponseErrors", "type_http:ResponseError", + "type_http:Pagination", + "type_http:PaginationProperty", "type_http:ExampleEndpointCall", "type_http:ExampleCodeSample", "type_http:ExampleCodeSampleLanguage", @@ -50317,14 +53415,18 @@ }, "service": null, "types": [ - "type_websocket:WebsocketMessageId", - "type_websocket:WebsocketChannel", - "type_websocket:WebsocketMessage", - "type_websocket:WebsocketMessageOrigin", - "type_websocket:WebsocketMessageBody", - "type_websocket:InlinedWebsocketMessageBody", - "type_websocket:InlinedWebsocketMessageBodyProperty", - "type_websocket:WebsocketMessageBodyReference" + "type_websocket:WebSocketMessageId", + "type_websocket:WebSocketChannel", + "type_websocket:WebSocketName", + "type_websocket:WebSocketMessage", + "type_websocket:WebSocketMessageOrigin", + "type_websocket:WebSocketMessageBody", + "type_websocket:InlinedWebSocketMessageBody", + "type_websocket:InlinedWebSocketMessageBodyProperty", + "type_websocket:WebSocketMessageBodyReference", + "type_websocket:ExampleWebSocketSession", + "type_websocket:ExampleWebSocketMessage", + "type_websocket:ExampleWebSocketMessageBody" ], "errors": [], "subpackages": [], diff --git a/generators/go/internal/fern/ir/types.go b/generators/go/internal/fern/ir/types.go index b88427e2311..f3d3d84b3f2 100644 --- a/generators/go/internal/fern/ir/types.go +++ b/generators/go/internal/fern/ir/types.go @@ -330,9 +330,9 @@ type SubpackageId = string type TypeId = string -type WebhookGroupId = string +type WebSocketChannelId = string -type WebsocketChannelId = string +type WebhookGroupId = string type WithDocs struct { Docs *string `json:"docs,omitempty" url:"docs,omitempty"` @@ -1059,11 +1059,103 @@ func (f *FileDownloadResponse) String() string { } type FileProperty struct { + Type string + File *FilePropertySingle + FileArray *FilePropertyArray +} + +func NewFilePropertyFromFile(value *FilePropertySingle) *FileProperty { + return &FileProperty{Type: "file", File: value} +} + +func NewFilePropertyFromFileArray(value *FilePropertyArray) *FileProperty { + return &FileProperty{Type: "fileArray", FileArray: value} +} + +func (f *FileProperty) UnmarshalJSON(data []byte) error { + var unmarshaler struct { + Type string `json:"type"` + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + f.Type = unmarshaler.Type + switch unmarshaler.Type { + case "file": + value := new(FilePropertySingle) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + f.File = value + case "fileArray": + value := new(FilePropertyArray) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + f.FileArray = value + } + return nil +} + +func (f FileProperty) MarshalJSON() ([]byte, error) { + switch f.Type { + default: + return nil, fmt.Errorf("invalid type %s in %T", f.Type, f) + case "file": + var marshaler = struct { + Type string `json:"type"` + *FilePropertySingle + }{ + Type: f.Type, + FilePropertySingle: f.File, + } + return json.Marshal(marshaler) + case "fileArray": + var marshaler = struct { + Type string `json:"type"` + *FilePropertyArray + }{ + Type: f.Type, + FilePropertyArray: f.FileArray, + } + return json.Marshal(marshaler) + } +} + +type FilePropertyVisitor interface { + VisitFile(*FilePropertySingle) error + VisitFileArray(*FilePropertyArray) error +} + +func (f *FileProperty) Accept(visitor FilePropertyVisitor) error { + switch f.Type { + default: + return fmt.Errorf("invalid type %s in %T", f.Type, f) + case "file": + return visitor.VisitFile(f.File) + case "fileArray": + return visitor.VisitFileArray(f.FileArray) + } +} + +type FilePropertyArray struct { Key *NameAndWireValue `json:"key,omitempty" url:"key,omitempty"` IsOptional bool `json:"isOptional" url:"isOptional"` } -func (f *FileProperty) String() string { +func (f *FilePropertyArray) String() string { + if value, err := core.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FilePropertySingle struct { + Key *NameAndWireValue `json:"key,omitempty" url:"key,omitempty"` + IsOptional bool `json:"isOptional" url:"isOptional"` +} + +func (f *FilePropertySingle) String() string { if value, err := core.StringifyJSON(f); err == nil { return value } @@ -1106,11 +1198,13 @@ func (f *FileUploadRequestProperty) UnmarshalJSON(data []byte) error { f.Type = unmarshaler.Type switch unmarshaler.Type { case "file": - value := new(FileProperty) - if err := json.Unmarshal(data, &value); err != nil { + var valueUnmarshaler struct { + File *FileProperty `json:"value,omitempty"` + } + if err := json.Unmarshal(data, &valueUnmarshaler); err != nil { return err } - f.File = value + f.File = valueUnmarshaler.File case "bodyProperty": value := new(InlinedRequestBodyProperty) if err := json.Unmarshal(data, &value); err != nil { @@ -1127,11 +1221,11 @@ func (f FileUploadRequestProperty) MarshalJSON() ([]byte, error) { return nil, fmt.Errorf("invalid type %s in %T", f.Type, f) case "file": var marshaler = struct { - Type string `json:"type"` - *FileProperty + Type string `json:"type"` + File *FileProperty `json:"value,omitempty"` }{ - Type: f.Type, - FileProperty: f.File, + Type: f.Type, + File: f.File, } return json.Marshal(marshaler) case "bodyProperty": @@ -1182,6 +1276,7 @@ type HttpEndpoint struct { Errors ResponseErrors `json:"errors,omitempty" url:"errors,omitempty"` Auth bool `json:"auth" url:"auth"` Idempotent bool `json:"idempotent" url:"idempotent"` + Pagination *Pagination `json:"pagination,omitempty" url:"pagination,omitempty"` Examples []*ExampleEndpointCall `json:"examples,omitempty" url:"examples,omitempty"` } @@ -1682,6 +1777,24 @@ func (j *JsonResponseBodyWithProperty) String() string { return fmt.Sprintf("%#v", j) } +// If set, the endpoint will be generated with auto-pagination features. +// +// The page must be defined as a query parameter included in the request, +// whereas the next page and results are resolved from properties defined +// on the response. +type Pagination struct { + Page *QueryParameter `json:"page,omitempty" url:"page,omitempty"` + Next *ObjectProperty `json:"next,omitempty" url:"next,omitempty"` + Results *ObjectProperty `json:"results,omitempty" url:"results,omitempty"` +} + +func (p *Pagination) String() string { + if value, err := core.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + type PathParameter struct { Docs *string `json:"docs,omitempty" url:"docs,omitempty"` Name *Name `json:"name,omitempty" url:"name,omitempty"` @@ -2193,7 +2306,7 @@ type IntermediateRepresentation struct { // The webhooks sent by this API WebhookGroups map[WebhookGroupId]WebhookGroup `json:"webhookGroups,omitempty" url:"webhookGroups,omitempty"` // The websocket channels served by this API - WebsocketChannels map[WebsocketChannelId]*WebsocketChannel `json:"websocketChannels,omitempty" url:"websocketChannels,omitempty"` + WebsocketChannels map[WebSocketChannelId]*WebSocketChannel `json:"websocketChannels,omitempty" url:"websocketChannels,omitempty"` Errors map[ErrorId]*ErrorDeclaration `json:"errors,omitempty" url:"errors,omitempty"` Subpackages map[SubpackageId]*Subpackage `json:"subpackages,omitempty" url:"subpackages,omitempty"` RootPackage *Package `json:"rootPackage,omitempty" url:"rootPackage,omitempty"` @@ -2221,7 +2334,7 @@ type Package struct { Types []TypeId `json:"types,omitempty" url:"types,omitempty"` Errors []ErrorId `json:"errors,omitempty" url:"errors,omitempty"` Webhooks *WebhookGroupId `json:"webhooks,omitempty" url:"webhooks,omitempty"` - Websocket *WebsocketChannelId `json:"websocket,omitempty" url:"websocket,omitempty"` + Websocket *WebSocketChannelId `json:"websocket,omitempty" url:"websocket,omitempty"` Subpackages []SubpackageId `json:"subpackages,omitempty" url:"subpackages,omitempty"` HasEndpointsInTree bool `json:"hasEndpointsInTree" url:"hasEndpointsInTree"` NavigationConfig *PackageNavigationConfig `json:"navigationConfig,omitempty" url:"navigationConfig,omitempty"` @@ -2293,7 +2406,7 @@ type Subpackage struct { Types []TypeId `json:"types,omitempty" url:"types,omitempty"` Errors []ErrorId `json:"errors,omitempty" url:"errors,omitempty"` Webhooks *WebhookGroupId `json:"webhooks,omitempty" url:"webhooks,omitempty"` - Websocket *WebsocketChannelId `json:"websocket,omitempty" url:"websocket,omitempty"` + Websocket *WebSocketChannelId `json:"websocket,omitempty" url:"websocket,omitempty"` Subpackages []SubpackageId `json:"subpackages,omitempty" url:"subpackages,omitempty"` HasEndpointsInTree bool `json:"hasEndpointsInTree" url:"hasEndpointsInTree"` NavigationConfig *PackageNavigationConfig `json:"navigationConfig,omitempty" url:"navigationConfig,omitempty"` @@ -4403,81 +4516,194 @@ func (w *WebhookPayloadReference) String() string { return fmt.Sprintf("%#v", w) } -type InlinedWebsocketMessageBody struct { +type ExampleWebSocketMessage struct { + Type WebSocketMessageId `json:"type" url:"type"` + Body *ExampleWebSocketMessageBody `json:"body,omitempty" url:"body,omitempty"` +} + +func (e *ExampleWebSocketMessage) String() string { + if value, err := core.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type ExampleWebSocketMessageBody struct { + Type string + InlinedBody *ExampleInlinedRequestBody + Reference *ExampleTypeReference +} + +func NewExampleWebSocketMessageBodyFromInlinedBody(value *ExampleInlinedRequestBody) *ExampleWebSocketMessageBody { + return &ExampleWebSocketMessageBody{Type: "inlinedBody", InlinedBody: value} +} + +func NewExampleWebSocketMessageBodyFromReference(value *ExampleTypeReference) *ExampleWebSocketMessageBody { + return &ExampleWebSocketMessageBody{Type: "reference", Reference: value} +} + +func (e *ExampleWebSocketMessageBody) UnmarshalJSON(data []byte) error { + var unmarshaler struct { + Type string `json:"type"` + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + e.Type = unmarshaler.Type + switch unmarshaler.Type { + case "inlinedBody": + value := new(ExampleInlinedRequestBody) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + e.InlinedBody = value + case "reference": + value := new(ExampleTypeReference) + if err := json.Unmarshal(data, &value); err != nil { + return err + } + e.Reference = value + } + return nil +} + +func (e ExampleWebSocketMessageBody) MarshalJSON() ([]byte, error) { + switch e.Type { + default: + return nil, fmt.Errorf("invalid type %s in %T", e.Type, e) + case "inlinedBody": + var marshaler = struct { + Type string `json:"type"` + *ExampleInlinedRequestBody + }{ + Type: e.Type, + ExampleInlinedRequestBody: e.InlinedBody, + } + return json.Marshal(marshaler) + case "reference": + var marshaler = struct { + Type string `json:"type"` + *ExampleTypeReference + }{ + Type: e.Type, + ExampleTypeReference: e.Reference, + } + return json.Marshal(marshaler) + } +} + +type ExampleWebSocketMessageBodyVisitor interface { + VisitInlinedBody(*ExampleInlinedRequestBody) error + VisitReference(*ExampleTypeReference) error +} + +func (e *ExampleWebSocketMessageBody) Accept(visitor ExampleWebSocketMessageBodyVisitor) error { + switch e.Type { + default: + return fmt.Errorf("invalid type %s in %T", e.Type, e) + case "inlinedBody": + return visitor.VisitInlinedBody(e.InlinedBody) + case "reference": + return visitor.VisitReference(e.Reference) + } +} + +type ExampleWebSocketSession struct { + Docs *string `json:"docs,omitempty" url:"docs,omitempty"` + Name *Name `json:"name,omitempty" url:"name,omitempty"` + Url string `json:"url" url:"url"` + PathParameters []*ExamplePathParameter `json:"pathParameters,omitempty" url:"pathParameters,omitempty"` + Headers []*ExampleHeader `json:"headers,omitempty" url:"headers,omitempty"` + QueryParameters []*ExampleQueryParameter `json:"queryParameters,omitempty" url:"queryParameters,omitempty"` + Messages []*ExampleWebSocketMessage `json:"messages,omitempty" url:"messages,omitempty"` +} + +func (e *ExampleWebSocketSession) String() string { + if value, err := core.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type InlinedWebSocketMessageBody struct { Name *Name `json:"name,omitempty" url:"name,omitempty"` Extends []*DeclaredTypeName `json:"extends,omitempty" url:"extends,omitempty"` - Properties []*InlinedWebsocketMessageBodyProperty `json:"properties,omitempty" url:"properties,omitempty"` + Properties []*InlinedWebSocketMessageBodyProperty `json:"properties,omitempty" url:"properties,omitempty"` } -func (i *InlinedWebsocketMessageBody) String() string { +func (i *InlinedWebSocketMessageBody) String() string { if value, err := core.StringifyJSON(i); err == nil { return value } return fmt.Sprintf("%#v", i) } -type InlinedWebsocketMessageBodyProperty struct { +type InlinedWebSocketMessageBodyProperty struct { Docs *string `json:"docs,omitempty" url:"docs,omitempty"` Name *NameAndWireValue `json:"name,omitempty" url:"name,omitempty"` ValueType *TypeReference `json:"valueType,omitempty" url:"valueType,omitempty"` } -func (i *InlinedWebsocketMessageBodyProperty) String() string { +func (i *InlinedWebSocketMessageBodyProperty) String() string { if value, err := core.StringifyJSON(i); err == nil { return value } return fmt.Sprintf("%#v", i) } -type WebsocketChannel struct { +type WebSocketChannel struct { Docs *string `json:"docs,omitempty" url:"docs,omitempty"` Availability *Availability `json:"availability,omitempty" url:"availability,omitempty"` + Name WebSocketName `json:"name,omitempty" url:"name,omitempty"` + DisplayName *string `json:"displayName,omitempty" url:"displayName,omitempty"` Path *HttpPath `json:"path,omitempty" url:"path,omitempty"` Auth bool `json:"auth" url:"auth"` Headers []*HttpHeader `json:"headers,omitempty" url:"headers,omitempty"` QueryParameters []*QueryParameter `json:"queryParameters,omitempty" url:"queryParameters,omitempty"` PathParameters []*PathParameter `json:"pathParameters,omitempty" url:"pathParameters,omitempty"` // The messages that can be sent and received on this channel - Messages map[WebsocketMessageId]*WebsocketMessage `json:"messages,omitempty" url:"messages,omitempty"` + Messages []*WebSocketMessage `json:"messages,omitempty" url:"messages,omitempty"` + Examples []*ExampleWebSocketSession `json:"examples,omitempty" url:"examples,omitempty"` } -func (w *WebsocketChannel) String() string { +func (w *WebSocketChannel) String() string { if value, err := core.StringifyJSON(w); err == nil { return value } return fmt.Sprintf("%#v", w) } -type WebsocketMessage struct { +type WebSocketMessage struct { Docs *string `json:"docs,omitempty" url:"docs,omitempty"` Availability *Availability `json:"availability,omitempty" url:"availability,omitempty"` + Type WebSocketMessageId `json:"type" url:"type"` DisplayName *string `json:"displayName,omitempty" url:"displayName,omitempty"` - Origin WebsocketMessageOrigin `json:"origin,omitempty" url:"origin,omitempty"` - Body *WebsocketMessageBody `json:"body,omitempty" url:"body,omitempty"` + Origin WebSocketMessageOrigin `json:"origin,omitempty" url:"origin,omitempty"` + Body *WebSocketMessageBody `json:"body,omitempty" url:"body,omitempty"` } -func (w *WebsocketMessage) String() string { +func (w *WebSocketMessage) String() string { if value, err := core.StringifyJSON(w); err == nil { return value } return fmt.Sprintf("%#v", w) } -type WebsocketMessageBody struct { +type WebSocketMessageBody struct { Type string - InlinedBody *InlinedWebsocketMessageBody - Reference *WebsocketMessageBodyReference + InlinedBody *InlinedWebSocketMessageBody + Reference *WebSocketMessageBodyReference } -func NewWebsocketMessageBodyFromInlinedBody(value *InlinedWebsocketMessageBody) *WebsocketMessageBody { - return &WebsocketMessageBody{Type: "inlinedBody", InlinedBody: value} +func NewWebSocketMessageBodyFromInlinedBody(value *InlinedWebSocketMessageBody) *WebSocketMessageBody { + return &WebSocketMessageBody{Type: "inlinedBody", InlinedBody: value} } -func NewWebsocketMessageBodyFromReference(value *WebsocketMessageBodyReference) *WebsocketMessageBody { - return &WebsocketMessageBody{Type: "reference", Reference: value} +func NewWebSocketMessageBodyFromReference(value *WebSocketMessageBodyReference) *WebSocketMessageBody { + return &WebSocketMessageBody{Type: "reference", Reference: value} } -func (w *WebsocketMessageBody) UnmarshalJSON(data []byte) error { +func (w *WebSocketMessageBody) UnmarshalJSON(data []byte) error { var unmarshaler struct { Type string `json:"type"` } @@ -4487,13 +4713,13 @@ func (w *WebsocketMessageBody) UnmarshalJSON(data []byte) error { w.Type = unmarshaler.Type switch unmarshaler.Type { case "inlinedBody": - value := new(InlinedWebsocketMessageBody) + value := new(InlinedWebSocketMessageBody) if err := json.Unmarshal(data, &value); err != nil { return err } w.InlinedBody = value case "reference": - value := new(WebsocketMessageBodyReference) + value := new(WebSocketMessageBodyReference) if err := json.Unmarshal(data, &value); err != nil { return err } @@ -4502,37 +4728,37 @@ func (w *WebsocketMessageBody) UnmarshalJSON(data []byte) error { return nil } -func (w WebsocketMessageBody) MarshalJSON() ([]byte, error) { +func (w WebSocketMessageBody) MarshalJSON() ([]byte, error) { switch w.Type { default: return nil, fmt.Errorf("invalid type %s in %T", w.Type, w) case "inlinedBody": var marshaler = struct { Type string `json:"type"` - *InlinedWebsocketMessageBody + *InlinedWebSocketMessageBody }{ Type: w.Type, - InlinedWebsocketMessageBody: w.InlinedBody, + InlinedWebSocketMessageBody: w.InlinedBody, } return json.Marshal(marshaler) case "reference": var marshaler = struct { Type string `json:"type"` - *WebsocketMessageBodyReference + *WebSocketMessageBodyReference }{ Type: w.Type, - WebsocketMessageBodyReference: w.Reference, + WebSocketMessageBodyReference: w.Reference, } return json.Marshal(marshaler) } } -type WebsocketMessageBodyVisitor interface { - VisitInlinedBody(*InlinedWebsocketMessageBody) error - VisitReference(*WebsocketMessageBodyReference) error +type WebSocketMessageBodyVisitor interface { + VisitInlinedBody(*InlinedWebSocketMessageBody) error + VisitReference(*WebSocketMessageBodyReference) error } -func (w *WebsocketMessageBody) Accept(visitor WebsocketMessageBodyVisitor) error { +func (w *WebSocketMessageBody) Accept(visitor WebSocketMessageBodyVisitor) error { switch w.Type { default: return fmt.Errorf("invalid type %s in %T", w.Type, w) @@ -4543,38 +4769,40 @@ func (w *WebsocketMessageBody) Accept(visitor WebsocketMessageBodyVisitor) error } } -type WebsocketMessageBodyReference struct { +type WebSocketMessageBodyReference struct { Docs *string `json:"docs,omitempty" url:"docs,omitempty"` BodyType *TypeReference `json:"bodyType,omitempty" url:"bodyType,omitempty"` } -func (w *WebsocketMessageBodyReference) String() string { +func (w *WebSocketMessageBodyReference) String() string { if value, err := core.StringifyJSON(w); err == nil { return value } return fmt.Sprintf("%#v", w) } -type WebsocketMessageId = string +type WebSocketMessageId = string -type WebsocketMessageOrigin string +type WebSocketMessageOrigin string const ( - WebsocketMessageOriginClient WebsocketMessageOrigin = "client" - WebsocketMessageOriginServer WebsocketMessageOrigin = "server" + WebSocketMessageOriginClient WebSocketMessageOrigin = "client" + WebSocketMessageOriginServer WebSocketMessageOrigin = "server" ) -func NewWebsocketMessageOriginFromString(s string) (WebsocketMessageOrigin, error) { +func NewWebSocketMessageOriginFromString(s string) (WebSocketMessageOrigin, error) { switch s { case "client": - return WebsocketMessageOriginClient, nil + return WebSocketMessageOriginClient, nil case "server": - return WebsocketMessageOriginServer, nil + return WebSocketMessageOriginServer, nil } - var t WebsocketMessageOrigin + var t WebSocketMessageOrigin return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (w WebsocketMessageOrigin) Ptr() *WebsocketMessageOrigin { +func (w WebSocketMessageOrigin) Ptr() *WebSocketMessageOrigin { return &w } + +type WebSocketName = *Name diff --git a/generators/go/internal/generator/sdk.go b/generators/go/internal/generator/sdk.go index eb1beb99c16..b67e1069ab2 100644 --- a/generators/go/internal/generator/sdk.go +++ b/generators/go/internal/generator/sdk.go @@ -1011,28 +1011,50 @@ func (f *fileWriter) WriteClient( f.P("requestBuffer := bytes.NewBuffer(nil)") f.P("writer := multipart.NewWriter(requestBuffer)") for _, fileProperty := range endpoint.FileProperties { + filePropertyInfo, err := filePropertyToInfo(fileProperty) + if err != nil { + return nil, err + } var ( - fileVariable = fileProperty.Key.Name.CamelCase.SafeName - filenameVariable = fileProperty.Key.Name.CamelCase.UnsafeName + "Filename" - filenameValue = fileProperty.Key.Name.CamelCase.UnsafeName + "_filename" - partVariable = fileProperty.Key.Name.CamelCase.UnsafeName + "Part" + fileVariable = filePropertyInfo.Key.Name.CamelCase.SafeName + filenameVariable = filePropertyInfo.Key.Name.CamelCase.UnsafeName + "Filename" + filenameValue = filePropertyInfo.Key.Name.CamelCase.UnsafeName + "_filename" + partVariable = filePropertyInfo.Key.Name.CamelCase.UnsafeName + "Part" ) - if fileProperty.IsOptional { - f.P("if ", fileVariable, " != nil {") - } - f.P(fmt.Sprintf("%s := %q", filenameVariable, filenameValue)) - f.P("if named, ok := ", fileVariable, ".(interface{ Name() string }); ok {") - f.P(fmt.Sprintf("%s = named.Name()", filenameVariable)) - f.P("}") - f.P(partVariable, `, err := writer.CreateFormFile("`, fileProperty.Key.WireValue, `", `, filenameVariable, ")") - f.P("if err != nil {") - f.P("return ", endpoint.ErrorReturnValues) - f.P("}") - f.P("if _, err := io.Copy(", partVariable, ", ", fileVariable, "); err != nil {") - f.P("return ", endpoint.ErrorReturnValues) - f.P("}") - if fileProperty.IsOptional { + if filePropertyInfo.IsArray { + // We don't care whether the file array is optional or not; the range + // handles that for us. + f.P("for i, f := range ", fileVariable, "{") + f.P(filenameVariable, ` := fmt.Sprintf("`, filenameValue, `_%d", i)`) + f.P("if named, ok := f.(interface{ Name() string }); ok {") + f.P(fmt.Sprintf("%s = named.Name()", filenameVariable)) + f.P("}") + f.P(partVariable, `, err := writer.CreateFormFile("`, filePropertyInfo.Key.WireValue, `", `, filenameVariable, ")") + f.P("if err != nil {") + f.P("return ", endpoint.ErrorReturnValues) + f.P("}") + f.P("if _, err := io.Copy(", partVariable, ", f); err != nil {") + f.P("return ", endpoint.ErrorReturnValues) + f.P("}") + f.P("}") + } else { + if filePropertyInfo.IsOptional { + f.P("if ", fileVariable, " != nil {") + } + f.P(fmt.Sprintf("%s := %q", filenameVariable, filenameValue)) + f.P("if named, ok := ", fileVariable, ".(interface{ Name() string }); ok {") + f.P(fmt.Sprintf("%s = named.Name()", filenameVariable)) f.P("}") + f.P(partVariable, `, err := writer.CreateFormFile("`, filePropertyInfo.Key.WireValue, `", `, filenameVariable, ")") + f.P("if err != nil {") + f.P("return ", endpoint.ErrorReturnValues) + f.P("}") + f.P("if _, err := io.Copy(", partVariable, ", ", fileVariable, "); err != nil {") + f.P("return ", endpoint.ErrorReturnValues) + f.P("}") + if filePropertyInfo.IsOptional { + f.P("}") + } } } @@ -1508,6 +1530,29 @@ func generatedClientInstantiation( } } +type filePropertyInfo struct { + Key *ir.NameAndWireValue + IsOptional bool + IsArray bool +} + +func filePropertyToInfo(fileProperty *ir.FileProperty) (*filePropertyInfo, error) { + switch fileProperty.Type { + case "file": + return &filePropertyInfo{ + Key: fileProperty.File.Key, + IsOptional: fileProperty.File.IsOptional, + }, nil + case "fileArray": + return &filePropertyInfo{ + Key: fileProperty.FileArray.Key, + IsOptional: fileProperty.FileArray.IsOptional, + IsArray: true, + }, nil + } + return nil, fmt.Errorf("file property %s is not yet supported", fileProperty.Type) +} + // endpoint holds the fields required to generate a client endpoint. // // All of the fields are pre-formatted so that they can all be simple @@ -1544,6 +1589,7 @@ type endpoint struct { QueryParameters []*ir.QueryParameter Headers []*ir.HttpHeader IdempotencyHeaders []*ir.HttpHeader + FilePropertyInfo *filePropertyInfo FileProperties []*ir.FileProperty FileBodyProperties []*ir.InlinedRequestBodyProperty } @@ -1586,12 +1632,20 @@ func (f *fileWriter) endpointFromIR( var ( fileProperties []*ir.FileProperty fileBodyProperties []*ir.InlinedRequestBodyProperty + filePropertyInfo *filePropertyInfo ) if irEndpoint.RequestBody != nil && irEndpoint.RequestBody.FileUpload != nil { for _, fileUploadProperty := range irEndpoint.RequestBody.FileUpload.Properties { if fileUploadProperty.File != nil { - parameterName := fileUploadProperty.File.Key.Name.CamelCase.SafeName + filePropertyInfo, err := filePropertyToInfo(fileUploadProperty.File) + if err != nil { + return nil, err + } + parameterName := filePropertyInfo.Key.Name.CamelCase.SafeName parameterType := "io.Reader" + if filePropertyInfo.IsArray { + parameterType = "[]io.Reader" + } signatureParameters = append( signatureParameters, &signatureParameter{ @@ -1838,6 +1892,7 @@ func (f *fileWriter) endpointFromIR( QueryParameters: irEndpoint.QueryParameters, Headers: irEndpoint.Headers, IdempotencyHeaders: idempotencyHeaders, + FilePropertyInfo: filePropertyInfo, FileProperties: fileProperties, FileBodyProperties: fileBodyProperties, }, nil diff --git a/generators/go/internal/testdata/sdk/upload/ir.json b/generators/go/internal/testdata/sdk/upload/ir.json index 3535e5e5550..2a2b8bb89d2 100644 --- a/generators/go/internal/testdata/sdk/upload/ir.json +++ b/generators/go/internal/testdata/sdk/upload/ir.json @@ -213,29 +213,32 @@ }, { "type": "file", - "key": { - "name": { - "originalName": "file", - "camelCase": { - "unsafeName": "file", - "safeName": "file" - }, - "snakeCase": { - "unsafeName": "file", - "safeName": "file" - }, - "screamingSnakeCase": { - "unsafeName": "FILE", - "safeName": "FILE" + "value": { + "type": "file", + "key": { + "name": { + "originalName": "file", + "camelCase": { + "unsafeName": "file", + "safeName": "file" + }, + "snakeCase": { + "unsafeName": "file", + "safeName": "file" + }, + "screamingSnakeCase": { + "unsafeName": "FILE", + "safeName": "FILE" + }, + "pascalCase": { + "unsafeName": "File", + "safeName": "File" + } }, - "pascalCase": { - "unsafeName": "File", - "safeName": "File" - } + "wireValue": "file" }, - "wireValue": "file" - }, - "isOptional": false + "isOptional": false + } } ] }, @@ -314,6 +317,7 @@ }, "errors": [], "examples": [], + "pagination": null, "availability": null, "docs": null }, @@ -379,29 +383,32 @@ "properties": [ { "type": "file", - "key": { - "name": { - "originalName": "file", - "camelCase": { - "unsafeName": "file", - "safeName": "file" - }, - "snakeCase": { - "unsafeName": "file", - "safeName": "file" - }, - "screamingSnakeCase": { - "unsafeName": "FILE", - "safeName": "FILE" + "value": { + "type": "file", + "key": { + "name": { + "originalName": "file", + "camelCase": { + "unsafeName": "file", + "safeName": "file" + }, + "snakeCase": { + "unsafeName": "file", + "safeName": "file" + }, + "screamingSnakeCase": { + "unsafeName": "FILE", + "safeName": "FILE" + }, + "pascalCase": { + "unsafeName": "File", + "safeName": "File" + } }, - "pascalCase": { - "unsafeName": "File", - "safeName": "File" - } + "wireValue": "file" }, - "wireValue": "file" - }, - "isOptional": false + "isOptional": false + } } ] }, @@ -480,6 +487,7 @@ }, "errors": [], "examples": [], + "pagination": null, "availability": null, "docs": null }, @@ -575,55 +583,61 @@ }, { "type": "file", - "key": { - "name": { - "originalName": "file", - "camelCase": { - "unsafeName": "file", - "safeName": "file" - }, - "snakeCase": { - "unsafeName": "file", - "safeName": "file" - }, - "screamingSnakeCase": { - "unsafeName": "FILE", - "safeName": "FILE" + "value": { + "type": "file", + "key": { + "name": { + "originalName": "file", + "camelCase": { + "unsafeName": "file", + "safeName": "file" + }, + "snakeCase": { + "unsafeName": "file", + "safeName": "file" + }, + "screamingSnakeCase": { + "unsafeName": "FILE", + "safeName": "FILE" + }, + "pascalCase": { + "unsafeName": "File", + "safeName": "File" + } }, - "pascalCase": { - "unsafeName": "File", - "safeName": "File" - } + "wireValue": "file" }, - "wireValue": "file" - }, - "isOptional": false + "isOptional": false + } }, { "type": "file", - "key": { - "name": { - "originalName": "optionalFile", - "camelCase": { - "unsafeName": "optionalFile", - "safeName": "optionalFile" - }, - "snakeCase": { - "unsafeName": "optional_file", - "safeName": "optional_file" - }, - "screamingSnakeCase": { - "unsafeName": "OPTIONAL_FILE", - "safeName": "OPTIONAL_FILE" + "value": { + "type": "file", + "key": { + "name": { + "originalName": "optionalFile", + "camelCase": { + "unsafeName": "optionalFile", + "safeName": "optionalFile" + }, + "snakeCase": { + "unsafeName": "optional_file", + "safeName": "optional_file" + }, + "screamingSnakeCase": { + "unsafeName": "OPTIONAL_FILE", + "safeName": "OPTIONAL_FILE" + }, + "pascalCase": { + "unsafeName": "OptionalFile", + "safeName": "OptionalFile" + } }, - "pascalCase": { - "unsafeName": "OptionalFile", - "safeName": "OptionalFile" - } + "wireValue": "optionalFile" }, - "wireValue": "optionalFile" - }, - "isOptional": true + "isOptional": true + } } ] }, @@ -702,6 +716,7 @@ }, "errors": [], "examples": [], + "pagination": null, "availability": null, "docs": null } @@ -744,6 +759,7 @@ "sharedTypes": [] }, "webhookGroups": {}, + "websocketChannels": {}, "subpackages": { "subpackage_file": { "name": { @@ -814,6 +830,7 @@ "subpackages": [], "navigationConfig": null, "webhooks": null, + "websocket": null, "hasEndpointsInTree": true, "docs": null } @@ -824,6 +841,7 @@ "packagePath": [], "file": null }, + "websocket": null, "service": null, "types": [], "errors": [], diff --git a/generators/go/sdk/CHANGELOG.md b/generators/go/sdk/CHANGELOG.md index 4ad1c50ad8c..f0a74bb3496 100644 --- a/generators/go/sdk/CHANGELOG.md +++ b/generators/go/sdk/CHANGELOG.md @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## Unreleased + +- Feature: Add support for multiple files in upload endpoints. Endpoints that specify + multiple file parameters will include a `[]io.Reader` parameter, where each value + is individually named. If the `io.Reader` does not contain a name, a name is generated. + +```go +func (c *Client) Upload( + ctx context.Context, + fileList []io.Reader, + opts ...option.RequestOption, +) error { + ... +} +``` + ## [0.17.0] - 2024-02-26 - No changes since previous release candidate. diff --git a/seed/go-fiber/seed.yml b/seed/go-fiber/seed.yml index 1bfd02f9b01..386ac6e504f 100644 --- a/seed/go-fiber/seed.yml +++ b/seed/go-fiber/seed.yml @@ -1,4 +1,4 @@ -irVersion: v33 +irVersion: v35 docker: fernapi/fern-go-fiber:latest dockerCommand: docker build -f ./generators/go/docker/Dockerfile.fiber -t fernapi/fern-go-fiber:latest ./generators/go language: go @@ -28,4 +28,3 @@ allowedFailures: - exhaustive - reserved-keywords - trace - - websocket diff --git a/seed/go-fiber/websocket/.github/workflows/ci.yml b/seed/go-fiber/websocket/.github/workflows/ci.yml new file mode 100644 index 00000000000..d4c0a5dcd95 --- /dev/null +++ b/seed/go-fiber/websocket/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci + +on: [push] + +jobs: + compile: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up go + uses: actions/setup-go@v4 + + - name: Compile + run: go build ./... + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up go + uses: actions/setup-go@v4 + + - name: Test + run: go test ./... diff --git a/seed/go-fiber/websocket/core/stringer.go b/seed/go-fiber/websocket/core/stringer.go new file mode 100644 index 00000000000..000cf448641 --- /dev/null +++ b/seed/go-fiber/websocket/core/stringer.go @@ -0,0 +1,13 @@ +package core + +import "encoding/json" + +// StringifyJSON returns a pretty JSON string representation of +// the given value. +func StringifyJSON(value interface{}) (string, error) { + bytes, err := json.MarshalIndent(value, "", " ") + if err != nil { + return "", err + } + return string(bytes), nil +} diff --git a/seed/go-fiber/websocket/core/time.go b/seed/go-fiber/websocket/core/time.go new file mode 100644 index 00000000000..d009ab30c90 --- /dev/null +++ b/seed/go-fiber/websocket/core/time.go @@ -0,0 +1,137 @@ +package core + +import ( + "encoding/json" + "time" +) + +const dateFormat = "2006-01-02" + +// DateTime wraps time.Time and adapts its JSON representation +// to conform to a RFC3339 date (e.g. 2006-01-02). +// +// Ref: https://ijmacd.github.io/rfc3339-iso8601 +type Date struct { + t *time.Time +} + +// NewDate returns a new *Date. If the given time.Time +// is nil, nil will be returned. +func NewDate(t time.Time) *Date { + return &Date{t: &t} +} + +// NewOptionalDate returns a new *Date. If the given time.Time +// is nil, nil will be returned. +func NewOptionalDate(t *time.Time) *Date { + if t == nil { + return nil + } + return &Date{t: t} +} + +// Time returns the Date's underlying time, if any. If the +// date is nil, the zero value is returned. +func (d *Date) Time() time.Time { + if d == nil || d.t == nil { + return time.Time{} + } + return *d.t +} + +// TimePtr returns a pointer to the Date's underlying time.Time, if any. +func (d *Date) TimePtr() *time.Time { + if d == nil || d.t == nil { + return nil + } + if d.t.IsZero() { + return nil + } + return d.t +} + +func (d *Date) MarshalJSON() ([]byte, error) { + if d == nil || d.t == nil { + return nil, nil + } + return json.Marshal(d.t.Format(dateFormat)) +} + +func (d *Date) UnmarshalJSON(data []byte) error { + var raw string + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + + parsedTime, err := time.Parse(dateFormat, raw) + if err != nil { + return err + } + + *d = Date{t: &parsedTime} + return nil +} + +// DateTime wraps time.Time and adapts its JSON representation +// to conform to a RFC3339 date-time (e.g. 2017-07-21T17:32:28Z). +// +// Ref: https://ijmacd.github.io/rfc3339-iso8601 +type DateTime struct { + t *time.Time +} + +// NewDateTime returns a new *DateTime. +func NewDateTime(t time.Time) *DateTime { + return &DateTime{t: &t} +} + +// NewOptionalDateTime returns a new *DateTime. If the given time.Time +// is nil, nil will be returned. +func NewOptionalDateTime(t *time.Time) *DateTime { + if t == nil { + return nil + } + return &DateTime{t: t} +} + +// Time returns the DateTime's underlying time, if any. If the +// date-time is nil, the zero value is returned. +func (d *DateTime) Time() time.Time { + if d == nil || d.t == nil { + return time.Time{} + } + return *d.t +} + +// TimePtr returns a pointer to the DateTime's underlying time.Time, if any. +func (d *DateTime) TimePtr() *time.Time { + if d == nil || d.t == nil { + return nil + } + if d.t.IsZero() { + return nil + } + return d.t +} + +func (d *DateTime) MarshalJSON() ([]byte, error) { + if d == nil || d.t == nil { + return nil, nil + } + return json.Marshal(d.t.Format(time.RFC3339)) +} + +func (d *DateTime) UnmarshalJSON(data []byte) error { + var raw string + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + + parsedTime, err := time.Parse(time.RFC3339, raw) + if err != nil { + return err + } + + *d = DateTime{t: &parsedTime} + return nil +} diff --git a/seed/go-fiber/websocket/go.mod b/seed/go-fiber/websocket/go.mod new file mode 100644 index 00000000000..b97b2544492 --- /dev/null +++ b/seed/go-fiber/websocket/go.mod @@ -0,0 +1,3 @@ +module github.com/websocket/fern + +go 1.13 diff --git a/seed/go-fiber/websocket/go.sum b/seed/go-fiber/websocket/go.sum new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/go-fiber/websocket/snippet.json b/seed/go-fiber/websocket/snippet.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/go-model/seed.yml b/seed/go-model/seed.yml index efadc0f1364..c789eb303ef 100644 --- a/seed/go-model/seed.yml +++ b/seed/go-model/seed.yml @@ -1,4 +1,4 @@ -irVersion: v33 +irVersion: v35 docker: fernapi/fern-go-model:latest dockerCommand: docker build -f ./generators/go/docker/Dockerfile.model -t fernapi/fern-go-model:latest ./generators/go language: go @@ -28,4 +28,3 @@ allowedFailures: - exhaustive - reserved-keywords - trace - - websocket diff --git a/seed/go-model/websocket/.github/workflows/ci.yml b/seed/go-model/websocket/.github/workflows/ci.yml new file mode 100644 index 00000000000..d4c0a5dcd95 --- /dev/null +++ b/seed/go-model/websocket/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci + +on: [push] + +jobs: + compile: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up go + uses: actions/setup-go@v4 + + - name: Compile + run: go build ./... + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up go + uses: actions/setup-go@v4 + + - name: Test + run: go test ./... diff --git a/seed/go-model/websocket/core/stringer.go b/seed/go-model/websocket/core/stringer.go new file mode 100644 index 00000000000..000cf448641 --- /dev/null +++ b/seed/go-model/websocket/core/stringer.go @@ -0,0 +1,13 @@ +package core + +import "encoding/json" + +// StringifyJSON returns a pretty JSON string representation of +// the given value. +func StringifyJSON(value interface{}) (string, error) { + bytes, err := json.MarshalIndent(value, "", " ") + if err != nil { + return "", err + } + return string(bytes), nil +} diff --git a/seed/go-model/websocket/core/time.go b/seed/go-model/websocket/core/time.go new file mode 100644 index 00000000000..d009ab30c90 --- /dev/null +++ b/seed/go-model/websocket/core/time.go @@ -0,0 +1,137 @@ +package core + +import ( + "encoding/json" + "time" +) + +const dateFormat = "2006-01-02" + +// DateTime wraps time.Time and adapts its JSON representation +// to conform to a RFC3339 date (e.g. 2006-01-02). +// +// Ref: https://ijmacd.github.io/rfc3339-iso8601 +type Date struct { + t *time.Time +} + +// NewDate returns a new *Date. If the given time.Time +// is nil, nil will be returned. +func NewDate(t time.Time) *Date { + return &Date{t: &t} +} + +// NewOptionalDate returns a new *Date. If the given time.Time +// is nil, nil will be returned. +func NewOptionalDate(t *time.Time) *Date { + if t == nil { + return nil + } + return &Date{t: t} +} + +// Time returns the Date's underlying time, if any. If the +// date is nil, the zero value is returned. +func (d *Date) Time() time.Time { + if d == nil || d.t == nil { + return time.Time{} + } + return *d.t +} + +// TimePtr returns a pointer to the Date's underlying time.Time, if any. +func (d *Date) TimePtr() *time.Time { + if d == nil || d.t == nil { + return nil + } + if d.t.IsZero() { + return nil + } + return d.t +} + +func (d *Date) MarshalJSON() ([]byte, error) { + if d == nil || d.t == nil { + return nil, nil + } + return json.Marshal(d.t.Format(dateFormat)) +} + +func (d *Date) UnmarshalJSON(data []byte) error { + var raw string + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + + parsedTime, err := time.Parse(dateFormat, raw) + if err != nil { + return err + } + + *d = Date{t: &parsedTime} + return nil +} + +// DateTime wraps time.Time and adapts its JSON representation +// to conform to a RFC3339 date-time (e.g. 2017-07-21T17:32:28Z). +// +// Ref: https://ijmacd.github.io/rfc3339-iso8601 +type DateTime struct { + t *time.Time +} + +// NewDateTime returns a new *DateTime. +func NewDateTime(t time.Time) *DateTime { + return &DateTime{t: &t} +} + +// NewOptionalDateTime returns a new *DateTime. If the given time.Time +// is nil, nil will be returned. +func NewOptionalDateTime(t *time.Time) *DateTime { + if t == nil { + return nil + } + return &DateTime{t: t} +} + +// Time returns the DateTime's underlying time, if any. If the +// date-time is nil, the zero value is returned. +func (d *DateTime) Time() time.Time { + if d == nil || d.t == nil { + return time.Time{} + } + return *d.t +} + +// TimePtr returns a pointer to the DateTime's underlying time.Time, if any. +func (d *DateTime) TimePtr() *time.Time { + if d == nil || d.t == nil { + return nil + } + if d.t.IsZero() { + return nil + } + return d.t +} + +func (d *DateTime) MarshalJSON() ([]byte, error) { + if d == nil || d.t == nil { + return nil, nil + } + return json.Marshal(d.t.Format(time.RFC3339)) +} + +func (d *DateTime) UnmarshalJSON(data []byte) error { + var raw string + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + + parsedTime, err := time.Parse(time.RFC3339, raw) + if err != nil { + return err + } + + *d = DateTime{t: &parsedTime} + return nil +} diff --git a/seed/go-model/websocket/go.mod b/seed/go-model/websocket/go.mod new file mode 100644 index 00000000000..b97b2544492 --- /dev/null +++ b/seed/go-model/websocket/go.mod @@ -0,0 +1,3 @@ +module github.com/websocket/fern + +go 1.13 diff --git a/seed/go-model/websocket/go.sum b/seed/go-model/websocket/go.sum new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/go-model/websocket/snippet.json b/seed/go-model/websocket/snippet.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/seed/go-sdk/file-upload/service/client.go b/seed/go-sdk/file-upload/service/client.go index 8f56c00b007..11fcb3d7c31 100644 --- a/seed/go-sdk/file-upload/service/client.go +++ b/seed/go-sdk/file-upload/service/client.go @@ -37,9 +37,9 @@ func NewClient(opts ...option.RequestOption) *Client { func (c *Client) Post( ctx context.Context, file io.Reader, - fileList io.Reader, + fileList []io.Reader, maybeFile io.Reader, - maybeFileList io.Reader, + maybeFileList []io.Reader, request *fern.MyRequest, opts ...option.RequestOption, ) error { @@ -69,16 +69,18 @@ func (c *Client) Post( if _, err := io.Copy(filePart, file); err != nil { return err } - fileListFilename := "fileList_filename" - if named, ok := fileList.(interface{ Name() string }); ok { - fileListFilename = named.Name() - } - fileListPart, err := writer.CreateFormFile("fileList", fileListFilename) - if err != nil { - return err - } - if _, err := io.Copy(fileListPart, fileList); err != nil { - return err + for i, f := range fileList { + fileListFilename := fmt.Sprintf("fileList_filename_%d", i) + if named, ok := f.(interface{ Name() string }); ok { + fileListFilename = named.Name() + } + fileListPart, err := writer.CreateFormFile("fileList", fileListFilename) + if err != nil { + return err + } + if _, err := io.Copy(fileListPart, f); err != nil { + return err + } } if maybeFile != nil { maybeFileFilename := "maybeFile_filename" @@ -93,16 +95,16 @@ func (c *Client) Post( return err } } - if maybeFileList != nil { - maybeFileListFilename := "maybeFileList_filename" - if named, ok := maybeFileList.(interface{ Name() string }); ok { + for i, f := range maybeFileList { + maybeFileListFilename := fmt.Sprintf("maybeFileList_filename_%d", i) + if named, ok := f.(interface{ Name() string }); ok { maybeFileListFilename = named.Name() } maybeFileListPart, err := writer.CreateFormFile("maybeFileList", maybeFileListFilename) if err != nil { return err } - if _, err := io.Copy(maybeFileListPart, maybeFileList); err != nil { + if _, err := io.Copy(maybeFileListPart, f); err != nil { return err } } diff --git a/seed/go-sdk/seed.yml b/seed/go-sdk/seed.yml index 9dd4972495a..7aa2631a9eb 100644 --- a/seed/go-sdk/seed.yml +++ b/seed/go-sdk/seed.yml @@ -1,4 +1,4 @@ -irVersion: v33 +irVersion: v35 docker: fernapi/fern-go-sdk:latest dockerCommand: docker build -f ./generators/go/docker/Dockerfile.sdk -t fernapi/fern-go-sdk:latest ./generators/go language: go @@ -28,4 +28,3 @@ allowedFailures: - exhaustive - reserved-keywords - trace - - websocket diff --git a/seed/go-sdk/websocket/.github/workflows/ci.yml b/seed/go-sdk/websocket/.github/workflows/ci.yml new file mode 100644 index 00000000000..d4c0a5dcd95 --- /dev/null +++ b/seed/go-sdk/websocket/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci + +on: [push] + +jobs: + compile: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up go + uses: actions/setup-go@v4 + + - name: Compile + run: go build ./... + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up go + uses: actions/setup-go@v4 + + - name: Test + run: go test ./... diff --git a/seed/go-sdk/websocket/client/client.go b/seed/go-sdk/websocket/client/client.go new file mode 100644 index 00000000000..7986e2c89e5 --- /dev/null +++ b/seed/go-sdk/websocket/client/client.go @@ -0,0 +1,29 @@ +// This file was auto-generated by Fern from our API Definition. + +package client + +import ( + core "github.com/websocket/fern/core" + option "github.com/websocket/fern/option" + http "net/http" +) + +type Client struct { + baseURL string + caller *core.Caller + header http.Header +} + +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) + return &Client{ + baseURL: options.BaseURL, + caller: core.NewCaller( + &core.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), + } +} diff --git a/seed/go-sdk/websocket/client/client_test.go b/seed/go-sdk/websocket/client/client_test.go new file mode 100644 index 00000000000..85388a03523 --- /dev/null +++ b/seed/go-sdk/websocket/client/client_test.go @@ -0,0 +1,45 @@ +// This file was auto-generated by Fern from our API Definition. + +package client + +import ( + assert "github.com/stretchr/testify/assert" + option "github.com/websocket/fern/option" + http "net/http" + testing "testing" + time "time" +) + +func TestNewClient(t *testing.T) { + t.Run("default", func(t *testing.T) { + c := NewClient() + assert.Empty(t, c.baseURL) + }) + + t.Run("base url", func(t *testing.T) { + c := NewClient( + option.WithBaseURL("test.co"), + ) + assert.Equal(t, "test.co", c.baseURL) + }) + + t.Run("http client", func(t *testing.T) { + httpClient := &http.Client{ + Timeout: 5 * time.Second, + } + c := NewClient( + option.WithHTTPClient(httpClient), + ) + assert.Empty(t, c.baseURL) + }) + + t.Run("http header", func(t *testing.T) { + header := make(http.Header) + header.Set("X-API-Tenancy", "test") + c := NewClient( + option.WithHTTPHeader(header), + ) + assert.Empty(t, c.baseURL) + assert.Equal(t, "test", c.header.Get("X-API-Tenancy")) + }) +} diff --git a/seed/go-sdk/websocket/core/core.go b/seed/go-sdk/websocket/core/core.go new file mode 100644 index 00000000000..5277d138d27 --- /dev/null +++ b/seed/go-sdk/websocket/core/core.go @@ -0,0 +1,269 @@ +package core + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "mime/multipart" + "net/http" +) + +const ( + // contentType specifies the JSON Content-Type header value. + contentType = "application/json" + contentTypeHeader = "Content-Type" +) + +// HTTPClient is an interface for a subset of the *http.Client. +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// MergeHeaders merges the given headers together, where the right +// takes precedence over the left. +func MergeHeaders(left, right http.Header) http.Header { + for key, values := range right { + if len(values) > 1 { + left[key] = values + continue + } + if value := right.Get(key); value != "" { + left.Set(key, value) + } + } + return left +} + +// WriteMultipartJSON writes the given value as a JSON part. +// This is used to serialize non-primitive multipart properties +// (i.e. lists, objects, etc). +func WriteMultipartJSON(writer *multipart.Writer, field string, value interface{}) error { + bytes, err := json.Marshal(value) + if err != nil { + return err + } + return writer.WriteField(field, string(bytes)) +} + +// APIError is a lightweight wrapper around the standard error +// interface that preserves the status code from the RPC, if any. +type APIError struct { + err error + + StatusCode int `json:"-"` +} + +// NewAPIError constructs a new API error. +func NewAPIError(statusCode int, err error) *APIError { + return &APIError{ + err: err, + StatusCode: statusCode, + } +} + +// Unwrap returns the underlying error. This also makes the error compatible +// with errors.As and errors.Is. +func (a *APIError) Unwrap() error { + if a == nil { + return nil + } + return a.err +} + +// Error returns the API error's message. +func (a *APIError) Error() string { + if a == nil || (a.err == nil && a.StatusCode == 0) { + return "" + } + if a.err == nil { + return fmt.Sprintf("%d", a.StatusCode) + } + if a.StatusCode == 0 { + return a.err.Error() + } + return fmt.Sprintf("%d: %s", a.StatusCode, a.err.Error()) +} + +// ErrorDecoder decodes *http.Response errors and returns a +// typed API error (e.g. *APIError). +type ErrorDecoder func(statusCode int, body io.Reader) error + +// Caller calls APIs and deserializes their response, if any. +type Caller struct { + client HTTPClient + retrier *Retrier +} + +// CallerParams represents the parameters used to constrcut a new *Caller. +type CallerParams struct { + Client HTTPClient + MaxAttempts uint +} + +// NewCaller returns a new *Caller backed by the given parameters. +func NewCaller(params *CallerParams) *Caller { + var httpClient HTTPClient = http.DefaultClient + if params.Client != nil { + httpClient = params.Client + } + var retryOptions []RetryOption + if params.MaxAttempts > 0 { + retryOptions = append(retryOptions, WithMaxAttempts(params.MaxAttempts)) + } + return &Caller{ + client: httpClient, + retrier: NewRetrier(retryOptions...), + } +} + +// CallParams represents the parameters used to issue an API call. +type CallParams struct { + URL string + Method string + MaxAttempts uint + Headers http.Header + Client HTTPClient + Request interface{} + Response interface{} + ResponseIsOptional bool + ErrorDecoder ErrorDecoder +} + +// Call issues an API call according to the given call parameters. +func (c *Caller) Call(ctx context.Context, params *CallParams) error { + req, err := newRequest(ctx, params.URL, params.Method, params.Headers, params.Request) + if err != nil { + return err + } + + // If the call has been cancelled, don't issue the request. + if err := ctx.Err(); err != nil { + return err + } + + client := c.client + if params.Client != nil { + // Use the HTTP client scoped to the request. + client = params.Client + } + + var retryOptions []RetryOption + if params.MaxAttempts > 0 { + retryOptions = append(retryOptions, WithMaxAttempts(params.MaxAttempts)) + } + + resp, err := c.retrier.Run( + client.Do, + req, + params.ErrorDecoder, + retryOptions..., + ) + if err != nil { + return err + } + + // Close the response body after we're done. + defer resp.Body.Close() + + // Check if the call was cancelled before we return the error + // associated with the call and/or unmarshal the response data. + if err := ctx.Err(); err != nil { + return err + } + + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + return decodeError(resp, params.ErrorDecoder) + } + + // Mutate the response parameter in-place. + if params.Response != nil { + if writer, ok := params.Response.(io.Writer); ok { + _, err = io.Copy(writer, resp.Body) + } else { + err = json.NewDecoder(resp.Body).Decode(params.Response) + } + if err != nil { + if err == io.EOF { + if params.ResponseIsOptional { + // The response is optional, so we should ignore the + // io.EOF error + return nil + } + return fmt.Errorf("expected a %T response, but the server responded with nothing", params.Response) + } + return err + } + } + + return nil +} + +// newRequest returns a new *http.Request with all of the fields +// required to issue the call. +func newRequest( + ctx context.Context, + url string, + method string, + endpointHeaders http.Header, + request interface{}, +) (*http.Request, error) { + requestBody, err := newRequestBody(request) + if err != nil { + return nil, err + } + req, err := http.NewRequestWithContext(ctx, method, url, requestBody) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + req.Header.Set(contentTypeHeader, contentType) + for name, values := range endpointHeaders { + req.Header[name] = values + } + return req, nil +} + +// newRequestBody returns a new io.Reader that represents the HTTP request body. +func newRequestBody(request interface{}) (io.Reader, error) { + var requestBody io.Reader + if request != nil { + if body, ok := request.(io.Reader); ok { + requestBody = body + } else { + requestBytes, err := json.Marshal(request) + if err != nil { + return nil, err + } + requestBody = bytes.NewReader(requestBytes) + } + } + return requestBody, nil +} + +// decodeError decodes the error from the given HTTP response. Note that +// it's the caller's responsibility to close the response body. +func decodeError(response *http.Response, errorDecoder ErrorDecoder) error { + if errorDecoder != nil { + // This endpoint has custom errors, so we'll + // attempt to unmarshal the error into a structured + // type based on the status code. + return errorDecoder(response.StatusCode, response.Body) + } + // This endpoint doesn't have any custom error + // types, so we just read the body as-is, and + // put it into a normal error. + bytes, err := io.ReadAll(response.Body) + if err != nil && err != io.EOF { + return err + } + if err == io.EOF { + // The error didn't have a response body, + // so all we can do is return an error + // with the status code. + return NewAPIError(response.StatusCode, nil) + } + return NewAPIError(response.StatusCode, errors.New(string(bytes))) +} diff --git a/seed/go-sdk/websocket/core/core_test.go b/seed/go-sdk/websocket/core/core_test.go new file mode 100644 index 00000000000..f476f9ee383 --- /dev/null +++ b/seed/go-sdk/websocket/core/core_test.go @@ -0,0 +1,284 @@ +package core + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/http/httptest" + "strconv" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// TestCase represents a single test case. +type TestCase struct { + description string + + // Server-side assertions. + giveMethod string + giveResponseIsOptional bool + giveHeader http.Header + giveErrorDecoder ErrorDecoder + giveRequest *Request + + // Client-side assertions. + wantResponse *Response + wantError error +} + +// Request a simple request body. +type Request struct { + Id string `json:"id"` +} + +// Response a simple response body. +type Response struct { + Id string `json:"id"` +} + +// NotFoundError represents a 404. +type NotFoundError struct { + *APIError + + Message string `json:"message"` +} + +func TestCall(t *testing.T) { + tests := []*TestCase{ + { + description: "GET success", + giveMethod: http.MethodGet, + giveHeader: http.Header{ + "X-API-Status": []string{"success"}, + }, + giveRequest: &Request{ + Id: "123", + }, + wantResponse: &Response{ + Id: "123", + }, + }, + { + description: "GET not found", + giveMethod: http.MethodGet, + giveHeader: http.Header{ + "X-API-Status": []string{"fail"}, + }, + giveRequest: &Request{ + Id: strconv.Itoa(http.StatusNotFound), + }, + giveErrorDecoder: newTestErrorDecoder(t), + wantError: &NotFoundError{ + APIError: NewAPIError( + http.StatusNotFound, + errors.New(`{"message":"ID \"404\" not found"}`), + ), + }, + }, + { + description: "POST optional response", + giveMethod: http.MethodPost, + giveHeader: http.Header{ + "X-API-Status": []string{"success"}, + }, + giveRequest: &Request{ + Id: "123", + }, + giveResponseIsOptional: true, + }, + { + description: "POST API error", + giveMethod: http.MethodPost, + giveHeader: http.Header{ + "X-API-Status": []string{"fail"}, + }, + giveRequest: &Request{ + Id: strconv.Itoa(http.StatusInternalServerError), + }, + wantError: NewAPIError( + http.StatusInternalServerError, + errors.New("failed to process request"), + ), + }, + } + for _, test := range tests { + t.Run(test.description, func(t *testing.T) { + var ( + server = newTestServer(t, test) + client = server.Client() + ) + caller := NewCaller( + &CallerParams{ + Client: client, + }, + ) + var response *Response + err := caller.Call( + context.Background(), + &CallParams{ + URL: server.URL, + Method: test.giveMethod, + Headers: test.giveHeader, + Request: test.giveRequest, + Response: &response, + ResponseIsOptional: test.giveResponseIsOptional, + ErrorDecoder: test.giveErrorDecoder, + }, + ) + if test.wantError != nil { + assert.EqualError(t, err, test.wantError.Error()) + return + } + require.NoError(t, err) + assert.Equal(t, test.wantResponse, response) + }) + } +} + +func TestMergeHeaders(t *testing.T) { + t.Run("both empty", func(t *testing.T) { + merged := MergeHeaders(make(http.Header), make(http.Header)) + assert.Empty(t, merged) + }) + + t.Run("empty left", func(t *testing.T) { + left := make(http.Header) + + right := make(http.Header) + right.Set("X-API-Version", "0.0.1") + + merged := MergeHeaders(left, right) + assert.Equal(t, "0.0.1", merged.Get("X-API-Version")) + }) + + t.Run("empty right", func(t *testing.T) { + left := make(http.Header) + left.Set("X-API-Version", "0.0.1") + + right := make(http.Header) + + merged := MergeHeaders(left, right) + assert.Equal(t, "0.0.1", merged.Get("X-API-Version")) + }) + + t.Run("single value override", func(t *testing.T) { + left := make(http.Header) + left.Set("X-API-Version", "0.0.0") + + right := make(http.Header) + right.Set("X-API-Version", "0.0.1") + + merged := MergeHeaders(left, right) + assert.Equal(t, []string{"0.0.1"}, merged.Values("X-API-Version")) + }) + + t.Run("multiple value override", func(t *testing.T) { + left := make(http.Header) + left.Set("X-API-Versions", "0.0.0") + + right := make(http.Header) + right.Add("X-API-Versions", "0.0.1") + right.Add("X-API-Versions", "0.0.2") + + merged := MergeHeaders(left, right) + assert.Equal(t, []string{"0.0.1", "0.0.2"}, merged.Values("X-API-Versions")) + }) + + t.Run("disjoint merge", func(t *testing.T) { + left := make(http.Header) + left.Set("X-API-Tenancy", "test") + + right := make(http.Header) + right.Set("X-API-Version", "0.0.1") + + merged := MergeHeaders(left, right) + assert.Equal(t, []string{"test"}, merged.Values("X-API-Tenancy")) + assert.Equal(t, []string{"0.0.1"}, merged.Values("X-API-Version")) + }) +} + +// newTestServer returns a new *httptest.Server configured with the +// given test parameters. +func newTestServer(t *testing.T, tc *TestCase) *httptest.Server { + return httptest.NewServer( + http.HandlerFunc( + func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, tc.giveMethod, r.Method) + assert.Equal(t, contentType, r.Header.Get(contentTypeHeader)) + for header, value := range tc.giveHeader { + assert.Equal(t, value, r.Header.Values(header)) + } + + bytes, err := io.ReadAll(r.Body) + require.NoError(t, err) + + request := new(Request) + require.NoError(t, json.Unmarshal(bytes, request)) + + switch request.Id { + case strconv.Itoa(http.StatusNotFound): + notFoundError := &NotFoundError{ + APIError: &APIError{ + StatusCode: http.StatusNotFound, + }, + Message: fmt.Sprintf("ID %q not found", request.Id), + } + bytes, err = json.Marshal(notFoundError) + require.NoError(t, err) + + w.WriteHeader(http.StatusNotFound) + _, err = w.Write(bytes) + require.NoError(t, err) + return + + case strconv.Itoa(http.StatusInternalServerError): + w.WriteHeader(http.StatusInternalServerError) + _, err = w.Write([]byte("failed to process request")) + require.NoError(t, err) + return + } + + if tc.giveResponseIsOptional { + w.WriteHeader(http.StatusOK) + return + } + + response := &Response{ + Id: request.Id, + } + bytes, err = json.Marshal(response) + require.NoError(t, err) + + _, err = w.Write(bytes) + require.NoError(t, err) + }, + ), + ) +} + +// newTestErrorDecoder returns an error decoder suitable for tests. +func newTestErrorDecoder(t *testing.T) func(int, io.Reader) error { + return func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + require.NoError(t, err) + + var ( + apiError = NewAPIError(statusCode, errors.New(string(raw))) + decoder = json.NewDecoder(bytes.NewReader(raw)) + ) + if statusCode == http.StatusNotFound { + value := new(NotFoundError) + value.APIError = apiError + require.NoError(t, decoder.Decode(value)) + + return value + } + return apiError + } +} diff --git a/seed/go-sdk/websocket/core/query.go b/seed/go-sdk/websocket/core/query.go new file mode 100644 index 00000000000..479cbb24d18 --- /dev/null +++ b/seed/go-sdk/websocket/core/query.go @@ -0,0 +1,219 @@ +package core + +import ( + "encoding/base64" + "fmt" + "net/url" + "reflect" + "strings" + "time" + + "github.com/google/uuid" +) + +var ( + bytesType = reflect.TypeOf([]byte{}) + queryEncoderType = reflect.TypeOf(new(QueryEncoder)).Elem() + timeType = reflect.TypeOf(time.Time{}) + uuidType = reflect.TypeOf(uuid.UUID{}) +) + +// QueryEncoder is an interface implemented by any type that wishes to encode +// itself into URL values in a non-standard way. +type QueryEncoder interface { + EncodeQueryValues(key string, v *url.Values) error +} + +// QueryValues encodes url.Values from request objects. +// +// Note: This type is inspired by Google's query encoding library, but +// supports far less customization and is tailored to fit this SDK's use case. +// +// Ref: https://github.com/google/go-querystring +func QueryValues(v interface{}) (url.Values, error) { + values := make(url.Values) + val := reflect.ValueOf(v) + for val.Kind() == reflect.Ptr { + if val.IsNil() { + return values, nil + } + val = val.Elem() + } + + if v == nil { + return values, nil + } + + if val.Kind() != reflect.Struct { + return nil, fmt.Errorf("query: Values() expects struct input. Got %v", val.Kind()) + } + + err := reflectValue(values, val, "") + return values, err +} + +// reflectValue populates the values parameter from the struct fields in val. +// Embedded structs are followed recursively (using the rules defined in the +// Values function documentation) breadth-first. +func reflectValue(values url.Values, val reflect.Value, scope string) error { + typ := val.Type() + for i := 0; i < typ.NumField(); i++ { + sf := typ.Field(i) + if sf.PkgPath != "" && !sf.Anonymous { + // Skip unexported fields. + continue + } + + sv := val.Field(i) + tag := sf.Tag.Get("url") + if tag == "" || tag == "-" { + continue + } + + name, opts := parseTag(tag) + if name == "" { + name = sf.Name + } + + if scope != "" { + name = scope + "[" + name + "]" + } + + if opts.Contains("omitempty") && isEmptyValue(sv) { + continue + } + + if sv.Type().Implements(queryEncoderType) { + // If sv is a nil pointer and the custom encoder is defined on a non-pointer + // method receiver, set sv to the zero value of the underlying type + if !reflect.Indirect(sv).IsValid() && sv.Type().Elem().Implements(queryEncoderType) { + sv = reflect.New(sv.Type().Elem()) + } + + m := sv.Interface().(QueryEncoder) + if err := m.EncodeQueryValues(name, &values); err != nil { + return err + } + continue + } + + // Recursively dereference pointers, but stop at nil pointers. + for sv.Kind() == reflect.Ptr { + if sv.IsNil() { + break + } + sv = sv.Elem() + } + + if sv.Type() == uuidType || sv.Type() == bytesType || sv.Type() == timeType { + values.Add(name, valueString(sv, opts, sf)) + continue + } + + if sv.Kind() == reflect.Slice || sv.Kind() == reflect.Array { + if sv.Len() == 0 { + // Skip if slice or array is empty. + continue + } + for i := 0; i < sv.Len(); i++ { + values.Add(name, valueString(sv.Index(i), opts, sf)) + } + continue + } + + if sv.Kind() == reflect.Struct { + if err := reflectValue(values, sv, name); err != nil { + return err + } + continue + } + + values.Add(name, valueString(sv, opts, sf)) + } + + return nil +} + +// valueString returns the string representation of a value. +func valueString(v reflect.Value, opts tagOptions, sf reflect.StructField) string { + for v.Kind() == reflect.Ptr { + if v.IsNil() { + return "" + } + v = v.Elem() + } + + if v.Type() == timeType { + t := v.Interface().(time.Time) + if format := sf.Tag.Get("format"); format == "date" { + return t.Format("2006-01-02") + } + return t.Format(time.RFC3339) + } + + if v.Type() == uuidType { + u := v.Interface().(uuid.UUID) + return u.String() + } + + if v.Type() == bytesType { + b := v.Interface().([]byte) + return base64.StdEncoding.EncodeToString(b) + } + + return fmt.Sprint(v.Interface()) +} + +// isEmptyValue checks if a value should be considered empty for the purposes +// of omitting fields with the "omitempty" option. +func isEmptyValue(v reflect.Value) bool { + type zeroable interface { + IsZero() bool + } + + if !v.IsNil() { + if z, ok := v.Interface().(zeroable); ok { + return z.IsZero() + } + } + + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflect.Invalid, reflect.Complex64, reflect.Complex128, reflect.Chan, reflect.Func, reflect.Struct, reflect.UnsafePointer: + return false + } + + return false +} + +// tagOptions is the string following a comma in a struct field's "url" tag, or +// the empty string. It does not include the leading comma. +type tagOptions []string + +// parseTag splits a struct field's url tag into its name and comma-separated +// options. +func parseTag(tag string) (string, tagOptions) { + s := strings.Split(tag, ",") + return s[0], s[1:] +} + +// Contains checks whether the tagOptions contains the specified option. +func (o tagOptions) Contains(option string) bool { + for _, s := range o { + if s == option { + return true + } + } + return false +} diff --git a/seed/go-sdk/websocket/core/query_test.go b/seed/go-sdk/websocket/core/query_test.go new file mode 100644 index 00000000000..4f0d39284f4 --- /dev/null +++ b/seed/go-sdk/websocket/core/query_test.go @@ -0,0 +1,146 @@ +package core + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestQueryValues(t *testing.T) { + t.Run("empty optional", func(t *testing.T) { + type nested struct { + Value *string `json:"value,omitempty" url:"value,omitempty"` + } + type example struct { + Nested *nested `json:"nested,omitempty" url:"nested,omitempty"` + } + + values, err := QueryValues(&example{}) + require.NoError(t, err) + assert.Empty(t, values) + }) + + t.Run("empty required", func(t *testing.T) { + type nested struct { + Value *string `json:"value,omitempty" url:"value,omitempty"` + } + type example struct { + Required string `json:"required" url:"required"` + Nested *nested `json:"nested,omitempty" url:"nested,omitempty"` + } + + values, err := QueryValues(&example{}) + require.NoError(t, err) + assert.Equal(t, "required=", values.Encode()) + }) + + t.Run("allow multiple", func(t *testing.T) { + type example struct { + Values []string `json:"values" url:"values"` + } + + values, err := QueryValues( + &example{ + Values: []string{"foo", "bar", "baz"}, + }, + ) + require.NoError(t, err) + assert.Equal(t, "values=foo&values=bar&values=baz", values.Encode()) + }) + + t.Run("nested object", func(t *testing.T) { + type nested struct { + Value *string `json:"value,omitempty" url:"value,omitempty"` + } + type example struct { + Required string `json:"required" url:"required"` + Nested *nested `json:"nested,omitempty" url:"nested,omitempty"` + } + + nestedValue := "nestedValue" + values, err := QueryValues( + &example{ + Required: "requiredValue", + Nested: &nested{ + Value: &nestedValue, + }, + }, + ) + require.NoError(t, err) + assert.Equal(t, "nested%5Bvalue%5D=nestedValue&required=requiredValue", values.Encode()) + }) + + t.Run("url unspecified", func(t *testing.T) { + type example struct { + Required string `json:"required" url:"required"` + NotFound string `json:"notFound"` + } + + values, err := QueryValues( + &example{ + Required: "requiredValue", + NotFound: "notFound", + }, + ) + require.NoError(t, err) + assert.Equal(t, "required=requiredValue", values.Encode()) + }) + + t.Run("url ignored", func(t *testing.T) { + type example struct { + Required string `json:"required" url:"required"` + NotFound string `json:"notFound" url:"-"` + } + + values, err := QueryValues( + &example{ + Required: "requiredValue", + NotFound: "notFound", + }, + ) + require.NoError(t, err) + assert.Equal(t, "required=requiredValue", values.Encode()) + }) + + t.Run("datetime", func(t *testing.T) { + type example struct { + DateTime time.Time `json:"dateTime" url:"dateTime"` + } + + values, err := QueryValues( + &example{ + DateTime: time.Date(1994, 3, 16, 12, 34, 56, 0, time.UTC), + }, + ) + require.NoError(t, err) + assert.Equal(t, "dateTime=1994-03-16T12%3A34%3A56Z", values.Encode()) + }) + + t.Run("date", func(t *testing.T) { + type example struct { + Date time.Time `json:"date" url:"date" format:"date"` + } + + values, err := QueryValues( + &example{ + Date: time.Date(1994, 3, 16, 12, 34, 56, 0, time.UTC), + }, + ) + require.NoError(t, err) + assert.Equal(t, "date=1994-03-16", values.Encode()) + }) + + t.Run("optional time", func(t *testing.T) { + type example struct { + Date *time.Time `json:"date,omitempty" url:"date,omitempty" format:"date"` + } + + values, err := QueryValues( + &example{}, + ) + require.NoError(t, err) + assert.Empty(t, values.Encode()) + }) +} diff --git a/seed/go-sdk/websocket/core/request_option.go b/seed/go-sdk/websocket/core/request_option.go new file mode 100644 index 00000000000..d46133eac0e --- /dev/null +++ b/seed/go-sdk/websocket/core/request_option.go @@ -0,0 +1,85 @@ +// This file was auto-generated by Fern from our API Definition. + +package core + +import ( + http "net/http" +) + +// RequestOption adapts the behavior of the client or an individual request. +type RequestOption interface { + applyRequestOptions(*RequestOptions) +} + +// RequestOptions defines all of the possible request options. +// +// This type is primarily used by the generated code and is not meant +// to be used directly; use the option package instead. +type RequestOptions struct { + BaseURL string + HTTPClient HTTPClient + HTTPHeader http.Header + MaxAttempts uint +} + +// NewRequestOptions returns a new *RequestOptions value. +// +// This function is primarily used by the generated code and is not meant +// to be used directly; use RequestOption instead. +func NewRequestOptions(opts ...RequestOption) *RequestOptions { + options := &RequestOptions{ + HTTPHeader: make(http.Header), + } + for _, opt := range opts { + opt.applyRequestOptions(options) + } + return options +} + +// ToHeader maps the configured request options into a http.Header used +// for the request(s). +func (r *RequestOptions) ToHeader() http.Header { return r.cloneHeader() } + +func (r *RequestOptions) cloneHeader() http.Header { + headers := r.HTTPHeader.Clone() + headers.Set("X-Fern-Language", "Go") + headers.Set("X-Fern-SDK-Name", "github.com/websocket/fern") + headers.Set("X-Fern-SDK-Version", "0.0.1") + return headers +} + +// BaseURLOption implements the RequestOption interface. +type BaseURLOption struct { + BaseURL string +} + +func (b *BaseURLOption) applyRequestOptions(opts *RequestOptions) { + opts.BaseURL = b.BaseURL +} + +// HTTPClientOption implements the RequestOption interface. +type HTTPClientOption struct { + HTTPClient HTTPClient +} + +func (h *HTTPClientOption) applyRequestOptions(opts *RequestOptions) { + opts.HTTPClient = h.HTTPClient +} + +// HTTPHeaderOption implements the RequestOption interface. +type HTTPHeaderOption struct { + HTTPHeader http.Header +} + +func (h *HTTPHeaderOption) applyRequestOptions(opts *RequestOptions) { + opts.HTTPHeader = h.HTTPHeader +} + +// MaxAttemptsOption implements the RequestOption interface. +type MaxAttemptsOption struct { + MaxAttempts uint +} + +func (m *MaxAttemptsOption) applyRequestOptions(opts *RequestOptions) { + opts.MaxAttempts = m.MaxAttempts +} diff --git a/seed/go-sdk/websocket/core/retrier.go b/seed/go-sdk/websocket/core/retrier.go new file mode 100644 index 00000000000..ea24916b786 --- /dev/null +++ b/seed/go-sdk/websocket/core/retrier.go @@ -0,0 +1,166 @@ +package core + +import ( + "crypto/rand" + "math/big" + "net/http" + "time" +) + +const ( + defaultRetryAttempts = 2 + minRetryDelay = 500 * time.Millisecond + maxRetryDelay = 5000 * time.Millisecond +) + +// RetryOption adapts the behavior the *Retrier. +type RetryOption func(*retryOptions) + +// RetryFunc is a retriable HTTP function call (i.e. *http.Client.Do). +type RetryFunc func(*http.Request) (*http.Response, error) + +// WithMaxAttempts configures the maximum number of attempts +// of the *Retrier. +func WithMaxAttempts(attempts uint) RetryOption { + return func(opts *retryOptions) { + opts.attempts = attempts + } +} + +// Retrier retries failed requests a configurable number of times with an +// exponential back-off between each retry. +type Retrier struct { + attempts uint +} + +// NewRetrier constructs a new *Retrier with the given options, if any. +func NewRetrier(opts ...RetryOption) *Retrier { + options := new(retryOptions) + for _, opt := range opts { + opt(options) + } + attempts := uint(defaultRetryAttempts) + if options.attempts > 0 { + attempts = options.attempts + } + return &Retrier{ + attempts: attempts, + } +} + +// Run issues the request and, upon failure, retries the request if possible. +// +// The request will be retried as long as the request is deemed retriable and the +// number of retry attempts has not grown larger than the configured retry limit. +func (r *Retrier) Run( + fn RetryFunc, + request *http.Request, + errorDecoder ErrorDecoder, + opts ...RetryOption, +) (*http.Response, error) { + options := new(retryOptions) + for _, opt := range opts { + opt(options) + } + maxRetryAttempts := r.attempts + if options.attempts > 0 { + maxRetryAttempts = options.attempts + } + var ( + retryAttempt uint + previousError error + ) + return r.run( + fn, + request, + errorDecoder, + maxRetryAttempts, + retryAttempt, + previousError, + ) +} + +func (r *Retrier) run( + fn RetryFunc, + request *http.Request, + errorDecoder ErrorDecoder, + maxRetryAttempts uint, + retryAttempt uint, + previousError error, +) (*http.Response, error) { + if retryAttempt >= maxRetryAttempts { + return nil, previousError + } + + // If the call has been cancelled, don't issue the request. + if err := request.Context().Err(); err != nil { + return nil, err + } + + response, err := fn(request) + if err != nil { + return nil, err + } + + if r.shouldRetry(response) { + defer response.Body.Close() + + delay, err := r.retryDelay(retryAttempt) + if err != nil { + return nil, err + } + + time.Sleep(delay) + + return r.run( + fn, + request, + errorDecoder, + maxRetryAttempts, + retryAttempt+1, + decodeError(response, errorDecoder), + ) + } + + return response, nil +} + +// shouldRetry returns true if the request should be retried based on the given +// response status code. +func (r *Retrier) shouldRetry(response *http.Response) bool { + return response.StatusCode == http.StatusTooManyRequests || + response.StatusCode == http.StatusRequestTimeout || + response.StatusCode == http.StatusConflict || + response.StatusCode >= http.StatusInternalServerError +} + +// retryDelay calculates the delay time in milliseconds based on the retry attempt. +func (r *Retrier) retryDelay(retryAttempt uint) (time.Duration, error) { + // Apply exponential backoff. + delay := minRetryDelay + minRetryDelay*time.Duration(retryAttempt*retryAttempt) + + // Do not allow the number to exceed maxRetryDelay. + if delay > maxRetryDelay { + delay = maxRetryDelay + } + + // Apply some itter by randomizing the value in the range of 75%-100%. + max := big.NewInt(int64(delay / 4)) + jitter, err := rand.Int(rand.Reader, max) + if err != nil { + return 0, err + } + + delay -= time.Duration(jitter.Int64()) + + // Never sleep less than the base sleep seconds. + if delay < minRetryDelay { + delay = minRetryDelay + } + + return delay, nil +} + +type retryOptions struct { + attempts uint +} diff --git a/seed/go-sdk/websocket/core/stringer.go b/seed/go-sdk/websocket/core/stringer.go new file mode 100644 index 00000000000..000cf448641 --- /dev/null +++ b/seed/go-sdk/websocket/core/stringer.go @@ -0,0 +1,13 @@ +package core + +import "encoding/json" + +// StringifyJSON returns a pretty JSON string representation of +// the given value. +func StringifyJSON(value interface{}) (string, error) { + bytes, err := json.MarshalIndent(value, "", " ") + if err != nil { + return "", err + } + return string(bytes), nil +} diff --git a/seed/go-sdk/websocket/core/time.go b/seed/go-sdk/websocket/core/time.go new file mode 100644 index 00000000000..d009ab30c90 --- /dev/null +++ b/seed/go-sdk/websocket/core/time.go @@ -0,0 +1,137 @@ +package core + +import ( + "encoding/json" + "time" +) + +const dateFormat = "2006-01-02" + +// DateTime wraps time.Time and adapts its JSON representation +// to conform to a RFC3339 date (e.g. 2006-01-02). +// +// Ref: https://ijmacd.github.io/rfc3339-iso8601 +type Date struct { + t *time.Time +} + +// NewDate returns a new *Date. If the given time.Time +// is nil, nil will be returned. +func NewDate(t time.Time) *Date { + return &Date{t: &t} +} + +// NewOptionalDate returns a new *Date. If the given time.Time +// is nil, nil will be returned. +func NewOptionalDate(t *time.Time) *Date { + if t == nil { + return nil + } + return &Date{t: t} +} + +// Time returns the Date's underlying time, if any. If the +// date is nil, the zero value is returned. +func (d *Date) Time() time.Time { + if d == nil || d.t == nil { + return time.Time{} + } + return *d.t +} + +// TimePtr returns a pointer to the Date's underlying time.Time, if any. +func (d *Date) TimePtr() *time.Time { + if d == nil || d.t == nil { + return nil + } + if d.t.IsZero() { + return nil + } + return d.t +} + +func (d *Date) MarshalJSON() ([]byte, error) { + if d == nil || d.t == nil { + return nil, nil + } + return json.Marshal(d.t.Format(dateFormat)) +} + +func (d *Date) UnmarshalJSON(data []byte) error { + var raw string + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + + parsedTime, err := time.Parse(dateFormat, raw) + if err != nil { + return err + } + + *d = Date{t: &parsedTime} + return nil +} + +// DateTime wraps time.Time and adapts its JSON representation +// to conform to a RFC3339 date-time (e.g. 2017-07-21T17:32:28Z). +// +// Ref: https://ijmacd.github.io/rfc3339-iso8601 +type DateTime struct { + t *time.Time +} + +// NewDateTime returns a new *DateTime. +func NewDateTime(t time.Time) *DateTime { + return &DateTime{t: &t} +} + +// NewOptionalDateTime returns a new *DateTime. If the given time.Time +// is nil, nil will be returned. +func NewOptionalDateTime(t *time.Time) *DateTime { + if t == nil { + return nil + } + return &DateTime{t: t} +} + +// Time returns the DateTime's underlying time, if any. If the +// date-time is nil, the zero value is returned. +func (d *DateTime) Time() time.Time { + if d == nil || d.t == nil { + return time.Time{} + } + return *d.t +} + +// TimePtr returns a pointer to the DateTime's underlying time.Time, if any. +func (d *DateTime) TimePtr() *time.Time { + if d == nil || d.t == nil { + return nil + } + if d.t.IsZero() { + return nil + } + return d.t +} + +func (d *DateTime) MarshalJSON() ([]byte, error) { + if d == nil || d.t == nil { + return nil, nil + } + return json.Marshal(d.t.Format(time.RFC3339)) +} + +func (d *DateTime) UnmarshalJSON(data []byte) error { + var raw string + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + + parsedTime, err := time.Parse(time.RFC3339, raw) + if err != nil { + return err + } + + *d = DateTime{t: &parsedTime} + return nil +} diff --git a/seed/go-sdk/websocket/go.mod b/seed/go-sdk/websocket/go.mod new file mode 100644 index 00000000000..e14dd9a3f8d --- /dev/null +++ b/seed/go-sdk/websocket/go.mod @@ -0,0 +1,9 @@ +module github.com/websocket/fern + +go 1.13 + +require ( + github.com/google/uuid v1.4.0 + github.com/stretchr/testify v1.7.0 + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/seed/go-sdk/websocket/go.sum b/seed/go-sdk/websocket/go.sum new file mode 100644 index 00000000000..b3766d4366b --- /dev/null +++ b/seed/go-sdk/websocket/go.sum @@ -0,0 +1,14 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/seed/go-sdk/websocket/option/request_option.go b/seed/go-sdk/websocket/option/request_option.go new file mode 100644 index 00000000000..6641db0372b --- /dev/null +++ b/seed/go-sdk/websocket/option/request_option.go @@ -0,0 +1,41 @@ +// This file was auto-generated by Fern from our API Definition. + +package option + +import ( + core "github.com/websocket/fern/core" + http "net/http" +) + +// RequestOption adapts the behavior of an indivdual request. +type RequestOption = core.RequestOption + +// WithBaseURL sets the base URL, overriding the default +// environment, if any. +func WithBaseURL(baseURL string) *core.BaseURLOption { + return &core.BaseURLOption{ + BaseURL: baseURL, + } +} + +// WithHTTPClient uses the given HTTPClient to issue the request. +func WithHTTPClient(httpClient core.HTTPClient) *core.HTTPClientOption { + return &core.HTTPClientOption{ + HTTPClient: httpClient, + } +} + +// WithHTTPHeader adds the given http.Header to the request. +func WithHTTPHeader(httpHeader http.Header) *core.HTTPHeaderOption { + return &core.HTTPHeaderOption{ + // Clone the headers so they can't be modified after the option call. + HTTPHeader: httpHeader.Clone(), + } +} + +// WithMaxAttempts configures the maximum number of retry attempts. +func WithMaxAttempts(attempts uint) *core.MaxAttemptsOption { + return &core.MaxAttemptsOption{ + MaxAttempts: attempts, + } +} diff --git a/seed/go-sdk/websocket/pointer.go b/seed/go-sdk/websocket/pointer.go new file mode 100644 index 00000000000..a57a746338f --- /dev/null +++ b/seed/go-sdk/websocket/pointer.go @@ -0,0 +1,132 @@ +package websocket + +import ( + "time" + + "github.com/google/uuid" +) + +// Bool returns a pointer to the given bool value. +func Bool(b bool) *bool { + return &b +} + +// Byte returns a pointer to the given byte value. +func Byte(b byte) *byte { + return &b +} + +// Complex64 returns a pointer to the given complex64 value. +func Complex64(c complex64) *complex64 { + return &c +} + +// Complex128 returns a pointer to the given complex128 value. +func Complex128(c complex128) *complex128 { + return &c +} + +// Float32 returns a pointer to the given float32 value. +func Float32(f float32) *float32 { + return &f +} + +// Float64 returns a pointer to the given float64 value. +func Float64(f float64) *float64 { + return &f +} + +// Int returns a pointer to the given int value. +func Int(i int) *int { + return &i +} + +// Int8 returns a pointer to the given int8 value. +func Int8(i int8) *int8 { + return &i +} + +// Int16 returns a pointer to the given int16 value. +func Int16(i int16) *int16 { + return &i +} + +// Int32 returns a pointer to the given int32 value. +func Int32(i int32) *int32 { + return &i +} + +// Int64 returns a pointer to the given int64 value. +func Int64(i int64) *int64 { + return &i +} + +// Rune returns a pointer to the given rune value. +func Rune(r rune) *rune { + return &r +} + +// String returns a pointer to the given string value. +func String(s string) *string { + return &s +} + +// Uint returns a pointer to the given uint value. +func Uint(u uint) *uint { + return &u +} + +// Uint8 returns a pointer to the given uint8 value. +func Uint8(u uint8) *uint8 { + return &u +} + +// Uint16 returns a pointer to the given uint16 value. +func Uint16(u uint16) *uint16 { + return &u +} + +// Uint32 returns a pointer to the given uint32 value. +func Uint32(u uint32) *uint32 { + return &u +} + +// Uint64 returns a pointer to the given uint64 value. +func Uint64(u uint64) *uint64 { + return &u +} + +// Uintptr returns a pointer to the given uintptr value. +func Uintptr(u uintptr) *uintptr { + return &u +} + +// UUID returns a pointer to the given uuid.UUID value. +func UUID(u uuid.UUID) *uuid.UUID { + return &u +} + +// Time returns a pointer to the given time.Time value. +func Time(t time.Time) *time.Time { + return &t +} + +// MustParseDate attempts to parse the given string as a +// date time.Time, and panics upon failure. +func MustParseDate(date string) time.Time { + t, err := time.Parse("2006-01-02", date) + if err != nil { + panic(err) + } + return t +} + +// MustParseDateTime attempts to parse the given string as a +// datetime time.Time, and panics upon failure. +func MustParseDateTime(datetime string) time.Time { + t, err := time.Parse(time.RFC3339, datetime) + if err != nil { + panic(err) + } + return t +} diff --git a/seed/go-sdk/websocket/snippet.json b/seed/go-sdk/websocket/snippet.json new file mode 100644 index 00000000000..e69de29bb2d