@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.
Files changed (83) hide show
  1. package/dist/apis/ShipmentsApi.d.ts +2 -2
  2. package/dist/apis/ShipmentsApi.js +2 -2
  3. package/dist/esm/apis/ShipmentsApi.d.ts +2 -2
  4. package/dist/esm/apis/ShipmentsApi.js +2 -2
  5. package/dist/esm/models/BatchSendShipments200ResponseResultsInner.d.ts +6 -3
  6. package/dist/esm/models/BatchSendShipments200ResponseResultsInner.js +4 -1
  7. package/dist/esm/models/BatchSendShipments200ResponseSummary.d.ts +8 -2
  8. package/dist/esm/models/BatchSendShipments200ResponseSummary.js +4 -0
  9. package/dist/esm/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.d.ts +2 -2
  10. package/dist/esm/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.js +1 -3
  11. package/dist/esm/models/CreateShipmentRequest.d.ts +14 -1
  12. package/dist/esm/models/CreateShipmentRequest.js +6 -3
  13. package/dist/esm/models/CreateShipmentRequestCarrierSettings.d.ts +1 -1
  14. package/dist/esm/models/CreateShipmentRequestDroppoint.d.ts +51 -0
  15. package/dist/esm/models/CreateShipmentRequestDroppoint.js +54 -0
  16. package/dist/esm/models/CreateShipmentRequestParcelsInnerOrderLinesInner.d.ts +2 -2
  17. package/dist/esm/models/CreateShipmentRequestParcelsInnerOrderLinesInner.js +1 -3
  18. package/dist/esm/models/GetOrder200ResponseShipmentsInner.d.ts +6 -0
  19. package/dist/esm/models/GetOrder200ResponseShipmentsInner.js +2 -0
  20. package/dist/esm/models/ListApiTokens401Response.d.ts +2 -0
  21. package/dist/esm/models/ListApiTokens401Response.js +2 -0
  22. package/dist/esm/models/SendShipment422Response.d.ts +2 -0
  23. package/dist/esm/models/SendShipment422Response.js +2 -0
  24. package/dist/esm/models/UpdateShipmentRequest.d.ts +10 -3
  25. package/dist/esm/models/UpdateShipmentRequest.js +6 -3
  26. package/dist/esm/models/UpdateShipmentRequestCarrierSettings.d.ts +53 -0
  27. package/dist/esm/models/UpdateShipmentRequestCarrierSettings.js +57 -0
  28. package/dist/esm/models/UpdateShipmentRequestDroppoint.d.ts +51 -0
  29. package/dist/esm/models/UpdateShipmentRequestDroppoint.js +54 -0
  30. package/dist/esm/models/index.d.ts +3 -0
  31. package/dist/esm/models/index.js +3 -0
  32. package/dist/models/BatchSendShipments200ResponseResultsInner.d.ts +6 -3
  33. package/dist/models/BatchSendShipments200ResponseResultsInner.js +4 -1
  34. package/dist/models/BatchSendShipments200ResponseSummary.d.ts +8 -2
  35. package/dist/models/BatchSendShipments200ResponseSummary.js +4 -0
  36. package/dist/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.d.ts +2 -2
  37. package/dist/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.js +1 -3
  38. package/dist/models/CreateShipmentRequest.d.ts +14 -1
  39. package/dist/models/CreateShipmentRequest.js +6 -3
  40. package/dist/models/CreateShipmentRequestCarrierSettings.d.ts +1 -1
  41. package/dist/models/CreateShipmentRequestDroppoint.d.ts +51 -0
  42. package/dist/models/CreateShipmentRequestDroppoint.js +61 -0
  43. package/dist/models/CreateShipmentRequestParcelsInnerOrderLinesInner.d.ts +2 -2
  44. package/dist/models/CreateShipmentRequestParcelsInnerOrderLinesInner.js +1 -3
  45. package/dist/models/GetOrder200ResponseShipmentsInner.d.ts +6 -0
  46. package/dist/models/GetOrder200ResponseShipmentsInner.js +2 -0
  47. package/dist/models/ListApiTokens401Response.d.ts +2 -0
  48. package/dist/models/ListApiTokens401Response.js +2 -0
  49. package/dist/models/SendShipment422Response.d.ts +2 -0
  50. package/dist/models/SendShipment422Response.js +2 -0
  51. package/dist/models/UpdateShipmentRequest.d.ts +10 -3
  52. package/dist/models/UpdateShipmentRequest.js +6 -3
  53. package/dist/models/UpdateShipmentRequestCarrierSettings.d.ts +53 -0
  54. package/dist/models/UpdateShipmentRequestCarrierSettings.js +64 -0
  55. package/dist/models/UpdateShipmentRequestDroppoint.d.ts +51 -0
  56. package/dist/models/UpdateShipmentRequestDroppoint.js +61 -0
  57. package/dist/models/index.d.ts +3 -0
  58. package/dist/models/index.js +3 -0
  59. package/docs/BatchSendShipments200ResponseSummary.md +2 -0
  60. package/docs/CreateShipmentRequest.md +4 -0
  61. package/docs/CreateShipmentRequestCarrierSettings.md +1 -0
  62. package/docs/CreateShipmentRequestDroppoint.md +41 -0
  63. package/docs/GetOrder200ResponseShipmentsInner.md +2 -0
  64. package/docs/ShipmentsApi.md +1 -1
  65. package/docs/UpdateShipmentRequest.md +3 -1
  66. package/docs/UpdateShipmentRequestCarrierSettings.md +40 -0
  67. package/docs/UpdateShipmentRequestDroppoint.md +41 -0
  68. package/package.json +1 -1
  69. package/src/apis/ShipmentsApi.ts +2 -2
  70. package/src/models/BatchSendShipments200ResponseResultsInner.ts +7 -4
  71. package/src/models/BatchSendShipments200ResponseSummary.ts +11 -2
  72. package/src/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.ts +3 -4
  73. package/src/models/CreateShipmentRequest.ts +25 -3
  74. package/src/models/CreateShipmentRequestCarrierSettings.ts +1 -1
  75. package/src/models/CreateShipmentRequestDroppoint.ts +100 -0
  76. package/src/models/CreateShipmentRequestParcelsInnerOrderLinesInner.ts +3 -4
  77. package/src/models/GetOrder200ResponseShipmentsInner.ts +8 -0
  78. package/src/models/ListApiTokens401Response.ts +2 -0
  79. package/src/models/SendShipment422Response.ts +2 -0
  80. package/src/models/UpdateShipmentRequest.ts +25 -10
  81. package/src/models/UpdateShipmentRequestCarrierSettings.ts +101 -0
  82. package/src/models/UpdateShipmentRequestDroppoint.ts +100 -0
  83. package/src/models/index.ts +3 -0
@@ -137,12 +137,12 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
137
137
  */
138
138
  createShipmentRequestOpts(requestParameters: CreateShipmentOperationRequest): Promise<runtime.RequestOpts>;
139
139
  /**
140
- * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
140
+ * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
141
141
  * Create shipment
142
142
  */
143
143
  createShipmentRaw(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateShipment201Response>>;
144
144
  /**
145
- * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
145
+ * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
146
146
  * Create shipment
147
147
  */
148
148
  createShipment(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateShipment201Response>;
@@ -237,7 +237,7 @@ class ShipmentsApi extends runtime.BaseAPI {
237
237
  });
238
238
  }
239
239
  /**
240
- * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
240
+ * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
241
241
  * Create shipment
242
242
  */
243
243
  createShipmentRaw(requestParameters, initOverrides) {
@@ -248,7 +248,7 @@ class ShipmentsApi extends runtime.BaseAPI {
248
248
  });
249
249
  }
250
250
  /**
251
- * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
251
+ * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
252
252
  * Create shipment
253
253
  */
254
254
  createShipment(requestParameters, initOverrides) {
@@ -137,12 +137,12 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
137
137
  */
138
138
  createShipmentRequestOpts(requestParameters: CreateShipmentOperationRequest): Promise<runtime.RequestOpts>;
139
139
  /**
140
- * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
140
+ * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
141
141
  * Create shipment
142
142
  */
143
143
  createShipmentRaw(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateShipment201Response>>;
144
144
  /**
145
- * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
145
+ * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
146
146
  * Create shipment
147
147
  */
148
148
  createShipment(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateShipment201Response>;
@@ -234,7 +234,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
234
234
  });
235
235
  }
236
236
  /**
237
- * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
237
+ * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
238
238
  * Create shipment
239
239
  */
240
240
  createShipmentRaw(requestParameters, initOverrides) {
@@ -245,7 +245,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
245
245
  });
246
246
  }
247
247
  /**
248
- * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
248
+ * Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
249
249
  * Create shipment
250
250
  */
251
251
  createShipment(requestParameters, initOverrides) {
@@ -23,19 +23,19 @@ export interface BatchSendShipments200ResponseResultsInner {
23
23
  */
24
24
  shipmentId: string;
25
25
  /**
26
- * Whether this shipment was successfully booked with its carrier.
26
+ * `sent` when the carrier booked it, `failed` when the carrier or Zippendo rejected it, and `skipped` when the batch ran out of time before reaching it. A `skipped` shipment was never sent to the carrier and is safe to submit again.
27
27
  * @type {BatchSendShipments200ResponseResultsInnerStatusEnum}
28
28
  * @memberof BatchSendShipments200ResponseResultsInner
29
29
  */
30
30
  status: BatchSendShipments200ResponseResultsInnerStatusEnum;
31
31
  /**
32
- * Canonical machine-readable error code, present when `status` is `failed`.
32
+ * Canonical machine-readable error code, present when `status` is `failed` or `skipped`.
33
33
  * @type {BatchSendShipments200ResponseResultsInnerCodeEnum}
34
34
  * @memberof BatchSendShipments200ResponseResultsInner
35
35
  */
36
36
  code?: BatchSendShipments200ResponseResultsInnerCodeEnum;
37
37
  /**
38
- * Human-readable failure detail, present when `status` is `failed`.
38
+ * Human-readable detail, present when `status` is `failed` or `skipped`.
39
39
  * @type {string}
40
40
  * @memberof BatchSendShipments200ResponseResultsInner
41
41
  */
@@ -53,6 +53,7 @@ export interface BatchSendShipments200ResponseResultsInner {
53
53
  export declare const BatchSendShipments200ResponseResultsInnerStatusEnum: {
54
54
  readonly Sent: "sent";
55
55
  readonly Failed: "failed";
56
+ readonly Skipped: "skipped";
56
57
  };
57
58
  export type BatchSendShipments200ResponseResultsInnerStatusEnum = typeof BatchSendShipments200ResponseResultsInnerStatusEnum[keyof typeof BatchSendShipments200ResponseResultsInnerStatusEnum];
58
59
  /**
@@ -123,6 +124,8 @@ export declare const BatchSendShipments200ResponseResultsInnerCodeEnum: {
123
124
  readonly ShipmentDocumentNotFound: "SHIPMENT_DOCUMENT_NOT_FOUND";
124
125
  readonly ShipmentAlreadySent: "SHIPMENT_ALREADY_SENT";
125
126
  readonly ShipmentInvalidState: "SHIPMENT_INVALID_STATE";
127
+ readonly ShipmentServicePointRequired: "SHIPMENT_SERVICE_POINT_REQUIRED";
128
+ readonly ShipmentSendNotAttempted: "SHIPMENT_SEND_NOT_ATTEMPTED";
126
129
  readonly ParcelNotFound: "PARCEL_NOT_FOUND";
127
130
  readonly ParcelInvalidSplit: "PARCEL_INVALID_SPLIT";
128
131
  readonly PickupNotFound: "PICKUP_NOT_FOUND";
@@ -17,7 +17,8 @@ import { SendShipment422ResponseErrorsInnerFromJSON, SendShipment422ResponseErro
17
17
  */
18
18
  export const BatchSendShipments200ResponseResultsInnerStatusEnum = {
19
19
  Sent: 'sent',
20
- Failed: 'failed'
20
+ Failed: 'failed',
21
+ Skipped: 'skipped'
21
22
  };
22
23
  /**
23
24
  * @export
@@ -87,6 +88,8 @@ export const BatchSendShipments200ResponseResultsInnerCodeEnum = {
87
88
  ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
88
89
  ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
89
90
  ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
91
+ ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
92
+ ShipmentSendNotAttempted: 'SHIPMENT_SEND_NOT_ATTEMPTED',
90
93
  ParcelNotFound: 'PARCEL_NOT_FOUND',
91
94
  ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
92
95
  PickupNotFound: 'PICKUP_NOT_FOUND',
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface BatchSendShipments200ResponseSummary {
18
18
  /**
19
- * Number of unique shipments processed.
19
+ * Number of unique shipments requested.
20
20
  * @type {number}
21
21
  * @memberof BatchSendShipments200ResponseSummary
22
22
  */
@@ -28,11 +28,17 @@ export interface BatchSendShipments200ResponseSummary {
28
28
  */
29
29
  sent: number;
30
30
  /**
31
- * How many failed.
31
+ * How many the carrier or Zippendo rejected.
32
32
  * @type {number}
33
33
  * @memberof BatchSendShipments200ResponseSummary
34
34
  */
35
35
  failed: number;
36
+ /**
37
+ * How many the batch ran out of time to attempt. Submit these again.
38
+ * @type {number}
39
+ * @memberof BatchSendShipments200ResponseSummary
40
+ */
41
+ skipped: number;
36
42
  }
37
43
  /**
38
44
  * Check if a given object implements the BatchSendShipments200ResponseSummary interface.
@@ -21,6 +21,8 @@ export function instanceOfBatchSendShipments200ResponseSummary(value) {
21
21
  return false;
22
22
  if (!('failed' in value) || value['failed'] === undefined)
23
23
  return false;
24
+ if (!('skipped' in value) || value['skipped'] === undefined)
25
+ return false;
24
26
  return true;
25
27
  }
26
28
  export function BatchSendShipments200ResponseSummaryFromJSON(json) {
@@ -34,6 +36,7 @@ export function BatchSendShipments200ResponseSummaryFromJSONTyped(json, ignoreDi
34
36
  'total': json['total'],
35
37
  'sent': json['sent'],
36
38
  'failed': json['failed'],
39
+ 'skipped': json['skipped'],
37
40
  };
38
41
  }
39
42
  export function BatchSendShipments200ResponseSummaryToJSON(json) {
@@ -47,5 +50,6 @@ export function BatchSendShipments200ResponseSummaryToJSONTyped(value, ignoreDis
47
50
  'total': value['total'],
48
51
  'sent': value['sent'],
49
52
  'failed': value['failed'],
53
+ 'skipped': value['skipped'],
50
54
  };
51
55
  }
@@ -22,11 +22,11 @@ export interface CreateShipment201ResponseParcelsInnerOrderLinesInner {
22
22
  */
23
23
  id?: string;
24
24
  /**
25
- * Stock keeping unit of the product.
25
+ * Stock keeping unit of the product. Optional — not every webshop assigns SKUs.
26
26
  * @type {string}
27
27
  * @memberof CreateShipment201ResponseParcelsInnerOrderLinesInner
28
28
  */
29
- sku: string;
29
+ sku?: string | null;
30
30
  /**
31
31
  * Number of units in this order line.
32
32
  * @type {number}
@@ -15,8 +15,6 @@
15
15
  * Check if a given object implements the CreateShipment201ResponseParcelsInnerOrderLinesInner interface.
16
16
  */
17
17
  export function instanceOfCreateShipment201ResponseParcelsInnerOrderLinesInner(value) {
18
- if (!('sku' in value) || value['sku'] === undefined)
19
- return false;
20
18
  if (!('quantity' in value) || value['quantity'] === undefined)
21
19
  return false;
22
20
  return true;
@@ -30,7 +28,7 @@ export function CreateShipment201ResponseParcelsInnerOrderLinesInnerFromJSONType
30
28
  }
31
29
  return {
32
30
  'id': json['id'] == null ? undefined : json['id'],
33
- 'sku': json['sku'],
31
+ 'sku': json['sku'] === undefined ? undefined : json['sku'] === null ? null : json['sku'],
34
32
  'quantity': json['quantity'],
35
33
  'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'],
36
34
  'unitPrice': json['unitPrice'] === undefined ? undefined : json['unitPrice'] === null ? null : json['unitPrice'],
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { CreateShipmentRequestPickupDetails } from './CreateShipmentRequestPickupDetails';
13
13
  import type { CreateShipmentRequestCarrierSettings } from './CreateShipmentRequestCarrierSettings';
14
+ import type { CreateShipmentRequestDroppoint } from './CreateShipmentRequestDroppoint';
14
15
  import type { CreateShipmentRequestPartiesInner } from './CreateShipmentRequestPartiesInner';
15
16
  import type { CreateShipmentRequestParcelsInner } from './CreateShipmentRequestParcelsInner';
16
17
  /**
@@ -54,7 +55,7 @@ export interface CreateShipmentRequest {
54
55
  * @type {CreateShipmentRequestCarrierSettings}
55
56
  * @memberof CreateShipmentRequest
56
57
  */
57
- carrierSettings: CreateShipmentRequestCarrierSettings;
58
+ carrierSettings?: CreateShipmentRequestCarrierSettings;
58
59
  /**
59
60
  * Parcels to include. Optional when orderId is provided.
60
61
  * @type {Array<CreateShipmentRequestParcelsInner>}
@@ -97,6 +98,18 @@ export interface CreateShipmentRequest {
97
98
  * @memberof CreateShipmentRequest
98
99
  */
99
100
  documentPrinterId?: string | null;
101
+ /**
102
+ * Create the shipment from this shipping rule: carrier settings and the sender address derive from the rule (explicit carrierSettings and addressId are then ignored).
103
+ * @type {string}
104
+ * @memberof CreateShipmentRequest
105
+ */
106
+ shippingRuleId?: string;
107
+ /**
108
+ *
109
+ * @type {CreateShipmentRequestDroppoint}
110
+ * @memberof CreateShipmentRequest
111
+ */
112
+ droppoint?: CreateShipmentRequestDroppoint;
100
113
  }
101
114
  /**
102
115
  * @export
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import { CreateShipmentRequestPickupDetailsFromJSON, CreateShipmentRequestPickupDetailsToJSON, } from './CreateShipmentRequestPickupDetails';
15
15
  import { CreateShipmentRequestCarrierSettingsFromJSON, CreateShipmentRequestCarrierSettingsToJSON, } from './CreateShipmentRequestCarrierSettings';
16
+ import { CreateShipmentRequestDroppointFromJSON, CreateShipmentRequestDroppointToJSON, } from './CreateShipmentRequestDroppoint';
16
17
  import { CreateShipmentRequestPartiesInnerFromJSON, CreateShipmentRequestPartiesInnerToJSON, } from './CreateShipmentRequestPartiesInner';
17
18
  import { CreateShipmentRequestParcelsInnerFromJSON, CreateShipmentRequestParcelsInnerToJSON, } from './CreateShipmentRequestParcelsInner';
18
19
  /**
@@ -41,8 +42,6 @@ export const CreateShipmentRequestStatusEnum = {
41
42
  export function instanceOfCreateShipmentRequest(value) {
42
43
  if (!('type' in value) || value['type'] === undefined)
43
44
  return false;
44
- if (!('carrierSettings' in value) || value['carrierSettings'] === undefined)
45
- return false;
46
45
  return true;
47
46
  }
48
47
  export function CreateShipmentRequestFromJSON(json) {
@@ -58,7 +57,7 @@ export function CreateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
58
57
  'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
59
58
  'parties': json['parties'] == null ? undefined : (json['parties'].map(CreateShipmentRequestPartiesInnerFromJSON)),
60
59
  'type': json['type'],
61
- 'carrierSettings': CreateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
60
+ 'carrierSettings': json['carrierSettings'] == null ? undefined : CreateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
62
61
  'parcels': json['parcels'] == null ? undefined : (json['parcels'].map(CreateShipmentRequestParcelsInnerFromJSON)),
63
62
  'pickupDetails': json['pickupDetails'] === undefined ? undefined : json['pickupDetails'] === null ? null : CreateShipmentRequestPickupDetailsFromJSON(json['pickupDetails']),
64
63
  'termOfTrade': json['termOfTrade'] == null ? undefined : json['termOfTrade'],
@@ -66,6 +65,8 @@ export function CreateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
66
65
  'orderId': json['orderId'] === undefined ? undefined : json['orderId'] === null ? null : json['orderId'],
67
66
  'labelPrinterId': json['labelPrinterId'] === undefined ? undefined : json['labelPrinterId'] === null ? null : json['labelPrinterId'],
68
67
  'documentPrinterId': json['documentPrinterId'] === undefined ? undefined : json['documentPrinterId'] === null ? null : json['documentPrinterId'],
68
+ 'shippingRuleId': json['shippingRuleId'] == null ? undefined : json['shippingRuleId'],
69
+ 'droppoint': json['droppoint'] == null ? undefined : CreateShipmentRequestDroppointFromJSON(json['droppoint']),
69
70
  };
70
71
  }
71
72
  export function CreateShipmentRequestToJSON(json) {
@@ -89,5 +90,7 @@ export function CreateShipmentRequestToJSONTyped(value, ignoreDiscriminator = fa
89
90
  'orderId': value['orderId'],
90
91
  'labelPrinterId': value['labelPrinterId'],
91
92
  'documentPrinterId': value['documentPrinterId'],
93
+ 'shippingRuleId': value['shippingRuleId'],
94
+ 'droppoint': CreateShipmentRequestDroppointToJSON(value['droppoint']),
92
95
  };
93
96
  }
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { CreateShippingRuleRequestAdditionalParametersValue } from './CreateShippingRuleRequestAdditionalParametersValue';
13
13
  /**
14
- *
14
+ * Carrier configuration for the shipment. Optional when shippingRuleId is provided.
15
15
  * @export
16
16
  * @interface CreateShipmentRequestCarrierSettings
17
17
  */
@@ -0,0 +1,51 @@
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 { ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner } from './ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner';
13
+ /**
14
+ * Display details of the selected service point, stored alongside `servicePointId`. Used with a service-point shipping rule.
15
+ * @export
16
+ * @interface CreateShipmentRequestDroppoint
17
+ */
18
+ export interface CreateShipmentRequestDroppoint {
19
+ /**
20
+ * Identifier of the selected service point.
21
+ * @type {string}
22
+ * @memberof CreateShipmentRequestDroppoint
23
+ */
24
+ id: string;
25
+ /**
26
+ * Display name of the service point.
27
+ * @type {string}
28
+ * @memberof CreateShipmentRequestDroppoint
29
+ */
30
+ name: string;
31
+ /**
32
+ * Formatted address of the service point.
33
+ * @type {string}
34
+ * @memberof CreateShipmentRequestDroppoint
35
+ */
36
+ address: string;
37
+ /**
38
+ * Latitude/longitude of the service point.
39
+ * @type {Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>}
40
+ * @memberof CreateShipmentRequestDroppoint
41
+ */
42
+ coordinates?: Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>;
43
+ }
44
+ /**
45
+ * Check if a given object implements the CreateShipmentRequestDroppoint interface.
46
+ */
47
+ export declare function instanceOfCreateShipmentRequestDroppoint(value: object): value is CreateShipmentRequestDroppoint;
48
+ export declare function CreateShipmentRequestDroppointFromJSON(json: any): CreateShipmentRequestDroppoint;
49
+ export declare function CreateShipmentRequestDroppointFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateShipmentRequestDroppoint;
50
+ export declare function CreateShipmentRequestDroppointToJSON(json: any): CreateShipmentRequestDroppoint;
51
+ export declare function CreateShipmentRequestDroppointToJSONTyped(value?: CreateShipmentRequestDroppoint | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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
+ import { ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSON, ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSON, } from './ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner';
15
+ /**
16
+ * Check if a given object implements the CreateShipmentRequestDroppoint interface.
17
+ */
18
+ export function instanceOfCreateShipmentRequestDroppoint(value) {
19
+ if (!('id' in value) || value['id'] === undefined)
20
+ return false;
21
+ if (!('name' in value) || value['name'] === undefined)
22
+ return false;
23
+ if (!('address' in value) || value['address'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function CreateShipmentRequestDroppointFromJSON(json) {
28
+ return CreateShipmentRequestDroppointFromJSONTyped(json, false);
29
+ }
30
+ export function CreateShipmentRequestDroppointFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'id': json['id'],
36
+ 'name': json['name'],
37
+ 'address': json['address'],
38
+ 'coordinates': json['coordinates'] == null ? undefined : (json['coordinates'].map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSON)),
39
+ };
40
+ }
41
+ export function CreateShipmentRequestDroppointToJSON(json) {
42
+ return CreateShipmentRequestDroppointToJSONTyped(json, false);
43
+ }
44
+ export function CreateShipmentRequestDroppointToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'id': value['id'],
50
+ 'name': value['name'],
51
+ 'address': value['address'],
52
+ 'coordinates': value['coordinates'] == null ? undefined : (value['coordinates'].map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSON)),
53
+ };
54
+ }
@@ -22,11 +22,11 @@ export interface CreateShipmentRequestParcelsInnerOrderLinesInner {
22
22
  */
23
23
  id?: string;
24
24
  /**
25
- * Stock keeping unit of the product.
25
+ * Stock keeping unit of the product. Optional — not every webshop assigns SKUs.
26
26
  * @type {string}
27
27
  * @memberof CreateShipmentRequestParcelsInnerOrderLinesInner
28
28
  */
29
- sku: string;
29
+ sku?: string | null;
30
30
  /**
31
31
  * Number of units in this order line.
32
32
  * @type {number}
@@ -15,8 +15,6 @@
15
15
  * Check if a given object implements the CreateShipmentRequestParcelsInnerOrderLinesInner interface.
16
16
  */
17
17
  export function instanceOfCreateShipmentRequestParcelsInnerOrderLinesInner(value) {
18
- if (!('sku' in value) || value['sku'] === undefined)
19
- return false;
20
18
  if (!('quantity' in value) || value['quantity'] === undefined)
21
19
  return false;
22
20
  return true;
@@ -30,7 +28,7 @@ export function CreateShipmentRequestParcelsInnerOrderLinesInnerFromJSONTyped(js
30
28
  }
31
29
  return {
32
30
  'id': json['id'] == null ? undefined : json['id'],
33
- 'sku': json['sku'],
31
+ 'sku': json['sku'] === undefined ? undefined : json['sku'] === null ? null : json['sku'],
34
32
  'quantity': json['quantity'],
35
33
  'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'],
36
34
  'unitPrice': json['unitPrice'] === undefined ? undefined : json['unitPrice'] === null ? null : json['unitPrice'],
@@ -54,6 +54,12 @@ export interface GetOrder200ResponseShipmentsInner {
54
54
  * @memberof GetOrder200ResponseShipmentsInner
55
55
  */
56
56
  carrierSettings: ListShipments200ResponseDataInnerCarrierSettings;
57
+ /**
58
+ * Selected carrier service point identifier.
59
+ * @type {string}
60
+ * @memberof GetOrder200ResponseShipmentsInner
61
+ */
62
+ servicePointId?: string | null;
57
63
  /**
58
64
  * Timestamp when the shipment was created.
59
65
  * @type {string}
@@ -68,6 +68,7 @@ export function GetOrder200ResponseShipmentsInnerFromJSONTyped(json, ignoreDiscr
68
68
  'type': json['type'],
69
69
  'tracking': json['tracking'] === undefined ? undefined : json['tracking'] === null ? null : CreateShipment201ResponseTrackingFromJSON(json['tracking']),
70
70
  'carrierSettings': ListShipments200ResponseDataInnerCarrierSettingsFromJSON(json['carrierSettings']),
71
+ 'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
71
72
  'createdAt': json['createdAt'],
72
73
  'updatedAt': json['updatedAt'],
73
74
  'shippingRuleId': json['shippingRuleId'] === undefined ? undefined : json['shippingRuleId'] === null ? null : json['shippingRuleId'],
@@ -88,6 +89,7 @@ export function GetOrder200ResponseShipmentsInnerToJSONTyped(value, ignoreDiscri
88
89
  'type': value['type'],
89
90
  'tracking': CreateShipment201ResponseTrackingToJSON(value['tracking']),
90
91
  'carrierSettings': ListShipments200ResponseDataInnerCarrierSettingsToJSON(value['carrierSettings']),
92
+ 'servicePointId': value['servicePointId'],
91
93
  'createdAt': value['createdAt'],
92
94
  'updatedAt': value['updatedAt'],
93
95
  'shippingRuleId': value['shippingRuleId'],
@@ -102,6 +102,8 @@ export declare const ListApiTokens401ResponseCodeEnum: {
102
102
  readonly ShipmentDocumentNotFound: "SHIPMENT_DOCUMENT_NOT_FOUND";
103
103
  readonly ShipmentAlreadySent: "SHIPMENT_ALREADY_SENT";
104
104
  readonly ShipmentInvalidState: "SHIPMENT_INVALID_STATE";
105
+ readonly ShipmentServicePointRequired: "SHIPMENT_SERVICE_POINT_REQUIRED";
106
+ readonly ShipmentSendNotAttempted: "SHIPMENT_SEND_NOT_ATTEMPTED";
105
107
  readonly ParcelNotFound: "PARCEL_NOT_FOUND";
106
108
  readonly ParcelInvalidSplit: "PARCEL_INVALID_SPLIT";
107
109
  readonly PickupNotFound: "PICKUP_NOT_FOUND";
@@ -79,6 +79,8 @@ export const ListApiTokens401ResponseCodeEnum = {
79
79
  ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
80
80
  ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
81
81
  ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
82
+ ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
83
+ ShipmentSendNotAttempted: 'SHIPMENT_SEND_NOT_ATTEMPTED',
82
84
  ParcelNotFound: 'PARCEL_NOT_FOUND',
83
85
  ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
84
86
  PickupNotFound: 'PICKUP_NOT_FOUND',
@@ -109,6 +109,8 @@ export declare const SendShipment422ResponseCodeEnum: {
109
109
  readonly ShipmentDocumentNotFound: "SHIPMENT_DOCUMENT_NOT_FOUND";
110
110
  readonly ShipmentAlreadySent: "SHIPMENT_ALREADY_SENT";
111
111
  readonly ShipmentInvalidState: "SHIPMENT_INVALID_STATE";
112
+ readonly ShipmentServicePointRequired: "SHIPMENT_SERVICE_POINT_REQUIRED";
113
+ readonly ShipmentSendNotAttempted: "SHIPMENT_SEND_NOT_ATTEMPTED";
112
114
  readonly ParcelNotFound: "PARCEL_NOT_FOUND";
113
115
  readonly ParcelInvalidSplit: "PARCEL_INVALID_SPLIT";
114
116
  readonly PickupNotFound: "PICKUP_NOT_FOUND";
@@ -80,6 +80,8 @@ export const SendShipment422ResponseCodeEnum = {
80
80
  ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
81
81
  ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
82
82
  ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
83
+ ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
84
+ ShipmentSendNotAttempted: 'SHIPMENT_SEND_NOT_ATTEMPTED',
83
85
  ParcelNotFound: 'PARCEL_NOT_FOUND',
84
86
  ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
85
87
  PickupNotFound: 'PICKUP_NOT_FOUND',
@@ -10,8 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { CreateShipmentRequestPickupDetails } from './CreateShipmentRequestPickupDetails';
13
- import type { CreateShipmentRequestCarrierSettings } from './CreateShipmentRequestCarrierSettings';
13
+ import type { UpdateShipmentRequestDroppoint } from './UpdateShipmentRequestDroppoint';
14
14
  import type { CreateShipmentRequestPartiesInner } from './CreateShipmentRequestPartiesInner';
15
+ import type { UpdateShipmentRequestCarrierSettings } from './UpdateShipmentRequestCarrierSettings';
15
16
  import type { CreateShipmentRequestParcelsInner } from './CreateShipmentRequestParcelsInner';
16
17
  /**
17
18
  *
@@ -51,10 +52,10 @@ export interface UpdateShipmentRequest {
51
52
  type?: UpdateShipmentRequestTypeEnum;
52
53
  /**
53
54
  *
54
- * @type {CreateShipmentRequestCarrierSettings}
55
+ * @type {UpdateShipmentRequestCarrierSettings}
55
56
  * @memberof UpdateShipmentRequest
56
57
  */
57
- carrierSettings?: CreateShipmentRequestCarrierSettings;
58
+ carrierSettings?: UpdateShipmentRequestCarrierSettings;
58
59
  /**
59
60
  * Parcels to include. Optional when orderId is provided.
60
61
  * @type {Array<CreateShipmentRequestParcelsInner>}
@@ -103,6 +104,12 @@ export interface UpdateShipmentRequest {
103
104
  * @memberof UpdateShipmentRequest
104
105
  */
105
106
  shippingRuleId?: string | null;
107
+ /**
108
+ *
109
+ * @type {UpdateShipmentRequestDroppoint}
110
+ * @memberof UpdateShipmentRequest
111
+ */
112
+ droppoint?: UpdateShipmentRequestDroppoint;
106
113
  }
107
114
  /**
108
115
  * @export
@@ -12,8 +12,9 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { CreateShipmentRequestPickupDetailsFromJSON, CreateShipmentRequestPickupDetailsToJSON, } from './CreateShipmentRequestPickupDetails';
15
- import { CreateShipmentRequestCarrierSettingsFromJSON, CreateShipmentRequestCarrierSettingsToJSON, } from './CreateShipmentRequestCarrierSettings';
15
+ import { UpdateShipmentRequestDroppointFromJSON, UpdateShipmentRequestDroppointToJSON, } from './UpdateShipmentRequestDroppoint';
16
16
  import { CreateShipmentRequestPartiesInnerFromJSON, CreateShipmentRequestPartiesInnerToJSON, } from './CreateShipmentRequestPartiesInner';
17
+ import { UpdateShipmentRequestCarrierSettingsFromJSON, UpdateShipmentRequestCarrierSettingsToJSON, } from './UpdateShipmentRequestCarrierSettings';
17
18
  import { CreateShipmentRequestParcelsInnerFromJSON, CreateShipmentRequestParcelsInnerToJSON, } from './CreateShipmentRequestParcelsInner';
18
19
  /**
19
20
  * @export
@@ -54,7 +55,7 @@ export function UpdateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
54
55
  'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
55
56
  'parties': json['parties'] == null ? undefined : (json['parties'].map(CreateShipmentRequestPartiesInnerFromJSON)),
56
57
  'type': json['type'] == null ? undefined : json['type'],
57
- 'carrierSettings': json['carrierSettings'] == null ? undefined : CreateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
58
+ 'carrierSettings': json['carrierSettings'] == null ? undefined : UpdateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
58
59
  'parcels': json['parcels'] == null ? undefined : (json['parcels'].map(CreateShipmentRequestParcelsInnerFromJSON)),
59
60
  'pickupDetails': json['pickupDetails'] === undefined ? undefined : json['pickupDetails'] === null ? null : CreateShipmentRequestPickupDetailsFromJSON(json['pickupDetails']),
60
61
  'termOfTrade': json['termOfTrade'] == null ? undefined : json['termOfTrade'],
@@ -63,6 +64,7 @@ export function UpdateShipmentRequestFromJSONTyped(json, ignoreDiscriminator) {
63
64
  'labelPrinterId': json['labelPrinterId'] === undefined ? undefined : json['labelPrinterId'] === null ? null : json['labelPrinterId'],
64
65
  'documentPrinterId': json['documentPrinterId'] === undefined ? undefined : json['documentPrinterId'] === null ? null : json['documentPrinterId'],
65
66
  'shippingRuleId': json['shippingRuleId'] === undefined ? undefined : json['shippingRuleId'] === null ? null : json['shippingRuleId'],
67
+ 'droppoint': json['droppoint'] == null ? undefined : UpdateShipmentRequestDroppointFromJSON(json['droppoint']),
66
68
  };
67
69
  }
68
70
  export function UpdateShipmentRequestToJSON(json) {
@@ -78,7 +80,7 @@ export function UpdateShipmentRequestToJSONTyped(value, ignoreDiscriminator = fa
78
80
  'servicePointId': value['servicePointId'],
79
81
  'parties': value['parties'] == null ? undefined : (value['parties'].map(CreateShipmentRequestPartiesInnerToJSON)),
80
82
  'type': value['type'],
81
- 'carrierSettings': CreateShipmentRequestCarrierSettingsToJSON(value['carrierSettings']),
83
+ 'carrierSettings': UpdateShipmentRequestCarrierSettingsToJSON(value['carrierSettings']),
82
84
  'parcels': value['parcels'] == null ? undefined : (value['parcels'].map(CreateShipmentRequestParcelsInnerToJSON)),
83
85
  'pickupDetails': CreateShipmentRequestPickupDetailsToJSON(value['pickupDetails']),
84
86
  'termOfTrade': value['termOfTrade'],
@@ -87,5 +89,6 @@ export function UpdateShipmentRequestToJSONTyped(value, ignoreDiscriminator = fa
87
89
  'labelPrinterId': value['labelPrinterId'],
88
90
  'documentPrinterId': value['documentPrinterId'],
89
91
  'shippingRuleId': value['shippingRuleId'],
92
+ 'droppoint': UpdateShipmentRequestDroppointToJSON(value['droppoint']),
90
93
  };
91
94
  }