UNPKG

api

Version:

Magical SDK generation from an OpenAPI definition 🪄

125 lines • 6.33 kB
import type { FromSchema } from '@readme/api-core/types'; declare const lockfileApiSchema: { readonly type: "object"; readonly required: readonly ["createdAt", "identifier", "installerVersion", "integrity"]; readonly properties: { readonly createdAt: { readonly type: "string"; readonly format: "date-time"; readonly description: "The date that this SDK was installed."; readonly examples: readonly ["2023-10-19T20:35:39.268Z"]; }; readonly identifier: { readonly type: "string"; readonly description: "A unique identifier of the API. This'll be used to do imports on `@api/<identifier>` and also where the SDK code will be located in `.api/apis/<identifier>`"; readonly examples: readonly ["petstore"]; }; readonly installerVersion: { readonly type: "string"; readonly description: "The version of `api` that was used to install this SDK."; readonly examples: readonly ["7.0.0"]; }; readonly integrity: { readonly type: "string"; readonly description: "An integrity hash that will be used to determine on `npx api update` calls if the API has changed since the SDK was last generated."; readonly examples: readonly ["sha512-otRF5TLMeDczSJlrmWLNDHLfmXg+C98oa/I/X2WWycwngh+a6WsbnjTbfwKGRU5DFbagOn2qX2SRvtBGOBRVGg=="]; }; readonly language: { readonly type: "string"; readonly description: "The language that this SDK was generated for."; readonly default: "js"; readonly enum: "js"[]; }; readonly private: { readonly type: "boolean"; readonly description: "Was this SDK installed as a private, unpublished, package to the filesystem?"; }; readonly source: { readonly type: "string"; readonly description: "The original source that was used to generate the SDK with."; readonly examples: readonly ["https://raw.githubusercontent.com/readmeio/oas-examples/main/3.0/json/petstore-simple.json", "./petstore.json", "@developers/v2.0#nysezql0wwo236"]; }; readonly updatedAt: { readonly type: "string"; readonly format: "date-time"; readonly description: "The date that this SDK was last rebuilt or updated."; readonly examples: readonly ["2023-10-19T20:35:39.268Z"]; }; }; readonly additionalProperties: false; }; export declare const lockfileSchema: { readonly $schema: "http://json-schema.org/draft-07/schema#"; readonly title: "api storage lockfile"; readonly description: "See https://api.readme.dev/docs"; readonly type: "object"; readonly required: readonly ["apis"]; readonly additionalProperties: false; readonly properties: { readonly $schema: { readonly type: "string"; }; readonly apis: { readonly type: "array"; readonly description: "The list of installed APIs"; readonly items: { readonly $ref: "#/definitions/api"; }; }; }; readonly definitions: { readonly api: { readonly type: "object"; readonly required: readonly ["createdAt", "identifier", "installerVersion", "integrity"]; readonly properties: { readonly createdAt: { readonly type: "string"; readonly format: "date-time"; readonly description: "The date that this SDK was installed."; readonly examples: readonly ["2023-10-19T20:35:39.268Z"]; }; readonly identifier: { readonly type: "string"; readonly description: "A unique identifier of the API. This'll be used to do imports on `@api/<identifier>` and also where the SDK code will be located in `.api/apis/<identifier>`"; readonly examples: readonly ["petstore"]; }; readonly installerVersion: { readonly type: "string"; readonly description: "The version of `api` that was used to install this SDK."; readonly examples: readonly ["7.0.0"]; }; readonly integrity: { readonly type: "string"; readonly description: "An integrity hash that will be used to determine on `npx api update` calls if the API has changed since the SDK was last generated."; readonly examples: readonly ["sha512-otRF5TLMeDczSJlrmWLNDHLfmXg+C98oa/I/X2WWycwngh+a6WsbnjTbfwKGRU5DFbagOn2qX2SRvtBGOBRVGg=="]; }; readonly language: { readonly type: "string"; readonly description: "The language that this SDK was generated for."; readonly default: "js"; readonly enum: "js"[]; }; readonly private: { readonly type: "boolean"; readonly description: "Was this SDK installed as a private, unpublished, package to the filesystem?"; }; readonly source: { readonly type: "string"; readonly description: "The original source that was used to generate the SDK with."; readonly examples: readonly ["https://raw.githubusercontent.com/readmeio/oas-examples/main/3.0/json/petstore-simple.json", "./petstore.json", "@developers/v2.0#nysezql0wwo236"]; }; readonly updatedAt: { readonly type: "string"; readonly format: "date-time"; readonly description: "The date that this SDK was last rebuilt or updated."; readonly examples: readonly ["2023-10-19T20:35:39.268Z"]; }; }; readonly additionalProperties: false; }; }; }; export type Lockfile = FromSchema<typeof lockfileSchema>; export type LockfileAPI = FromSchema<typeof lockfileApiSchema>; export {}; //# sourceMappingURL=lockfileSchema.d.ts.map