@shapediver/sdk.platform-api-sdk-v1 2.6.5 → 2.6.11

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.
@@ -22,6 +22,7 @@ import { SdPlatformTagApi } from "./resources/SdPlatformTagApi";
22
22
  import { SdPlatformUserAnalyticsApi } from "./resources/SdPlatformUserAnalyticsApi";
23
23
  import { SdPlatformUserApi } from "./resources/SdPlatformUserApi";
24
24
  import { SdPlatformWebhookApi } from './resources/SdPlatformWebhookApi';
25
+ import { SdPlatformOrganizationAnalyticsApi } from "./resources/SdPlatformOrganizationAnalyticsApi";
25
26
  export declare class SdPlatformSdk {
26
27
  private __config;
27
28
  private __api;
@@ -45,6 +46,7 @@ export declare class SdPlatformSdk {
45
46
  private __savedStateSharing;
46
47
  private __tags;
47
48
  private __userAnalytics;
49
+ private __organizationAnalytics;
48
50
  private __users;
49
51
  private __webhooks;
50
52
  /**
@@ -141,6 +143,10 @@ export declare class SdPlatformSdk {
141
143
  * Analytics for users.
142
144
  */
143
145
  get userAnalytics(): SdPlatformUserAnalyticsApi;
146
+ /**
147
+ * Analytics for organizations.
148
+ */
149
+ get organizationAnalytics(): SdPlatformOrganizationAnalyticsApi;
144
150
  /**
145
151
  * Operations for users.
146
152
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SdPlatformSdk.d.ts","sourceRoot":"","sources":["../src/SdPlatformSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,2BAA2B,EAAoB,MAAM,wBAAwB,CAAC;AACvH,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;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AW,MAAM,IAAI,kBAAkB,CAGtC;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,yBAAyB,CAGnD;IAED;;OAEG;IACH,IAAW,MAAM,IAAI,kBAAkB,CAGtC;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,uBAAuB,CAGhD;IAED;;OAEG;IACH,IAAW,cAAc,IAAI,0BAA0B,CAGtD;IAED;;OAEG;IACH,IAAW,aAAa,IAAI,yBAAyB,CAGpD;IAED;;OAEG;IACH,IAAW,aAAa,IAAI,yBAAyB,CAGpD;IAED;;OAEG;IACH,IAAW,QAAQ,IAAI,mBAAmB,CAGzC;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,uBAAuB,CAGhD;IAED;;OAEG;IACH,IAAW,iBAAiB,IAAI,8BAA8B,CAG7D;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,gBAAgB,CAGlC;IAED;;OAEG;IACH,IAAW,aAAa,IAAI,0BAA0B,CAGrD;IAED;;OAEG;IACH,IAAW,qBAAqB,IAAI,kCAAkC,CAGrE;IAED;;OAEG;IACH,IAAW,KAAK,IAAI,iBAAiB,CAGpC;IAED;;OAEG;IACH,IAAW,QAAQ,IAAI,oBAAoB,CAG1C;IAED;;;;;OAKG;IACI,cAAc,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,GAAG,IAAI;IAK7E;;;;;;OAMG;IACI,iBAAiB,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,GAAG,IAAI;CAItF"}
@@ -7,6 +7,7 @@ export declare enum RequestId {
7
7
  */
8
8
  PasswordGrant = "password_grant",
9
9
  RefreshToken = "refresh_token",
10
+ AuthorizationCode = "authorization_code",
10
11
  Logout = "logout",
11
12
  /**
12
13
  * Platform Backend API
@@ -74,6 +75,7 @@ export declare enum RequestId {
74
75
  NotificationPatch = "notification_patch",
75
76
  NotificationDelete = "notification_delete",
76
77
  UserModelSessionsQuery = "user_model_sessions_query",
78
+ OrganizationModelSessionsQuery = "organization_model_sessions_query",
77
79
  ChargebeeHostedPage = "chargebee_hosted_page",
78
80
  ChargebeeHostedPageUpdatePaymentMethod = "chargebee_hosted_page_update_payment_method",
79
81
  ChargebeePortalSession = "chargebee_portal_session",
@@ -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,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,g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BAAgB,sBAAsB;IACtC,YAAY,kBAAkB;IAC9B,cAAc,oBAAoB;IAClC,uBAAuB,8BAA8B;IACrD,mBAAmB,0BAA0B;CAChD"}
@@ -10,6 +10,7 @@ export declare class SdPlatformAuthServiceApi {
10
10
  private __config;
11
11
  private __refreshTokenFailedEvents;
12
12
  private __passwordGrantFailedEvents;
13
+ private __authorizationCodeFailedEvents;
13
14
  /** instance of token request which is used in order to not spam with token requests */
14
15
  private __refreshTokenRequestMeta;
15
16
  constructor(__context: SdPlatformSdkContext);
@@ -36,6 +37,11 @@ export declare class SdPlatformAuthServiceApi {
36
37
  * @param fn
37
38
  */
38
39
  onPasswordGrantFailed(fn: (responseError: SdPlatformResponseError) => void): void;
40
+ /**
41
+ * Register callbacks for "code" grant failed events.
42
+ * @param fn
43
+ */
44
+ onAuthorizationCodeFailed(fn: (responseError: SdPlatformResponseError) => void): void;
39
45
  /**
40
46
  * Try to get a fresh access token using the current refresh token. OAuth 2.0 "refresh_token" grant.
41
47
  * @returns
@@ -48,6 +54,13 @@ export declare class SdPlatformAuthServiceApi {
48
54
  * @returns
49
55
  */
50
56
  passwordGrant(username: string, password: string): Promise<SdPlatformAuthResponse>;
57
+ /**
58
+ * Authenticate using authorization code. Open Id providers.
59
+ * @param code
60
+ * @param state
61
+ * @returns
62
+ */
63
+ authorizationCode(code: string, state: string): Promise<SdPlatformAuthResponse>;
51
64
  /**
52
65
  * Clean the authentication data, unset the "refresh_token" cookie.
53
66
  * @returns
@@ -1 +1 @@
1
- {"version":3,"file":"SdPlatformAuthServiceApi.d.ts","sourceRoot":"","sources":["../../src/auth/SdPlatformAuthServiceApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAA4D,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAEzJ,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAkD,4BAA4B,EAAE,MAAM,qCAAqC,CAAA;AAmB1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  __exportStar(__webpack_require__(54), exports);
143
143
  __exportStar(__webpack_require__(78), exports);
144
- __exportStar(__webpack_require__(114), exports);
144
+ __exportStar(__webpack_require__(115), exports);
145
145
 
146
146
 
147
147
  /***/ }),
@@ -619,6 +619,9 @@ var SdPlatformPolicyPermissionsOrganization;
619
619
  SdPlatformPolicyPermissionsOrganization["embedChargebeeAddons"] = "embed_chargebee_addons";
620
620
  SdPlatformPolicyPermissionsOrganization["create"] = "create";
621
621
  SdPlatformPolicyPermissionsOrganization["delete"] = "delete";
622
+ SdPlatformPolicyPermissionsOrganization["queryModelSessions"] = "query_model_sessions";
623
+ SdPlatformPolicyPermissionsOrganization["embedUsedCredits"] = "embed_used_credits";
624
+ SdPlatformPolicyPermissionsOrganization["embedBackendSystem"] = "embed_backend_system";
622
625
  })(SdPlatformPolicyPermissionsOrganization = exports.SdPlatformPolicyPermissionsOrganization || (exports.SdPlatformPolicyPermissionsOrganization = {}));
623
626
  /**
624
627
  * Permissions for users
@@ -771,10 +774,11 @@ var SdPlatformOrganizationVisibility;
771
774
  var SdPlatformSavedStateVisibility;
772
775
  (function (SdPlatformSavedStateVisibility) {
773
776
  SdPlatformSavedStateVisibility["Private"] = "private";
777
+ SdPlatformSavedStateVisibility["Organization"] = "organization";
774
778
  SdPlatformSavedStateVisibility["Public"] = "public";
779
+ /** "shared" can be used for querying saved states only */
775
780
  SdPlatformSavedStateVisibility["Shared"] = "shared";
776
781
  })(SdPlatformSavedStateVisibility = exports.SdPlatformSavedStateVisibility || (exports.SdPlatformSavedStateVisibility = {}));
777
- ;
778
782
  //# sourceMappingURL=SdPlatformVisibility.js.map
779
783
 
780
784
  /***/ }),
@@ -1251,6 +1255,7 @@ var RequestId;
1251
1255
  */
1252
1256
  RequestId["PasswordGrant"] = "password_grant";
1253
1257
  RequestId["RefreshToken"] = "refresh_token";
1258
+ RequestId["AuthorizationCode"] = "authorization_code";
1254
1259
  RequestId["Logout"] = "logout";
1255
1260
  /**
1256
1261
  * Platform Backend API
@@ -1318,6 +1323,7 @@ var RequestId;
1318
1323
  RequestId["NotificationPatch"] = "notification_patch";
1319
1324
  RequestId["NotificationDelete"] = "notification_delete";
1320
1325
  RequestId["UserModelSessionsQuery"] = "user_model_sessions_query";
1326
+ RequestId["OrganizationModelSessionsQuery"] = "organization_model_sessions_query";
1321
1327
  RequestId["ChargebeeHostedPage"] = "chargebee_hosted_page";
1322
1328
  RequestId["ChargebeeHostedPageUpdatePaymentMethod"] = "chargebee_hosted_page_update_payment_method";
1323
1329
  RequestId["ChargebeePortalSession"] = "chargebee_portal_session";
@@ -1396,6 +1402,7 @@ class SdPlatformAuthServiceApi {
1396
1402
  this.__context = __context;
1397
1403
  this.__refreshTokenFailedEvents = [];
1398
1404
  this.__passwordGrantFailedEvents = [];
1405
+ this.__authorizationCodeFailedEvents = [];
1399
1406
  /** instance of token request which is used in order to not spam with token requests */
1400
1407
  this.__refreshTokenRequestMeta = {
1401
1408
  request: undefined,
@@ -1458,6 +1465,13 @@ class SdPlatformAuthServiceApi {
1458
1465
  onPasswordGrantFailed(fn) {
1459
1466
  this.__passwordGrantFailedEvents.push(fn);
1460
1467
  }
1468
+ /**
1469
+ * Register callbacks for "code" grant failed events.
1470
+ * @param fn
1471
+ */
1472
+ onAuthorizationCodeFailed(fn) {
1473
+ this.__authorizationCodeFailedEvents.push(fn);
1474
+ }
1461
1475
  /**
1462
1476
  * Try to get a fresh access token using the current refresh token. OAuth 2.0 "refresh_token" grant.
1463
1477
  * @returns
@@ -1520,6 +1534,33 @@ class SdPlatformAuthServiceApi {
1520
1534
  }
1521
1535
  });
1522
1536
  }
1537
+ /**
1538
+ * Authenticate using authorization code. Open Id providers.
1539
+ * @param code
1540
+ * @param state
1541
+ * @returns
1542
+ */
1543
+ authorizationCode(code, state) {
1544
+ return __awaiter(this, void 0, void 0, function* () {
1545
+ try {
1546
+ const data = yield this.__request(SdPlatformRequestId_1.RequestId.AuthorizationCode, {
1547
+ grant_type: api_platform_api_dto_v1_1.SdPlatformAuthGrantType.Code,
1548
+ client_id: this.__config.clientId,
1549
+ code,
1550
+ state,
1551
+ });
1552
+ this.setAccessTokenDetails(data);
1553
+ return data;
1554
+ }
1555
+ catch (error) {
1556
+ if (error instanceof SdPlatformErrors_1.SdPlatformResponseError) {
1557
+ this.__cleanAuthData();
1558
+ this.__authorizationCodeFailedEvents.forEach(x => x(error));
1559
+ }
1560
+ throw error;
1561
+ }
1562
+ });
1563
+ }
1523
1564
  /**
1524
1565
  * Clean the authentication data, unset the "refresh_token" cookie.
1525
1566
  * @returns
@@ -2589,6 +2630,7 @@ var SdPlatformSavedStateQueryEmbeddableFields;
2589
2630
  (function (SdPlatformSavedStateQueryEmbeddableFields) {
2590
2631
  SdPlatformSavedStateQueryEmbeddableFields["Model"] = "model";
2591
2632
  SdPlatformSavedStateQueryEmbeddableFields["Owner"] = "owner";
2633
+ SdPlatformSavedStateQueryEmbeddableFields["Image"] = "image";
2592
2634
  })(SdPlatformSavedStateQueryEmbeddableFields = exports.SdPlatformSavedStateQueryEmbeddableFields || (exports.SdPlatformSavedStateQueryEmbeddableFields = {}));
2593
2635
  ;
2594
2636
  var SdPlatformSavedStateGetEmbedFields;
@@ -2993,6 +3035,7 @@ const SdPlatformTagApi_1 = __webpack_require__(74);
2993
3035
  const SdPlatformUserAnalyticsApi_1 = __webpack_require__(75);
2994
3036
  const SdPlatformUserApi_1 = __webpack_require__(76);
2995
3037
  const SdPlatformWebhookApi_1 = __webpack_require__(77);
3038
+ const SdPlatformOrganizationAnalyticsApi_1 = __webpack_require__(114);
2996
3039
  class SdPlatformSdk {
2997
3040
  /**
2998
3041
  * ShapeDiverSDK constructor
@@ -3024,6 +3067,7 @@ class SdPlatformSdk {
3024
3067
  this.__savedStateSharing = new SdPlatformSavedStateSharingApi_1.SdPlatformSavedStateSharingApi(context, this.__authorization);
3025
3068
  this.__tags = new SdPlatformTagApi_1.SdPlatformTagApi(context, this.__authorization);
3026
3069
  this.__userAnalytics = new SdPlatformUserAnalyticsApi_1.SdPlatformUserAnalyticsApi(context, this.__authorization);
3070
+ this.__organizationAnalytics = new SdPlatformOrganizationAnalyticsApi_1.SdPlatformOrganizationAnalyticsApi(context, this.__authorization);
3027
3071
  this.__users = new SdPlatformUserApi_1.SdPlatformUserApi(context, this.__authorization);
3028
3072
  this.__webhooks = new SdPlatformWebhookApi_1.SdPlatformWebhookApi(context);
3029
3073
  }
@@ -3156,6 +3200,12 @@ class SdPlatformSdk {
3156
3200
  get userAnalytics() {
3157
3201
  return this.__userAnalytics;
3158
3202
  }
3203
+ /**
3204
+ * Analytics for organizations.
3205
+ */
3206
+ get organizationAnalytics() {
3207
+ return this.__organizationAnalytics;
3208
+ }
3159
3209
  /**
3160
3210
  * Operations for users.
3161
3211
  */
@@ -5751,7 +5801,7 @@ class SdPlatformDocumentApi extends ResourcesApi_1.ResourcesApi {
5751
5801
  * @returns { string }
5752
5802
  */
5753
5803
  getDownloadUrl(document_id_or_type) {
5754
- return `${this.__commonPath}/browser/v1/documents/${document_id_or_type}/download`;
5804
+ return `/browser/v1/documents/${document_id_or_type}/download`;
5755
5805
  }
5756
5806
  /**
5757
5807
  * Get a view document url.
@@ -5759,7 +5809,7 @@ class SdPlatformDocumentApi extends ResourcesApi_1.ResourcesApi {
5759
5809
  * @returns { string }
5760
5810
  */
5761
5811
  getViewUrl(document_id_or_type) {
5762
- return `${this.__commonPath}/browser/v1/documents/${document_id_or_type}/view`;
5812
+ return `/browser/v1/documents/${document_id_or_type}/view`;
5763
5813
  }
5764
5814
  /**
5765
5815
  * Accept a document
@@ -5779,6 +5829,35 @@ exports.SdPlatformDocumentApi = SdPlatformDocumentApi;
5779
5829
 
5780
5830
  "use strict";
5781
5831
 
5832
+ Object.defineProperty(exports, "__esModule", { value: true });
5833
+ exports.SdPlatformOrganizationAnalyticsApi = void 0;
5834
+ const SdPlatformRequestId_1 = __webpack_require__(52);
5835
+ const ResourcesApi_1 = __webpack_require__(57);
5836
+ /**
5837
+ * Analytics for organizations.
5838
+ */
5839
+ class SdPlatformOrganizationAnalyticsApi extends ResourcesApi_1.ResourcesApi {
5840
+ get __resourcePath() {
5841
+ return "organization_model_sessions";
5842
+ }
5843
+ /**
5844
+ * Query session analytics aggregated per user.
5845
+ * @param body
5846
+ * @returns
5847
+ */
5848
+ query(body = {}) {
5849
+ return super.__query(SdPlatformRequestId_1.RequestId.OrganizationModelSessionsQuery, body);
5850
+ }
5851
+ }
5852
+ exports.SdPlatformOrganizationAnalyticsApi = SdPlatformOrganizationAnalyticsApi;
5853
+
5854
+
5855
+ /***/ }),
5856
+ /* 115 */
5857
+ /***/ (function(module, exports, __webpack_require__) {
5858
+
5859
+ "use strict";
5860
+
5782
5861
  Object.defineProperty(exports, "__esModule", { value: true });
5783
5862
  exports.create = void 0;
5784
5863
  const SdPlatformSdk_1 = __webpack_require__(78);
@@ -141,7 +141,7 @@ __exportStar(__webpack_require__(77), exports);
141
141
  __exportStar(__webpack_require__(58), exports);
142
142
  __exportStar(__webpack_require__(54), exports);
143
143
  __exportStar(__webpack_require__(78), exports);
144
- __exportStar(__webpack_require__(132), exports);
144
+ __exportStar(__webpack_require__(133), exports);
145
145
 
146
146
 
147
147
  /***/ }),
@@ -619,6 +619,9 @@ var SdPlatformPolicyPermissionsOrganization;
619
619
  SdPlatformPolicyPermissionsOrganization["embedChargebeeAddons"] = "embed_chargebee_addons";
620
620
  SdPlatformPolicyPermissionsOrganization["create"] = "create";
621
621
  SdPlatformPolicyPermissionsOrganization["delete"] = "delete";
622
+ SdPlatformPolicyPermissionsOrganization["queryModelSessions"] = "query_model_sessions";
623
+ SdPlatformPolicyPermissionsOrganization["embedUsedCredits"] = "embed_used_credits";
624
+ SdPlatformPolicyPermissionsOrganization["embedBackendSystem"] = "embed_backend_system";
622
625
  })(SdPlatformPolicyPermissionsOrganization = exports.SdPlatformPolicyPermissionsOrganization || (exports.SdPlatformPolicyPermissionsOrganization = {}));
623
626
  /**
624
627
  * Permissions for users
@@ -771,10 +774,11 @@ var SdPlatformOrganizationVisibility;
771
774
  var SdPlatformSavedStateVisibility;
772
775
  (function (SdPlatformSavedStateVisibility) {
773
776
  SdPlatformSavedStateVisibility["Private"] = "private";
777
+ SdPlatformSavedStateVisibility["Organization"] = "organization";
774
778
  SdPlatformSavedStateVisibility["Public"] = "public";
779
+ /** "shared" can be used for querying saved states only */
775
780
  SdPlatformSavedStateVisibility["Shared"] = "shared";
776
781
  })(SdPlatformSavedStateVisibility = exports.SdPlatformSavedStateVisibility || (exports.SdPlatformSavedStateVisibility = {}));
777
- ;
778
782
  //# sourceMappingURL=SdPlatformVisibility.js.map
779
783
 
780
784
  /***/ }),
@@ -1251,6 +1255,7 @@ var RequestId;
1251
1255
  */
1252
1256
  RequestId["PasswordGrant"] = "password_grant";
1253
1257
  RequestId["RefreshToken"] = "refresh_token";
1258
+ RequestId["AuthorizationCode"] = "authorization_code";
1254
1259
  RequestId["Logout"] = "logout";
1255
1260
  /**
1256
1261
  * Platform Backend API
@@ -1318,6 +1323,7 @@ var RequestId;
1318
1323
  RequestId["NotificationPatch"] = "notification_patch";
1319
1324
  RequestId["NotificationDelete"] = "notification_delete";
1320
1325
  RequestId["UserModelSessionsQuery"] = "user_model_sessions_query";
1326
+ RequestId["OrganizationModelSessionsQuery"] = "organization_model_sessions_query";
1321
1327
  RequestId["ChargebeeHostedPage"] = "chargebee_hosted_page";
1322
1328
  RequestId["ChargebeeHostedPageUpdatePaymentMethod"] = "chargebee_hosted_page_update_payment_method";
1323
1329
  RequestId["ChargebeePortalSession"] = "chargebee_portal_session";
@@ -1396,6 +1402,7 @@ class SdPlatformAuthServiceApi {
1396
1402
  this.__context = __context;
1397
1403
  this.__refreshTokenFailedEvents = [];
1398
1404
  this.__passwordGrantFailedEvents = [];
1405
+ this.__authorizationCodeFailedEvents = [];
1399
1406
  /** instance of token request which is used in order to not spam with token requests */
1400
1407
  this.__refreshTokenRequestMeta = {
1401
1408
  request: undefined,
@@ -1458,6 +1465,13 @@ class SdPlatformAuthServiceApi {
1458
1465
  onPasswordGrantFailed(fn) {
1459
1466
  this.__passwordGrantFailedEvents.push(fn);
1460
1467
  }
1468
+ /**
1469
+ * Register callbacks for "code" grant failed events.
1470
+ * @param fn
1471
+ */
1472
+ onAuthorizationCodeFailed(fn) {
1473
+ this.__authorizationCodeFailedEvents.push(fn);
1474
+ }
1461
1475
  /**
1462
1476
  * Try to get a fresh access token using the current refresh token. OAuth 2.0 "refresh_token" grant.
1463
1477
  * @returns
@@ -1520,6 +1534,33 @@ class SdPlatformAuthServiceApi {
1520
1534
  }
1521
1535
  });
1522
1536
  }
1537
+ /**
1538
+ * Authenticate using authorization code. Open Id providers.
1539
+ * @param code
1540
+ * @param state
1541
+ * @returns
1542
+ */
1543
+ authorizationCode(code, state) {
1544
+ return __awaiter(this, void 0, void 0, function* () {
1545
+ try {
1546
+ const data = yield this.__request(SdPlatformRequestId_1.RequestId.AuthorizationCode, {
1547
+ grant_type: api_platform_api_dto_v1_1.SdPlatformAuthGrantType.Code,
1548
+ client_id: this.__config.clientId,
1549
+ code,
1550
+ state,
1551
+ });
1552
+ this.setAccessTokenDetails(data);
1553
+ return data;
1554
+ }
1555
+ catch (error) {
1556
+ if (error instanceof SdPlatformErrors_1.SdPlatformResponseError) {
1557
+ this.__cleanAuthData();
1558
+ this.__authorizationCodeFailedEvents.forEach(x => x(error));
1559
+ }
1560
+ throw error;
1561
+ }
1562
+ });
1563
+ }
1523
1564
  /**
1524
1565
  * Clean the authentication data, unset the "refresh_token" cookie.
1525
1566
  * @returns
@@ -2589,6 +2630,7 @@ var SdPlatformSavedStateQueryEmbeddableFields;
2589
2630
  (function (SdPlatformSavedStateQueryEmbeddableFields) {
2590
2631
  SdPlatformSavedStateQueryEmbeddableFields["Model"] = "model";
2591
2632
  SdPlatformSavedStateQueryEmbeddableFields["Owner"] = "owner";
2633
+ SdPlatformSavedStateQueryEmbeddableFields["Image"] = "image";
2592
2634
  })(SdPlatformSavedStateQueryEmbeddableFields = exports.SdPlatformSavedStateQueryEmbeddableFields || (exports.SdPlatformSavedStateQueryEmbeddableFields = {}));
2593
2635
  ;
2594
2636
  var SdPlatformSavedStateGetEmbedFields;
@@ -2993,6 +3035,7 @@ const SdPlatformTagApi_1 = __webpack_require__(74);
2993
3035
  const SdPlatformUserAnalyticsApi_1 = __webpack_require__(75);
2994
3036
  const SdPlatformUserApi_1 = __webpack_require__(76);
2995
3037
  const SdPlatformWebhookApi_1 = __webpack_require__(77);
3038
+ const SdPlatformOrganizationAnalyticsApi_1 = __webpack_require__(132);
2996
3039
  class SdPlatformSdk {
2997
3040
  /**
2998
3041
  * ShapeDiverSDK constructor
@@ -3024,6 +3067,7 @@ class SdPlatformSdk {
3024
3067
  this.__savedStateSharing = new SdPlatformSavedStateSharingApi_1.SdPlatformSavedStateSharingApi(context, this.__authorization);
3025
3068
  this.__tags = new SdPlatformTagApi_1.SdPlatformTagApi(context, this.__authorization);
3026
3069
  this.__userAnalytics = new SdPlatformUserAnalyticsApi_1.SdPlatformUserAnalyticsApi(context, this.__authorization);
3070
+ this.__organizationAnalytics = new SdPlatformOrganizationAnalyticsApi_1.SdPlatformOrganizationAnalyticsApi(context, this.__authorization);
3027
3071
  this.__users = new SdPlatformUserApi_1.SdPlatformUserApi(context, this.__authorization);
3028
3072
  this.__webhooks = new SdPlatformWebhookApi_1.SdPlatformWebhookApi(context);
3029
3073
  }
@@ -3156,6 +3200,12 @@ class SdPlatformSdk {
3156
3200
  get userAnalytics() {
3157
3201
  return this.__userAnalytics;
3158
3202
  }
3203
+ /**
3204
+ * Analytics for organizations.
3205
+ */
3206
+ get organizationAnalytics() {
3207
+ return this.__organizationAnalytics;
3208
+ }
3159
3209
  /**
3160
3210
  * Operations for users.
3161
3211
  */
@@ -7791,7 +7841,7 @@ class SdPlatformDocumentApi extends ResourcesApi_1.ResourcesApi {
7791
7841
  * @returns { string }
7792
7842
  */
7793
7843
  getDownloadUrl(document_id_or_type) {
7794
- return `${this.__commonPath}/browser/v1/documents/${document_id_or_type}/download`;
7844
+ return `/browser/v1/documents/${document_id_or_type}/download`;
7795
7845
  }
7796
7846
  /**
7797
7847
  * Get a view document url.
@@ -7799,7 +7849,7 @@ class SdPlatformDocumentApi extends ResourcesApi_1.ResourcesApi {
7799
7849
  * @returns { string }
7800
7850
  */
7801
7851
  getViewUrl(document_id_or_type) {
7802
- return `${this.__commonPath}/browser/v1/documents/${document_id_or_type}/view`;
7852
+ return `/browser/v1/documents/${document_id_or_type}/view`;
7803
7853
  }
7804
7854
  /**
7805
7855
  * Accept a document
@@ -7819,6 +7869,35 @@ exports.SdPlatformDocumentApi = SdPlatformDocumentApi;
7819
7869
 
7820
7870
  "use strict";
7821
7871
 
7872
+ Object.defineProperty(exports, "__esModule", { value: true });
7873
+ exports.SdPlatformOrganizationAnalyticsApi = void 0;
7874
+ const SdPlatformRequestId_1 = __webpack_require__(52);
7875
+ const ResourcesApi_1 = __webpack_require__(57);
7876
+ /**
7877
+ * Analytics for organizations.
7878
+ */
7879
+ class SdPlatformOrganizationAnalyticsApi extends ResourcesApi_1.ResourcesApi {
7880
+ get __resourcePath() {
7881
+ return "organization_model_sessions";
7882
+ }
7883
+ /**
7884
+ * Query session analytics aggregated per user.
7885
+ * @param body
7886
+ * @returns
7887
+ */
7888
+ query(body = {}) {
7889
+ return super.__query(SdPlatformRequestId_1.RequestId.OrganizationModelSessionsQuery, body);
7890
+ }
7891
+ }
7892
+ exports.SdPlatformOrganizationAnalyticsApi = SdPlatformOrganizationAnalyticsApi;
7893
+
7894
+
7895
+ /***/ }),
7896
+ /* 133 */
7897
+ /***/ (function(module, exports, __webpack_require__) {
7898
+
7899
+ "use strict";
7900
+
7822
7901
  Object.defineProperty(exports, "__esModule", { value: true });
7823
7902
  exports.create = void 0;
7824
7903
  const SdPlatformSdk_1 = __webpack_require__(78);
@@ -0,0 +1,16 @@
1
+ import { SdPlatformResponseOrganizationModelSessionAnalyticsPerTimestamp } from "@shapediver/api.platform-api-dto-v1";
2
+ import { ResourcesApi } from "./commons/ResourcesApi";
3
+ import { SdPlatformQueryParameters, SdPlatformQueryResponse } from "@shapediver/api.platform-api-dto-v1";
4
+ /**
5
+ * Analytics for organizations.
6
+ */
7
+ export declare class SdPlatformOrganizationAnalyticsApi extends ResourcesApi {
8
+ protected get __resourcePath(): string;
9
+ /**
10
+ * Query session analytics aggregated per user.
11
+ * @param body
12
+ * @returns
13
+ */
14
+ query(body?: SdPlatformQueryParameters<unknown>): Promise<SdPlatformQueryResponse<SdPlatformResponseOrganizationModelSessionAnalyticsPerTimestamp>>;
15
+ }
16
+ //# sourceMappingURL=SdPlatformOrganizationAnalyticsApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdPlatformOrganizationAnalyticsApi.d.ts","sourceRoot":"","sources":["../../src/resources/SdPlatformOrganizationAnalyticsApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+DAA+D,EAAE,MAAM,qCAAqC,CAAC;AAEtH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAA;AAExG;;GAEG;AACH,qBAAa,kCAAmC,SAAQ,YAAY;IAEhE,SAAS,KAAK,cAAc,IAAI,MAAM,CAGrC;IAED;;;;OAIG;IACI,KAAK,CAAC,IAAI,GAAE,yBAAyB,CAAC,OAAO,CAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,+DAA+D,CAAC,CAAC;CAKjK"}
@@ -3,7 +3,8 @@ import { SdPlatformResponseSavedStatePublic, SdPlatformRequestSavedStateCreate,
3
3
  import { SdPlatformQueryParameters, SdPlatformGetResponse, SdPlatformQueryResponse, SdPlatformPatchResponse, SdPlatformPostResponse, SdPlatformDeleteResponse } from "@shapediver/api.platform-api-dto-v1";
4
4
  export declare enum SdPlatformSavedStateQueryEmbeddableFields {
5
5
  Model = "model",
6
- Owner = "owner"
6
+ Owner = "owner",
7
+ Image = "image"
7
8
  }
8
9
  export declare enum SdPlatformSavedStateGetEmbedFields {
9
10
  Model = "model",
@@ -1 +1 @@
1
- {"version":3,"file":"SdPlatformSavedStateApi.d.ts","sourceRoot":"","sources":["../../src/resources/SdPlatformSavedStateApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,kCAAkC,EAAE,iCAAiC,EAAE,gCAAgC,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAA;AAChM,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AAG1M,oBAAY,yCAAyC;IAEjD,KAAK,UAAU;IACf,KAAK,UAAU;CAClB;AAGD,oBAAY,kCAAkC;IAE1C,KAAK,UAAU;IACf,KAAK,UAAU;CAClB;AAED,oBAAY,sCAAsC,GAAG,yBAAyB,CAAC,yCAAyC,CAAC,CAAC;AAE1H;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,YAAY;IAErD,SAAS,KAAK,cAAc,IAAI,MAAM,CAGrC;IAED;;;;QAII;IACG,GAAG,CAAC,CAAC,GAAG,kCAAkC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,kCAAkC,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAKpJ;;;;OAIG;IACI,MAAM,CAAC,CAAC,GAAG,iCAAiC,EAAE,IAAI,EAAE,iCAAiC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAKjI;;;;;OAKG;IACI,KAAK,CAAC,CAAC,GAAG,iCAAiC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gCAAgC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IAK5I;;;;OAIG;IACI,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC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AAE,gCAAgC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IAK5I;;;;OAIG;IACI,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAK5D;;;;OAIG;IACI,KAAK,CAAC,CAAC,GAAG,kCAAkC,EAAE,MAAM,CAAC,EAAE,sCAAsC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;CAI7I"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapediver/sdk.platform-api-sdk-v1",
3
- "version": "2.6.5",
3
+ "version": "2.6.11",
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.6.5",
42
+ "@shapediver/api.platform-api-dto-v1": "^2.6.12",
43
43
  "@types/q": "^1.5.5",
44
44
  "axios": "^0.26.1",
45
45
  "dotenv": "^16.0.0",