@shapediver/sdk.platform-api-sdk-v1 2.9.3 → 2.9.14

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/README.md CHANGED
@@ -10,10 +10,10 @@
10
10
  # ShapeDiver Platform SDK
11
11
  [ShapeDiver](https://www.shapediver.com/) is a cloud platform that provides the right tools and scalable infrastructure to help you transform your Grasshopper files into online applications. It allows you to share the power of Grasshopper and Parametric Design with partners, clients and other key stakeholders wherever they are.
12
12
 
13
- The **ShapeDiver Platform SDK** allows to access the functionality of the [ShapeDiver Platform](https://www.shapediver.com/app/) (or white labelled instances of it) by means of the [ShapeDiver Platform API](https://app.shapediver.com/api/documentation).
13
+ The **ShapeDiver Platform SDK** allows to access the functionality of the [ShapeDiver Platform](https://www.shapediver.com/app/) (or white labelled instances of it) by means of the [ShapeDiver Platform API](https://help.shapediver.com/doc/platform-backend).
14
14
  The SDK exposes all TypeScript-types describing request and response objects.
15
15
 
16
- The authentication system is based on **JWT tokens**, which the SDK allows you to request from the **ShapeDiver Platform** using the OAuth 2.0 functionality integrated with the [ShapeDiver Platform API](https://app.shapediver.com/api/documentation).
16
+ The authentication system is based on **JWT tokens**, which the SDK allows you to request from the **ShapeDiver Platform** using the OAuth 2.0 functionality integrated with the [ShapeDiver Platform API](https://help.shapediver.com/doc/platform-backend).
17
17
 
18
18
  ## Usage
19
19
 
@@ -29,16 +29,27 @@ The authentication system is based on **JWT tokens**, which the SDK allows you t
29
29
  * Create and authorize client:
30
30
  ```javascript
31
31
  const client = create({clientId: "CLIENT_ID", baseUrl: "SHAPEDIVER_PLATFORM_API_ENDPOINT"});
32
- await client.authorization.passwordGrant("USERNAME", "PASSWORD");
32
+ await client.authorization.passwordGrant("USERNAME OR ACCESS KEY ID", "PASSWORD OR ACCESS KEY SECRET");
33
33
  ```
34
34
 
35
+ Whenever possible do not use your username and password for usage of the SDK. Instead log in to the [ShapeDiver Platform](https://www.shapediver.com/app/) and create an access key pair, consisting of an
36
+
37
+ * access key id (to be used instead of your username), and an
38
+ * access key secret (to be used instead of your password).
39
+
40
+ Using access keys allows you to keep your application secure, because access keys
41
+
42
+ * can be limited in scope (e.g. they can be limited to be read only)
43
+ * can easily be revoked at any time
44
+ * can be time limited.
45
+
35
46
  ## Versioning
36
47
  We take care to provide backwards compatibility for older versions of the SDK and the API, but might introduce breaking changes in case of major version upgrades.
37
48
  New features of the SDK might be limited to newer versions of the API. We recommend always using the newest SDK version out there.
38
49
 
39
50
  ## Support
40
51
 
41
- * [Plaform Backend documentation](https://help.shapediver.com/doc/Platform-Backend.1863876635.html)
52
+ * [Plaform Backend documentation](https://help.shapediver.com/doc/platform-backend)
42
53
  * [ShapeDiver Help Center](https://help.shapediver.com)
43
54
  * [Forum](https://forum.shapediver.com)
44
55
 
@@ -18,6 +18,11 @@ export declare abstract class SdPlatformResponseError extends SdPlatformError {
18
18
  readonly http_status_code: number;
19
19
  constructor(message: string, http_status_code: number);
20
20
  }
21
+ /**
22
+ * The server error which can just contain message and status code.
23
+ */
24
+ export declare class SdPlatformServerResponseError extends SdPlatformResponseError {
25
+ }
21
26
  /**
22
27
  * Resource response error
23
28
  */
@@ -26,10 +31,28 @@ export declare class SdPlatformResourceResponseError extends SdPlatformResponseE
26
31
  readonly error_description: string;
27
32
  readonly error_uri?: string | undefined;
28
33
  readonly code?: string | number | undefined;
34
+ constructor(message: string, http_status_code: number, error: string, error_description: string, error_uri?: string | undefined, code?: string | number | undefined);
35
+ }
36
+ /**
37
+ * Not found error, returned with 404 status.
38
+ */
39
+ export declare class SdPlatformNotFoundResponseError extends SdPlatformResourceResponseError {
40
+ }
41
+ /**
42
+ * Forbidden error, returned with 403 status.
43
+ */
44
+ export declare class SdPlatformForbiddenResponseError extends SdPlatformResourceResponseError {
45
+ }
46
+ /**
47
+ * Unauthorized error, returned with 401 status.
48
+ */
49
+ export declare class SdPlatformUnauthorizedResponseError extends SdPlatformResourceResponseError {
50
+ }
51
+ export declare class SdPlatformValidationResponseError extends SdPlatformResourceResponseError {
29
52
  readonly fields?: {
30
53
  [key: string]: string[];
31
54
  } | undefined;
32
- constructor(message: string, http_status_code: number, error: string, error_description: string, error_uri?: string | undefined, code?: string | number | undefined, fields?: {
55
+ constructor(message: string, http_status_code: number, error: string, error_description: string, error_uri?: string, code?: number | string, fields?: {
33
56
  [key: string]: string[];
34
57
  } | undefined);
35
58
  }
@@ -75,4 +98,38 @@ export declare class SdPlatformOAuthResponseError extends SdPlatformResponseErro
75
98
  information about the error */
76
99
  error_uri?: string | undefined);
77
100
  }
101
+ /**
102
+ * Authentication response error.
103
+ * Follows principles of OAuth 2.0
104
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
105
+ */
106
+ export declare class SdPlatformInvalidRequestOAuthResponseError extends SdPlatformOAuthResponseError {
107
+ }
108
+ /**
109
+ * Authentication response error.
110
+ * Follows principles of OAuth 2.0
111
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
112
+ */
113
+ export declare class SdPlatformInvalidClientOAuthResponseError extends SdPlatformOAuthResponseError {
114
+ }
115
+ /**
116
+ * Authentication response error.
117
+ * Follows principles of OAuth 2.0
118
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
119
+ */
120
+ export declare class SdPlatformInvalidGrantOAuthResponseError extends SdPlatformOAuthResponseError {
121
+ }
122
+ /**
123
+ * Authentication response error.
124
+ * Follows principles of OAuth 2.0
125
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
126
+ */
127
+ export declare class SdPlatformUnauthorizedClientOAuthResponseError extends SdPlatformOAuthResponseError {
128
+ }
129
+ /**
130
+ * Authentication response error.
131
+ * Follows principles of OAuth 2.0
132
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
133
+ */ export declare class SdPlatformUnsupportedGrantTypeClientOAuthResponseError extends SdPlatformOAuthResponseError {
134
+ }
78
135
  //# sourceMappingURL=SdPlatformErrors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SdPlatformErrors.d.ts","sourceRoot":"","sources":["../src/SdPlatformErrors.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAEzB,OAAO,EAAE,MAAM;CAK/B;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,eAAe;aAInC,IAAI,EAAE,MAAM;gBAD5B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM;CAMnC;AAED;;GAEG;AACH,8BAAsB,uBAAwB,SAAQ,eAAe;aAI7C,gBAAgB,EAAE,MAAM;gBADxC,OAAO,EAAE,MAAM,EACC,gBAAgB,EAAE,MAAM;CAM/C;AAED;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,uBAAuB;aAKpD,KAAK,EAAE,MAAM;aACb,iBAAiB,EAAE,MAAM;aACzB,SAAS,CAAC;aACV,IAAI,CAAC;aACL,MAAM,CAAC;;;gBANvB,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,EACR,KAAK,EAAE,MAAM,EACb,iBAAiB,EAAE,MAAM,EACzB,SAAS,CAAC,oBAAQ,EAClB,IAAI,CAAC,6BAAiB,EACtB,MAAM,CAAC;;iBAA6B;CAM3D;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,uBAAuB;IAKjE;;;;;;;;;;OAUG;aACa,KAAK,EAAE,MAAM;IAC7B,oEAAoE;aACpD,iBAAiB,EAAE,MAAM;IACzC;mCAC+B;aACf,SAAS,CAAC;gBAlB1B,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM;IACxB;;;;;;;;;;OAUG;IACa,KAAK,EAAE,MAAM;IAC7B,oEAAoE;IACpD,iBAAiB,EAAE,MAAM;IACzC;mCAC+B;IACf,SAAS,CAAC,oBAAQ;CAMzC"}
1
+ {"version":3,"file":"SdPlatformErrors.d.ts","sourceRoot":"","sources":["../src/SdPlatformErrors.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,qBAAa,e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;IACzC;mCAC+B;aACf,SAAS,CAAC;gBAlB1B,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM;IACxB;;;;;;;;;;OAUG;IACa,KAAK,EAAE,MAAM;IAC7B,oEAAoE;IACpD,iBAAiB,EAAE,MAAM;IACzC;mCAC+B;IACf,SAAS,CAAC,oBAAQ;CAMzC;AAED;;;;GAIG;AACH,qBAAa,0CAA2C,SAAQ,4BAA4B;CAG3F;AAED;;;;GAIG;AACH,qBAAa,yCAA0C,SAAQ,4BAA4B;CAG1F;AAGD;;;;GAIG;AACH,qBAAa,wCAAyC,SAAQ,4BAA4B;CAGzF;AAED;;;;GAIG;AACH,qBAAa,8CAA+C,SAAQ,4BAA4B;CAG/F;AAED;;;;GAIG,CAAA,qBAAa,sDAAuD,SAAQ,4BAA4B;CAG1G"}
@@ -80,6 +80,7 @@ export declare enum RequestId {
80
80
  NotificationPatch = "notification_patch",
81
81
  NotificationDelete = "notification_delete",
82
82
  NotificationSummary = "notification_summary",
83
+ NotificationReadAll = "notification_read_all",
83
84
  UserModelSessionsQuery = "user_model_sessions_query",
84
85
  OrganizationModelSessionsQuery = "organization_model_sessions_query",
85
86
  ChargebeeHostedPage = "chargebee_hosted_page",
@@ -94,12 +95,14 @@ export declare enum RequestId {
94
95
  ModelSharingQueryByUser = "model_sharing_query_by_user",
95
96
  ModelSharingGetByModelAndUser = "model_sharing_get_by_model_and_user",
96
97
  ModelSharingDelete = "model_sharing_delete",
98
+ ModelSharingGroupedByuser = "model_sharing_grouped_by_user",
97
99
  SavedStateSharingCreate = "saved_state_sharing_create",
98
100
  SavedStateSharingQuery = "saved_state_sharing_query",
99
101
  SavedStateSharingQueryBySavedState = "saved_state_sharing_query_by_saved_state",
100
102
  SavedStateSharingQueryByUser = "saved_state_sharing_query_by_user",
101
103
  SavedStateSharingGetBySavedStateAndUser = "saved_state_sharing_get_by_saved_state_and_user",
102
104
  SavedStateSharingDelete = "saved_state_sharing_delete",
105
+ SavedStateSharingGroupedByuser = "saved_state_sharing_grouped_by_user",
103
106
  WebhookChargebeeEvent = "webhook_chargebee_event",
104
107
  WebhookModelMessage = "webhook_model_message",
105
108
  WebhookNotification = "webhook_notification",
@@ -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,WAAW;IAEjB;;OAEG;IACH,WAAW,kBAAkB;IAC7B,aAAa,oBAAoB;IACjC,cAAc,qBAAqB;IACnC,aAAa,oBAAoB;IACjC,cAAc,qBAAqB;IAEnC,kBAAkB,yBAAyB;IAC3C,mBAAmB,0BAA0B;IAC7C,kBAAkB,yBAAyB;IAC3C,kBAAkB,yBAAyB;IAE3C,cAAc,oBAAoB;IAClC,cAAc,oBAAoB;IAElC,QAAQ,cAAc;IACtB,UAAU,gBAAgB;IAC1B,WAAW,iBAAiB;IAC5B,YAAY,iBAAiB;IAE7B,SAAS,eAAe;IACxB,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAC9B,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAE9B,MAAM,YAAY;IAClB,QAAQ,cAAc;IAEtB,WAAW,iBAAiB;IAE5B,OAAO,aAAa;IACpB,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,YAAY,kBAAkB;IAC9B,WAAW,iBAAiB;IAE5B,aAAa,mBAAmB;IAChC,oBAAoB,2BAA2B;IAE/C,QAAQ,cAAc;IACtB,UAAU,gBAAgB;IAC1B,WAAW,iBAAiB;IAC5B,UAAU,gBAAgB;IAC1B,WAAW,iBAAiB;IAC5B,aAAa,mBAAmB;IAEhC,aAAa,oBAAoB;IACjC,eAAe,sBAAsB;IACrC,eAAe,sBAAsB;IACrC,gBAAgB,uBAAuB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uCAAuC,oDAAoD;IAC3F,uBAAuB,+BAA+B;IACtD,8BAA8B,wCAAwC;IAEtE,qBAAqB,4BAA4B;IACjD,mBAAmB,0BAA0B;IAC7C,mBAAmB,yBAAyB;IAE5C,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;CAChD"}
@@ -1,27 +1,5 @@
1
1
  import { AxiosError } from "axios";
2
2
  import { SdPlatformError } from "../SdPlatformErrors";
3
- /**
4
- * The OAuth error response, returned by server when oauth request fails
5
- */
6
- export interface OAuthErrorResponse {
7
- readonly error: string;
8
- readonly error_description: string;
9
- readonly error_uri?: string;
10
- }
11
- /**
12
- * The Resource response error, returned by server when resource request fails.
13
- */
14
- export interface ResourceResponseError {
15
- readonly error: {
16
- readonly message: string;
17
- readonly description: string;
18
- readonly href?: string;
19
- readonly code: number;
20
- readonly fields?: {
21
- [key: string]: string[];
22
- };
23
- };
24
- }
25
3
  /**
26
4
  * Maps the given error into a ShapeDiver API response error object.
27
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SdPlatformSdkErrorMapping.d.ts","sourceRoot":"","sources":["../../src/api/SdPlatformSdkErrorMapping.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EACH,eAAe,EAIlB,MAAM,qBAAqB,CAAA;AAE5B;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,KAAK,EAAE;QACZ,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,MAAM,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;SAAE,CAAA;KAChD,CAAC;CACL;AAUD;;GAEG;AACH,wBAAgB,aAAa,CAAE,KAAK,EAAE,KAAK,GAAG,UAAU,GAAG,eAAe,CAyCzE"}
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,EAclB,MAAM,qBAAqB,CAAA;AAwD5B;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,GAAG,eAAe,CA6IxE"}
package/dist/bundle.js CHANGED
@@ -1352,6 +1352,7 @@ var RequestId;
1352
1352
  RequestId["NotificationPatch"] = "notification_patch";
1353
1353
  RequestId["NotificationDelete"] = "notification_delete";
1354
1354
  RequestId["NotificationSummary"] = "notification_summary";
1355
+ RequestId["NotificationReadAll"] = "notification_read_all";
1355
1356
  RequestId["UserModelSessionsQuery"] = "user_model_sessions_query";
1356
1357
  RequestId["OrganizationModelSessionsQuery"] = "organization_model_sessions_query";
1357
1358
  RequestId["ChargebeeHostedPage"] = "chargebee_hosted_page";
@@ -1366,12 +1367,14 @@ var RequestId;
1366
1367
  RequestId["ModelSharingQueryByUser"] = "model_sharing_query_by_user";
1367
1368
  RequestId["ModelSharingGetByModelAndUser"] = "model_sharing_get_by_model_and_user";
1368
1369
  RequestId["ModelSharingDelete"] = "model_sharing_delete";
1370
+ RequestId["ModelSharingGroupedByuser"] = "model_sharing_grouped_by_user";
1369
1371
  RequestId["SavedStateSharingCreate"] = "saved_state_sharing_create";
1370
1372
  RequestId["SavedStateSharingQuery"] = "saved_state_sharing_query";
1371
1373
  RequestId["SavedStateSharingQueryBySavedState"] = "saved_state_sharing_query_by_saved_state";
1372
1374
  RequestId["SavedStateSharingQueryByUser"] = "saved_state_sharing_query_by_user";
1373
1375
  RequestId["SavedStateSharingGetBySavedStateAndUser"] = "saved_state_sharing_get_by_saved_state_and_user";
1374
1376
  RequestId["SavedStateSharingDelete"] = "saved_state_sharing_delete";
1377
+ RequestId["SavedStateSharingGroupedByuser"] = "saved_state_sharing_grouped_by_user";
1375
1378
  RequestId["WebhookChargebeeEvent"] = "webhook_chargebee_event";
1376
1379
  RequestId["WebhookModelMessage"] = "webhook_model_message";
1377
1380
  RequestId["WebhookNotification"] = "webhook_notification";
@@ -1617,7 +1620,7 @@ exports.SdPlatformAuthServiceApi = SdPlatformAuthServiceApi;
1617
1620
  "use strict";
1618
1621
 
1619
1622
  Object.defineProperty(exports, "__esModule", { value: true });
1620
- exports.SdPlatformOAuthResponseError = exports.SdPlatformResourceResponseError = exports.SdPlatformResponseError = exports.SdPlatformRequestError = exports.SdPlatformError = void 0;
1623
+ 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 = void 0;
1621
1624
  /**
1622
1625
  * Generic error
1623
1626
  */
@@ -1647,20 +1650,50 @@ class SdPlatformResponseError extends SdPlatformError {
1647
1650
  }
1648
1651
  }
1649
1652
  exports.SdPlatformResponseError = SdPlatformResponseError;
1653
+ /**
1654
+ * The server error which can just contain message and status code.
1655
+ */
1656
+ class SdPlatformServerResponseError extends SdPlatformResponseError {
1657
+ }
1658
+ exports.SdPlatformServerResponseError = SdPlatformServerResponseError;
1650
1659
  /**
1651
1660
  * Resource response error
1652
1661
  */
1653
1662
  class SdPlatformResourceResponseError extends SdPlatformResponseError {
1654
- constructor(message, http_status_code, error, error_description, error_uri, code, fields) {
1663
+ constructor(message, http_status_code, error, error_description, error_uri, code) {
1655
1664
  super(message, http_status_code);
1656
1665
  this.error = error;
1657
1666
  this.error_description = error_description;
1658
1667
  this.error_uri = error_uri;
1659
1668
  this.code = code;
1660
- this.fields = fields;
1661
1669
  }
1662
1670
  }
1663
1671
  exports.SdPlatformResourceResponseError = SdPlatformResourceResponseError;
1672
+ /**
1673
+ * Not found error, returned with 404 status.
1674
+ */
1675
+ class SdPlatformNotFoundResponseError extends SdPlatformResourceResponseError {
1676
+ }
1677
+ exports.SdPlatformNotFoundResponseError = SdPlatformNotFoundResponseError;
1678
+ /**
1679
+ * Forbidden error, returned with 403 status.
1680
+ */
1681
+ class SdPlatformForbiddenResponseError extends SdPlatformResourceResponseError {
1682
+ }
1683
+ exports.SdPlatformForbiddenResponseError = SdPlatformForbiddenResponseError;
1684
+ /**
1685
+ * Unauthorized error, returned with 401 status.
1686
+ */
1687
+ class SdPlatformUnauthorizedResponseError extends SdPlatformResourceResponseError {
1688
+ }
1689
+ exports.SdPlatformUnauthorizedResponseError = SdPlatformUnauthorizedResponseError;
1690
+ class SdPlatformValidationResponseError extends SdPlatformResourceResponseError {
1691
+ constructor(message, http_status_code, error, error_description, error_uri, code, fields) {
1692
+ super(message, http_status_code, error, error_description, error_uri, code);
1693
+ this.fields = fields;
1694
+ }
1695
+ }
1696
+ exports.SdPlatformValidationResponseError = SdPlatformValidationResponseError;
1664
1697
  /**
1665
1698
  * Authentication response error.
1666
1699
  * Follows principles of OAuth 2.0
@@ -1692,6 +1725,45 @@ class SdPlatformOAuthResponseError extends SdPlatformResponseError {
1692
1725
  }
1693
1726
  }
1694
1727
  exports.SdPlatformOAuthResponseError = SdPlatformOAuthResponseError;
1728
+ /**
1729
+ * Authentication response error.
1730
+ * Follows principles of OAuth 2.0
1731
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1732
+ */
1733
+ class SdPlatformInvalidRequestOAuthResponseError extends SdPlatformOAuthResponseError {
1734
+ }
1735
+ exports.SdPlatformInvalidRequestOAuthResponseError = SdPlatformInvalidRequestOAuthResponseError;
1736
+ /**
1737
+ * Authentication response error.
1738
+ * Follows principles of OAuth 2.0
1739
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1740
+ */
1741
+ class SdPlatformInvalidClientOAuthResponseError extends SdPlatformOAuthResponseError {
1742
+ }
1743
+ exports.SdPlatformInvalidClientOAuthResponseError = SdPlatformInvalidClientOAuthResponseError;
1744
+ /**
1745
+ * Authentication response error.
1746
+ * Follows principles of OAuth 2.0
1747
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1748
+ */
1749
+ class SdPlatformInvalidGrantOAuthResponseError extends SdPlatformOAuthResponseError {
1750
+ }
1751
+ exports.SdPlatformInvalidGrantOAuthResponseError = SdPlatformInvalidGrantOAuthResponseError;
1752
+ /**
1753
+ * Authentication response error.
1754
+ * Follows principles of OAuth 2.0
1755
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1756
+ */
1757
+ class SdPlatformUnauthorizedClientOAuthResponseError extends SdPlatformOAuthResponseError {
1758
+ }
1759
+ exports.SdPlatformUnauthorizedClientOAuthResponseError = SdPlatformUnauthorizedClientOAuthResponseError;
1760
+ /**
1761
+ * Authentication response error.
1762
+ * Follows principles of OAuth 2.0
1763
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1764
+ */ class SdPlatformUnsupportedGrantTypeClientOAuthResponseError extends SdPlatformOAuthResponseError {
1765
+ }
1766
+ exports.SdPlatformUnsupportedGrantTypeClientOAuthResponseError = SdPlatformUnsupportedGrantTypeClientOAuthResponseError;
1695
1767
 
1696
1768
 
1697
1769
  /***/ }),
@@ -2355,6 +2427,14 @@ class SdPlatformModelSharingApi extends ResourcesApi_1.ResourcesApi {
2355
2427
  delete(model_sharing_id) {
2356
2428
  return super.__delete(SdPlatformRequestId_1.RequestId.ModelSharingDelete, model_sharing_id);
2357
2429
  }
2430
+ /**
2431
+ * Gets the model sharings grouped by user.
2432
+ * @param model_id
2433
+ * @returns
2434
+ */
2435
+ getGroupedByUser(model_id) {
2436
+ return super.__action(SdPlatformRequestId_1.RequestId.ModelSharingGroupedByuser, ResourcesApi_1.Action.Get, `model/${model_id}/grouped_by_user`, {});
2437
+ }
2358
2438
  }
2359
2439
  exports.SdPlatformModelSharingApi = SdPlatformModelSharingApi;
2360
2440
 
@@ -2499,6 +2579,13 @@ class SdPlatformNotificationApi extends ResourcesApi_1.ResourcesApi {
2499
2579
  summary(embed) {
2500
2580
  return super.__get(SdPlatformRequestId_1.RequestId.NotificationSummary, 'summary', embed);
2501
2581
  }
2582
+ /**
2583
+ * Marks all notifications of signed in user as read.
2584
+ * @returns { Promise<SdPlatformPostResponse<void>> }
2585
+ */
2586
+ markAllAsRead() {
2587
+ return super.__action(SdPlatformRequestId_1.RequestId.NotificationReadAll, ResourcesApi_1.Action.Post, 'read_all', {});
2588
+ }
2502
2589
  }
2503
2590
  exports.SdPlatformNotificationApi = SdPlatformNotificationApi;
2504
2591
 
@@ -2808,6 +2895,14 @@ class SdPlatformSavedStateSharingApi extends ResourcesApi_1.ResourcesApi {
2808
2895
  queryByUser(user_id, query) {
2809
2896
  return super.__action(SdPlatformRequestId_1.RequestId.SavedStateSharingQueryByUser, ResourcesApi_1.Action.Post, `user/${user_id}/query`, query);
2810
2897
  }
2898
+ /**
2899
+ * Gets the model sharings grouped by user.
2900
+ * @param saved_state_id
2901
+ * @returns
2902
+ */
2903
+ getGroupedByUser(saved_state_id) {
2904
+ return super.__action(SdPlatformRequestId_1.RequestId.SavedStateSharingGroupedByuser, ResourcesApi_1.Action.Get, `saved_state/${saved_state_id}/grouped_by_user`, {});
2905
+ }
2811
2906
  }
2812
2907
  exports.SdPlatformSavedStateSharingApi = SdPlatformSavedStateSharingApi;
2813
2908
 
@@ -3492,10 +3587,14 @@ function isOAuthResponseError(response) {
3492
3587
  function isResourceResponseError(response) {
3493
3588
  return ("error" in response) && ("message" in response.error);
3494
3589
  }
3590
+ function isValidationError(response) {
3591
+ return isResourceResponseError(response) && ("fields" in response.error);
3592
+ }
3495
3593
  /**
3496
3594
  * Maps the given error into a ShapeDiver API response error object.
3497
3595
  */
3498
3596
  function mapToApiError(error) {
3597
+ var _a, _b;
3499
3598
  // Handle basic non-axios errors
3500
3599
  if (!axios_1.default.isAxiosError(error))
3501
3600
  return new SdPlatformErrors_1.SdPlatformError(error.message);
@@ -3503,11 +3602,41 @@ function mapToApiError(error) {
3503
3602
  if (axiosError.response) {
3504
3603
  // Request was made and server responded with 4xx or 5xx
3505
3604
  let data = axiosError.response.data;
3506
- if (isOAuthResponseError(data)) {
3605
+ if (axiosError.response.status >= 500) {
3606
+ 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);
3607
+ }
3608
+ else if (data && isOAuthResponseError(data)) {
3609
+ if (data.error == "invalid_client") {
3610
+ return new SdPlatformErrors_1.SdPlatformInvalidClientOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3611
+ }
3612
+ else if (data.error == "invalid_request") {
3613
+ return new SdPlatformErrors_1.SdPlatformInvalidRequestOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3614
+ }
3615
+ else if (data.error == "invalid_grant") {
3616
+ return new SdPlatformErrors_1.SdPlatformInvalidGrantOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3617
+ }
3618
+ else if (data.error == "unauthorized_client") {
3619
+ return new SdPlatformErrors_1.SdPlatformUnauthorizedClientOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3620
+ }
3621
+ else if (data.error == "unsupported_grant_type") {
3622
+ return new SdPlatformErrors_1.SdPlatformUnsupportedGrantTypeClientOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3623
+ }
3507
3624
  return new SdPlatformErrors_1.SdPlatformOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3508
3625
  }
3509
- else if (isResourceResponseError(data)) {
3510
- 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, data.error.fields);
3626
+ else if (data && isResourceResponseError(data)) {
3627
+ if (isValidationError(data)) {
3628
+ return new SdPlatformErrors_1.SdPlatformValidationResponseError(`${data.error.message}. ${data.error.description}.`, axiosError.response.status, data.error.message, data.error.description, data.error.href, data.error.code, data.error.fields);
3629
+ }
3630
+ switch (axiosError.response.status) {
3631
+ case 404:
3632
+ return new SdPlatformErrors_1.SdPlatformNotFoundResponseError(`${data.error.message}. ${data.error.description}.`, axiosError.response.status, data.error.message, data.error.description, data.error.href, data.error.code);
3633
+ case 403:
3634
+ return new SdPlatformErrors_1.SdPlatformForbiddenResponseError(`${data.error.message}. ${data.error.description}.`, axiosError.response.status, data.error.message, data.error.description, data.error.href, data.error.code);
3635
+ case 401:
3636
+ return new SdPlatformErrors_1.SdPlatformUnauthorizedResponseError(`${data.error.message}. ${data.error.description}.`, axiosError.response.status, data.error.message, data.error.description, data.error.href, data.error.code);
3637
+ default:
3638
+ 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);
3639
+ }
3511
3640
  }
3512
3641
  else {
3513
3642
  // Response was made but an unknown error object was received
@@ -1352,6 +1352,7 @@ var RequestId;
1352
1352
  RequestId["NotificationPatch"] = "notification_patch";
1353
1353
  RequestId["NotificationDelete"] = "notification_delete";
1354
1354
  RequestId["NotificationSummary"] = "notification_summary";
1355
+ RequestId["NotificationReadAll"] = "notification_read_all";
1355
1356
  RequestId["UserModelSessionsQuery"] = "user_model_sessions_query";
1356
1357
  RequestId["OrganizationModelSessionsQuery"] = "organization_model_sessions_query";
1357
1358
  RequestId["ChargebeeHostedPage"] = "chargebee_hosted_page";
@@ -1366,12 +1367,14 @@ var RequestId;
1366
1367
  RequestId["ModelSharingQueryByUser"] = "model_sharing_query_by_user";
1367
1368
  RequestId["ModelSharingGetByModelAndUser"] = "model_sharing_get_by_model_and_user";
1368
1369
  RequestId["ModelSharingDelete"] = "model_sharing_delete";
1370
+ RequestId["ModelSharingGroupedByuser"] = "model_sharing_grouped_by_user";
1369
1371
  RequestId["SavedStateSharingCreate"] = "saved_state_sharing_create";
1370
1372
  RequestId["SavedStateSharingQuery"] = "saved_state_sharing_query";
1371
1373
  RequestId["SavedStateSharingQueryBySavedState"] = "saved_state_sharing_query_by_saved_state";
1372
1374
  RequestId["SavedStateSharingQueryByUser"] = "saved_state_sharing_query_by_user";
1373
1375
  RequestId["SavedStateSharingGetBySavedStateAndUser"] = "saved_state_sharing_get_by_saved_state_and_user";
1374
1376
  RequestId["SavedStateSharingDelete"] = "saved_state_sharing_delete";
1377
+ RequestId["SavedStateSharingGroupedByuser"] = "saved_state_sharing_grouped_by_user";
1375
1378
  RequestId["WebhookChargebeeEvent"] = "webhook_chargebee_event";
1376
1379
  RequestId["WebhookModelMessage"] = "webhook_model_message";
1377
1380
  RequestId["WebhookNotification"] = "webhook_notification";
@@ -1617,7 +1620,7 @@ exports.SdPlatformAuthServiceApi = SdPlatformAuthServiceApi;
1617
1620
  "use strict";
1618
1621
 
1619
1622
  Object.defineProperty(exports, "__esModule", { value: true });
1620
- exports.SdPlatformOAuthResponseError = exports.SdPlatformResourceResponseError = exports.SdPlatformResponseError = exports.SdPlatformRequestError = exports.SdPlatformError = void 0;
1623
+ 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 = void 0;
1621
1624
  /**
1622
1625
  * Generic error
1623
1626
  */
@@ -1647,20 +1650,50 @@ class SdPlatformResponseError extends SdPlatformError {
1647
1650
  }
1648
1651
  }
1649
1652
  exports.SdPlatformResponseError = SdPlatformResponseError;
1653
+ /**
1654
+ * The server error which can just contain message and status code.
1655
+ */
1656
+ class SdPlatformServerResponseError extends SdPlatformResponseError {
1657
+ }
1658
+ exports.SdPlatformServerResponseError = SdPlatformServerResponseError;
1650
1659
  /**
1651
1660
  * Resource response error
1652
1661
  */
1653
1662
  class SdPlatformResourceResponseError extends SdPlatformResponseError {
1654
- constructor(message, http_status_code, error, error_description, error_uri, code, fields) {
1663
+ constructor(message, http_status_code, error, error_description, error_uri, code) {
1655
1664
  super(message, http_status_code);
1656
1665
  this.error = error;
1657
1666
  this.error_description = error_description;
1658
1667
  this.error_uri = error_uri;
1659
1668
  this.code = code;
1660
- this.fields = fields;
1661
1669
  }
1662
1670
  }
1663
1671
  exports.SdPlatformResourceResponseError = SdPlatformResourceResponseError;
1672
+ /**
1673
+ * Not found error, returned with 404 status.
1674
+ */
1675
+ class SdPlatformNotFoundResponseError extends SdPlatformResourceResponseError {
1676
+ }
1677
+ exports.SdPlatformNotFoundResponseError = SdPlatformNotFoundResponseError;
1678
+ /**
1679
+ * Forbidden error, returned with 403 status.
1680
+ */
1681
+ class SdPlatformForbiddenResponseError extends SdPlatformResourceResponseError {
1682
+ }
1683
+ exports.SdPlatformForbiddenResponseError = SdPlatformForbiddenResponseError;
1684
+ /**
1685
+ * Unauthorized error, returned with 401 status.
1686
+ */
1687
+ class SdPlatformUnauthorizedResponseError extends SdPlatformResourceResponseError {
1688
+ }
1689
+ exports.SdPlatformUnauthorizedResponseError = SdPlatformUnauthorizedResponseError;
1690
+ class SdPlatformValidationResponseError extends SdPlatformResourceResponseError {
1691
+ constructor(message, http_status_code, error, error_description, error_uri, code, fields) {
1692
+ super(message, http_status_code, error, error_description, error_uri, code);
1693
+ this.fields = fields;
1694
+ }
1695
+ }
1696
+ exports.SdPlatformValidationResponseError = SdPlatformValidationResponseError;
1664
1697
  /**
1665
1698
  * Authentication response error.
1666
1699
  * Follows principles of OAuth 2.0
@@ -1692,6 +1725,45 @@ class SdPlatformOAuthResponseError extends SdPlatformResponseError {
1692
1725
  }
1693
1726
  }
1694
1727
  exports.SdPlatformOAuthResponseError = SdPlatformOAuthResponseError;
1728
+ /**
1729
+ * Authentication response error.
1730
+ * Follows principles of OAuth 2.0
1731
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1732
+ */
1733
+ class SdPlatformInvalidRequestOAuthResponseError extends SdPlatformOAuthResponseError {
1734
+ }
1735
+ exports.SdPlatformInvalidRequestOAuthResponseError = SdPlatformInvalidRequestOAuthResponseError;
1736
+ /**
1737
+ * Authentication response error.
1738
+ * Follows principles of OAuth 2.0
1739
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1740
+ */
1741
+ class SdPlatformInvalidClientOAuthResponseError extends SdPlatformOAuthResponseError {
1742
+ }
1743
+ exports.SdPlatformInvalidClientOAuthResponseError = SdPlatformInvalidClientOAuthResponseError;
1744
+ /**
1745
+ * Authentication response error.
1746
+ * Follows principles of OAuth 2.0
1747
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1748
+ */
1749
+ class SdPlatformInvalidGrantOAuthResponseError extends SdPlatformOAuthResponseError {
1750
+ }
1751
+ exports.SdPlatformInvalidGrantOAuthResponseError = SdPlatformInvalidGrantOAuthResponseError;
1752
+ /**
1753
+ * Authentication response error.
1754
+ * Follows principles of OAuth 2.0
1755
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1756
+ */
1757
+ class SdPlatformUnauthorizedClientOAuthResponseError extends SdPlatformOAuthResponseError {
1758
+ }
1759
+ exports.SdPlatformUnauthorizedClientOAuthResponseError = SdPlatformUnauthorizedClientOAuthResponseError;
1760
+ /**
1761
+ * Authentication response error.
1762
+ * Follows principles of OAuth 2.0
1763
+ * Please see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
1764
+ */ class SdPlatformUnsupportedGrantTypeClientOAuthResponseError extends SdPlatformOAuthResponseError {
1765
+ }
1766
+ exports.SdPlatformUnsupportedGrantTypeClientOAuthResponseError = SdPlatformUnsupportedGrantTypeClientOAuthResponseError;
1695
1767
 
1696
1768
 
1697
1769
  /***/ }),
@@ -2355,6 +2427,14 @@ class SdPlatformModelSharingApi extends ResourcesApi_1.ResourcesApi {
2355
2427
  delete(model_sharing_id) {
2356
2428
  return super.__delete(SdPlatformRequestId_1.RequestId.ModelSharingDelete, model_sharing_id);
2357
2429
  }
2430
+ /**
2431
+ * Gets the model sharings grouped by user.
2432
+ * @param model_id
2433
+ * @returns
2434
+ */
2435
+ getGroupedByUser(model_id) {
2436
+ return super.__action(SdPlatformRequestId_1.RequestId.ModelSharingGroupedByuser, ResourcesApi_1.Action.Get, `model/${model_id}/grouped_by_user`, {});
2437
+ }
2358
2438
  }
2359
2439
  exports.SdPlatformModelSharingApi = SdPlatformModelSharingApi;
2360
2440
 
@@ -2499,6 +2579,13 @@ class SdPlatformNotificationApi extends ResourcesApi_1.ResourcesApi {
2499
2579
  summary(embed) {
2500
2580
  return super.__get(SdPlatformRequestId_1.RequestId.NotificationSummary, 'summary', embed);
2501
2581
  }
2582
+ /**
2583
+ * Marks all notifications of signed in user as read.
2584
+ * @returns { Promise<SdPlatformPostResponse<void>> }
2585
+ */
2586
+ markAllAsRead() {
2587
+ return super.__action(SdPlatformRequestId_1.RequestId.NotificationReadAll, ResourcesApi_1.Action.Post, 'read_all', {});
2588
+ }
2502
2589
  }
2503
2590
  exports.SdPlatformNotificationApi = SdPlatformNotificationApi;
2504
2591
 
@@ -2808,6 +2895,14 @@ class SdPlatformSavedStateSharingApi extends ResourcesApi_1.ResourcesApi {
2808
2895
  queryByUser(user_id, query) {
2809
2896
  return super.__action(SdPlatformRequestId_1.RequestId.SavedStateSharingQueryByUser, ResourcesApi_1.Action.Post, `user/${user_id}/query`, query);
2810
2897
  }
2898
+ /**
2899
+ * Gets the model sharings grouped by user.
2900
+ * @param saved_state_id
2901
+ * @returns
2902
+ */
2903
+ getGroupedByUser(saved_state_id) {
2904
+ return super.__action(SdPlatformRequestId_1.RequestId.SavedStateSharingGroupedByuser, ResourcesApi_1.Action.Get, `saved_state/${saved_state_id}/grouped_by_user`, {});
2905
+ }
2811
2906
  }
2812
2907
  exports.SdPlatformSavedStateSharingApi = SdPlatformSavedStateSharingApi;
2813
2908
 
@@ -3492,10 +3587,14 @@ function isOAuthResponseError(response) {
3492
3587
  function isResourceResponseError(response) {
3493
3588
  return ("error" in response) && ("message" in response.error);
3494
3589
  }
3590
+ function isValidationError(response) {
3591
+ return isResourceResponseError(response) && ("fields" in response.error);
3592
+ }
3495
3593
  /**
3496
3594
  * Maps the given error into a ShapeDiver API response error object.
3497
3595
  */
3498
3596
  function mapToApiError(error) {
3597
+ var _a, _b;
3499
3598
  // Handle basic non-axios errors
3500
3599
  if (!axios_1.default.isAxiosError(error))
3501
3600
  return new SdPlatformErrors_1.SdPlatformError(error.message);
@@ -3503,11 +3602,41 @@ function mapToApiError(error) {
3503
3602
  if (axiosError.response) {
3504
3603
  // Request was made and server responded with 4xx or 5xx
3505
3604
  let data = axiosError.response.data;
3506
- if (isOAuthResponseError(data)) {
3605
+ if (axiosError.response.status >= 500) {
3606
+ 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);
3607
+ }
3608
+ else if (data && isOAuthResponseError(data)) {
3609
+ if (data.error == "invalid_client") {
3610
+ return new SdPlatformErrors_1.SdPlatformInvalidClientOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3611
+ }
3612
+ else if (data.error == "invalid_request") {
3613
+ return new SdPlatformErrors_1.SdPlatformInvalidRequestOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3614
+ }
3615
+ else if (data.error == "invalid_grant") {
3616
+ return new SdPlatformErrors_1.SdPlatformInvalidGrantOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3617
+ }
3618
+ else if (data.error == "unauthorized_client") {
3619
+ return new SdPlatformErrors_1.SdPlatformUnauthorizedClientOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3620
+ }
3621
+ else if (data.error == "unsupported_grant_type") {
3622
+ return new SdPlatformErrors_1.SdPlatformUnsupportedGrantTypeClientOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3623
+ }
3507
3624
  return new SdPlatformErrors_1.SdPlatformOAuthResponseError(`${data.error}. ${data.error_description}.`, axiosError.response.status, data.error, data.error_description, data.error_uri);
3508
3625
  }
3509
- else if (isResourceResponseError(data)) {
3510
- 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, data.error.fields);
3626
+ else if (data && isResourceResponseError(data)) {
3627
+ if (isValidationError(data)) {
3628
+ return new SdPlatformErrors_1.SdPlatformValidationResponseError(`${data.error.message}. ${data.error.description}.`, axiosError.response.status, data.error.message, data.error.description, data.error.href, data.error.code, data.error.fields);
3629
+ }
3630
+ switch (axiosError.response.status) {
3631
+ case 404:
3632
+ return new SdPlatformErrors_1.SdPlatformNotFoundResponseError(`${data.error.message}. ${data.error.description}.`, axiosError.response.status, data.error.message, data.error.description, data.error.href, data.error.code);
3633
+ case 403:
3634
+ return new SdPlatformErrors_1.SdPlatformForbiddenResponseError(`${data.error.message}. ${data.error.description}.`, axiosError.response.status, data.error.message, data.error.description, data.error.href, data.error.code);
3635
+ case 401:
3636
+ return new SdPlatformErrors_1.SdPlatformUnauthorizedResponseError(`${data.error.message}. ${data.error.description}.`, axiosError.response.status, data.error.message, data.error.description, data.error.href, data.error.code);
3637
+ default:
3638
+ 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);
3639
+ }
3511
3640
  }
3512
3641
  else {
3513
3642
  // Response was made but an unknown error object was received
@@ -1,5 +1,5 @@
1
1
  import { ResourcesApi } from "./commons/ResourcesApi";
2
- import { SdPlatformRequestModelSharingCreate, SdPlatformResponseModelSharing } from "@shapediver/api.platform-api-dto-v1";
2
+ import { SdPlatformRequestModelSharingCreate, SdPlatformResponseModelSharing, SdPlatformResponseModelSharingGroupedByUser } from "@shapediver/api.platform-api-dto-v1";
3
3
  import { SdPlatformQueryParameters, SdPlatformGetResponse, SdPlatformQueryResponse, SdPlatformPostResponse, SdPlatformDeleteResponse } from "@shapediver/api.platform-api-dto-v1";
4
4
  export declare enum SdPlatformModelharingQueryEmbeddableFields {
5
5
  User = "user",
@@ -50,5 +50,11 @@ export declare class SdPlatformModelSharingApi extends ResourcesApi {
50
50
  * @returns
51
51
  */
52
52
  delete(model_sharing_id: string): Promise<SdPlatformDeleteResponse>;
53
+ /**
54
+ * Gets the model sharings grouped by user.
55
+ * @param model_id
56
+ * @returns
57
+ */
58
+ getGroupedByUser(model_id: string): Promise<SdPlatformGetResponse<Array<SdPlatformResponseModelSharingGroupedByUser>>>;
53
59
  }
54
60
  //# sourceMappingURL=SdPlatformModelSharingApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SdPlatformModelSharingApi.d.ts","sourceRoot":"","sources":["../../src/resources/SdPlatformModelSharingApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,mCAAmC,EAAE,8BAA8B,EAAC,MAAM,qCAAqC,CAAA;AACvH,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AAGjL,oBAAY,0CAA0C;IAElD,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,aAAa;CACxB;AAED,oBAAY,qCAAqC,GAAG,yBAAyB,CAAC,0CAA0C,CAAC,CAAC;AAE1H;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,YAAY;IAEvD,SAAS,KAAK,cAAc,IAAI,MAAM,CAGrC;IAED;;;;OAIG;IACI,MAAM,CAAC,IAAI,EAAE,mCAAmC,GAAG,OAAO,CAAC,sBAAsB,CAAC,8BAA8B,CAAC,CAAC;IAKzH;;;;OAIG;IACI,KAAK,CAAC,KAAK,GAAE,qCAA0C,GAAG,OAAO,CAAC,uBAAuB,CAAC,8BAA8B,CAAC,CAAC;IAKjI;;;;;QAKI;IACG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAE,qC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KjI;;;;;QAKI;IACG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAE,qCAA0C,GAAG,OAAO,CAAC,uBAAuB,CAAC,8BAA8B,CAAC,CAAC;IAK1J;;;;OAIG;IACI,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,qCAA0C,GAAG,OAAO,CAAC,uBAAuB,CAAC,8BAA8B,CAAC,CAAC;IAKxJ;;;;;OAKG;IACI,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAKlI;;;;OAIG;IACI,MAAM,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAK1E;;;;OAIG;IACI,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAI,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC,CAAC;CAKjI"}
@@ -24,5 +24,10 @@ export declare class SdPlatformNotificationApi extends ResourcesApi {
24
24
  patch(id: string, body: SdPlatformRequestNotificationPatch): Promise<SdPlatformPatchResponse<SdPlatformResponseNotification>>;
25
25
  delete(id: string): Promise<SdPlatformDeleteResponse>;
26
26
  summary(embed: Array<SdPlatformNotificationSummaryEmbeddableFields>): Promise<SdPlatformGetResponse<SdPlatformResponseNotificationSummary>>;
27
+ /**
28
+ * Marks all notifications of signed in user as read.
29
+ * @returns { Promise<SdPlatformPostResponse<void>> }
30
+ */
31
+ markAllAsRead(): Promise<SdPlatformPostResponse<void>>;
27
32
  }
28
33
  //# sourceMappingURL=SdPlatformNotificationApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SdPlatformNotificationApi.d.ts","sourceRoot":"","sources":["../../src/resources/SdPlatformNotificationApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OA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1
+ import { SdPlatformResponseSavedStateSharing, SdPlatformResponseSavedStateSharingCreate, SdPlatformResponseSavedStateSharingGroupedByUser } from "@shapediver/api.platform-api-dto-v1";
2
2
  import { ResourcesApi } from "./commons/ResourcesApi";
3
3
  import { SdPlatformQueryParameters, SdPlatformGetResponse, SdPlatformQueryResponse, SdPlatformPostResponse, SdPlatformDeleteResponse } from "@shapediver/api.platform-api-dto-v1";
4
4
  export declare enum SdPlatformSavedStateSharingQueryEmbeddableFields {
@@ -51,5 +51,11 @@ export declare class SdPlatformSavedStateSharingApi extends ResourcesApi {
51
51
  * @returns
52
52
  */
53
53
  queryByUser(user_id: string, query?: SdPlatformSavedStateSharingQueryParameters): Promise<SdPlatformQueryResponse<SdPlatformResponseSavedStateSharing>>;
54
+ /**
55
+ * Gets the model sharings grouped by user.
56
+ * @param saved_state_id
57
+ * @returns
58
+ */
59
+ getGroupedByUser(saved_state_id: string): Promise<SdPlatformGetResponse<Array<SdPlatformResponseSavedStateSharingGroupedByUser>>>;
54
60
  }
55
61
  //# sourceMappingURL=SdPlatformSavedStateSharingApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SdPlatformSavedStateSharingApi.d.ts","sourceRoot":"","sources":["../../src/resources/SdPlatformSavedStateSharingApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,yCAAyC,EAAE,MAAM,qCAAqC,CAAC;AACrI,OAAO,EAAU,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AAGjL,oBAAY,gDAAgD;IAExD,IAAI,SAAS;IACb,UAAU,gBAAgB;IAC1B,QAAQ,aAAa;CACxB;AAED,oBAAY,0CAA0C,GAAG,yBAAyB,CAAC,gDAAgD,CAAC,CAAC;AAErI;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,YAAY;IAE5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0CAA0C,GAAG,yBAAyB,CAAC,gDAAgD,CAAC,CAAC;AAErI;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,YAAY;IAE5D,SAAS,KAAK,cAAc,IAAI,MAAM,CAGrC;IAED;;;;QAII;IACG,MAAM,CAAC,IAAI,EAAE,yCAAyC,GAAG,OAAO,CAAC,sBAAsB,CAAC,mCAAmC,CAAC,CAAC;IAKpI;;;;OAIG;IACI,MAAM,CAAC,sBAAsB,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAKhF;;;;;QAKI;IACG,sBAAsB,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC;IAKlJ;;;;OAIG;IACI,KAAK,CAAC,KAAK,CAAC,EAAE,0CAA0C,GAAG,OAAO,CAAC,uBAAuB,CAAC,mCAAmC,CAAC,CAAC;IAKvI;;;;;OAKG;IACI,iBAAiB,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,0CAA0C,GAAG,OAAO,CAAC,uBAAuB,CAAC,mCAAmC,CAAC,CAAC;IAK3K;;;;;OAKG;IACI,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,0CAA0C,GAAG,OAAO,CAAC,uBAAuB,CAAC,mCAAmC,CAAC,CAAC;IAM9J;;;;OAIG;IACK,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAI,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC,CAAC;CAK7I"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapediver/sdk.platform-api-sdk-v1",
3
- "version": "2.9.3",
3
+ "version": "2.9.14",
4
4
  "description": "SDK to communicate with the Platform API version 1",
5
5
  "keywords": [
6
6
  "shapediver",
@@ -39,7 +39,7 @@
39
39
  "build-prod": "bash ../../scripts/build-prod.sh"
40
40
  },
41
41
  "dependencies": {
42
- "@shapediver/api.platform-api-dto-v1": "^2.9.3",
42
+ "@shapediver/api.platform-api-dto-v1": "^2.9.14",
43
43
  "@types/q": "^1.5.5",
44
44
  "axios": "^0.26.1",
45
45
  "dotenv": "^16.0.0",
@@ -55,5 +55,6 @@
55
55
  "webpack": "^4.46.0",
56
56
  "webpack-cli": "4.9.2",
57
57
  "webpack-dev-server": "4.8.1"
58
- }
58
+ },
59
+ "gitHead": "6f7a876b2913e0d64ad511f946418f6b94cb42cc"
59
60
  }