@redotech/redo-api-schema 2.2.41 → 2.2.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.41"
34
+ "version": "2.2.42"
35
35
  }
package/lib/openapi.js DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * This file was auto-generated by openapi-typescript.
3
- * Do not make direct changes to the file.
4
- */
5
- export {};
6
- //# sourceMappingURL=openapi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"openapi.js","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file was auto-generated by openapi-typescript.\n * Do not make direct changes to the file.\n */\n\n\n/** OneOf type helpers */\ntype Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };\ntype XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;\ntype OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;\n\nexport interface paths {\n \"/__return\": {\n /** Return event [Webhook] */\n post: operations[\"Webhook return event\"];\n };\n \"/returns/{returnId}/comments\": {\n /**\n * List return comments\n * @description List return comments.\n */\n get: operations[\"Return comments get\"];\n /**\n * Create return comment\n * @description Create return comment.\n */\n post: operations[\"Return comment create\"];\n parameters: {\n path: {\n returnId: components[\"parameters\"][\"return-id.param\"];\n };\n };\n };\n \"/returns/{returnId}/status\": {\n /**\n * Get return status\n * @description Get return status.\n */\n get: operations[\"Return status get\"];\n /**\n * Update return status\n * @description Update return status.\n */\n put: operations[\"Return status update\"];\n parameters: {\n path: {\n returnId: components[\"parameters\"][\"return-id.param\"];\n };\n };\n };\n \"/stores/{storeId}/returns\": {\n /**\n * List returns\n * @description List returns, sorted by most recent to least recent.\n */\n get: operations[\"Returns list\"];\n parameters: {\n path: {\n storeId: components[\"parameters\"][\"store-id.param\"];\n };\n };\n };\n \"/stores/{storeId}/webhooks\": {\n /**\n * List webhooks\n * @description List webhooks for store.\n */\n get: operations[\"Webhooks list\"];\n /**\n * Create or update webhook\n * @description Create webhook for store. Or if webhook already exists with `externalId`, update it.\n */\n post: operations[\"Webhook create\"];\n parameters: {\n path: {\n storeId: components[\"parameters\"][\"store-id.param\"];\n };\n };\n };\n \"/webhooks/{webhookId}\": {\n /**\n * Get webhook\n * @description Get a webhook.\n */\n get: operations[\"Webhook get\"];\n /**\n * Update webhook\n * @description Update a webhook.\n */\n put: operations[\"Webhook update\"];\n /**\n * Delete webhook\n * @description Delete a webbhook.\n */\n delete: operations[\"Webhook delete\"];\n parameters: {\n path: {\n webhookId: components[\"parameters\"][\"webhook-id.param\"];\n };\n };\n };\n \"/webhooks/{webhookId}/replay\": {\n /**\n * Replay webhook\n * @description Replay a webhook.\n */\n post: operations[\"Webhook replay\"];\n parameters: {\n path: {\n webhookId: components[\"parameters\"][\"webhook-id.param\"];\n };\n };\n };\n}\n\nexport interface webhooks {\n \"return\": {\n /** Return event [Webhook] */\n post: operations[\"Webhook return event\"];\n };\n}\n\nexport interface components {\n schemas: {\n /**\n * Address\n * @description Address.\n */\n \"address.schema\": {\n /**\n * City\n * @description City name\n */\n city: string;\n /**\n * Country\n * @description Country code\n */\n country: string;\n /**\n * Line 1\n * @description Line 1\n */\n line1: string;\n /**\n * Line 2\n * @description Line 2\n * @default\n */\n line2?: string;\n /**\n * Postal code\n * @description Postal or ZIP code\n */\n postalCode: string;\n /**\n * State\n * @description State or province\n */\n state: string;\n };\n /**\n * Comment\n * @description Comment with either message or image.\n */\n \"comment.schema\": OneOf<[{\n /**\n * Image\n * @description Base64-encoded image\n */\n image?: string;\n }, {\n /**\n * Message\n * @description Message.\n */\n message?: string;\n }]>;\n /**\n * Problem details\n * @description See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).\n */\n \"error.schema\": {\n /** @description A human-readable explanation specific to this occurrence of the problem. */\n detail?: string;\n /** @description A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. */\n instance?: string;\n /** @description The HTTP status code ([[RFC7231], Section 6](https://datatracker.ietf.org/doc/html/rfc7231#section-6)) generated by the origin server for this occurrence of the problem. */\n status?: number;\n /** @description A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [[RFC7231], Section 3.4](https://datatracker.ietf.org/doc/html/rfc7231#section-3.4)). */\n title?: string;\n /**\n * Format: uri-reference\n * @description A URI reference [[RFC3986](https://datatracker.ietf.org/doc/html/rfc3986)] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [[W3C.REC-html5-20141028](https://datatracker.ietf.org/doc/html/rfc7807#ref-W3C.REC-html5-20141028)]). When this member is not present, its value is assumed to be \"about:blank\".\n * @default about:blank\n */\n type?: string;\n };\n /**\n * Exchang provision\n * @example deferred\n * @enum {string}\n */\n \"exchange-provision.schema\": \"instant\" | \"deferred\";\n /**\n * HTTPS callback\n * @description HTTPS callback\n */\n \"https-callback.schema\": {\n /**\n * Authorization\n * @description Authorization.\n */\n auth: OneOf<[{\n /**\n * Bearer\n * @description Bearer\n */\n bearer?: {\n /**\n * Token\n * Format: password\n * @description Token for Bearer authorization.\n * @example abc123\n */\n token?: string;\n };\n }, null]>;\n /**\n * URL\n * Format: uri\n * @description HTTPS callback URL.\n * @example https://subscriber.example.org/events\n */\n url: string;\n };\n /**\n * Item quantity\n * @description Item quantity.\n * @example 1\n */\n \"item-quantity.schema\": number;\n /**\n * Money\n * @description Currency amount\n */\n \"money.schema\": {\n /** Amount */\n amount?: number;\n /** Currency */\n currency?: string;\n };\n /**\n * Order\n * @description Order.\n */\n \"order-read.schema\": {\n customer: {\n /**\n * Email address\n * Format: email\n * @description Email address of customer.\n */\n emailAddress?: string;\n /**\n * Name\n * @description Name of customer.\n */\n name: components[\"schemas\"][\"person-name.schema\"];\n /**\n * Phone number\n * @description Phone number of customer.\n */\n phoneNumber?: components[\"schemas\"][\"phone-number.schema\"];\n };\n /**\n * External ID\n * @description Shopify ID\n */\n externalId?: string;\n /**\n * ID\n * @description Order ID\n * @example 64e4da943dd822979a70bd12\n */\n id: string;\n /** Line items */\n items: {\n /** @example 123 */\n externalId?: string;\n /**\n * ID\n * @description Line item ID\n */\n id: string;\n /** Product */\n product: components[\"schemas\"][\"product.schema\"];\n /** Quantity */\n quantity: components[\"schemas\"][\"item-quantity.schema\"];\n /** Variant */\n variant: components[\"schemas\"][\"product-variant.schema\"];\n }[];\n /**\n * Name\n * @description Shopify name.\n */\n name: string;\n };\n /**\n * Person name\n * @description Person name.\n */\n \"person-name.schema\": {\n /** @description Given name */\n given: string;\n /** @description Surname */\n surname: string;\n };\n /**\n * Phone number\n * @description Phone number, in E.164 format\n */\n \"phone-number.schema\": string;\n /** Product variant */\n \"product-variant.schema\": {\n /** External ID */\n externalId?: string;\n /** Title */\n name: string;\n /** SKU */\n sku?: string;\n /** Weight */\n weight?: components[\"schemas\"][\"weight.schema\"];\n };\n /**\n * Product\n * @description Product.\n */\n \"product.schema\": {\n /**\n * External ID\n * @description Product ID in external system (e.g. shopify).\n */\n externalId?: string;\n /**\n * Name\n * @description Product title\n */\n name: string;\n };\n /**\n * Return\n * @description Return read.\n */\n \"return-read.schema\": {\n /**\n * Created at\n * Format: date-time\n * @description Time of creation.\n */\n createdAt: string;\n destination: {\n /**\n * Mailing address\n * @description Mailing address to send the returned items.\n */\n mailingAddress?: components[\"schemas\"][\"address.schema\"];\n /**\n * Phone number\n * @description Phone number of the destination.\n */\n phoneNumber?: components[\"schemas\"][\"phone-number.schema\"];\n };\n /**\n * Exchange\n * @description Exchange order\n */\n exchange?: {\n /** Line items */\n items: {\n /** ID */\n id: string;\n /** Product */\n product: components[\"schemas\"][\"product.schema\"];\n /** Quantity */\n quantity: components[\"schemas\"][\"item-quantity.schema\"];\n variant: components[\"schemas\"][\"product-variant.schema\"];\n }[];\n order?: {\n /**\n * External ID\n * @description ID of external order\n */\n externalId?: string;\n id?: string;\n };\n /** Provision */\n provision: components[\"schemas\"][\"exchange-provision.schema\"];\n };\n /**\n * Gift cards\n * @description Gift card(s) created for return\n */\n giftCards: {\n /** Amount */\n amount: components[\"schemas\"][\"money.schema\"];\n /**\n * Code\n * @description Gift card 16 digit code.\n */\n code: string;\n /**\n * ID\n * @description Gift card ID.\n */\n externalId: string;\n }[];\n /**\n * Identifier\n * @description Return identifier.\n */\n id: string;\n /** @description Return items */\n items: ({\n /** Exchange item */\n exchangeItem?: {\n /**\n * ID\n * @description ID of exchange line item\n */\n id?: string;\n };\n /**\n * ID\n * @description Return item ID.\n */\n id?: string;\n /**\n * Order item\n * @description Order line item\n */\n orderItem?: {\n /**\n * ID\n * @description Line item ID in original order. Note: There can be more than return item for an original line item, with different quantity, return reasons, etc.\n */\n id?: string;\n };\n /** Quantity */\n quantity: components[\"schemas\"][\"item-quantity.schema\"];\n /** @description Return reason */\n reason: string;\n /** @description Refund */\n refund?: {\n /** Amount */\n amount: components[\"schemas\"][\"money.schema\"];\n /** Planned amount */\n pendingAmount: components[\"schemas\"][\"money.schema\"];\n /**\n * Taxes\n * @description Taxes.\n */\n pendingTaxAmount: components[\"schemas\"][\"money.schema\"];\n /**\n * Taxes\n * @description Taxes.\n */\n taxAmount: components[\"schemas\"][\"money.schema\"];\n /**\n * @description Refund method\n * @enum {string}\n */\n type: \"credit\" | \"refund\";\n };\n })[];\n /**\n * Order\n * @description Original order.\n */\n order: {\n /**\n * ID\n * @description Order ID.\n * @example abc123\n */\n id: string;\n };\n /**\n * Shipment\n * @description Shipment, if has been made\n */\n shipment?: {\n /**\n * Carrier\n * @description Carrier code\n */\n carrier?: string;\n /**\n * Status\n * @description Status of shipment\n * @enum {string}\n */\n status?: \"pre_transit\" | \"transit\" | \"delivered\" | \"cancelled\" | \"flagged\";\n /**\n * Tracker\n * @description Tracking number\n */\n tracker?: string;\n };\n source: {\n /**\n * Email address\n * Format: email\n * @description Email address.\n */\n emailAddress: string;\n /**\n * Mailing address\n * @description Mailing address returned items are sent from.\n */\n mailingAddress: components[\"schemas\"][\"address.schema\"];\n /**\n * Name\n * @description Name of returner.\n */\n name: components[\"schemas\"][\"person-name.schema\"];\n /**\n * Phone number\n * @description Phone number of returner.\n */\n phoneNumber: components[\"schemas\"][\"phone-number.schema\"];\n };\n /**\n * Status\n * @description Return status.\n */\n status: components[\"schemas\"][\"return-status.schema\"];\n /**\n * Updated at\n * Format: date-time\n * @description Time of last update.\n */\n updatedAt: string;\n };\n /**\n * Return status\n * @description Return status.\n *\n * * manual_review: Return requires pre-shipment merchant authorization.\n * * open: Return has been approved is awaiting shipment.\n * * transit: Return shipment is in transit.\n * * delivered: Return shipment has been delievered and awaiting processing.\n * * flagged: A problem with return processing requires merchant action.\n * * cancelled: The return has been cancelled.\n * * closed: The return has been completed.\n *\n * @example open\n * @enum {string}\n */\n \"return-status.schema\": \"manual_review\" | \"open\" | \"transit\" | \"delivered\" | \"flagged\" | \"cancelled\" | \"closed\";\n /**\n * Webhook create\n * @description Webhook create.\n */\n \"webhook-create.schema\": {\n /**\n * Backfill\n * @description Create events for already-existing items\n * @default false\n */\n backfill?: boolean;\n /**\n * HTTPS callback\n * @description HTTPS callback to POST events.\n */\n callback: components[\"schemas\"][\"https-callback.schema\"];\n /**\n * External ID\n * @description Optional external identifier.\n * @default null\n */\n externalId?: string | null;\n /**\n * Topic\n * @description Topic.\n */\n topic: components[\"schemas\"][\"webhook-topic.schema\"];\n };\n /**\n * Webhook read\n * @description Webhook read.\n */\n \"webhook-read.schema\": {\n /**\n * Callback\n * @description HTTPS callback URL to POST events.\n */\n callback: components[\"schemas\"][\"https-callback.schema\"];\n /**\n * Created at.\n * Format: date-time\n * @description Time created.\n */\n createdAt: string;\n /**\n * External ID\n * @description Optional external identifier.\n * @default null\n */\n externalId?: string | null;\n /**\n * ID\n * @description Webhook ID.\n */\n id?: string;\n /**\n * Topic\n * @description Topic.\n */\n topic: components[\"schemas\"][\"webhook-topic.schema\"];\n /**\n * Updated at.\n * Format: date-time\n * @description Last time updated.\n */\n updatedAt: string;\n };\n /**\n * Webhook topic\n * @description Webhook topic.\n * @enum {string}\n */\n \"webhook-topic.schema\": \"return\";\n /**\n * Webhook update\n * @description Webhook update.\n */\n \"webhook-update.schema\": {\n /**\n * HTTPS callback\n * @description HTTPS callback to POST events.\n */\n callback: components[\"schemas\"][\"https-callback.schema\"];\n /**\n * External ID\n * @description Optional external identifier.\n * @default null\n */\n externalId?: string | null;\n };\n /**\n * Weight\n * @description Weight.\n */\n \"weight.schema\": {\n /**\n * Kilograms\n * @description Weight in kilograms\n */\n kg?: number;\n };\n };\n responses: never;\n parameters: {\n /**\n * @description Page marker, from X-Page-Next header\n * @example 64df700931a04885276c3364\n */\n \"page-continue.param\"?: string;\n /**\n * @description Page size, defaults to 20\n * @example 20\n */\n \"page-size.param\"?: number;\n /** @description Return ID */\n \"return-id.param\": string;\n /** @description Store ID */\n \"store-id.param\": string;\n /**\n * @description Maximum updated time, exclusive\n * @example 2000-02-01T00:00:00Z\n */\n \"updated-at-max.param\"?: string;\n /**\n * @description Minimum updated time, inclusive\n * @example 2000-01-01T00:00:00Z\n */\n \"updated-at-min.param\"?: string;\n /** @description Webhook ID */\n \"webhook-id.param\": string;\n };\n requestBodies: never;\n headers: {\n /** @description Next value for X-Page-Continue, for more results */\n \"page-next.header\": string;\n };\n pathItems: never;\n}\n\nexport type $defs = Record<string, never>;\n\nexport type external = Record<string, never>;\n\nexport interface operations {\n\n /** Return event [Webhook] */\n \"Webhook return event\": {\n /**\n * @description Return event webhook.\n *\n * <!-- theme: warning -->\n * > #### Note\n * >\n * > This is not an actual Redo API endpoint, but a webhook.\n */\n requestBody: {\n content: {\n \"application/json\": {\n /**\n * At\n * Format: date-time\n * @description Event time\n */\n at?: string;\n /**\n * Order\n * @description Order for return.\n */\n order?: components[\"schemas\"][\"order-read.schema\"];\n /**\n * Return\n * @description Return.\n */\n return?: components[\"schemas\"][\"return-read.schema\"];\n /**\n * @description Event type\n * @enum {string}\n */\n type?: \"backfill\" | \"created\" | \"updated\";\n };\n };\n };\n responses: {\n /** @description Success. Return a 2xx status code to indicate success. */\n \"2xx\": {\n content: never;\n };\n /** @description Error. The event will be retried multiple times and then discarded. */\n default: {\n content: never;\n };\n };\n };\n /**\n * List return comments\n * @description List return comments.\n */\n \"Return comments get\": {\n parameters: {\n path: {\n returnId: components[\"parameters\"][\"return-id.param\"];\n };\n };\n responses: {\n /** @description Success */\n 200: {\n content: {\n \"application/json\": {\n /**\n * Comments\n * @description Return comments.\n */\n comments: components[\"schemas\"][\"comment.schema\"][];\n };\n };\n };\n };\n };\n /**\n * Create return comment\n * @description Create return comment.\n */\n \"Return comment create\": {\n parameters: {\n path: {\n returnId: components[\"parameters\"][\"return-id.param\"];\n };\n };\n requestBody: {\n content: {\n \"application/json\": {\n comment: components[\"schemas\"][\"comment.schema\"];\n };\n };\n };\n responses: {\n /** @description Created */\n 201: {\n content: {\n \"application/json\": {\n comment: components[\"schemas\"][\"comment.schema\"];\n };\n };\n };\n /** @description Error */\n default: {\n content: {\n \"application/problem+json\": components[\"schemas\"][\"error.schema\"];\n };\n };\n };\n };\n /**\n * Get return status\n * @description Get return status.\n */\n \"Return status get\": {\n parameters: {\n path: {\n returnId: components[\"parameters\"][\"return-id.param\"];\n };\n };\n responses: {\n /** @description Success */\n 200: {\n content: {\n \"application/json\": {\n status: components[\"schemas\"][\"return-status.schema\"];\n };\n };\n };\n /** @description Error */\n default: {\n content: {\n \"application/problem+json\": components[\"schemas\"][\"error.schema\"];\n };\n };\n };\n };\n /**\n * Update return status\n * @description Update return status.\n */\n \"Return status update\": {\n parameters: {\n path: {\n returnId: components[\"parameters\"][\"return-id.param\"];\n };\n };\n requestBody: {\n content: {\n \"application/json\": {\n status: components[\"schemas\"][\"return-status.schema\"];\n };\n };\n };\n responses: {\n /** @description Updated */\n 204: {\n content: never;\n };\n /** @description Error */\n default: {\n content: {\n \"application/problem+json\": components[\"schemas\"][\"error.schema\"];\n };\n };\n };\n };\n /**\n * List returns\n * @description List returns, sorted by most recent to least recent.\n */\n \"Returns list\": {\n parameters: {\n query?: {\n updated_at_max?: components[\"parameters\"][\"updated-at-max.param\"];\n updated_at_min?: components[\"parameters\"][\"updated-at-min.param\"];\n };\n header?: {\n \"X-Page-Continue\"?: components[\"parameters\"][\"page-continue.param\"];\n \"X-Page-Size\"?: components[\"parameters\"][\"page-size.param\"];\n };\n path: {\n storeId: components[\"parameters\"][\"store-id.param\"];\n };\n };\n responses: {\n /** @description Success */\n 200: {\n headers: {\n \"X-Page-Next\": components[\"headers\"][\"page-next.header\"];\n };\n content: {\n \"application/json\": {\n orders: components[\"schemas\"][\"order-read.schema\"][];\n returns: components[\"schemas\"][\"return-read.schema\"][];\n };\n };\n };\n /** @description Error */\n default: {\n content: {\n \"application/problem+json\": components[\"schemas\"][\"error.schema\"];\n };\n };\n };\n };\n /**\n * List webhooks\n * @description List webhooks for store.\n */\n \"Webhooks list\": {\n parameters: {\n path: {\n storeId: components[\"parameters\"][\"store-id.param\"];\n };\n };\n responses: {\n /** @description Success */\n 200: {\n content: {\n \"application/json\": {\n webhooks: components[\"schemas\"][\"webhook-read.schema\"][];\n };\n };\n };\n /** @description Error */\n default: {\n content: {\n \"application/problem+json\": components[\"schemas\"][\"error.schema\"];\n };\n };\n };\n };\n /**\n * Create or update webhook\n * @description Create webhook for store. Or if webhook already exists with `externalId`, update it.\n */\n \"Webhook create\": {\n parameters: {\n path: {\n storeId: components[\"parameters\"][\"store-id.param\"];\n };\n };\n requestBody: {\n content: {\n \"application/json\": {\n webhook?: components[\"schemas\"][\"webhook-create.schema\"];\n };\n };\n };\n responses: {\n /** @description Updated */\n 200: {\n content: {\n \"application/json\": {\n webhook?: components[\"schemas\"][\"webhook-read.schema\"];\n };\n };\n };\n /** @description Created */\n 201: {\n content: {\n \"application/json\": {\n webhook?: components[\"schemas\"][\"webhook-read.schema\"];\n };\n };\n };\n /** @description Error */\n default: {\n content: {\n \"application/problem+json\": components[\"schemas\"][\"error.schema\"];\n };\n };\n };\n };\n /**\n * Get webhook\n * @description Get a webhook.\n */\n \"Webhook get\": {\n parameters: {\n path: {\n webhookId: components[\"parameters\"][\"webhook-id.param\"];\n };\n };\n responses: {\n /** @description Success */\n 200: {\n content: {\n \"application/json\": {\n webhook: components[\"schemas\"][\"webhook-read.schema\"];\n };\n };\n };\n };\n };\n /**\n * Update webhook\n * @description Update a webhook.\n */\n \"Webhook update\": {\n parameters: {\n path: {\n webhookId: components[\"parameters\"][\"webhook-id.param\"];\n };\n };\n requestBody: {\n content: {\n \"application/json\": {\n webhook?: components[\"schemas\"][\"webhook-update.schema\"];\n };\n };\n };\n responses: {\n /** @description Success */\n 204: {\n content: never;\n };\n /** @description Error */\n default: {\n content: {\n \"application/problem+json\": components[\"schemas\"][\"error.schema\"];\n };\n };\n };\n };\n /**\n * Delete webhook\n * @description Delete a webbhook.\n */\n \"Webhook delete\": {\n parameters: {\n path: {\n webhookId: components[\"parameters\"][\"webhook-id.param\"];\n };\n };\n responses: {\n /** @description Deleted */\n 204: {\n content: never;\n };\n };\n };\n /**\n * Replay webhook\n * @description Replay a webhook.\n */\n \"Webhook replay\": {\n parameters: {\n path: {\n webhookId: components[\"parameters\"][\"webhook-id.param\"];\n };\n };\n requestBody: {\n content: {\n \"application/json\": {\n /** Format: date-time */\n start: string;\n };\n };\n };\n responses: {\n /** @description Success */\n 202: {\n content: never;\n };\n /** @description Error */\n default: {\n content: {\n \"application/problem+json\": components[\"schemas\"][\"error.schema\"];\n };\n };\n };\n };\n}\n"]}
File without changes