@zippendo/sdk 1.1.4 → 1.2.1
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/ShipmentsApi.d.ts +2 -2
- package/dist/apis/ShipmentsApi.js +2 -2
- package/dist/esm/apis/ShipmentsApi.d.ts +2 -2
- package/dist/esm/apis/ShipmentsApi.js +2 -2
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.d.ts +6 -3
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.js +4 -1
- package/dist/esm/models/BatchSendShipments200ResponseSummary.d.ts +8 -2
- package/dist/esm/models/BatchSendShipments200ResponseSummary.js +4 -0
- package/dist/esm/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/esm/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.js +1 -3
- package/dist/esm/models/CreateShipmentRequest.d.ts +14 -1
- package/dist/esm/models/CreateShipmentRequest.js +6 -3
- package/dist/esm/models/CreateShipmentRequestCarrierSettings.d.ts +1 -1
- package/dist/esm/models/CreateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/esm/models/CreateShipmentRequestDroppoint.js +54 -0
- package/dist/esm/models/CreateShipmentRequestParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/esm/models/CreateShipmentRequestParcelsInnerOrderLinesInner.js +1 -3
- package/dist/esm/models/GetOrder200ResponseShipmentsInner.d.ts +6 -0
- package/dist/esm/models/GetOrder200ResponseShipmentsInner.js +2 -0
- package/dist/esm/models/ListApiTokens401Response.d.ts +2 -0
- package/dist/esm/models/ListApiTokens401Response.js +2 -0
- package/dist/esm/models/SendShipment422Response.d.ts +2 -0
- package/dist/esm/models/SendShipment422Response.js +2 -0
- package/dist/esm/models/UpdateShipmentRequest.d.ts +10 -3
- package/dist/esm/models/UpdateShipmentRequest.js +6 -3
- package/dist/esm/models/UpdateShipmentRequestCarrierSettings.d.ts +53 -0
- package/dist/esm/models/UpdateShipmentRequestCarrierSettings.js +57 -0
- package/dist/esm/models/UpdateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/esm/models/UpdateShipmentRequestDroppoint.js +54 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/BatchSendShipments200ResponseResultsInner.d.ts +6 -3
- package/dist/models/BatchSendShipments200ResponseResultsInner.js +4 -1
- package/dist/models/BatchSendShipments200ResponseSummary.d.ts +8 -2
- package/dist/models/BatchSendShipments200ResponseSummary.js +4 -0
- package/dist/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.js +1 -3
- package/dist/models/CreateShipmentRequest.d.ts +14 -1
- package/dist/models/CreateShipmentRequest.js +6 -3
- package/dist/models/CreateShipmentRequestCarrierSettings.d.ts +1 -1
- package/dist/models/CreateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/models/CreateShipmentRequestDroppoint.js +61 -0
- package/dist/models/CreateShipmentRequestParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/models/CreateShipmentRequestParcelsInnerOrderLinesInner.js +1 -3
- package/dist/models/GetOrder200ResponseShipmentsInner.d.ts +6 -0
- package/dist/models/GetOrder200ResponseShipmentsInner.js +2 -0
- package/dist/models/ListApiTokens401Response.d.ts +2 -0
- package/dist/models/ListApiTokens401Response.js +2 -0
- package/dist/models/SendShipment422Response.d.ts +2 -0
- package/dist/models/SendShipment422Response.js +2 -0
- package/dist/models/UpdateShipmentRequest.d.ts +10 -3
- package/dist/models/UpdateShipmentRequest.js +6 -3
- package/dist/models/UpdateShipmentRequestCarrierSettings.d.ts +53 -0
- package/dist/models/UpdateShipmentRequestCarrierSettings.js +64 -0
- package/dist/models/UpdateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/models/UpdateShipmentRequestDroppoint.js +61 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/BatchSendShipments200ResponseSummary.md +2 -0
- package/docs/CreateShipmentRequest.md +4 -0
- package/docs/CreateShipmentRequestCarrierSettings.md +1 -0
- package/docs/CreateShipmentRequestDroppoint.md +41 -0
- package/docs/GetOrder200ResponseShipmentsInner.md +2 -0
- package/docs/ShipmentsApi.md +1 -1
- package/docs/UpdateShipmentRequest.md +3 -1
- package/docs/UpdateShipmentRequestCarrierSettings.md +40 -0
- package/docs/UpdateShipmentRequestDroppoint.md +41 -0
- package/package.json +1 -1
- package/src/apis/ShipmentsApi.ts +2 -2
- package/src/models/BatchSendShipments200ResponseResultsInner.ts +7 -4
- package/src/models/BatchSendShipments200ResponseSummary.ts +11 -2
- package/src/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.ts +3 -4
- package/src/models/CreateShipmentRequest.ts +25 -3
- package/src/models/CreateShipmentRequestCarrierSettings.ts +1 -1
- package/src/models/CreateShipmentRequestDroppoint.ts +100 -0
- package/src/models/CreateShipmentRequestParcelsInnerOrderLinesInner.ts +3 -4
- package/src/models/GetOrder200ResponseShipmentsInner.ts +8 -0
- package/src/models/ListApiTokens401Response.ts +2 -0
- package/src/models/SendShipment422Response.ts +2 -0
- package/src/models/UpdateShipmentRequest.ts +25 -10
- package/src/models/UpdateShipmentRequestCarrierSettings.ts +101 -0
- package/src/models/UpdateShipmentRequestDroppoint.ts +100 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zippendo Public API
|
|
5
|
+
* 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`.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zippendo.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CreateShippingRuleRequestAdditionalParametersValue } from './CreateShippingRuleRequestAdditionalParametersValue';
|
|
17
|
+
import {
|
|
18
|
+
CreateShippingRuleRequestAdditionalParametersValueFromJSON,
|
|
19
|
+
CreateShippingRuleRequestAdditionalParametersValueFromJSONTyped,
|
|
20
|
+
CreateShippingRuleRequestAdditionalParametersValueToJSON,
|
|
21
|
+
CreateShippingRuleRequestAdditionalParametersValueToJSONTyped,
|
|
22
|
+
} from './CreateShippingRuleRequestAdditionalParametersValue';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UpdateShipmentRequestCarrierSettings
|
|
28
|
+
*/
|
|
29
|
+
export interface UpdateShipmentRequestCarrierSettings {
|
|
30
|
+
/**
|
|
31
|
+
* Identifier of the carrier to use.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
34
|
+
*/
|
|
35
|
+
carrierId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Identifier of the carrier product/service.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
40
|
+
*/
|
|
41
|
+
productId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Additional service codes requested from the carrier.
|
|
44
|
+
* @type {Array<string>}
|
|
45
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
46
|
+
*/
|
|
47
|
+
services: Array<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Carrier-specific extra parameters as key/value pairs.
|
|
50
|
+
* @type {{ [key: string]: CreateShippingRuleRequestAdditionalParametersValue; }}
|
|
51
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
52
|
+
*/
|
|
53
|
+
additionalParameters: { [key: string]: CreateShippingRuleRequestAdditionalParametersValue; };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the UpdateShipmentRequestCarrierSettings interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfUpdateShipmentRequestCarrierSettings(value: object): value is UpdateShipmentRequestCarrierSettings {
|
|
60
|
+
if (!('carrierId' in value) || value['carrierId'] === undefined) return false;
|
|
61
|
+
if (!('productId' in value) || value['productId'] === undefined) return false;
|
|
62
|
+
if (!('services' in value) || value['services'] === undefined) return false;
|
|
63
|
+
if (!('additionalParameters' in value) || value['additionalParameters'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function UpdateShipmentRequestCarrierSettingsFromJSON(json: any): UpdateShipmentRequestCarrierSettings {
|
|
68
|
+
return UpdateShipmentRequestCarrierSettingsFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function UpdateShipmentRequestCarrierSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateShipmentRequestCarrierSettings {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'carrierId': json['carrierId'],
|
|
78
|
+
'productId': json['productId'],
|
|
79
|
+
'services': json['services'],
|
|
80
|
+
'additionalParameters': (mapValues(json['additionalParameters'], CreateShippingRuleRequestAdditionalParametersValueFromJSON)),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function UpdateShipmentRequestCarrierSettingsToJSON(json: any): UpdateShipmentRequestCarrierSettings {
|
|
85
|
+
return UpdateShipmentRequestCarrierSettingsToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function UpdateShipmentRequestCarrierSettingsToJSONTyped(value?: UpdateShipmentRequestCarrierSettings | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'carrierId': value['carrierId'],
|
|
96
|
+
'productId': value['productId'],
|
|
97
|
+
'services': value['services'],
|
|
98
|
+
'additionalParameters': (mapValues(value['additionalParameters'], CreateShippingRuleRequestAdditionalParametersValueToJSON)),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zippendo Public API
|
|
5
|
+
* 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`.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zippendo.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner } from './ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner';
|
|
17
|
+
import {
|
|
18
|
+
ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSON,
|
|
19
|
+
ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSONTyped,
|
|
20
|
+
ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSON,
|
|
21
|
+
ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSONTyped,
|
|
22
|
+
} from './ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Display details of the selected service point, stored alongside `servicePointId`. Used when applying a service-point shipping rule (whose parameters otherwise replace the stored droppoint).
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UpdateShipmentRequestDroppoint
|
|
28
|
+
*/
|
|
29
|
+
export interface UpdateShipmentRequestDroppoint {
|
|
30
|
+
/**
|
|
31
|
+
* Identifier of the selected service point.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateShipmentRequestDroppoint
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Display name of the service point.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UpdateShipmentRequestDroppoint
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Formatted address of the service point.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof UpdateShipmentRequestDroppoint
|
|
46
|
+
*/
|
|
47
|
+
address: string;
|
|
48
|
+
/**
|
|
49
|
+
* Latitude/longitude of the service point.
|
|
50
|
+
* @type {Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>}
|
|
51
|
+
* @memberof UpdateShipmentRequestDroppoint
|
|
52
|
+
*/
|
|
53
|
+
coordinates?: Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the UpdateShipmentRequestDroppoint interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfUpdateShipmentRequestDroppoint(value: object): value is UpdateShipmentRequestDroppoint {
|
|
60
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
61
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
62
|
+
if (!('address' in value) || value['address'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function UpdateShipmentRequestDroppointFromJSON(json: any): UpdateShipmentRequestDroppoint {
|
|
67
|
+
return UpdateShipmentRequestDroppointFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function UpdateShipmentRequestDroppointFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateShipmentRequestDroppoint {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'name': json['name'],
|
|
78
|
+
'address': json['address'],
|
|
79
|
+
'coordinates': json['coordinates'] == null ? undefined : ((json['coordinates'] as Array<any>).map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSON)),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function UpdateShipmentRequestDroppointToJSON(json: any): UpdateShipmentRequestDroppoint {
|
|
84
|
+
return UpdateShipmentRequestDroppointToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function UpdateShipmentRequestDroppointToJSONTyped(value?: UpdateShipmentRequestDroppoint | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'id': value['id'],
|
|
95
|
+
'name': value['name'],
|
|
96
|
+
'address': value['address'],
|
|
97
|
+
'coordinates': value['coordinates'] == null ? undefined : ((value['coordinates'] as Array<any>).map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSON)),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './CreateShipment201ResponseShippingRule';
|
|
|
37
37
|
export * from './CreateShipment201ResponseTracking';
|
|
38
38
|
export * from './CreateShipmentRequest';
|
|
39
39
|
export * from './CreateShipmentRequestCarrierSettings';
|
|
40
|
+
export * from './CreateShipmentRequestDroppoint';
|
|
40
41
|
export * from './CreateShipmentRequestParcelsInner';
|
|
41
42
|
export * from './CreateShipmentRequestParcelsInnerDimensions';
|
|
42
43
|
export * from './CreateShipmentRequestParcelsInnerOrderLinesInner';
|
|
@@ -143,6 +144,8 @@ export * from './UpdateOrgBrandingRequest';
|
|
|
143
144
|
export * from './UpdateOrgRequest';
|
|
144
145
|
export * from './UpdateOrgWebhookRequest';
|
|
145
146
|
export * from './UpdateShipmentRequest';
|
|
147
|
+
export * from './UpdateShipmentRequestCarrierSettings';
|
|
148
|
+
export * from './UpdateShipmentRequestDroppoint';
|
|
146
149
|
export * from './UpdateShippingRuleRequest';
|
|
147
150
|
export * from './VerifyApiToken200Response';
|
|
148
151
|
export * from './VerifyApiTokenRequest';
|