@bfra.me/api-core 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/LICENSE +18 -0
- package/README.md +18 -0
- package/dist/chunk-7NM3WYHE.js +32 -0
- package/dist/chunk-7NM3WYHE.js.map +1 -0
- package/dist/chunk-7QVYU63E.js +7 -0
- package/dist/chunk-7QVYU63E.js.map +1 -0
- package/dist/chunk-HKKQOEV3.js +786 -0
- package/dist/chunk-HKKQOEV3.js.map +1 -0
- package/dist/errors/fetchError.d.ts +13 -0
- package/dist/errors/fetchError.js +8 -0
- package/dist/errors/fetchError.js.map +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +105 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/index.d.ts +59 -0
- package/dist/lib/index.js +16 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/types.d.ts +22 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/eslint.config.ts +25 -0
- package/package.json +67 -0
- package/src/errors/fetchError.ts +29 -0
- package/src/index.ts +134 -0
- package/src/lib/getJSONSchemaDefaults.ts +77 -0
- package/src/lib/index.ts +7 -0
- package/src/lib/parseResponse.ts +28 -0
- package/src/lib/prepareAuth.ts +107 -0
- package/src/lib/prepareParams.ts +439 -0
- package/src/lib/prepareServer.ts +52 -0
- package/src/types.ts +28 -0
- package/test-utils/CHANGELOG.md +11 -0
- package/test-utils/datasets/real-world-apis.json +8507 -0
- package/test-utils/datasets/refresh-dataset +336 -0
- package/test-utils/definitions/alby.json +5391 -0
- package/test-utils/definitions/auth-quirks.json +62 -0
- package/test-utils/definitions/basiq.json +104 -0
- package/test-utils/definitions/metrotransit.json +318 -0
- package/test-utils/definitions/nested-defaults.json +107 -0
- package/test-utils/definitions/operationid-quirks.json +36 -0
- package/test-utils/definitions/optional-payload.json +57 -0
- package/test-utils/definitions/payloads.json +58 -0
- package/test-utils/definitions/response-title-quirks.json +77 -0
- package/test-utils/definitions/simple.json +291 -0
- package/test-utils/fetch-mock.ts +81 -0
- package/test-utils/fixtures/hello.jp.txt +1 -0
- package/test-utils/fixtures/hello.txt +1 -0
- package/test-utils/fixtures/owlbert-shrub.png +0 -0
- package/test-utils/fixtures/owlbert.png +0 -0
- package/test-utils/index.ts +2 -0
- package/test-utils/load-spec.ts +8 -0
- package/test-utils/node_modules/.bin/tsc +17 -0
- package/test-utils/node_modules/.bin/tsserver +17 -0
- package/test-utils/package.json +20 -0
- package/test-utils/sdks/README.md +3 -0
- package/test-utils/sdks/alby/README.md +23 -0
- package/test-utils/sdks/alby/package.json +55 -0
- package/test-utils/sdks/alby/src/index.ts +18 -0
- package/test-utils/sdks/alby/src/schemas/AmqpExternalRulePatch.ts +92 -0
- package/test-utils/sdks/alby/src/schemas/AmqpExternalRulePost.ts +93 -0
- package/test-utils/sdks/alby/src/schemas/AmqpExternalRuleResponse.ts +143 -0
- package/test-utils/sdks/alby/src/schemas/AmqpRulePatch.ts +76 -0
- package/test-utils/sdks/alby/src/schemas/AmqpRulePost.ts +85 -0
- package/test-utils/sdks/alby/src/schemas/AmqpRuleResponse.ts +124 -0
- package/test-utils/sdks/alby/src/schemas/AppPatch.ts +68 -0
- package/test-utils/sdks/alby/src/schemas/AppPkcs12.ts +22 -0
- package/test-utils/sdks/alby/src/schemas/AppPost.ts +71 -0
- package/test-utils/sdks/alby/src/schemas/AppResponse.ts +69 -0
- package/test-utils/sdks/alby/src/schemas/AwsAccessKeys.ts +28 -0
- package/test-utils/sdks/alby/src/schemas/AwsAccessKeysResponse.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/AwsAssumeRole.ts +23 -0
- package/test-utils/sdks/alby/src/schemas/AwsKinesisRulePatch.ts +90 -0
- package/test-utils/sdks/alby/src/schemas/AwsKinesisRulePost.ts +103 -0
- package/test-utils/sdks/alby/src/schemas/AwsKinesisRuleResponse.ts +142 -0
- package/test-utils/sdks/alby/src/schemas/AwsLambdaRulePatch.ts +90 -0
- package/test-utils/sdks/alby/src/schemas/AwsLambdaRulePost.ts +90 -0
- package/test-utils/sdks/alby/src/schemas/AwsLambdaRuleResponse.ts +132 -0
- package/test-utils/sdks/alby/src/schemas/AwsSqsRulePatch.ts +86 -0
- package/test-utils/sdks/alby/src/schemas/AwsSqsRulePost.ts +98 -0
- package/test-utils/sdks/alby/src/schemas/AwsSqsRuleResponse.ts +137 -0
- package/test-utils/sdks/alby/src/schemas/AzureFunctionRulePatch.ts +96 -0
- package/test-utils/sdks/alby/src/schemas/AzureFunctionRulePost.ts +106 -0
- package/test-utils/sdks/alby/src/schemas/AzureFunctionRuleResponse.ts +145 -0
- package/test-utils/sdks/alby/src/schemas/CloudflareWorkerRulePatch.ts +74 -0
- package/test-utils/sdks/alby/src/schemas/CloudflareWorkerRulePost.ts +83 -0
- package/test-utils/sdks/alby/src/schemas/CloudflareWorkerRuleResponse.ts +125 -0
- package/test-utils/sdks/alby/src/schemas/DeleteAppsAppIdNamespacesNamespaceId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/DeleteAppsAppIdQueuesQueueId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/DeleteAppsAppIdRulesRuleId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/DeleteAppsId.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/Error.ts +39 -0
- package/test-utils/sdks/alby/src/schemas/GetAccountsAccountIdApps.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdKeys.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdNamespaces.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdQueues.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdRules.ts +29 -0
- package/test-utils/sdks/alby/src/schemas/GetAppsAppIdRulesRuleId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/GoogleCloudFunctionRulePatch.ts +100 -0
- package/test-utils/sdks/alby/src/schemas/GoogleCloudFunctionRulePost.ts +100 -0
- package/test-utils/sdks/alby/src/schemas/GoogleCloudFunctionRuleResponse.ts +150 -0
- package/test-utils/sdks/alby/src/schemas/HttpRulePatch.ts +89 -0
- package/test-utils/sdks/alby/src/schemas/HttpRulePost.ts +100 -0
- package/test-utils/sdks/alby/src/schemas/HttpRuleResponse.ts +138 -0
- package/test-utils/sdks/alby/src/schemas/IftttRulePatch.ts +59 -0
- package/test-utils/sdks/alby/src/schemas/IftttRulePost.ts +62 -0
- package/test-utils/sdks/alby/src/schemas/IftttRuleResponse.ts +101 -0
- package/test-utils/sdks/alby/src/schemas/KeyPatch.ts +34 -0
- package/test-utils/sdks/alby/src/schemas/KeyPost.ts +39 -0
- package/test-utils/sdks/alby/src/schemas/KeyResponse.ts +63 -0
- package/test-utils/sdks/alby/src/schemas/Me.ts +98 -0
- package/test-utils/sdks/alby/src/schemas/NamespacePatch.ts +49 -0
- package/test-utils/sdks/alby/src/schemas/NamespacePost.ts +59 -0
- package/test-utils/sdks/alby/src/schemas/NamespaceResponse.ts +70 -0
- package/test-utils/sdks/alby/src/schemas/PatchAppsAppIdKeysKeyId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/PatchAppsAppIdNamespacesNamespaceId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/PatchAppsAppIdRulesRuleId.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/PatchAppsId.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAccountsAccountIdApps.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdKeys.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdKeysKeyIdRevoke.ts +26 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdNamespaces.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdQueues.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsAppIdRules.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/PostAppsIdPkcs12.ts +20 -0
- package/test-utils/sdks/alby/src/schemas/Queue.ts +43 -0
- package/test-utils/sdks/alby/src/schemas/QueueResponse.ts +185 -0
- package/test-utils/sdks/alby/src/schemas/RulePatch.ts +46 -0
- package/test-utils/sdks/alby/src/schemas/RulePost.ts +49 -0
- package/test-utils/sdks/alby/src/schemas/RuleResponse.ts +46 -0
- package/test-utils/sdks/alby/src/schemas/RuleSource.ts +30 -0
- package/test-utils/sdks/alby/src/schemas/UnsupportedRuleResponse.ts +98 -0
- package/test-utils/sdks/alby/src/schemas/ZapierRulePatch.ts +74 -0
- package/test-utils/sdks/alby/src/schemas/ZapierRulePost.ts +83 -0
- package/test-utils/sdks/alby/src/schemas/ZapierRuleResponse.ts +122 -0
- package/test-utils/sdks/alby/src/schemas.ts +77 -0
- package/test-utils/sdks/alby/src/sdk.ts +381 -0
- package/test-utils/sdks/alby/src/types.ts +84 -0
- package/test-utils/sdks/alby/tsconfig.json +12 -0
- package/test-utils/sdks/metrotransit/README.md +22 -0
- package/test-utils/sdks/metrotransit/package.json +55 -0
- package/test-utils/sdks/metrotransit/src/index.ts +12 -0
- package/test-utils/sdks/metrotransit/src/schemas/Agency.ts +19 -0
- package/test-utils/sdks/metrotransit/src/schemas/AlertMessage.ts +18 -0
- package/test-utils/sdks/metrotransit/src/schemas/Departure.ts +78 -0
- package/test-utils/sdks/metrotransit/src/schemas/Direction.ts +19 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripAgencies.ts +12 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripDirectionsRouteId.ts +28 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripRouteIdDirectionIdPlaceCode.ts +30 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripRoutes.ts +12 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripStopId.ts +20 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripStopsRouteIdDirectionId.ts +34 -0
- package/test-utils/sdks/metrotransit/src/schemas/GetNextripVehiclesRouteId.ts +28 -0
- package/test-utils/sdks/metrotransit/src/schemas/NexTripResult.ts +34 -0
- package/test-utils/sdks/metrotransit/src/schemas/Place.ts +21 -0
- package/test-utils/sdks/metrotransit/src/schemas/ProblemDetails.ts +40 -0
- package/test-utils/sdks/metrotransit/src/schemas/Route.ts +25 -0
- package/test-utils/sdks/metrotransit/src/schemas/Stop.ts +27 -0
- package/test-utils/sdks/metrotransit/src/schemas/Vehicle.ts +61 -0
- package/test-utils/sdks/metrotransit/src/schemas.ts +18 -0
- package/test-utils/sdks/metrotransit/src/sdk.ts +107 -0
- package/test-utils/sdks/metrotransit/src/types.ts +23 -0
- package/test-utils/sdks/metrotransit/tsconfig.json +12 -0
- package/test-utils/sdks/operationid-quirks/README.md +22 -0
- package/test-utils/sdks/operationid-quirks/package.json +50 -0
- package/test-utils/sdks/operationid-quirks/src/index.ts +9 -0
- package/test-utils/sdks/operationid-quirks/src/sdk.ts +107 -0
- package/test-utils/sdks/operationid-quirks/tsconfig.json +12 -0
- package/test-utils/sdks/optional-payload/README.md +14 -0
- package/test-utils/sdks/optional-payload/package.json +55 -0
- package/test-utils/sdks/optional-payload/src/index.ts +9 -0
- package/test-utils/sdks/optional-payload/src/schemas/UpdatePetWithForm.ts +35 -0
- package/test-utils/sdks/optional-payload/src/schemas.ts +2 -0
- package/test-utils/sdks/optional-payload/src/sdk.ts +82 -0
- package/test-utils/sdks/optional-payload/src/types.ts +5 -0
- package/test-utils/sdks/optional-payload/tsconfig.json +12 -0
- package/test-utils/sdks/petstore/LICENSE +97 -0
- package/test-utils/sdks/petstore/README.md +23 -0
- package/test-utils/sdks/petstore/package.json +56 -0
- package/test-utils/sdks/petstore/src/index.ts +17 -0
- package/test-utils/sdks/petstore/src/schemas/ApiResponse.ts +18 -0
- package/test-utils/sdks/petstore/src/schemas/Category.ts +15 -0
- package/test-utils/sdks/petstore/src/schemas/CreateUsersWithArrayInput.ts +10 -0
- package/test-utils/sdks/petstore/src/schemas/CreateUsersWithListInput.ts +10 -0
- package/test-utils/sdks/petstore/src/schemas/DeleteOrder.ts +22 -0
- package/test-utils/sdks/petstore/src/schemas/DeletePet.ts +31 -0
- package/test-utils/sdks/petstore/src/schemas/DeleteUser.ts +20 -0
- package/test-utils/sdks/petstore/src/schemas/FindPetsByStatus.ts +38 -0
- package/test-utils/sdks/petstore/src/schemas/FindPetsByTags.ts +32 -0
- package/test-utils/sdks/petstore/src/schemas/GetInventory.ts +13 -0
- package/test-utils/sdks/petstore/src/schemas/GetOrderById.ts +23 -0
- package/test-utils/sdks/petstore/src/schemas/GetPetById.ts +21 -0
- package/test-utils/sdks/petstore/src/schemas/GetUserByName.ts +20 -0
- package/test-utils/sdks/petstore/src/schemas/LoginUser.ts +32 -0
- package/test-utils/sdks/petstore/src/schemas/Order.ts +37 -0
- package/test-utils/sdks/petstore/src/schemas/Pet.ts +53 -0
- package/test-utils/sdks/petstore/src/schemas/Tag.ts +15 -0
- package/test-utils/sdks/petstore/src/schemas/UpdatePetWithForm.ts +35 -0
- package/test-utils/sdks/petstore/src/schemas/UpdateUser.ts +20 -0
- package/test-utils/sdks/petstore/src/schemas/UploadFile.ts +36 -0
- package/test-utils/sdks/petstore/src/schemas/User.ts +35 -0
- package/test-utils/sdks/petstore/src/schemas.ts +22 -0
- package/test-utils/sdks/petstore/src/sdk.ts +248 -0
- package/test-utils/sdks/petstore/src/types.ts +29 -0
- package/test-utils/sdks/petstore/tsconfig.json +12 -0
- package/test-utils/sdks/readme/README.md +23 -0
- package/test-utils/sdks/readme/package.json +55 -0
- package/test-utils/sdks/readme/src/index.ts +13 -0
- package/test-utils/sdks/readme/src/schemas/Apply.ts +61 -0
- package/test-utils/sdks/readme/src/schemas/Category.ts +24 -0
- package/test-utils/sdks/readme/src/schemas/Changelog.ts +36 -0
- package/test-utils/sdks/readme/src/schemas/CondensedProjectData.ts +25 -0
- package/test-utils/sdks/readme/src/schemas/CreateCategory.ts +21 -0
- package/test-utils/sdks/readme/src/schemas/CreateCustomPage.ts +22 -0
- package/test-utils/sdks/readme/src/schemas/CreateDoc.ts +40 -0
- package/test-utils/sdks/readme/src/schemas/CreateVersion.ts +33 -0
- package/test-utils/sdks/readme/src/schemas/CustomPage.ts +33 -0
- package/test-utils/sdks/readme/src/schemas/DeleteApiSpecification.ts +39 -0
- package/test-utils/sdks/readme/src/schemas/DeleteCategory.ts +37 -0
- package/test-utils/sdks/readme/src/schemas/DeleteChangelog.ts +20 -0
- package/test-utils/sdks/readme/src/schemas/DeleteCustomPage.ts +39 -0
- package/test-utils/sdks/readme/src/schemas/DeleteDoc.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/DeleteVersion.ts +42 -0
- package/test-utils/sdks/readme/src/schemas/DocSchemaPost.ts +135 -0
- package/test-utils/sdks/readme/src/schemas/DocSchemaPut.ts +62 -0
- package/test-utils/sdks/readme/src/schemas/DocSchemaResponse.ts +54 -0
- package/test-utils/sdks/readme/src/schemas/ErrorApikeyEmpty.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorApikeyMismatch.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorApikeyNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorCategoryInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorCategoryNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorCustompageInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorCustompageNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorDocInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorDocNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorRegistryNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecFileEmpty.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecIdDuplicate.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecIdInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecInvalid.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecInvalidSchema.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecTimeout.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorSpecVersionNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionCantDemoteStable.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionCantRemoveStable.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionDuplicate.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionEmpty.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionForkEmpty.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionForkNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/ErrorVersionNotfound.ts +49 -0
- package/test-utils/sdks/readme/src/schemas/GetApiRegistry.ts +27 -0
- package/test-utils/sdks/readme/src/schemas/GetApiSchema.ts +10 -0
- package/test-utils/sdks/readme/src/schemas/GetApiSpecification.ts +74 -0
- package/test-utils/sdks/readme/src/schemas/GetCategories.ts +57 -0
- package/test-utils/sdks/readme/src/schemas/GetCategory.ts +37 -0
- package/test-utils/sdks/readme/src/schemas/GetCategoryDocs.ts +37 -0
- package/test-utils/sdks/readme/src/schemas/GetChangelog.ts +20 -0
- package/test-utils/sdks/readme/src/schemas/GetChangelogs.ts +43 -0
- package/test-utils/sdks/readme/src/schemas/GetCustomPage.ts +39 -0
- package/test-utils/sdks/readme/src/schemas/GetCustomPages.ts +60 -0
- package/test-utils/sdks/readme/src/schemas/GetDoc.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/GetOpenRoles.ts +12 -0
- package/test-utils/sdks/readme/src/schemas/GetProductionDoc.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/GetProject.ts +22 -0
- package/test-utils/sdks/readme/src/schemas/GetVersion.ts +42 -0
- package/test-utils/sdks/readme/src/schemas/GetVersions.ts +22 -0
- package/test-utils/sdks/readme/src/schemas/JobOpening.ts +52 -0
- package/test-utils/sdks/readme/src/schemas/SearchDocs.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/UpdateApiSpecification.ts +67 -0
- package/test-utils/sdks/readme/src/schemas/UpdateCategory.ts +37 -0
- package/test-utils/sdks/readme/src/schemas/UpdateChangelog.ts +20 -0
- package/test-utils/sdks/readme/src/schemas/UpdateCustomPage.ts +39 -0
- package/test-utils/sdks/readme/src/schemas/UpdateDoc.ts +53 -0
- package/test-utils/sdks/readme/src/schemas/UpdateVersion.ts +42 -0
- package/test-utils/sdks/readme/src/schemas/UploadApiSpecification.ts +64 -0
- package/test-utils/sdks/readme/src/schemas/Version.ts +40 -0
- package/test-utils/sdks/readme/src/schemas.ts +70 -0
- package/test-utils/sdks/readme/src/sdk.ts +477 -0
- package/test-utils/sdks/readme/src/types.ts +120 -0
- package/test-utils/sdks/readme/tsconfig.json +12 -0
- package/test-utils/sdks/response-title-quirks/README.md +14 -0
- package/test-utils/sdks/response-title-quirks/package.json +55 -0
- package/test-utils/sdks/response-title-quirks/src/index.ts +9 -0
- package/test-utils/sdks/response-title-quirks/src/schemas/GetAnything.ts +60 -0
- package/test-utils/sdks/response-title-quirks/src/schemas.ts +2 -0
- package/test-utils/sdks/response-title-quirks/src/sdk.ts +76 -0
- package/test-utils/sdks/response-title-quirks/src/types.ts +5 -0
- package/test-utils/sdks/response-title-quirks/tsconfig.json +12 -0
- package/test-utils/sdks/simple/README.md +14 -0
- package/test-utils/sdks/simple/package.json +55 -0
- package/test-utils/sdks/simple/src/index.ts +10 -0
- package/test-utils/sdks/simple/src/schemas/Category.ts +15 -0
- package/test-utils/sdks/simple/src/schemas/FindPetsByStatus.ts +38 -0
- package/test-utils/sdks/simple/src/schemas/Pet.ts +53 -0
- package/test-utils/sdks/simple/src/schemas/Tag.ts +15 -0
- package/test-utils/sdks/simple/src/schemas.ts +5 -0
- package/test-utils/sdks/simple/src/sdk.ts +81 -0
- package/test-utils/sdks/simple/src/types.ts +8 -0
- package/test-utils/sdks/simple/tsconfig.json +12 -0
- package/test-utils/sdks/star-trek/README.md +22 -0
- package/test-utils/sdks/star-trek/package.json +55 -0
- package/test-utils/sdks/star-trek/src/index.ts +9 -0
- package/test-utils/sdks/star-trek/src/schemas/AnimalBase.ts +41 -0
- package/test-utils/sdks/star-trek/src/schemas/AnimalBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/AnimalFull.ts +41 -0
- package/test-utils/sdks/star-trek/src/schemas/AnimalFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectBase.ts +27 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectFull.ts +32 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/AstronomicalObjectType.ts +36 -0
- package/test-utils/sdks/star-trek/src/schemas/BloodType.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/BookBase.ts +120 -0
- package/test-utils/sdks/star-trek/src/schemas/BookBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/BookCollectionBase.ts +51 -0
- package/test-utils/sdks/star-trek/src/schemas/BookCollectionBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/BookCollectionFull.ts +98 -0
- package/test-utils/sdks/star-trek/src/schemas/BookCollectionFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/BookFull.ts +182 -0
- package/test-utils/sdks/star-trek/src/schemas/BookFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/BookSeriesBase.ts +57 -0
- package/test-utils/sdks/star-trek/src/schemas/BookSeriesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/BookSeriesFull.ts +81 -0
- package/test-utils/sdks/star-trek/src/schemas/BookSeriesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterBase.ts +104 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterFull.ts +152 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterRelation.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/CharacterSpecies.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicCollectionBase.ts +71 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicCollectionBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicCollectionFull.ts +123 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicCollectionFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicSeriesBase.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicSeriesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicSeriesFull.ts +99 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicSeriesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicStripBase.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicStripBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicStripFull.ts +85 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicStripFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicsBase.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicsBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicsFull.ts +127 -0
- package/test-utils/sdks/star-trek/src/schemas/ComicsFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyBase.ts +89 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyFull.ts +89 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/CompanyHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/ConflictBase.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/ConflictBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ConflictFull.ts +78 -0
- package/test-utils/sdks/star-trek/src/schemas/ConflictFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/ContentLanguage.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/ContentRating.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ContentRatingSystem.ts +35 -0
- package/test-utils/sdks/star-trek/src/schemas/Country.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/ElementBase.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/ElementBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ElementFull.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/ElementFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/EpisodeBase.ts +82 -0
- package/test-utils/sdks/star-trek/src/schemas/EpisodeBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/EpisodeFull.ts +125 -0
- package/test-utils/sdks/star-trek/src/schemas/EpisodeFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/Error.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/FoodBase.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/FoodBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/FoodFull.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/FoodFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/Gender.ts +11 -0
- package/test-utils/sdks/star-trek/src/schemas/Genre.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/GetAnimal.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetAnimalSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetAstronomicalobject.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetAstronomicalobjectSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBook.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookcollection.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookcollectionSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookseries.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetBookseriesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetCharacter.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetCharacterSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComiccollection.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComiccollectionSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComics.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicsSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicseries.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicseriesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicstrip.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetComicstripSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetCompany.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetCompanySearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetConflict.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetConflictSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetElement.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetElementSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetEpisode.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetEpisodeSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetFood.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetFoodSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetLiterature.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetLiteratureSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetLocation.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetLocationSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMagazine.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMagazineSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMagazineseries.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMagazineseriesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMaterial.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMaterialSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMedicalcondition.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMedicalconditionSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMovie.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetMovieSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetOccupation.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetOccupationSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetOrganization.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetOrganizationSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetPerformer.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetPerformerSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSeason.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSeasonSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSeries.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSeriesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSoundtrack.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSoundtrackSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpacecraft.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpacecraftSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpacecraftclass.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpacecraftclassSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpecies.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetSpeciesSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetStaff.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetStaffSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTechnology.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTechnologySearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTitle.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTitleSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcard.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcardSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcarddeck.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcarddeckSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcardset.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetTradingcardsetSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetVideogame.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetVideogameSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetVideorelease.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetVideoreleaseSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/GetWeapon.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/GetWeaponSearch.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/LiteratureBase.ts +45 -0
- package/test-utils/sdks/star-trek/src/schemas/LiteratureBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/LiteratureFull.ts +45 -0
- package/test-utils/sdks/star-trek/src/schemas/LiteratureFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/LocationBase.ts +113 -0
- package/test-utils/sdks/star-trek/src/schemas/LocationBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/LocationFull.ts +113 -0
- package/test-utils/sdks/star-trek/src/schemas/LocationFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineBase.ts +53 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineFull.ts +72 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineSeriesBase.ts +41 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineSeriesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineSeriesFull.ts +60 -0
- package/test-utils/sdks/star-trek/src/schemas/MagazineSeriesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MaritalStatus.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/MaterialBase.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/MaterialBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MaterialFull.ts +61 -0
- package/test-utils/sdks/star-trek/src/schemas/MaterialFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MedicalConditionBase.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/MedicalConditionBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MedicalConditionFull.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/MedicalConditionFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/MovieBase.ts +87 -0
- package/test-utils/sdks/star-trek/src/schemas/MovieBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/MovieFull.ts +139 -0
- package/test-utils/sdks/star-trek/src/schemas/MovieFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/OccupationBase.ts +33 -0
- package/test-utils/sdks/star-trek/src/schemas/OccupationBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/OccupationFull.ts +40 -0
- package/test-utils/sdks/star-trek/src/schemas/OccupationFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationBase.ts +69 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationFull.ts +76 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/OrganizationHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/PerformerBase.ts +98 -0
- package/test-utils/sdks/star-trek/src/schemas/PerformerBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/PerformerFull.ts +136 -0
- package/test-utils/sdks/star-trek/src/schemas/PerformerFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/Platform.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/PostAnimalSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostAstronomicalobjectSearch.ts +53 -0
- package/test-utils/sdks/star-trek/src/schemas/PostBookSearch.ts +141 -0
- package/test-utils/sdks/star-trek/src/schemas/PostBookcollectionSearch.ts +85 -0
- package/test-utils/sdks/star-trek/src/schemas/PostBookseriesSearch.ts +83 -0
- package/test-utils/sdks/star-trek/src/schemas/PostCharacterSearch.ts +69 -0
- package/test-utils/sdks/star-trek/src/schemas/PostComiccollectionSearch.ts +89 -0
- package/test-utils/sdks/star-trek/src/schemas/PostComicsSearch.ts +93 -0
- package/test-utils/sdks/star-trek/src/schemas/PostComicseriesSearch.ts +93 -0
- package/test-utils/sdks/star-trek/src/schemas/PostComicstripSearch.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/PostCompanySearch.ts +113 -0
- package/test-utils/sdks/star-trek/src/schemas/PostConflictSearch.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/PostElementSearch.ts +77 -0
- package/test-utils/sdks/star-trek/src/schemas/PostEpisodeSearch.ts +113 -0
- package/test-utils/sdks/star-trek/src/schemas/PostFoodSearch.ts +85 -0
- package/test-utils/sdks/star-trek/src/schemas/PostLiteratureSearch.ts +69 -0
- package/test-utils/sdks/star-trek/src/schemas/PostLocationSearch.ts +137 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMagazineSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMagazineseriesSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMaterialSearch.ts +85 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMedicalconditionSearch.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/PostMovieSearch.ts +75 -0
- package/test-utils/sdks/star-trek/src/schemas/PostOccupationSearch.ts +57 -0
- package/test-utils/sdks/star-trek/src/schemas/PostOrganizationSearch.ts +93 -0
- package/test-utils/sdks/star-trek/src/schemas/PostPerformerSearch.ts +133 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSeasonSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSeriesSearch.ts +89 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSoundtrackSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSpacecraftSearch.ts +45 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSpacecraftclassSearch.ts +53 -0
- package/test-utils/sdks/star-trek/src/schemas/PostSpeciesSearch.ts +93 -0
- package/test-utils/sdks/star-trek/src/schemas/PostStaffSearch.ts +301 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTechnologySearch.ts +125 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTitleSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTradingcardSearch.ts +53 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTradingcarddeckSearch.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/PostTradingcardsetSearch.ts +119 -0
- package/test-utils/sdks/star-trek/src/schemas/PostVideogameSearch.ts +55 -0
- package/test-utils/sdks/star-trek/src/schemas/PostVideoreleaseSearch.ts +65 -0
- package/test-utils/sdks/star-trek/src/schemas/PostWeaponSearch.ts +73 -0
- package/test-utils/sdks/star-trek/src/schemas/ProductionRunUnit.ts +11 -0
- package/test-utils/sdks/star-trek/src/schemas/Reference.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/ReferenceType.ts +11 -0
- package/test-utils/sdks/star-trek/src/schemas/ResponsePage.ts +42 -0
- package/test-utils/sdks/star-trek/src/schemas/ResponseSort.ts +16 -0
- package/test-utils/sdks/star-trek/src/schemas/ResponseSortClause.ts +25 -0
- package/test-utils/sdks/star-trek/src/schemas/ResponseSortDirection.ts +11 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonBase.ts +32 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonFull.ts +38 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SeasonHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesBase.ts +60 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesFull.ts +72 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SeriesHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/SoundtrackBase.ts +30 -0
- package/test-utils/sdks/star-trek/src/schemas/SoundtrackBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SoundtrackFull.ts +59 -0
- package/test-utils/sdks/star-trek/src/schemas/SoundtrackFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftBase.ts +39 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassBase.ts +48 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassFull.ts +60 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftClassHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftFull.ts +45 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SpacecraftType.ts +17 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesBase.ts +73 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesFull.ts +79 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/SpeciesHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffBase.ts +266 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffFull.ts +323 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/StaffHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/TechnologyBase.ts +101 -0
- package/test-utils/sdks/star-trek/src/schemas/TechnologyBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TechnologyFull.ts +101 -0
- package/test-utils/sdks/star-trek/src/schemas/TechnologyFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TitleBase.ts +41 -0
- package/test-utils/sdks/star-trek/src/schemas/TitleBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TitleFull.ts +48 -0
- package/test-utils/sdks/star-trek/src/schemas/TitleFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardBase.ts +38 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckBase.ts +28 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckFull.ts +34 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardDeckHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardFull.ts +38 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetBase.ts +62 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetFull.ts +86 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/TradingCardSetHeader.ts +21 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoGameBase.ts +48 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoGameBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoGameFull.ts +84 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoGameFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseBase.ts +127 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseFormat.ts +23 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseFull.ts +155 -0
- package/test-utils/sdks/star-trek/src/schemas/VideoReleaseFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas/WeaponBase.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/WeaponBaseResponse.ts +20 -0
- package/test-utils/sdks/star-trek/src/schemas/WeaponFull.ts +49 -0
- package/test-utils/sdks/star-trek/src/schemas/WeaponFullResponse.ts +12 -0
- package/test-utils/sdks/star-trek/src/schemas.ts +314 -0
- package/test-utils/sdks/star-trek/src/sdk.ts +1032 -0
- package/test-utils/sdks/star-trek/src/types.ts +490 -0
- package/test-utils/sdks/star-trek/tsconfig.json +12 -0
- package/test-utils/tsconfig.json +9 -0
- package/tsconfig.eslint.json +8 -0
- package/tsconfig.json +9 -0
- package/tsup.config.ts +31 -0
@@ -0,0 +1,786 @@
|
|
1
|
+
import {
|
2
|
+
__name
|
3
|
+
} from "./chunk-7QVYU63E.js";
|
4
|
+
|
5
|
+
// src/lib/getJSONSchemaDefaults.ts
|
6
|
+
import traverse from "json-schema-traverse";
|
7
|
+
function getJSONSchemaDefaults(jsonSchemas) {
|
8
|
+
return jsonSchemas.map(({ type: payloadType, schema: jsonSchema }) => {
|
9
|
+
const defaults = {};
|
10
|
+
traverse(jsonSchema, (schema, pointer, _rootSchema, parentPointer, _parentKeyword, parentSchema, indexProperty) => {
|
11
|
+
if (!pointer.startsWith("/properties/")) {
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
if (Array.isArray(parentSchema?.required) && parentSchema?.required.includes(String(indexProperty))) {
|
15
|
+
if (schema.type === "object" && indexProperty) {
|
16
|
+
defaults[indexProperty] = {};
|
17
|
+
}
|
18
|
+
let destination = defaults;
|
19
|
+
if (parentPointer) {
|
20
|
+
parentPointer.replace(/\/properties/g, "").split("/").forEach((subSchema) => {
|
21
|
+
if (subSchema === "") {
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
destination = destination?.[subSchema] || {};
|
25
|
+
});
|
26
|
+
}
|
27
|
+
if (schema.default !== void 0) {
|
28
|
+
if (indexProperty !== void 0) {
|
29
|
+
destination[indexProperty] = schema.default;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
});
|
34
|
+
if (!Object.keys(defaults).length) {
|
35
|
+
return {};
|
36
|
+
}
|
37
|
+
return {
|
38
|
+
// @todo should we filter out empty and undefined objects from here with `remove-undefined-objects`?
|
39
|
+
[payloadType]: defaults
|
40
|
+
};
|
41
|
+
}).reduce((prev, next) => Object.assign(prev, next));
|
42
|
+
}
|
43
|
+
__name(getJSONSchemaDefaults, "getJSONSchemaDefaults");
|
44
|
+
|
45
|
+
// src/lib/parseResponse.ts
|
46
|
+
import { matchesMimeType } from "oas/utils";
|
47
|
+
async function parseResponse(response) {
|
48
|
+
const contentType = response.headers.get("Content-Type");
|
49
|
+
const isJSON = contentType && (matchesMimeType.json(contentType) || matchesMimeType.wildcard(contentType));
|
50
|
+
const responseBody = await response.clone().text();
|
51
|
+
let data = responseBody;
|
52
|
+
if (isJSON) {
|
53
|
+
try {
|
54
|
+
data = JSON.parse(responseBody);
|
55
|
+
} catch (e) {
|
56
|
+
}
|
57
|
+
}
|
58
|
+
return {
|
59
|
+
data,
|
60
|
+
status: response.status,
|
61
|
+
headers: response.headers,
|
62
|
+
res: response
|
63
|
+
};
|
64
|
+
}
|
65
|
+
__name(parseResponse, "parseResponse");
|
66
|
+
|
67
|
+
// src/lib/prepareAuth.ts
|
68
|
+
function prepareAuth(authKey, operation) {
|
69
|
+
if (authKey.length === 0) {
|
70
|
+
return {};
|
71
|
+
}
|
72
|
+
const preparedAuth = {};
|
73
|
+
const security = operation.getSecurity();
|
74
|
+
if (security.length === 0) {
|
75
|
+
return {};
|
76
|
+
}
|
77
|
+
if (security.every((s) => Object.keys(s).length > 1)) {
|
78
|
+
throw new Error("Sorry, this operation currently requires multiple forms of authentication which this library doesn't yet support.");
|
79
|
+
}
|
80
|
+
const usableSecurity = security.map((s) => {
|
81
|
+
return Object.keys(s).length === 1 ? s : false;
|
82
|
+
}).filter(Boolean);
|
83
|
+
const usableSecuritySchemes = usableSecurity.map((s) => Object.keys(s)).reduce((prev, next) => prev.concat(next), []);
|
84
|
+
const preparedSecurity = operation.prepareSecurity();
|
85
|
+
if (authKey.length >= 2) {
|
86
|
+
if (!("Basic" in preparedSecurity)) {
|
87
|
+
throw new Error("Multiple auth tokens were supplied for this endpoint but only a single token is needed.");
|
88
|
+
}
|
89
|
+
const schemes2 = preparedSecurity.Basic.filter((s) => usableSecuritySchemes.includes(s._key));
|
90
|
+
if (!schemes2.length) {
|
91
|
+
throw new Error("Credentials for Basic Authentication were supplied but this operation requires another form of auth in that case, which this library does not yet support. This operation does, however, allow supplying a single auth token.");
|
92
|
+
}
|
93
|
+
const scheme2 = schemes2.shift();
|
94
|
+
preparedAuth[scheme2._key] = {
|
95
|
+
user: String(authKey[0]),
|
96
|
+
pass: authKey.length === 2 ? String(authKey[1]) : ""
|
97
|
+
};
|
98
|
+
return preparedAuth;
|
99
|
+
}
|
100
|
+
const usableScheme = usableSecuritySchemes[0];
|
101
|
+
const schemes = Object.entries(preparedSecurity).map(([, ps]) => ps.filter((s) => usableScheme === s._key)).reduce((prev, next) => prev.concat(next), []);
|
102
|
+
const scheme = schemes.shift();
|
103
|
+
switch (scheme.type) {
|
104
|
+
case "http":
|
105
|
+
if (scheme.scheme === "basic") {
|
106
|
+
preparedAuth[scheme._key] = {
|
107
|
+
user: String(authKey[0]),
|
108
|
+
pass: authKey.length === 2 ? String(authKey[1]) : ""
|
109
|
+
};
|
110
|
+
} else if (scheme.scheme === "bearer") {
|
111
|
+
preparedAuth[scheme._key] = String(authKey[0]);
|
112
|
+
}
|
113
|
+
break;
|
114
|
+
case "oauth2":
|
115
|
+
preparedAuth[scheme._key] = String(authKey[0]);
|
116
|
+
break;
|
117
|
+
case "apiKey":
|
118
|
+
if (scheme.in === "query" || scheme.in === "header" || scheme.in === "cookie") {
|
119
|
+
preparedAuth[scheme._key] = String(authKey[0]);
|
120
|
+
}
|
121
|
+
break;
|
122
|
+
default:
|
123
|
+
throw new Error(`Sorry, this API currently uses a security scheme, ${scheme.type}, which this library doesn't yet support.`);
|
124
|
+
}
|
125
|
+
return preparedAuth;
|
126
|
+
}
|
127
|
+
__name(prepareAuth, "prepareAuth");
|
128
|
+
|
129
|
+
// src/lib/prepareParams.ts
|
130
|
+
import stream from "node:stream";
|
131
|
+
import caseless from "caseless";
|
132
|
+
|
133
|
+
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/index.js
|
134
|
+
import { on } from "node:events";
|
135
|
+
import { finished } from "node:stream/promises";
|
136
|
+
|
137
|
+
// ../../node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.js
|
138
|
+
function isStream(stream2, { checkOpen = true } = {}) {
|
139
|
+
return stream2 !== null && typeof stream2 === "object" && (stream2.writable || stream2.readable || !checkOpen || stream2.writable === void 0 && stream2.readable === void 0) && typeof stream2.pipe === "function";
|
140
|
+
}
|
141
|
+
__name(isStream, "isStream");
|
142
|
+
function isReadableStream(stream2, { checkOpen = true } = {}) {
|
143
|
+
return isStream(stream2, {
|
144
|
+
checkOpen
|
145
|
+
}) && (stream2.readable || !checkOpen) && typeof stream2.read === "function" && typeof stream2.readable === "boolean" && typeof stream2.readableObjectMode === "boolean" && typeof stream2.destroy === "function" && typeof stream2.destroyed === "boolean";
|
146
|
+
}
|
147
|
+
__name(isReadableStream, "isReadableStream");
|
148
|
+
|
149
|
+
// ../../node_modules/.pnpm/@sec-ant+readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js
|
150
|
+
var a = Object.getPrototypeOf(Object.getPrototypeOf(
|
151
|
+
/* istanbul ignore next */
|
152
|
+
async function* () {
|
153
|
+
}
|
154
|
+
).prototype);
|
155
|
+
var c = class c2 {
|
156
|
+
static {
|
157
|
+
__name(this, "c");
|
158
|
+
}
|
159
|
+
#t;
|
160
|
+
#n;
|
161
|
+
#r = false;
|
162
|
+
#e = void 0;
|
163
|
+
constructor(e, t) {
|
164
|
+
this.#t = e, this.#n = t;
|
165
|
+
}
|
166
|
+
next() {
|
167
|
+
const e = /* @__PURE__ */ __name(() => this.#s(), "e");
|
168
|
+
return this.#e = this.#e ? this.#e.then(e, e) : e(), this.#e;
|
169
|
+
}
|
170
|
+
return(e) {
|
171
|
+
const t = /* @__PURE__ */ __name(() => this.#i(e), "t");
|
172
|
+
return this.#e ? this.#e.then(t, t) : t();
|
173
|
+
}
|
174
|
+
async #s() {
|
175
|
+
if (this.#r) return {
|
176
|
+
done: true,
|
177
|
+
value: void 0
|
178
|
+
};
|
179
|
+
let e;
|
180
|
+
try {
|
181
|
+
e = await this.#t.read();
|
182
|
+
} catch (t) {
|
183
|
+
throw this.#e = void 0, this.#r = true, this.#t.releaseLock(), t;
|
184
|
+
}
|
185
|
+
return e.done && (this.#e = void 0, this.#r = true, this.#t.releaseLock()), e;
|
186
|
+
}
|
187
|
+
async #i(e) {
|
188
|
+
if (this.#r) return {
|
189
|
+
done: true,
|
190
|
+
value: e
|
191
|
+
};
|
192
|
+
if (this.#r = true, !this.#n) {
|
193
|
+
const t = this.#t.cancel(e);
|
194
|
+
return this.#t.releaseLock(), await t, {
|
195
|
+
done: true,
|
196
|
+
value: e
|
197
|
+
};
|
198
|
+
}
|
199
|
+
return this.#t.releaseLock(), {
|
200
|
+
done: true,
|
201
|
+
value: e
|
202
|
+
};
|
203
|
+
}
|
204
|
+
};
|
205
|
+
var n = Symbol();
|
206
|
+
function i() {
|
207
|
+
return this[n].next();
|
208
|
+
}
|
209
|
+
__name(i, "i");
|
210
|
+
Object.defineProperty(i, "name", {
|
211
|
+
value: "next"
|
212
|
+
});
|
213
|
+
function o(r) {
|
214
|
+
return this[n].return(r);
|
215
|
+
}
|
216
|
+
__name(o, "o");
|
217
|
+
Object.defineProperty(o, "name", {
|
218
|
+
value: "return"
|
219
|
+
});
|
220
|
+
var u = Object.create(a, {
|
221
|
+
next: {
|
222
|
+
enumerable: true,
|
223
|
+
configurable: true,
|
224
|
+
writable: true,
|
225
|
+
value: i
|
226
|
+
},
|
227
|
+
return: {
|
228
|
+
enumerable: true,
|
229
|
+
configurable: true,
|
230
|
+
writable: true,
|
231
|
+
value: o
|
232
|
+
}
|
233
|
+
});
|
234
|
+
function h({ preventCancel: r = false } = {}) {
|
235
|
+
const e = this.getReader(), t = new c(e, r), s = Object.create(u);
|
236
|
+
return s[n] = t, s;
|
237
|
+
}
|
238
|
+
__name(h, "h");
|
239
|
+
|
240
|
+
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.js
|
241
|
+
var getAsyncIterable = /* @__PURE__ */ __name((stream2) => {
|
242
|
+
if (isReadableStream(stream2, {
|
243
|
+
checkOpen: false
|
244
|
+
}) && nodeImports.on !== void 0) {
|
245
|
+
return getStreamIterable(stream2);
|
246
|
+
}
|
247
|
+
if (typeof stream2?.[Symbol.asyncIterator] === "function") {
|
248
|
+
return stream2;
|
249
|
+
}
|
250
|
+
if (toString.call(stream2) === "[object ReadableStream]") {
|
251
|
+
return h.call(stream2);
|
252
|
+
}
|
253
|
+
throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
254
|
+
}, "getAsyncIterable");
|
255
|
+
var { toString } = Object.prototype;
|
256
|
+
var getStreamIterable = /* @__PURE__ */ __name(async function* (stream2) {
|
257
|
+
const controller = new AbortController();
|
258
|
+
const state = {};
|
259
|
+
handleStreamEnd(stream2, controller, state);
|
260
|
+
try {
|
261
|
+
for await (const [chunk] of nodeImports.on(stream2, "data", {
|
262
|
+
signal: controller.signal
|
263
|
+
})) {
|
264
|
+
yield chunk;
|
265
|
+
}
|
266
|
+
} catch (error) {
|
267
|
+
if (state.error !== void 0) {
|
268
|
+
throw state.error;
|
269
|
+
} else if (!controller.signal.aborted) {
|
270
|
+
throw error;
|
271
|
+
}
|
272
|
+
} finally {
|
273
|
+
stream2.destroy();
|
274
|
+
}
|
275
|
+
}, "getStreamIterable");
|
276
|
+
var handleStreamEnd = /* @__PURE__ */ __name(async (stream2, controller, state) => {
|
277
|
+
try {
|
278
|
+
await nodeImports.finished(stream2, {
|
279
|
+
cleanup: true,
|
280
|
+
readable: true,
|
281
|
+
writable: false,
|
282
|
+
error: false
|
283
|
+
});
|
284
|
+
} catch (error) {
|
285
|
+
state.error = error;
|
286
|
+
} finally {
|
287
|
+
controller.abort();
|
288
|
+
}
|
289
|
+
}, "handleStreamEnd");
|
290
|
+
var nodeImports = {};
|
291
|
+
|
292
|
+
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.js
|
293
|
+
var getStreamContents = /* @__PURE__ */ __name(async (stream2, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
|
294
|
+
const asyncIterable = getAsyncIterable(stream2);
|
295
|
+
const state = init();
|
296
|
+
state.length = 0;
|
297
|
+
try {
|
298
|
+
for await (const chunk of asyncIterable) {
|
299
|
+
const chunkType = getChunkType(chunk);
|
300
|
+
const convertedChunk = convertChunk[chunkType](chunk, state);
|
301
|
+
appendChunk({
|
302
|
+
convertedChunk,
|
303
|
+
state,
|
304
|
+
getSize,
|
305
|
+
truncateChunk,
|
306
|
+
addChunk,
|
307
|
+
maxBuffer
|
308
|
+
});
|
309
|
+
}
|
310
|
+
appendFinalChunk({
|
311
|
+
state,
|
312
|
+
convertChunk,
|
313
|
+
getSize,
|
314
|
+
truncateChunk,
|
315
|
+
addChunk,
|
316
|
+
getFinalChunk,
|
317
|
+
maxBuffer
|
318
|
+
});
|
319
|
+
return finalize(state);
|
320
|
+
} catch (error) {
|
321
|
+
const normalizedError = typeof error === "object" && error !== null ? error : new Error(error);
|
322
|
+
normalizedError.bufferedData = finalize(state);
|
323
|
+
throw normalizedError;
|
324
|
+
}
|
325
|
+
}, "getStreamContents");
|
326
|
+
var appendFinalChunk = /* @__PURE__ */ __name(({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => {
|
327
|
+
const convertedChunk = getFinalChunk(state);
|
328
|
+
if (convertedChunk !== void 0) {
|
329
|
+
appendChunk({
|
330
|
+
convertedChunk,
|
331
|
+
state,
|
332
|
+
getSize,
|
333
|
+
truncateChunk,
|
334
|
+
addChunk,
|
335
|
+
maxBuffer
|
336
|
+
});
|
337
|
+
}
|
338
|
+
}, "appendFinalChunk");
|
339
|
+
var appendChunk = /* @__PURE__ */ __name(({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }) => {
|
340
|
+
const chunkSize = getSize(convertedChunk);
|
341
|
+
const newLength = state.length + chunkSize;
|
342
|
+
if (newLength <= maxBuffer) {
|
343
|
+
addNewChunk(convertedChunk, state, addChunk, newLength);
|
344
|
+
return;
|
345
|
+
}
|
346
|
+
const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);
|
347
|
+
if (truncatedChunk !== void 0) {
|
348
|
+
addNewChunk(truncatedChunk, state, addChunk, maxBuffer);
|
349
|
+
}
|
350
|
+
throw new MaxBufferError();
|
351
|
+
}, "appendChunk");
|
352
|
+
var addNewChunk = /* @__PURE__ */ __name((convertedChunk, state, addChunk, newLength) => {
|
353
|
+
state.contents = addChunk(convertedChunk, state, newLength);
|
354
|
+
state.length = newLength;
|
355
|
+
}, "addNewChunk");
|
356
|
+
var getChunkType = /* @__PURE__ */ __name((chunk) => {
|
357
|
+
const typeOfChunk = typeof chunk;
|
358
|
+
if (typeOfChunk === "string") {
|
359
|
+
return "string";
|
360
|
+
}
|
361
|
+
if (typeOfChunk !== "object" || chunk === null) {
|
362
|
+
return "others";
|
363
|
+
}
|
364
|
+
if (globalThis.Buffer?.isBuffer(chunk)) {
|
365
|
+
return "buffer";
|
366
|
+
}
|
367
|
+
const prototypeName = objectToString.call(chunk);
|
368
|
+
if (prototypeName === "[object ArrayBuffer]") {
|
369
|
+
return "arrayBuffer";
|
370
|
+
}
|
371
|
+
if (prototypeName === "[object DataView]") {
|
372
|
+
return "dataView";
|
373
|
+
}
|
374
|
+
if (Number.isInteger(chunk.byteLength) && Number.isInteger(chunk.byteOffset) && objectToString.call(chunk.buffer) === "[object ArrayBuffer]") {
|
375
|
+
return "typedArray";
|
376
|
+
}
|
377
|
+
return "others";
|
378
|
+
}, "getChunkType");
|
379
|
+
var { toString: objectToString } = Object.prototype;
|
380
|
+
var MaxBufferError = class extends Error {
|
381
|
+
static {
|
382
|
+
__name(this, "MaxBufferError");
|
383
|
+
}
|
384
|
+
name = "MaxBufferError";
|
385
|
+
constructor() {
|
386
|
+
super("maxBuffer exceeded");
|
387
|
+
}
|
388
|
+
};
|
389
|
+
|
390
|
+
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.js
|
391
|
+
var noop = /* @__PURE__ */ __name(() => void 0, "noop");
|
392
|
+
var throwObjectStream = /* @__PURE__ */ __name((chunk) => {
|
393
|
+
throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
|
394
|
+
}, "throwObjectStream");
|
395
|
+
var getLengthProperty = /* @__PURE__ */ __name((convertedChunk) => convertedChunk.length, "getLengthProperty");
|
396
|
+
|
397
|
+
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.js
|
398
|
+
async function getStreamAsArrayBuffer(stream2, options) {
|
399
|
+
return getStreamContents(stream2, arrayBufferMethods, options);
|
400
|
+
}
|
401
|
+
__name(getStreamAsArrayBuffer, "getStreamAsArrayBuffer");
|
402
|
+
var initArrayBuffer = /* @__PURE__ */ __name(() => ({
|
403
|
+
contents: new ArrayBuffer(0)
|
404
|
+
}), "initArrayBuffer");
|
405
|
+
var useTextEncoder = /* @__PURE__ */ __name((chunk) => textEncoder.encode(chunk), "useTextEncoder");
|
406
|
+
var textEncoder = new TextEncoder();
|
407
|
+
var useUint8Array = /* @__PURE__ */ __name((chunk) => new Uint8Array(chunk), "useUint8Array");
|
408
|
+
var useUint8ArrayWithOffset = /* @__PURE__ */ __name((chunk) => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength), "useUint8ArrayWithOffset");
|
409
|
+
var truncateArrayBufferChunk = /* @__PURE__ */ __name((convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize), "truncateArrayBufferChunk");
|
410
|
+
var addArrayBufferChunk = /* @__PURE__ */ __name((convertedChunk, { contents, length: previousLength }, length) => {
|
411
|
+
const newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);
|
412
|
+
new Uint8Array(newContents).set(convertedChunk, previousLength);
|
413
|
+
return newContents;
|
414
|
+
}, "addArrayBufferChunk");
|
415
|
+
var resizeArrayBufferSlow = /* @__PURE__ */ __name((contents, length) => {
|
416
|
+
if (length <= contents.byteLength) {
|
417
|
+
return contents;
|
418
|
+
}
|
419
|
+
const arrayBuffer = new ArrayBuffer(getNewContentsLength(length));
|
420
|
+
new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
|
421
|
+
return arrayBuffer;
|
422
|
+
}, "resizeArrayBufferSlow");
|
423
|
+
var resizeArrayBuffer = /* @__PURE__ */ __name((contents, length) => {
|
424
|
+
if (length <= contents.maxByteLength) {
|
425
|
+
contents.resize(length);
|
426
|
+
return contents;
|
427
|
+
}
|
428
|
+
const arrayBuffer = new ArrayBuffer(length, {
|
429
|
+
maxByteLength: getNewContentsLength(length)
|
430
|
+
});
|
431
|
+
new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
|
432
|
+
return arrayBuffer;
|
433
|
+
}, "resizeArrayBuffer");
|
434
|
+
var getNewContentsLength = /* @__PURE__ */ __name((length) => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR)), "getNewContentsLength");
|
435
|
+
var SCALE_FACTOR = 2;
|
436
|
+
var finalizeArrayBuffer = /* @__PURE__ */ __name(({ contents, length }) => hasArrayBufferResize() ? contents : contents.slice(0, length), "finalizeArrayBuffer");
|
437
|
+
var hasArrayBufferResize = /* @__PURE__ */ __name(() => "resize" in ArrayBuffer.prototype, "hasArrayBufferResize");
|
438
|
+
var arrayBufferMethods = {
|
439
|
+
init: initArrayBuffer,
|
440
|
+
convertChunk: {
|
441
|
+
string: useTextEncoder,
|
442
|
+
buffer: useUint8Array,
|
443
|
+
arrayBuffer: useUint8Array,
|
444
|
+
dataView: useUint8ArrayWithOffset,
|
445
|
+
typedArray: useUint8ArrayWithOffset,
|
446
|
+
others: throwObjectStream
|
447
|
+
},
|
448
|
+
getSize: getLengthProperty,
|
449
|
+
truncateChunk: truncateArrayBufferChunk,
|
450
|
+
addChunk: addArrayBufferChunk,
|
451
|
+
getFinalChunk: noop,
|
452
|
+
finalize: finalizeArrayBuffer
|
453
|
+
};
|
454
|
+
|
455
|
+
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/buffer.js
|
456
|
+
async function getStreamAsBuffer(stream2, options) {
|
457
|
+
if (!("Buffer" in globalThis)) {
|
458
|
+
throw new Error("getStreamAsBuffer() is only supported in Node.js");
|
459
|
+
}
|
460
|
+
try {
|
461
|
+
return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream2, options));
|
462
|
+
} catch (error) {
|
463
|
+
if (error.bufferedData !== void 0) {
|
464
|
+
error.bufferedData = arrayBufferToNodeBuffer(error.bufferedData);
|
465
|
+
}
|
466
|
+
throw error;
|
467
|
+
}
|
468
|
+
}
|
469
|
+
__name(getStreamAsBuffer, "getStreamAsBuffer");
|
470
|
+
var arrayBufferToNodeBuffer = /* @__PURE__ */ __name((arrayBuffer) => globalThis.Buffer.from(arrayBuffer), "arrayBufferToNodeBuffer");
|
471
|
+
|
472
|
+
// ../../node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/index.js
|
473
|
+
Object.assign(nodeImports, {
|
474
|
+
on,
|
475
|
+
finished
|
476
|
+
});
|
477
|
+
|
478
|
+
// src/lib/prepareParams.ts
|
479
|
+
import lodashMerge from "lodash.merge";
|
480
|
+
import removeUndefinedObjects from "remove-undefined-objects";
|
481
|
+
var specialHeaders = [
|
482
|
+
"accept",
|
483
|
+
"authorization"
|
484
|
+
];
|
485
|
+
function digestParameters(parameters) {
|
486
|
+
return parameters.reduce((prev, param) => {
|
487
|
+
if ("$ref" in param || "allOf" in param || "anyOf" in param || "oneOf" in param) {
|
488
|
+
throw new Error("The OpenAPI document for this operation wasn't dereferenced before processing.");
|
489
|
+
} else if (param.name in prev) {
|
490
|
+
throw new Error(`The operation you are using has the same parameter, ${param.name}, spread across multiple entry points. We unfortunately can't handle this right now.`);
|
491
|
+
}
|
492
|
+
return Object.assign(prev, {
|
493
|
+
[param.name]: param
|
494
|
+
});
|
495
|
+
}, {});
|
496
|
+
}
|
497
|
+
__name(digestParameters, "digestParameters");
|
498
|
+
function isEmpty(obj) {
|
499
|
+
return [
|
500
|
+
Object,
|
501
|
+
Array
|
502
|
+
].includes((obj || {}).constructor) && !Object.entries(obj || {}).length;
|
503
|
+
}
|
504
|
+
__name(isEmpty, "isEmpty");
|
505
|
+
function isObject(thing) {
|
506
|
+
if (thing instanceof stream.Readable) {
|
507
|
+
return false;
|
508
|
+
}
|
509
|
+
return typeof thing === "object" && thing !== null && !Array.isArray(thing);
|
510
|
+
}
|
511
|
+
__name(isObject, "isObject");
|
512
|
+
function isPrimitive(obj) {
|
513
|
+
return obj === null || typeof obj === "number" || typeof obj === "string";
|
514
|
+
}
|
515
|
+
__name(isPrimitive, "isPrimitive");
|
516
|
+
function merge(src, target) {
|
517
|
+
if (Array.isArray(target)) {
|
518
|
+
return target;
|
519
|
+
} else if (!isObject(target)) {
|
520
|
+
return target;
|
521
|
+
}
|
522
|
+
return lodashMerge(src, target);
|
523
|
+
}
|
524
|
+
__name(merge, "merge");
|
525
|
+
async function processFile(paramName, file) {
|
526
|
+
const fs = await import("node:fs");
|
527
|
+
const path = await import("node:path");
|
528
|
+
const { default: DatauriParser } = await import("datauri/parser.js");
|
529
|
+
const { default: datauri } = await import("datauri/sync.js");
|
530
|
+
if (typeof file === "string") {
|
531
|
+
const resolvedFile = path.resolve(file);
|
532
|
+
return new Promise((resolve, reject) => {
|
533
|
+
fs.stat(resolvedFile, async (err) => {
|
534
|
+
if (err) {
|
535
|
+
if (err.code === "ENOENT") {
|
536
|
+
return resolve(void 0);
|
537
|
+
}
|
538
|
+
return reject(err);
|
539
|
+
}
|
540
|
+
const fileMetadata = await datauri(resolvedFile);
|
541
|
+
const payloadFilename = encodeURIComponent(path.basename(resolvedFile));
|
542
|
+
return resolve({
|
543
|
+
paramName,
|
544
|
+
base64: fileMetadata?.content?.replace(";base64", `;name=${payloadFilename};base64`),
|
545
|
+
filename: payloadFilename,
|
546
|
+
buffer: fileMetadata.buffer
|
547
|
+
});
|
548
|
+
});
|
549
|
+
});
|
550
|
+
} else if (file instanceof stream.Readable) {
|
551
|
+
return getStreamAsBuffer(file).then((buffer) => {
|
552
|
+
const filePath = file.path;
|
553
|
+
const parser = new DatauriParser();
|
554
|
+
const base64 = parser.format(filePath, buffer).content;
|
555
|
+
const payloadFilename = encodeURIComponent(path.basename(filePath));
|
556
|
+
return {
|
557
|
+
paramName,
|
558
|
+
base64: base64?.replace(";base64", `;name=${payloadFilename};base64`),
|
559
|
+
filename: payloadFilename,
|
560
|
+
buffer
|
561
|
+
};
|
562
|
+
});
|
563
|
+
}
|
564
|
+
return Promise.reject(new TypeError(paramName ? `The data supplied for the \`${paramName}\` request body parameter is not a file handler that we support.` : "The data supplied for the request body payload is not a file handler that we support."));
|
565
|
+
}
|
566
|
+
__name(processFile, "processFile");
|
567
|
+
async function prepareParams(operation, body, metadata) {
|
568
|
+
let metadataIntersected = false;
|
569
|
+
const digestedParameters = digestParameters(operation.getParameters());
|
570
|
+
const jsonSchema = operation.getParametersAsJSONSchema();
|
571
|
+
metadata = removeUndefinedObjects(metadata);
|
572
|
+
if (!jsonSchema && (body !== void 0 || metadata !== void 0)) {
|
573
|
+
let throwNoParamsError = true;
|
574
|
+
if (body !== void 0) {
|
575
|
+
if (typeof body === "object" && body !== null && !Array.isArray(body)) {
|
576
|
+
if (Object.keys(body).length <= 2) {
|
577
|
+
const bodyParams = caseless(body);
|
578
|
+
if (specialHeaders.some((header) => bodyParams.has(header))) {
|
579
|
+
throwNoParamsError = false;
|
580
|
+
}
|
581
|
+
}
|
582
|
+
}
|
583
|
+
}
|
584
|
+
if (throwNoParamsError) {
|
585
|
+
throw new Error("You supplied metadata and/or body data for this operation but it doesn't have any documented parameters or request payloads. If you think this is an error please contact support for the API you're using.");
|
586
|
+
}
|
587
|
+
}
|
588
|
+
const jsonSchemaDefaults = jsonSchema ? getJSONSchemaDefaults(jsonSchema) : {};
|
589
|
+
const params = jsonSchemaDefaults;
|
590
|
+
if (typeof body !== "undefined") {
|
591
|
+
if (Array.isArray(body) || isPrimitive(body)) {
|
592
|
+
params.body = merge(params.body, body);
|
593
|
+
} else if (typeof metadata === "undefined") {
|
594
|
+
const headerParams = caseless({});
|
595
|
+
Object.entries(digestedParameters).forEach(([paramName, param]) => {
|
596
|
+
if (param.in === "header") {
|
597
|
+
headerParams.set(paramName, "");
|
598
|
+
}
|
599
|
+
});
|
600
|
+
specialHeaders.forEach((header) => {
|
601
|
+
if (!headerParams.has(header)) {
|
602
|
+
headerParams.set(header, "");
|
603
|
+
}
|
604
|
+
});
|
605
|
+
const intersection = Object.keys(body).filter((value) => {
|
606
|
+
if (Object.keys(digestedParameters).includes(value)) {
|
607
|
+
return true;
|
608
|
+
} else if (headerParams.has(value)) {
|
609
|
+
return true;
|
610
|
+
}
|
611
|
+
return false;
|
612
|
+
}).length;
|
613
|
+
if (intersection && intersection / Object.keys(body).length > 0.25) {
|
614
|
+
metadataIntersected = true;
|
615
|
+
metadata = merge(params.body, body);
|
616
|
+
body = void 0;
|
617
|
+
} else {
|
618
|
+
params.body = merge(params.body, body);
|
619
|
+
}
|
620
|
+
} else {
|
621
|
+
params.body = merge(params.body, body);
|
622
|
+
}
|
623
|
+
}
|
624
|
+
if (!operation.hasRequestBody()) {
|
625
|
+
delete params.body;
|
626
|
+
} else {
|
627
|
+
if (!("body" in params)) params.body = {};
|
628
|
+
const payloadJsonSchema = jsonSchema.find((js) => js.type === "body");
|
629
|
+
if (payloadJsonSchema) {
|
630
|
+
if (!params.files) params.files = {};
|
631
|
+
const conversions = [];
|
632
|
+
if (payloadJsonSchema.schema?.properties) {
|
633
|
+
Object.entries(payloadJsonSchema.schema?.properties).filter(([, schema]) => schema?.format === "binary").filter(([prop]) => Object.keys(params.body).includes(prop)).forEach(([prop]) => {
|
634
|
+
conversions.push(processFile(prop, params.body[prop]));
|
635
|
+
});
|
636
|
+
} else if (payloadJsonSchema.schema?.type === "string") {
|
637
|
+
if (payloadJsonSchema.schema?.format === "binary") {
|
638
|
+
conversions.push(processFile(void 0, params.body));
|
639
|
+
}
|
640
|
+
}
|
641
|
+
await Promise.all(conversions).then((fileMetadata) => fileMetadata.filter(Boolean)).then((fm) => {
|
642
|
+
fm.forEach((fileMetadata) => {
|
643
|
+
if (!fileMetadata) {
|
644
|
+
return;
|
645
|
+
}
|
646
|
+
if (fileMetadata.paramName) {
|
647
|
+
params.body[fileMetadata.paramName] = fileMetadata.base64;
|
648
|
+
} else {
|
649
|
+
params.body = fileMetadata.base64;
|
650
|
+
}
|
651
|
+
if (fileMetadata.buffer && params?.files) {
|
652
|
+
params.files[fileMetadata.filename] = fileMetadata.buffer;
|
653
|
+
}
|
654
|
+
});
|
655
|
+
});
|
656
|
+
}
|
657
|
+
}
|
658
|
+
if (operation.isFormUrlEncoded()) {
|
659
|
+
params.formData = merge(params.formData, params.body);
|
660
|
+
delete params.body;
|
661
|
+
}
|
662
|
+
if (typeof metadata !== "undefined") {
|
663
|
+
if (!("cookie" in params)) params.cookie = {};
|
664
|
+
if (!("header" in params)) params.header = {};
|
665
|
+
if (!("path" in params)) params.path = {};
|
666
|
+
if (!("query" in params)) params.query = {};
|
667
|
+
Object.entries(digestedParameters).forEach(([paramName, param]) => {
|
668
|
+
let value;
|
669
|
+
let metadataHeaderParam;
|
670
|
+
if (typeof metadata === "object" && !isEmpty(metadata)) {
|
671
|
+
if (paramName in metadata) {
|
672
|
+
value = metadata[paramName];
|
673
|
+
metadataHeaderParam = paramName;
|
674
|
+
} else if (param.in === "header") {
|
675
|
+
metadataHeaderParam = Object.keys(metadata).find((k) => k.toLowerCase() === paramName.toLowerCase()) || "";
|
676
|
+
value = metadata[metadataHeaderParam];
|
677
|
+
}
|
678
|
+
}
|
679
|
+
if (value === void 0) {
|
680
|
+
return;
|
681
|
+
}
|
682
|
+
switch (param.in) {
|
683
|
+
case "path":
|
684
|
+
params.path[paramName] = value;
|
685
|
+
if (metadata?.[paramName]) delete metadata[paramName];
|
686
|
+
break;
|
687
|
+
case "query":
|
688
|
+
params.query[paramName] = value;
|
689
|
+
if (metadata?.[paramName]) delete metadata[paramName];
|
690
|
+
break;
|
691
|
+
case "header":
|
692
|
+
params.header[paramName.toLowerCase()] = value;
|
693
|
+
if (metadataHeaderParam && metadata?.[metadataHeaderParam]) delete metadata[metadataHeaderParam];
|
694
|
+
break;
|
695
|
+
case "cookie":
|
696
|
+
params.cookie[paramName] = value;
|
697
|
+
if (metadata?.[paramName]) delete metadata[paramName];
|
698
|
+
break;
|
699
|
+
default:
|
700
|
+
}
|
701
|
+
if (metadataIntersected && operation.isFormUrlEncoded()) {
|
702
|
+
if (paramName in params.formData) {
|
703
|
+
delete params.formData[paramName];
|
704
|
+
}
|
705
|
+
}
|
706
|
+
});
|
707
|
+
if (!isEmpty(metadata)) {
|
708
|
+
if (typeof metadata === "object") {
|
709
|
+
specialHeaders.forEach((headerName) => {
|
710
|
+
const headerParam = Object.keys(metadata || {}).find((m) => m.toLowerCase() === headerName);
|
711
|
+
if (headerParam) {
|
712
|
+
if (typeof metadata === "object") {
|
713
|
+
if (typeof params.header === "object") {
|
714
|
+
params.header[headerName] = metadata[headerParam];
|
715
|
+
}
|
716
|
+
delete metadata[headerParam];
|
717
|
+
}
|
718
|
+
}
|
719
|
+
});
|
720
|
+
}
|
721
|
+
if (operation.isFormUrlEncoded()) {
|
722
|
+
params.formData = merge(params.formData, metadata);
|
723
|
+
} else {
|
724
|
+
}
|
725
|
+
}
|
726
|
+
}
|
727
|
+
[
|
728
|
+
"body",
|
729
|
+
"cookie",
|
730
|
+
"files",
|
731
|
+
"formData",
|
732
|
+
"header",
|
733
|
+
"path",
|
734
|
+
"query"
|
735
|
+
].forEach((type) => {
|
736
|
+
if (type in params && isEmpty(params[type])) {
|
737
|
+
delete params[type];
|
738
|
+
}
|
739
|
+
});
|
740
|
+
return params;
|
741
|
+
}
|
742
|
+
__name(prepareParams, "prepareParams");
|
743
|
+
|
744
|
+
// src/lib/prepareServer.ts
|
745
|
+
function stripTrailingSlash(url) {
|
746
|
+
if (url[url.length - 1] === "/") {
|
747
|
+
return url.slice(0, -1);
|
748
|
+
}
|
749
|
+
return url;
|
750
|
+
}
|
751
|
+
__name(stripTrailingSlash, "stripTrailingSlash");
|
752
|
+
function prepareServer(spec, url, variables = {}) {
|
753
|
+
let serverIdx;
|
754
|
+
const sanitizedUrl = stripTrailingSlash(url);
|
755
|
+
(spec.api.servers || []).forEach((server, i2) => {
|
756
|
+
if (server.url === sanitizedUrl) {
|
757
|
+
serverIdx = i2;
|
758
|
+
}
|
759
|
+
});
|
760
|
+
if (serverIdx !== void 0) {
|
761
|
+
return {
|
762
|
+
selected: serverIdx,
|
763
|
+
variables
|
764
|
+
};
|
765
|
+
} else if (Object.keys(variables).length) {
|
766
|
+
} else {
|
767
|
+
const server = spec.splitVariables(url);
|
768
|
+
if (server) {
|
769
|
+
return {
|
770
|
+
selected: server.selected,
|
771
|
+
variables: server.variables
|
772
|
+
};
|
773
|
+
}
|
774
|
+
}
|
775
|
+
return false;
|
776
|
+
}
|
777
|
+
__name(prepareServer, "prepareServer");
|
778
|
+
|
779
|
+
export {
|
780
|
+
getJSONSchemaDefaults,
|
781
|
+
parseResponse,
|
782
|
+
prepareAuth,
|
783
|
+
prepareParams,
|
784
|
+
prepareServer
|
785
|
+
};
|
786
|
+
//# sourceMappingURL=chunk-HKKQOEV3.js.map
|