From b7c2222092505db2408def1ca1fc5f23d280458b Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Thu, 12 Oct 2023 12:17:53 -0700 Subject: [PATCH 1/2] fix: overhauling schemas to now be stored in a `schemas/` directory --- .../src/codegen/languages/typescript/index.ts | 85 ++++++++++++++----- .../__fixtures__/sdk/simple-ts/schemas.ts | 12 +-- .../sdk/simple-ts/schemas/Category.ts | 3 + .../sdk/simple-ts/schemas/FindPetsByStatus.ts | 5 ++ .../__fixtures__/sdk/simple-ts/schemas/Pet.ts | 6 ++ .../__fixtures__/sdk/simple-ts/schemas/Tag.ts | 3 + .../languages/typescript/index.test.ts | 31 ++++--- 7 files changed, 101 insertions(+), 44 deletions(-) create mode 100644 packages/api/test/__fixtures__/sdk/simple-ts/schemas/Category.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-ts/schemas/FindPetsByStatus.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-ts/schemas/Pet.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-ts/schemas/Tag.ts diff --git a/packages/api/src/codegen/languages/typescript/index.ts b/packages/api/src/codegen/languages/typescript/index.ts index d22b2a93..ab91fade 100644 --- a/packages/api/src/codegen/languages/typescript/index.ts +++ b/packages/api/src/codegen/languages/typescript/index.ts @@ -45,6 +45,20 @@ interface OperationTypeHousing { }; } +/** + * This is the conversion prefix that we add to all `$ref` pointers we find in generated JSON + * Schema. + * + * Because the pointer name is a string we want to have it reference the schema constant we're + * adding into the codegen'd schema file. As there's no way, not even using `eval()` in this case, + * to convert a string to a constant we're prefixing them with this so we can later remove it and + * rewrite the value to a literal. eg. `'Pet'` becomes `Pet`. + * + * And because our TypeScript type name generator properly ignores `:`, this is safe to prepend to + * all generated type names. + */ +const REF_PLACEHOLDER_REGEX = /"::convert::([a-zA-Z_$\\d]*)"/g; + export default class TSGenerator extends CodeGenerator { project: Project; @@ -100,10 +114,6 @@ export default class TSGenerator extends CodeGenerator { }; this.project = new Project({ - manipulationSettings: { - indentationText: IndentationText.TwoSpaces, - quoteKind: QuoteKind.Single, - }, compilerOptions: { // If we're exporting a TypeScript SDK then we don't need to pollute the codegen directory // with unnecessary declaration `.d.ts` files. @@ -120,6 +130,11 @@ export default class TSGenerator extends CodeGenerator { // Basically without this option CJS code will fail. ...(options.compilerTarget === 'cjs' ? { esModuleInterop: true } : {}), }, + manipulationSettings: { + indentationText: IndentationText.TwoSpaces, + quoteKind: QuoteKind.Single, + }, + useInMemoryFileSystem: true, }); this.compilerTarget = options.compilerTarget; @@ -269,9 +284,18 @@ export default class TSGenerator extends CodeGenerator { } return [ - ...this.project.getSourceFiles().map(sourceFile => ({ - [sourceFile.getBaseName()]: sourceFile.getFullText(), - })), + ...this.project.getSourceFiles().map(sourceFile => { + // `getFilePath` will always return a string that contains a preceeding directory separator + // however when we're creating these codegen'd files that may cause us to create that file + // in the root directory (because it's preceeded by a `/`). We don't want that to happen so + // we're slicing off that first character. + let filePath = sourceFile.getFilePath().toString(); + filePath = filePath.substring(1); + + return { + [filePath]: sourceFile.getFullText(), + }; + }), // Because we're returning the raw source files for TS generation we also need to separately // emit out our declaration files so we can put those into a separate file in the installed @@ -452,31 +476,43 @@ sdk.server('https://eu.api.example.com/v14');`), */ private createSchemasFile() { const sourceFile = this.project.createSourceFile('schemas.ts', ''); + const schemasDir = this.project.createDirectory('schemas'); const sortedSchemas = new Map(Array.from(Object.entries(this.schemas)).sort()); Array.from(sortedSchemas).forEach(([schemaName, schema]) => { - sourceFile.addVariableStatement({ + const schemaFile = schemasDir.createSourceFile(`${schemaName}.ts`); + + // Because we're chunking our schemas into a `schemas/` directory we need to add imports + // for these schemas into our main `schemas.ts` file.` + sourceFile.addImportDeclaration({ + defaultImport: schemaName, + moduleSpecifier: `./schemas/${schemaName}`, + }); + + let str = JSON.stringify(schema); + const referencedSchemas = str.match(REF_PLACEHOLDER_REGEX)?.map(s => s.replace(REF_PLACEHOLDER_REGEX, '$1')); + if (referencedSchemas) { + referencedSchemas.forEach(ref => { + // Because this schema is referenced from another file we need to create an `import` + // declaration for it. + schemaFile.addImportDeclaration({ + defaultImport: ref, + moduleSpecifier: `./${ref}`, + }); + }); + } + + // Load the schema into the schema file within the `schemas/` directory. + schemaFile.addVariableStatement({ declarationKind: VariableDeclarationKind.Const, declarations: [ { name: schemaName, initializer: writer => { - /** - * This is the conversion prefix that we add to all `$ref` pointers we find in - * generated JSON Schema. - * - * Because the pointer name is a string we want to have it reference the schema - * constant we're adding into the codegen'd schema file. As there's no way, not even - * using `eval()` in this case, to convert a string to a constant we're prefixing - * them with this so we can later remove it and rewrite the value to a literal. - * eg. `'Pet'` becomes `Pet`. - * - * And because our TypeScript type name generator properly ignores `:`, this is safe - * to prepend to all generated type names. - */ - let str = JSON.stringify(schema); - str = str.replace(/"::convert::([a-zA-Z_$\\d]*)"/g, '$1'); + // We can't have `::convert::` variables within these schema files so we + // need to clean them up. + str = str.replace(REF_PLACEHOLDER_REGEX, '$1'); writer.writeLine(`${str} as const`); return writer; @@ -484,8 +520,11 @@ sdk.server('https://eu.api.example.com/v14');`), }, ], }); + + schemaFile.addStatements(`export default ${schemaName}`); }); + // Export all of our schemas from inside the main `schemas.ts` file. sourceFile.addStatements(`export { ${Array.from(sortedSchemas.keys()).join(', ')} }`); return sourceFile; diff --git a/packages/api/test/__fixtures__/sdk/simple-ts/schemas.ts b/packages/api/test/__fixtures__/sdk/simple-ts/schemas.ts index a0e1b7ef..52b10229 100644 --- a/packages/api/test/__fixtures__/sdk/simple-ts/schemas.ts +++ b/packages/api/test/__fixtures__/sdk/simple-ts/schemas.ts @@ -1,9 +1,5 @@ -const Category = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"name":{"type":"string"}},"title":"Category","x-readme-ref-name":"Category"} as const -; -const FindPetsByStatus = {"metadata":{"allOf":[{"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available","description":"Default: available"},"$schema":"http://json-schema.org/draft-04/schema#","description":"Status values that need to be considered for filter"}},"required":["status"]}]},"response":{"200":{"type":"array","items":Pet,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const Pet = {"type":"object","required":["name","photoUrls"],"properties":{"id":{"type":"integer","format":"int64","readOnly":true,"default":40,"examples":[25],"minimum":-9223372036854776000,"maximum":9223372036854776000},"category":Category,"name":{"type":"string","examples":["doggie"]},"photoUrls":{"type":"array","items":{"type":"string","examples":["https://example.com/photo.png"]}},"tags":{"type":"array","items":Tag},"status":{"type":"string","description":"pet status in the store\n\n`available` `pending` `sold`","enum":["available","pending","sold"]}},"title":"Pet","x-readme-ref-name":"Pet"} as const -; -const Tag = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"name":{"type":"string"}},"title":"Tag","x-readme-ref-name":"Tag"} as const -; +import Category from './schemas/Category'; +import FindPetsByStatus from './schemas/FindPetsByStatus'; +import Pet from './schemas/Pet'; +import Tag from './schemas/Tag'; export { Category, FindPetsByStatus, Pet, Tag } diff --git a/packages/api/test/__fixtures__/sdk/simple-ts/schemas/Category.ts b/packages/api/test/__fixtures__/sdk/simple-ts/schemas/Category.ts new file mode 100644 index 00000000..48b4d2da --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-ts/schemas/Category.ts @@ -0,0 +1,3 @@ +const Category = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"name":{"type":"string"}},"title":"Category","x-readme-ref-name":"Category"} as const +; +export default Category diff --git a/packages/api/test/__fixtures__/sdk/simple-ts/schemas/FindPetsByStatus.ts b/packages/api/test/__fixtures__/sdk/simple-ts/schemas/FindPetsByStatus.ts new file mode 100644 index 00000000..5d482b3d --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-ts/schemas/FindPetsByStatus.ts @@ -0,0 +1,5 @@ +import Pet from './Pet'; + +const FindPetsByStatus = {"metadata":{"allOf":[{"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available","description":"Default: available"},"$schema":"http://json-schema.org/draft-04/schema#","description":"Status values that need to be considered for filter"}},"required":["status"]}]},"response":{"200":{"type":"array","items":Pet,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default FindPetsByStatus diff --git a/packages/api/test/__fixtures__/sdk/simple-ts/schemas/Pet.ts b/packages/api/test/__fixtures__/sdk/simple-ts/schemas/Pet.ts new file mode 100644 index 00000000..ce8540a9 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-ts/schemas/Pet.ts @@ -0,0 +1,6 @@ +import Category from './Category'; +import Tag from './Tag'; + +const Pet = {"type":"object","required":["name","photoUrls"],"properties":{"id":{"type":"integer","format":"int64","readOnly":true,"default":40,"examples":[25],"minimum":-9223372036854776000,"maximum":9223372036854776000},"category":Category,"name":{"type":"string","examples":["doggie"]},"photoUrls":{"type":"array","items":{"type":"string","examples":["https://example.com/photo.png"]}},"tags":{"type":"array","items":Tag},"status":{"type":"string","description":"pet status in the store\n\n`available` `pending` `sold`","enum":["available","pending","sold"]}},"title":"Pet","x-readme-ref-name":"Pet"} as const +; +export default Pet diff --git a/packages/api/test/__fixtures__/sdk/simple-ts/schemas/Tag.ts b/packages/api/test/__fixtures__/sdk/simple-ts/schemas/Tag.ts new file mode 100644 index 00000000..615141dc --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-ts/schemas/Tag.ts @@ -0,0 +1,3 @@ +const Tag = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"name":{"type":"string"}},"title":"Tag","x-readme-ref-name":"Tag"} as const +; +export default Tag diff --git a/packages/api/test/codegen/languages/typescript/index.test.ts b/packages/api/test/codegen/languages/typescript/index.test.ts index 9992be81..75b71e73 100644 --- a/packages/api/test/codegen/languages/typescript/index.test.ts +++ b/packages/api/test/codegen/languages/typescript/index.test.ts @@ -23,20 +23,25 @@ function assertSDKFixture(file: string, fixture: string, opts: TSGeneratorOption // Determine if the generated code matches what we've got in our fixture. const dir = path.resolve(path.join(__dirname, '..', '..', '..', '__fixtures__', 'sdk', fixture)); - - let expectedFiles: string[]; - try { - expectedFiles = await fs.readdir(dir); - } catch (err) { - /** - * @todo it'd be cool if we could supply this with a `--update` arg to create the fixture dir - */ - throw new Error(`No SDK fixture directory exists for "${fixture}"`); - } + const expectedFiles = await fs + .readdir(dir, { recursive: true }) + .then(files => { + files.sort(); + + // The `schemas` directory comes back to us from `fs.readdir` but because we're doing a + // recursive lookup on that we also get `schemas/`. We only care about the + // schema file itself, not the general directory, so we need to exclude this from our list + // of expected files. + return files.filter(f => f !== 'schemas'); + }) + .catch(() => { + /** + * @todo it'd be cool if we could supply this with a `--update` arg to create the fixture dir + */ + throw new Error(`No SDK fixture directory exists for "${fixture}"`); + }); // Assert that the files we're generating are what we're expecting in the fixture directory. - // We're sorting this data because `index.d.ts` files are generated last but are first in the - // filesystem. const sortedActualFiles = Object.keys(actualFiles); sortedActualFiles.sort(); expect(sortedActualFiles).toStrictEqual(expectedFiles); @@ -118,7 +123,7 @@ describe('typescript', () => { }); describe('#generator', () => { - it( + it.only( 'should generate typescript (by default)', assertSDKFixture('@api/test-utils/definitions/simple.json', 'simple-ts'), ); From 144776a7afc75a92a188abf48e085b8e094e6c67 Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Thu, 12 Oct 2023 16:21:54 -0700 Subject: [PATCH 2/2] fix(api): nestling generated schemas into a new `schemas/` directory --- .../src/codegen/languages/typescript/index.ts | 1 + .../api/test/__fixtures__/sdk/alby/schemas.ts | 228 ++++++------------ .../sdk/alby/schemas/AmqpExternalRulePatch.ts | 5 + .../sdk/alby/schemas/AmqpExternalRulePost.ts | 5 + .../alby/schemas/AmqpExternalRuleResponse.ts | 5 + .../sdk/alby/schemas/AmqpRulePatch.ts | 5 + .../sdk/alby/schemas/AmqpRulePost.ts | 5 + .../sdk/alby/schemas/AmqpRuleResponse.ts | 5 + .../__fixtures__/sdk/alby/schemas/AppPatch.ts | 3 + .../sdk/alby/schemas/AppPkcs12.ts | 3 + .../__fixtures__/sdk/alby/schemas/AppPost.ts | 3 + .../sdk/alby/schemas/AppResponse.ts | 3 + .../sdk/alby/schemas/AwsAccessKeys.ts | 3 + .../sdk/alby/schemas/AwsAccessKeysResponse.ts | 3 + .../sdk/alby/schemas/AwsAssumeRole.ts | 3 + .../sdk/alby/schemas/AwsKinesisRulePatch.ts | 7 + .../sdk/alby/schemas/AwsKinesisRulePost.ts | 7 + .../alby/schemas/AwsKinesisRuleResponse.ts | 7 + .../sdk/alby/schemas/AwsLambdaRulePatch.ts | 7 + .../sdk/alby/schemas/AwsLambdaRulePost.ts | 7 + .../sdk/alby/schemas/AwsLambdaRuleResponse.ts | 7 + .../sdk/alby/schemas/AwsSqsRulePatch.ts | 7 + .../sdk/alby/schemas/AwsSqsRulePost.ts | 7 + .../sdk/alby/schemas/AwsSqsRuleResponse.ts | 7 + .../alby/schemas/AzureFunctionRulePatch.ts | 5 + .../sdk/alby/schemas/AzureFunctionRulePost.ts | 5 + .../alby/schemas/AzureFunctionRuleResponse.ts | 5 + .../alby/schemas/CloudflareWorkerRulePatch.ts | 5 + .../alby/schemas/CloudflareWorkerRulePost.ts | 5 + .../schemas/CloudflareWorkerRuleResponse.ts | 5 + .../DeleteAppsAppIdNamespacesNamespaceId.ts | 3 + .../schemas/DeleteAppsAppIdQueuesQueueId.ts | 3 + .../schemas/DeleteAppsAppIdRulesRuleId.ts | 3 + .../sdk/alby/schemas/DeleteAppsId.ts | 3 + .../__fixtures__/sdk/alby/schemas/Error.ts | 3 + .../alby/schemas/GetAccountsAccountIdApps.ts | 5 + .../sdk/alby/schemas/GetAppsAppIdKeys.ts | 5 + .../alby/schemas/GetAppsAppIdNamespaces.ts | 5 + .../sdk/alby/schemas/GetAppsAppIdQueues.ts | 5 + .../sdk/alby/schemas/GetAppsAppIdRules.ts | 5 + .../alby/schemas/GetAppsAppIdRulesRuleId.ts | 3 + .../schemas/GoogleCloudFunctionRulePatch.ts | 5 + .../schemas/GoogleCloudFunctionRulePost.ts | 5 + .../GoogleCloudFunctionRuleResponse.ts | 5 + .../sdk/alby/schemas/HttpRulePatch.ts | 5 + .../sdk/alby/schemas/HttpRulePost.ts | 5 + .../sdk/alby/schemas/HttpRuleResponse.ts | 5 + .../sdk/alby/schemas/IftttRulePatch.ts | 3 + .../sdk/alby/schemas/IftttRulePost.ts | 5 + .../sdk/alby/schemas/IftttRuleResponse.ts | 5 + .../__fixtures__/sdk/alby/schemas/KeyPatch.ts | 3 + .../__fixtures__/sdk/alby/schemas/KeyPost.ts | 3 + .../sdk/alby/schemas/KeyResponse.ts | 3 + .../test/__fixtures__/sdk/alby/schemas/Me.ts | 3 + .../sdk/alby/schemas/NamespacePatch.ts | 3 + .../sdk/alby/schemas/NamespacePost.ts | 3 + .../sdk/alby/schemas/NamespaceResponse.ts | 3 + .../alby/schemas/PatchAppsAppIdKeysKeyId.ts | 3 + .../PatchAppsAppIdNamespacesNamespaceId.ts | 3 + .../alby/schemas/PatchAppsAppIdRulesRuleId.ts | 3 + .../sdk/alby/schemas/PatchAppsId.ts | 3 + .../alby/schemas/PostAccountsAccountIdApps.ts | 3 + .../sdk/alby/schemas/PostAppsAppIdKeys.ts | 3 + .../schemas/PostAppsAppIdKeysKeyIdRevoke.ts | 3 + .../alby/schemas/PostAppsAppIdNamespaces.ts | 3 + .../sdk/alby/schemas/PostAppsAppIdQueues.ts | 3 + .../sdk/alby/schemas/PostAppsAppIdRules.ts | 3 + .../sdk/alby/schemas/PostAppsIdPkcs12.ts | 3 + .../__fixtures__/sdk/alby/schemas/Queue.ts | 3 + .../sdk/alby/schemas/QueueResponse.ts | 3 + .../sdk/alby/schemas/RulePatch.ts | 15 ++ .../__fixtures__/sdk/alby/schemas/RulePost.ts | 16 ++ .../sdk/alby/schemas/RuleResponse.ts | 15 ++ .../sdk/alby/schemas/RuleSource.ts | 3 + .../alby/schemas/UnsupportedRuleResponse.ts | 5 + .../sdk/alby/schemas/ZapierRulePatch.ts | 5 + .../sdk/alby/schemas/ZapierRulePost.ts | 5 + .../sdk/alby/schemas/ZapierRuleResponse.ts | 5 + .../sdk/optional-payload/schemas.ts | 3 +- .../schemas/UpdatePetWithForm.ts | 3 + .../test/__fixtures__/sdk/petstore/schemas.ts | 63 ++--- .../sdk/petstore/schemas/ApiResponse.ts | 3 + .../sdk/petstore/schemas/Category.ts | 3 + .../schemas/CreateUsersWithArrayInput.ts | 5 + .../schemas/CreateUsersWithListInput.ts | 5 + .../sdk/petstore/schemas/DeleteOrder.ts | 3 + .../sdk/petstore/schemas/DeletePet.ts | 3 + .../sdk/petstore/schemas/DeleteUser.ts | 3 + .../sdk/petstore/schemas/FindPetsByStatus.ts | 5 + .../sdk/petstore/schemas/FindPetsByTags.ts | 5 + .../sdk/petstore/schemas/GetInventory.ts | 3 + .../sdk/petstore/schemas/GetOrderById.ts | 3 + .../sdk/petstore/schemas/GetPetById.ts | 3 + .../sdk/petstore/schemas/GetUserByName.ts | 3 + .../sdk/petstore/schemas/LoginUser.ts | 3 + .../sdk/petstore/schemas/Order.ts | 3 + .../__fixtures__/sdk/petstore/schemas/Pet.ts | 6 + .../__fixtures__/sdk/petstore/schemas/Tag.ts | 3 + .../sdk/petstore/schemas/UpdatePetWithForm.ts | 3 + .../sdk/petstore/schemas/UpdateUser.ts | 3 + .../sdk/petstore/schemas/UploadFile.ts | 3 + .../__fixtures__/sdk/petstore/schemas/User.ts | 3 + .../test/__fixtures__/sdk/readme/schemas.ts | 207 ++++++---------- .../__fixtures__/sdk/readme/schemas/Apply.ts | 3 + .../sdk/readme/schemas/Category.ts | 3 + .../sdk/readme/schemas/Changelog.ts | 3 + .../readme/schemas/CondensedProjectData.ts | 3 + .../sdk/readme/schemas/CreateCategory.ts | 3 + .../sdk/readme/schemas/CreateCustomPage.ts | 7 + .../sdk/readme/schemas/CreateDoc.ts | 7 + .../sdk/readme/schemas/CreateVersion.ts | 10 + .../sdk/readme/schemas/CustomPage.ts | 3 + .../readme/schemas/DeleteApiSpecification.ts | 7 + .../sdk/readme/schemas/DeleteCategory.ts | 3 + .../sdk/readme/schemas/DeleteChangelog.ts | 3 + .../sdk/readme/schemas/DeleteCustomPage.ts | 7 + .../sdk/readme/schemas/DeleteDoc.ts | 7 + .../sdk/readme/schemas/DeleteVersion.ts | 7 + .../sdk/readme/schemas/DocSchemaPost.ts | 3 + .../sdk/readme/schemas/DocSchemaPut.ts | 3 + .../sdk/readme/schemas/DocSchemaResponse.ts | 3 + .../sdk/readme/schemas/ErrorApikeyEmpty.ts | 3 + .../sdk/readme/schemas/ErrorApikeyMismatch.ts | 3 + .../sdk/readme/schemas/ErrorApikeyNotfound.ts | 3 + .../readme/schemas/ErrorCategoryInvalid.ts | 3 + .../readme/schemas/ErrorCategoryNotfound.ts | 3 + .../readme/schemas/ErrorCustompageInvalid.ts | 3 + .../readme/schemas/ErrorCustompageNotfound.ts | 3 + .../sdk/readme/schemas/ErrorDocInvalid.ts | 3 + .../sdk/readme/schemas/ErrorDocNotfound.ts | 3 + .../readme/schemas/ErrorRegistryNotfound.ts | 3 + .../sdk/readme/schemas/ErrorSpecFileEmpty.ts | 3 + .../readme/schemas/ErrorSpecIdDuplicate.ts | 3 + .../sdk/readme/schemas/ErrorSpecIdInvalid.ts | 3 + .../sdk/readme/schemas/ErrorSpecInvalid.ts | 3 + .../readme/schemas/ErrorSpecInvalidSchema.ts | 3 + .../sdk/readme/schemas/ErrorSpecNotfound.ts | 3 + .../sdk/readme/schemas/ErrorSpecTimeout.ts | 3 + .../schemas/ErrorSpecVersionNotfound.ts | 3 + .../schemas/ErrorVersionCantDemoteStable.ts | 3 + .../schemas/ErrorVersionCantRemoveStable.ts | 3 + .../readme/schemas/ErrorVersionDuplicate.ts | 3 + .../sdk/readme/schemas/ErrorVersionEmpty.ts | 3 + .../readme/schemas/ErrorVersionForkEmpty.ts | 3 + .../schemas/ErrorVersionForkNotfound.ts | 3 + .../readme/schemas/ErrorVersionNotfound.ts | 3 + .../sdk/readme/schemas/GetApiRegistry.ts | 3 + .../sdk/readme/schemas/GetApiSchema.ts | 3 + .../sdk/readme/schemas/GetApiSpecification.ts | 7 + .../sdk/readme/schemas/GetCategories.ts | 3 + .../sdk/readme/schemas/GetCategory.ts | 3 + .../sdk/readme/schemas/GetCategoryDocs.ts | 3 + .../sdk/readme/schemas/GetChangelog.ts | 3 + .../sdk/readme/schemas/GetChangelogs.ts | 3 + .../sdk/readme/schemas/GetCustomPage.ts | 7 + .../sdk/readme/schemas/GetCustomPages.ts | 7 + .../__fixtures__/sdk/readme/schemas/GetDoc.ts | 7 + .../sdk/readme/schemas/GetOpenRoles.ts | 5 + .../sdk/readme/schemas/GetProductionDoc.ts | 7 + .../sdk/readme/schemas/GetProject.ts | 7 + .../sdk/readme/schemas/GetVersion.ts | 7 + .../sdk/readme/schemas/GetVersions.ts | 7 + .../sdk/readme/schemas/JobOpening.ts | 3 + .../sdk/readme/schemas/SearchDocs.ts | 7 + .../readme/schemas/UpdateApiSpecification.ts | 13 + .../sdk/readme/schemas/UpdateCategory.ts | 3 + .../sdk/readme/schemas/UpdateChangelog.ts | 3 + .../sdk/readme/schemas/UpdateCustomPage.ts | 7 + .../sdk/readme/schemas/UpdateDoc.ts | 7 + .../sdk/readme/schemas/UpdateVersion.ts | 7 + .../readme/schemas/UploadApiSpecification.ts | 11 + .../sdk/readme/schemas/Version.ts | 3 + .../sdk/response-title-quirks/schemas.ts | 3 +- .../schemas/GetAnything.ts | 3 + .../sdk/simple-js-cjs/Category.d.ts | 17 ++ .../sdk/simple-js-cjs/Category.js | 4 + .../sdk/simple-js-cjs/FindPetsByStatus.d.ts | 96 ++++++++ .../sdk/simple-js-cjs/FindPetsByStatus.js | 8 + .../__fixtures__/sdk/simple-js-cjs/Pet.d.ts | 69 ++++++ .../__fixtures__/sdk/simple-js-cjs/Pet.js | 9 + .../__fixtures__/sdk/simple-js-cjs/Tag.d.ts | 17 ++ .../__fixtures__/sdk/simple-js-cjs/Tag.js | 4 + .../sdk/simple-js-cjs/schemas.d.ts | 199 +-------------- .../sdk/simple-js-esm/Category.d.ts | 17 ++ .../sdk/simple-js-esm/Category.js | 2 + .../sdk/simple-js-esm/FindPetsByStatus.d.ts | 96 ++++++++ .../sdk/simple-js-esm/FindPetsByStatus.js | 3 + .../__fixtures__/sdk/simple-js-esm/Pet.d.ts | 69 ++++++ .../__fixtures__/sdk/simple-js-esm/Pet.js | 4 + .../__fixtures__/sdk/simple-js-esm/Tag.d.ts | 17 ++ .../__fixtures__/sdk/simple-js-esm/Tag.js | 2 + .../sdk/simple-js-esm/schemas.d.ts | 199 +-------------- .../languages/typescript/index.test.ts | 2 +- 193 files changed, 1357 insertions(+), 727 deletions(-) create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AppPatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AppPkcs12.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AppPost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AppResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsAccessKeys.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsAccessKeysResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsAssumeRole.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdNamespacesNamespaceId.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdQueuesQueueId.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdRulesRuleId.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsId.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/Error.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/GetAccountsAccountIdApps.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdKeys.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdNamespaces.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdQueues.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdRules.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdRulesRuleId.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/HttpRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/HttpRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/HttpRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/IftttRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/IftttRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/IftttRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/KeyPatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/KeyPost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/KeyResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/Me.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/NamespacePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/NamespacePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/NamespaceResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdKeysKeyId.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdNamespacesNamespaceId.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdRulesRuleId.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsId.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PostAccountsAccountIdApps.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdKeys.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdKeysKeyIdRevoke.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdNamespaces.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdQueues.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdRules.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsIdPkcs12.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/Queue.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/QueueResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/RulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/RulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/RuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/RuleSource.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/UnsupportedRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRulePatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRulePost.ts create mode 100644 packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRuleResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/optional-payload/schemas/UpdatePetWithForm.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/ApiResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/Category.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/CreateUsersWithArrayInput.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/CreateUsersWithListInput.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/DeleteOrder.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/DeletePet.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/DeleteUser.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/FindPetsByStatus.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/FindPetsByTags.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/GetInventory.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/GetOrderById.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/GetPetById.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/GetUserByName.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/LoginUser.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/Order.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/Pet.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/Tag.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/UpdatePetWithForm.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/UpdateUser.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/UploadFile.ts create mode 100644 packages/api/test/__fixtures__/sdk/petstore/schemas/User.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/Apply.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/Category.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/Changelog.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/CondensedProjectData.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/CreateCategory.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/CreateCustomPage.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/CreateDoc.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/CreateVersion.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/CustomPage.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/DeleteApiSpecification.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/DeleteCategory.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/DeleteChangelog.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/DeleteCustomPage.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/DeleteDoc.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/DeleteVersion.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaPost.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaPut.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaResponse.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyEmpty.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyMismatch.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyNotfound.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCategoryInvalid.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCategoryNotfound.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCustompageInvalid.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCustompageNotfound.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorDocInvalid.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorDocNotfound.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorRegistryNotfound.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecFileEmpty.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecIdDuplicate.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecIdInvalid.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecInvalid.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecInvalidSchema.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecNotfound.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecTimeout.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecVersionNotfound.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionCantDemoteStable.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionCantRemoveStable.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionDuplicate.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionEmpty.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionForkEmpty.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionForkNotfound.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionNotfound.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetApiRegistry.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetApiSchema.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetApiSpecification.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetCategories.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetCategory.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetCategoryDocs.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetChangelog.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetChangelogs.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetCustomPage.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetCustomPages.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetDoc.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetOpenRoles.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetProductionDoc.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetProject.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetVersion.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/GetVersions.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/JobOpening.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/SearchDocs.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/UpdateApiSpecification.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/UpdateCategory.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/UpdateChangelog.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/UpdateCustomPage.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/UpdateDoc.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/UpdateVersion.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/UploadApiSpecification.ts create mode 100644 packages/api/test/__fixtures__/sdk/readme/schemas/Version.ts create mode 100644 packages/api/test/__fixtures__/sdk/response-title-quirks/schemas/GetAnything.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-cjs/Category.d.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-cjs/Category.js create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-cjs/FindPetsByStatus.d.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-cjs/FindPetsByStatus.js create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-cjs/Pet.d.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-cjs/Pet.js create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-cjs/Tag.d.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-cjs/Tag.js create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-esm/Category.d.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-esm/Category.js create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-esm/FindPetsByStatus.d.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-esm/FindPetsByStatus.js create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-esm/Pet.d.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-esm/Pet.js create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-esm/Tag.d.ts create mode 100644 packages/api/test/__fixtures__/sdk/simple-js-esm/Tag.js diff --git a/packages/api/src/codegen/languages/typescript/index.ts b/packages/api/src/codegen/languages/typescript/index.ts index ab91fade..0e70f1b0 100644 --- a/packages/api/src/codegen/languages/typescript/index.ts +++ b/packages/api/src/codegen/languages/typescript/index.ts @@ -493,6 +493,7 @@ sdk.server('https://eu.api.example.com/v14');`), let str = JSON.stringify(schema); const referencedSchemas = str.match(REF_PLACEHOLDER_REGEX)?.map(s => s.replace(REF_PLACEHOLDER_REGEX, '$1')); if (referencedSchemas) { + referencedSchemas.sort(); referencedSchemas.forEach(ref => { // Because this schema is referenced from another file we need to create an `import` // declaration for it. diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas.ts b/packages/api/test/__fixtures__/sdk/alby/schemas.ts index 1a43dbc2..0edb8a42 100644 --- a/packages/api/test/__fixtures__/sdk/alby/schemas.ts +++ b/packages/api/test/__fixtures__/sdk/alby/schemas.ts @@ -1,153 +1,77 @@ -const AmqpExternalRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP external (using Firehose). See the Ably documentation for further information.","enum":["amqp/external"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"mandatoryRoute":{"description":"Reject delivery of the message if the route does not exist, otherwise fail silently.","type":"boolean"},"messageTtl":{"description":"You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.","type":"integer"},"persistentMessages":{"description":"Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.","type":"boolean"},"routingKey":{"description":"The AMQP routing key. See this Ably knowledge base article for details.","type":"string"},"url":{"type":"string"}},"type":"object"}},"type":"object","title":"amqp_external_rule_patch","x-readme-ref-name":"amqp_external_rule_patch"} as const -; -const AmqpExternalRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP external (using Firehose). See the documentation for further information.","enum":["amqp/external"],"type":"string"},"source":RuleSource,"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"mandatoryRoute":{"description":"Reject delivery of the message if the route does not exist, otherwise fail silently.","type":"boolean"},"messageTtl":{"description":"You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.","type":"integer"},"persistentMessages":{"description":"Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.","type":"boolean"},"routingKey":{"description":"The AMQP routing key. See this Ably knowledge base article for details.","type":"string"},"url":{"type":"string"}},"required":["url","routingKey","mandatoryRoute","persistentMessages"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"amqp_external_rule_post","x-readme-ref-name":"amqp_external_rule_post"} as const -; -const AmqpExternalRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP external (using Firehose). See the Ably documentation for further information.\n\n`amqp/external`","enum":["amqp/external"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"mandatoryRoute":{"description":"Reject delivery of the message if the route does not exist, otherwise fail silently.","type":"boolean"},"messageTtl":{"description":"You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.","type":"integer"},"persistentMessages":{"description":"Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.","type":"boolean"},"routingKey":{"description":"The AMQP routing key. See this Ably knowledge base article for details.","type":"string"},"url":{"type":"string"}},"required":["url","routingKey","mandatoryRoute","persistentMessages"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"amqp_external_rule_response","x-readme-ref-name":"amqp_external_rule_response"} as const -; -const AmqpRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP. See the documentation for further information.","enum":["amqp"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"queueId":{"type":"string"}},"type":"object"}},"type":"object","title":"amqp_rule_patch","x-readme-ref-name":"amqp_rule_patch"} as const -; -const AmqpRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP. See the documentation for further information.","enum":["amqp"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"queueId":{"type":"string"}},"required":["queueId"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"amqp_rule_post","x-readme-ref-name":"amqp_rule_post"} as const -; -const AmqpRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP. See the documentation for further information.\n\n`amqp`","enum":["amqp"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"queueId":{"type":"string"}},"required":["queueId"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"amqp_rule_response","x-readme-ref-name":"amqp_rule_response"} as const -; -const AppPatch = {"additionalProperties":false,"properties":{"apnsCertificate":{"description":"The Apple Push Notification service certificate.","type":["string","null"]},"apnsPrivateKey":{"description":"The Apple Push Notification service private key.","type":["string","null"]},"apnsUseSandboxEndpoint":{"description":"The Apple Push Notification service sandbox endpoint.","type":["boolean","null"]},"fcmKey":{"description":"The Firebase Cloud Messaging key.","type":["string","null"],"examples":[false]},"name":{"description":"The name of the application for your reference only.","type":"string","examples":["My App"]},"status":{"description":"The status of the application. Can be `enabled` or `disabled`. Enabled means available to accept inbound connections and all services are available.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"tlsOnly":{"description":"Enforce TLS for all connections.","type":["boolean","null"],"examples":[true]}},"type":"object","title":"app_patch","x-readme-ref-name":"app_patch"} as const -; -const AppPkcs12 = {"additionalProperties":false,"properties":{"p12File":{"description":"The `.p12` file containing the app's APNs information.","format":"binary","type":"string"},"p12Pass":{"description":"The password for the corresponding `.p12` file.","type":"string"}},"required":["p12File","p12Pass"],"type":"object","title":"app_pkcs12","x-readme-ref-name":"app_pkcs12"} as const -; -const AppPost = {"additionalProperties":false,"properties":{"apnsCertificate":{"description":"The Apple Push Notification service certificate.","type":["string","null"]},"apnsPrivateKey":{"description":"The Apple Push Notification service private key.","type":["string","null"]},"apnsUseSandboxEndpoint":{"description":"The Apple Push Notification service sandbox endpoint.","type":["boolean","null"]},"fcmKey":{"description":"The Firebase Cloud Messaging key.","type":["string","null"],"examples":[false]},"name":{"description":"The name of the application for your reference only.","type":"string","examples":["My App"]},"status":{"description":"The status of the application. Can be `enabled` or `disabled`. Enabled means available to accept inbound connections and all services are available.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"tlsOnly":{"description":"Enforce TLS for all connections.","type":["boolean","null"],"examples":[true]}},"required":["name"],"type":"object","title":"app_post","x-readme-ref-name":"app_post"} as const -; -const AppResponse = {"additionalProperties":false,"properties":{"_links":{"description":"A link self-referencing the app that has been created.","type":["object","null"],"additionalProperties":true},"accountId":{"description":"The ID of your Ably account.","type":"string","examples":["WgRpOB"]},"apnsUseSandboxEndpoint":{"description":"Apple Push Notification service endpoint.","type":["boolean","null"],"examples":[false]},"id":{"description":"The application ID.","type":"string","examples":["28AB6x"]},"name":{"description":"The application name.","type":"string","examples":["Default"]},"status":{"description":"The application status. Disabled applications will not accept new connections and will return an error to all clients.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"tlsOnly":{"description":"Enforce TLS for all connections. This setting overrides any channel setting.","type":["boolean","null"],"examples":[true]}},"type":"object","title":"app_response","x-readme-ref-name":"app_response"} as const -; -const AwsAccessKeys = {"additionalProperties":false,"properties":{"accessKeyId":{"description":"The AWS key ID for the AWS IAM user. See this Ably knowledge base article for details.","type":"string"},"authenticationMode":{"description":"Authentication method is using AWS credentials (AWS key ID and secret key).","enum":["credentials"],"type":"string"},"secretAccessKey":{"description":"The AWS secret key for the AWS IAM user. See this Ably knowledge base article for details.","type":"string"}},"required":["accessKeyId","secretAccessKey"],"type":"object","title":"aws_access_keys","x-readme-ref-name":"aws_access_keys"} as const -; -const AwsAccessKeysResponse = {"additionalProperties":false,"properties":{"accessKeyId":{"description":"The AWS key ID for the AWS IAM user. See this Ably knowledge base article for details.","type":"string"},"authenticationMode":{"description":"Authentication method is using AWS credentials (AWS key ID and secret key).\n\n`credentials`","enum":["credentials"],"type":"string"}},"type":"object","title":"aws_access_keys_response","x-readme-ref-name":"aws_access_keys_response"} as const -; -const AwsAssumeRole = {"additionalProperties":false,"properties":{"assumeRoleArn":{"description":"If you are using the \"ARN of an assumable role\" authentication method, this is your Assume Role ARN. See this Ably knowledge base article for details.","type":"string"},"authenticationMode":{"description":"Authentication method is using the ARN of an assumable role. See this Ably knowledge base article for details.\n\n`assumeRole`","enum":["assumeRole"],"type":"string"}},"required":["assumeRoleArn"],"type":"object","title":"aws_assume_role","x-readme-ref-name":"aws_assume_role"} as const -; -const AwsKinesisRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Kinesis. See the documentation for further information.","enum":["aws/kinesis"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"partitionKey":{"description":"The AWS Kinesis partition key. See this Ably knowledge base article for details.","type":"string"},"region":{"description":"The region is which AWS Kinesis is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]},"streamName":{"description":"The name of your AWS Kinesis Stream.","type":"string"}},"type":"object"}},"type":"object","title":"aws_kinesis_rule_patch","x-readme-ref-name":"aws_kinesis_rule_patch"} as const -; -const AwsKinesisRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Kinesis. See the documentation for further information.","enum":["aws/kinesis"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"partitionKey":{"description":"The AWS Kinesis partition key. See this Ably knowledge base article for details.","type":"string"},"region":{"description":"The region is which AWS Kinesis is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]},"streamName":{"description":"The name of your AWS Kinesis Stream.","type":"string"}},"required":["region","streamName","partitionKey","authentication","format"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_kinesis_rule_post","x-readme-ref-name":"aws_kinesis_rule_post"} as const -; -const AwsKinesisRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Kinesis. See the documentation for further information.\n\n`aws/kinesis`","enum":["aws/kinesis"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys_response"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeysResponse,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.\n\n`json`","enum":["json"],"type":"string"},"partitionKey":{"description":"The AWS Kinesis partition key. See this Ably knowledge base article for details.","type":"string"},"region":{"description":"The region is which AWS Kinesis is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]},"streamName":{"description":"The name of your AWS Kinesis Stream.","type":"string"}},"required":["region","streamName","partitionKey","authentication","format"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_kinesis_rule_response","x-readme-ref-name":"aws_kinesis_rule_response"} as const -; -const AwsLambdaRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Lambda. See the Ably documentation for further information.","enum":["aws/lambda"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"functionName":{"description":"The name of your AWS Lambda Function.","type":"string"},"region":{"description":"The region is which your AWS Lambda Function is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","functionName","authentication"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_lambda_rule_patch","x-readme-ref-name":"aws_lambda_rule_patch"} as const -; -const AwsLambdaRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Lambda. See the documentation for further information.","enum":["aws/lambda"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"functionName":{"description":"The name of your AWS Lambda Function.","type":"string"},"region":{"description":"The region is which your AWS Lambda Function is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","functionName","authentication"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_lambda_rule_post","x-readme-ref-name":"aws_lambda_rule_post"} as const -; -const AwsLambdaRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Lambda. See the documentation for further information.\n\n`aws/lambda`","enum":["aws/lambda"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys_response"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeysResponse,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"functionName":{"description":"The name of your AWS Lambda Function.","type":"string"},"region":{"description":"The region is which your AWS Lambda Function is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","functionName","authentication"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_lambda_rule_response","x-readme-ref-name":"aws_lambda_rule_response"} as const -; -const AwsSqsRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS SQS. See the documentation for further information.","enum":["aws/sqs"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"awsAccountId":{"description":"Your AWS account ID.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"queueName":{"description":"The AWS SQS queue name.","type":"string"},"region":{"description":"The region is which AWS SQS is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"type":"object"}},"type":"object","title":"aws_sqs_rule_patch","x-readme-ref-name":"aws_sqs_rule_patch"} as const -; -const AwsSqsRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS SQS. See the documentation for further information.","enum":["aws/sqs"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"awsAccountId":{"description":"Your AWS account ID.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"queueName":{"description":"The AWS SQS queue name.","type":"string"},"region":{"description":"The region is which AWS SQS is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","awsAccountId","queueName","authentication"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_sqs_rule_post","x-readme-ref-name":"aws_sqs_rule_post"} as const -; -const AwsSqsRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS SQS. See the documentation for further information.\n\n`aws/sqs`","enum":["aws/sqs"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys_response"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeysResponse,AwsAssumeRole]},"awsAccountId":{"description":"Your AWS account ID.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"queueName":{"description":"The AWS SQS queue name.","type":"string"},"region":{"description":"The region is which AWS SQS is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","awsAccountId","queueName","authentication"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_sqs_rule_response","x-readme-ref-name":"aws_sqs_rule_response"} as const -; -const AzureFunctionRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Microsoft Azure Function. See the documentation for further information.","enum":["http/azure-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"azureAppId":{"description":"The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this article.","type":"string","examples":["d1e9f419-c438-6032b32df979"]},"azureFunctionName":{"description":"The name of your Microsoft Azure Function.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"type":"object"}},"type":"object","title":"azure_function_rule_patch","x-readme-ref-name":"azure_function_rule_patch"} as const -; -const AzureFunctionRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Microsoft Azure Function. See the documentation for further information.","enum":["http/azure-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"azureAppId":{"description":"The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this article.","type":"string","examples":["d1e9f419-c438-6032b32df979"]},"azureFunctionName":{"description":"The name of your Microsoft Azure Function.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"required":["azureAppId","azureFunctionName"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"azure_function_rule_post","x-readme-ref-name":"azure_function_rule_post"} as const -; -const AzureFunctionRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Microsoft Azure Function. See the documentation for further information.\n\n`http/azure-function`","enum":["http/azure-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"azureAppId":{"description":"The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this article.","type":"string","examples":["d1e9f419-c438-6032b32df979"]},"azureFunctionName":{"description":"The name of your Microsoft Azure Function.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.\n\n`json`","enum":["json"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"required":["azureAppId","azureFunctionName"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"azure_function_rule_response","x-readme-ref-name":"azure_function_rule_response"} as const -; -const CloudflareWorkerRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Cloudflare Worker. See the documentation for further information.","enum":["http/cloudflare-worker"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"type":"object"}},"type":"object","title":"cloudflare_worker_rule_patch","x-readme-ref-name":"cloudflare_worker_rule_patch"} as const -; -const CloudflareWorkerRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Cloudflare Worker. See the documentation for further information.","enum":["http/cloudflare-worker"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"cloudflare_worker_rule_post","x-readme-ref-name":"cloudflare_worker_rule_post"} as const -; -const CloudflareWorkerRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Cloudflare Worker. See the documentation for further information.\n\n`http/cloudflare-worker`","enum":["http/cloudflare-worker"],"type":"string","examples":["http/cloudflare-worker"]},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"cloudflare_worker_rule_response","x-readme-ref-name":"cloudflare_worker_rule_response"} as const -; -const DeleteAppsAppIdNamespacesNamespaceId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"namespace_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The namespace ID."}},"required":["app_id","namespace_id"]}]}} as const -; -const DeleteAppsAppIdQueuesQueueId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"queue_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The queue ID."}},"required":["app_id","queue_id"]}]}} as const -; -const DeleteAppsAppIdRulesRuleId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"rule_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The rule ID."}},"required":["app_id","rule_id"]}]}} as const -; -const DeleteAppsId = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The ID of the application to be deleted."}},"required":["id"]}]}} as const -; -const Error = {"additionalProperties":false,"properties":{"code":{"description":"The HTTP status code returned.","type":"integer"},"details":{"description":"Any additional details about the error message.","type":["object","null"],"additionalProperties":true},"href":{"description":"The URL to documentation about the error code.","type":"string"},"message":{"description":"The error message.","type":"string"},"statusCode":{"description":"The Ably error code.","type":"integer"}},"required":["message","code","statusCode","href"],"type":"object","title":"error","x-readme-ref-name":"error"} as const -; -const GetAccountsAccountIdApps = {"metadata":{"allOf":[{"type":"object","properties":{"account_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The account ID for which to retrieve the associated applications."}},"required":["account_id"]}]},"response":{"200":{"items":AppResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetAppsAppIdKeys = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]},"response":{"200":{"items":KeyResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetAppsAppIdNamespaces = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]},"response":{"200":{"items":NamespaceResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetAppsAppIdQueues = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]},"response":{"200":{"items":QueueResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetAppsAppIdRules = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]},"response":{"200":{"items":RuleResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetAppsAppIdRulesRuleId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"rule_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The rule ID."}},"required":["app_id","rule_id"]}]}} as const -; -const GoogleCloudFunctionRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Google Cloud Function. See the documentation for further information.","enum":["http/google-cloud-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"functionName":{"description":"The name of your Google Cloud Function.","type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"projectId":{"description":"The project ID for your Google Cloud Project that was generated when you created your project.","type":"string"},"region":{"description":"The region in which your Google Cloud Function is hosted. See the Google documentation for more details.","type":"string","examples":["us-west1"]},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"type":"object"}},"type":"object","title":"google_cloud_function_rule_patch","x-readme-ref-name":"google_cloud_function_rule_patch"} as const -; -const GoogleCloudFunctionRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Google Cloud Function. See the documentation for further information.","enum":["http/google-cloud-function"],"type":"string"},"source":RuleSource,"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"functionName":{"description":"The name of your Google Cloud Function.","type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"projectId":{"description":"The project ID for your Google Cloud Project that was generated when you created your project.","type":"string"},"region":{"description":"The region in which your Google Cloud Function is hosted. See the Google documentation for more details.","type":"string","examples":["us-west1"]},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"required":["region","projectId","functionName"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"google_cloud_function_rule_post","x-readme-ref-name":"google_cloud_function_rule_post"} as const -; -const GoogleCloudFunctionRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Google Cloud Function. See the documentation for further information.\n\n`http/google-cloud-function`","enum":["http/google-cloud-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.\n\n`json`","enum":["json"],"type":"string"},"functionName":{"description":"The name of your Google Cloud Function.","type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"projectId":{"description":"The project ID for your Google Cloud Project that was generated when you created your project.","type":"string"},"region":{"description":"The region in which your Google Cloud Function is hosted. See the Google documentation for more details.","type":"string","examples":["us-west1"]},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"required":["region","projectId","functionName"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"google_cloud_function_rule_response","x-readme-ref-name":"google_cloud_function_rule_response"} as const -; -const HttpRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. See the documentation for further information.","enum":["http"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.","enum":["json","msgpack"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"type":"object"}},"type":"object","title":"http_rule_patch","x-readme-ref-name":"http_rule_patch"} as const -; -const HttpRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. See the documentation for further information.","enum":["http"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.","enum":["json","msgpack"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"description":"The URL of the endpoint that is invoked when events occur on Ably.","type":"string"}},"required":["url","format"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"http_rule_post","x-readme-ref-name":"http_rule_post"} as const -; -const HttpRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. See the documentation for further information.\n\n`http`","enum":["http"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.\n\n`json` `msgpack`","enum":["json","msgpack"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url","format"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"http_rule_response","x-readme-ref-name":"http_rule_response"} as const -; -const IftttRulePatch = {"x-requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"example":"single","type":"string"},"x-ruleType":{"description":"The type of rule. In this case IFTTT. See the documentation for further information.","enum":["http/ifttt"],"type":"string"},"x-source":{"additionalProperties":false,"properties":{"channelFilter":{"description":"This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.","type":"string"},"type":{"description":"The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.","enum":["channel.message","channel.presence","channel.lifecycle","channel.occupancy"],"example":"channel.message","type":"string"}},"required":["channelFilter","type"],"type":"object","title":"rule_source","x-readme-ref-name":"rule_source"},"x-target":{"additionalProperties":false,"properties":{"eventName":{"type":"string"},"webhookKey":{"type":"string"}},"type":"object"},"title":"ifttt_rule_patch","x-readme-ref-name":"ifttt_rule_patch"} as const -; -const IftttRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case IFTTT. See the documentation for further information.","enum":["http/ifttt"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"eventName":{"type":"string"},"webhookKey":{"type":"string"}},"required":["webhookKey","eventName"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"ifttt_rule_post","x-readme-ref-name":"ifttt_rule_post"} as const -; -const IftttRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case IFTTT. See the documentation for further information.\n\n`http/ifttt`","enum":["http/ifttt"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"eventName":{"type":"string"},"webhookKey":{"type":"string"}},"required":["webhookKey","eventName"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"ifttt_rule_response","x-readme-ref-name":"ifttt_rule_response"} as const -; -const KeyPatch = {"additionalProperties":false,"properties":{"capabilities":{"description":"The capabilities that this key has. More information on capabilities can be found in the Ably documentation.","items":{"enum":["publish","subscribe","history","presence","channel-metadata","push-admin","push-subscribe","statistics"],"type":"string"},"type":"array"},"channels":{"description":"Specify the channels and queues that this key can be used with.","type":"string"},"name":{"description":"The name for your API key. This is a friendly name for your reference.","type":"string"}},"type":"object","title":"key_patch","x-readme-ref-name":"key_patch"} as const -; -const KeyPost = {"additionalProperties":false,"properties":{"capabilities":{"description":"The capabilities that this key has. More information on capabilities can be found in the Ably documentation.","items":{"enum":["publish","subscribe","history","presence","channel-metadata","push-admin","push-subscribe","statistics"],"type":"string"},"type":"array"},"channels":{"description":"Specify the channels and queues that this key can be used with.","type":"string"},"name":{"description":"The name for your API key. This is a friendly name for your reference.","type":"string"}},"required":["name","channels","capabilities"],"type":"object","title":"key_post","x-readme-ref-name":"key_post"} as const -; -const KeyResponse = {"additionalProperties":false,"properties":{"appId":{"description":"The Ably application ID which this key is associated with.","type":"string","examples":["28GY6a"]},"capability":{"additionalProperties":{"items":{"enum":["publish","subscribe","history","presence","channel-metadata","push-admin","push-subscribe","statistics"],"type":"string","description":"`publish` `subscribe` `history` `presence` `channel-metadata` `push-admin` `push-subscribe` `statistics`"},"type":"array"},"description":"The capabilities that this key has. More information on capabilities can be found in the Ably documentation.","type":"object"},"created":{"description":"Unix timestamp representing the date and time of creation of the key.","type":"integer","examples":[1602844091815]},"id":{"description":"The key ID.","type":"string"},"key":{"description":"The complete API key including API secret.","type":"string"},"modified":{"description":"Unix timestamp representing the date and time of the last modification of the key.","type":"integer","examples":[1614679682091]},"name":{"description":"The name of the application this key is associated with.","type":"string"}},"type":"object","title":"key_response","x-readme-ref-name":"key_response"} as const -; -const Me = {"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"id":{"description":"The account ID.","type":"string","examples":["VpWaOA"]},"name":{"description":"The name of the account.","type":"string","examples":["Free account"]}},"required":["id","name"],"type":"object"},"token":{"additionalProperties":false,"properties":{"capabilities":{"description":"An array containing the access capabilities associated with the access token.","items":{"type":"string"},"type":"array","examples":["write:namespace","read:namespace","write:queue","read:queue","write:rule","read:rule","write:key","read:key","write:app","read:app"]},"id":{"description":"The token ID. This is a UUID.","type":"integer","examples":["C95837C9-184B-4CC2-8779-B769F960FADB"]},"name":{"description":"The friendly name for the token.","type":"string","examples":["My Token"]}},"required":["id","name","capabilities"],"type":"object"},"user":{"additionalProperties":false,"properties":{"email":{"description":"Email address of the user associated with the account.","type":"string"},"id":{"description":"The user ID associated with the account. This is a UUID.","type":"integer","examples":["C95837C9-184B-4CC2-8779-B769F960FADB"]}},"required":["id","email"],"type":"object"}},"type":"object","title":"me","x-readme-ref-name":"me"} as const -; -const NamespacePatch = {"additionalProperties":false,"properties":{"authenticated":{"default":false,"description":"If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the Ably knowledge base/a> for more details.","type":"boolean","examples":[false]},"persistLast":{"default":false,"description":"If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"persisted":{"default":false,"description":"If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"pushEnabled":{"default":false,"description":"If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel.","type":"boolean","examples":[false]},"tlsOnly":{"default":false,"description":"If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace.","type":"boolean","examples":[false]}},"type":"object","title":"namespace_patch","x-readme-ref-name":"namespace_patch"} as const -; -const NamespacePost = {"additionalProperties":false,"properties":{"authenticated":{"default":false,"description":"If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the Ably Knowledge base for more details.","type":"boolean","examples":[false]},"id":{"description":"The namespace or channel name that the channel rule will apply to. For example, if you specify `namespace` the namespace will be set to `namespace` and will match with channels `namespace:*` and `namespace`.","type":"string","examples":["namespace"]},"persistLast":{"default":false,"description":"If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"persisted":{"default":false,"description":"If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"pushEnabled":{"default":false,"description":"If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel.","type":"boolean","examples":[false]},"tlsOnly":{"default":false,"description":"If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace.","type":"boolean","examples":[false]}},"required":["id"],"type":"object","title":"namespace_post","x-readme-ref-name":"namespace_post"} as const -; -const NamespaceResponse = {"additionalProperties":false,"properties":{"authenticated":{"default":false,"description":"If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the Ably knowledge base for more details.","type":"boolean","examples":[false]},"created":{"description":"Unix timestamp representing the date and time of creation of the namespace.","type":"integer","examples":[1602844091815]},"id":{"description":"The namespace or channel name that the channel rule will apply to. For example, if you specify `namespace` the namespace will be set to `namespace` and will match with channels `namespace:*` and `namespace`.","type":"string","examples":["namespace"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the namespace.","type":"integer","examples":[1614679682091]},"persistLast":{"default":false,"description":"If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"persisted":{"default":false,"description":"If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"pushEnabled":{"default":false,"description":"If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel.","type":"boolean","examples":[false]},"tlsOnly":{"default":false,"description":"If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace.","type":"boolean","examples":[false]}},"type":"object","title":"namespace_response","x-readme-ref-name":"namespace_response"} as const -; -const PatchAppsAppIdKeysKeyId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"key_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The API key ID."}},"required":["app_id","key_id"]}]}} as const -; -const PatchAppsAppIdNamespacesNamespaceId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"namespace_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The namespace ID."}},"required":["app_id","namespace_id"]}]}} as const -; -const PatchAppsAppIdRulesRuleId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"rule_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The rule ID."}},"required":["app_id","rule_id"]}]}} as const -; -const PatchAppsId = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The ID of application to be updated."}},"required":["id"]}]}} as const -; -const PostAccountsAccountIdApps = {"metadata":{"allOf":[{"type":"object","properties":{"account_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The account ID of the account in which to create the application."}},"required":["account_id"]}]}} as const -; -const PostAppsAppIdKeys = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]}} as const -; -const PostAppsAppIdKeysKeyIdRevoke = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"key_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The key ID."}},"required":["app_id","key_id"]}]}} as const -; -const PostAppsAppIdNamespaces = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]}} as const -; -const PostAppsAppIdQueues = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]}} as const -; -const PostAppsAppIdRules = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]}} as const -; -const PostAppsIdPkcs12 = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["id"]}]}} as const -; -const Queue = {"additionalProperties":false,"properties":{"maxLength":{"description":"Message limit in number of messages.","type":"integer","examples":[10000]},"name":{"description":"A friendly name for your queue.","type":"string","examples":["My queue"]},"region":{"description":"The data center region. US East (Virginia) or EU West (Ireland). Values are `us-east-1-a` or `eu-west-1-a`.","type":"string","examples":["us-east-1-a"]},"ttl":{"description":"TTL in minutes.","type":"integer","examples":[60]}},"required":["name","ttl","maxLength","region"],"type":"object","title":"queue","x-readme-ref-name":"queue"} as const -; -const QueueResponse = {"additionalProperties":false,"properties":{"amqp":{"additionalProperties":false,"properties":{"queueName":{"description":"Name of the Ably queue.","type":"string","examples":["28AB6w:My queue"]},"uri":{"description":"URI for the AMQP queue interface.","type":"string","examples":["amqps://us-east-1-a-queue.ably.io:5671/shared"]}},"type":"object"},"appId":{"description":"The Ably application ID.","type":"string","examples":["28AB6w"]},"deadletter":{"description":"A boolean that indicates whether this is a dead letter queue or not.","type":"boolean","examples":[false]},"deadletterId":{"type":["string","null"],"examples":["28AB6w:us-east-1-a:deadletter"]},"id":{"description":"The ID of the Ably queue","type":"string","examples":["28AB6w:us-east-1-a:My queue"]},"maxLength":{"description":"Message limit in number of messages.","type":"integer","examples":[10000]},"messages":{"additionalProperties":false,"description":"Details of messages in the queue.","properties":{"ready":{"description":"The number of ready messages in the queue.","type":["integer","null"],"examples":[0]},"total":{"description":"The total number of messages in the queue.","type":["integer","null"],"examples":[0]},"unacknowledged":{"description":"The number of unacknowledged messages in the queue.","type":["integer","null"],"examples":[0]}},"type":"object"},"name":{"description":"The friendly name of the queue.","type":"string","examples":["My queue"]},"region":{"description":"The data center region for the queue.","type":"string","examples":["eu-west-1-a"]},"state":{"description":"The current state of the queue.","type":"string","examples":["Running"]},"stats":{"additionalProperties":false,"properties":{"acknowledgementRate":{"description":"The rate at which messages are acknowledged. Rate is messages per minute.","type":["number","null"]},"deliveryRate":{"description":"The rate at which messages are delivered from the queue. Rate is messages per minute.","type":["number","null"]},"publishRate":{"description":"The rate at which messages are published to the queue. Rate is messages per minute.","type":["number","null"]}},"type":"object"},"stomp":{"additionalProperties":false,"properties":{"destination":{"description":"Destination queue.","type":"string","examples":["/amqp/queue/28AB6w:My queue"]},"host":{"description":"The host type for the queue.","type":"string","examples":["shared"]},"uri":{"description":"URI for the STOMP queue interface.","type":"string","examples":["stomp://us-east-1-a-queue.ably.io:61614"]}},"type":"object"},"ttl":{"description":"TTL in minutes.","type":"integer","examples":[60]}},"type":"object","title":"queue_response","x-readme-ref-name":"queue_response"} as const -; -const RulePatch = {"discriminator":{"mapping":{"amqp":"#/components/schemas/amqp_rule_patch","amqp/external":"#/components/schemas/amqp_external_rule_patch","aws/kinesis":"#/components/schemas/aws_kinesis_rule_patch","aws/lambda":"#/components/schemas/aws_lambda_rule_patch","aws/sqs":"#/components/schemas/aws_sqs_rule_patch","http":"#/components/schemas/http_rule_patch","http/azure-function":"#/components/schemas/azure_function_rule_patch","http/cloudflare-worker":"#/components/schemas/cloudflare_worker_rule_patch","http/google-cloud-function":"#/components/schemas/google_cloud_function_rule_patch","http/ifttt":"#/components/schemas/ifttt_rule_patch","http/zapier":"#/components/schemas/zapier_rule_patch"},"propertyName":"ruleType"},"oneOf":[HttpRulePatch,IftttRulePatch,ZapierRulePatch,CloudflareWorkerRulePatch,AzureFunctionRulePatch,GoogleCloudFunctionRulePatch,AwsLambdaRulePatch,AwsKinesisRulePatch,AwsSqsRulePatch,AmqpRulePatch,AmqpExternalRulePatch],"title":"rule_patch","x-readme-ref-name":"rule_patch"} as const -; -const RulePost = {"discriminator":{"mapping":{"amqp":"#/components/schemas/amqp_rule_post","amqp/external":"#/components/schemas/amqp_external_rule_post","aws/kinesis":"#/components/schemas/aws_kinesis_rule_post","aws/lambda":"#/components/schemas/aws_lambda_rule_post","aws/sqs":"#/components/schemas/aws_sqs_rule_post","http":"#/components/schemas/http_rule_post","http/azure-function":"#/components/schemas/azure_function_rule_post","http/cloudflare-worker":"#/components/schemas/cloudflare_worker_rule_post","http/google-cloud-function":"#/components/schemas/google_cloud_function_rule_post","http/ifttt":"#/components/schemas/ifttt_rule_post","http/zapier":"#/components/schemas/zapier_rule_post","unsupported":"#/components/schemas/unsupported_rule_response"},"propertyName":"ruleType"},"oneOf":[HttpRulePost,IftttRulePost,ZapierRulePost,CloudflareWorkerRulePost,AzureFunctionRulePost,GoogleCloudFunctionRulePost,AwsLambdaRulePost,AwsKinesisRulePost,AwsSqsRulePost,AmqpRulePost,AmqpExternalRulePost,UnsupportedRuleResponse],"title":"rule_post","x-readme-ref-name":"rule_post"} as const -; -const RuleResponse = {"discriminator":{"mapping":{"amqp":"#/components/schemas/amqp_rule_response","amqp/external":"#/components/schemas/amqp_external_rule_response","aws/kinesis":"#/components/schemas/aws_kinesis_rule_response","aws/lambda":"#/components/schemas/aws_lambda_rule_response","aws/sqs":"#/components/schemas/aws_sqs_rule_response","http":"#/components/schemas/http_rule_response","http/azure-function":"#/components/schemas/azure_function_rule_response","http/cloudflare-worker":"#/components/schemas/cloudflare_worker_rule_response","http/google-cloud-function":"#/components/schemas/google_cloud_function_rule_response","http/ifttt":"#/components/schemas/ifttt_rule_response","http/zapier":"#/components/schemas/zapier_rule_response"},"propertyName":"ruleType"},"oneOf":[HttpRuleResponse,IftttRuleResponse,ZapierRuleResponse,CloudflareWorkerRuleResponse,AzureFunctionRuleResponse,GoogleCloudFunctionRuleResponse,AwsLambdaRuleResponse,AwsKinesisRuleResponse,AwsSqsRuleResponse,AmqpRuleResponse,AmqpExternalRuleResponse],"title":"rule_response","x-readme-ref-name":"rule_response"} as const -; -const RuleSource = {"additionalProperties":false,"properties":{"channelFilter":{"description":"This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.","type":"string"},"type":{"description":"The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.\n\n`channel.message` `channel.presence` `channel.lifecycle` `channel.occupancy`","enum":["channel.message","channel.presence","channel.lifecycle","channel.occupancy"],"type":"string","examples":["channel.message"]}},"required":["channelFilter","type"],"type":"object","title":"rule_source","x-readme-ref-name":"rule_source"} as const -; -const UnsupportedRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"This rule type is currently unsupported.","enum":["unsupported"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"unsupported_rule_response","x-readme-ref-name":"unsupported_rule_response"} as const -; -const ZapierRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Zapier. See the documentation for further information.","enum":["http/zapier"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"type":"object"}},"type":"object","title":"zapier_rule_patch","x-readme-ref-name":"zapier_rule_patch"} as const -; -const ZapierRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Zapier. See the documentation for further information.","enum":["http/zapier"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"zapier_rule_post","x-readme-ref-name":"zapier_rule_post"} as const -; -const ZapierRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Zapier. See the documentation for further information.\n\n`http/zapier`","enum":["http/zapier"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"zapier_rule_response","x-readme-ref-name":"zapier_rule_response"} as const -; +import AmqpExternalRulePatch from './schemas/AmqpExternalRulePatch'; +import AmqpExternalRulePost from './schemas/AmqpExternalRulePost'; +import AmqpExternalRuleResponse from './schemas/AmqpExternalRuleResponse'; +import AmqpRulePatch from './schemas/AmqpRulePatch'; +import AmqpRulePost from './schemas/AmqpRulePost'; +import AmqpRuleResponse from './schemas/AmqpRuleResponse'; +import AppPatch from './schemas/AppPatch'; +import AppPkcs12 from './schemas/AppPkcs12'; +import AppPost from './schemas/AppPost'; +import AppResponse from './schemas/AppResponse'; +import AwsAccessKeys from './schemas/AwsAccessKeys'; +import AwsAccessKeysResponse from './schemas/AwsAccessKeysResponse'; +import AwsAssumeRole from './schemas/AwsAssumeRole'; +import AwsKinesisRulePatch from './schemas/AwsKinesisRulePatch'; +import AwsKinesisRulePost from './schemas/AwsKinesisRulePost'; +import AwsKinesisRuleResponse from './schemas/AwsKinesisRuleResponse'; +import AwsLambdaRulePatch from './schemas/AwsLambdaRulePatch'; +import AwsLambdaRulePost from './schemas/AwsLambdaRulePost'; +import AwsLambdaRuleResponse from './schemas/AwsLambdaRuleResponse'; +import AwsSqsRulePatch from './schemas/AwsSqsRulePatch'; +import AwsSqsRulePost from './schemas/AwsSqsRulePost'; +import AwsSqsRuleResponse from './schemas/AwsSqsRuleResponse'; +import AzureFunctionRulePatch from './schemas/AzureFunctionRulePatch'; +import AzureFunctionRulePost from './schemas/AzureFunctionRulePost'; +import AzureFunctionRuleResponse from './schemas/AzureFunctionRuleResponse'; +import CloudflareWorkerRulePatch from './schemas/CloudflareWorkerRulePatch'; +import CloudflareWorkerRulePost from './schemas/CloudflareWorkerRulePost'; +import CloudflareWorkerRuleResponse from './schemas/CloudflareWorkerRuleResponse'; +import DeleteAppsAppIdNamespacesNamespaceId from './schemas/DeleteAppsAppIdNamespacesNamespaceId'; +import DeleteAppsAppIdQueuesQueueId from './schemas/DeleteAppsAppIdQueuesQueueId'; +import DeleteAppsAppIdRulesRuleId from './schemas/DeleteAppsAppIdRulesRuleId'; +import DeleteAppsId from './schemas/DeleteAppsId'; +import Error from './schemas/Error'; +import GetAccountsAccountIdApps from './schemas/GetAccountsAccountIdApps'; +import GetAppsAppIdKeys from './schemas/GetAppsAppIdKeys'; +import GetAppsAppIdNamespaces from './schemas/GetAppsAppIdNamespaces'; +import GetAppsAppIdQueues from './schemas/GetAppsAppIdQueues'; +import GetAppsAppIdRules from './schemas/GetAppsAppIdRules'; +import GetAppsAppIdRulesRuleId from './schemas/GetAppsAppIdRulesRuleId'; +import GoogleCloudFunctionRulePatch from './schemas/GoogleCloudFunctionRulePatch'; +import GoogleCloudFunctionRulePost from './schemas/GoogleCloudFunctionRulePost'; +import GoogleCloudFunctionRuleResponse from './schemas/GoogleCloudFunctionRuleResponse'; +import HttpRulePatch from './schemas/HttpRulePatch'; +import HttpRulePost from './schemas/HttpRulePost'; +import HttpRuleResponse from './schemas/HttpRuleResponse'; +import IftttRulePatch from './schemas/IftttRulePatch'; +import IftttRulePost from './schemas/IftttRulePost'; +import IftttRuleResponse from './schemas/IftttRuleResponse'; +import KeyPatch from './schemas/KeyPatch'; +import KeyPost from './schemas/KeyPost'; +import KeyResponse from './schemas/KeyResponse'; +import Me from './schemas/Me'; +import NamespacePatch from './schemas/NamespacePatch'; +import NamespacePost from './schemas/NamespacePost'; +import NamespaceResponse from './schemas/NamespaceResponse'; +import PatchAppsAppIdKeysKeyId from './schemas/PatchAppsAppIdKeysKeyId'; +import PatchAppsAppIdNamespacesNamespaceId from './schemas/PatchAppsAppIdNamespacesNamespaceId'; +import PatchAppsAppIdRulesRuleId from './schemas/PatchAppsAppIdRulesRuleId'; +import PatchAppsId from './schemas/PatchAppsId'; +import PostAccountsAccountIdApps from './schemas/PostAccountsAccountIdApps'; +import PostAppsAppIdKeys from './schemas/PostAppsAppIdKeys'; +import PostAppsAppIdKeysKeyIdRevoke from './schemas/PostAppsAppIdKeysKeyIdRevoke'; +import PostAppsAppIdNamespaces from './schemas/PostAppsAppIdNamespaces'; +import PostAppsAppIdQueues from './schemas/PostAppsAppIdQueues'; +import PostAppsAppIdRules from './schemas/PostAppsAppIdRules'; +import PostAppsIdPkcs12 from './schemas/PostAppsIdPkcs12'; +import Queue from './schemas/Queue'; +import QueueResponse from './schemas/QueueResponse'; +import RulePatch from './schemas/RulePatch'; +import RulePost from './schemas/RulePost'; +import RuleResponse from './schemas/RuleResponse'; +import RuleSource from './schemas/RuleSource'; +import UnsupportedRuleResponse from './schemas/UnsupportedRuleResponse'; +import ZapierRulePatch from './schemas/ZapierRulePatch'; +import ZapierRulePost from './schemas/ZapierRulePost'; +import ZapierRuleResponse from './schemas/ZapierRuleResponse'; export { AmqpExternalRulePatch, AmqpExternalRulePost, AmqpExternalRuleResponse, AmqpRulePatch, AmqpRulePost, AmqpRuleResponse, AppPatch, AppPkcs12, AppPost, AppResponse, AwsAccessKeys, AwsAccessKeysResponse, AwsAssumeRole, AwsKinesisRulePatch, AwsKinesisRulePost, AwsKinesisRuleResponse, AwsLambdaRulePatch, AwsLambdaRulePost, AwsLambdaRuleResponse, AwsSqsRulePatch, AwsSqsRulePost, AwsSqsRuleResponse, AzureFunctionRulePatch, AzureFunctionRulePost, AzureFunctionRuleResponse, CloudflareWorkerRulePatch, CloudflareWorkerRulePost, CloudflareWorkerRuleResponse, DeleteAppsAppIdNamespacesNamespaceId, DeleteAppsAppIdQueuesQueueId, DeleteAppsAppIdRulesRuleId, DeleteAppsId, Error, GetAccountsAccountIdApps, GetAppsAppIdKeys, GetAppsAppIdNamespaces, GetAppsAppIdQueues, GetAppsAppIdRules, GetAppsAppIdRulesRuleId, GoogleCloudFunctionRulePatch, GoogleCloudFunctionRulePost, GoogleCloudFunctionRuleResponse, HttpRulePatch, HttpRulePost, HttpRuleResponse, IftttRulePatch, IftttRulePost, IftttRuleResponse, KeyPatch, KeyPost, KeyResponse, Me, NamespacePatch, NamespacePost, NamespaceResponse, PatchAppsAppIdKeysKeyId, PatchAppsAppIdNamespacesNamespaceId, PatchAppsAppIdRulesRuleId, PatchAppsId, PostAccountsAccountIdApps, PostAppsAppIdKeys, PostAppsAppIdKeysKeyIdRevoke, PostAppsAppIdNamespaces, PostAppsAppIdQueues, PostAppsAppIdRules, PostAppsIdPkcs12, Queue, QueueResponse, RulePatch, RulePost, RuleResponse, RuleSource, UnsupportedRuleResponse, ZapierRulePatch, ZapierRulePost, ZapierRuleResponse } diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRulePatch.ts new file mode 100644 index 00000000..68585790 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRulePatch.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const AmqpExternalRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP external (using Firehose). See the Ably documentation for further information.","enum":["amqp/external"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"mandatoryRoute":{"description":"Reject delivery of the message if the route does not exist, otherwise fail silently.","type":"boolean"},"messageTtl":{"description":"You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.","type":"integer"},"persistentMessages":{"description":"Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.","type":"boolean"},"routingKey":{"description":"The AMQP routing key. See this Ably knowledge base article for details.","type":"string"},"url":{"type":"string"}},"type":"object"}},"type":"object","title":"amqp_external_rule_patch","x-readme-ref-name":"amqp_external_rule_patch"} as const +; +export default AmqpExternalRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRulePost.ts new file mode 100644 index 00000000..f3df59f5 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRulePost.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const AmqpExternalRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP external (using Firehose). See the documentation for further information.","enum":["amqp/external"],"type":"string"},"source":RuleSource,"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"mandatoryRoute":{"description":"Reject delivery of the message if the route does not exist, otherwise fail silently.","type":"boolean"},"messageTtl":{"description":"You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.","type":"integer"},"persistentMessages":{"description":"Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.","type":"boolean"},"routingKey":{"description":"The AMQP routing key. See this Ably knowledge base article for details.","type":"string"},"url":{"type":"string"}},"required":["url","routingKey","mandatoryRoute","persistentMessages"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"amqp_external_rule_post","x-readme-ref-name":"amqp_external_rule_post"} as const +; +export default AmqpExternalRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRuleResponse.ts new file mode 100644 index 00000000..a8f2cf96 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpExternalRuleResponse.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const AmqpExternalRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP external (using Firehose). See the Ably documentation for further information.\n\n`amqp/external`","enum":["amqp/external"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"mandatoryRoute":{"description":"Reject delivery of the message if the route does not exist, otherwise fail silently.","type":"boolean"},"messageTtl":{"description":"You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.","type":"integer"},"persistentMessages":{"description":"Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.","type":"boolean"},"routingKey":{"description":"The AMQP routing key. See this Ably knowledge base article for details.","type":"string"},"url":{"type":"string"}},"required":["url","routingKey","mandatoryRoute","persistentMessages"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"amqp_external_rule_response","x-readme-ref-name":"amqp_external_rule_response"} as const +; +export default AmqpExternalRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRulePatch.ts new file mode 100644 index 00000000..d6fdc59b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRulePatch.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const AmqpRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP. See the documentation for further information.","enum":["amqp"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"queueId":{"type":"string"}},"type":"object"}},"type":"object","title":"amqp_rule_patch","x-readme-ref-name":"amqp_rule_patch"} as const +; +export default AmqpRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRulePost.ts new file mode 100644 index 00000000..754788d0 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRulePost.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const AmqpRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP. See the documentation for further information.","enum":["amqp"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"queueId":{"type":"string"}},"required":["queueId"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"amqp_rule_post","x-readme-ref-name":"amqp_rule_post"} as const +; +export default AmqpRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRuleResponse.ts new file mode 100644 index 00000000..e7ea2f2b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AmqpRuleResponse.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const AmqpRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AMQP. See the documentation for further information.\n\n`amqp`","enum":["amqp"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"queueId":{"type":"string"}},"required":["queueId"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"amqp_rule_response","x-readme-ref-name":"amqp_rule_response"} as const +; +export default AmqpRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AppPatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AppPatch.ts new file mode 100644 index 00000000..988c56a2 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AppPatch.ts @@ -0,0 +1,3 @@ +const AppPatch = {"additionalProperties":false,"properties":{"apnsCertificate":{"description":"The Apple Push Notification service certificate.","type":["string","null"]},"apnsPrivateKey":{"description":"The Apple Push Notification service private key.","type":["string","null"]},"apnsUseSandboxEndpoint":{"description":"The Apple Push Notification service sandbox endpoint.","type":["boolean","null"]},"fcmKey":{"description":"The Firebase Cloud Messaging key.","type":["string","null"],"examples":[false]},"name":{"description":"The name of the application for your reference only.","type":"string","examples":["My App"]},"status":{"description":"The status of the application. Can be `enabled` or `disabled`. Enabled means available to accept inbound connections and all services are available.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"tlsOnly":{"description":"Enforce TLS for all connections.","type":["boolean","null"],"examples":[true]}},"type":"object","title":"app_patch","x-readme-ref-name":"app_patch"} as const +; +export default AppPatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AppPkcs12.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AppPkcs12.ts new file mode 100644 index 00000000..98a86ce1 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AppPkcs12.ts @@ -0,0 +1,3 @@ +const AppPkcs12 = {"additionalProperties":false,"properties":{"p12File":{"description":"The `.p12` file containing the app's APNs information.","format":"binary","type":"string"},"p12Pass":{"description":"The password for the corresponding `.p12` file.","type":"string"}},"required":["p12File","p12Pass"],"type":"object","title":"app_pkcs12","x-readme-ref-name":"app_pkcs12"} as const +; +export default AppPkcs12 diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AppPost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AppPost.ts new file mode 100644 index 00000000..b6c266b9 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AppPost.ts @@ -0,0 +1,3 @@ +const AppPost = {"additionalProperties":false,"properties":{"apnsCertificate":{"description":"The Apple Push Notification service certificate.","type":["string","null"]},"apnsPrivateKey":{"description":"The Apple Push Notification service private key.","type":["string","null"]},"apnsUseSandboxEndpoint":{"description":"The Apple Push Notification service sandbox endpoint.","type":["boolean","null"]},"fcmKey":{"description":"The Firebase Cloud Messaging key.","type":["string","null"],"examples":[false]},"name":{"description":"The name of the application for your reference only.","type":"string","examples":["My App"]},"status":{"description":"The status of the application. Can be `enabled` or `disabled`. Enabled means available to accept inbound connections and all services are available.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"tlsOnly":{"description":"Enforce TLS for all connections.","type":["boolean","null"],"examples":[true]}},"required":["name"],"type":"object","title":"app_post","x-readme-ref-name":"app_post"} as const +; +export default AppPost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AppResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AppResponse.ts new file mode 100644 index 00000000..71bdd279 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AppResponse.ts @@ -0,0 +1,3 @@ +const AppResponse = {"additionalProperties":false,"properties":{"_links":{"description":"A link self-referencing the app that has been created.","type":["object","null"],"additionalProperties":true},"accountId":{"description":"The ID of your Ably account.","type":"string","examples":["WgRpOB"]},"apnsUseSandboxEndpoint":{"description":"Apple Push Notification service endpoint.","type":["boolean","null"],"examples":[false]},"id":{"description":"The application ID.","type":"string","examples":["28AB6x"]},"name":{"description":"The application name.","type":"string","examples":["Default"]},"status":{"description":"The application status. Disabled applications will not accept new connections and will return an error to all clients.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"tlsOnly":{"description":"Enforce TLS for all connections. This setting overrides any channel setting.","type":["boolean","null"],"examples":[true]}},"type":"object","title":"app_response","x-readme-ref-name":"app_response"} as const +; +export default AppResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsAccessKeys.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsAccessKeys.ts new file mode 100644 index 00000000..a65259c4 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsAccessKeys.ts @@ -0,0 +1,3 @@ +const AwsAccessKeys = {"additionalProperties":false,"properties":{"accessKeyId":{"description":"The AWS key ID for the AWS IAM user. See this Ably knowledge base article for details.","type":"string"},"authenticationMode":{"description":"Authentication method is using AWS credentials (AWS key ID and secret key).","enum":["credentials"],"type":"string"},"secretAccessKey":{"description":"The AWS secret key for the AWS IAM user. See this Ably knowledge base article for details.","type":"string"}},"required":["accessKeyId","secretAccessKey"],"type":"object","title":"aws_access_keys","x-readme-ref-name":"aws_access_keys"} as const +; +export default AwsAccessKeys diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsAccessKeysResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsAccessKeysResponse.ts new file mode 100644 index 00000000..11242639 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsAccessKeysResponse.ts @@ -0,0 +1,3 @@ +const AwsAccessKeysResponse = {"additionalProperties":false,"properties":{"accessKeyId":{"description":"The AWS key ID for the AWS IAM user. See this Ably knowledge base article for details.","type":"string"},"authenticationMode":{"description":"Authentication method is using AWS credentials (AWS key ID and secret key).\n\n`credentials`","enum":["credentials"],"type":"string"}},"type":"object","title":"aws_access_keys_response","x-readme-ref-name":"aws_access_keys_response"} as const +; +export default AwsAccessKeysResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsAssumeRole.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsAssumeRole.ts new file mode 100644 index 00000000..7df719ea --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsAssumeRole.ts @@ -0,0 +1,3 @@ +const AwsAssumeRole = {"additionalProperties":false,"properties":{"assumeRoleArn":{"description":"If you are using the \"ARN of an assumable role\" authentication method, this is your Assume Role ARN. See this Ably knowledge base article for details.","type":"string"},"authenticationMode":{"description":"Authentication method is using the ARN of an assumable role. See this Ably knowledge base article for details.\n\n`assumeRole`","enum":["assumeRole"],"type":"string"}},"required":["assumeRoleArn"],"type":"object","title":"aws_assume_role","x-readme-ref-name":"aws_assume_role"} as const +; +export default AwsAssumeRole diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRulePatch.ts new file mode 100644 index 00000000..5d214829 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRulePatch.ts @@ -0,0 +1,7 @@ +import AwsAccessKeys from './AwsAccessKeys'; +import AwsAssumeRole from './AwsAssumeRole'; +import RuleSource from './RuleSource'; + +const AwsKinesisRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Kinesis. See the documentation for further information.","enum":["aws/kinesis"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"partitionKey":{"description":"The AWS Kinesis partition key. See this Ably knowledge base article for details.","type":"string"},"region":{"description":"The region is which AWS Kinesis is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]},"streamName":{"description":"The name of your AWS Kinesis Stream.","type":"string"}},"type":"object"}},"type":"object","title":"aws_kinesis_rule_patch","x-readme-ref-name":"aws_kinesis_rule_patch"} as const +; +export default AwsKinesisRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRulePost.ts new file mode 100644 index 00000000..3bdac075 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRulePost.ts @@ -0,0 +1,7 @@ +import AwsAccessKeys from './AwsAccessKeys'; +import AwsAssumeRole from './AwsAssumeRole'; +import RuleSource from './RuleSource'; + +const AwsKinesisRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Kinesis. See the documentation for further information.","enum":["aws/kinesis"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"partitionKey":{"description":"The AWS Kinesis partition key. See this Ably knowledge base article for details.","type":"string"},"region":{"description":"The region is which AWS Kinesis is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]},"streamName":{"description":"The name of your AWS Kinesis Stream.","type":"string"}},"required":["region","streamName","partitionKey","authentication","format"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_kinesis_rule_post","x-readme-ref-name":"aws_kinesis_rule_post"} as const +; +export default AwsKinesisRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRuleResponse.ts new file mode 100644 index 00000000..3996bd64 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsKinesisRuleResponse.ts @@ -0,0 +1,7 @@ +import AwsAccessKeysResponse from './AwsAccessKeysResponse'; +import AwsAssumeRole from './AwsAssumeRole'; +import RuleSource from './RuleSource'; + +const AwsKinesisRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Kinesis. See the documentation for further information.\n\n`aws/kinesis`","enum":["aws/kinesis"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys_response"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeysResponse,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.\n\n`json`","enum":["json"],"type":"string"},"partitionKey":{"description":"The AWS Kinesis partition key. See this Ably knowledge base article for details.","type":"string"},"region":{"description":"The region is which AWS Kinesis is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]},"streamName":{"description":"The name of your AWS Kinesis Stream.","type":"string"}},"required":["region","streamName","partitionKey","authentication","format"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_kinesis_rule_response","x-readme-ref-name":"aws_kinesis_rule_response"} as const +; +export default AwsKinesisRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRulePatch.ts new file mode 100644 index 00000000..19e9e522 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRulePatch.ts @@ -0,0 +1,7 @@ +import AwsAccessKeys from './AwsAccessKeys'; +import AwsAssumeRole from './AwsAssumeRole'; +import RuleSource from './RuleSource'; + +const AwsLambdaRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Lambda. See the Ably documentation for further information.","enum":["aws/lambda"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"functionName":{"description":"The name of your AWS Lambda Function.","type":"string"},"region":{"description":"The region is which your AWS Lambda Function is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","functionName","authentication"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_lambda_rule_patch","x-readme-ref-name":"aws_lambda_rule_patch"} as const +; +export default AwsLambdaRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRulePost.ts new file mode 100644 index 00000000..fc4a2e2d --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRulePost.ts @@ -0,0 +1,7 @@ +import AwsAccessKeys from './AwsAccessKeys'; +import AwsAssumeRole from './AwsAssumeRole'; +import RuleSource from './RuleSource'; + +const AwsLambdaRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Lambda. See the documentation for further information.","enum":["aws/lambda"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"functionName":{"description":"The name of your AWS Lambda Function.","type":"string"},"region":{"description":"The region is which your AWS Lambda Function is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","functionName","authentication"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_lambda_rule_post","x-readme-ref-name":"aws_lambda_rule_post"} as const +; +export default AwsLambdaRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRuleResponse.ts new file mode 100644 index 00000000..d43cc5a6 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsLambdaRuleResponse.ts @@ -0,0 +1,7 @@ +import AwsAccessKeysResponse from './AwsAccessKeysResponse'; +import AwsAssumeRole from './AwsAssumeRole'; +import RuleSource from './RuleSource'; + +const AwsLambdaRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS Lambda. See the documentation for further information.\n\n`aws/lambda`","enum":["aws/lambda"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys_response"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeysResponse,AwsAssumeRole]},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"functionName":{"description":"The name of your AWS Lambda Function.","type":"string"},"region":{"description":"The region is which your AWS Lambda Function is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","functionName","authentication"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_lambda_rule_response","x-readme-ref-name":"aws_lambda_rule_response"} as const +; +export default AwsLambdaRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRulePatch.ts new file mode 100644 index 00000000..a2343f5a --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRulePatch.ts @@ -0,0 +1,7 @@ +import AwsAccessKeys from './AwsAccessKeys'; +import AwsAssumeRole from './AwsAssumeRole'; +import RuleSource from './RuleSource'; + +const AwsSqsRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS SQS. See the documentation for further information.","enum":["aws/sqs"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"awsAccountId":{"description":"Your AWS account ID.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"queueName":{"description":"The AWS SQS queue name.","type":"string"},"region":{"description":"The region is which AWS SQS is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"type":"object"}},"type":"object","title":"aws_sqs_rule_patch","x-readme-ref-name":"aws_sqs_rule_patch"} as const +; +export default AwsSqsRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRulePost.ts new file mode 100644 index 00000000..146e426b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRulePost.ts @@ -0,0 +1,7 @@ +import AwsAccessKeys from './AwsAccessKeys'; +import AwsAssumeRole from './AwsAssumeRole'; +import RuleSource from './RuleSource'; + +const AwsSqsRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS SQS. See the documentation for further information.","enum":["aws/sqs"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeys,AwsAssumeRole]},"awsAccountId":{"description":"Your AWS account ID.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"queueName":{"description":"The AWS SQS queue name.","type":"string"},"region":{"description":"The region is which AWS SQS is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","awsAccountId","queueName","authentication"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_sqs_rule_post","x-readme-ref-name":"aws_sqs_rule_post"} as const +; +export default AwsSqsRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRuleResponse.ts new file mode 100644 index 00000000..f612317e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AwsSqsRuleResponse.ts @@ -0,0 +1,7 @@ +import AwsAccessKeysResponse from './AwsAccessKeysResponse'; +import AwsAssumeRole from './AwsAssumeRole'; +import RuleSource from './RuleSource'; + +const AwsSqsRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case AWS SQS. See the documentation for further information.\n\n`aws/sqs`","enum":["aws/sqs"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"authentication":{"discriminator":{"mapping":{"assumeRole":"#/components/schemas/aws_assume_role","credentials":"#/components/schemas/aws_access_keys_response"},"propertyName":"authenticationMode"},"oneOf":[AwsAccessKeysResponse,AwsAssumeRole]},"awsAccountId":{"description":"Your AWS account ID.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"type":"string"},"queueName":{"description":"The AWS SQS queue name.","type":"string"},"region":{"description":"The region is which AWS SQS is hosted. See the AWS documentation for more detail.","type":"string","examples":["us-west-1"]}},"required":["region","awsAccountId","queueName","authentication"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"aws_sqs_rule_response","x-readme-ref-name":"aws_sqs_rule_response"} as const +; +export default AwsSqsRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRulePatch.ts new file mode 100644 index 00000000..c454c121 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRulePatch.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const AzureFunctionRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Microsoft Azure Function. See the documentation for further information.","enum":["http/azure-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"azureAppId":{"description":"The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this article.","type":"string","examples":["d1e9f419-c438-6032b32df979"]},"azureFunctionName":{"description":"The name of your Microsoft Azure Function.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"type":"object"}},"type":"object","title":"azure_function_rule_patch","x-readme-ref-name":"azure_function_rule_patch"} as const +; +export default AzureFunctionRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRulePost.ts new file mode 100644 index 00000000..1e48025b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRulePost.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const AzureFunctionRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Microsoft Azure Function. See the documentation for further information.","enum":["http/azure-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"azureAppId":{"description":"The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this article.","type":"string","examples":["d1e9f419-c438-6032b32df979"]},"azureFunctionName":{"description":"The name of your Microsoft Azure Function.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"required":["azureAppId","azureFunctionName"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"azure_function_rule_post","x-readme-ref-name":"azure_function_rule_post"} as const +; +export default AzureFunctionRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRuleResponse.ts new file mode 100644 index 00000000..8355f66d --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/AzureFunctionRuleResponse.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const AzureFunctionRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Microsoft Azure Function. See the documentation for further information.\n\n`http/azure-function`","enum":["http/azure-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"azureAppId":{"description":"The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this article.","type":"string","examples":["d1e9f419-c438-6032b32df979"]},"azureFunctionName":{"description":"The name of your Microsoft Azure Function.","type":"string"},"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.\n\n`json`","enum":["json"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"required":["azureAppId","azureFunctionName"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"azure_function_rule_response","x-readme-ref-name":"azure_function_rule_response"} as const +; +export default AzureFunctionRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRulePatch.ts new file mode 100644 index 00000000..17556e7a --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRulePatch.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const CloudflareWorkerRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Cloudflare Worker. See the documentation for further information.","enum":["http/cloudflare-worker"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"type":"object"}},"type":"object","title":"cloudflare_worker_rule_patch","x-readme-ref-name":"cloudflare_worker_rule_patch"} as const +; +export default CloudflareWorkerRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRulePost.ts new file mode 100644 index 00000000..1a11b55b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRulePost.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const CloudflareWorkerRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Cloudflare Worker. See the documentation for further information.","enum":["http/cloudflare-worker"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"cloudflare_worker_rule_post","x-readme-ref-name":"cloudflare_worker_rule_post"} as const +; +export default CloudflareWorkerRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRuleResponse.ts new file mode 100644 index 00000000..6f4255ce --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/CloudflareWorkerRuleResponse.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const CloudflareWorkerRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Cloudflare Worker. See the documentation for further information.\n\n`http/cloudflare-worker`","enum":["http/cloudflare-worker"],"type":"string","examples":["http/cloudflare-worker"]},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"cloudflare_worker_rule_response","x-readme-ref-name":"cloudflare_worker_rule_response"} as const +; +export default CloudflareWorkerRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdNamespacesNamespaceId.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdNamespacesNamespaceId.ts new file mode 100644 index 00000000..5d6dd13e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdNamespacesNamespaceId.ts @@ -0,0 +1,3 @@ +const DeleteAppsAppIdNamespacesNamespaceId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"namespace_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The namespace ID."}},"required":["app_id","namespace_id"]}]}} as const +; +export default DeleteAppsAppIdNamespacesNamespaceId diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdQueuesQueueId.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdQueuesQueueId.ts new file mode 100644 index 00000000..f0500cd3 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdQueuesQueueId.ts @@ -0,0 +1,3 @@ +const DeleteAppsAppIdQueuesQueueId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"queue_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The queue ID."}},"required":["app_id","queue_id"]}]}} as const +; +export default DeleteAppsAppIdQueuesQueueId diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdRulesRuleId.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdRulesRuleId.ts new file mode 100644 index 00000000..3a303c85 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsAppIdRulesRuleId.ts @@ -0,0 +1,3 @@ +const DeleteAppsAppIdRulesRuleId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"rule_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The rule ID."}},"required":["app_id","rule_id"]}]}} as const +; +export default DeleteAppsAppIdRulesRuleId diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsId.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsId.ts new file mode 100644 index 00000000..2432dee8 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/DeleteAppsId.ts @@ -0,0 +1,3 @@ +const DeleteAppsId = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The ID of the application to be deleted."}},"required":["id"]}]}} as const +; +export default DeleteAppsId diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/Error.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/Error.ts new file mode 100644 index 00000000..1fe3e1f2 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/Error.ts @@ -0,0 +1,3 @@ +const Error = {"additionalProperties":false,"properties":{"code":{"description":"The HTTP status code returned.","type":"integer"},"details":{"description":"Any additional details about the error message.","type":["object","null"],"additionalProperties":true},"href":{"description":"The URL to documentation about the error code.","type":"string"},"message":{"description":"The error message.","type":"string"},"statusCode":{"description":"The Ably error code.","type":"integer"}},"required":["message","code","statusCode","href"],"type":"object","title":"error","x-readme-ref-name":"error"} as const +; +export default Error diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/GetAccountsAccountIdApps.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAccountsAccountIdApps.ts new file mode 100644 index 00000000..b27da1f3 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAccountsAccountIdApps.ts @@ -0,0 +1,5 @@ +import AppResponse from './AppResponse'; + +const GetAccountsAccountIdApps = {"metadata":{"allOf":[{"type":"object","properties":{"account_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The account ID for which to retrieve the associated applications."}},"required":["account_id"]}]},"response":{"200":{"items":AppResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetAccountsAccountIdApps diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdKeys.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdKeys.ts new file mode 100644 index 00000000..0132f76b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdKeys.ts @@ -0,0 +1,5 @@ +import KeyResponse from './KeyResponse'; + +const GetAppsAppIdKeys = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]},"response":{"200":{"items":KeyResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetAppsAppIdKeys diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdNamespaces.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdNamespaces.ts new file mode 100644 index 00000000..de9bc869 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdNamespaces.ts @@ -0,0 +1,5 @@ +import NamespaceResponse from './NamespaceResponse'; + +const GetAppsAppIdNamespaces = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]},"response":{"200":{"items":NamespaceResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetAppsAppIdNamespaces diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdQueues.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdQueues.ts new file mode 100644 index 00000000..adfe40b5 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdQueues.ts @@ -0,0 +1,5 @@ +import QueueResponse from './QueueResponse'; + +const GetAppsAppIdQueues = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]},"response":{"200":{"items":QueueResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetAppsAppIdQueues diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdRules.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdRules.ts new file mode 100644 index 00000000..ad661f0e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdRules.ts @@ -0,0 +1,5 @@ +import RuleResponse from './RuleResponse'; + +const GetAppsAppIdRules = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]},"response":{"200":{"items":RuleResponse,"type":"array","$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetAppsAppIdRules diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdRulesRuleId.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdRulesRuleId.ts new file mode 100644 index 00000000..b5be6000 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/GetAppsAppIdRulesRuleId.ts @@ -0,0 +1,3 @@ +const GetAppsAppIdRulesRuleId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"rule_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The rule ID."}},"required":["app_id","rule_id"]}]}} as const +; +export default GetAppsAppIdRulesRuleId diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRulePatch.ts new file mode 100644 index 00000000..8b96d8f4 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRulePatch.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const GoogleCloudFunctionRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Google Cloud Function. See the documentation for further information.","enum":["http/google-cloud-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"functionName":{"description":"The name of your Google Cloud Function.","type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"projectId":{"description":"The project ID for your Google Cloud Project that was generated when you created your project.","type":"string"},"region":{"description":"The region in which your Google Cloud Function is hosted. See the Google documentation for more details.","type":"string","examples":["us-west1"]},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"type":"object"}},"type":"object","title":"google_cloud_function_rule_patch","x-readme-ref-name":"google_cloud_function_rule_patch"} as const +; +export default GoogleCloudFunctionRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRulePost.ts new file mode 100644 index 00000000..8156eaea --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRulePost.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const GoogleCloudFunctionRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Google Cloud Function. See the documentation for further information.","enum":["http/google-cloud-function"],"type":"string"},"source":RuleSource,"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.","enum":["json"],"type":"string"},"functionName":{"description":"The name of your Google Cloud Function.","type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"projectId":{"description":"The project ID for your Google Cloud Project that was generated when you created your project.","type":"string"},"region":{"description":"The region in which your Google Cloud Function is hosted. See the Google documentation for more details.","type":"string","examples":["us-west1"]},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"required":["region","projectId","functionName"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"google_cloud_function_rule_post","x-readme-ref-name":"google_cloud_function_rule_post"} as const +; +export default GoogleCloudFunctionRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRuleResponse.ts new file mode 100644 index 00000000..d77e5dec --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/GoogleCloudFunctionRuleResponse.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const GoogleCloudFunctionRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Google Cloud Function. See the documentation for further information.\n\n`http/google-cloud-function`","enum":["http/google-cloud-function"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a text-based encoding.\n\n`json`","enum":["json"],"type":"string"},"functionName":{"description":"The name of your Google Cloud Function.","type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"projectId":{"description":"The project ID for your Google Cloud Project that was generated when you created your project.","type":"string"},"region":{"description":"The region in which your Google Cloud Function is hosted. See the Google documentation for more details.","type":"string","examples":["us-west1"]},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]}},"required":["region","projectId","functionName"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"google_cloud_function_rule_response","x-readme-ref-name":"google_cloud_function_rule_response"} as const +; +export default GoogleCloudFunctionRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/HttpRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/HttpRulePatch.ts new file mode 100644 index 00000000..91abbab9 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/HttpRulePatch.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const HttpRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. See the documentation for further information.","enum":["http"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.","enum":["json","msgpack"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"type":"object"}},"type":"object","title":"http_rule_patch","x-readme-ref-name":"http_rule_patch"} as const +; +export default HttpRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/HttpRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/HttpRulePost.ts new file mode 100644 index 00000000..32d6159d --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/HttpRulePost.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const HttpRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. See the documentation for further information.","enum":["http"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.","enum":["json","msgpack"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"description":"The URL of the endpoint that is invoked when events occur on Ably.","type":"string"}},"required":["url","format"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"http_rule_post","x-readme-ref-name":"http_rule_post"} as const +; +export default HttpRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/HttpRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/HttpRuleResponse.ts new file mode 100644 index 00000000..d63652b2 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/HttpRuleResponse.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const HttpRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. See the documentation for further information.\n\n`http`","enum":["http"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"enveloped":{"description":"Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.","type":["boolean","null"]},"format":{"description":"JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.\n\n`json` `msgpack`","enum":["json","msgpack"],"type":"string"},"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url","format"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"http_rule_response","x-readme-ref-name":"http_rule_response"} as const +; +export default HttpRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/IftttRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/IftttRulePatch.ts new file mode 100644 index 00000000..662431e0 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/IftttRulePatch.ts @@ -0,0 +1,3 @@ +const IftttRulePatch = {"x-requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"example":"single","type":"string"},"x-ruleType":{"description":"The type of rule. In this case IFTTT. See the documentation for further information.","enum":["http/ifttt"],"type":"string"},"x-source":{"additionalProperties":false,"properties":{"channelFilter":{"description":"This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.","type":"string"},"type":{"description":"The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.","enum":["channel.message","channel.presence","channel.lifecycle","channel.occupancy"],"example":"channel.message","type":"string"}},"required":["channelFilter","type"],"type":"object","title":"rule_source","x-readme-ref-name":"rule_source"},"x-target":{"additionalProperties":false,"properties":{"eventName":{"type":"string"},"webhookKey":{"type":"string"}},"type":"object"},"title":"ifttt_rule_patch","x-readme-ref-name":"ifttt_rule_patch"} as const +; +export default IftttRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/IftttRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/IftttRulePost.ts new file mode 100644 index 00000000..f0528e31 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/IftttRulePost.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const IftttRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case IFTTT. See the documentation for further information.","enum":["http/ifttt"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"eventName":{"type":"string"},"webhookKey":{"type":"string"}},"required":["webhookKey","eventName"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"ifttt_rule_post","x-readme-ref-name":"ifttt_rule_post"} as const +; +export default IftttRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/IftttRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/IftttRuleResponse.ts new file mode 100644 index 00000000..93adfde9 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/IftttRuleResponse.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const IftttRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the Ably documentation.\n\n`single`","enum":["single"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case IFTTT. See the documentation for further information.\n\n`http/ifttt`","enum":["http/ifttt"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"eventName":{"type":"string"},"webhookKey":{"type":"string"}},"required":["webhookKey","eventName"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"ifttt_rule_response","x-readme-ref-name":"ifttt_rule_response"} as const +; +export default IftttRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/KeyPatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/KeyPatch.ts new file mode 100644 index 00000000..77c210c1 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/KeyPatch.ts @@ -0,0 +1,3 @@ +const KeyPatch = {"additionalProperties":false,"properties":{"capabilities":{"description":"The capabilities that this key has. More information on capabilities can be found in the Ably documentation.","items":{"enum":["publish","subscribe","history","presence","channel-metadata","push-admin","push-subscribe","statistics"],"type":"string"},"type":"array"},"channels":{"description":"Specify the channels and queues that this key can be used with.","type":"string"},"name":{"description":"The name for your API key. This is a friendly name for your reference.","type":"string"}},"type":"object","title":"key_patch","x-readme-ref-name":"key_patch"} as const +; +export default KeyPatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/KeyPost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/KeyPost.ts new file mode 100644 index 00000000..c1241922 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/KeyPost.ts @@ -0,0 +1,3 @@ +const KeyPost = {"additionalProperties":false,"properties":{"capabilities":{"description":"The capabilities that this key has. More information on capabilities can be found in the Ably documentation.","items":{"enum":["publish","subscribe","history","presence","channel-metadata","push-admin","push-subscribe","statistics"],"type":"string"},"type":"array"},"channels":{"description":"Specify the channels and queues that this key can be used with.","type":"string"},"name":{"description":"The name for your API key. This is a friendly name for your reference.","type":"string"}},"required":["name","channels","capabilities"],"type":"object","title":"key_post","x-readme-ref-name":"key_post"} as const +; +export default KeyPost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/KeyResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/KeyResponse.ts new file mode 100644 index 00000000..a592e074 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/KeyResponse.ts @@ -0,0 +1,3 @@ +const KeyResponse = {"additionalProperties":false,"properties":{"appId":{"description":"The Ably application ID which this key is associated with.","type":"string","examples":["28GY6a"]},"capability":{"additionalProperties":{"items":{"enum":["publish","subscribe","history","presence","channel-metadata","push-admin","push-subscribe","statistics"],"type":"string","description":"`publish` `subscribe` `history` `presence` `channel-metadata` `push-admin` `push-subscribe` `statistics`"},"type":"array"},"description":"The capabilities that this key has. More information on capabilities can be found in the Ably documentation.","type":"object"},"created":{"description":"Unix timestamp representing the date and time of creation of the key.","type":"integer","examples":[1602844091815]},"id":{"description":"The key ID.","type":"string"},"key":{"description":"The complete API key including API secret.","type":"string"},"modified":{"description":"Unix timestamp representing the date and time of the last modification of the key.","type":"integer","examples":[1614679682091]},"name":{"description":"The name of the application this key is associated with.","type":"string"}},"type":"object","title":"key_response","x-readme-ref-name":"key_response"} as const +; +export default KeyResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/Me.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/Me.ts new file mode 100644 index 00000000..6d9a7910 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/Me.ts @@ -0,0 +1,3 @@ +const Me = {"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"id":{"description":"The account ID.","type":"string","examples":["VpWaOA"]},"name":{"description":"The name of the account.","type":"string","examples":["Free account"]}},"required":["id","name"],"type":"object"},"token":{"additionalProperties":false,"properties":{"capabilities":{"description":"An array containing the access capabilities associated with the access token.","items":{"type":"string"},"type":"array","examples":["write:namespace","read:namespace","write:queue","read:queue","write:rule","read:rule","write:key","read:key","write:app","read:app"]},"id":{"description":"The token ID. This is a UUID.","type":"integer","examples":["C95837C9-184B-4CC2-8779-B769F960FADB"]},"name":{"description":"The friendly name for the token.","type":"string","examples":["My Token"]}},"required":["id","name","capabilities"],"type":"object"},"user":{"additionalProperties":false,"properties":{"email":{"description":"Email address of the user associated with the account.","type":"string"},"id":{"description":"The user ID associated with the account. This is a UUID.","type":"integer","examples":["C95837C9-184B-4CC2-8779-B769F960FADB"]}},"required":["id","email"],"type":"object"}},"type":"object","title":"me","x-readme-ref-name":"me"} as const +; +export default Me diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/NamespacePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/NamespacePatch.ts new file mode 100644 index 00000000..a08382d5 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/NamespacePatch.ts @@ -0,0 +1,3 @@ +const NamespacePatch = {"additionalProperties":false,"properties":{"authenticated":{"default":false,"description":"If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the Ably knowledge base/a> for more details.","type":"boolean","examples":[false]},"persistLast":{"default":false,"description":"If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"persisted":{"default":false,"description":"If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"pushEnabled":{"default":false,"description":"If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel.","type":"boolean","examples":[false]},"tlsOnly":{"default":false,"description":"If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace.","type":"boolean","examples":[false]}},"type":"object","title":"namespace_patch","x-readme-ref-name":"namespace_patch"} as const +; +export default NamespacePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/NamespacePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/NamespacePost.ts new file mode 100644 index 00000000..834a9653 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/NamespacePost.ts @@ -0,0 +1,3 @@ +const NamespacePost = {"additionalProperties":false,"properties":{"authenticated":{"default":false,"description":"If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the Ably Knowledge base for more details.","type":"boolean","examples":[false]},"id":{"description":"The namespace or channel name that the channel rule will apply to. For example, if you specify `namespace` the namespace will be set to `namespace` and will match with channels `namespace:*` and `namespace`.","type":"string","examples":["namespace"]},"persistLast":{"default":false,"description":"If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"persisted":{"default":false,"description":"If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"pushEnabled":{"default":false,"description":"If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel.","type":"boolean","examples":[false]},"tlsOnly":{"default":false,"description":"If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace.","type":"boolean","examples":[false]}},"required":["id"],"type":"object","title":"namespace_post","x-readme-ref-name":"namespace_post"} as const +; +export default NamespacePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/NamespaceResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/NamespaceResponse.ts new file mode 100644 index 00000000..25b1cfdc --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/NamespaceResponse.ts @@ -0,0 +1,3 @@ +const NamespaceResponse = {"additionalProperties":false,"properties":{"authenticated":{"default":false,"description":"If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the Ably knowledge base for more details.","type":"boolean","examples":[false]},"created":{"description":"Unix timestamp representing the date and time of creation of the namespace.","type":"integer","examples":[1602844091815]},"id":{"description":"The namespace or channel name that the channel rule will apply to. For example, if you specify `namespace` the namespace will be set to `namespace` and will match with channels `namespace:*` and `namespace`.","type":"string","examples":["namespace"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the namespace.","type":"integer","examples":[1614679682091]},"persistLast":{"default":false,"description":"If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"persisted":{"default":false,"description":"If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.","type":"boolean","examples":[false]},"pushEnabled":{"default":false,"description":"If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel.","type":"boolean","examples":[false]},"tlsOnly":{"default":false,"description":"If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace.","type":"boolean","examples":[false]}},"type":"object","title":"namespace_response","x-readme-ref-name":"namespace_response"} as const +; +export default NamespaceResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdKeysKeyId.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdKeysKeyId.ts new file mode 100644 index 00000000..9067ee86 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdKeysKeyId.ts @@ -0,0 +1,3 @@ +const PatchAppsAppIdKeysKeyId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"key_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The API key ID."}},"required":["app_id","key_id"]}]}} as const +; +export default PatchAppsAppIdKeysKeyId diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdNamespacesNamespaceId.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdNamespacesNamespaceId.ts new file mode 100644 index 00000000..d5322f6a --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdNamespacesNamespaceId.ts @@ -0,0 +1,3 @@ +const PatchAppsAppIdNamespacesNamespaceId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"namespace_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The namespace ID."}},"required":["app_id","namespace_id"]}]}} as const +; +export default PatchAppsAppIdNamespacesNamespaceId diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdRulesRuleId.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdRulesRuleId.ts new file mode 100644 index 00000000..7e786858 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsAppIdRulesRuleId.ts @@ -0,0 +1,3 @@ +const PatchAppsAppIdRulesRuleId = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"rule_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The rule ID."}},"required":["app_id","rule_id"]}]}} as const +; +export default PatchAppsAppIdRulesRuleId diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsId.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsId.ts new file mode 100644 index 00000000..b059e935 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PatchAppsId.ts @@ -0,0 +1,3 @@ +const PatchAppsId = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The ID of application to be updated."}},"required":["id"]}]}} as const +; +export default PatchAppsId diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PostAccountsAccountIdApps.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAccountsAccountIdApps.ts new file mode 100644 index 00000000..0cbc4623 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAccountsAccountIdApps.ts @@ -0,0 +1,3 @@ +const PostAccountsAccountIdApps = {"metadata":{"allOf":[{"type":"object","properties":{"account_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The account ID of the account in which to create the application."}},"required":["account_id"]}]}} as const +; +export default PostAccountsAccountIdApps diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdKeys.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdKeys.ts new file mode 100644 index 00000000..8f8894e4 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdKeys.ts @@ -0,0 +1,3 @@ +const PostAppsAppIdKeys = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]}} as const +; +export default PostAppsAppIdKeys diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdKeysKeyIdRevoke.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdKeysKeyIdRevoke.ts new file mode 100644 index 00000000..63f474e2 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdKeysKeyIdRevoke.ts @@ -0,0 +1,3 @@ +const PostAppsAppIdKeysKeyIdRevoke = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."},"key_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The key ID."}},"required":["app_id","key_id"]}]}} as const +; +export default PostAppsAppIdKeysKeyIdRevoke diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdNamespaces.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdNamespaces.ts new file mode 100644 index 00000000..4e5fbcef --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdNamespaces.ts @@ -0,0 +1,3 @@ +const PostAppsAppIdNamespaces = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]}} as const +; +export default PostAppsAppIdNamespaces diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdQueues.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdQueues.ts new file mode 100644 index 00000000..943107e6 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdQueues.ts @@ -0,0 +1,3 @@ +const PostAppsAppIdQueues = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]}} as const +; +export default PostAppsAppIdQueues diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdRules.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdRules.ts new file mode 100644 index 00000000..1441f416 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsAppIdRules.ts @@ -0,0 +1,3 @@ +const PostAppsAppIdRules = {"metadata":{"allOf":[{"type":"object","properties":{"app_id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["app_id"]}]}} as const +; +export default PostAppsAppIdRules diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsIdPkcs12.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsIdPkcs12.ts new file mode 100644 index 00000000..22e64933 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/PostAppsIdPkcs12.ts @@ -0,0 +1,3 @@ +const PostAppsIdPkcs12 = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The application ID."}},"required":["id"]}]}} as const +; +export default PostAppsIdPkcs12 diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/Queue.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/Queue.ts new file mode 100644 index 00000000..72462db0 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/Queue.ts @@ -0,0 +1,3 @@ +const Queue = {"additionalProperties":false,"properties":{"maxLength":{"description":"Message limit in number of messages.","type":"integer","examples":[10000]},"name":{"description":"A friendly name for your queue.","type":"string","examples":["My queue"]},"region":{"description":"The data center region. US East (Virginia) or EU West (Ireland). Values are `us-east-1-a` or `eu-west-1-a`.","type":"string","examples":["us-east-1-a"]},"ttl":{"description":"TTL in minutes.","type":"integer","examples":[60]}},"required":["name","ttl","maxLength","region"],"type":"object","title":"queue","x-readme-ref-name":"queue"} as const +; +export default Queue diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/QueueResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/QueueResponse.ts new file mode 100644 index 00000000..8a5515f7 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/QueueResponse.ts @@ -0,0 +1,3 @@ +const QueueResponse = {"additionalProperties":false,"properties":{"amqp":{"additionalProperties":false,"properties":{"queueName":{"description":"Name of the Ably queue.","type":"string","examples":["28AB6w:My queue"]},"uri":{"description":"URI for the AMQP queue interface.","type":"string","examples":["amqps://us-east-1-a-queue.ably.io:5671/shared"]}},"type":"object"},"appId":{"description":"The Ably application ID.","type":"string","examples":["28AB6w"]},"deadletter":{"description":"A boolean that indicates whether this is a dead letter queue or not.","type":"boolean","examples":[false]},"deadletterId":{"type":["string","null"],"examples":["28AB6w:us-east-1-a:deadletter"]},"id":{"description":"The ID of the Ably queue","type":"string","examples":["28AB6w:us-east-1-a:My queue"]},"maxLength":{"description":"Message limit in number of messages.","type":"integer","examples":[10000]},"messages":{"additionalProperties":false,"description":"Details of messages in the queue.","properties":{"ready":{"description":"The number of ready messages in the queue.","type":["integer","null"],"examples":[0]},"total":{"description":"The total number of messages in the queue.","type":["integer","null"],"examples":[0]},"unacknowledged":{"description":"The number of unacknowledged messages in the queue.","type":["integer","null"],"examples":[0]}},"type":"object"},"name":{"description":"The friendly name of the queue.","type":"string","examples":["My queue"]},"region":{"description":"The data center region for the queue.","type":"string","examples":["eu-west-1-a"]},"state":{"description":"The current state of the queue.","type":"string","examples":["Running"]},"stats":{"additionalProperties":false,"properties":{"acknowledgementRate":{"description":"The rate at which messages are acknowledged. Rate is messages per minute.","type":["number","null"]},"deliveryRate":{"description":"The rate at which messages are delivered from the queue. Rate is messages per minute.","type":["number","null"]},"publishRate":{"description":"The rate at which messages are published to the queue. Rate is messages per minute.","type":["number","null"]}},"type":"object"},"stomp":{"additionalProperties":false,"properties":{"destination":{"description":"Destination queue.","type":"string","examples":["/amqp/queue/28AB6w:My queue"]},"host":{"description":"The host type for the queue.","type":"string","examples":["shared"]},"uri":{"description":"URI for the STOMP queue interface.","type":"string","examples":["stomp://us-east-1-a-queue.ably.io:61614"]}},"type":"object"},"ttl":{"description":"TTL in minutes.","type":"integer","examples":[60]}},"type":"object","title":"queue_response","x-readme-ref-name":"queue_response"} as const +; +export default QueueResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/RulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/RulePatch.ts new file mode 100644 index 00000000..4293dc81 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/RulePatch.ts @@ -0,0 +1,15 @@ +import AmqpExternalRulePatch from './AmqpExternalRulePatch'; +import AmqpRulePatch from './AmqpRulePatch'; +import AwsKinesisRulePatch from './AwsKinesisRulePatch'; +import AwsLambdaRulePatch from './AwsLambdaRulePatch'; +import AwsSqsRulePatch from './AwsSqsRulePatch'; +import AzureFunctionRulePatch from './AzureFunctionRulePatch'; +import CloudflareWorkerRulePatch from './CloudflareWorkerRulePatch'; +import GoogleCloudFunctionRulePatch from './GoogleCloudFunctionRulePatch'; +import HttpRulePatch from './HttpRulePatch'; +import IftttRulePatch from './IftttRulePatch'; +import ZapierRulePatch from './ZapierRulePatch'; + +const RulePatch = {"discriminator":{"mapping":{"amqp":"#/components/schemas/amqp_rule_patch","amqp/external":"#/components/schemas/amqp_external_rule_patch","aws/kinesis":"#/components/schemas/aws_kinesis_rule_patch","aws/lambda":"#/components/schemas/aws_lambda_rule_patch","aws/sqs":"#/components/schemas/aws_sqs_rule_patch","http":"#/components/schemas/http_rule_patch","http/azure-function":"#/components/schemas/azure_function_rule_patch","http/cloudflare-worker":"#/components/schemas/cloudflare_worker_rule_patch","http/google-cloud-function":"#/components/schemas/google_cloud_function_rule_patch","http/ifttt":"#/components/schemas/ifttt_rule_patch","http/zapier":"#/components/schemas/zapier_rule_patch"},"propertyName":"ruleType"},"oneOf":[HttpRulePatch,IftttRulePatch,ZapierRulePatch,CloudflareWorkerRulePatch,AzureFunctionRulePatch,GoogleCloudFunctionRulePatch,AwsLambdaRulePatch,AwsKinesisRulePatch,AwsSqsRulePatch,AmqpRulePatch,AmqpExternalRulePatch],"title":"rule_patch","x-readme-ref-name":"rule_patch"} as const +; +export default RulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/RulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/RulePost.ts new file mode 100644 index 00000000..9ccdbef5 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/RulePost.ts @@ -0,0 +1,16 @@ +import AmqpExternalRulePost from './AmqpExternalRulePost'; +import AmqpRulePost from './AmqpRulePost'; +import AwsKinesisRulePost from './AwsKinesisRulePost'; +import AwsLambdaRulePost from './AwsLambdaRulePost'; +import AwsSqsRulePost from './AwsSqsRulePost'; +import AzureFunctionRulePost from './AzureFunctionRulePost'; +import CloudflareWorkerRulePost from './CloudflareWorkerRulePost'; +import GoogleCloudFunctionRulePost from './GoogleCloudFunctionRulePost'; +import HttpRulePost from './HttpRulePost'; +import IftttRulePost from './IftttRulePost'; +import UnsupportedRuleResponse from './UnsupportedRuleResponse'; +import ZapierRulePost from './ZapierRulePost'; + +const RulePost = {"discriminator":{"mapping":{"amqp":"#/components/schemas/amqp_rule_post","amqp/external":"#/components/schemas/amqp_external_rule_post","aws/kinesis":"#/components/schemas/aws_kinesis_rule_post","aws/lambda":"#/components/schemas/aws_lambda_rule_post","aws/sqs":"#/components/schemas/aws_sqs_rule_post","http":"#/components/schemas/http_rule_post","http/azure-function":"#/components/schemas/azure_function_rule_post","http/cloudflare-worker":"#/components/schemas/cloudflare_worker_rule_post","http/google-cloud-function":"#/components/schemas/google_cloud_function_rule_post","http/ifttt":"#/components/schemas/ifttt_rule_post","http/zapier":"#/components/schemas/zapier_rule_post","unsupported":"#/components/schemas/unsupported_rule_response"},"propertyName":"ruleType"},"oneOf":[HttpRulePost,IftttRulePost,ZapierRulePost,CloudflareWorkerRulePost,AzureFunctionRulePost,GoogleCloudFunctionRulePost,AwsLambdaRulePost,AwsKinesisRulePost,AwsSqsRulePost,AmqpRulePost,AmqpExternalRulePost,UnsupportedRuleResponse],"title":"rule_post","x-readme-ref-name":"rule_post"} as const +; +export default RulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/RuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/RuleResponse.ts new file mode 100644 index 00000000..ccd93d86 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/RuleResponse.ts @@ -0,0 +1,15 @@ +import AmqpExternalRuleResponse from './AmqpExternalRuleResponse'; +import AmqpRuleResponse from './AmqpRuleResponse'; +import AwsKinesisRuleResponse from './AwsKinesisRuleResponse'; +import AwsLambdaRuleResponse from './AwsLambdaRuleResponse'; +import AwsSqsRuleResponse from './AwsSqsRuleResponse'; +import AzureFunctionRuleResponse from './AzureFunctionRuleResponse'; +import CloudflareWorkerRuleResponse from './CloudflareWorkerRuleResponse'; +import GoogleCloudFunctionRuleResponse from './GoogleCloudFunctionRuleResponse'; +import HttpRuleResponse from './HttpRuleResponse'; +import IftttRuleResponse from './IftttRuleResponse'; +import ZapierRuleResponse from './ZapierRuleResponse'; + +const RuleResponse = {"discriminator":{"mapping":{"amqp":"#/components/schemas/amqp_rule_response","amqp/external":"#/components/schemas/amqp_external_rule_response","aws/kinesis":"#/components/schemas/aws_kinesis_rule_response","aws/lambda":"#/components/schemas/aws_lambda_rule_response","aws/sqs":"#/components/schemas/aws_sqs_rule_response","http":"#/components/schemas/http_rule_response","http/azure-function":"#/components/schemas/azure_function_rule_response","http/cloudflare-worker":"#/components/schemas/cloudflare_worker_rule_response","http/google-cloud-function":"#/components/schemas/google_cloud_function_rule_response","http/ifttt":"#/components/schemas/ifttt_rule_response","http/zapier":"#/components/schemas/zapier_rule_response"},"propertyName":"ruleType"},"oneOf":[HttpRuleResponse,IftttRuleResponse,ZapierRuleResponse,CloudflareWorkerRuleResponse,AzureFunctionRuleResponse,GoogleCloudFunctionRuleResponse,AwsLambdaRuleResponse,AwsKinesisRuleResponse,AwsSqsRuleResponse,AmqpRuleResponse,AmqpExternalRuleResponse],"title":"rule_response","x-readme-ref-name":"rule_response"} as const +; +export default RuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/RuleSource.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/RuleSource.ts new file mode 100644 index 00000000..e94ca61e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/RuleSource.ts @@ -0,0 +1,3 @@ +const RuleSource = {"additionalProperties":false,"properties":{"channelFilter":{"description":"This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.","type":"string"},"type":{"description":"The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.\n\n`channel.message` `channel.presence` `channel.lifecycle` `channel.occupancy`","enum":["channel.message","channel.presence","channel.lifecycle","channel.occupancy"],"type":"string","examples":["channel.message"]}},"required":["channelFilter","type"],"type":"object","title":"rule_source","x-readme-ref-name":"rule_source"} as const +; +export default RuleSource diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/UnsupportedRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/UnsupportedRuleResponse.ts new file mode 100644 index 00000000..5db9915f --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/UnsupportedRuleResponse.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const UnsupportedRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"This rule type is currently unsupported.","enum":["unsupported"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"unsupported_rule_response","x-readme-ref-name":"unsupported_rule_response"} as const +; +export default UnsupportedRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRulePatch.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRulePatch.ts new file mode 100644 index 00000000..8de349b9 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRulePatch.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const ZapierRulePatch = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Zapier. See the documentation for further information.","enum":["http/zapier"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"type":"object"}},"type":"object","title":"zapier_rule_patch","x-readme-ref-name":"zapier_rule_patch"} as const +; +export default ZapierRulePatch diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRulePost.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRulePost.ts new file mode 100644 index 00000000..15ed9662 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRulePost.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const ZapierRulePost = {"additionalProperties":false,"properties":{"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Zapier. See the documentation for further information.","enum":["http/zapier"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"zapier_rule_post","x-readme-ref-name":"zapier_rule_post"} as const +; +export default ZapierRulePost diff --git a/packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRuleResponse.ts b/packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRuleResponse.ts new file mode 100644 index 00000000..69d8bd87 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/alby/schemas/ZapierRuleResponse.ts @@ -0,0 +1,5 @@ +import RuleSource from './RuleSource'; + +const ZapierRuleResponse = {"additionalProperties":false,"properties":{"_links":{"type":["object","null"],"additionalProperties":true},"appId":{"description":"The Ably application ID.","type":"string","examples":["28GY6a"]},"created":{"description":"Unix timestamp representing the date and time of creation of the rule.","type":"number","examples":[1602844091815]},"id":{"description":"The rule ID.","type":"string","examples":["83IzAB"]},"modified":{"description":"Unix timestamp representing the date and time of last modification of the rule.","type":"number","examples":[1614679682091]},"requestMode":{"description":"This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably documentation.\n\n`single` `batch`","enum":["single","batch"],"type":"string","examples":["single"]},"ruleType":{"description":"The type of rule. In this case Zapier. See the documentation for further information.\n\n`http/zapier`","enum":["http/zapier"],"type":"string"},"source":RuleSource,"status":{"description":"The status of the rule. Rules can be enabled or disabled.\n\n`enabled` `disabled`","enum":["enabled","disabled"],"type":"string","examples":["enabled"]},"target":{"additionalProperties":false,"properties":{"headers":{"description":"If you have additional information to send, you'll need to include the relevant headers.","items":{"properties":{"name":{"description":"The name of the header.","type":"string"},"value":{"description":"The value of the header.","type":"string"}},"type":"object"},"type":"array"},"signingKeyId":{"description":"The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the webhook security docs for more information.","type":["string","null"]},"url":{"type":"string"}},"required":["url"],"type":"object"},"version":{"description":"API version. Events and the format of their payloads are versioned. Please see the Events documentation.","type":"string"}},"required":["ruleType","requestMode","source","target"],"type":"object","title":"zapier_rule_response","x-readme-ref-name":"zapier_rule_response"} as const +; +export default ZapierRuleResponse diff --git a/packages/api/test/__fixtures__/sdk/optional-payload/schemas.ts b/packages/api/test/__fixtures__/sdk/optional-payload/schemas.ts index 7b953f7a..13f3330b 100644 --- a/packages/api/test/__fixtures__/sdk/optional-payload/schemas.ts +++ b/packages/api/test/__fixtures__/sdk/optional-payload/schemas.ts @@ -1,3 +1,2 @@ -const UpdatePetWithForm = {"formData":{"type":"object","properties":{"name":{"description":"Updated name of the pet","type":"string"},"status":{"description":"Updated status of the pet","type":"string"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet that needs to be updated"}},"required":["petId"]}]}} as const -; +import UpdatePetWithForm from './schemas/UpdatePetWithForm'; export { UpdatePetWithForm } diff --git a/packages/api/test/__fixtures__/sdk/optional-payload/schemas/UpdatePetWithForm.ts b/packages/api/test/__fixtures__/sdk/optional-payload/schemas/UpdatePetWithForm.ts new file mode 100644 index 00000000..2107217f --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/optional-payload/schemas/UpdatePetWithForm.ts @@ -0,0 +1,3 @@ +const UpdatePetWithForm = {"formData":{"type":"object","properties":{"name":{"description":"Updated name of the pet","type":"string"},"status":{"description":"Updated status of the pet","type":"string"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet that needs to be updated"}},"required":["petId"]}]}} as const +; +export default UpdatePetWithForm diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas.ts index 51d0899d..3a82e4d7 100644 --- a/packages/api/test/__fixtures__/sdk/petstore/schemas.ts +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas.ts @@ -1,43 +1,22 @@ -const ApiResponse = {"type":"object","properties":{"code":{"type":"integer","format":"int32","minimum":-2147483648,"maximum":2147483647},"type":{"type":"string"},"message":{"type":"string"}},"title":"ApiResponse","x-readme-ref-name":"ApiResponse"} as const -; -const Category = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"name":{"type":"string"}},"title":"Category","x-readme-ref-name":"Category"} as const -; -const CreateUsersWithArrayInput = {"body":{"type":"array","items":User,"$schema":"http://json-schema.org/draft-04/schema#"}} as const -; -const CreateUsersWithListInput = {"body":{"type":"array","items":User,"$schema":"http://json-schema.org/draft-04/schema#"}} as const -; -const DeleteOrder = {"metadata":{"allOf":[{"type":"object","properties":{"orderId":{"type":"integer","format":"int64","minimum":1,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the order that needs to be deleted"}},"required":["orderId"]}]}} as const -; -const DeletePet = {"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"Pet id to delete"}},"required":["petId"]},{"type":"object","properties":{"api_key":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#"}},"required":[]}]}} as const -; -const DeleteUser = {"metadata":{"allOf":[{"type":"object","properties":{"username":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The name that needs to be deleted"}},"required":["username"]}]}} as const -; -const FindPetsByStatus = {"metadata":{"allOf":[{"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available","description":"Default: available"},"$schema":"http://json-schema.org/draft-04/schema#","description":"Status values that need to be considered for filter"}},"required":["status"]}]},"response":{"200":{"type":"array","items":Pet,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const FindPetsByTags = {"metadata":{"allOf":[{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"},"$schema":"http://json-schema.org/draft-04/schema#","description":"Tags to filter by"}},"required":["tags"]}]},"response":{"200":{"type":"array","items":Pet,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetInventory = {"response":{"200":{"type":"object","additionalProperties":{"type":"integer","format":"int32","minimum":-2147483648,"maximum":2147483647},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetOrderById = {"metadata":{"allOf":[{"type":"object","properties":{"orderId":{"type":"integer","format":"int64","minimum":1,"maximum":10,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet that needs to be fetched"}},"required":["orderId"]}]}} as const -; -const GetPetById = {"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet to return"}},"required":["petId"]}]}} as const -; -const GetUserByName = {"metadata":{"allOf":[{"type":"object","properties":{"username":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The name that needs to be fetched. Use user1 for testing. "}},"required":["username"]}]}} as const -; -const LoginUser = {"metadata":{"allOf":[{"type":"object","properties":{"username":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The user name for login"},"password":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The password for login in clear text"}},"required":["username","password"]}]},"response":{"200":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const Order = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"quantity":{"type":"integer","format":"int32","minimum":-2147483648,"maximum":2147483647},"shipDate":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"type":"boolean","default":false}},"title":"Order","x-readme-ref-name":"Order"} as const -; -const Pet = {"type":"object","required":["name","photoUrls"],"properties":{"id":{"type":"integer","format":"int64","readOnly":true,"default":40,"examples":[25],"minimum":-9223372036854776000,"maximum":9223372036854776000},"category":Category,"name":{"type":"string","examples":["doggie"]},"photoUrls":{"type":"array","items":{"type":"string","examples":["https://example.com/photo.png"]}},"tags":{"type":"array","items":Tag},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"title":"Pet","x-readme-ref-name":"Pet"} as const -; -const Tag = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"name":{"type":"string"}},"title":"Tag","x-readme-ref-name":"Tag"} as const -; -const UpdatePetWithForm = {"formData":{"type":"object","properties":{"name":{"description":"Updated name of the pet","type":"string"},"status":{"description":"Updated status of the pet","type":"string"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet that needs to be updated"}},"required":["petId"]}]}} as const -; -const UpdateUser = {"metadata":{"allOf":[{"type":"object","properties":{"username":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"name that need to be updated"}},"required":["username"]}]}} as const -; -const UploadFile = {"body":{"type":"object","properties":{"additionalMetadata":{"description":"Additional data to pass to server","type":"string"},"file":{"description":"file to upload","type":"string","format":"binary"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet to update"}},"required":["petId"]}]}} as const -; -const User = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"phone":{"type":"string"},"userStatus":{"type":"integer","format":"int32","description":"User Status","minimum":-2147483648,"maximum":2147483647}},"title":"User","x-readme-ref-name":"User"} as const -; +import ApiResponse from './schemas/ApiResponse'; +import Category from './schemas/Category'; +import CreateUsersWithArrayInput from './schemas/CreateUsersWithArrayInput'; +import CreateUsersWithListInput from './schemas/CreateUsersWithListInput'; +import DeleteOrder from './schemas/DeleteOrder'; +import DeletePet from './schemas/DeletePet'; +import DeleteUser from './schemas/DeleteUser'; +import FindPetsByStatus from './schemas/FindPetsByStatus'; +import FindPetsByTags from './schemas/FindPetsByTags'; +import GetInventory from './schemas/GetInventory'; +import GetOrderById from './schemas/GetOrderById'; +import GetPetById from './schemas/GetPetById'; +import GetUserByName from './schemas/GetUserByName'; +import LoginUser from './schemas/LoginUser'; +import Order from './schemas/Order'; +import Pet from './schemas/Pet'; +import Tag from './schemas/Tag'; +import UpdatePetWithForm from './schemas/UpdatePetWithForm'; +import UpdateUser from './schemas/UpdateUser'; +import UploadFile from './schemas/UploadFile'; +import User from './schemas/User'; export { ApiResponse, Category, CreateUsersWithArrayInput, CreateUsersWithListInput, DeleteOrder, DeletePet, DeleteUser, FindPetsByStatus, FindPetsByTags, GetInventory, GetOrderById, GetPetById, GetUserByName, LoginUser, Order, Pet, Tag, UpdatePetWithForm, UpdateUser, UploadFile, User } diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/ApiResponse.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/ApiResponse.ts new file mode 100644 index 00000000..db4ab0e7 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/ApiResponse.ts @@ -0,0 +1,3 @@ +const ApiResponse = {"type":"object","properties":{"code":{"type":"integer","format":"int32","minimum":-2147483648,"maximum":2147483647},"type":{"type":"string"},"message":{"type":"string"}},"title":"ApiResponse","x-readme-ref-name":"ApiResponse"} as const +; +export default ApiResponse diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/Category.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/Category.ts new file mode 100644 index 00000000..48b4d2da --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/Category.ts @@ -0,0 +1,3 @@ +const Category = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"name":{"type":"string"}},"title":"Category","x-readme-ref-name":"Category"} as const +; +export default Category diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/CreateUsersWithArrayInput.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/CreateUsersWithArrayInput.ts new file mode 100644 index 00000000..365593ea --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/CreateUsersWithArrayInput.ts @@ -0,0 +1,5 @@ +import User from './User'; + +const CreateUsersWithArrayInput = {"body":{"type":"array","items":User,"$schema":"http://json-schema.org/draft-04/schema#"}} as const +; +export default CreateUsersWithArrayInput diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/CreateUsersWithListInput.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/CreateUsersWithListInput.ts new file mode 100644 index 00000000..819ace2b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/CreateUsersWithListInput.ts @@ -0,0 +1,5 @@ +import User from './User'; + +const CreateUsersWithListInput = {"body":{"type":"array","items":User,"$schema":"http://json-schema.org/draft-04/schema#"}} as const +; +export default CreateUsersWithListInput diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/DeleteOrder.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/DeleteOrder.ts new file mode 100644 index 00000000..8dc6e2d7 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/DeleteOrder.ts @@ -0,0 +1,3 @@ +const DeleteOrder = {"metadata":{"allOf":[{"type":"object","properties":{"orderId":{"type":"integer","format":"int64","minimum":1,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the order that needs to be deleted"}},"required":["orderId"]}]}} as const +; +export default DeleteOrder diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/DeletePet.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/DeletePet.ts new file mode 100644 index 00000000..baa33f0e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/DeletePet.ts @@ -0,0 +1,3 @@ +const DeletePet = {"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"Pet id to delete"}},"required":["petId"]},{"type":"object","properties":{"api_key":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#"}},"required":[]}]}} as const +; +export default DeletePet diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/DeleteUser.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/DeleteUser.ts new file mode 100644 index 00000000..483ffaef --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/DeleteUser.ts @@ -0,0 +1,3 @@ +const DeleteUser = {"metadata":{"allOf":[{"type":"object","properties":{"username":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The name that needs to be deleted"}},"required":["username"]}]}} as const +; +export default DeleteUser diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/FindPetsByStatus.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/FindPetsByStatus.ts new file mode 100644 index 00000000..5d482b3d --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/FindPetsByStatus.ts @@ -0,0 +1,5 @@ +import Pet from './Pet'; + +const FindPetsByStatus = {"metadata":{"allOf":[{"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available","description":"Default: available"},"$schema":"http://json-schema.org/draft-04/schema#","description":"Status values that need to be considered for filter"}},"required":["status"]}]},"response":{"200":{"type":"array","items":Pet,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default FindPetsByStatus diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/FindPetsByTags.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/FindPetsByTags.ts new file mode 100644 index 00000000..801286bf --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/FindPetsByTags.ts @@ -0,0 +1,5 @@ +import Pet from './Pet'; + +const FindPetsByTags = {"metadata":{"allOf":[{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"},"$schema":"http://json-schema.org/draft-04/schema#","description":"Tags to filter by"}},"required":["tags"]}]},"response":{"200":{"type":"array","items":Pet,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default FindPetsByTags diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/GetInventory.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/GetInventory.ts new file mode 100644 index 00000000..9938f1aa --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/GetInventory.ts @@ -0,0 +1,3 @@ +const GetInventory = {"response":{"200":{"type":"object","additionalProperties":{"type":"integer","format":"int32","minimum":-2147483648,"maximum":2147483647},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetInventory diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/GetOrderById.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/GetOrderById.ts new file mode 100644 index 00000000..214acfac --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/GetOrderById.ts @@ -0,0 +1,3 @@ +const GetOrderById = {"metadata":{"allOf":[{"type":"object","properties":{"orderId":{"type":"integer","format":"int64","minimum":1,"maximum":10,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet that needs to be fetched"}},"required":["orderId"]}]}} as const +; +export default GetOrderById diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/GetPetById.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/GetPetById.ts new file mode 100644 index 00000000..25126bc9 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/GetPetById.ts @@ -0,0 +1,3 @@ +const GetPetById = {"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet to return"}},"required":["petId"]}]}} as const +; +export default GetPetById diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/GetUserByName.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/GetUserByName.ts new file mode 100644 index 00000000..b4804161 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/GetUserByName.ts @@ -0,0 +1,3 @@ +const GetUserByName = {"metadata":{"allOf":[{"type":"object","properties":{"username":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The name that needs to be fetched. Use user1 for testing. "}},"required":["username"]}]}} as const +; +export default GetUserByName diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/LoginUser.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/LoginUser.ts new file mode 100644 index 00000000..2da3ede2 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/LoginUser.ts @@ -0,0 +1,3 @@ +const LoginUser = {"metadata":{"allOf":[{"type":"object","properties":{"username":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The user name for login"},"password":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"The password for login in clear text"}},"required":["username","password"]}]},"response":{"200":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default LoginUser diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/Order.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/Order.ts new file mode 100644 index 00000000..b9a3727a --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/Order.ts @@ -0,0 +1,3 @@ +const Order = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"quantity":{"type":"integer","format":"int32","minimum":-2147483648,"maximum":2147483647},"shipDate":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"type":"boolean","default":false}},"title":"Order","x-readme-ref-name":"Order"} as const +; +export default Order diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/Pet.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/Pet.ts new file mode 100644 index 00000000..4bbb6e53 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/Pet.ts @@ -0,0 +1,6 @@ +import Category from './Category'; +import Tag from './Tag'; + +const Pet = {"type":"object","required":["name","photoUrls"],"properties":{"id":{"type":"integer","format":"int64","readOnly":true,"default":40,"examples":[25],"minimum":-9223372036854776000,"maximum":9223372036854776000},"category":Category,"name":{"type":"string","examples":["doggie"]},"photoUrls":{"type":"array","items":{"type":"string","examples":["https://example.com/photo.png"]}},"tags":{"type":"array","items":Tag},"status":{"type":"string","description":"pet status in the store","enum":["available","pending","sold"]}},"title":"Pet","x-readme-ref-name":"Pet"} as const +; +export default Pet diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/Tag.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/Tag.ts new file mode 100644 index 00000000..615141dc --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/Tag.ts @@ -0,0 +1,3 @@ +const Tag = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"name":{"type":"string"}},"title":"Tag","x-readme-ref-name":"Tag"} as const +; +export default Tag diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/UpdatePetWithForm.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/UpdatePetWithForm.ts new file mode 100644 index 00000000..2107217f --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/UpdatePetWithForm.ts @@ -0,0 +1,3 @@ +const UpdatePetWithForm = {"formData":{"type":"object","properties":{"name":{"description":"Updated name of the pet","type":"string"},"status":{"description":"Updated status of the pet","type":"string"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet that needs to be updated"}},"required":["petId"]}]}} as const +; +export default UpdatePetWithForm diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/UpdateUser.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/UpdateUser.ts new file mode 100644 index 00000000..1d471ed4 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/UpdateUser.ts @@ -0,0 +1,3 @@ +const UpdateUser = {"metadata":{"allOf":[{"type":"object","properties":{"username":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"name that need to be updated"}},"required":["username"]}]}} as const +; +export default UpdateUser diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/UploadFile.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/UploadFile.ts new file mode 100644 index 00000000..cf5c431f --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/UploadFile.ts @@ -0,0 +1,3 @@ +const UploadFile = {"body":{"type":"object","properties":{"additionalMetadata":{"description":"Additional data to pass to server","type":"string"},"file":{"description":"file to upload","type":"string","format":"binary"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"petId":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000,"$schema":"http://json-schema.org/draft-04/schema#","description":"ID of pet to update"}},"required":["petId"]}]}} as const +; +export default UploadFile diff --git a/packages/api/test/__fixtures__/sdk/petstore/schemas/User.ts b/packages/api/test/__fixtures__/sdk/petstore/schemas/User.ts new file mode 100644 index 00000000..99124c01 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/petstore/schemas/User.ts @@ -0,0 +1,3 @@ +const User = {"type":"object","properties":{"id":{"type":"integer","format":"int64","minimum":-9223372036854776000,"maximum":9223372036854776000},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"phone":{"type":"string"},"userStatus":{"type":"integer","format":"int32","description":"User Status","minimum":-2147483648,"maximum":2147483647}},"title":"User","x-readme-ref-name":"User"} as const +; +export default User diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas.ts b/packages/api/test/__fixtures__/sdk/readme/schemas.ts index c4d023cd..433fde90 100644 --- a/packages/api/test/__fixtures__/sdk/readme/schemas.ts +++ b/packages/api/test/__fixtures__/sdk/readme/schemas.ts @@ -1,139 +1,70 @@ -const Apply = {"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Your full name","default":"Your Name"},"email":{"type":"string","format":"email","description":"A valid email we can reach you at.","default":"you@example.com"},"job":{"type":"string","description":"The job you're looking to apply for (https://readme.com/careers).\n\nDefault: `Front End Engineer`","enum":["Front End Engineer","Full Stack Engineer","Head of Product","Head of Solutions Engineering","Product Designer"],"default":"Front End Engineer"},"pronouns":{"type":"string","description":"Learn more at https://lgbtlifecenter.org/pronouns/"},"linkedin":{"type":"string","format":"url","description":"What have you been up to the past few years?"},"github":{"type":"string","description":"Or Bitbucket, Gitlab or anywhere else your code is hosted!","format":"url"},"coverLetter":{"type":"string","format":"blob","description":"What should we know about you?"},"dontReallyApply":{"type":"boolean","description":"Want to play with the API but not actually apply? Set this to true.","default":false}},"required":["name","email","job"],"title":"apply","x-readme-ref-name":"apply"} as const -; -const Category = {"type":"object","title":"category","x-readme-ref-name":"category","required":["title"],"properties":{"title":{"type":"string","description":"A short title for the category. This is what will show in the sidebar."},"type":{"type":"string","enum":["reference","guide"],"default":"guide","description":"A category can be part of your reference or guide documentation, which is determined by this field.\n\nDefault: `guide`"}}} as const -; -const Changelog = {"type":"object","properties":{"title":{"type":"string","description":"Title of the changelog."},"type":{"type":"string","enum":["","added","fixed","improved","deprecated","removed"],"description":"Default: "},"body":{"type":"string","description":"Body content of the changelog."},"hidden":{"type":"boolean","description":"Visibility of the changelog.","default":true}},"required":["title","body"],"title":"changelog","x-readme-ref-name":"changelog"} as const -; -const CondensedProjectData = {"type":"object","properties":{"name":{"type":"string"},"subdomain":{"type":"string"},"jwtSecret":{"type":"string"},"baseUrl":{"type":"string","format":"url","description":"The base URL for the project. If the project is not running under a custom domain, it will be `https://projectSubdomain.readme.io`, otherwise it can either be or `https://example.com` or, in the case of an enterprise child project `https://example.com/projectSubdomain`."},"plan":{"type":"string"}},"title":"condensedProjectData","x-readme-ref-name":"condensedProjectData"} as const -; -const CreateCategory = {"metadata":{"allOf":[{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const -; -const CreateCustomPage = {"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const CreateDoc = {"metadata":{"allOf":[{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const CreateVersion = {"response":{"400":{"oneOf":[ErrorVersionEmpty,ErrorVersionDuplicate,ErrorVersionForkEmpty],"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const CustomPage = {"type":"object","properties":{"title":{"type":"string","description":"Title of the custom page."},"body":{"type":"string","description":"Body formatted in Markdown (displayed by default)."},"html":{"type":"string","description":"Body formatted in HTML (sanitized, only displayed if `htmlmode` is **true**)."},"htmlmode":{"type":"boolean","description":"**true** if `html` should be displayed, **false** if `body` should be displayed.","default":false},"hidden":{"type":"boolean","description":"Visibility of the custom page.","default":true}},"required":["title"],"title":"customPage","x-readme-ref-name":"customPage"} as const -; -const DeleteApiSpecification = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page."}},"required":["id"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const DeleteCategory = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const -; -const DeleteChangelog = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\"."}},"required":["slug"]}]}} as const -; -const DeleteCustomPage = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const DeleteDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const DeleteVersion = {"metadata":{"allOf":[{"type":"object","properties":{"versionId":{"type":"string","examples":["v1.0.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions)."}},"required":["versionId"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const DocSchemaPost = {"type":"object","oneOf":[{"required":["title","category"],"title":"`category` Parameter","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}},"categorySlug":{"type":"string","description":"The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field."},"parentDocSlug":{"type":"string","description":"If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field."}},"type":"object"},{"required":["title","categorySlug"],"title":"`categorySlug` Parameter","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}},"categorySlug":{"type":"string","description":"The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field."},"parentDocSlug":{"type":"string","description":"If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field."}},"type":"object"}],"additionalProperties":true,"title":"docSchemaPost","x-readme-ref-name":"docSchemaPost"} as const -; -const DocSchemaPut = {"type":"object","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}},"categorySlug":{"type":"string","description":"The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field."},"parentDocSlug":{"type":"string","description":"If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field."}},"additionalProperties":true,"title":"docSchemaPut","x-readme-ref-name":"docSchemaPut"} as const -; -const DocSchemaResponse = {"type":"object","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).\n\n`basic` `error` `link`","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}}},"additionalProperties":true,"title":"docSchemaResponse","x-readme-ref-name":"docSchemaResponse"} as const -; -const ErrorApikeyEmpty = {"title":"error_APIKEY_EMPTY","x-readme-ref-name":"error_APIKEY_EMPTY","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorApikeyMismatch = {"title":"error_APIKEY_MISMATCH","x-readme-ref-name":"error_APIKEY_MISMATCH","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorApikeyNotfound = {"title":"error_APIKEY_NOTFOUND","x-readme-ref-name":"error_APIKEY_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorCategoryInvalid = {"title":"error_CATEGORY_INVALID","x-readme-ref-name":"error_CATEGORY_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorCategoryNotfound = {"title":"error_CATEGORY_NOTFOUND","x-readme-ref-name":"error_CATEGORY_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorCustompageInvalid = {"title":"error_CUSTOMPAGE_INVALID","x-readme-ref-name":"error_CUSTOMPAGE_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CUSTOMPAGE_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorCustompageNotfound = {"title":"error_CUSTOMPAGE_NOTFOUND","x-readme-ref-name":"error_CUSTOMPAGE_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CUSTOMPAGE_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorDocInvalid = {"title":"error_DOC_INVALID","x-readme-ref-name":"error_DOC_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorDocNotfound = {"title":"error_DOC_NOTFOUND","x-readme-ref-name":"error_DOC_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorRegistryNotfound = {"title":"error_REGISTRY_NOTFOUND","x-readme-ref-name":"error_REGISTRY_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"REGISTRY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorSpecFileEmpty = {"title":"error_SPEC_FILE_EMPTY","x-readme-ref-name":"error_SPEC_FILE_EMPTY","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_FILE_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorSpecIdDuplicate = {"title":"error_SPEC_ID_DUPLICATE","x-readme-ref-name":"error_SPEC_ID_DUPLICATE","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_ID_DUPLICATE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorSpecIdInvalid = {"title":"error_SPEC_ID_INVALID","x-readme-ref-name":"error_SPEC_ID_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_ID_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorSpecInvalid = {"title":"error_SPEC_INVALID","x-readme-ref-name":"error_SPEC_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorSpecInvalidSchema = {"title":"error_SPEC_INVALID_SCHEMA","x-readme-ref-name":"error_SPEC_INVALID_SCHEMA","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_INVALID_SCHEMA"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorSpecNotfound = {"title":"error_SPEC_NOTFOUND","x-readme-ref-name":"error_SPEC_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorSpecTimeout = {"title":"error_SPEC_TIMEOUT","x-readme-ref-name":"error_SPEC_TIMEOUT","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_TIMEOUT"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorSpecVersionNotfound = {"title":"error_SPEC_VERSION_NOTFOUND","x-readme-ref-name":"error_SPEC_VERSION_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorVersionCantDemoteStable = {"title":"error_VERSION_CANT_DEMOTE_STABLE","x-readme-ref-name":"error_VERSION_CANT_DEMOTE_STABLE","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_CANT_DEMOTE_STABLE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorVersionCantRemoveStable = {"title":"error_VERSION_CANT_REMOVE_STABLE","x-readme-ref-name":"error_VERSION_CANT_REMOVE_STABLE","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_CANT_REMOVE_STABLE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorVersionDuplicate = {"title":"error_VERSION_DUPLICATE","x-readme-ref-name":"error_VERSION_DUPLICATE","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_DUPLICATE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorVersionEmpty = {"title":"error_VERSION_EMPTY","x-readme-ref-name":"error_VERSION_EMPTY","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorVersionForkEmpty = {"title":"error_VERSION_FORK_EMPTY","x-readme-ref-name":"error_VERSION_FORK_EMPTY","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_FORK_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorVersionForkNotfound = {"title":"error_VERSION_FORK_NOTFOUND","x-readme-ref-name":"error_VERSION_FORK_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_FORK_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const ErrorVersionNotfound = {"title":"error_VERSION_NOTFOUND","x-readme-ref-name":"error_VERSION_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const -; -const GetApiRegistry = {"metadata":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"An API Registry UUID. This can be found by navigating to your API Reference page and viewing code snippets for Node with the `api` library."}},"required":["uuid"]}]},"response":{"200":{"type":"object","additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetApiSchema = {"response":{"200":{"type":"object","additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetApiSpecification = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetCategories = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}}}} as const -; -const GetCategory = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const -; -const GetCategoryDocs = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const -; -const GetChangelog = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Update\", enter the slug \"owlet-update\"."}},"required":["slug"]}]}} as const -; -const GetChangelogs = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}}}} as const -; -const GetCustomPage = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetCustomPages = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetOpenRoles = {"response":{"200":{"type":"array","items":JobOpening,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetProductionDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetProject = {"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetVersion = {"metadata":{"allOf":[{"type":"object","properties":{"versionId":{"type":"string","examples":["v1.0.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions)."}},"required":["versionId"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const GetVersions = {"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const JobOpening = {"type":"object","properties":{"slug":{"type":"string","description":"A slugified version of the job opening title.","examples":["api-engineer"]},"title":{"type":"string","description":"The job opening position.","examples":["API Engineer"]},"description":{"type":"string","description":"The description for this open position. This content is formatted as HTML."},"pullquote":{"type":"string","description":"A short pullquote for the open position.","examples":["Deeply knowledgeable of the web, HTTP, and the API space."]},"location":{"type":"string","description":"Where this position is located at.","examples":["Remote"]},"department":{"type":"string","description":"The internal organization you'll be working in.","examples":["Engineering"]},"url":{"type":"string","format":"url","description":"The place where you can apply for the position!"}},"title":"jobOpening","x-readme-ref-name":"jobOpening"} as const -; -const SearchDocs = {"metadata":{"allOf":[{"type":"object","properties":{"search":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"Search string to look for."}},"required":["search"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const UpdateApiSpecification = {"body":{"type":"object","properties":{"spec":{"description":"OpenAPI/Swagger file. We accept JSON or YAML.","type":"string","format":"binary"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page."}},"required":["id"]}]},"response":{"400":{"oneOf":[ErrorSpecFileEmpty,ErrorSpecIdDuplicate,ErrorSpecIdInvalid,ErrorSpecInvalid,ErrorSpecInvalidSchema,ErrorSpecVersionNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const UpdateCategory = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const -; -const UpdateChangelog = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\"."}},"required":["slug"]}]}} as const -; -const UpdateCustomPage = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const UpdateDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const UpdateVersion = {"metadata":{"allOf":[{"type":"object","properties":{"versionId":{"type":"string","examples":["v1.0.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions)."}},"required":["versionId"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const UploadApiSpecification = {"body":{"type":"object","properties":{"spec":{"description":"OpenAPI/Swagger file. We accept JSON or YAML.","type":"string","format":"binary"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"400":{"oneOf":[ErrorSpecFileEmpty,ErrorSpecInvalid,ErrorSpecInvalidSchema,ErrorSpecVersionNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const -; -const Version = {"type":"object","properties":{"version":{"type":"string","description":"Semantic Version"},"codename":{"type":"string","description":"Dubbed name of version."},"from":{"type":"string","description":"Semantic Version to use as the base fork."},"is_stable":{"type":"boolean","description":"Should this be the **main** version?"},"is_beta":{"type":"boolean","default":true},"is_hidden":{"type":"boolean","description":"Should this be publically accessible?"},"is_deprecated":{"type":"boolean","description":"Should this be deprecated? Only allowed in PUT operations."}},"required":["version","from"],"title":"version","x-readme-ref-name":"version"} as const -; +import Apply from './schemas/Apply'; +import Category from './schemas/Category'; +import Changelog from './schemas/Changelog'; +import CondensedProjectData from './schemas/CondensedProjectData'; +import CreateCategory from './schemas/CreateCategory'; +import CreateCustomPage from './schemas/CreateCustomPage'; +import CreateDoc from './schemas/CreateDoc'; +import CreateVersion from './schemas/CreateVersion'; +import CustomPage from './schemas/CustomPage'; +import DeleteApiSpecification from './schemas/DeleteApiSpecification'; +import DeleteCategory from './schemas/DeleteCategory'; +import DeleteChangelog from './schemas/DeleteChangelog'; +import DeleteCustomPage from './schemas/DeleteCustomPage'; +import DeleteDoc from './schemas/DeleteDoc'; +import DeleteVersion from './schemas/DeleteVersion'; +import DocSchemaPost from './schemas/DocSchemaPost'; +import DocSchemaPut from './schemas/DocSchemaPut'; +import DocSchemaResponse from './schemas/DocSchemaResponse'; +import ErrorApikeyEmpty from './schemas/ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './schemas/ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './schemas/ErrorApikeyNotfound'; +import ErrorCategoryInvalid from './schemas/ErrorCategoryInvalid'; +import ErrorCategoryNotfound from './schemas/ErrorCategoryNotfound'; +import ErrorCustompageInvalid from './schemas/ErrorCustompageInvalid'; +import ErrorCustompageNotfound from './schemas/ErrorCustompageNotfound'; +import ErrorDocInvalid from './schemas/ErrorDocInvalid'; +import ErrorDocNotfound from './schemas/ErrorDocNotfound'; +import ErrorRegistryNotfound from './schemas/ErrorRegistryNotfound'; +import ErrorSpecFileEmpty from './schemas/ErrorSpecFileEmpty'; +import ErrorSpecIdDuplicate from './schemas/ErrorSpecIdDuplicate'; +import ErrorSpecIdInvalid from './schemas/ErrorSpecIdInvalid'; +import ErrorSpecInvalid from './schemas/ErrorSpecInvalid'; +import ErrorSpecInvalidSchema from './schemas/ErrorSpecInvalidSchema'; +import ErrorSpecNotfound from './schemas/ErrorSpecNotfound'; +import ErrorSpecTimeout from './schemas/ErrorSpecTimeout'; +import ErrorSpecVersionNotfound from './schemas/ErrorSpecVersionNotfound'; +import ErrorVersionCantDemoteStable from './schemas/ErrorVersionCantDemoteStable'; +import ErrorVersionCantRemoveStable from './schemas/ErrorVersionCantRemoveStable'; +import ErrorVersionDuplicate from './schemas/ErrorVersionDuplicate'; +import ErrorVersionEmpty from './schemas/ErrorVersionEmpty'; +import ErrorVersionForkEmpty from './schemas/ErrorVersionForkEmpty'; +import ErrorVersionForkNotfound from './schemas/ErrorVersionForkNotfound'; +import ErrorVersionNotfound from './schemas/ErrorVersionNotfound'; +import GetApiRegistry from './schemas/GetApiRegistry'; +import GetApiSchema from './schemas/GetApiSchema'; +import GetApiSpecification from './schemas/GetApiSpecification'; +import GetCategories from './schemas/GetCategories'; +import GetCategory from './schemas/GetCategory'; +import GetCategoryDocs from './schemas/GetCategoryDocs'; +import GetChangelog from './schemas/GetChangelog'; +import GetChangelogs from './schemas/GetChangelogs'; +import GetCustomPage from './schemas/GetCustomPage'; +import GetCustomPages from './schemas/GetCustomPages'; +import GetDoc from './schemas/GetDoc'; +import GetOpenRoles from './schemas/GetOpenRoles'; +import GetProductionDoc from './schemas/GetProductionDoc'; +import GetProject from './schemas/GetProject'; +import GetVersion from './schemas/GetVersion'; +import GetVersions from './schemas/GetVersions'; +import JobOpening from './schemas/JobOpening'; +import SearchDocs from './schemas/SearchDocs'; +import UpdateApiSpecification from './schemas/UpdateApiSpecification'; +import UpdateCategory from './schemas/UpdateCategory'; +import UpdateChangelog from './schemas/UpdateChangelog'; +import UpdateCustomPage from './schemas/UpdateCustomPage'; +import UpdateDoc from './schemas/UpdateDoc'; +import UpdateVersion from './schemas/UpdateVersion'; +import UploadApiSpecification from './schemas/UploadApiSpecification'; +import Version from './schemas/Version'; export { Apply, Category, Changelog, CondensedProjectData, CreateCategory, CreateCustomPage, CreateDoc, CreateVersion, CustomPage, DeleteApiSpecification, DeleteCategory, DeleteChangelog, DeleteCustomPage, DeleteDoc, DeleteVersion, DocSchemaPost, DocSchemaPut, DocSchemaResponse, ErrorApikeyEmpty, ErrorApikeyMismatch, ErrorApikeyNotfound, ErrorCategoryInvalid, ErrorCategoryNotfound, ErrorCustompageInvalid, ErrorCustompageNotfound, ErrorDocInvalid, ErrorDocNotfound, ErrorRegistryNotfound, ErrorSpecFileEmpty, ErrorSpecIdDuplicate, ErrorSpecIdInvalid, ErrorSpecInvalid, ErrorSpecInvalidSchema, ErrorSpecNotfound, ErrorSpecTimeout, ErrorSpecVersionNotfound, ErrorVersionCantDemoteStable, ErrorVersionCantRemoveStable, ErrorVersionDuplicate, ErrorVersionEmpty, ErrorVersionForkEmpty, ErrorVersionForkNotfound, ErrorVersionNotfound, GetApiRegistry, GetApiSchema, GetApiSpecification, GetCategories, GetCategory, GetCategoryDocs, GetChangelog, GetChangelogs, GetCustomPage, GetCustomPages, GetDoc, GetOpenRoles, GetProductionDoc, GetProject, GetVersion, GetVersions, JobOpening, SearchDocs, UpdateApiSpecification, UpdateCategory, UpdateChangelog, UpdateCustomPage, UpdateDoc, UpdateVersion, UploadApiSpecification, Version } diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/Apply.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/Apply.ts new file mode 100644 index 00000000..bcc006e2 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/Apply.ts @@ -0,0 +1,3 @@ +const Apply = {"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Your full name","default":"Your Name"},"email":{"type":"string","format":"email","description":"A valid email we can reach you at.","default":"you@example.com"},"job":{"type":"string","description":"The job you're looking to apply for (https://readme.com/careers).\n\nDefault: `Front End Engineer`","enum":["Front End Engineer","Full Stack Engineer","Head of Product","Head of Solutions Engineering","Product Designer"],"default":"Front End Engineer"},"pronouns":{"type":"string","description":"Learn more at https://lgbtlifecenter.org/pronouns/"},"linkedin":{"type":"string","format":"url","description":"What have you been up to the past few years?"},"github":{"type":"string","description":"Or Bitbucket, Gitlab or anywhere else your code is hosted!","format":"url"},"coverLetter":{"type":"string","format":"blob","description":"What should we know about you?"},"dontReallyApply":{"type":"boolean","description":"Want to play with the API but not actually apply? Set this to true.","default":false}},"required":["name","email","job"],"title":"apply","x-readme-ref-name":"apply"} as const +; +export default Apply diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/Category.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/Category.ts new file mode 100644 index 00000000..7b156095 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/Category.ts @@ -0,0 +1,3 @@ +const Category = {"type":"object","title":"category","x-readme-ref-name":"category","required":["title"],"properties":{"title":{"type":"string","description":"A short title for the category. This is what will show in the sidebar."},"type":{"type":"string","enum":["reference","guide"],"default":"guide","description":"A category can be part of your reference or guide documentation, which is determined by this field.\n\nDefault: `guide`"}}} as const +; +export default Category diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/Changelog.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/Changelog.ts new file mode 100644 index 00000000..5bd6ab91 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/Changelog.ts @@ -0,0 +1,3 @@ +const Changelog = {"type":"object","properties":{"title":{"type":"string","description":"Title of the changelog."},"type":{"type":"string","enum":["","added","fixed","improved","deprecated","removed"],"description":"Default: "},"body":{"type":"string","description":"Body content of the changelog."},"hidden":{"type":"boolean","description":"Visibility of the changelog.","default":true}},"required":["title","body"],"title":"changelog","x-readme-ref-name":"changelog"} as const +; +export default Changelog diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/CondensedProjectData.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/CondensedProjectData.ts new file mode 100644 index 00000000..b4d21b7a --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/CondensedProjectData.ts @@ -0,0 +1,3 @@ +const CondensedProjectData = {"type":"object","properties":{"name":{"type":"string"},"subdomain":{"type":"string"},"jwtSecret":{"type":"string"},"baseUrl":{"type":"string","format":"url","description":"The base URL for the project. If the project is not running under a custom domain, it will be `https://projectSubdomain.readme.io`, otherwise it can either be or `https://example.com` or, in the case of an enterprise child project `https://example.com/projectSubdomain`."},"plan":{"type":"string"}},"title":"condensedProjectData","x-readme-ref-name":"condensedProjectData"} as const +; +export default CondensedProjectData diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/CreateCategory.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/CreateCategory.ts new file mode 100644 index 00000000..e2588db1 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/CreateCategory.ts @@ -0,0 +1,3 @@ +const CreateCategory = {"metadata":{"allOf":[{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const +; +export default CreateCategory diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/CreateCustomPage.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/CreateCustomPage.ts new file mode 100644 index 00000000..50c5ab07 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/CreateCustomPage.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const CreateCustomPage = {"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default CreateCustomPage diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/CreateDoc.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/CreateDoc.ts new file mode 100644 index 00000000..c5290b3e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/CreateDoc.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const CreateDoc = {"metadata":{"allOf":[{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default CreateDoc diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/CreateVersion.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/CreateVersion.ts new file mode 100644 index 00000000..e8290dd5 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/CreateVersion.ts @@ -0,0 +1,10 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; +import ErrorVersionDuplicate from './ErrorVersionDuplicate'; +import ErrorVersionEmpty from './ErrorVersionEmpty'; +import ErrorVersionForkEmpty from './ErrorVersionForkEmpty'; + +const CreateVersion = {"response":{"400":{"oneOf":[ErrorVersionEmpty,ErrorVersionDuplicate,ErrorVersionForkEmpty],"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default CreateVersion diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/CustomPage.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/CustomPage.ts new file mode 100644 index 00000000..ce1316d0 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/CustomPage.ts @@ -0,0 +1,3 @@ +const CustomPage = {"type":"object","properties":{"title":{"type":"string","description":"Title of the custom page."},"body":{"type":"string","description":"Body formatted in Markdown (displayed by default)."},"html":{"type":"string","description":"Body formatted in HTML (sanitized, only displayed if `htmlmode` is **true**)."},"htmlmode":{"type":"boolean","description":"**true** if `html` should be displayed, **false** if `body` should be displayed.","default":false},"hidden":{"type":"boolean","description":"Visibility of the custom page.","default":true}},"required":["title"],"title":"customPage","x-readme-ref-name":"customPage"} as const +; +export default CustomPage diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteApiSpecification.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteApiSpecification.ts new file mode 100644 index 00000000..0197cc8d --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteApiSpecification.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const DeleteApiSpecification = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page."}},"required":["id"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default DeleteApiSpecification diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteCategory.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteCategory.ts new file mode 100644 index 00000000..ac9e3457 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteCategory.ts @@ -0,0 +1,3 @@ +const DeleteCategory = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const +; +export default DeleteCategory diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteChangelog.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteChangelog.ts new file mode 100644 index 00000000..1403a731 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteChangelog.ts @@ -0,0 +1,3 @@ +const DeleteChangelog = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\"."}},"required":["slug"]}]}} as const +; +export default DeleteChangelog diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteCustomPage.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteCustomPage.ts new file mode 100644 index 00000000..4fa4ed6d --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteCustomPage.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const DeleteCustomPage = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default DeleteCustomPage diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteDoc.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteDoc.ts new file mode 100644 index 00000000..db8cd4c8 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteDoc.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const DeleteDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default DeleteDoc diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteVersion.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteVersion.ts new file mode 100644 index 00000000..1547e0cc --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/DeleteVersion.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const DeleteVersion = {"metadata":{"allOf":[{"type":"object","properties":{"versionId":{"type":"string","examples":["v1.0.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions)."}},"required":["versionId"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default DeleteVersion diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaPost.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaPost.ts new file mode 100644 index 00000000..dd58cb04 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaPost.ts @@ -0,0 +1,3 @@ +const DocSchemaPost = {"type":"object","oneOf":[{"required":["title","category"],"title":"`category` Parameter","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}},"categorySlug":{"type":"string","description":"The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field."},"parentDocSlug":{"type":"string","description":"If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field."}},"type":"object"},{"required":["title","categorySlug"],"title":"`categorySlug` Parameter","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}},"categorySlug":{"type":"string","description":"The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field."},"parentDocSlug":{"type":"string","description":"If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field."}},"type":"object"}],"additionalProperties":true,"title":"docSchemaPost","x-readme-ref-name":"docSchemaPost"} as const +; +export default DocSchemaPost diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaPut.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaPut.ts new file mode 100644 index 00000000..11045fa3 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaPut.ts @@ -0,0 +1,3 @@ +const DocSchemaPut = {"type":"object","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}},"categorySlug":{"type":"string","description":"The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field."},"parentDocSlug":{"type":"string","description":"If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field."}},"additionalProperties":true,"title":"docSchemaPut","x-readme-ref-name":"docSchemaPut"} as const +; +export default DocSchemaPut diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaResponse.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaResponse.ts new file mode 100644 index 00000000..746721aa --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/DocSchemaResponse.ts @@ -0,0 +1,3 @@ +const DocSchemaResponse = {"type":"object","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).\n\n`basic` `error` `link`","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}}},"additionalProperties":true,"title":"docSchemaResponse","x-readme-ref-name":"docSchemaResponse"} as const +; +export default DocSchemaResponse diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyEmpty.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyEmpty.ts new file mode 100644 index 00000000..38e8c6fe --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyEmpty.ts @@ -0,0 +1,3 @@ +const ErrorApikeyEmpty = {"title":"error_APIKEY_EMPTY","x-readme-ref-name":"error_APIKEY_EMPTY","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorApikeyEmpty diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyMismatch.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyMismatch.ts new file mode 100644 index 00000000..c749fef4 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyMismatch.ts @@ -0,0 +1,3 @@ +const ErrorApikeyMismatch = {"title":"error_APIKEY_MISMATCH","x-readme-ref-name":"error_APIKEY_MISMATCH","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorApikeyMismatch diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyNotfound.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyNotfound.ts new file mode 100644 index 00000000..f02e97a0 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorApikeyNotfound.ts @@ -0,0 +1,3 @@ +const ErrorApikeyNotfound = {"title":"error_APIKEY_NOTFOUND","x-readme-ref-name":"error_APIKEY_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorApikeyNotfound diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCategoryInvalid.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCategoryInvalid.ts new file mode 100644 index 00000000..24d54add --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCategoryInvalid.ts @@ -0,0 +1,3 @@ +const ErrorCategoryInvalid = {"title":"error_CATEGORY_INVALID","x-readme-ref-name":"error_CATEGORY_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorCategoryInvalid diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCategoryNotfound.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCategoryNotfound.ts new file mode 100644 index 00000000..24a92f9a --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCategoryNotfound.ts @@ -0,0 +1,3 @@ +const ErrorCategoryNotfound = {"title":"error_CATEGORY_NOTFOUND","x-readme-ref-name":"error_CATEGORY_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorCategoryNotfound diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCustompageInvalid.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCustompageInvalid.ts new file mode 100644 index 00000000..ac1c6bf2 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCustompageInvalid.ts @@ -0,0 +1,3 @@ +const ErrorCustompageInvalid = {"title":"error_CUSTOMPAGE_INVALID","x-readme-ref-name":"error_CUSTOMPAGE_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CUSTOMPAGE_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorCustompageInvalid diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCustompageNotfound.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCustompageNotfound.ts new file mode 100644 index 00000000..6b4decc1 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorCustompageNotfound.ts @@ -0,0 +1,3 @@ +const ErrorCustompageNotfound = {"title":"error_CUSTOMPAGE_NOTFOUND","x-readme-ref-name":"error_CUSTOMPAGE_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CUSTOMPAGE_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorCustompageNotfound diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorDocInvalid.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorDocInvalid.ts new file mode 100644 index 00000000..485f4590 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorDocInvalid.ts @@ -0,0 +1,3 @@ +const ErrorDocInvalid = {"title":"error_DOC_INVALID","x-readme-ref-name":"error_DOC_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorDocInvalid diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorDocNotfound.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorDocNotfound.ts new file mode 100644 index 00000000..ed671849 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorDocNotfound.ts @@ -0,0 +1,3 @@ +const ErrorDocNotfound = {"title":"error_DOC_NOTFOUND","x-readme-ref-name":"error_DOC_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorDocNotfound diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorRegistryNotfound.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorRegistryNotfound.ts new file mode 100644 index 00000000..d8d88049 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorRegistryNotfound.ts @@ -0,0 +1,3 @@ +const ErrorRegistryNotfound = {"title":"error_REGISTRY_NOTFOUND","x-readme-ref-name":"error_REGISTRY_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"REGISTRY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorRegistryNotfound diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecFileEmpty.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecFileEmpty.ts new file mode 100644 index 00000000..227e9424 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecFileEmpty.ts @@ -0,0 +1,3 @@ +const ErrorSpecFileEmpty = {"title":"error_SPEC_FILE_EMPTY","x-readme-ref-name":"error_SPEC_FILE_EMPTY","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_FILE_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorSpecFileEmpty diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecIdDuplicate.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecIdDuplicate.ts new file mode 100644 index 00000000..6d5aa2ca --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecIdDuplicate.ts @@ -0,0 +1,3 @@ +const ErrorSpecIdDuplicate = {"title":"error_SPEC_ID_DUPLICATE","x-readme-ref-name":"error_SPEC_ID_DUPLICATE","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_ID_DUPLICATE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorSpecIdDuplicate diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecIdInvalid.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecIdInvalid.ts new file mode 100644 index 00000000..2c03a980 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecIdInvalid.ts @@ -0,0 +1,3 @@ +const ErrorSpecIdInvalid = {"title":"error_SPEC_ID_INVALID","x-readme-ref-name":"error_SPEC_ID_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_ID_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorSpecIdInvalid diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecInvalid.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecInvalid.ts new file mode 100644 index 00000000..60752de9 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecInvalid.ts @@ -0,0 +1,3 @@ +const ErrorSpecInvalid = {"title":"error_SPEC_INVALID","x-readme-ref-name":"error_SPEC_INVALID","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorSpecInvalid diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecInvalidSchema.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecInvalidSchema.ts new file mode 100644 index 00000000..bb1bc38b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecInvalidSchema.ts @@ -0,0 +1,3 @@ +const ErrorSpecInvalidSchema = {"title":"error_SPEC_INVALID_SCHEMA","x-readme-ref-name":"error_SPEC_INVALID_SCHEMA","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_INVALID_SCHEMA"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorSpecInvalidSchema diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecNotfound.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecNotfound.ts new file mode 100644 index 00000000..800ae7a6 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecNotfound.ts @@ -0,0 +1,3 @@ +const ErrorSpecNotfound = {"title":"error_SPEC_NOTFOUND","x-readme-ref-name":"error_SPEC_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorSpecNotfound diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecTimeout.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecTimeout.ts new file mode 100644 index 00000000..81a49187 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecTimeout.ts @@ -0,0 +1,3 @@ +const ErrorSpecTimeout = {"title":"error_SPEC_TIMEOUT","x-readme-ref-name":"error_SPEC_TIMEOUT","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_TIMEOUT"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorSpecTimeout diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecVersionNotfound.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecVersionNotfound.ts new file mode 100644 index 00000000..0b4e3ed8 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorSpecVersionNotfound.ts @@ -0,0 +1,3 @@ +const ErrorSpecVersionNotfound = {"title":"error_SPEC_VERSION_NOTFOUND","x-readme-ref-name":"error_SPEC_VERSION_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorSpecVersionNotfound diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionCantDemoteStable.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionCantDemoteStable.ts new file mode 100644 index 00000000..13dd0e86 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionCantDemoteStable.ts @@ -0,0 +1,3 @@ +const ErrorVersionCantDemoteStable = {"title":"error_VERSION_CANT_DEMOTE_STABLE","x-readme-ref-name":"error_VERSION_CANT_DEMOTE_STABLE","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_CANT_DEMOTE_STABLE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorVersionCantDemoteStable diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionCantRemoveStable.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionCantRemoveStable.ts new file mode 100644 index 00000000..c95cf503 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionCantRemoveStable.ts @@ -0,0 +1,3 @@ +const ErrorVersionCantRemoveStable = {"title":"error_VERSION_CANT_REMOVE_STABLE","x-readme-ref-name":"error_VERSION_CANT_REMOVE_STABLE","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_CANT_REMOVE_STABLE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorVersionCantRemoveStable diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionDuplicate.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionDuplicate.ts new file mode 100644 index 00000000..134fd3a4 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionDuplicate.ts @@ -0,0 +1,3 @@ +const ErrorVersionDuplicate = {"title":"error_VERSION_DUPLICATE","x-readme-ref-name":"error_VERSION_DUPLICATE","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_DUPLICATE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorVersionDuplicate diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionEmpty.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionEmpty.ts new file mode 100644 index 00000000..73ca6859 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionEmpty.ts @@ -0,0 +1,3 @@ +const ErrorVersionEmpty = {"title":"error_VERSION_EMPTY","x-readme-ref-name":"error_VERSION_EMPTY","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorVersionEmpty diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionForkEmpty.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionForkEmpty.ts new file mode 100644 index 00000000..adacb547 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionForkEmpty.ts @@ -0,0 +1,3 @@ +const ErrorVersionForkEmpty = {"title":"error_VERSION_FORK_EMPTY","x-readme-ref-name":"error_VERSION_FORK_EMPTY","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_FORK_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorVersionForkEmpty diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionForkNotfound.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionForkNotfound.ts new file mode 100644 index 00000000..932d83c2 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionForkNotfound.ts @@ -0,0 +1,3 @@ +const ErrorVersionForkNotfound = {"title":"error_VERSION_FORK_NOTFOUND","x-readme-ref-name":"error_VERSION_FORK_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_FORK_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorVersionForkNotfound diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionNotfound.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionNotfound.ts new file mode 100644 index 00000000..123c9340 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/ErrorVersionNotfound.ts @@ -0,0 +1,3 @@ +const ErrorVersionNotfound = {"title":"error_VERSION_NOTFOUND","x-readme-ref-name":"error_VERSION_NOTFOUND","type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}} as const +; +export default ErrorVersionNotfound diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetApiRegistry.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetApiRegistry.ts new file mode 100644 index 00000000..54b653f9 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetApiRegistry.ts @@ -0,0 +1,3 @@ +const GetApiRegistry = {"metadata":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"An API Registry UUID. This can be found by navigating to your API Reference page and viewing code snippets for Node with the `api` library."}},"required":["uuid"]}]},"response":{"200":{"type":"object","additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetApiRegistry diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetApiSchema.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetApiSchema.ts new file mode 100644 index 00000000..e1d510c1 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetApiSchema.ts @@ -0,0 +1,3 @@ +const GetApiSchema = {"response":{"200":{"type":"object","additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetApiSchema diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetApiSpecification.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetApiSpecification.ts new file mode 100644 index 00000000..a727f2de --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetApiSpecification.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const GetApiSpecification = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetApiSpecification diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetCategories.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCategories.ts new file mode 100644 index 00000000..d9ef6efc --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCategories.ts @@ -0,0 +1,3 @@ +const GetCategories = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}}}} as const +; +export default GetCategories diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetCategory.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCategory.ts new file mode 100644 index 00000000..872e2a2a --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCategory.ts @@ -0,0 +1,3 @@ +const GetCategory = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const +; +export default GetCategory diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetCategoryDocs.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCategoryDocs.ts new file mode 100644 index 00000000..e1515618 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCategoryDocs.ts @@ -0,0 +1,3 @@ +const GetCategoryDocs = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const +; +export default GetCategoryDocs diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetChangelog.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetChangelog.ts new file mode 100644 index 00000000..a42e4fa8 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetChangelog.ts @@ -0,0 +1,3 @@ +const GetChangelog = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Update\", enter the slug \"owlet-update\"."}},"required":["slug"]}]}} as const +; +export default GetChangelog diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetChangelogs.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetChangelogs.ts new file mode 100644 index 00000000..c5aeac6b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetChangelogs.ts @@ -0,0 +1,3 @@ +const GetChangelogs = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}}}} as const +; +export default GetChangelogs diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetCustomPage.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCustomPage.ts new file mode 100644 index 00000000..6708a6d7 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCustomPage.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const GetCustomPage = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetCustomPage diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetCustomPages.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCustomPages.ts new file mode 100644 index 00000000..647e3f4e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetCustomPages.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const GetCustomPages = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetCustomPages diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetDoc.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetDoc.ts new file mode 100644 index 00000000..36b5a8a5 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetDoc.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const GetDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetDoc diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetOpenRoles.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetOpenRoles.ts new file mode 100644 index 00000000..cf48236e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetOpenRoles.ts @@ -0,0 +1,5 @@ +import JobOpening from './JobOpening'; + +const GetOpenRoles = {"response":{"200":{"type":"array","items":JobOpening,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetOpenRoles diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetProductionDoc.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetProductionDoc.ts new file mode 100644 index 00000000..29aef673 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetProductionDoc.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const GetProductionDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetProductionDoc diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetProject.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetProject.ts new file mode 100644 index 00000000..a61c05d1 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetProject.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const GetProject = {"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetProject diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetVersion.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetVersion.ts new file mode 100644 index 00000000..26a1f533 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetVersion.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const GetVersion = {"metadata":{"allOf":[{"type":"object","properties":{"versionId":{"type":"string","examples":["v1.0.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions)."}},"required":["versionId"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetVersion diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/GetVersions.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/GetVersions.ts new file mode 100644 index 00000000..e1df96e5 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/GetVersions.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const GetVersions = {"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default GetVersions diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/JobOpening.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/JobOpening.ts new file mode 100644 index 00000000..8ab53b75 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/JobOpening.ts @@ -0,0 +1,3 @@ +const JobOpening = {"type":"object","properties":{"slug":{"type":"string","description":"A slugified version of the job opening title.","examples":["api-engineer"]},"title":{"type":"string","description":"The job opening position.","examples":["API Engineer"]},"description":{"type":"string","description":"The description for this open position. This content is formatted as HTML."},"pullquote":{"type":"string","description":"A short pullquote for the open position.","examples":["Deeply knowledgeable of the web, HTTP, and the API space."]},"location":{"type":"string","description":"Where this position is located at.","examples":["Remote"]},"department":{"type":"string","description":"The internal organization you'll be working in.","examples":["Engineering"]},"url":{"type":"string","format":"url","description":"The place where you can apply for the position!"}},"title":"jobOpening","x-readme-ref-name":"jobOpening"} as const +; +export default JobOpening diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/SearchDocs.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/SearchDocs.ts new file mode 100644 index 00000000..14af3511 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/SearchDocs.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const SearchDocs = {"metadata":{"allOf":[{"type":"object","properties":{"search":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"Search string to look for."}},"required":["search"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default SearchDocs diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateApiSpecification.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateApiSpecification.ts new file mode 100644 index 00000000..ed6b74e7 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateApiSpecification.ts @@ -0,0 +1,13 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; +import ErrorSpecFileEmpty from './ErrorSpecFileEmpty'; +import ErrorSpecIdDuplicate from './ErrorSpecIdDuplicate'; +import ErrorSpecIdInvalid from './ErrorSpecIdInvalid'; +import ErrorSpecInvalid from './ErrorSpecInvalid'; +import ErrorSpecInvalidSchema from './ErrorSpecInvalidSchema'; +import ErrorSpecVersionNotfound from './ErrorSpecVersionNotfound'; + +const UpdateApiSpecification = {"body":{"type":"object","properties":{"spec":{"description":"OpenAPI/Swagger file. We accept JSON or YAML.","type":"string","format":"binary"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page."}},"required":["id"]}]},"response":{"400":{"oneOf":[ErrorSpecFileEmpty,ErrorSpecIdDuplicate,ErrorSpecIdInvalid,ErrorSpecInvalid,ErrorSpecInvalidSchema,ErrorSpecVersionNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default UpdateApiSpecification diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateCategory.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateCategory.ts new file mode 100644 index 00000000..ebb2733b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateCategory.ts @@ -0,0 +1,3 @@ +const UpdateCategory = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]}} as const +; +export default UpdateCategory diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateChangelog.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateChangelog.ts new file mode 100644 index 00000000..88eaf805 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateChangelog.ts @@ -0,0 +1,3 @@ +const UpdateChangelog = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\"."}},"required":["slug"]}]}} as const +; +export default UpdateChangelog diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateCustomPage.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateCustomPage.ts new file mode 100644 index 00000000..597b1ac1 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateCustomPage.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const UpdateCustomPage = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default UpdateCustomPage diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateDoc.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateDoc.ts new file mode 100644 index 00000000..c5fca16e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateDoc.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const UpdateDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default UpdateDoc diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateVersion.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateVersion.ts new file mode 100644 index 00000000..8c085750 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/UpdateVersion.ts @@ -0,0 +1,7 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; + +const UpdateVersion = {"metadata":{"allOf":[{"type":"object","properties":{"versionId":{"type":"string","examples":["v1.0.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions)."}},"required":["versionId"]}]},"response":{"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default UpdateVersion diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/UploadApiSpecification.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/UploadApiSpecification.ts new file mode 100644 index 00000000..c8e11606 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/UploadApiSpecification.ts @@ -0,0 +1,11 @@ +import ErrorApikeyEmpty from './ErrorApikeyEmpty'; +import ErrorApikeyMismatch from './ErrorApikeyMismatch'; +import ErrorApikeyNotfound from './ErrorApikeyNotfound'; +import ErrorSpecFileEmpty from './ErrorSpecFileEmpty'; +import ErrorSpecInvalid from './ErrorSpecInvalid'; +import ErrorSpecInvalidSchema from './ErrorSpecInvalidSchema'; +import ErrorSpecVersionNotfound from './ErrorSpecVersionNotfound'; + +const UploadApiSpecification = {"body":{"type":"object","properties":{"spec":{"description":"OpenAPI/Swagger file. We accept JSON or YAML.","type":"string","format":"binary"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"400":{"oneOf":[ErrorSpecFileEmpty,ErrorSpecInvalid,ErrorSpecInvalidSchema,ErrorSpecVersionNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[ErrorApikeyEmpty,ErrorApikeyNotfound],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[ErrorApikeyMismatch],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export default UploadApiSpecification diff --git a/packages/api/test/__fixtures__/sdk/readme/schemas/Version.ts b/packages/api/test/__fixtures__/sdk/readme/schemas/Version.ts new file mode 100644 index 00000000..21a6e6eb --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/readme/schemas/Version.ts @@ -0,0 +1,3 @@ +const Version = {"type":"object","properties":{"version":{"type":"string","description":"Semantic Version"},"codename":{"type":"string","description":"Dubbed name of version."},"from":{"type":"string","description":"Semantic Version to use as the base fork."},"is_stable":{"type":"boolean","description":"Should this be the **main** version?"},"is_beta":{"type":"boolean","default":true},"is_hidden":{"type":"boolean","description":"Should this be publically accessible?"},"is_deprecated":{"type":"boolean","description":"Should this be deprecated? Only allowed in PUT operations."}},"required":["version","from"],"title":"version","x-readme-ref-name":"version"} as const +; +export default Version diff --git a/packages/api/test/__fixtures__/sdk/response-title-quirks/schemas.ts b/packages/api/test/__fixtures__/sdk/response-title-quirks/schemas.ts index 5651e764..53ce2e3e 100644 --- a/packages/api/test/__fixtures__/sdk/response-title-quirks/schemas.ts +++ b/packages/api/test/__fixtures__/sdk/response-title-quirks/schemas.ts @@ -1,3 +1,2 @@ -const GetAnything = {"metadata":{"allOf":[{"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available","description":"Default: available"},"$schema":"https://json-schema.org/draft/2020-12/schema#","description":"Status values that need to be considered for filter"}},"required":["status"]}]},"response":{"2XX":{"oneOf":[{"title":"260 Created (token)","type":"object","properties":{"id":{"type":"string","examples":["e450ec69-dac2-4858-b4c9-6d3af44bb5f8"]}}},{"title":"260 Created","type":"object","properties":{"id":{"type":"string","examples":["e450ec69-dac2-4858-b4c9-6d3af44bb5f8"]}}}],"$schema":"https://json-schema.org/draft/2020-12/schema#"}}} as const -; +import GetAnything from './schemas/GetAnything'; export { GetAnything } diff --git a/packages/api/test/__fixtures__/sdk/response-title-quirks/schemas/GetAnything.ts b/packages/api/test/__fixtures__/sdk/response-title-quirks/schemas/GetAnything.ts new file mode 100644 index 00000000..5a27159f --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/response-title-quirks/schemas/GetAnything.ts @@ -0,0 +1,3 @@ +const GetAnything = {"metadata":{"allOf":[{"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["available","pending","sold"],"default":"available","description":"Default: available"},"$schema":"https://json-schema.org/draft/2020-12/schema#","description":"Status values that need to be considered for filter"}},"required":["status"]}]},"response":{"2XX":{"oneOf":[{"title":"260 Created (token)","type":"object","properties":{"id":{"type":"string","examples":["e450ec69-dac2-4858-b4c9-6d3af44bb5f8"]}}},{"title":"260 Created","type":"object","properties":{"id":{"type":"string","examples":["e450ec69-dac2-4858-b4c9-6d3af44bb5f8"]}}}],"$schema":"https://json-schema.org/draft/2020-12/schema#"}}} as const +; +export default GetAnything diff --git a/packages/api/test/__fixtures__/sdk/simple-js-cjs/Category.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Category.d.ts new file mode 100644 index 00000000..55ab3985 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Category.d.ts @@ -0,0 +1,17 @@ +declare const Category: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Category"; + readonly "x-readme-ref-name": "Category"; +}; +export default Category; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-cjs/Category.js b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Category.js new file mode 100644 index 00000000..0fa22cc5 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Category.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Category = { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": -9223372036854776000, "maximum": 9223372036854776000 }, "name": { "type": "string" } }, "title": "Category", "x-readme-ref-name": "Category" }; +exports.default = Category; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-cjs/FindPetsByStatus.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-cjs/FindPetsByStatus.d.ts new file mode 100644 index 00000000..c33301c4 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-cjs/FindPetsByStatus.d.ts @@ -0,0 +1,96 @@ +declare const FindPetsByStatus: { + readonly metadata: { + readonly allOf: readonly [{ + readonly type: "object"; + readonly properties: { + readonly status: { + readonly type: "array"; + readonly items: { + readonly type: "string"; + readonly enum: readonly ["available", "pending", "sold"]; + readonly default: "available"; + readonly description: "Default: available"; + }; + readonly $schema: "http://json-schema.org/draft-04/schema#"; + readonly description: "Status values that need to be considered for filter"; + }; + }; + readonly required: readonly ["status"]; + }]; + }; + readonly response: { + readonly "200": { + readonly type: "array"; + readonly items: { + readonly type: "object"; + readonly required: readonly ["name", "photoUrls"]; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly readOnly: true; + readonly default: 40; + readonly examples: readonly [25]; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly category: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Category"; + readonly "x-readme-ref-name": "Category"; + }; + readonly name: { + readonly type: "string"; + readonly examples: readonly ["doggie"]; + }; + readonly photoUrls: { + readonly type: "array"; + readonly items: { + readonly type: "string"; + readonly examples: readonly ["https://example.com/photo.png"]; + }; + }; + readonly tags: { + readonly type: "array"; + readonly items: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Tag"; + readonly "x-readme-ref-name": "Tag"; + }; + }; + readonly status: { + readonly type: "string"; + readonly description: "pet status in the store\n\n`available` `pending` `sold`"; + readonly enum: readonly ["available", "pending", "sold"]; + }; + }; + readonly title: "Pet"; + readonly "x-readme-ref-name": "Pet"; + }; + readonly $schema: "http://json-schema.org/draft-04/schema#"; + }; + }; +}; +export default FindPetsByStatus; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-cjs/FindPetsByStatus.js b/packages/api/test/__fixtures__/sdk/simple-js-cjs/FindPetsByStatus.js new file mode 100644 index 00000000..b1172af3 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-cjs/FindPetsByStatus.js @@ -0,0 +1,8 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var Pet_1 = __importDefault(require("./Pet")); +var FindPetsByStatus = { "metadata": { "allOf": [{ "type": "object", "properties": { "status": { "type": "array", "items": { "type": "string", "enum": ["available", "pending", "sold"], "default": "available", "description": "Default: available" }, "$schema": "http://json-schema.org/draft-04/schema#", "description": "Status values that need to be considered for filter" } }, "required": ["status"] }] }, "response": { "200": { "type": "array", "items": Pet_1.default, "$schema": "http://json-schema.org/draft-04/schema#" } } }; +exports.default = FindPetsByStatus; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-cjs/Pet.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Pet.d.ts new file mode 100644 index 00000000..7b225e71 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Pet.d.ts @@ -0,0 +1,69 @@ +declare const Pet: { + readonly type: "object"; + readonly required: readonly ["name", "photoUrls"]; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly readOnly: true; + readonly default: 40; + readonly examples: readonly [25]; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly category: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Category"; + readonly "x-readme-ref-name": "Category"; + }; + readonly name: { + readonly type: "string"; + readonly examples: readonly ["doggie"]; + }; + readonly photoUrls: { + readonly type: "array"; + readonly items: { + readonly type: "string"; + readonly examples: readonly ["https://example.com/photo.png"]; + }; + }; + readonly tags: { + readonly type: "array"; + readonly items: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Tag"; + readonly "x-readme-ref-name": "Tag"; + }; + }; + readonly status: { + readonly type: "string"; + readonly description: "pet status in the store\n\n`available` `pending` `sold`"; + readonly enum: readonly ["available", "pending", "sold"]; + }; + }; + readonly title: "Pet"; + readonly "x-readme-ref-name": "Pet"; +}; +export default Pet; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-cjs/Pet.js b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Pet.js new file mode 100644 index 00000000..b162c13b --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Pet.js @@ -0,0 +1,9 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var Category_1 = __importDefault(require("./Category")); +var Tag_1 = __importDefault(require("./Tag")); +var Pet = { "type": "object", "required": ["name", "photoUrls"], "properties": { "id": { "type": "integer", "format": "int64", "readOnly": true, "default": 40, "examples": [25], "minimum": -9223372036854776000, "maximum": 9223372036854776000 }, "category": Category_1.default, "name": { "type": "string", "examples": ["doggie"] }, "photoUrls": { "type": "array", "items": { "type": "string", "examples": ["https://example.com/photo.png"] } }, "tags": { "type": "array", "items": Tag_1.default }, "status": { "type": "string", "description": "pet status in the store\n\n`available` `pending` `sold`", "enum": ["available", "pending", "sold"] } }, "title": "Pet", "x-readme-ref-name": "Pet" }; +exports.default = Pet; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-cjs/Tag.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Tag.d.ts new file mode 100644 index 00000000..1766ceb6 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Tag.d.ts @@ -0,0 +1,17 @@ +declare const Tag: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Tag"; + readonly "x-readme-ref-name": "Tag"; +}; +export default Tag; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-cjs/Tag.js b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Tag.js new file mode 100644 index 00000000..06f113f4 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-cjs/Tag.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Tag = { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": -9223372036854776000, "maximum": 9223372036854776000 }, "name": { "type": "string" } }, "title": "Tag", "x-readme-ref-name": "Tag" }; +exports.default = Tag; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-cjs/schemas.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-cjs/schemas.d.ts index 11ee2ca4..c302d75e 100644 --- a/packages/api/test/__fixtures__/sdk/simple-js-cjs/schemas.d.ts +++ b/packages/api/test/__fixtures__/sdk/simple-js-cjs/schemas.d.ts @@ -1,196 +1,5 @@ -declare const Category: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Category"; - readonly "x-readme-ref-name": "Category"; -}; -declare const FindPetsByStatus: { - readonly metadata: { - readonly allOf: readonly [{ - readonly type: "object"; - readonly properties: { - readonly status: { - readonly type: "array"; - readonly items: { - readonly type: "string"; - readonly enum: readonly ["available", "pending", "sold"]; - readonly default: "available"; - readonly description: "Default: available"; - }; - readonly $schema: "http://json-schema.org/draft-04/schema#"; - readonly description: "Status values that need to be considered for filter"; - }; - }; - readonly required: readonly ["status"]; - }]; - }; - readonly response: { - readonly "200": { - readonly type: "array"; - readonly items: { - readonly type: "object"; - readonly required: readonly ["name", "photoUrls"]; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly readOnly: true; - readonly default: 40; - readonly examples: readonly [25]; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly category: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Category"; - readonly "x-readme-ref-name": "Category"; - }; - readonly name: { - readonly type: "string"; - readonly examples: readonly ["doggie"]; - }; - readonly photoUrls: { - readonly type: "array"; - readonly items: { - readonly type: "string"; - readonly examples: readonly ["https://example.com/photo.png"]; - }; - }; - readonly tags: { - readonly type: "array"; - readonly items: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Tag"; - readonly "x-readme-ref-name": "Tag"; - }; - }; - readonly status: { - readonly type: "string"; - readonly description: "pet status in the store\n\n`available` `pending` `sold`"; - readonly enum: readonly ["available", "pending", "sold"]; - }; - }; - readonly title: "Pet"; - readonly "x-readme-ref-name": "Pet"; - }; - readonly $schema: "http://json-schema.org/draft-04/schema#"; - }; - }; -}; -declare const Pet: { - readonly type: "object"; - readonly required: readonly ["name", "photoUrls"]; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly readOnly: true; - readonly default: 40; - readonly examples: readonly [25]; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly category: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Category"; - readonly "x-readme-ref-name": "Category"; - }; - readonly name: { - readonly type: "string"; - readonly examples: readonly ["doggie"]; - }; - readonly photoUrls: { - readonly type: "array"; - readonly items: { - readonly type: "string"; - readonly examples: readonly ["https://example.com/photo.png"]; - }; - }; - readonly tags: { - readonly type: "array"; - readonly items: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Tag"; - readonly "x-readme-ref-name": "Tag"; - }; - }; - readonly status: { - readonly type: "string"; - readonly description: "pet status in the store\n\n`available` `pending` `sold`"; - readonly enum: readonly ["available", "pending", "sold"]; - }; - }; - readonly title: "Pet"; - readonly "x-readme-ref-name": "Pet"; -}; -declare const Tag: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Tag"; - readonly "x-readme-ref-name": "Tag"; -}; +import Category from './schemas/Category'; +import FindPetsByStatus from './schemas/FindPetsByStatus'; +import Pet from './schemas/Pet'; +import Tag from './schemas/Tag'; export { Category, FindPetsByStatus, Pet, Tag }; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-esm/Category.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-esm/Category.d.ts new file mode 100644 index 00000000..55ab3985 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-esm/Category.d.ts @@ -0,0 +1,17 @@ +declare const Category: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Category"; + readonly "x-readme-ref-name": "Category"; +}; +export default Category; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-esm/Category.js b/packages/api/test/__fixtures__/sdk/simple-js-esm/Category.js new file mode 100644 index 00000000..ebe9254e --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-esm/Category.js @@ -0,0 +1,2 @@ +const Category = { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": -9223372036854776000, "maximum": 9223372036854776000 }, "name": { "type": "string" } }, "title": "Category", "x-readme-ref-name": "Category" }; +export default Category; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-esm/FindPetsByStatus.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-esm/FindPetsByStatus.d.ts new file mode 100644 index 00000000..c33301c4 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-esm/FindPetsByStatus.d.ts @@ -0,0 +1,96 @@ +declare const FindPetsByStatus: { + readonly metadata: { + readonly allOf: readonly [{ + readonly type: "object"; + readonly properties: { + readonly status: { + readonly type: "array"; + readonly items: { + readonly type: "string"; + readonly enum: readonly ["available", "pending", "sold"]; + readonly default: "available"; + readonly description: "Default: available"; + }; + readonly $schema: "http://json-schema.org/draft-04/schema#"; + readonly description: "Status values that need to be considered for filter"; + }; + }; + readonly required: readonly ["status"]; + }]; + }; + readonly response: { + readonly "200": { + readonly type: "array"; + readonly items: { + readonly type: "object"; + readonly required: readonly ["name", "photoUrls"]; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly readOnly: true; + readonly default: 40; + readonly examples: readonly [25]; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly category: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Category"; + readonly "x-readme-ref-name": "Category"; + }; + readonly name: { + readonly type: "string"; + readonly examples: readonly ["doggie"]; + }; + readonly photoUrls: { + readonly type: "array"; + readonly items: { + readonly type: "string"; + readonly examples: readonly ["https://example.com/photo.png"]; + }; + }; + readonly tags: { + readonly type: "array"; + readonly items: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Tag"; + readonly "x-readme-ref-name": "Tag"; + }; + }; + readonly status: { + readonly type: "string"; + readonly description: "pet status in the store\n\n`available` `pending` `sold`"; + readonly enum: readonly ["available", "pending", "sold"]; + }; + }; + readonly title: "Pet"; + readonly "x-readme-ref-name": "Pet"; + }; + readonly $schema: "http://json-schema.org/draft-04/schema#"; + }; + }; +}; +export default FindPetsByStatus; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-esm/FindPetsByStatus.js b/packages/api/test/__fixtures__/sdk/simple-js-esm/FindPetsByStatus.js new file mode 100644 index 00000000..d16b00ae --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-esm/FindPetsByStatus.js @@ -0,0 +1,3 @@ +import Pet from './Pet'; +const FindPetsByStatus = { "metadata": { "allOf": [{ "type": "object", "properties": { "status": { "type": "array", "items": { "type": "string", "enum": ["available", "pending", "sold"], "default": "available", "description": "Default: available" }, "$schema": "http://json-schema.org/draft-04/schema#", "description": "Status values that need to be considered for filter" } }, "required": ["status"] }] }, "response": { "200": { "type": "array", "items": Pet, "$schema": "http://json-schema.org/draft-04/schema#" } } }; +export default FindPetsByStatus; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-esm/Pet.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-esm/Pet.d.ts new file mode 100644 index 00000000..7b225e71 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-esm/Pet.d.ts @@ -0,0 +1,69 @@ +declare const Pet: { + readonly type: "object"; + readonly required: readonly ["name", "photoUrls"]; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly readOnly: true; + readonly default: 40; + readonly examples: readonly [25]; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly category: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Category"; + readonly "x-readme-ref-name": "Category"; + }; + readonly name: { + readonly type: "string"; + readonly examples: readonly ["doggie"]; + }; + readonly photoUrls: { + readonly type: "array"; + readonly items: { + readonly type: "string"; + readonly examples: readonly ["https://example.com/photo.png"]; + }; + }; + readonly tags: { + readonly type: "array"; + readonly items: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Tag"; + readonly "x-readme-ref-name": "Tag"; + }; + }; + readonly status: { + readonly type: "string"; + readonly description: "pet status in the store\n\n`available` `pending` `sold`"; + readonly enum: readonly ["available", "pending", "sold"]; + }; + }; + readonly title: "Pet"; + readonly "x-readme-ref-name": "Pet"; +}; +export default Pet; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-esm/Pet.js b/packages/api/test/__fixtures__/sdk/simple-js-esm/Pet.js new file mode 100644 index 00000000..c3748181 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-esm/Pet.js @@ -0,0 +1,4 @@ +import Category from './Category'; +import Tag from './Tag'; +const Pet = { "type": "object", "required": ["name", "photoUrls"], "properties": { "id": { "type": "integer", "format": "int64", "readOnly": true, "default": 40, "examples": [25], "minimum": -9223372036854776000, "maximum": 9223372036854776000 }, "category": Category, "name": { "type": "string", "examples": ["doggie"] }, "photoUrls": { "type": "array", "items": { "type": "string", "examples": ["https://example.com/photo.png"] } }, "tags": { "type": "array", "items": Tag }, "status": { "type": "string", "description": "pet status in the store\n\n`available` `pending` `sold`", "enum": ["available", "pending", "sold"] } }, "title": "Pet", "x-readme-ref-name": "Pet" }; +export default Pet; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-esm/Tag.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-esm/Tag.d.ts new file mode 100644 index 00000000..1766ceb6 --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-esm/Tag.d.ts @@ -0,0 +1,17 @@ +declare const Tag: { + readonly type: "object"; + readonly properties: { + readonly id: { + readonly type: "integer"; + readonly format: "int64"; + readonly minimum: -9223372036854776000; + readonly maximum: 9223372036854776000; + }; + readonly name: { + readonly type: "string"; + }; + }; + readonly title: "Tag"; + readonly "x-readme-ref-name": "Tag"; +}; +export default Tag; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-esm/Tag.js b/packages/api/test/__fixtures__/sdk/simple-js-esm/Tag.js new file mode 100644 index 00000000..b39945bf --- /dev/null +++ b/packages/api/test/__fixtures__/sdk/simple-js-esm/Tag.js @@ -0,0 +1,2 @@ +const Tag = { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": -9223372036854776000, "maximum": 9223372036854776000 }, "name": { "type": "string" } }, "title": "Tag", "x-readme-ref-name": "Tag" }; +export default Tag; diff --git a/packages/api/test/__fixtures__/sdk/simple-js-esm/schemas.d.ts b/packages/api/test/__fixtures__/sdk/simple-js-esm/schemas.d.ts index 11ee2ca4..c302d75e 100644 --- a/packages/api/test/__fixtures__/sdk/simple-js-esm/schemas.d.ts +++ b/packages/api/test/__fixtures__/sdk/simple-js-esm/schemas.d.ts @@ -1,196 +1,5 @@ -declare const Category: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Category"; - readonly "x-readme-ref-name": "Category"; -}; -declare const FindPetsByStatus: { - readonly metadata: { - readonly allOf: readonly [{ - readonly type: "object"; - readonly properties: { - readonly status: { - readonly type: "array"; - readonly items: { - readonly type: "string"; - readonly enum: readonly ["available", "pending", "sold"]; - readonly default: "available"; - readonly description: "Default: available"; - }; - readonly $schema: "http://json-schema.org/draft-04/schema#"; - readonly description: "Status values that need to be considered for filter"; - }; - }; - readonly required: readonly ["status"]; - }]; - }; - readonly response: { - readonly "200": { - readonly type: "array"; - readonly items: { - readonly type: "object"; - readonly required: readonly ["name", "photoUrls"]; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly readOnly: true; - readonly default: 40; - readonly examples: readonly [25]; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly category: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Category"; - readonly "x-readme-ref-name": "Category"; - }; - readonly name: { - readonly type: "string"; - readonly examples: readonly ["doggie"]; - }; - readonly photoUrls: { - readonly type: "array"; - readonly items: { - readonly type: "string"; - readonly examples: readonly ["https://example.com/photo.png"]; - }; - }; - readonly tags: { - readonly type: "array"; - readonly items: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Tag"; - readonly "x-readme-ref-name": "Tag"; - }; - }; - readonly status: { - readonly type: "string"; - readonly description: "pet status in the store\n\n`available` `pending` `sold`"; - readonly enum: readonly ["available", "pending", "sold"]; - }; - }; - readonly title: "Pet"; - readonly "x-readme-ref-name": "Pet"; - }; - readonly $schema: "http://json-schema.org/draft-04/schema#"; - }; - }; -}; -declare const Pet: { - readonly type: "object"; - readonly required: readonly ["name", "photoUrls"]; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly readOnly: true; - readonly default: 40; - readonly examples: readonly [25]; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly category: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Category"; - readonly "x-readme-ref-name": "Category"; - }; - readonly name: { - readonly type: "string"; - readonly examples: readonly ["doggie"]; - }; - readonly photoUrls: { - readonly type: "array"; - readonly items: { - readonly type: "string"; - readonly examples: readonly ["https://example.com/photo.png"]; - }; - }; - readonly tags: { - readonly type: "array"; - readonly items: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Tag"; - readonly "x-readme-ref-name": "Tag"; - }; - }; - readonly status: { - readonly type: "string"; - readonly description: "pet status in the store\n\n`available` `pending` `sold`"; - readonly enum: readonly ["available", "pending", "sold"]; - }; - }; - readonly title: "Pet"; - readonly "x-readme-ref-name": "Pet"; -}; -declare const Tag: { - readonly type: "object"; - readonly properties: { - readonly id: { - readonly type: "integer"; - readonly format: "int64"; - readonly minimum: -9223372036854776000; - readonly maximum: 9223372036854776000; - }; - readonly name: { - readonly type: "string"; - }; - }; - readonly title: "Tag"; - readonly "x-readme-ref-name": "Tag"; -}; +import Category from './schemas/Category'; +import FindPetsByStatus from './schemas/FindPetsByStatus'; +import Pet from './schemas/Pet'; +import Tag from './schemas/Tag'; export { Category, FindPetsByStatus, Pet, Tag }; diff --git a/packages/api/test/codegen/languages/typescript/index.test.ts b/packages/api/test/codegen/languages/typescript/index.test.ts index 75b71e73..9cabc112 100644 --- a/packages/api/test/codegen/languages/typescript/index.test.ts +++ b/packages/api/test/codegen/languages/typescript/index.test.ts @@ -123,7 +123,7 @@ describe('typescript', () => { }); describe('#generator', () => { - it.only( + it( 'should generate typescript (by default)', assertSDKFixture('@api/test-utils/definitions/simple.json', 'simple-ts'), );