@shapediver/sdk.platform-api-sdk-v1 2.16.8 → 2.18.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/dist/SdPlatformErrorTypeGuards.d.ts +5 -1
- package/dist/SdPlatformErrorTypeGuards.d.ts.map +1 -1
- package/dist/SdPlatformErrorTypeGuards.js +11 -1
- package/dist/SdPlatformErrorTypeGuards.js.map +1 -1
- package/dist/SdPlatformErrors.d.ts +12 -1
- package/dist/SdPlatformErrors.d.ts.map +1 -1
- package/dist/SdPlatformErrors.js +16 -2
- package/dist/SdPlatformErrors.js.map +1 -1
- package/dist/api/SdPlatformRequestId.d.ts +2 -0
- package/dist/api/SdPlatformRequestId.d.ts.map +1 -1
- package/dist/api/SdPlatformRequestId.js +2 -0
- package/dist/api/SdPlatformRequestId.js.map +1 -1
- package/dist/api/SdPlatformSdkErrorMapping.d.ts.map +1 -1
- package/dist/api/SdPlatformSdkErrorMapping.js +9 -2
- package/dist/api/SdPlatformSdkErrorMapping.js.map +1 -1
- package/dist/resources/SdPlatformWebhookApi.d.ts +36 -0
- package/dist/resources/SdPlatformWebhookApi.d.ts.map +1 -1
- package/dist/resources/SdPlatformWebhookApi.js +48 -0
- package/dist/resources/SdPlatformWebhookApi.js.map +1 -1
- package/dist/util/SdWebhookSignature.d.ts +9 -0
- package/dist/util/SdWebhookSignature.d.ts.map +1 -0
- package/dist/util/SdWebhookSignature.js +23 -0
- package/dist/util/SdWebhookSignature.js.map +1 -0
- package/dist/util/webhookSignatureCli.d.ts +3 -0
- package/dist/util/webhookSignatureCli.d.ts.map +1 -0
- package/dist/util/webhookSignatureCli.js +13 -0
- package/dist/util/webhookSignatureCli.js.map +1 -0
- package/package.json +4 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SdPlatformError, SdPlatformForbiddenResponseError, SdPlatformInvalidClientOAuthResponseError, SdPlatformInvalidGrantOAuthResponseError, SdPlatformInvalidRequestOAuthResponseError, SdPlatformNotFoundResponseError, SdPlatformOAuthResponseError, SdPlatformRequestError, SdPlatformResourceResponseError, SdPlatformResponseError, SdPlatformServerResponseError, SdPlatformUnauthorizedClientOAuthResponseError, SdPlatformUnauthorizedResponseError, SdPlatformUnsupportedGrantTypeClientOAuthResponseError, SdPlatformValidationResponseError } from "./SdPlatformErrors";
|
|
1
|
+
import { SdPlatformError, SdPlatformForbiddenResponseError, SdPlatformGeometryBackendResponseError, SdPlatformInvalidClientOAuthResponseError, SdPlatformInvalidGrantOAuthResponseError, SdPlatformInvalidRequestOAuthResponseError, SdPlatformNotFoundResponseError, SdPlatformOAuthResponseError, SdPlatformRequestError, SdPlatformResourceResponseError, SdPlatformResponseError, SdPlatformServerResponseError, SdPlatformUnauthorizedClientOAuthResponseError, SdPlatformUnauthorizedResponseError, SdPlatformUnsupportedGrantTypeClientOAuthResponseError, SdPlatformValidationResponseError } from "./SdPlatformErrors";
|
|
2
2
|
/** Type guard for all error types of the Geometry Backend SDK package. */
|
|
3
3
|
export declare function isPBError(e: any): e is (SdPlatformError & SdPlatformRequestError & SdPlatformResponseError & SdPlatformServerResponseError & SdPlatformResourceResponseError & SdPlatformNotFoundResponseError & SdPlatformForbiddenResponseError & SdPlatformUnauthorizedResponseError & SdPlatformValidationResponseError & SdPlatformOAuthResponseError & SdPlatformInvalidRequestOAuthResponseError & SdPlatformInvalidGrantOAuthResponseError & SdPlatformUnauthorizedClientOAuthResponseError & SdPlatformUnsupportedGrantTypeClientOAuthResponseError & SdPlatformInvalidClientOAuthResponseError);
|
|
4
4
|
/** Type guard for a Platform Backend SDK generic error. */
|
|
@@ -55,4 +55,8 @@ export declare function isPBUnauthorizedClientOAuthResponseError(e: any): e is S
|
|
|
55
55
|
* Type guard for a Platform Backend SDK unsupported grant type client OAuth response error.
|
|
56
56
|
*/
|
|
57
57
|
export declare function isPBUnsupportedGrantTypeClientOAuthResponseError(e: any): e is SdPlatformUnsupportedGrantTypeClientOAuthResponseError;
|
|
58
|
+
/**
|
|
59
|
+
* Type guard for a Platform Backend SDK Geometry Backend response error.
|
|
60
|
+
*/
|
|
61
|
+
export declare function isPBGeometryBackendResponseError(e: any): e is SdPlatformGeometryBackendResponseError;
|
|
58
62
|
//# sourceMappingURL=SdPlatformErrorTypeGuards.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformErrorTypeGuards.d.ts","sourceRoot":"","sources":["../src/SdPlatformErrorTypeGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gCAAgC,EAAE,yCAAyC,EAAE,wCAAwC,EAAE,0CAA0C,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,8CAA8C,EAAE,mCAAmC,EAAE,sDAAsD,EAAE,iCAAiC,EAAuB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"SdPlatformErrorTypeGuards.d.ts","sourceRoot":"","sources":["../src/SdPlatformErrorTypeGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gCAAgC,EAAE,sCAAsC,EAAE,yCAAyC,EAAE,wCAAwC,EAAE,0CAA0C,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,8CAA8C,EAAE,mCAAmC,EAAE,sDAAsD,EAAE,iCAAiC,EAAuB,MAAM,oBAAoB,CAAA;AAEpnB,0EAA0E;AAC1E,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,IAChC,CAAC,eAAe,GAAG,sBAAsB,GAAG,uBAAuB,GAC7D,6BAA6B,GAAG,+BAA+B,GAC/D,+BAA+B,GAAG,gCAAgC,GAClE,mCAAmC,GAAG,iCAAiC,GACvE,4BAA4B,GAAG,0CAA0C,GACzE,wCAAwC,GAAG,8CAA8C,GACzF,sDAAsD,GAAG,yCA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,wBAAgB,wCAAwC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,IAAI,8CAA8C,CAKpH;AAED;;GAEG;AACH,wBAAgB,gDAAgD,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,IAAI,sDAAsD,CAKpI;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,IAAI,sCAAsC,CAKpG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPBUnsupportedGrantTypeClientOAuthResponseError = exports.isPBUnauthorizedClientOAuthResponseError = exports.isPBInvalidGrantOAuthResponseError = exports.isPBInvalidClientOAuthResponseError = exports.isPBInvalidRequestOAuthResponseError = exports.isPBOAuthResponseError = exports.isPBValidationResponseError = exports.isPBUnauthorizedResponseError = exports.isPBForbiddenResponseError = exports.isPBNotFoundResponseError = exports.isPBResourceResponseError = exports.isPBServerResponseError = exports.isPBResponseError = exports.isPBRequestError = exports.isPBGenericError = exports.isPBError = void 0;
|
|
3
|
+
exports.isPBGeometryBackendResponseError = exports.isPBUnsupportedGrantTypeClientOAuthResponseError = exports.isPBUnauthorizedClientOAuthResponseError = exports.isPBInvalidGrantOAuthResponseError = exports.isPBInvalidClientOAuthResponseError = exports.isPBInvalidRequestOAuthResponseError = exports.isPBOAuthResponseError = exports.isPBValidationResponseError = exports.isPBUnauthorizedResponseError = exports.isPBForbiddenResponseError = exports.isPBNotFoundResponseError = exports.isPBResourceResponseError = exports.isPBServerResponseError = exports.isPBResponseError = exports.isPBRequestError = exports.isPBGenericError = exports.isPBError = void 0;
|
|
4
4
|
const SdPlatformErrors_1 = require("./SdPlatformErrors");
|
|
5
5
|
/** Type guard for all error types of the Geometry Backend SDK package. */
|
|
6
6
|
function isPBError(e) {
|
|
@@ -39,6 +39,7 @@ function isPBResponseError(e) {
|
|
|
39
39
|
SdPlatformErrors_1.ShapeDiverErrorType.InvalidGrantOAuthResponse,
|
|
40
40
|
SdPlatformErrors_1.ShapeDiverErrorType.UnauthorizedClientOAuthResponse,
|
|
41
41
|
SdPlatformErrors_1.ShapeDiverErrorType.UnsupportedGrantTypeClientOAuthResponse,
|
|
42
|
+
SdPlatformErrors_1.ShapeDiverErrorType.GeometryBackendResponse,
|
|
42
43
|
];
|
|
43
44
|
return e instanceof Error &&
|
|
44
45
|
"errorType" in e &&
|
|
@@ -153,4 +154,13 @@ function isPBUnsupportedGrantTypeClientOAuthResponseError(e) {
|
|
|
153
154
|
e.errorType === SdPlatformErrors_1.ShapeDiverErrorType.UnsupportedGrantTypeClientOAuthResponse;
|
|
154
155
|
}
|
|
155
156
|
exports.isPBUnsupportedGrantTypeClientOAuthResponseError = isPBUnsupportedGrantTypeClientOAuthResponseError;
|
|
157
|
+
/**
|
|
158
|
+
* Type guard for a Platform Backend SDK Geometry Backend response error.
|
|
159
|
+
*/
|
|
160
|
+
function isPBGeometryBackendResponseError(e) {
|
|
161
|
+
return e instanceof Error &&
|
|
162
|
+
"errorType" in e &&
|
|
163
|
+
e.errorType === SdPlatformErrors_1.ShapeDiverErrorType.GeometryBackendResponse;
|
|
164
|
+
}
|
|
165
|
+
exports.isPBGeometryBackendResponseError = isPBGeometryBackendResponseError;
|
|
156
166
|
//# sourceMappingURL=SdPlatformErrorTypeGuards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformErrorTypeGuards.js","sourceRoot":"","sources":["../src/SdPlatformErrorTypeGuards.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"SdPlatformErrorTypeGuards.js","sourceRoot":"","sources":["../src/SdPlatformErrorTypeGuards.ts"],"names":[],"mappings":";;;AAAA,yDAAonB;AAEpnB,0EAA0E;AAC1E,SAAgB,SAAS,CAAC,CAAM;IAS5B,OAAO,CAAC,YAAY,KAAK;QACrB,WAAW,IAAI,CAAC;QAChB,MAAM,CAAC,MAAM,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AW,IAAI,CAAC;QAChB,CAAC,CAAC,SAAS,KAAK,sCAAmB,CAAC,2BAA2B,CAAA;AACvE,CAAC;AALD,oFAKC;AAED;;GAEG;AACH,SAAgB,mCAAmC,CAAC,CAAM;IAEtD,OAAO,CAAC,YAAY,KAAK;QACrB,WAAW,IAAI,CAAC;QAChB,CAAC,CAAC,SAAS,KAAK,sCAAmB,CAAC,0BAA0B,CAAA;AACtE,CAAC;AALD,kFAKC;AAED;;GAEG;AACH,SAAgB,kCAAkC,CAAC,CAAM;IAErD,OAAO,CAAC,YAAY,KAAK;QACrB,WAAW,IAAI,CAAC;QAChB,CAAC,CAAC,SAAS,KAAK,sCAAmB,CAAC,yBAAyB,CAAA;AACrE,CAAC;AALD,gFAKC;AAED;;GAEG;AACH,SAAgB,wCAAwC,CAAC,CAAM;IAE3D,OAAO,CAAC,YAAY,KAAK;QACrB,WAAW,IAAI,CAAC;QAChB,CAAC,CAAC,SAAS,KAAK,sCAAmB,CAAC,+BAA+B,CAAC;AAC5E,CAAC;AALD,4FAKC;AAED;;GAEG;AACH,SAAgB,gDAAgD,CAAC,CAAM;IAEnE,OAAO,CAAC,YAAY,KAAK;QACrB,WAAW,IAAI,CAAC;QAChB,CAAC,CAAC,SAAS,KAAK,sCAAmB,CAAC,uCAAuC,CAAC;AACpF,CAAC;AALD,4GAKC;AAED;;GAEG;AACH,SAAgB,gCAAgC,CAAC,CAAM;IAEnD,OAAO,CAAC,YAAY,KAAK;QACrB,WAAW,IAAI,CAAC;QAChB,CAAC,CAAC,SAAS,KAAK,sCAAmB,CAAC,uBAAuB,CAAC;AACpE,CAAC;AALD,4EAKC"}
|
|
@@ -14,6 +14,7 @@ export declare const ShapeDiverErrorType: {
|
|
|
14
14
|
readonly InvalidGrantOAuthResponse: "sd_pb_sdk_invalid_grant_oauth_response";
|
|
15
15
|
readonly UnauthorizedClientOAuthResponse: "sd_pb_sdk_unauthorized_client_oauth_response";
|
|
16
16
|
readonly UnsupportedGrantTypeClientOAuthResponse: "sd_pb_sdk_unsupported_grant_type_oauth_response";
|
|
17
|
+
readonly GeometryBackendResponse: "sd_pb_sdk_gb_response";
|
|
17
18
|
};
|
|
18
19
|
export type ShapeDiverErrorType = typeof ShapeDiverErrorType[keyof typeof ShapeDiverErrorType];
|
|
19
20
|
/**
|
|
@@ -162,7 +163,17 @@ export declare class SdPlatformUnauthorizedClientOAuthResponseError extends SdPl
|
|
|
162
163
|
* Authentication response error.
|
|
163
164
|
* Follows principles of OAuth 2.0
|
|
164
165
|
* Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
|
|
165
|
-
*/
|
|
166
|
+
*/
|
|
167
|
+
export declare class SdPlatformUnsupportedGrantTypeClientOAuthResponseError extends SdPlatformOAuthResponseError {
|
|
168
|
+
readonly errorType: ShapeDiverErrorType;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Geometry backend response error forwarded by the platform backend
|
|
172
|
+
*/
|
|
173
|
+
export declare class SdPlatformGeometryBackendResponseError extends SdPlatformError {
|
|
174
|
+
readonly error: string;
|
|
175
|
+
readonly desc: string;
|
|
166
176
|
readonly errorType: ShapeDiverErrorType;
|
|
177
|
+
constructor(message: string, error: string, desc: string);
|
|
167
178
|
}
|
|
168
179
|
//# sourceMappingURL=SdPlatformErrors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformErrors.d.ts","sourceRoot":"","sources":["../src/SdPlatformErrors.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"SdPlatformErrors.d.ts","sourceRoot":"","sources":["../src/SdPlatformErrors.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;CAiBtB,CAAA;AACV,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAA;AAE9F;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IAE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AAmB,CAA8C;gBAGxF,OAAO,EAAE,MAAM,EACC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM;CAKnC"}
|
package/dist/SdPlatformErrors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SdPlatformUnsupportedGrantTypeClientOAuthResponseError = exports.SdPlatformUnauthorizedClientOAuthResponseError = exports.SdPlatformInvalidGrantOAuthResponseError = exports.SdPlatformInvalidClientOAuthResponseError = exports.SdPlatformInvalidRequestOAuthResponseError = exports.SdPlatformOAuthResponseError = exports.SdPlatformValidationResponseError = exports.SdPlatformUnauthorizedResponseError = exports.SdPlatformForbiddenResponseError = exports.SdPlatformNotFoundResponseError = exports.SdPlatformResourceResponseError = exports.SdPlatformServerResponseError = exports.SdPlatformResponseError = exports.SdPlatformRequestError = exports.SdPlatformError = exports.ShapeDiverErrorType = void 0;
|
|
3
|
+
exports.SdPlatformGeometryBackendResponseError = exports.SdPlatformUnsupportedGrantTypeClientOAuthResponseError = exports.SdPlatformUnauthorizedClientOAuthResponseError = exports.SdPlatformInvalidGrantOAuthResponseError = exports.SdPlatformInvalidClientOAuthResponseError = exports.SdPlatformInvalidRequestOAuthResponseError = exports.SdPlatformOAuthResponseError = exports.SdPlatformValidationResponseError = exports.SdPlatformUnauthorizedResponseError = exports.SdPlatformForbiddenResponseError = exports.SdPlatformNotFoundResponseError = exports.SdPlatformResourceResponseError = exports.SdPlatformServerResponseError = exports.SdPlatformResponseError = exports.SdPlatformRequestError = exports.SdPlatformError = exports.ShapeDiverErrorType = void 0;
|
|
4
4
|
exports.ShapeDiverErrorType = {
|
|
5
5
|
Generic: "sd_pb_sdk_generic",
|
|
6
6
|
Request: "sd_pb_sdk_request",
|
|
@@ -17,6 +17,7 @@ exports.ShapeDiverErrorType = {
|
|
|
17
17
|
InvalidGrantOAuthResponse: "sd_pb_sdk_invalid_grant_oauth_response",
|
|
18
18
|
UnauthorizedClientOAuthResponse: "sd_pb_sdk_unauthorized_client_oauth_response",
|
|
19
19
|
UnsupportedGrantTypeClientOAuthResponse: "sd_pb_sdk_unsupported_grant_type_oauth_response",
|
|
20
|
+
GeometryBackendResponse: "sd_pb_sdk_gb_response",
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
23
|
* Generic error
|
|
@@ -196,11 +197,24 @@ exports.SdPlatformUnauthorizedClientOAuthResponseError = SdPlatformUnauthorizedC
|
|
|
196
197
|
* Authentication response error.
|
|
197
198
|
* Follows principles of OAuth 2.0
|
|
198
199
|
* Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
|
|
199
|
-
*/
|
|
200
|
+
*/
|
|
201
|
+
class SdPlatformUnsupportedGrantTypeClientOAuthResponseError extends SdPlatformOAuthResponseError {
|
|
200
202
|
constructor() {
|
|
201
203
|
super(...arguments);
|
|
202
204
|
this.errorType = exports.ShapeDiverErrorType.UnsupportedGrantTypeClientOAuthResponse;
|
|
203
205
|
}
|
|
204
206
|
}
|
|
205
207
|
exports.SdPlatformUnsupportedGrantTypeClientOAuthResponseError = SdPlatformUnsupportedGrantTypeClientOAuthResponseError;
|
|
208
|
+
/**
|
|
209
|
+
* Geometry backend response error forwarded by the platform backend
|
|
210
|
+
*/
|
|
211
|
+
class SdPlatformGeometryBackendResponseError extends SdPlatformError {
|
|
212
|
+
constructor(message, error, desc) {
|
|
213
|
+
super(message);
|
|
214
|
+
this.error = error;
|
|
215
|
+
this.desc = desc;
|
|
216
|
+
this.errorType = exports.ShapeDiverErrorType.GeometryBackendResponse;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
exports.SdPlatformGeometryBackendResponseError = SdPlatformGeometryBackendResponseError;
|
|
206
220
|
//# sourceMappingURL=SdPlatformErrors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformErrors.js","sourceRoot":"","sources":["../src/SdPlatformErrors.ts"],"names":[],"mappings":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AA4B;IAA1F;;QAEoB,cAAS,GAAwB,2BAAmB,CAAC,yBAAyB,CAAA;IAClG,CAAC;CAAA;AAHD,4FAGC;AAED;;;;GAIG;AACH,MAAa,8CAA+C,SAAQ,4BAA4B;IAAhG;;QAEoB,cAAS,GAAwB,2BAAmB,CAAC,+BAA+B,CAAA;IACxG,CAAC;CAAA;AAHD,wGAGC;AAED;;;;GAIG;AACH,MAAa,sDAAuD,SAAQ,4BAA4B;IAAxG;;QAEoB,cAAS,GAAwB,2BAAmB,CAAC,uCAAuC,CAAA;IAChH,CAAC;CAAA;AAHD,wHAGC;AAED;;GAEG;AACH,MAAa,sCAAuC,SAAQ,eAAe;IAIvE,YACI,OAAe,EACC,KAAa,EACb,IAAY;QAE5B,KAAK,CAAC,OAAO,CAAC,CAAA;QAHE,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAQ;QALhB,cAAS,GAAwB,2BAAmB,CAAC,uBAAuB,CAAA;IAQ5F,CAAC;CAEJ;AAZD,wFAYC"}
|
|
@@ -122,6 +122,8 @@ export declare enum RequestId {
|
|
|
122
122
|
WebhookChargebeeEvent = "webhook_chargebee_event",
|
|
123
123
|
WebhookModelMessage = "webhook_model_message",
|
|
124
124
|
WebhookNotification = "webhook_notification",
|
|
125
|
+
WebhookModelComputation = "webhook_model_computation",
|
|
126
|
+
WebhookModelExport = "webhook_model_export",
|
|
125
127
|
ModelTransferRequestCreate = "model_transfer_request_create",
|
|
126
128
|
ModelTransferRequestDelete = "model_transfer_request_delete",
|
|
127
129
|
ModelTransferRequestList = "model_transfer_request_list",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformRequestId.d.ts","sourceRoot":"","sources":["../../src/api/SdPlatformRequestId.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,SAAS;IAEjB;;OAEG;IACH,aAAa,mBAAmB;IAChC,YAAY,kBAAkB;IAC9B,iBAAiB,uBAAuB;IACxC,MAAM,W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tD,+BAA+B,wCAAwC;IACvE,sBAAsB,8BAA8B;IACpD,kCAAkC,6CAA6C;IAC/E,4BAA4B,sCAAsC;IAClE,uCAAuC,oDAAoD;IAC3F,uBAAuB,+BAA+B;IACtD,8BAA8B,wCAAwC;IAEtE,qBAAqB,4BAA4B;IACjD,mBAAmB,0BAA0B;IAC7C,mBAAmB,yBAAyB;IAC5C,uBAAuB,8BAA8B;IACrD,kBAAkB,yBAAyB;IAE3C,0BAA0B,kCAAkC;IAC5D,0BAA0B,kCAAkC;IAC5D,wBAAwB,gCAAgC;IACxD,uBAAuB,+BAA+B;IACtD,0BAA0B,kCAAkC;IAC5D,wBAAwB,gCAAgC;IAExD,cAAc,oBAAoB;IAClC,aAAa,mBAAmB;IAChC,cAAc,oBAAoB;IAClC,YAAY,kBAAkB;IAC9B,gBAAgB,sBAAsB;IACtC,YAAY,kBAAkB;IAC9B,cAAc,oBAAoB;IAClC,uBAAuB,8BAA8B;IACrD,mBAAmB,0BAA0B;IAE7C,WAAW,kBAAkB;IAE7B,iBAAiB,wBAAwB;CAC5C"}
|
|
@@ -126,6 +126,8 @@ var RequestId;
|
|
|
126
126
|
RequestId["WebhookChargebeeEvent"] = "webhook_chargebee_event";
|
|
127
127
|
RequestId["WebhookModelMessage"] = "webhook_model_message";
|
|
128
128
|
RequestId["WebhookNotification"] = "webhook_notification";
|
|
129
|
+
RequestId["WebhookModelComputation"] = "webhook_model_computation";
|
|
130
|
+
RequestId["WebhookModelExport"] = "webhook_model_export";
|
|
129
131
|
RequestId["ModelTransferRequestCreate"] = "model_transfer_request_create";
|
|
130
132
|
RequestId["ModelTransferRequestDelete"] = "model_transfer_request_delete";
|
|
131
133
|
RequestId["ModelTransferRequestList"] = "model_transfer_request_list";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformRequestId.js","sourceRoot":"","sources":["../../src/api/SdPlatformRequestId.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,
|
|
1
|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IAC3F,mEAAsD,CAAA;IACtD,mFAAsE,CAAA;IAEtE,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,yDAA4C,CAAA;IAC5C,kEAAqD,CAAA;IACrD,wDAA2C,CAAA;IAE3C,yEAA4D,CAAA;IAC5D,yEAA4D,CAAA;IAC5D,qEAAwD,CAAA;IACxD,mEAAsD,CAAA;IACtD,yEAA4D,CAAA;IAC5D,qEAAwD,CAAA;IAExD,+CAAkC,CAAA;IAClC,6CAAgC,CAAA;IAChC,+CAAkC,CAAA;IAClC,2CAA8B,CAAA;IAC9B,mDAAsC,CAAA;IACtC,2CAA8B,CAAA;IAC9B,+CAAkC,CAAA;IAClC,kEAAqD,CAAA;IACrD,0DAA6C,CAAA;IAE7C,0CAA6B,CAAA;IAE7B,sDAAyC,CAAA;AAC7C,CAAC,EAxKW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAwKpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformSdkErrorMapping.d.ts","sourceRoot":"","sources":["../../src/api/SdPlatformSdkErrorMapping.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;AACxD,OACA,EACI,eAAe,
|
|
1
|
+
{"version":3,"file":"SdPlatformSdkErrorMapping.d.ts","sourceRoot":"","sources":["../../src/api/SdPlatformSdkErrorMapping.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;AACxD,OACA,EACI,eAAe,EAelB,MAAM,qBAAqB,CAAA;AAwE5B;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,GAAG,eAAe,CAuJxE"}
|
|
@@ -10,16 +10,19 @@ function isOAuthResponseError(response) {
|
|
|
10
10
|
return ("error" in response) && ("error_description" in response);
|
|
11
11
|
}
|
|
12
12
|
function isResourceResponseError(response) {
|
|
13
|
-
return ("error" in response) && ("message" in response.error);
|
|
13
|
+
return ("error" in response) && (typeof response.error === "object") && ("message" in response.error);
|
|
14
14
|
}
|
|
15
15
|
function isValidationError(response) {
|
|
16
16
|
return isResourceResponseError(response) && ("fields" in response.error);
|
|
17
17
|
}
|
|
18
|
+
function isGeometryBackendResponseError(response) {
|
|
19
|
+
return ("error" in response) && ("desc" in response);
|
|
20
|
+
}
|
|
18
21
|
/**
|
|
19
22
|
* Maps the given error into a ShapeDiver API response error object.
|
|
20
23
|
*/
|
|
21
24
|
function mapToApiError(error) {
|
|
22
|
-
var _a, _b;
|
|
25
|
+
var _a, _b, _c, _d, _e;
|
|
23
26
|
// Handle basic non-axios errors
|
|
24
27
|
if (!axios_1.default.isAxiosError(error))
|
|
25
28
|
return new SdPlatformErrors_1.SdPlatformError(error.message);
|
|
@@ -28,6 +31,7 @@ function mapToApiError(error) {
|
|
|
28
31
|
// Request was made and server responded with 4xx or 5xx
|
|
29
32
|
let data = axiosError.response.data;
|
|
30
33
|
if (axiosError.response.status >= 500) {
|
|
34
|
+
// TODO Alex: shouldn't it be data?.message here?
|
|
31
35
|
return new SdPlatformErrors_1.SdPlatformServerResponseError((_b = (_a = data === null || data === void 0 ? void 0 : data.error) === null || _a === void 0 ? void 0 : _a.message) !== null && _b !== void 0 ? _b : "Server Error.", axiosError.response.status);
|
|
32
36
|
}
|
|
33
37
|
else if (data && isOAuthResponseError(data)) {
|
|
@@ -63,6 +67,9 @@ function mapToApiError(error) {
|
|
|
63
67
|
return new SdPlatformErrors_1.SdPlatformResourceResponseError(`${data.error.message}. ${data.error.description}.`, axiosError.response.status, data.error.message, data.error.description, data.error.href, data.error.code);
|
|
64
68
|
}
|
|
65
69
|
}
|
|
70
|
+
else if (data && isGeometryBackendResponseError(data)) {
|
|
71
|
+
return new SdPlatformErrors_1.SdPlatformGeometryBackendResponseError(data.message || (data.desc || ((_c = data.error) !== null && _c !== void 0 ? _c : "")), (_d = data.error) !== null && _d !== void 0 ? _d : "", (_e = data.desc) !== null && _e !== void 0 ? _e : "");
|
|
72
|
+
}
|
|
66
73
|
else {
|
|
67
74
|
// Response was made but an unknown error object was received
|
|
68
75
|
return new SdPlatformErrors_1.SdPlatformError("");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformSdkErrorMapping.js","sourceRoot":"","sources":["../../src/api/SdPlatformSdkErrorMapping.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"SdPlatformSdkErrorMapping.js","sourceRoot":"","sources":["../../src/api/SdPlatformSdkErrorMapping.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAwD;AACxD,0DAiB4B;AAmD5B,SAAS,oBAAoB,CAAC,QAAa;IAEvC,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,mBAAmB,IAAI,QAAQ,CAAC,CAAA;AACrE,CAAC;AAED,SAAS,uBAAuB,CAAC,QAAa;IAE1C,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,CAAE,IAAI,CAAC,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC1G,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAa;IAEpC,OAAO,uBAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,8BAA8B,CAAC,QAAa;IAEjD,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,CAAA;AACxD,CAAC;AAGD;;GAEG;AACH,SAAgB,aAAa,CAAC,KAAyB;;IAGnD,gCAAgC;IAChC,IAAI,CAAC,eAAK,CAAC,YAAY,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,kCAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAE1E,MAAM,UAAU,GAAe,KAAK,CAAA;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AAC,KAAK,CAAC,IAAI,EACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAClB,CAAA;aACR;SAEJ;aACI,IAAI,IAAI,IAAI,8BAA8B,CAAC,IAAI,CAAC,EACrD;YACI,OAAO,IAAI,yDAAsC,CAC7C,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,EACjD,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,EAChB,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,CAClB,CAAA;SACJ;aAED;YACI,6DAA6D;YAC7D,OAAO,IAAI,kCAAe,CAAC,EAAE,CAAC,CAAA;SACjC;KACJ;SAAM,IAAI,UAAU,CAAC,OAAO,EAC7B;QACI,qDAAqD;QACrD,4CAA4C;QAC5C,qFAAqF;QACrF,iCAAiC;QACjC,OAAO,IAAI,yCAAsB,CAAC,yBAAyB,EAAE,oDAAoD,CAAC,CAAA;KACrH;SACD;QACI,uEAAuE;QACvE,OAAO,IAAI,kCAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KAC5C;AACL,CAAC;AAvJD,sCAuJC"}
|
|
@@ -2,6 +2,7 @@ import { SdPlatformSdkApi, SdPlatformSdkRequestConfig } from "../api/SdPlatformS
|
|
|
2
2
|
import { SdPlatformSdkContext } from "../SdPlatformSdkContext";
|
|
3
3
|
import { SdPlatformRequestWebhookChargebeeEvent, SdPlatformRequestWebhookModelMessage, SdPlatformRequestWebhookNotification, SdPlatformResponseNotification } from "@shapediver/api.platform-api-dto-v1";
|
|
4
4
|
import { SdPlatformPostResponse } from "@shapediver/api.platform-api-dto-v1";
|
|
5
|
+
import { ShapeDiverResponseDto } from "@shapediver/api.geometry-api-dto-v2";
|
|
5
6
|
export interface SdPlatformWebhookBasicAuth {
|
|
6
7
|
username: string;
|
|
7
8
|
password: string;
|
|
@@ -49,5 +50,40 @@ export declare class SdPlatformWebhookApi {
|
|
|
49
50
|
* @returns
|
|
50
51
|
*/
|
|
51
52
|
notification(auth: SdPlatformWebhookTokenAuth, body: SdPlatformRequestWebhookNotification): Promise<SdPlatformPostResponse<SdPlatformResponseNotification>>;
|
|
53
|
+
/**
|
|
54
|
+
* Model computation webhook call - trigger a computation on a model.
|
|
55
|
+
* @param identifier - the webhook identifier of a user
|
|
56
|
+
* @param secret - the webhook secret of a user
|
|
57
|
+
* @param modelSlug - the slug of the model
|
|
58
|
+
* @param body - the body of the request, usually key value pair of model parameters
|
|
59
|
+
*
|
|
60
|
+
* {@link https://app.shapediver.com/api/documentation#/webhooks/630563fd0538d167bea7e9ddfa96be3c See Webhook Documentation}
|
|
61
|
+
*
|
|
62
|
+
* Mapping of parameters:
|
|
63
|
+
* - if the parameter’s displayname or name is “payload”, complete request body is used as a JSON string for this parameter.
|
|
64
|
+
* - if property of the request body name matches the parameter id, value of the property is used.
|
|
65
|
+
* - if parameter has "displayname" and body has property with the same name, value of the property is used. If parameter name contains dots, searched for corresponding nested property.
|
|
66
|
+
* - if parameter has "name" and body has property with the same name, value of the property is used. If parameter name contains dots, searched for corresponding nested property.
|
|
67
|
+
* - if no matching property is found by previous case, parameter from the request body is ignored.
|
|
68
|
+
*/
|
|
69
|
+
modelComputation(identifier: string, secret: string, modelSlug: string, body: object): Promise<ShapeDiverResponseDto>;
|
|
70
|
+
/**
|
|
71
|
+
* Model export webhook call - trigger an export on a model.
|
|
72
|
+
* @param identifier - the webhook identifier of a user
|
|
73
|
+
* @param secret - the webhook secret of a user
|
|
74
|
+
* @param modelSlug - the slug of the model
|
|
75
|
+
* @param exportId - the id of the export
|
|
76
|
+
* @param body - the body of the request, usually key value pair of model parameters
|
|
77
|
+
*
|
|
78
|
+
* {@link https://app.shapediver.com/api/documentation#/webhooks/630563fd0538d167bea7e9ddfa96be3c See Webhook Documentation}
|
|
79
|
+
*
|
|
80
|
+
* Mapping of parameters:
|
|
81
|
+
* - if the parameter’s displayname or name is “payload”, complete request body is used as a JSON string for this parameter.
|
|
82
|
+
* - if property of the request body name matches the parameter id, value of the property is used.
|
|
83
|
+
* - if parameter has "displayname" and body has property with the same name, value of the property is used. If parameter name contains dots, searched for corresponding nested property.
|
|
84
|
+
* - if parameter has "name" and body has property with the same name, value of the property is used. If parameter name contains dots, searched for corresponding nested property.
|
|
85
|
+
* - if no matching property is found by previous case, parameter from the request body is ignored.
|
|
86
|
+
*/
|
|
87
|
+
modelExport(identifier: string, secret: string, modelSlug: string, exportId: string, body: object): Promise<ShapeDiverResponseDto>;
|
|
52
88
|
}
|
|
53
89
|
//# sourceMappingURL=SdPlatformWebhookApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformWebhookApi.d.ts","sourceRoot":"","sources":["../../src/resources/SdPlatformWebhookApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,sCAAsC,EAAE,oCAAoC,EAAE,oCAAoC,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAA;AACxM,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"SdPlatformWebhookApi.d.ts","sourceRoot":"","sources":["../../src/resources/SdPlatformWebhookApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,sCAAsC,EAAE,oCAAoC,EAAE,oCAAoC,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAA;AACxM,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAG3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MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAW5H;;;;;;;;;;;;;;;;OAgBG;IACI,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAW5I"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SdPlatformWebhookApi = void 0;
|
|
4
4
|
const SdPlatformRequestId_1 = require("../api/SdPlatformRequestId");
|
|
5
|
+
const SdWebhookSignature_1 = require("../util/SdWebhookSignature");
|
|
5
6
|
/**
|
|
6
7
|
* Webhook calls.
|
|
7
8
|
*/
|
|
@@ -62,6 +63,53 @@ class SdPlatformWebhookApi {
|
|
|
62
63
|
basic_access_token: auth.basic_access_token,
|
|
63
64
|
}));
|
|
64
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Model computation webhook call - trigger a computation on a model.
|
|
68
|
+
* @param identifier - the webhook identifier of a user
|
|
69
|
+
* @param secret - the webhook secret of a user
|
|
70
|
+
* @param modelSlug - the slug of the model
|
|
71
|
+
* @param body - the body of the request, usually key value pair of model parameters
|
|
72
|
+
*
|
|
73
|
+
* {@link https://app.shapediver.com/api/documentation#/webhooks/630563fd0538d167bea7e9ddfa96be3c See Webhook Documentation}
|
|
74
|
+
*
|
|
75
|
+
* Mapping of parameters:
|
|
76
|
+
* - if the parameter’s displayname or name is “payload”, complete request body is used as a JSON string for this parameter.
|
|
77
|
+
* - if property of the request body name matches the parameter id, value of the property is used.
|
|
78
|
+
* - if parameter has "displayname" and body has property with the same name, value of the property is used. If parameter name contains dots, searched for corresponding nested property.
|
|
79
|
+
* - if parameter has "name" and body has property with the same name, value of the property is used. If parameter name contains dots, searched for corresponding nested property.
|
|
80
|
+
* - if no matching property is found by previous case, parameter from the request body is ignored.
|
|
81
|
+
*/
|
|
82
|
+
modelComputation(identifier, secret, modelSlug, body) {
|
|
83
|
+
var path = this.__getPath(`${identifier}/${modelSlug}/output`);
|
|
84
|
+
const header = (0, SdWebhookSignature_1.createWebhookSignature)(secret, body);
|
|
85
|
+
return this.__api.post(SdPlatformRequestId_1.RequestId.WebhookModelComputation, path, body, this.__resolveRequestConfig({}), {
|
|
86
|
+
"X-WEBHOOK-SIGNATURE": header
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Model export webhook call - trigger an export on a model.
|
|
91
|
+
* @param identifier - the webhook identifier of a user
|
|
92
|
+
* @param secret - the webhook secret of a user
|
|
93
|
+
* @param modelSlug - the slug of the model
|
|
94
|
+
* @param exportId - the id of the export
|
|
95
|
+
* @param body - the body of the request, usually key value pair of model parameters
|
|
96
|
+
*
|
|
97
|
+
* {@link https://app.shapediver.com/api/documentation#/webhooks/630563fd0538d167bea7e9ddfa96be3c See Webhook Documentation}
|
|
98
|
+
*
|
|
99
|
+
* Mapping of parameters:
|
|
100
|
+
* - if the parameter’s displayname or name is “payload”, complete request body is used as a JSON string for this parameter.
|
|
101
|
+
* - if property of the request body name matches the parameter id, value of the property is used.
|
|
102
|
+
* - if parameter has "displayname" and body has property with the same name, value of the property is used. If parameter name contains dots, searched for corresponding nested property.
|
|
103
|
+
* - if parameter has "name" and body has property with the same name, value of the property is used. If parameter name contains dots, searched for corresponding nested property.
|
|
104
|
+
* - if no matching property is found by previous case, parameter from the request body is ignored.
|
|
105
|
+
*/
|
|
106
|
+
modelExport(identifier, secret, modelSlug, exportId, body) {
|
|
107
|
+
var path = this.__getPath(`${identifier}/${modelSlug}/export/${exportId}`);
|
|
108
|
+
const header = (0, SdWebhookSignature_1.createWebhookSignature)(secret, body);
|
|
109
|
+
return this.__api.post(SdPlatformRequestId_1.RequestId.WebhookModelExport, path, body, this.__resolveRequestConfig({}), {
|
|
110
|
+
"X-WEBHOOK-SIGNATURE": header
|
|
111
|
+
});
|
|
112
|
+
}
|
|
65
113
|
}
|
|
66
114
|
exports.SdPlatformWebhookApi = SdPlatformWebhookApi;
|
|
67
115
|
//# sourceMappingURL=SdPlatformWebhookApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdPlatformWebhookApi.js","sourceRoot":"","sources":["../../src/resources/SdPlatformWebhookApi.ts"],"names":[],"mappings":";;;AACA,oEAAuD;
|
|
1
|
+
{"version":3,"file":"SdPlatformWebhookApi.js","sourceRoot":"","sources":["../../src/resources/SdPlatformWebhookApi.ts"],"names":[],"mappings":";;;AACA,oEAAuD;AAKvD,mEAAoE;AAcpE;;GAEG;AACH,MAAa,oBAAoB;IAK7B;;OAEG;IACH,YAAsB,SAA+B;QAA/B,cAAS,GAAT,SAAS,CAAsB;QAN3C,iBAAY,GAAW,YAAY,CAAC;QAQ1C,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC;IAC/B,CAAC;IAES,SAAS,CAAC,YAA2B,IAAI;QAE/C,OAAO,GAAG,IAAI,CAAC,YAAY,IAAI,SAAS,EAAE,CAAC;IAC/C,CAAC;IAES,sBAAsB,CAAC,OAA4G;QAEzI,OAAO;YACH,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,YAAY,EAAE,OAAO,CAAC,mBAAmB;YACzC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;YAC9C,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ;SAC5C,CAAA;IACL,CAAC;IAED;;;;;OAKG;IACI,cAAc,CAAC,IAAgC,EAAE,IAA4C;QAEhG,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,+BAAS,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAC;YACzH,QAAQ,EAAE,IAAI,CAAC,QAAQ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AW,CAAC,UAAkB,EAAE,MAAc,EAAE,SAAiB,EAAE,QAAgB,EAAE,IAAY;QAEpG,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,UAAU,IAAI,SAAS,WAAW,QAAQ,EAAE,CAAC,CAAC;QAE3E,MAAM,MAAM,GAAG,IAAA,2CAAsB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAEpD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,+BAAS,CAAC,kBAAkB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAE;YAC9F,qBAAqB,EAAG,MAAM;SACjC,CAAC,CAAC;IACP,CAAC;CAEJ;AA9HD,oDA8HC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computes the value to be used for the X-WEBHOOK-SIGNATURE header for webhook calls.
|
|
3
|
+
* See https://shapediver.atlassian.net/wiki/spaces/SS/pages/2184839185/Platform+Backend+-+Webhook+receivers#Verification-of-request-body
|
|
4
|
+
* @param secret
|
|
5
|
+
* @param body
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function createWebhookSignature(secret: string, body: any): string;
|
|
9
|
+
//# sourceMappingURL=SdWebhookSignature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SdWebhookSignature.d.ts","sourceRoot":"","sources":["../../src/util/SdWebhookSignature.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,UAQ/D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createWebhookSignature = void 0;
|
|
7
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
8
|
+
/**
|
|
9
|
+
* Computes the value to be used for the X-WEBHOOK-SIGNATURE header for webhook calls.
|
|
10
|
+
* See https://shapediver.atlassian.net/wiki/spaces/SS/pages/2184839185/Platform+Backend+-+Webhook+receivers#Verification-of-request-body
|
|
11
|
+
* @param secret
|
|
12
|
+
* @param body
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
function createWebhookSignature(secret, body) {
|
|
16
|
+
const hmac = crypto_1.default.createHmac('sha256', Buffer.from(secret, 'utf-8'));
|
|
17
|
+
const json = JSON.stringify(body);
|
|
18
|
+
hmac.update(Buffer.from(json, 'utf-8'));
|
|
19
|
+
const hashBytes = hmac.digest();
|
|
20
|
+
return hashBytes.toString('hex').toLowerCase();
|
|
21
|
+
}
|
|
22
|
+
exports.createWebhookSignature = createWebhookSignature;
|
|
23
|
+
//# sourceMappingURL=SdWebhookSignature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SdWebhookSignature.js","sourceRoot":"","sources":["../../src/util/SdWebhookSignature.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B;;;;;;GAMG;AACH,SAAgB,sBAAsB,CAAC,MAAc,EAAE,IAAS;IAC5D,MAAM,IAAI,GAAG,gBAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACvE,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAElC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAEhC,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACnD,CAAC;AARD,wDAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhookSignatureCli.d.ts","sourceRoot":"","sources":["../../src/util/webhookSignatureCli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env ../../node_modules/.bin/ts-node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const SdWebhookSignature_1 = require("./SdWebhookSignature");
|
|
5
|
+
if (process.argv.length !== 4) {
|
|
6
|
+
console.error('Usage: webhookSignatureCli.ts SECRET BODY');
|
|
7
|
+
process.exit(1);
|
|
8
|
+
}
|
|
9
|
+
const secret = process.argv[2];
|
|
10
|
+
const body = JSON.parse(process.argv[3]);
|
|
11
|
+
const header = (0, SdWebhookSignature_1.createWebhookSignature)(secret, body);
|
|
12
|
+
console.log(`X-WEBHOOK-SIGNATURE: ${header}`);
|
|
13
|
+
//# sourceMappingURL=webhookSignatureCli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhookSignatureCli.js","sourceRoot":"","sources":["../../src/util/webhookSignatureCli.ts"],"names":[],"mappings":";;;AAEA,6DAA8D;AAE9D,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;IAC3B,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACnB;AAED,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzC,MAAM,MAAM,GAAG,IAAA,2CAAsB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAEpD,OAAO,CAAC,GAAG,CAAC,wBAAwB,MAAM,EAAE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/sdk.platform-api-sdk-v1",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.2",
|
|
4
4
|
"description": "SDK to communicate with the Platform API version 1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shapediver",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"post-publish": "bash ../../scripts/post-publish.sh"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@shapediver/api.platform-api-dto-v1": "~2.
|
|
41
|
+
"@shapediver/api.platform-api-dto-v1": "~2.18.2",
|
|
42
|
+
"@shapediver/api.geometry-api-dto-v2": "~1.11.0",
|
|
42
43
|
"axios": "^0.26.1",
|
|
43
44
|
"jwt-decode": "~3.1.2"
|
|
44
45
|
},
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"dotenv": "~16.0.3",
|
|
48
49
|
"jest": "~27.5.1",
|
|
49
50
|
"lerna": "^6.6.2",
|
|
51
|
+
"ts-node": "~10.9.1",
|
|
50
52
|
"typescript": "~4.9.5"
|
|
51
53
|
},
|
|
52
54
|
"gitHead": "bbc446830cacb0aae7847fcc4438e0fbcc04865e"
|