@shipengine/connect-fulfillment-provider-api 0.4.0 → 0.5.2
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/lib/app/fulfillment-provider-app-definition.d.ts +3 -3
- package/lib/app/fulfillment-provider-app-metadata.d.ts +8 -6
- package/lib/app/fulfillment-provider-app-metadata.js.map +1 -1
- package/lib/app/fulfillment-provider-app.js +2 -2
- package/lib/app/fulfillment-provider-app.js.map +1 -1
- package/lib/models/index.d.ts +1 -1
- package/lib/models/index.js +1 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/order-source/sales-order.d.ts +2 -0
- package/lib/models/sales-order-fulfillments.d.ts +19 -0
- package/lib/{requests/get-fulfillment-request.js → models/sales-order-fulfillments.js} +1 -1
- package/lib/models/sales-order-fulfillments.js.map +1 -0
- package/lib/requests/{get-fulfillment-request.d.ts → get-fulfillments-request.d.ts} +1 -1
- package/lib/{responses/get-fulfillment-response.js → requests/get-fulfillments-request.js} +1 -1
- package/lib/requests/get-fulfillments-request.js.map +1 -0
- package/lib/requests/index.d.ts +1 -1
- package/lib/requests/index.js +1 -1
- package/lib/requests/index.js.map +1 -1
- package/lib/responses/get-fulfillments-response.d.ts +14 -0
- package/lib/responses/get-fulfillments-response.js +8 -0
- package/lib/responses/get-fulfillments-response.js.map +1 -0
- package/lib/responses/get-recent-changes-response.d.ts +2 -2
- package/lib/responses/index.d.ts +1 -1
- package/lib/responses/index.js +1 -1
- package/lib/responses/index.js.map +1 -1
- package/package.json +1 -1
- package/spec.json +2831 -2659
- package/spec.yaml +199 -77
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/models/sales-order-status-change.d.ts +0 -22
- package/lib/models/sales-order-status-change.js +0 -3
- package/lib/models/sales-order-status-change.js.map +0 -1
- package/lib/requests/get-fulfillment-request.js.map +0 -1
- package/lib/responses/get-fulfillment-response.d.ts +0 -8
- package/lib/responses/get-fulfillment-response.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FulfillmentProviderAppMetadata } from './fulfillment-provider-app-metadata';
|
|
2
|
-
import { ConnectRequest, DelegateFulfillmentRequest,
|
|
3
|
-
import { ConnectResponse, DelegateFulfillmentResponse,
|
|
2
|
+
import { ConnectRequest, DelegateFulfillmentRequest, GetFulfillmentsRequest, CancelFulfillmentRequest, GetInventoryRequest, GetRatesRequest, GetRecentChangesRequest } from '..';
|
|
3
|
+
import { ConnectResponse, DelegateFulfillmentResponse, GetFulfillmentsResponse, CancelFulfillmentResponse, GetInventoryResponse, GetRatesResponse, GetRecentChangesResponse } from '..';
|
|
4
4
|
/**
|
|
5
5
|
* Definition for an Fulfillment Provider App implementation
|
|
6
6
|
*/
|
|
@@ -17,7 +17,7 @@ export interface FulfillmentProviderAppDefinition {
|
|
|
17
17
|
/**
|
|
18
18
|
* Get the current status of a single fulfillment from a provider.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
getFulfillments: (request: GetFulfillmentsRequest) => Promise<GetFulfillmentsResponse>;
|
|
21
21
|
/**
|
|
22
22
|
* Request that a delegated fulfillment be cancelled by the provider.
|
|
23
23
|
*/
|
|
@@ -3,13 +3,15 @@ export declare type FulfillmentProviderAppMetadata = {
|
|
|
3
3
|
Id: string;
|
|
4
4
|
/** @description The name of this integration */
|
|
5
5
|
Name: string;
|
|
6
|
-
/** @description The specification for authorizing with this
|
|
6
|
+
/** @description The specification for authorizing with this fulfillment provider */
|
|
7
7
|
AuthProcess: AuthSpecification;
|
|
8
|
-
/** @description A list of branded
|
|
8
|
+
/** @description A list of branded fulfillment providers associated with this integration */
|
|
9
9
|
FulfillmentProviders: FulfillmentProviderDefinition[];
|
|
10
10
|
};
|
|
11
11
|
/** @description Shipping service for a fulfillment provider */
|
|
12
12
|
export declare type FulfillmentServiceDefinition = {
|
|
13
|
+
/** @description This is a unique GUID identifier for this shipping service */
|
|
14
|
+
Id: string;
|
|
13
15
|
/** @description Name of the shipping service */
|
|
14
16
|
Name: string;
|
|
15
17
|
/** @description Shortened name of the shipping service */
|
|
@@ -19,7 +21,7 @@ export declare type FulfillmentServiceDefinition = {
|
|
|
19
21
|
};
|
|
20
22
|
/** @description Defined metadata for a branded fulfillment provider */
|
|
21
23
|
export declare type FulfillmentProviderDefinition = {
|
|
22
|
-
/** @description This is a unique GUID identifier for this
|
|
24
|
+
/** @description This is a unique GUID identifier for this fulfillment provider source */
|
|
23
25
|
Id: string;
|
|
24
26
|
/** @description The branded name for this fulfillment provider @example "FBA", "Shipwore" */
|
|
25
27
|
Name: string;
|
|
@@ -40,11 +42,11 @@ export declare type FulfillmentProviderDefinition = {
|
|
|
40
42
|
UiSchema: object;
|
|
41
43
|
};
|
|
42
44
|
};
|
|
43
|
-
/** @description Images that will be used for this branded
|
|
45
|
+
/** @description Images that will be used for this branded fulfillment provider */
|
|
44
46
|
Images: {
|
|
45
|
-
/** @description The full path to the logo used in modals and other areas of our platform for this
|
|
47
|
+
/** @description The full path to the logo used in modals and other areas of our platform for this fulfillment provider. Use join(__dirname, '../assets/logo.svg') @example "/dev/integration/assets/fulfillmentprovider1/logo.svg" */
|
|
46
48
|
LogoUrl: string;
|
|
47
|
-
/** @description The full path to the icon used for this
|
|
49
|
+
/** @description The full path to the icon used for this fulfillment provider. Use join(__dirname, '../assets/logo.svg') @example "/dev/integration/assets/fulfillmentprovider1/icon.svg" */
|
|
48
50
|
IconUrl: string;
|
|
49
51
|
};
|
|
50
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fulfillment-provider-app-metadata.js","sourceRoot":"","sources":["../../src/app/fulfillment-provider-app-metadata.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"fulfillment-provider-app-metadata.js","sourceRoot":"","sources":["../../src/app/fulfillment-provider-app-metadata.ts"],"names":[],"mappings":";;;AAuDA,oFAAoF;AACpF,MAAa,iBAAiB;CAsB7B;AAtBD,8CAsBC;AAED,MAAa,cAAc;CAI1B;AAJD,wCAIC;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,qCAAe,CAAA;IACf,uCAAiB,CAAA;AACnB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAED,MAAa,WAAW;CAGvB;AAHD,kCAGC;AAED,MAAa,0BAA0B;CAetC;AAfD,gEAeC;AAED,MAAa,SAAS;CAKrB;AALD,8BAKC;AAED,MAAa,kBAAkB;CAE9B;AAFD,gDAEC;AAED,MAAa,yBAAyB;CAarC;AAbD,8DAaC;AAED,MAAa,mCAAmC;CAqB/C;AArBD,kFAqBC;AAED,MAAa,qBAAqB;CAMjC;AAND,sDAMC;AAMD,MAAa,yBAAyB;CAarC;AAbD,8DAaC;AAED,MAAa,4BAA4B;CAKxC;AALD,oEAKC"}
|
|
@@ -24,8 +24,8 @@ class FulfillmentProviderApp {
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
method: internal_1.Method.POST,
|
|
27
|
-
path: '/
|
|
28
|
-
handler: handleRequest(definition.
|
|
27
|
+
path: '/get_fulfillments',
|
|
28
|
+
handler: handleRequest(definition.getFulfillments),
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
method: internal_1.Method.POST,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fulfillment-provider-app.js","sourceRoot":"","sources":["../../src/app/fulfillment-provider-app.ts"],"names":[],"mappings":";;;AACA,kCAA+C;AAC/C,yCAMoB;AAEpB,MAAM,aAAa,GAAG,CAAC,cAAwB,EAAO,EAAE;IACtD,OAAO,CAAC,OAAY,EAAE,EAAE;QACtB,OAAO,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAa,sBAAsB;IAKjC,YAAY,UAA4C;QAFxD,UAAK,GAAG,IAAI,CAAC,SAAS,CAAC,2BAAoB,CAAC,CAAC;QAG3C,IAAI,CAAC,MAAM,GAAG;YACZ;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC;aAC3C;YACD;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,uBAAuB;gBAC7B,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,mBAAmB,CAAC;aACvD;YACD;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"fulfillment-provider-app.js","sourceRoot":"","sources":["../../src/app/fulfillment-provider-app.ts"],"names":[],"mappings":";;;AACA,kCAA+C;AAC/C,yCAMoB;AAEpB,MAAM,aAAa,GAAG,CAAC,cAAwB,EAAO,EAAE;IACtD,OAAO,CAAC,OAAY,EAAE,EAAE;QACtB,OAAO,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAa,sBAAsB;IAKjC,YAAY,UAA4C;QAFxD,UAAK,GAAG,IAAI,CAAC,SAAS,CAAC,2BAAoB,CAAC,CAAC;QAG3C,IAAI,CAAC,MAAM,GAAG;YACZ;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC;aAC3C;YACD;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,uBAAuB;gBAC7B,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,mBAAmB,CAAC;aACvD;YACD;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,mBAAmB;gBACzB,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,eAAe,CAAC;aACnD;YACD;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,qBAAqB;gBAC3B,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,iBAAiB,CAAC;aACrD;YACD;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC;aAC5C;YACD;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,qBAAqB;gBAC3B,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,gBAAgB,CAAC;aACpD;YACD;gBACE,MAAM,EAAE,iBAAM,CAAC,IAAI;gBACnB,IAAI,EAAE,gBAAgB;gBACtB,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,YAAY,CAAC;aAChD;SACF,CAAC;QAEF,IAAI,CAAC,IAAI,GAAG,IAAI,8CAAmC,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACxF,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;YACrD,OAAO;gBACL,EAAE,EAAE,QAAQ,CAAC,EAAE;gBACf,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO;gBAC7B,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO;aAC9B,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAxDD,wDAwDC"}
|
package/lib/models/index.d.ts
CHANGED
package/lib/models/index.js
CHANGED
|
@@ -16,5 +16,5 @@ __exportStar(require("./auth"), exports);
|
|
|
16
16
|
__exportStar(require("./documents"), exports);
|
|
17
17
|
__exportStar(require("./errors"), exports);
|
|
18
18
|
__exportStar(require("./units"), exports);
|
|
19
|
-
__exportStar(require("./sales-order-
|
|
19
|
+
__exportStar(require("./sales-order-fulfillments"), exports);
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
package/lib/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA0B;AAC1B,iDAA+B;AAC/B,yCAAuB;AACvB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA0B;AAC1B,iDAA+B;AAC/B,yCAAuB;AACvB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,6DAA2C"}
|
|
@@ -84,4 +84,6 @@ export interface SalesOrder {
|
|
|
84
84
|
created_date_time?: string;
|
|
85
85
|
/** @description The (ISO 8601) datetime (UTC) associated with when this order was last modified @example "2021-03-31T18:21:14.858Z" */
|
|
86
86
|
modified_date_time?: string;
|
|
87
|
+
/** @description A value, specific to the order source, that indicates who is expected to fulfill the order. This value can represent whether an order will be fulfilled by seller fulfillment, merchant fulfillment or other fulfillment network. @example "SellerFulfilled" */
|
|
88
|
+
fulfillment_channel?: string;
|
|
87
89
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ShipmentNotification } from '.';
|
|
2
|
+
export declare type SalesOrderFulfillments = {
|
|
3
|
+
fulfillment_provider_order_id: string;
|
|
4
|
+
status?: ShippingStatus;
|
|
5
|
+
fulfillments?: SalesOrderFulfillment[];
|
|
6
|
+
shipments?: ShipmentNotification[];
|
|
7
|
+
};
|
|
8
|
+
export declare type SalesOrderFulfillment = {
|
|
9
|
+
status?: ShippingStatus;
|
|
10
|
+
reason?: string;
|
|
11
|
+
explanation?: string;
|
|
12
|
+
line_items: FulfillmentLineItem[];
|
|
13
|
+
};
|
|
14
|
+
export declare type FulfillmentLineItem = {
|
|
15
|
+
line_item_id?: string;
|
|
16
|
+
sku?: string;
|
|
17
|
+
quantity: number;
|
|
18
|
+
};
|
|
19
|
+
export declare type ShippingStatus = 'processing' | 'shipped' | 'cancelled' | 'rejected';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sales-order-fulfillments.js","sourceRoot":"","sources":["../../src/models/sales-order-fulfillments.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-fulfillments-request.js","sourceRoot":"","sources":["../../src/requests/get-fulfillments-request.ts"],"names":[],"mappings":""}
|
package/lib/requests/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './cancel-fulfillment-request';
|
|
|
2
2
|
export * from './connect-request';
|
|
3
3
|
export * from './delegate-fulfillment-request';
|
|
4
4
|
export * from './reconnect-request';
|
|
5
|
-
export * from './get-
|
|
5
|
+
export * from './get-fulfillments-request';
|
|
6
6
|
export * from './get-inventory-request';
|
|
7
7
|
export * from './get-rates-request';
|
|
8
8
|
export * from './get-recent-changes-request';
|
package/lib/requests/index.js
CHANGED
|
@@ -14,7 +14,7 @@ __exportStar(require("./cancel-fulfillment-request"), exports);
|
|
|
14
14
|
__exportStar(require("./connect-request"), exports);
|
|
15
15
|
__exportStar(require("./delegate-fulfillment-request"), exports);
|
|
16
16
|
__exportStar(require("./reconnect-request"), exports);
|
|
17
|
-
__exportStar(require("./get-
|
|
17
|
+
__exportStar(require("./get-fulfillments-request"), exports);
|
|
18
18
|
__exportStar(require("./get-inventory-request"), exports);
|
|
19
19
|
__exportStar(require("./get-rates-request"), exports);
|
|
20
20
|
__exportStar(require("./get-recent-changes-request"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/requests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA6C;AAC7C,oDAAkC;AAClC,iEAA+C;AAC/C,sDAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/requests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA6C;AAC7C,oDAAkC;AAClC,iEAA+C;AAC/C,sDAAoC;AACpC,6DAA2C;AAC3C,0DAAwC;AACxC,sDAAoC;AACpC,+DAA6C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SalesOrderFulfillments } from '..';
|
|
2
|
+
export declare type GetFulfillmentsResponse = SalesOrderFulfillments & {
|
|
3
|
+
error?: GetFulfillmentsError;
|
|
4
|
+
polling?: {
|
|
5
|
+
is_final_update_state?: boolean;
|
|
6
|
+
max_age_seconds?: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare type GetFulfillmentsError = {
|
|
10
|
+
code: GetFulfillmentsErrorCode;
|
|
11
|
+
};
|
|
12
|
+
export declare enum GetFulfillmentsErrorCode {
|
|
13
|
+
order_not_found = 0
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetFulfillmentsErrorCode = void 0;
|
|
4
|
+
var GetFulfillmentsErrorCode;
|
|
5
|
+
(function (GetFulfillmentsErrorCode) {
|
|
6
|
+
GetFulfillmentsErrorCode[GetFulfillmentsErrorCode["order_not_found"] = 0] = "order_not_found";
|
|
7
|
+
})(GetFulfillmentsErrorCode = exports.GetFulfillmentsErrorCode || (exports.GetFulfillmentsErrorCode = {}));
|
|
8
|
+
//# sourceMappingURL=get-fulfillments-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-fulfillments-response.js","sourceRoot":"","sources":["../../src/responses/get-fulfillments-response.ts"],"names":[],"mappings":";;;AAcA,IAAY,wBAEX;AAFD,WAAY,wBAAwB;IAClC,6FAAe,CAAA;AACjB,CAAC,EAFW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAEnC"}
|
package/lib/responses/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './cancel-fulfillment-response';
|
|
|
2
2
|
export * from './connect-response';
|
|
3
3
|
export * from './delegate-fulfillment-response';
|
|
4
4
|
export * from './reconnect-response';
|
|
5
|
-
export * from './get-
|
|
5
|
+
export * from './get-fulfillments-response';
|
|
6
6
|
export * from './get-inventory-response';
|
|
7
7
|
export * from './get-rates-response';
|
|
8
8
|
export * from './get-recent-changes-response';
|
package/lib/responses/index.js
CHANGED
|
@@ -14,7 +14,7 @@ __exportStar(require("./cancel-fulfillment-response"), exports);
|
|
|
14
14
|
__exportStar(require("./connect-response"), exports);
|
|
15
15
|
__exportStar(require("./delegate-fulfillment-response"), exports);
|
|
16
16
|
__exportStar(require("./reconnect-response"), exports);
|
|
17
|
-
__exportStar(require("./get-
|
|
17
|
+
__exportStar(require("./get-fulfillments-response"), exports);
|
|
18
18
|
__exportStar(require("./get-inventory-response"), exports);
|
|
19
19
|
__exportStar(require("./get-rates-response"), exports);
|
|
20
20
|
__exportStar(require("./get-recent-changes-response"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA8C;AAC9C,qDAAmC;AACnC,kEAAgD;AAChD,uDAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA8C;AAC9C,qDAAmC;AACnC,kEAAgD;AAChD,uDAAqC;AACrC,8DAA4C;AAC5C,2DAAyC;AACzC,uDAAqC;AACrC,gEAA8C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/connect-fulfillment-provider-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "OpenAPI specification and TypeScript definitions for the Connect Fulfillment Provider API",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|