@shipengine/connect-fulfillment-provider-api 0.8.0 → 4.0.0-beta.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/build-app-deployment.d.ts +3 -0
- package/lib/app/build-app-deployment.js +11 -0
- package/lib/app/build-app-deployment.js.map +1 -0
- package/lib/app/create-endpoint-mapping.d.ts +3 -0
- package/lib/app/create-endpoint-mapping.js +15 -0
- package/lib/app/create-endpoint-mapping.js.map +1 -0
- package/lib/app/fulfillment-provider-app-definition.d.ts +1 -1
- package/lib/app/fulfillment-provider-app-metadata.d.ts +5 -5
- package/lib/app/index.d.ts +2 -1
- package/lib/app/index.js +7 -2
- package/lib/app/index.js.map +1 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/models/auth.d.ts +1 -1
- package/lib/models/carrier/addresses/index.js +5 -1
- package/lib/models/carrier/addresses/index.js.map +1 -1
- package/lib/models/carrier/billing/index.js +5 -1
- package/lib/models/carrier/billing/index.js.map +1 -1
- package/lib/models/carrier/customs/index.js +5 -1
- package/lib/models/carrier/customs/index.js.map +1 -1
- package/lib/models/carrier/fulfillment-plans/index.js +5 -1
- package/lib/models/carrier/fulfillment-plans/index.js.map +1 -1
- package/lib/models/carrier/index.js +5 -1
- package/lib/models/carrier/index.js.map +1 -1
- package/lib/models/carrier/labels/index.js +5 -1
- package/lib/models/carrier/labels/index.js.map +1 -1
- package/lib/models/carrier/manifests/index.js +5 -1
- package/lib/models/carrier/manifests/index.js.map +1 -1
- package/lib/models/carrier/pickup/index.js +5 -1
- package/lib/models/carrier/pickup/index.js.map +1 -1
- package/lib/models/carrier/rates/index.js +5 -1
- package/lib/models/carrier/rates/index.js.map +1 -1
- package/lib/models/carrier/taxes/index.js +5 -1
- package/lib/models/carrier/taxes/index.js.map +1 -1
- package/lib/models/documents/index.js +5 -1
- package/lib/models/documents/index.js.map +1 -1
- package/lib/models/error.d.ts +1 -1
- package/lib/models/errors/index.js +5 -1
- package/lib/models/errors/index.js.map +1 -1
- package/lib/models/index.js +5 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/order-source/index.js +5 -1
- package/lib/models/order-source/index.js.map +1 -1
- package/lib/models/sales-order-fulfillments.d.ts +4 -4
- package/lib/models/units/index.js +5 -1
- package/lib/models/units/index.js.map +1 -1
- package/lib/requests/cancel-fulfillment-request.d.ts +1 -1
- package/lib/requests/connect-request.d.ts +1 -1
- package/lib/requests/delegate-fulfillment-request.d.ts +1 -2
- package/lib/requests/get-fulfillments-request.d.ts +1 -1
- package/lib/requests/get-inventory-request.d.ts +1 -1
- package/lib/requests/get-recent-changes-request.d.ts +1 -1
- package/lib/requests/index.js +5 -1
- package/lib/requests/index.js.map +1 -1
- package/lib/requests/reconnect-request.d.ts +1 -1
- package/lib/responses/cancel-fulfillment-response.d.ts +1 -1
- package/lib/responses/connect-response.d.ts +3 -3
- package/lib/responses/delegate-fulfillment-response.d.ts +1 -1
- package/lib/responses/get-fulfillments-response.d.ts +3 -3
- package/lib/responses/get-inventory-response.d.ts +2 -2
- package/lib/responses/get-recent-changes-response.d.ts +1 -1
- package/lib/responses/index.js +5 -1
- package/lib/responses/index.js.map +1 -1
- package/lib/responses/reconnect-response.d.ts +1 -1
- package/package.json +8 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/app/fulfillment-provider-app.d.ts +0 -9
- package/lib/app/fulfillment-provider-app.js +0 -64
- package/lib/app/fulfillment-provider-app.js.map +0 -1
- package/lib/app/internal/branded-images.d.ts +0 -9
- package/lib/app/internal/branded-images.js +0 -3
- package/lib/app/internal/branded-images.js.map +0 -1
- package/lib/app/internal/connect-runtime-app.d.ts +0 -12
- package/lib/app/internal/connect-runtime-app.js +0 -3
- package/lib/app/internal/connect-runtime-app.js.map +0 -1
- package/lib/app/internal/index.d.ts +0 -5
- package/lib/app/internal/index.js +0 -18
- package/lib/app/internal/index.js.map +0 -1
- package/lib/app/internal/metadata.d.ts +0 -12
- package/lib/app/internal/metadata.js +0 -29
- package/lib/app/internal/metadata.js.map +0 -1
- package/lib/app/internal/method.d.ts +0 -7
- package/lib/app/internal/method.js +0 -12
- package/lib/app/internal/method.js.map +0 -1
- package/lib/app/internal/route.d.ts +0 -6
- package/lib/app/internal/route.js +0 -3
- package/lib/app/internal/route.js.map +0 -1
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FulfillmentProviderApp = void 0;
|
|
4
|
-
const spec_1 = require("../spec");
|
|
5
|
-
const internal_1 = require("./internal");
|
|
6
|
-
const handleRequest = (implementation) => {
|
|
7
|
-
return (request) => {
|
|
8
|
-
return implementation(request.body);
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
class FulfillmentProviderApp {
|
|
12
|
-
constructor(definition) {
|
|
13
|
-
this.redoc = JSON.stringify(spec_1.OpenApiSpecification);
|
|
14
|
-
this.routes = [
|
|
15
|
-
{
|
|
16
|
-
method: internal_1.Method.POST,
|
|
17
|
-
path: '/connect',
|
|
18
|
-
handler: handleRequest(definition.connect),
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
method: internal_1.Method.POST,
|
|
22
|
-
path: '/delegate_fulfillment',
|
|
23
|
-
handler: handleRequest(definition.delegateFulfillment),
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
method: internal_1.Method.POST,
|
|
27
|
-
path: '/get_fulfillments',
|
|
28
|
-
handler: handleRequest(definition.getFulfillments),
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
method: internal_1.Method.POST,
|
|
32
|
-
path: '/cancel_fulfillment',
|
|
33
|
-
handler: handleRequest(definition.cancelFulfillment),
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
method: internal_1.Method.POST,
|
|
37
|
-
path: '/get_rates',
|
|
38
|
-
handler: handleRequest(definition.getRates),
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
method: internal_1.Method.POST,
|
|
42
|
-
path: '/get_recent_changes',
|
|
43
|
-
handler: handleRequest(definition.getRecentChanges),
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
method: internal_1.Method.POST,
|
|
47
|
-
path: '/get_inventory',
|
|
48
|
-
handler: handleRequest(definition.getInventory),
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
this.data = new internal_1.FulfillmentProviderAppSpecification(definition.metadata, this.routes);
|
|
52
|
-
}
|
|
53
|
-
getImages() {
|
|
54
|
-
return this.data.FulfillmentProviders.map((provider) => {
|
|
55
|
-
return {
|
|
56
|
-
id: provider.Id,
|
|
57
|
-
logo: provider.Images.LogoUrl,
|
|
58
|
-
icon: provider.Images.IconUrl,
|
|
59
|
-
};
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.FulfillmentProviderApp = FulfillmentProviderApp;
|
|
64
|
-
//# sourceMappingURL=fulfillment-provider-app.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,iBAA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+0,0 @@
|
|
|
1
|
-
/** @description This contains the logo and icon for an individual branded entity */
|
|
2
|
-
export interface BrandedImages {
|
|
3
|
-
/** @description The id associated with the branded item (typically the carrier id, or ordersource id) */
|
|
4
|
-
id: string;
|
|
5
|
-
/** @description The full path to the logo file */
|
|
6
|
-
logo: string;
|
|
7
|
-
/** @description The full path to the icon file */
|
|
8
|
-
icon: string;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"branded-images.js","sourceRoot":"","sources":["../../../src/app/internal/branded-images.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BrandedImages, Route } from '.';
|
|
2
|
-
/** @description This exposes the base needs for an app to be successful in the generic connect runtime */
|
|
3
|
-
export interface ConnectRuntimeApp {
|
|
4
|
-
/** @description The routes your application should expose */
|
|
5
|
-
routes: Route[];
|
|
6
|
-
/** @description The metadata associated with your application */
|
|
7
|
-
data: any;
|
|
8
|
-
/** @description A method that returns an array of images associated with branded entities within your app */
|
|
9
|
-
getImages: () => BrandedImages[];
|
|
10
|
-
/** @description String containing yaml file to display with redoc */
|
|
11
|
-
redoc?: string;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-runtime-app.js","sourceRoot":"","sources":["../../../src/app/internal/connect-runtime-app.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./connect-runtime-app"), exports);
|
|
14
|
-
__exportStar(require("./branded-images"), exports);
|
|
15
|
-
__exportStar(require("./method"), exports);
|
|
16
|
-
__exportStar(require("./route"), exports);
|
|
17
|
-
__exportStar(require("./metadata"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/internal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAsC;AACtC,mDAAiC;AACjC,2CAAyB;AACzB,0CAAwB;AACxB,6CAA2B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Route } from '.';
|
|
2
|
-
import { FulfillmentProviderAppMetadata, Connector } from '..';
|
|
3
|
-
import { AuthSpecification, FulfillmentProviderDefinition } from '../fulfillment-provider-app-metadata';
|
|
4
|
-
export declare class FulfillmentProviderAppSpecification implements FulfillmentProviderAppMetadata {
|
|
5
|
-
constructor(metadata: FulfillmentProviderAppMetadata, routes: Route[]);
|
|
6
|
-
AuthProcess: AuthSpecification;
|
|
7
|
-
Id: string;
|
|
8
|
-
Name: string;
|
|
9
|
-
FulfillmentProviders: FulfillmentProviderDefinition[];
|
|
10
|
-
/** @description Internal information about the connector */
|
|
11
|
-
Connector: Connector;
|
|
12
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FulfillmentProviderAppSpecification = void 0;
|
|
4
|
-
class FulfillmentProviderAppSpecification {
|
|
5
|
-
constructor(metadata, routes) {
|
|
6
|
-
this.Id = metadata.Id;
|
|
7
|
-
this.Name = metadata.Name;
|
|
8
|
-
this.FulfillmentProviders = metadata.FulfillmentProviders;
|
|
9
|
-
this.AuthProcess = metadata.AuthProcess;
|
|
10
|
-
this.AuthProcess.Identifier.Version = '2.0';
|
|
11
|
-
this.Connector = {
|
|
12
|
-
DiagnosticRoutes: {
|
|
13
|
-
Liveness: '/diagnostics/liveness',
|
|
14
|
-
Readiness: '/diagnostics/readiness',
|
|
15
|
-
Version: '/diagnostics/version',
|
|
16
|
-
},
|
|
17
|
-
ApiVersion: '2.0.0',
|
|
18
|
-
Functions: routes.map(mapRoutes),
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.FulfillmentProviderAppSpecification = FulfillmentProviderAppSpecification;
|
|
23
|
-
const mapRoutes = (route) => {
|
|
24
|
-
return {
|
|
25
|
-
Name: route.path.replace('/', ''),
|
|
26
|
-
IsSandboxed: false,
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=metadata.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/app/internal/metadata.ts"],"names":[],"mappings":";;;AAOA,MAAa,mCAAmC;IAC9C,YAAY,QAAwC,EAAE,MAAe;QACnE,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;QAC1D,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;QACxC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC;QAE5C,IAAI,CAAC,SAAS,GAAG;YACf,gBAAgB,EAAE;gBAChB,QAAQ,EAAE,uBAAuB;gBACjC,SAAS,EAAE,wBAAwB;gBACnC,OAAO,EAAE,sBAAsB;aAChC;YACD,UAAU,EAAE,OAAO;YACnB,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;SACjC,CAAC;IACJ,CAAC;CAQF;AAzBD,kFAyBC;AAED,MAAM,SAAS,GAAG,CAAC,KAAY,EAAyB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QACjC,WAAW,EAAE,KAAK;KACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Method = void 0;
|
|
4
|
-
var Method;
|
|
5
|
-
(function (Method) {
|
|
6
|
-
Method["POST"] = "post";
|
|
7
|
-
Method["GET"] = "get";
|
|
8
|
-
Method["PUT"] = "put";
|
|
9
|
-
Method["PATCH"] = "patch";
|
|
10
|
-
Method["DELETE"] = "delete";
|
|
11
|
-
})(Method = exports.Method || (exports.Method = {}));
|
|
12
|
-
//# sourceMappingURL=method.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"method.js","sourceRoot":"","sources":["../../../src/app/internal/method.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAMX;AAND,WAAY,MAAM;IAChB,uBAAa,CAAA;IACb,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,yBAAe,CAAA;IACf,2BAAiB,CAAA;AACnB,CAAC,EANW,MAAM,GAAN,cAAM,KAAN,cAAM,QAMjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/app/internal/route.ts"],"names":[],"mappings":""}
|