@zippendo/sdk 1.2.4 → 1.2.5
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/dist/apis/OrderChannelsApi.d.ts +195 -0
- package/dist/apis/OrderChannelsApi.js +496 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/OrderChannelsApi.d.ts +195 -0
- package/dist/esm/apis/OrderChannelsApi.js +492 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.d.ts +1 -0
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.js +1 -0
- package/dist/esm/models/CreateOrderChannelRequest.d.ts +65 -0
- package/dist/esm/models/CreateOrderChannelRequest.js +61 -0
- package/dist/esm/models/CreateOrderChannelRequestSettings.d.ts +105 -0
- package/dist/esm/models/CreateOrderChannelRequestSettings.js +66 -0
- package/dist/esm/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.d.ts +52 -0
- package/dist/esm/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.js +56 -0
- package/dist/esm/models/CreateOrderChannelWebhookSecret201Response.d.ts +44 -0
- package/dist/esm/models/CreateOrderChannelWebhookSecret201Response.js +51 -0
- package/dist/esm/models/CreateOrderRequest.d.ts +12 -0
- package/dist/esm/models/CreateOrderRequest.js +4 -0
- package/dist/esm/models/GetOrderChannelWebhookStatus200Response.d.ts +45 -0
- package/dist/esm/models/GetOrderChannelWebhookStatus200Response.js +52 -0
- package/dist/esm/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.d.ts +62 -0
- package/dist/esm/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.js +59 -0
- package/dist/esm/models/ListApiTokens401Response.d.ts +1 -0
- package/dist/esm/models/ListApiTokens401Response.js +1 -0
- package/dist/esm/models/ListOrderChannels200Response.d.ts +57 -0
- package/dist/esm/models/ListOrderChannels200Response.js +60 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInner.d.ts +121 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInner.js +97 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettings.d.ts +129 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettings.js +86 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.d.ts +52 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.js +56 -0
- package/dist/esm/models/ListOrders200ResponseDataInnerOrderChannel.d.ts +1 -0
- package/dist/esm/models/ListOrders200ResponseDataInnerOrderChannel.js +2 -1
- package/dist/esm/models/RevokeOrderChannelWebhookSecret200Response.d.ts +32 -0
- package/dist/esm/models/RevokeOrderChannelWebhookSecret200Response.js +43 -0
- package/dist/esm/models/SendShipment422Response.d.ts +1 -0
- package/dist/esm/models/SendShipment422Response.js +1 -0
- package/dist/esm/models/UpdateOrderChannelRequest.d.ts +65 -0
- package/dist/esm/models/UpdateOrderChannelRequest.js +52 -0
- package/dist/esm/models/UpdateOrderChannelRequestSettings.d.ts +105 -0
- package/dist/esm/models/UpdateOrderChannelRequestSettings.js +66 -0
- package/dist/esm/models/index.d.ts +13 -0
- package/dist/esm/models/index.js +13 -0
- package/dist/models/BatchSendShipments200ResponseResultsInner.d.ts +1 -0
- package/dist/models/BatchSendShipments200ResponseResultsInner.js +1 -0
- package/dist/models/CreateOrderChannelRequest.d.ts +65 -0
- package/dist/models/CreateOrderChannelRequest.js +69 -0
- package/dist/models/CreateOrderChannelRequestSettings.d.ts +105 -0
- package/dist/models/CreateOrderChannelRequestSettings.js +73 -0
- package/dist/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.d.ts +52 -0
- package/dist/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.js +64 -0
- package/dist/models/CreateOrderChannelWebhookSecret201Response.d.ts +44 -0
- package/dist/models/CreateOrderChannelWebhookSecret201Response.js +58 -0
- package/dist/models/CreateOrderRequest.d.ts +12 -0
- package/dist/models/CreateOrderRequest.js +4 -0
- package/dist/models/GetOrderChannelWebhookStatus200Response.d.ts +45 -0
- package/dist/models/GetOrderChannelWebhookStatus200Response.js +59 -0
- package/dist/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.d.ts +62 -0
- package/dist/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.js +66 -0
- package/dist/models/ListApiTokens401Response.d.ts +1 -0
- package/dist/models/ListApiTokens401Response.js +1 -0
- package/dist/models/ListOrderChannels200Response.d.ts +57 -0
- package/dist/models/ListOrderChannels200Response.js +67 -0
- package/dist/models/ListOrderChannels200ResponseDataInner.d.ts +121 -0
- package/dist/models/ListOrderChannels200ResponseDataInner.js +105 -0
- package/dist/models/ListOrderChannels200ResponseDataInnerSettings.d.ts +129 -0
- package/dist/models/ListOrderChannels200ResponseDataInnerSettings.js +93 -0
- package/dist/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.d.ts +52 -0
- package/dist/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.js +64 -0
- package/dist/models/ListOrders200ResponseDataInnerOrderChannel.d.ts +1 -0
- package/dist/models/ListOrders200ResponseDataInnerOrderChannel.js +2 -1
- package/dist/models/RevokeOrderChannelWebhookSecret200Response.d.ts +32 -0
- package/dist/models/RevokeOrderChannelWebhookSecret200Response.js +50 -0
- package/dist/models/SendShipment422Response.d.ts +1 -0
- package/dist/models/SendShipment422Response.js +1 -0
- package/dist/models/UpdateOrderChannelRequest.d.ts +65 -0
- package/dist/models/UpdateOrderChannelRequest.js +59 -0
- package/dist/models/UpdateOrderChannelRequestSettings.d.ts +105 -0
- package/dist/models/UpdateOrderChannelRequestSettings.js +73 -0
- package/dist/models/index.d.ts +13 -0
- package/dist/models/index.js +13 -0
- package/docs/CreateOrderChannelRequest.md +42 -0
- package/docs/CreateOrderChannelRequestSettings.md +58 -0
- package/docs/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.md +38 -0
- package/docs/CreateOrderChannelWebhookSecret201Response.md +38 -0
- package/docs/CreateOrderRequest.md +4 -0
- package/docs/GetOrderChannelWebhookStatus200Response.md +38 -0
- package/docs/GetOrderChannelWebhookStatus200ResponseWebhooksInner.md +44 -0
- package/docs/ListOrderChannels200Response.md +42 -0
- package/docs/ListOrderChannels200ResponseDataInner.md +60 -0
- package/docs/ListOrderChannels200ResponseDataInnerSettings.md +67 -0
- package/docs/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.md +38 -0
- package/docs/OrderChannelsApi.md +650 -0
- package/docs/OrdersApi.md +1 -0
- package/docs/RevokeOrderChannelWebhookSecret200Response.md +34 -0
- package/docs/UpdateOrderChannelRequest.md +44 -0
- package/docs/UpdateOrderChannelRequestSettings.md +59 -0
- package/package.json +1 -1
- package/src/apis/OrderChannelsApi.ts +670 -0
- package/src/apis/index.ts +1 -0
- package/src/models/BatchSendShipments200ResponseResultsInner.ts +1 -0
- package/src/models/CreateOrderChannelRequest.ts +118 -0
- package/src/models/CreateOrderChannelRequestSettings.ts +169 -0
- package/src/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.ts +94 -0
- package/src/models/CreateOrderChannelWebhookSecret201Response.ts +84 -0
- package/src/models/CreateOrderRequest.ts +16 -0
- package/src/models/GetOrderChannelWebhookStatus200Response.ts +92 -0
- package/src/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.ts +109 -0
- package/src/models/ListApiTokens401Response.ts +1 -0
- package/src/models/ListOrderChannels200Response.ts +110 -0
- package/src/models/ListOrderChannels200ResponseDataInner.ts +200 -0
- package/src/models/ListOrderChannels200ResponseDataInnerSettings.ts +207 -0
- package/src/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.ts +94 -0
- package/src/models/ListOrders200ResponseDataInnerOrderChannel.ts +2 -1
- package/src/models/RevokeOrderChannelWebhookSecret200Response.ts +66 -0
- package/src/models/SendShipment422Response.ts +1 -0
- package/src/models/UpdateOrderChannelRequest.ts +113 -0
- package/src/models/UpdateOrderChannelRequestSettings.ts +169 -0
- package/src/models/index.ts +13 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zippendo Public API
|
|
3
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@zippendo.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { GetOrderChannelWebhookStatus200ResponseWebhooksInner } from './GetOrderChannelWebhookStatus200ResponseWebhooksInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetOrderChannelWebhookStatus200Response
|
|
17
|
+
*/
|
|
18
|
+
export interface GetOrderChannelWebhookStatus200Response {
|
|
19
|
+
/**
|
|
20
|
+
* Whether webhooks are enabled for the channel.
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof GetOrderChannelWebhookStatus200Response
|
|
23
|
+
*/
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Expected callback URL for this channel.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof GetOrderChannelWebhookStatus200Response
|
|
29
|
+
*/
|
|
30
|
+
webhookUrl: string;
|
|
31
|
+
/**
|
|
32
|
+
* Webhooks registered for this channel's callback URL.
|
|
33
|
+
* @type {Array<GetOrderChannelWebhookStatus200ResponseWebhooksInner>}
|
|
34
|
+
* @memberof GetOrderChannelWebhookStatus200Response
|
|
35
|
+
*/
|
|
36
|
+
webhooks: Array<GetOrderChannelWebhookStatus200ResponseWebhooksInner>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the GetOrderChannelWebhookStatus200Response interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfGetOrderChannelWebhookStatus200Response(value: object): value is GetOrderChannelWebhookStatus200Response;
|
|
42
|
+
export declare function GetOrderChannelWebhookStatus200ResponseFromJSON(json: any): GetOrderChannelWebhookStatus200Response;
|
|
43
|
+
export declare function GetOrderChannelWebhookStatus200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetOrderChannelWebhookStatus200Response;
|
|
44
|
+
export declare function GetOrderChannelWebhookStatus200ResponseToJSON(json: any): GetOrderChannelWebhookStatus200Response;
|
|
45
|
+
export declare function GetOrderChannelWebhookStatus200ResponseToJSONTyped(value?: GetOrderChannelWebhookStatus200Response | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Zippendo Public API
|
|
6
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@zippendo.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfGetOrderChannelWebhookStatus200Response = instanceOfGetOrderChannelWebhookStatus200Response;
|
|
17
|
+
exports.GetOrderChannelWebhookStatus200ResponseFromJSON = GetOrderChannelWebhookStatus200ResponseFromJSON;
|
|
18
|
+
exports.GetOrderChannelWebhookStatus200ResponseFromJSONTyped = GetOrderChannelWebhookStatus200ResponseFromJSONTyped;
|
|
19
|
+
exports.GetOrderChannelWebhookStatus200ResponseToJSON = GetOrderChannelWebhookStatus200ResponseToJSON;
|
|
20
|
+
exports.GetOrderChannelWebhookStatus200ResponseToJSONTyped = GetOrderChannelWebhookStatus200ResponseToJSONTyped;
|
|
21
|
+
const GetOrderChannelWebhookStatus200ResponseWebhooksInner_1 = require("./GetOrderChannelWebhookStatus200ResponseWebhooksInner");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the GetOrderChannelWebhookStatus200Response interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfGetOrderChannelWebhookStatus200Response(value) {
|
|
26
|
+
if (!('enabled' in value) || value['enabled'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('webhookUrl' in value) || value['webhookUrl'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('webhooks' in value) || value['webhooks'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function GetOrderChannelWebhookStatus200ResponseFromJSON(json) {
|
|
35
|
+
return GetOrderChannelWebhookStatus200ResponseFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
function GetOrderChannelWebhookStatus200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'enabled': json['enabled'],
|
|
43
|
+
'webhookUrl': json['webhookUrl'],
|
|
44
|
+
'webhooks': (json['webhooks'].map(GetOrderChannelWebhookStatus200ResponseWebhooksInner_1.GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSON)),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function GetOrderChannelWebhookStatus200ResponseToJSON(json) {
|
|
48
|
+
return GetOrderChannelWebhookStatus200ResponseToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function GetOrderChannelWebhookStatus200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'enabled': value['enabled'],
|
|
56
|
+
'webhookUrl': value['webhookUrl'],
|
|
57
|
+
'webhooks': (value['webhooks'].map(GetOrderChannelWebhookStatus200ResponseWebhooksInner_1.GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSON)),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zippendo Public API
|
|
3
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@zippendo.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
16
|
+
*/
|
|
17
|
+
export interface GetOrderChannelWebhookStatus200ResponseWebhooksInner {
|
|
18
|
+
/**
|
|
19
|
+
* Platform webhook ID.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
22
|
+
*/
|
|
23
|
+
id: number;
|
|
24
|
+
/**
|
|
25
|
+
* Webhook event topic.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
28
|
+
*/
|
|
29
|
+
topic: string;
|
|
30
|
+
/**
|
|
31
|
+
* Registered callback address.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
34
|
+
*/
|
|
35
|
+
address: string;
|
|
36
|
+
/**
|
|
37
|
+
* Webhook creation timestamp.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
40
|
+
*/
|
|
41
|
+
createdAt: string;
|
|
42
|
+
/**
|
|
43
|
+
* WooCommerce delivery URL (same as `address`; present for WooCommerce channels).
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
46
|
+
*/
|
|
47
|
+
deliveryUrl?: string;
|
|
48
|
+
/**
|
|
49
|
+
* WooCommerce webhook status. A value other than `active` means WooCommerce disabled the webhook (e.g. after repeated delivery failures).
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
52
|
+
*/
|
|
53
|
+
status?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the GetOrderChannelWebhookStatus200ResponseWebhooksInner interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfGetOrderChannelWebhookStatus200ResponseWebhooksInner(value: object): value is GetOrderChannelWebhookStatus200ResponseWebhooksInner;
|
|
59
|
+
export declare function GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSON(json: any): GetOrderChannelWebhookStatus200ResponseWebhooksInner;
|
|
60
|
+
export declare function GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetOrderChannelWebhookStatus200ResponseWebhooksInner;
|
|
61
|
+
export declare function GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSON(json: any): GetOrderChannelWebhookStatus200ResponseWebhooksInner;
|
|
62
|
+
export declare function GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSONTyped(value?: GetOrderChannelWebhookStatus200ResponseWebhooksInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Zippendo Public API
|
|
6
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@zippendo.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfGetOrderChannelWebhookStatus200ResponseWebhooksInner = instanceOfGetOrderChannelWebhookStatus200ResponseWebhooksInner;
|
|
17
|
+
exports.GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSON = GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSON;
|
|
18
|
+
exports.GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSONTyped = GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSONTyped;
|
|
19
|
+
exports.GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSON = GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSON;
|
|
20
|
+
exports.GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSONTyped = GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the GetOrderChannelWebhookStatus200ResponseWebhooksInner interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfGetOrderChannelWebhookStatus200ResponseWebhooksInner(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('topic' in value) || value['topic'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('address' in value) || value['address'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSON(json) {
|
|
36
|
+
return GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'id': json['id'],
|
|
44
|
+
'topic': json['topic'],
|
|
45
|
+
'address': json['address'],
|
|
46
|
+
'createdAt': json['createdAt'],
|
|
47
|
+
'deliveryUrl': json['deliveryUrl'] == null ? undefined : json['deliveryUrl'],
|
|
48
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSON(json) {
|
|
52
|
+
return GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'id': value['id'],
|
|
60
|
+
'topic': value['topic'],
|
|
61
|
+
'address': value['address'],
|
|
62
|
+
'createdAt': value['createdAt'],
|
|
63
|
+
'deliveryUrl': value['deliveryUrl'],
|
|
64
|
+
'status': value['status'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -133,6 +133,7 @@ export declare const ListApiTokens401ResponseCodeEnum: {
|
|
|
133
133
|
readonly ShippingRuleInvalid: "SHIPPING_RULE_INVALID";
|
|
134
134
|
readonly AddressNotFound: "ADDRESS_NOT_FOUND";
|
|
135
135
|
readonly OrderNotFound: "ORDER_NOT_FOUND";
|
|
136
|
+
readonly OrderExists: "ORDER_EXISTS";
|
|
136
137
|
readonly OrderChannelNotFound: "ORDER_CHANNEL_NOT_FOUND";
|
|
137
138
|
readonly OrderChannelConfigInvalid: "ORDER_CHANNEL_CONFIG_INVALID";
|
|
138
139
|
readonly IntegrationNotConfigured: "INTEGRATION_NOT_CONFIGURED";
|
|
@@ -118,6 +118,7 @@ exports.ListApiTokens401ResponseCodeEnum = {
|
|
|
118
118
|
ShippingRuleInvalid: 'SHIPPING_RULE_INVALID',
|
|
119
119
|
AddressNotFound: 'ADDRESS_NOT_FOUND',
|
|
120
120
|
OrderNotFound: 'ORDER_NOT_FOUND',
|
|
121
|
+
OrderExists: 'ORDER_EXISTS',
|
|
121
122
|
OrderChannelNotFound: 'ORDER_CHANNEL_NOT_FOUND',
|
|
122
123
|
OrderChannelConfigInvalid: 'ORDER_CHANNEL_CONFIG_INVALID',
|
|
123
124
|
IntegrationNotConfigured: 'INTEGRATION_NOT_CONFIGURED',
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zippendo Public API
|
|
3
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@zippendo.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ListOrderChannels200ResponseDataInner } from './ListOrderChannels200ResponseDataInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ListOrderChannels200Response
|
|
17
|
+
*/
|
|
18
|
+
export interface ListOrderChannels200Response {
|
|
19
|
+
/**
|
|
20
|
+
* Page of results
|
|
21
|
+
* @type {Array<ListOrderChannels200ResponseDataInner>}
|
|
22
|
+
* @memberof ListOrderChannels200Response
|
|
23
|
+
*/
|
|
24
|
+
data: Array<ListOrderChannels200ResponseDataInner>;
|
|
25
|
+
/**
|
|
26
|
+
* Total matching items across all pages
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof ListOrderChannels200Response
|
|
29
|
+
*/
|
|
30
|
+
total: number;
|
|
31
|
+
/**
|
|
32
|
+
* Current page number (1-based)
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof ListOrderChannels200Response
|
|
35
|
+
*/
|
|
36
|
+
page: number;
|
|
37
|
+
/**
|
|
38
|
+
* Items per page
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof ListOrderChannels200Response
|
|
41
|
+
*/
|
|
42
|
+
limit: number;
|
|
43
|
+
/**
|
|
44
|
+
* Total number of pages
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof ListOrderChannels200Response
|
|
47
|
+
*/
|
|
48
|
+
totalPages: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the ListOrderChannels200Response interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfListOrderChannels200Response(value: object): value is ListOrderChannels200Response;
|
|
54
|
+
export declare function ListOrderChannels200ResponseFromJSON(json: any): ListOrderChannels200Response;
|
|
55
|
+
export declare function ListOrderChannels200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrderChannels200Response;
|
|
56
|
+
export declare function ListOrderChannels200ResponseToJSON(json: any): ListOrderChannels200Response;
|
|
57
|
+
export declare function ListOrderChannels200ResponseToJSONTyped(value?: ListOrderChannels200Response | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Zippendo Public API
|
|
6
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@zippendo.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfListOrderChannels200Response = instanceOfListOrderChannels200Response;
|
|
17
|
+
exports.ListOrderChannels200ResponseFromJSON = ListOrderChannels200ResponseFromJSON;
|
|
18
|
+
exports.ListOrderChannels200ResponseFromJSONTyped = ListOrderChannels200ResponseFromJSONTyped;
|
|
19
|
+
exports.ListOrderChannels200ResponseToJSON = ListOrderChannels200ResponseToJSON;
|
|
20
|
+
exports.ListOrderChannels200ResponseToJSONTyped = ListOrderChannels200ResponseToJSONTyped;
|
|
21
|
+
const ListOrderChannels200ResponseDataInner_1 = require("./ListOrderChannels200ResponseDataInner");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ListOrderChannels200Response interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfListOrderChannels200Response(value) {
|
|
26
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('page' in value) || value['page'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('limit' in value) || value['limit'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function ListOrderChannels200ResponseFromJSON(json) {
|
|
39
|
+
return ListOrderChannels200ResponseFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function ListOrderChannels200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'data': (json['data'].map(ListOrderChannels200ResponseDataInner_1.ListOrderChannels200ResponseDataInnerFromJSON)),
|
|
47
|
+
'total': json['total'],
|
|
48
|
+
'page': json['page'],
|
|
49
|
+
'limit': json['limit'],
|
|
50
|
+
'totalPages': json['totalPages'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function ListOrderChannels200ResponseToJSON(json) {
|
|
54
|
+
return ListOrderChannels200ResponseToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function ListOrderChannels200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'data': (value['data'].map(ListOrderChannels200ResponseDataInner_1.ListOrderChannels200ResponseDataInnerToJSON)),
|
|
62
|
+
'total': value['total'],
|
|
63
|
+
'page': value['page'],
|
|
64
|
+
'limit': value['limit'],
|
|
65
|
+
'totalPages': value['totalPages'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zippendo Public API
|
|
3
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@zippendo.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ListOrderChannels200ResponseDataInnerSettings } from './ListOrderChannels200ResponseDataInnerSettings';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ListOrderChannels200ResponseDataInner
|
|
17
|
+
*/
|
|
18
|
+
export interface ListOrderChannels200ResponseDataInner {
|
|
19
|
+
/**
|
|
20
|
+
* Unique order channel ID.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Display name of the channel.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* Type of the order channel (sales platform).
|
|
33
|
+
* @type {ListOrderChannels200ResponseDataInnerTypeEnum}
|
|
34
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
35
|
+
*/
|
|
36
|
+
type: ListOrderChannels200ResponseDataInnerTypeEnum;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the channel is active.
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
41
|
+
*/
|
|
42
|
+
enabled: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Brand this channel belongs to, or null for organization-wide. Orders synced from this channel inherit it, and so do the shipments and documents made from them.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
47
|
+
*/
|
|
48
|
+
brandId: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Whether credentials are configured (values are never exposed).
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
53
|
+
*/
|
|
54
|
+
hasCredentials: boolean;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {ListOrderChannels200ResponseDataInnerSettings}
|
|
58
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
59
|
+
*/
|
|
60
|
+
settings: ListOrderChannels200ResponseDataInnerSettings;
|
|
61
|
+
/**
|
|
62
|
+
* Whether real-time webhooks are enabled.
|
|
63
|
+
* @type {boolean}
|
|
64
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
65
|
+
*/
|
|
66
|
+
webhooksEnabled?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Timestamp of the last successful sync.
|
|
69
|
+
* @type {Date}
|
|
70
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
71
|
+
*/
|
|
72
|
+
lastSyncAt?: Date | null;
|
|
73
|
+
/**
|
|
74
|
+
* Error message from the last failed sync.
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
77
|
+
*/
|
|
78
|
+
lastSyncError?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* IDs of shipping rules linked to this channel.
|
|
81
|
+
* @type {Array<string>}
|
|
82
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
83
|
+
*/
|
|
84
|
+
shippingRuleIds?: Array<string>;
|
|
85
|
+
/**
|
|
86
|
+
* Owning organization ID.
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
89
|
+
*/
|
|
90
|
+
orgId: string;
|
|
91
|
+
/**
|
|
92
|
+
* Creation timestamp (ISO 8601).
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
95
|
+
*/
|
|
96
|
+
createdAt: string;
|
|
97
|
+
/**
|
|
98
|
+
* Last update timestamp (ISO 8601).
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
101
|
+
*/
|
|
102
|
+
updatedAt: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @export
|
|
106
|
+
*/
|
|
107
|
+
export declare const ListOrderChannels200ResponseDataInnerTypeEnum: {
|
|
108
|
+
readonly Shopify: "shopify";
|
|
109
|
+
readonly Woocommerce: "woocommerce";
|
|
110
|
+
readonly Manual: "manual";
|
|
111
|
+
readonly Custom: "custom";
|
|
112
|
+
};
|
|
113
|
+
export type ListOrderChannels200ResponseDataInnerTypeEnum = typeof ListOrderChannels200ResponseDataInnerTypeEnum[keyof typeof ListOrderChannels200ResponseDataInnerTypeEnum];
|
|
114
|
+
/**
|
|
115
|
+
* Check if a given object implements the ListOrderChannels200ResponseDataInner interface.
|
|
116
|
+
*/
|
|
117
|
+
export declare function instanceOfListOrderChannels200ResponseDataInner(value: object): value is ListOrderChannels200ResponseDataInner;
|
|
118
|
+
export declare function ListOrderChannels200ResponseDataInnerFromJSON(json: any): ListOrderChannels200ResponseDataInner;
|
|
119
|
+
export declare function ListOrderChannels200ResponseDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrderChannels200ResponseDataInner;
|
|
120
|
+
export declare function ListOrderChannels200ResponseDataInnerToJSON(json: any): ListOrderChannels200ResponseDataInner;
|
|
121
|
+
export declare function ListOrderChannels200ResponseDataInnerToJSONTyped(value?: ListOrderChannels200ResponseDataInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Zippendo Public API
|
|
6
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@zippendo.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ListOrderChannels200ResponseDataInnerTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfListOrderChannels200ResponseDataInner = instanceOfListOrderChannels200ResponseDataInner;
|
|
18
|
+
exports.ListOrderChannels200ResponseDataInnerFromJSON = ListOrderChannels200ResponseDataInnerFromJSON;
|
|
19
|
+
exports.ListOrderChannels200ResponseDataInnerFromJSONTyped = ListOrderChannels200ResponseDataInnerFromJSONTyped;
|
|
20
|
+
exports.ListOrderChannels200ResponseDataInnerToJSON = ListOrderChannels200ResponseDataInnerToJSON;
|
|
21
|
+
exports.ListOrderChannels200ResponseDataInnerToJSONTyped = ListOrderChannels200ResponseDataInnerToJSONTyped;
|
|
22
|
+
const ListOrderChannels200ResponseDataInnerSettings_1 = require("./ListOrderChannels200ResponseDataInnerSettings");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ListOrderChannels200ResponseDataInnerTypeEnum = {
|
|
27
|
+
Shopify: 'shopify',
|
|
28
|
+
Woocommerce: 'woocommerce',
|
|
29
|
+
Manual: 'manual',
|
|
30
|
+
Custom: 'custom'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the ListOrderChannels200ResponseDataInner interface.
|
|
34
|
+
*/
|
|
35
|
+
function instanceOfListOrderChannels200ResponseDataInner(value) {
|
|
36
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('enabled' in value) || value['enabled'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('brandId' in value) || value['brandId'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('hasCredentials' in value) || value['hasCredentials'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('settings' in value) || value['settings'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
if (!('orgId' in value) || value['orgId'] === undefined)
|
|
51
|
+
return false;
|
|
52
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
53
|
+
return false;
|
|
54
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
function ListOrderChannels200ResponseDataInnerFromJSON(json) {
|
|
59
|
+
return ListOrderChannels200ResponseDataInnerFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
function ListOrderChannels200ResponseDataInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
'id': json['id'],
|
|
67
|
+
'name': json['name'],
|
|
68
|
+
'type': json['type'],
|
|
69
|
+
'enabled': json['enabled'],
|
|
70
|
+
'brandId': json['brandId'],
|
|
71
|
+
'hasCredentials': json['hasCredentials'],
|
|
72
|
+
'settings': (0, ListOrderChannels200ResponseDataInnerSettings_1.ListOrderChannels200ResponseDataInnerSettingsFromJSON)(json['settings']),
|
|
73
|
+
'webhooksEnabled': json['webhooksEnabled'] == null ? undefined : json['webhooksEnabled'],
|
|
74
|
+
'lastSyncAt': json['lastSyncAt'] === undefined ? undefined : json['lastSyncAt'] === null ? null : (new Date(json['lastSyncAt'])),
|
|
75
|
+
'lastSyncError': json['lastSyncError'] === undefined ? undefined : json['lastSyncError'] === null ? null : json['lastSyncError'],
|
|
76
|
+
'shippingRuleIds': json['shippingRuleIds'] == null ? undefined : json['shippingRuleIds'],
|
|
77
|
+
'orgId': json['orgId'],
|
|
78
|
+
'createdAt': json['createdAt'],
|
|
79
|
+
'updatedAt': json['updatedAt'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function ListOrderChannels200ResponseDataInnerToJSON(json) {
|
|
83
|
+
return ListOrderChannels200ResponseDataInnerToJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
function ListOrderChannels200ResponseDataInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
86
|
+
if (value == null) {
|
|
87
|
+
return value;
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
'id': value['id'],
|
|
91
|
+
'name': value['name'],
|
|
92
|
+
'type': value['type'],
|
|
93
|
+
'enabled': value['enabled'],
|
|
94
|
+
'brandId': value['brandId'],
|
|
95
|
+
'hasCredentials': value['hasCredentials'],
|
|
96
|
+
'settings': (0, ListOrderChannels200ResponseDataInnerSettings_1.ListOrderChannels200ResponseDataInnerSettingsToJSON)(value['settings']),
|
|
97
|
+
'webhooksEnabled': value['webhooksEnabled'],
|
|
98
|
+
'lastSyncAt': value['lastSyncAt'] == null ? value['lastSyncAt'] : value['lastSyncAt'].toISOString(),
|
|
99
|
+
'lastSyncError': value['lastSyncError'],
|
|
100
|
+
'shippingRuleIds': value['shippingRuleIds'],
|
|
101
|
+
'orgId': value['orgId'],
|
|
102
|
+
'createdAt': value['createdAt'],
|
|
103
|
+
'updatedAt': value['updatedAt'],
|
|
104
|
+
};
|
|
105
|
+
}
|