@beach-depository/sdk 0.0.3 → 0.0.4

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 (45) hide show
  1. package/dist/cjs/api/resources/outboundShipments/client/Client.d.ts +34 -1
  2. package/dist/cjs/api/resources/outboundShipments/client/Client.js +116 -0
  3. package/dist/cjs/api/resources/outboundShipments/client/requests/CancelOutboundShipmentsRequest.d.ts +10 -0
  4. package/dist/cjs/api/resources/outboundShipments/client/requests/CancelOutboundShipmentsRequest.js +3 -0
  5. package/dist/cjs/api/resources/outboundShipments/client/requests/CreateOutboundShipmentsRequest.d.ts +55 -0
  6. package/dist/cjs/api/resources/outboundShipments/client/requests/CreateOutboundShipmentsRequest.js +20 -0
  7. package/dist/cjs/api/resources/outboundShipments/client/requests/index.d.ts +2 -0
  8. package/dist/cjs/api/resources/outboundShipments/client/requests/index.js +3 -0
  9. package/dist/cjs/api/resources/outboundShipments/types/CancelOutboundShipmentsResponse.d.ts +78 -0
  10. package/dist/cjs/api/resources/outboundShipments/types/CancelOutboundShipmentsResponse.js +18 -0
  11. package/dist/cjs/api/resources/outboundShipments/types/CreateOutboundShipmentsResponse.d.ts +78 -0
  12. package/dist/cjs/api/resources/outboundShipments/types/CreateOutboundShipmentsResponse.js +18 -0
  13. package/dist/cjs/api/resources/outboundShipments/types/GetOutboundShipmentsResponse.d.ts +20 -10
  14. package/dist/cjs/api/resources/outboundShipments/types/GetOutboundShipmentsResponse.js +3 -0
  15. package/dist/cjs/api/resources/outboundShipments/types/ListOutboundShipmentsRequestStatus.d.ts +3 -0
  16. package/dist/cjs/api/resources/outboundShipments/types/ListOutboundShipmentsRequestStatus.js +3 -0
  17. package/dist/cjs/api/resources/outboundShipments/types/ListOutboundShipmentsResponse.d.ts +20 -10
  18. package/dist/cjs/api/resources/outboundShipments/types/ListOutboundShipmentsResponse.js +3 -0
  19. package/dist/cjs/api/resources/outboundShipments/types/index.d.ts +2 -0
  20. package/dist/cjs/api/resources/outboundShipments/types/index.js +2 -0
  21. package/dist/cjs/version.d.ts +1 -1
  22. package/dist/cjs/version.js +1 -1
  23. package/dist/esm/api/resources/outboundShipments/client/Client.d.mts +34 -1
  24. package/dist/esm/api/resources/outboundShipments/client/Client.mjs +117 -1
  25. package/dist/esm/api/resources/outboundShipments/client/requests/CancelOutboundShipmentsRequest.d.mts +10 -0
  26. package/dist/esm/api/resources/outboundShipments/client/requests/CancelOutboundShipmentsRequest.mjs +2 -0
  27. package/dist/esm/api/resources/outboundShipments/client/requests/CreateOutboundShipmentsRequest.d.mts +55 -0
  28. package/dist/esm/api/resources/outboundShipments/client/requests/CreateOutboundShipmentsRequest.mjs +17 -0
  29. package/dist/esm/api/resources/outboundShipments/client/requests/index.d.mts +2 -0
  30. package/dist/esm/api/resources/outboundShipments/client/requests/index.mjs +1 -1
  31. package/dist/esm/api/resources/outboundShipments/types/CancelOutboundShipmentsResponse.d.mts +78 -0
  32. package/dist/esm/api/resources/outboundShipments/types/CancelOutboundShipmentsResponse.mjs +15 -0
  33. package/dist/esm/api/resources/outboundShipments/types/CreateOutboundShipmentsResponse.d.mts +78 -0
  34. package/dist/esm/api/resources/outboundShipments/types/CreateOutboundShipmentsResponse.mjs +15 -0
  35. package/dist/esm/api/resources/outboundShipments/types/GetOutboundShipmentsResponse.d.mts +20 -10
  36. package/dist/esm/api/resources/outboundShipments/types/GetOutboundShipmentsResponse.mjs +3 -0
  37. package/dist/esm/api/resources/outboundShipments/types/ListOutboundShipmentsRequestStatus.d.mts +3 -0
  38. package/dist/esm/api/resources/outboundShipments/types/ListOutboundShipmentsRequestStatus.mjs +3 -0
  39. package/dist/esm/api/resources/outboundShipments/types/ListOutboundShipmentsResponse.d.mts +20 -10
  40. package/dist/esm/api/resources/outboundShipments/types/ListOutboundShipmentsResponse.mjs +3 -0
  41. package/dist/esm/api/resources/outboundShipments/types/index.d.mts +2 -0
  42. package/dist/esm/api/resources/outboundShipments/types/index.mjs +2 -0
  43. package/dist/esm/version.d.mts +1 -1
  44. package/dist/esm/version.mjs +1 -1
  45. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import type * as BeachApi from "../../../index.js";
@@ -6,6 +6,8 @@ export declare namespace OutboundShipmentsClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
+ interface IdempotentRequestOptions extends RequestOptions, BaseIdempotentRequestOptions {
10
+ }
9
11
  }
10
12
  export declare class OutboundShipmentsClient {
11
13
  protected readonly _options: NormalizedClientOptionsWithAuth<OutboundShipmentsClient.Options>;
@@ -22,6 +24,23 @@ export declare class OutboundShipmentsClient {
22
24
  */
23
25
  list(request?: BeachApi.ListOutboundShipmentsRequest, requestOptions?: OutboundShipmentsClient.RequestOptions): core.HttpResponsePromise<BeachApi.ListOutboundShipmentsResponse>;
24
26
  private __list;
27
+ /**
28
+ * @param {BeachApi.CreateOutboundShipmentsRequest} request
29
+ * @param {OutboundShipmentsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
30
+ *
31
+ * @throws {@link errors.BeachApiError}
32
+ * @throws {@link errors.BeachApiTimeoutError}
33
+ *
34
+ * @example
35
+ * await client.outboundShipments.create({
36
+ * fboAccountId: "fboAccountId",
37
+ * items: [{
38
+ * inventoryItemId: "inventoryItemId"
39
+ * }]
40
+ * })
41
+ */
42
+ create(request: BeachApi.CreateOutboundShipmentsRequest, requestOptions?: OutboundShipmentsClient.IdempotentRequestOptions): core.HttpResponsePromise<BeachApi.CreateOutboundShipmentsResponse>;
43
+ private __create;
25
44
  /**
26
45
  * @param {BeachApi.GetOutboundShipmentsRequest} request
27
46
  * @param {OutboundShipmentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -36,4 +55,18 @@ export declare class OutboundShipmentsClient {
36
55
  */
37
56
  get(request: BeachApi.GetOutboundShipmentsRequest, requestOptions?: OutboundShipmentsClient.RequestOptions): core.HttpResponsePromise<BeachApi.GetOutboundShipmentsResponse>;
38
57
  private __get;
58
+ /**
59
+ * @param {BeachApi.CancelOutboundShipmentsRequest} request
60
+ * @param {OutboundShipmentsClient.RequestOptions} requestOptions - Request-specific configuration.
61
+ *
62
+ * @throws {@link errors.BeachApiError}
63
+ * @throws {@link errors.BeachApiTimeoutError}
64
+ *
65
+ * @example
66
+ * await client.outboundShipments.cancel({
67
+ * id: "id"
68
+ * })
69
+ */
70
+ cancel(request: BeachApi.CancelOutboundShipmentsRequest, requestOptions?: OutboundShipmentsClient.RequestOptions): core.HttpResponsePromise<BeachApi.CancelOutboundShipmentsResponse>;
71
+ private __cancel;
39
72
  }
@@ -42,12 +42,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
42
42
  step((generator = generator.apply(thisArg, _arguments || [])).next());
43
43
  });
44
44
  };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
45
56
  Object.defineProperty(exports, "__esModule", { value: true });
46
57
  exports.OutboundShipmentsClient = void 0;
47
58
  const BaseClient_js_1 = require("../../../../BaseClient.js");
48
59
  const headers_js_1 = require("../../../../core/headers.js");
49
60
  const core = __importStar(require("../../../../core/index.js"));
50
61
  const json_js_1 = require("../../../../core/json.js");
62
+ const requestBody_js_1 = require("../../../../core/requestBody.js");
51
63
  const environments = __importStar(require("../../../../environments.js"));
52
64
  const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
53
65
  const errors = __importStar(require("../../../../errors/index.js"));
@@ -118,6 +130,59 @@ class OutboundShipmentsClient {
118
130
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/outbound-shipments");
119
131
  });
120
132
  }
133
+ /**
134
+ * @param {BeachApi.CreateOutboundShipmentsRequest} request
135
+ * @param {OutboundShipmentsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
136
+ *
137
+ * @throws {@link errors.BeachApiError}
138
+ * @throws {@link errors.BeachApiTimeoutError}
139
+ *
140
+ * @example
141
+ * await client.outboundShipments.create({
142
+ * fboAccountId: "fboAccountId",
143
+ * items: [{
144
+ * inventoryItemId: "inventoryItemId"
145
+ * }]
146
+ * })
147
+ */
148
+ create(request, requestOptions) {
149
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
150
+ }
151
+ __create(request, requestOptions) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
154
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
155
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
156
+ const _response = yield core.fetcher({
157
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BeachApiEnvironment.Sandbox, "v1/outbound-shipments"),
158
+ method: "POST",
159
+ headers: _headers,
160
+ contentType: "application/json",
161
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
162
+ requestType: "json",
163
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
164
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
165
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
166
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
167
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
168
+ logging: this._options.logging,
169
+ });
170
+ if (_response.ok) {
171
+ return {
172
+ data: _response.body,
173
+ rawResponse: _response.rawResponse,
174
+ };
175
+ }
176
+ if (_response.error.reason === "status-code") {
177
+ throw new errors.BeachApiError({
178
+ statusCode: _response.error.statusCode,
179
+ body: _response.error.body,
180
+ rawResponse: _response.rawResponse,
181
+ });
182
+ }
183
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/outbound-shipments");
184
+ });
185
+ }
121
186
  /**
122
187
  * @param {BeachApi.GetOutboundShipmentsRequest} request
123
188
  * @param {OutboundShipmentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -179,5 +244,56 @@ class OutboundShipmentsClient {
179
244
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/outbound-shipments/{id}");
180
245
  });
181
246
  }
247
+ /**
248
+ * @param {BeachApi.CancelOutboundShipmentsRequest} request
249
+ * @param {OutboundShipmentsClient.RequestOptions} requestOptions - Request-specific configuration.
250
+ *
251
+ * @throws {@link errors.BeachApiError}
252
+ * @throws {@link errors.BeachApiTimeoutError}
253
+ *
254
+ * @example
255
+ * await client.outboundShipments.cancel({
256
+ * id: "id"
257
+ * })
258
+ */
259
+ cancel(request, requestOptions) {
260
+ return core.HttpResponsePromise.fromPromise(this.__cancel(request, requestOptions));
261
+ }
262
+ __cancel(request, requestOptions) {
263
+ return __awaiter(this, void 0, void 0, function* () {
264
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
265
+ const { id } = request, _body = __rest(request, ["id"]);
266
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
267
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
268
+ const _response = yield core.fetcher({
269
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BeachApiEnvironment.Sandbox, `v1/outbound-shipments/${core.url.encodePathParam(id)}/cancel`),
270
+ method: "POST",
271
+ headers: _headers,
272
+ contentType: "application/json",
273
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
274
+ requestType: "json",
275
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
276
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
277
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
278
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
279
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
280
+ logging: this._options.logging,
281
+ });
282
+ if (_response.ok) {
283
+ return {
284
+ data: _response.body,
285
+ rawResponse: _response.rawResponse,
286
+ };
287
+ }
288
+ if (_response.error.reason === "status-code") {
289
+ throw new errors.BeachApiError({
290
+ statusCode: _response.error.statusCode,
291
+ body: _response.error.body,
292
+ rawResponse: _response.rawResponse,
293
+ });
294
+ }
295
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/outbound-shipments/{id}/cancel");
296
+ });
297
+ }
182
298
  }
183
299
  exports.OutboundShipmentsClient = OutboundShipmentsClient;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id"
5
+ * }
6
+ */
7
+ export interface CancelOutboundShipmentsRequest {
8
+ id: string;
9
+ reason?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * fboAccountId: "fboAccountId",
5
+ * items: [{
6
+ * inventoryItemId: "inventoryItemId"
7
+ * }]
8
+ * }
9
+ */
10
+ export interface CreateOutboundShipmentsRequest {
11
+ fboAccountId: string;
12
+ notes?: string;
13
+ destinationAddress?: CreateOutboundShipmentsRequest.DestinationAddress;
14
+ shipping?: CreateOutboundShipmentsRequest.Shipping;
15
+ items: CreateOutboundShipmentsRequest.Items.Item[];
16
+ }
17
+ export declare namespace CreateOutboundShipmentsRequest {
18
+ interface DestinationAddress {
19
+ name?: string | undefined;
20
+ company?: string | undefined;
21
+ street1: string;
22
+ street2?: string | undefined;
23
+ city: string;
24
+ state: string;
25
+ zip: string;
26
+ country: string;
27
+ phone?: string | undefined;
28
+ email?: string | undefined;
29
+ }
30
+ interface Shipping {
31
+ mode?: Shipping.Mode | undefined;
32
+ signatureType?: Shipping.SignatureType | undefined;
33
+ serviceCode?: string | undefined;
34
+ }
35
+ namespace Shipping {
36
+ const Mode: {
37
+ readonly Cheapest: "cheapest";
38
+ readonly Selected: "selected";
39
+ };
40
+ type Mode = (typeof Mode)[keyof typeof Mode];
41
+ const SignatureType: {
42
+ readonly NoSignature: "NoSignature";
43
+ readonly Signature: "Signature";
44
+ readonly AdultSignature: "AdultSignature";
45
+ readonly DirectSignature: "DirectSignature";
46
+ };
47
+ type SignatureType = (typeof SignatureType)[keyof typeof SignatureType];
48
+ }
49
+ type Items = Items.Item[];
50
+ namespace Items {
51
+ interface Item {
52
+ inventoryItemId: string;
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CreateOutboundShipmentsRequest = void 0;
5
+ var CreateOutboundShipmentsRequest;
6
+ (function (CreateOutboundShipmentsRequest) {
7
+ let Shipping;
8
+ (function (Shipping) {
9
+ Shipping.Mode = {
10
+ Cheapest: "cheapest",
11
+ Selected: "selected",
12
+ };
13
+ Shipping.SignatureType = {
14
+ NoSignature: "NoSignature",
15
+ Signature: "Signature",
16
+ AdultSignature: "AdultSignature",
17
+ DirectSignature: "DirectSignature",
18
+ };
19
+ })(Shipping = CreateOutboundShipmentsRequest.Shipping || (CreateOutboundShipmentsRequest.Shipping = {}));
20
+ })(CreateOutboundShipmentsRequest || (exports.CreateOutboundShipmentsRequest = CreateOutboundShipmentsRequest = {}));
@@ -1,2 +1,4 @@
1
+ export type { CancelOutboundShipmentsRequest } from "./CancelOutboundShipmentsRequest.js";
2
+ export { CreateOutboundShipmentsRequest } from "./CreateOutboundShipmentsRequest.js";
1
3
  export type { GetOutboundShipmentsRequest } from "./GetOutboundShipmentsRequest.js";
2
4
  export type { ListOutboundShipmentsRequest } from "./ListOutboundShipmentsRequest.js";
@@ -1,2 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateOutboundShipmentsRequest = void 0;
4
+ var CreateOutboundShipmentsRequest_js_1 = require("./CreateOutboundShipmentsRequest.js");
5
+ Object.defineProperty(exports, "CreateOutboundShipmentsRequest", { enumerable: true, get: function () { return CreateOutboundShipmentsRequest_js_1.CreateOutboundShipmentsRequest; } });
@@ -0,0 +1,78 @@
1
+ export interface CancelOutboundShipmentsResponse {
2
+ data: CancelOutboundShipmentsResponse.Data;
3
+ }
4
+ export declare namespace CancelOutboundShipmentsResponse {
5
+ interface Data {
6
+ id: string;
7
+ fboAccountId: string;
8
+ organizationId: string;
9
+ status: Data.Status;
10
+ totalItems: number;
11
+ notes?: string | undefined;
12
+ destinationAddress?: Data.DestinationAddress | undefined;
13
+ shipping?: Data.Shipping | undefined;
14
+ packages: Data.Packages.Item[];
15
+ items?: Data.Items.Item[] | undefined;
16
+ shippedAt?: (string | null) | undefined;
17
+ deliveredAt?: (string | null) | undefined;
18
+ createdAt: string;
19
+ }
20
+ namespace Data {
21
+ const Status: {
22
+ readonly Created: "created";
23
+ readonly Processing: "processing";
24
+ readonly Shipped: "shipped";
25
+ readonly Delivered: "delivered";
26
+ readonly Rejected: "rejected";
27
+ readonly Cancelled: "cancelled";
28
+ };
29
+ type Status = (typeof Status)[keyof typeof Status];
30
+ interface DestinationAddress {
31
+ name?: string | undefined;
32
+ street1?: string | undefined;
33
+ street2?: string | undefined;
34
+ city?: string | undefined;
35
+ state?: string | undefined;
36
+ zip?: string | undefined;
37
+ country?: string | undefined;
38
+ }
39
+ interface Shipping {
40
+ mode?: string | undefined;
41
+ signatureType?: string | undefined;
42
+ quote?: Shipping.Quote | undefined;
43
+ }
44
+ namespace Shipping {
45
+ interface Quote {
46
+ carrier?: string | undefined;
47
+ service?: string | undefined;
48
+ serviceCode?: string | undefined;
49
+ quotedCents?: number | undefined;
50
+ currency?: string | undefined;
51
+ quotedAt?: number | undefined;
52
+ insuredValueCents?: number | undefined;
53
+ weightGrams?: number | undefined;
54
+ }
55
+ }
56
+ type Packages = Packages.Item[];
57
+ namespace Packages {
58
+ interface Item {
59
+ carrier: string | null;
60
+ trackingNumber: string | null;
61
+ trackingUrl: string | null;
62
+ shippedAt: string | null;
63
+ deliveredAt: string | null;
64
+ inventoryItemIds: string[];
65
+ }
66
+ }
67
+ type Items = Items.Item[];
68
+ namespace Items {
69
+ interface Item {
70
+ id: string;
71
+ outboundShipmentId: string;
72
+ productId: string;
73
+ inventoryItemId: string;
74
+ createdAt: string;
75
+ }
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CancelOutboundShipmentsResponse = void 0;
5
+ var CancelOutboundShipmentsResponse;
6
+ (function (CancelOutboundShipmentsResponse) {
7
+ let Data;
8
+ (function (Data) {
9
+ Data.Status = {
10
+ Created: "created",
11
+ Processing: "processing",
12
+ Shipped: "shipped",
13
+ Delivered: "delivered",
14
+ Rejected: "rejected",
15
+ Cancelled: "cancelled",
16
+ };
17
+ })(Data = CancelOutboundShipmentsResponse.Data || (CancelOutboundShipmentsResponse.Data = {}));
18
+ })(CancelOutboundShipmentsResponse || (exports.CancelOutboundShipmentsResponse = CancelOutboundShipmentsResponse = {}));
@@ -0,0 +1,78 @@
1
+ export interface CreateOutboundShipmentsResponse {
2
+ data: CreateOutboundShipmentsResponse.Data;
3
+ }
4
+ export declare namespace CreateOutboundShipmentsResponse {
5
+ interface Data {
6
+ id: string;
7
+ fboAccountId: string;
8
+ organizationId: string;
9
+ status: Data.Status;
10
+ totalItems: number;
11
+ notes?: string | undefined;
12
+ destinationAddress?: Data.DestinationAddress | undefined;
13
+ shipping?: Data.Shipping | undefined;
14
+ packages: Data.Packages.Item[];
15
+ items?: Data.Items.Item[] | undefined;
16
+ shippedAt?: (string | null) | undefined;
17
+ deliveredAt?: (string | null) | undefined;
18
+ createdAt: string;
19
+ }
20
+ namespace Data {
21
+ const Status: {
22
+ readonly Created: "created";
23
+ readonly Processing: "processing";
24
+ readonly Shipped: "shipped";
25
+ readonly Delivered: "delivered";
26
+ readonly Rejected: "rejected";
27
+ readonly Cancelled: "cancelled";
28
+ };
29
+ type Status = (typeof Status)[keyof typeof Status];
30
+ interface DestinationAddress {
31
+ name?: string | undefined;
32
+ street1?: string | undefined;
33
+ street2?: string | undefined;
34
+ city?: string | undefined;
35
+ state?: string | undefined;
36
+ zip?: string | undefined;
37
+ country?: string | undefined;
38
+ }
39
+ interface Shipping {
40
+ mode?: string | undefined;
41
+ signatureType?: string | undefined;
42
+ quote?: Shipping.Quote | undefined;
43
+ }
44
+ namespace Shipping {
45
+ interface Quote {
46
+ carrier?: string | undefined;
47
+ service?: string | undefined;
48
+ serviceCode?: string | undefined;
49
+ quotedCents?: number | undefined;
50
+ currency?: string | undefined;
51
+ quotedAt?: number | undefined;
52
+ insuredValueCents?: number | undefined;
53
+ weightGrams?: number | undefined;
54
+ }
55
+ }
56
+ type Packages = Packages.Item[];
57
+ namespace Packages {
58
+ interface Item {
59
+ carrier: string | null;
60
+ trackingNumber: string | null;
61
+ trackingUrl: string | null;
62
+ shippedAt: string | null;
63
+ deliveredAt: string | null;
64
+ inventoryItemIds: string[];
65
+ }
66
+ }
67
+ type Items = Items.Item[];
68
+ namespace Items {
69
+ interface Item {
70
+ id: string;
71
+ outboundShipmentId: string;
72
+ productId: string;
73
+ inventoryItemId: string;
74
+ createdAt: string;
75
+ }
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CreateOutboundShipmentsResponse = void 0;
5
+ var CreateOutboundShipmentsResponse;
6
+ (function (CreateOutboundShipmentsResponse) {
7
+ let Data;
8
+ (function (Data) {
9
+ Data.Status = {
10
+ Created: "created",
11
+ Processing: "processing",
12
+ Shipped: "shipped",
13
+ Delivered: "delivered",
14
+ Rejected: "rejected",
15
+ Cancelled: "cancelled",
16
+ };
17
+ })(Data = CreateOutboundShipmentsResponse.Data || (CreateOutboundShipmentsResponse.Data = {}));
18
+ })(CreateOutboundShipmentsResponse || (exports.CreateOutboundShipmentsResponse = CreateOutboundShipmentsResponse = {}));
@@ -7,22 +7,24 @@ export declare namespace GetOutboundShipmentsResponse {
7
7
  fboAccountId: string;
8
8
  organizationId: string;
9
9
  status: Data.Status;
10
- carrier?: string | undefined;
11
- trackingNumber?: string | undefined;
12
- trackingUrl?: string | undefined;
10
+ totalItems: number;
11
+ notes?: string | undefined;
13
12
  destinationAddress?: Data.DestinationAddress | undefined;
14
13
  shipping?: Data.Shipping | undefined;
15
- approvedAt?: string | undefined;
16
- pickedUpAt?: string | undefined;
17
- shippedAt?: string | undefined;
14
+ packages: Data.Packages.Item[];
18
15
  items?: Data.Items.Item[] | undefined;
16
+ shippedAt?: (string | null) | undefined;
17
+ deliveredAt?: (string | null) | undefined;
19
18
  createdAt: string;
20
19
  }
21
20
  namespace Data {
22
21
  const Status: {
22
+ readonly Created: "created";
23
23
  readonly Processing: "processing";
24
24
  readonly Shipped: "shipped";
25
25
  readonly Delivered: "delivered";
26
+ readonly Rejected: "rejected";
27
+ readonly Cancelled: "cancelled";
26
28
  };
27
29
  type Status = (typeof Status)[keyof typeof Status];
28
30
  interface DestinationAddress {
@@ -51,16 +53,24 @@ export declare namespace GetOutboundShipmentsResponse {
51
53
  weightGrams?: number | undefined;
52
54
  }
53
55
  }
56
+ type Packages = Packages.Item[];
57
+ namespace Packages {
58
+ interface Item {
59
+ carrier: string | null;
60
+ trackingNumber: string | null;
61
+ trackingUrl: string | null;
62
+ shippedAt: string | null;
63
+ deliveredAt: string | null;
64
+ inventoryItemIds: string[];
65
+ }
66
+ }
54
67
  type Items = Items.Item[];
55
68
  namespace Items {
56
69
  interface Item {
57
70
  id: string;
58
71
  outboundShipmentId: string;
59
- inventoryItemId: string;
60
- outboundRequestItemId?: string | undefined;
61
72
  productId: string;
62
- inboundShipmentId?: string | undefined;
63
- inboundShipmentLineId?: string | undefined;
73
+ inventoryItemId: string;
64
74
  createdAt: string;
65
75
  }
66
76
  }
@@ -7,9 +7,12 @@ var GetOutboundShipmentsResponse;
7
7
  let Data;
8
8
  (function (Data) {
9
9
  Data.Status = {
10
+ Created: "created",
10
11
  Processing: "processing",
11
12
  Shipped: "shipped",
12
13
  Delivered: "delivered",
14
+ Rejected: "rejected",
15
+ Cancelled: "cancelled",
13
16
  };
14
17
  })(Data = GetOutboundShipmentsResponse.Data || (GetOutboundShipmentsResponse.Data = {}));
15
18
  })(GetOutboundShipmentsResponse || (exports.GetOutboundShipmentsResponse = GetOutboundShipmentsResponse = {}));
@@ -1,6 +1,9 @@
1
1
  export declare const ListOutboundShipmentsRequestStatus: {
2
+ readonly Created: "created";
2
3
  readonly Processing: "processing";
3
4
  readonly Shipped: "shipped";
4
5
  readonly Delivered: "delivered";
6
+ readonly Rejected: "rejected";
7
+ readonly Cancelled: "cancelled";
5
8
  };
6
9
  export type ListOutboundShipmentsRequestStatus = (typeof ListOutboundShipmentsRequestStatus)[keyof typeof ListOutboundShipmentsRequestStatus];
@@ -3,7 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ListOutboundShipmentsRequestStatus = void 0;
5
5
  exports.ListOutboundShipmentsRequestStatus = {
6
+ Created: "created",
6
7
  Processing: "processing",
7
8
  Shipped: "shipped",
8
9
  Delivered: "delivered",
10
+ Rejected: "rejected",
11
+ Cancelled: "cancelled",
9
12
  };
@@ -10,22 +10,24 @@ export declare namespace ListOutboundShipmentsResponse {
10
10
  fboAccountId: string;
11
11
  organizationId: string;
12
12
  status: Item.Status;
13
- carrier?: string | undefined;
14
- trackingNumber?: string | undefined;
15
- trackingUrl?: string | undefined;
13
+ totalItems: number;
14
+ notes?: string | undefined;
16
15
  destinationAddress?: Item.DestinationAddress | undefined;
17
16
  shipping?: Item.Shipping | undefined;
18
- approvedAt?: string | undefined;
19
- pickedUpAt?: string | undefined;
20
- shippedAt?: string | undefined;
17
+ packages: Item.Packages.Item[];
21
18
  items?: Item.Items.Item[] | undefined;
19
+ shippedAt?: (string | null) | undefined;
20
+ deliveredAt?: (string | null) | undefined;
22
21
  createdAt: string;
23
22
  }
24
23
  namespace Item {
25
24
  const Status: {
25
+ readonly Created: "created";
26
26
  readonly Processing: "processing";
27
27
  readonly Shipped: "shipped";
28
28
  readonly Delivered: "delivered";
29
+ readonly Rejected: "rejected";
30
+ readonly Cancelled: "cancelled";
29
31
  };
30
32
  type Status = (typeof Status)[keyof typeof Status];
31
33
  interface DestinationAddress {
@@ -54,16 +56,24 @@ export declare namespace ListOutboundShipmentsResponse {
54
56
  weightGrams?: number | undefined;
55
57
  }
56
58
  }
59
+ type Packages = Packages.Item[];
60
+ namespace Packages {
61
+ interface Item {
62
+ carrier: string | null;
63
+ trackingNumber: string | null;
64
+ trackingUrl: string | null;
65
+ shippedAt: string | null;
66
+ deliveredAt: string | null;
67
+ inventoryItemIds: string[];
68
+ }
69
+ }
57
70
  type Items = Items.Item[];
58
71
  namespace Items {
59
72
  interface Item {
60
73
  id: string;
61
74
  outboundShipmentId: string;
62
- inventoryItemId: string;
63
- outboundRequestItemId?: string | undefined;
64
75
  productId: string;
65
- inboundShipmentId?: string | undefined;
66
- inboundShipmentLineId?: string | undefined;
76
+ inventoryItemId: string;
67
77
  createdAt: string;
68
78
  }
69
79
  }