@shapediver/sdk.platform-api-sdk-v1 2.15.0 → 2.15.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.
Files changed (157) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/dist/SdPlatformErrors.d.ts +0 -0
  4. package/dist/SdPlatformErrors.d.ts.map +0 -0
  5. package/dist/SdPlatformErrors.js +147 -0
  6. package/dist/SdPlatformErrors.js.map +1 -0
  7. package/dist/SdPlatformSdk.d.ts +0 -0
  8. package/dist/SdPlatformSdk.d.ts.map +0 -0
  9. package/dist/SdPlatformSdk.js +265 -0
  10. package/dist/SdPlatformSdk.js.map +1 -0
  11. package/dist/SdPlatformSdkContext.d.ts +0 -0
  12. package/dist/SdPlatformSdkContext.d.ts.map +0 -0
  13. package/dist/SdPlatformSdkContext.js +88 -0
  14. package/dist/SdPlatformSdkContext.js.map +1 -0
  15. package/dist/SdPlatformSdkCreate.d.ts +0 -0
  16. package/dist/SdPlatformSdkCreate.d.ts.map +0 -0
  17. package/dist/SdPlatformSdkCreate.js +20 -0
  18. package/dist/SdPlatformSdkCreate.js.map +1 -0
  19. package/dist/api/SdPlatformRequestId.d.ts +1 -0
  20. package/dist/api/SdPlatformRequestId.d.ts.map +1 -1
  21. package/dist/api/SdPlatformRequestId.js +145 -0
  22. package/dist/api/SdPlatformRequestId.js.map +1 -0
  23. package/dist/api/SdPlatformSdkApi.d.ts +0 -0
  24. package/dist/api/SdPlatformSdkApi.d.ts.map +0 -0
  25. package/dist/api/SdPlatformSdkApi.js +173 -0
  26. package/dist/api/SdPlatformSdkApi.js.map +1 -0
  27. package/dist/api/SdPlatformSdkConfig.d.ts +0 -0
  28. package/dist/api/SdPlatformSdkConfig.d.ts.map +0 -0
  29. package/dist/api/SdPlatformSdkConfig.js +21 -0
  30. package/dist/api/SdPlatformSdkConfig.js.map +1 -0
  31. package/dist/api/SdPlatformSdkErrorMapping.d.ts +0 -0
  32. package/dist/api/SdPlatformSdkErrorMapping.d.ts.map +0 -0
  33. package/dist/api/SdPlatformSdkErrorMapping.js +84 -0
  34. package/dist/api/SdPlatformSdkErrorMapping.js.map +1 -0
  35. package/dist/auth/SdPlatformAuthServiceApi.d.ts +0 -0
  36. package/dist/auth/SdPlatformAuthServiceApi.d.ts.map +0 -0
  37. package/dist/auth/SdPlatformAuthServiceApi.js +225 -0
  38. package/dist/auth/SdPlatformAuthServiceApi.js.map +1 -0
  39. package/dist/index.d.ts +0 -0
  40. package/dist/index.d.ts.map +0 -0
  41. package/dist/index.js +45 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/resources/SdPlatformApiClientsApi.d.ts +0 -0
  44. package/dist/resources/SdPlatformApiClientsApi.d.ts.map +0 -0
  45. package/dist/resources/SdPlatformApiClientsApi.js +54 -0
  46. package/dist/resources/SdPlatformApiClientsApi.js.map +1 -0
  47. package/dist/resources/SdPlatformApiTokenApi.d.ts +0 -0
  48. package/dist/resources/SdPlatformApiTokenApi.d.ts.map +0 -0
  49. package/dist/resources/SdPlatformApiTokenApi.js +58 -0
  50. package/dist/resources/SdPlatformApiTokenApi.js.map +1 -0
  51. package/dist/resources/SdPlatformBackendSystemApi.d.ts +0 -0
  52. package/dist/resources/SdPlatformBackendSystemApi.d.ts.map +0 -0
  53. package/dist/resources/SdPlatformBackendSystemApi.js +55 -0
  54. package/dist/resources/SdPlatformBackendSystemApi.js.map +1 -0
  55. package/dist/resources/SdPlatformBookmarkApi.d.ts +0 -0
  56. package/dist/resources/SdPlatformBookmarkApi.d.ts.map +0 -0
  57. package/dist/resources/SdPlatformBookmarkApi.js +34 -0
  58. package/dist/resources/SdPlatformBookmarkApi.js.map +1 -0
  59. package/dist/resources/SdPlatformChargebeeApi.d.ts +0 -0
  60. package/dist/resources/SdPlatformChargebeeApi.d.ts.map +0 -0
  61. package/dist/resources/SdPlatformChargebeeApi.js +57 -0
  62. package/dist/resources/SdPlatformChargebeeApi.js.map +1 -0
  63. package/dist/resources/SdPlatformDocumentApi.d.ts +0 -0
  64. package/dist/resources/SdPlatformDocumentApi.d.ts.map +0 -0
  65. package/dist/resources/SdPlatformDocumentApi.js +86 -0
  66. package/dist/resources/SdPlatformDocumentApi.js.map +1 -0
  67. package/dist/resources/SdPlatformDomainApi.d.ts +0 -0
  68. package/dist/resources/SdPlatformDomainApi.d.ts.map +0 -0
  69. package/dist/resources/SdPlatformDomainApi.js +63 -0
  70. package/dist/resources/SdPlatformDomainApi.js.map +1 -0
  71. package/dist/resources/SdPlatformHttpLogApi.d.ts +0 -0
  72. package/dist/resources/SdPlatformHttpLogApi.d.ts.map +0 -0
  73. package/dist/resources/SdPlatformHttpLogApi.js +23 -0
  74. package/dist/resources/SdPlatformHttpLogApi.js.map +1 -0
  75. package/dist/resources/SdPlatformImageApi.d.ts +0 -0
  76. package/dist/resources/SdPlatformImageApi.d.ts.map +0 -0
  77. package/dist/resources/SdPlatformImageApi.js +55 -0
  78. package/dist/resources/SdPlatformImageApi.js.map +1 -0
  79. package/dist/resources/SdPlatformJobLogApi.d.ts +0 -0
  80. package/dist/resources/SdPlatformJobLogApi.d.ts.map +0 -0
  81. package/dist/resources/SdPlatformJobLogApi.js +23 -0
  82. package/dist/resources/SdPlatformJobLogApi.js.map +1 -0
  83. package/dist/resources/SdPlatformModelApi.d.ts +0 -0
  84. package/dist/resources/SdPlatformModelApi.d.ts.map +0 -0
  85. package/dist/resources/SdPlatformModelApi.js +105 -0
  86. package/dist/resources/SdPlatformModelApi.js.map +1 -0
  87. package/dist/resources/SdPlatformModelSharingApi.d.ts +0 -0
  88. package/dist/resources/SdPlatformModelSharingApi.d.ts.map +0 -0
  89. package/dist/resources/SdPlatformModelSharingApi.js +88 -0
  90. package/dist/resources/SdPlatformModelSharingApi.js.map +1 -0
  91. package/dist/resources/SdPlatformModelTokenApi.d.ts +0 -0
  92. package/dist/resources/SdPlatformModelTokenApi.d.ts.map +0 -0
  93. package/dist/resources/SdPlatformModelTokenApi.js +23 -0
  94. package/dist/resources/SdPlatformModelTokenApi.js.map +1 -0
  95. package/dist/resources/SdPlatformModelTransferApi.d.ts +0 -0
  96. package/dist/resources/SdPlatformModelTransferApi.d.ts.map +0 -0
  97. package/dist/resources/SdPlatformModelTransferApi.js +65 -0
  98. package/dist/resources/SdPlatformModelTransferApi.js.map +1 -0
  99. package/dist/resources/SdPlatformNotificationApi.d.ts +0 -0
  100. package/dist/resources/SdPlatformNotificationApi.d.ts.map +0 -0
  101. package/dist/resources/SdPlatformNotificationApi.js +86 -0
  102. package/dist/resources/SdPlatformNotificationApi.js.map +1 -0
  103. package/dist/resources/SdPlatformOpenIDProviderApi.d.ts +0 -0
  104. package/dist/resources/SdPlatformOpenIDProviderApi.d.ts.map +0 -0
  105. package/dist/resources/SdPlatformOpenIDProviderApi.js +58 -0
  106. package/dist/resources/SdPlatformOpenIDProviderApi.js.map +1 -0
  107. package/dist/resources/SdPlatformOrganizationAnalyticsApi.d.ts +0 -0
  108. package/dist/resources/SdPlatformOrganizationAnalyticsApi.d.ts.map +0 -0
  109. package/dist/resources/SdPlatformOrganizationAnalyticsApi.js +23 -0
  110. package/dist/resources/SdPlatformOrganizationAnalyticsApi.js.map +1 -0
  111. package/dist/resources/SdPlatformOrganizationApi.d.ts +7 -1
  112. package/dist/resources/SdPlatformOrganizationApi.d.ts.map +1 -1
  113. package/dist/resources/SdPlatformOrganizationApi.js +139 -0
  114. package/dist/resources/SdPlatformOrganizationApi.js.map +1 -0
  115. package/dist/resources/SdPlatformPolicyApi.d.ts +0 -0
  116. package/dist/resources/SdPlatformPolicyApi.d.ts.map +0 -0
  117. package/dist/resources/SdPlatformPolicyApi.js +56 -0
  118. package/dist/resources/SdPlatformPolicyApi.js.map +1 -0
  119. package/dist/resources/SdPlatformSavedStateApi.d.ts +0 -0
  120. package/dist/resources/SdPlatformSavedStateApi.d.ts.map +0 -0
  121. package/dist/resources/SdPlatformSavedStateApi.js +69 -0
  122. package/dist/resources/SdPlatformSavedStateApi.js.map +1 -0
  123. package/dist/resources/SdPlatformSavedStateSharingApi.d.ts +0 -0
  124. package/dist/resources/SdPlatformSavedStateSharingApi.d.ts.map +0 -0
  125. package/dist/resources/SdPlatformSavedStateSharingApi.js +88 -0
  126. package/dist/resources/SdPlatformSavedStateSharingApi.js.map +1 -0
  127. package/dist/resources/SdPlatformStargateApi.d.ts +0 -0
  128. package/dist/resources/SdPlatformStargateApi.d.ts.map +0 -0
  129. package/dist/resources/SdPlatformStargateApi.js +21 -0
  130. package/dist/resources/SdPlatformStargateApi.js.map +1 -0
  131. package/dist/resources/SdPlatformTagApi.d.ts +0 -0
  132. package/dist/resources/SdPlatformTagApi.d.ts.map +0 -0
  133. package/dist/resources/SdPlatformTagApi.js +35 -0
  134. package/dist/resources/SdPlatformTagApi.js.map +1 -0
  135. package/dist/resources/SdPlatformUserAnalyticsApi.d.ts +0 -0
  136. package/dist/resources/SdPlatformUserAnalyticsApi.d.ts.map +0 -0
  137. package/dist/resources/SdPlatformUserAnalyticsApi.js +23 -0
  138. package/dist/resources/SdPlatformUserAnalyticsApi.js.map +1 -0
  139. package/dist/resources/SdPlatformUserApi.d.ts +0 -0
  140. package/dist/resources/SdPlatformUserApi.d.ts.map +0 -0
  141. package/dist/resources/SdPlatformUserApi.js +118 -0
  142. package/dist/resources/SdPlatformUserApi.js.map +1 -0
  143. package/dist/resources/SdPlatformWebhookApi.d.ts +0 -0
  144. package/dist/resources/SdPlatformWebhookApi.d.ts.map +0 -0
  145. package/dist/resources/SdPlatformWebhookApi.js +67 -0
  146. package/dist/resources/SdPlatformWebhookApi.js.map +1 -0
  147. package/dist/resources/commons/FilterBuilder.d.ts +0 -0
  148. package/dist/resources/commons/FilterBuilder.d.ts.map +0 -0
  149. package/dist/resources/commons/FilterBuilder.js +65 -0
  150. package/dist/resources/commons/FilterBuilder.js.map +1 -0
  151. package/dist/resources/commons/ResourcesApi.d.ts +0 -0
  152. package/dist/resources/commons/ResourcesApi.d.ts.map +0 -0
  153. package/dist/resources/commons/ResourcesApi.js +112 -0
  154. package/dist/resources/commons/ResourcesApi.js.map +1 -0
  155. package/package.json +5 -9
  156. package/dist/bundle.js +0 -6859
  157. package/dist/bundle.node.js +0 -8946
@@ -0,0 +1,225 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.SdPlatformAuthServiceApi = void 0;
16
+ const SdPlatformRequestId_1 = require("../api/SdPlatformRequestId");
17
+ const SdPlatformErrors_1 = require("../SdPlatformErrors");
18
+ const api_platform_api_dto_v1_1 = require("@shapediver/api.platform-api-dto-v1");
19
+ const jwt_decode_1 = __importDefault(require("jwt-decode"));
20
+ var RequestState;
21
+ (function (RequestState) {
22
+ RequestState["NoRequest"] = "NoRequest";
23
+ RequestState["Requested"] = "Requested";
24
+ RequestState["Resolved"] = "Resolved";
25
+ RequestState["Failed"] = "Failed";
26
+ })(RequestState || (RequestState = {}));
27
+ /**
28
+ * Authentication service for ShapeDiver Platform.
29
+ */
30
+ class SdPlatformAuthServiceApi {
31
+ constructor(__context) {
32
+ this.__context = __context;
33
+ this.__refreshTokenFailedEvents = [];
34
+ this.__passwordGrantFailedEvents = [];
35
+ this.__authorizationCodeFailedEvents = [];
36
+ /** instance of token request which is used in order to not spam with token requests */
37
+ this.__refreshTokenRequestMeta = {
38
+ request: undefined,
39
+ requestState: RequestState.NoRequest,
40
+ };
41
+ this.__api = __context.api;
42
+ this.__config = __context.config;
43
+ }
44
+ __resolveConfigAuth() {
45
+ return {
46
+ access_token: this.__context.accessTokenDetails.access_token,
47
+ client_id: this.__context.config.clientId
48
+ };
49
+ }
50
+ __resolveConfig() {
51
+ return {};
52
+ }
53
+ __request(id, request) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ return this.__api.post(id, "oauth/token", request, this.__resolveConfig());
56
+ });
57
+ }
58
+ /**
59
+ * Convert "expires_in" number of seconds to an absolute expiration date.
60
+ * @param seconds
61
+ */
62
+ convertToExpirationDate(seconds) {
63
+ const expiresAt = new Date();
64
+ expiresAt.setSeconds(expiresAt.getSeconds() + seconds);
65
+ return expiresAt;
66
+ }
67
+ /**
68
+ * Set details of access token in context.
69
+ * @param data auth response
70
+ */
71
+ setAccessTokenDetails(data) {
72
+ const tokenDetails = {
73
+ access_token: data.access_token,
74
+ refresh_token: data.refresh_token,
75
+ expires_in: data.expires_in,
76
+ token_type: data.token_type,
77
+ };
78
+ if (tokenDetails.access_token) {
79
+ const { sub } = this.__decodeToken(tokenDetails.access_token);
80
+ tokenDetails.user_id = sub;
81
+ }
82
+ if (tokenDetails.expires_in) {
83
+ tokenDetails.expirationDate = this.convertToExpirationDate(tokenDetails.expires_in);
84
+ }
85
+ this.__context.setAccessTokenDetails(tokenDetails);
86
+ }
87
+ get authData() {
88
+ return this.__context.authData;
89
+ }
90
+ /**
91
+ * Register callbacks for "refresh_token" grant failed events.
92
+ * @param fn
93
+ */
94
+ onRefreshTokenRequestFailed(fn) {
95
+ this.__refreshTokenFailedEvents.push(fn);
96
+ }
97
+ /**
98
+ * Register callbacks for "password" grant failed events.
99
+ * @param fn
100
+ */
101
+ onPasswordGrantFailed(fn) {
102
+ this.__passwordGrantFailedEvents.push(fn);
103
+ }
104
+ /**
105
+ * Register callbacks for "code" grant failed events.
106
+ * @param fn
107
+ */
108
+ onAuthorizationCodeFailed(fn) {
109
+ this.__authorizationCodeFailedEvents.push(fn);
110
+ }
111
+ /**
112
+ * Try to get a fresh access token using the current refresh token. OAuth 2.0 "refresh_token" grant.
113
+ * @returns
114
+ */
115
+ refreshToken() {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ if (this.__refreshTokenRequestMeta.requestState == RequestState.Requested && this.__refreshTokenRequestMeta.request) {
118
+ return this.__refreshTokenRequestMeta.request;
119
+ }
120
+ try {
121
+ // TODO in case we are not running in a browser environment,
122
+ // the "refresh_token" cookie won't be set, and we should
123
+ // include the refresh_token property here
124
+ const request = this.__request(SdPlatformRequestId_1.RequestId.RefreshToken, {
125
+ grant_type: api_platform_api_dto_v1_1.SdPlatformAuthGrantType.RefreshToken,
126
+ client_id: this.__config.clientId,
127
+ client_secret: this.__config.clientSecret
128
+ });
129
+ this.__refreshTokenRequestMeta.request = request;
130
+ this.__refreshTokenRequestMeta.requestState = RequestState.Requested;
131
+ const data = yield request;
132
+ this.setAccessTokenDetails(data);
133
+ this.__refreshTokenRequestMeta.requestState = RequestState.Resolved;
134
+ return data;
135
+ }
136
+ catch (error) {
137
+ this.__refreshTokenRequestMeta.requestState = RequestState.Failed;
138
+ if (error instanceof SdPlatformErrors_1.SdPlatformResponseError) {
139
+ this.__cleanAuthData();
140
+ this.__refreshTokenFailedEvents.forEach(x => x(error));
141
+ }
142
+ throw error;
143
+ }
144
+ });
145
+ }
146
+ /**
147
+ * Authenticate using credentials. OAuth 2.0 "password" grant.
148
+ * @param username
149
+ * @param password
150
+ * @returns
151
+ */
152
+ passwordGrant(username, password) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ try {
155
+ const data = yield this.__request(SdPlatformRequestId_1.RequestId.PasswordGrant, {
156
+ grant_type: api_platform_api_dto_v1_1.SdPlatformAuthGrantType.Password,
157
+ client_id: this.__config.clientId,
158
+ username,
159
+ password
160
+ });
161
+ this.setAccessTokenDetails(data);
162
+ return data;
163
+ }
164
+ catch (error) {
165
+ if (error instanceof SdPlatformErrors_1.SdPlatformResponseError) {
166
+ this.__cleanAuthData();
167
+ this.__passwordGrantFailedEvents.forEach(x => x(error));
168
+ }
169
+ throw error;
170
+ }
171
+ });
172
+ }
173
+ /**
174
+ * Authenticate using authorization code. Open Id providers.
175
+ * @param code
176
+ * @param state
177
+ * @returns
178
+ */
179
+ authorizationCode(code, state) {
180
+ return __awaiter(this, void 0, void 0, function* () {
181
+ try {
182
+ const data = yield this.__request(SdPlatformRequestId_1.RequestId.AuthorizationCode, {
183
+ grant_type: api_platform_api_dto_v1_1.SdPlatformAuthGrantType.Code,
184
+ client_id: this.__config.clientId,
185
+ code,
186
+ state,
187
+ });
188
+ this.setAccessTokenDetails(data);
189
+ return data;
190
+ }
191
+ catch (error) {
192
+ if (error instanceof SdPlatformErrors_1.SdPlatformResponseError) {
193
+ this.__cleanAuthData();
194
+ this.__authorizationCodeFailedEvents.forEach(x => x(error));
195
+ }
196
+ throw error;
197
+ }
198
+ });
199
+ }
200
+ /**
201
+ * Clean the authentication data, unset the "refresh_token" cookie.
202
+ * @returns
203
+ */
204
+ logout() {
205
+ const response = this.__api.post(SdPlatformRequestId_1.RequestId.Logout, "oauth/logout", {}, this.__resolveConfig());
206
+ this.__cleanAuthData();
207
+ return response;
208
+ }
209
+ /**
210
+ * Create and get authorization code.
211
+ * @param params
212
+ * @returns
213
+ */
214
+ requestAuthorizationCode(params) {
215
+ return this.__api.post(SdPlatformRequestId_1.RequestId.RequestAuthorizationCode, "oauth/authorize", params, Object.assign(Object.assign({}, this.__resolveConfig()), this.__resolveConfigAuth()));
216
+ }
217
+ __decodeToken(token) {
218
+ return (0, jwt_decode_1.default)(token);
219
+ }
220
+ __cleanAuthData() {
221
+ this.setAccessTokenDetails({});
222
+ }
223
+ }
224
+ exports.SdPlatformAuthServiceApi = SdPlatformAuthServiceApi;
225
+ //# sourceMappingURL=SdPlatformAuthServiceApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdPlatformAuthServiceApi.js","sourceRoot":"","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IAAI,CAAC,eAAe,EAAE,CAAC;QAEvB,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACI,wBAAwB,CAAC,MAA0C;QAEtE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAsC,+BAAS,CAAC,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,kCAClH,IAAI,CAAC,eAAe,EAAE,GACtB,IAAI,CAAC,mBAAmB,EAAE,EAC/B,CAAC;IACP,CAAC;IAEO,aAAa,CAAC,KAAa;QAE/B,OAAO,IAAA,oBAAS,EAAe,KAAK,CAAC,CAAA;IACzC,CAAC;IAEO,eAAe;QAEnB,IAAI,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACJ;AA7PD,4DA6PC"}
package/dist/index.d.ts CHANGED
File without changes
File without changes
package/dist/index.js ADDED
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("@shapediver/api.platform-api-dto-v1"), exports);
18
+ __exportStar(require("./api/SdPlatformRequestId"), exports);
19
+ __exportStar(require("./auth/SdPlatformAuthServiceApi"), exports);
20
+ __exportStar(require("./resources/SdPlatformApiTokenApi"), exports);
21
+ __exportStar(require("./resources/SdPlatformBackendSystemApi"), exports);
22
+ __exportStar(require("./resources/SdPlatformBookmarkApi"), exports);
23
+ __exportStar(require("./resources/SdPlatformChargebeeApi"), exports);
24
+ __exportStar(require("./resources/SdPlatformDomainApi"), exports);
25
+ __exportStar(require("./resources/SdPlatformHttpLogApi"), exports);
26
+ __exportStar(require("./resources/SdPlatformImageApi"), exports);
27
+ __exportStar(require("./resources/SdPlatformModelApi"), exports);
28
+ __exportStar(require("./resources/SdPlatformModelSharingApi"), exports);
29
+ __exportStar(require("./resources/SdPlatformModelTokenApi"), exports);
30
+ __exportStar(require("./resources/SdPlatformModelTransferApi"), exports);
31
+ __exportStar(require("./resources/SdPlatformNotificationApi"), exports);
32
+ __exportStar(require("./resources/SdPlatformOpenIDProviderApi"), exports);
33
+ __exportStar(require("./resources/SdPlatformOrganizationApi"), exports);
34
+ __exportStar(require("./resources/SdPlatformPolicyApi"), exports);
35
+ __exportStar(require("./resources/SdPlatformSavedStateApi"), exports);
36
+ __exportStar(require("./resources/SdPlatformSavedStateSharingApi"), exports);
37
+ __exportStar(require("./resources/SdPlatformTagApi"), exports);
38
+ __exportStar(require("./resources/SdPlatformUserAnalyticsApi"), exports);
39
+ __exportStar(require("./resources/SdPlatformUserApi"), exports);
40
+ __exportStar(require("./resources/SdPlatformWebhookApi"), exports);
41
+ __exportStar(require("./SdPlatformSdkContext"), exports);
42
+ __exportStar(require("./SdPlatformErrors"), exports);
43
+ __exportStar(require("./SdPlatformSdk"), exports);
44
+ __exportStar(require("./SdPlatformSdkCreate"), exports);
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AAEpD,4DAA0C;AAE1C,kEAA+C;AAE/C,oEAAkD;AAClD,yEAAuD;AACvD,oEAAkD;AAClD,qEAAmD;AACnD,kEAAgD;AAChD,mEAAgD;AAChD,iEAA+C;AAC/C,iEAA8C;AAC9C,wEAAqD;AACrD,sEAAoD;AACpD,yEAAsD;AACtD,wEAAqD;AACrD,0EAAwD;AACxD,wEAAsD;AACtD,kEAAgD;AAChD,sEAAmD;AACnD,6EAA0D;AAC1D,+DAA6C;AAC7C,yEAAsD;AACtD,gEAA8C;AAC9C,mEAAgD;AAEhD,yDAAuC;AACvC,qDAAmC;AACnC,kDAAgC;AAChC,wDAAsC"}
File without changes
File without changes
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SdPlatformApiClientsApi = exports.SdPlatformApiClientsQueryEmbeddableFields = void 0;
4
+ const SdPlatformRequestId_1 = require("../api/SdPlatformRequestId");
5
+ const ResourcesApi_1 = require("./commons/ResourcesApi");
6
+ /**
7
+ * The embeddable fields for query parameter.
8
+ */
9
+ var SdPlatformApiClientsQueryEmbeddableFields;
10
+ (function (SdPlatformApiClientsQueryEmbeddableFields) {
11
+ })(SdPlatformApiClientsQueryEmbeddableFields = exports.SdPlatformApiClientsQueryEmbeddableFields || (exports.SdPlatformApiClientsQueryEmbeddableFields = {}));
12
+ /**
13
+ * API client operations (API clients of the platform backend).
14
+ */
15
+ class SdPlatformApiClientsApi extends ResourcesApi_1.ResourcesApi {
16
+ get __resourcePath() {
17
+ return "apiclients";
18
+ }
19
+ /**
20
+ * Query the api clients.
21
+ * @param query - {@link SdPlatformApiClientsQueryParameters} optional query parameters
22
+ * @returns query result
23
+ */
24
+ query(query = {}) {
25
+ return super.__query(SdPlatformRequestId_1.RequestId.ApiClientQuery, query);
26
+ }
27
+ /**
28
+ * Create a new api client.
29
+ * @param body - {@link SdPlatformRequestApiClientCreate} body or parameters for create request.
30
+ * @returns returns created api client response.
31
+ */
32
+ create(body) {
33
+ return super.__post(SdPlatformRequestId_1.RequestId.ApiClientCreate, body);
34
+ }
35
+ /**
36
+ * Patch an api client
37
+ * @param id
38
+ * @param body - {@link SdPlatformRequestApiClientPatch} body or patch parameters.
39
+ * @returns patch response.
40
+ */
41
+ patch(id, body) {
42
+ return super.__patch(SdPlatformRequestId_1.RequestId.ApiClientPatch, id, body);
43
+ }
44
+ /**
45
+ * Delete an api client.
46
+ * @param id
47
+ * @returns delete response.
48
+ */
49
+ delete(id) {
50
+ return super.__delete(SdPlatformRequestId_1.RequestId.ApiClientDelete, id);
51
+ }
52
+ }
53
+ exports.SdPlatformApiClientsApi = SdPlatformApiClientsApi;
54
+ //# sourceMappingURL=SdPlatformApiClientsApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdPlatformApiClientsApi.js","sourceRoot":"","sources":["../../src/resources/SdPlatformApiClientsApi.ts"],"names":[],"mappings":";;;AAAA,oEAAuD;AACvD,yDAAsD;AAItD;;GAEG;AACH,IAAY,yCACV;AADF,WAAY,yCAAyC;AACpD,CAAC,EADU,yCAAyC,GAAzC,iDAAyC,KAAzC,iDAAyC,QACnD;AAQF;;GAEG;AACH,MAAa,uBAAwB,SAAQ,2BAAY;IAErD,IAAc,cAAc;QAExB,OAAO,YAAY,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,QAA6C,EAAE;QAExD,OAAO,KAAK,CAAC,OAAO,CAAC,+BAAS,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,IAAsC;QAEhD,OAAO,KAAK,CAAC,MAAM,CAAC,+BAAS,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,EAAU,EAAE,IAAqC;QAE1D,OAAO,KAAK,CAAC,OAAO,CAAC,+BAAS,CAAC,cAAc,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,EAAU;QAEpB,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CAGJ;AAjDD,0DAiDC"}
File without changes
File without changes
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SdPlatformApiTokenApi = void 0;
4
+ const SdPlatformRequestId_1 = require("../api/SdPlatformRequestId");
5
+ const ResourcesApi_1 = require("./commons/ResourcesApi");
6
+ /**
7
+ * CRUD operations for Platform API tokens.
8
+ * Platform API tokens can be limited in scope and lifetime.
9
+ * Use Platform API tokens for applications making use of the Platform API.
10
+ * Limit their scope as much as possible.
11
+ */
12
+ class SdPlatformApiTokenApi extends ResourcesApi_1.ResourcesApi {
13
+ get __resourcePath() {
14
+ return "apitokens";
15
+ }
16
+ /**
17
+ * Get the token.
18
+ * @param key_id
19
+ * @returns api token response.
20
+ */
21
+ get(key_id) {
22
+ return super.__get(SdPlatformRequestId_1.RequestId.ApiTokenGet, key_id);
23
+ }
24
+ /**
25
+ * Query the API tokens.
26
+ * @param query - {@link SdPlatformApiTokenQueryParameters} optional query parameters.
27
+ * @returns query response with @see {@link SdPlatformResponseApiToken} as result.
28
+ */
29
+ query(query = {}) {
30
+ return super.__query(SdPlatformRequestId_1.RequestId.ApiTokenQuery, query);
31
+ }
32
+ /**
33
+ * Create a token.
34
+ * @param body - {@link SdPlatformRequestApiTokenCreate} body or create token parameters.
35
+ * @returns @see {@link SdPlatformResponseApiTokenWithSecret} as result.
36
+ */
37
+ create(body) {
38
+ return super.__post(SdPlatformRequestId_1.RequestId.ApiTokenCreate, body);
39
+ }
40
+ /**
41
+ * Update and API token.
42
+ * @param key_id
43
+ * @param @see {@link SdPlatformRequestApiTokenPatch} patch body with parameters.
44
+ * @returns patch response with @see {@link SdPlatformResponseApiToken}
45
+ */
46
+ patch(key_id, body) {
47
+ return super.__patch(SdPlatformRequestId_1.RequestId.ApiTokenPatch, key_id, body);
48
+ }
49
+ /**
50
+ * Delete an API token.
51
+ * @param key_id
52
+ */
53
+ delete(key_id) {
54
+ return super.__delete(SdPlatformRequestId_1.RequestId.ApiTokenDelete, key_id);
55
+ }
56
+ }
57
+ exports.SdPlatformApiTokenApi = SdPlatformApiTokenApi;
58
+ //# sourceMappingURL=SdPlatformApiTokenApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdPlatformApiTokenApi.js","sourceRoot":"","sources":["../../src/resources/SdPlatformApiTokenApi.ts"],"names":[],"mappings":";;;AAAA,oEAAuD;AACvD,yDAAsD;AAMtD;;;;;GAKG;AACH,MAAa,qBAAsB,SAAQ,2BAAY;IAEnD,IAAc,cAAc;QAExB,OAAO,WAAW,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,MAAc;QAErB,OAAO,KAAK,CAAC,KAAK,CAAC,+BAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,QAA2C,EAAE;QAEtD,OAAO,KAAK,CAAC,OAAO,CAAC,+BAAS,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IACzD,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,IAAqC;QAE/C,OAAO,KAAK,CAAC,MAAM,CAAC,+BAAS,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,MAAc,EAAE,IAAoC;QAE7D,OAAO,KAAK,CAAC,OAAO,CAAC,+BAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,MAAc;QAExB,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;CACJ;AAxDD,sDAwDC"}
File without changes
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SdPlatformBackendSystemApi = void 0;
4
+ const SdPlatformRequestId_1 = require("../api/SdPlatformRequestId");
5
+ const ResourcesApi_1 = require("./commons/ResourcesApi");
6
+ /**
7
+ * Operations for ShapeDiver Geometry Backend Systems known by the Platform Backend.
8
+ */
9
+ class SdPlatformBackendSystemApi extends ResourcesApi_1.ResourcesApi {
10
+ get __resourcePath() {
11
+ return "backendsystems";
12
+ }
13
+ /**
14
+ * Query the backend systems.
15
+ * @param query - {@link SdPlatformBackendSystemQueryParameters} query parameters.
16
+ * @returns - {@link SdPlatformQueryResponse} response with {@link SdPlatformResponseBackendSystem} or {@link SdPlatformResponseBackendSystemAdmin} as result.
17
+ */
18
+ query(query = {}) {
19
+ return super.__query(SdPlatformRequestId_1.RequestId.BackendSystemQuery, query);
20
+ }
21
+ /**
22
+ * Create the backend system.
23
+ * @param body - {@link SdPlatformRequestBackendSystemCreate} body parameters.
24
+ * @returns - {@link SdPlatformPostResponse} with {@link SdPlatformResponseBackendSystemAdmin} as result.
25
+ */
26
+ create(body) {
27
+ return super.__post(SdPlatformRequestId_1.RequestId.BackendSystemCreate, body);
28
+ }
29
+ /**
30
+ * Updates the backend system.
31
+ * @param id - the backend system id.
32
+ * @param body - {@link SdPlatformRequestBackendSystemPatch} update parameters.
33
+ * @returns - {@link SdPlatformPatchResponse} with {@link SdPlatformResponseBackendSystem} or {@link SdPlatformResponseBackendSystemAdmin} as result.
34
+ */
35
+ patch(id, body) {
36
+ return super.__patch(SdPlatformRequestId_1.RequestId.BackendSystemPatch, id, body);
37
+ }
38
+ /**
39
+ * Get a token for interacting with a geometry backend system.
40
+ * @param body - {@link SdPlatformRequestBackendSystemToken} body
41
+ * @returns - {@link SdPlatformPostResponse} with {@link SdPlatformResponseBackendSystemToken} as result.
42
+ */
43
+ token(body) {
44
+ return super.__action(SdPlatformRequestId_1.RequestId.BackendSystemToken, ResourcesApi_1.Action.Post, "token", body);
45
+ }
46
+ /**
47
+ * Delete a backend system.
48
+ * @param id - the id of a backend system
49
+ */
50
+ delete(id) {
51
+ return super.__delete(SdPlatformRequestId_1.RequestId.BackendSystemDelete, id);
52
+ }
53
+ }
54
+ exports.SdPlatformBackendSystemApi = SdPlatformBackendSystemApi;
55
+ //# sourceMappingURL=SdPlatformBackendSystemApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdPlatformBackendSystemApi.js","sourceRoot":"","sources":["../../src/resources/SdPlatformBackendSystemApi.ts"],"names":[],"mappings":";;;AAAA,oEAAuD;AACvD,yDAA8D;AAkB9D;;GAEG;AACH,MAAa,0BAA2B,SAAQ,2BAAY;IAExD,IAAc,cAAc;QAExB,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,QAAgD,EAAE;QAE3D,OAAO,KAAK,CAAC,OAAO,CAA+E,+BAAS,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IAC5I,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,IAA0C;QAEpD,OAAO,KAAK,CAAC,MAAM,CAAC,+BAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,EAAU,EAAE,IAAyC;QAE9D,OAAO,KAAK,CAAC,OAAO,CAAC,+BAAS,CAAC,kBAAkB,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,IAAyC;QAElD,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,kBAAkB,EAAE,qBAAM,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACpF,CAAC;IACD;;;OAGG;IACI,MAAM,CAAC,EAAU;QAEpB,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IAC7D,CAAC;CACJ;AAvDD,gEAuDC"}
File without changes
File without changes
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SdPlatformBookmarkApi = void 0;
4
+ const SdPlatformRequestId_1 = require("../api/SdPlatformRequestId");
5
+ const ResourcesApi_1 = require("./commons/ResourcesApi");
6
+ /**
7
+ * Operations for creating and deleting bookmarks
8
+ */
9
+ class SdPlatformBookmarkApi extends ResourcesApi_1.ResourcesApi {
10
+ /**
11
+ * The resource path.
12
+ */
13
+ get __resourcePath() {
14
+ return "bookmarks";
15
+ }
16
+ /**
17
+ * Create a bookmark for the model for the user identified by @see SdPlatformAuthServiceApi
18
+ * @param body - {@link SdPlatformRequestBookmarkCreate} creae parameters.
19
+ * @returns - {@link SdPlatformPostResponse} with 'success' property being true,
20
+ */
21
+ create(body) {
22
+ return super.__post(SdPlatformRequestId_1.RequestId.BookmarkCreate, body);
23
+ }
24
+ /**
25
+ * Delete a bookmark for the model for the user identified by @see SdPlatformAuthServiceApi
26
+ * @param id - id of the model whose bookmark shall be deleted
27
+ * @returns - {@link SdPlatformDeleteResponse}
28
+ */
29
+ delete(id) {
30
+ return super.__delete(SdPlatformRequestId_1.RequestId.BookmarkDelete, id);
31
+ }
32
+ }
33
+ exports.SdPlatformBookmarkApi = SdPlatformBookmarkApi;
34
+ //# sourceMappingURL=SdPlatformBookmarkApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdPlatformBookmarkApi.js","sourceRoot":"","sources":["../../src/resources/SdPlatformBookmarkApi.ts"],"names":[],"mappings":";;;AAAA,oEAAuD;AACvD,yDAAsD;AAKtD;;GAEG;AACH,MAAa,qBAAsB,SAAQ,2BAAY;IAEnD;;OAEG;IACH,IAAc,cAAc;QAExB,OAAO,WAAW,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,IAAqC;QAE/C,OAAO,KAAK,CAAC,MAAM,CAAC,+BAAS,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,EAAU;QAEpB,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IACxD,CAAC;CACJ;AA7BD,sDA6BC"}
File without changes
File without changes
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SdPlatformChargebeeApi = void 0;
4
+ const ResourcesApi_1 = require("./commons/ResourcesApi");
5
+ const SdPlatformRequestId_1 = require("../api/SdPlatformRequestId");
6
+ /**
7
+ * Actions related to Chargebee.
8
+ */
9
+ class SdPlatformChargebeeApi extends ResourcesApi_1.ResourcesApi {
10
+ get __resourcePath() {
11
+ return "chargebee";
12
+ }
13
+ /**
14
+ * Get data required to integrate a chargebee with website.
15
+ * @see {@link https://apidocs.chargebee.com/docs/api/hosted_pages?prod_cat_ver=2} for more.
16
+ * @param body - the parameters of a request.
17
+ * @returns
18
+ */
19
+ hostedPage(body) {
20
+ return super.__action(SdPlatformRequestId_1.RequestId.ChargebeeHostedPage, ResourcesApi_1.Action.Post, "hosted_page", body);
21
+ }
22
+ /**
23
+ * Get data required to integrade hosted page payment method with website.
24
+ * @see {@link https://apidocs.chargebee.com/docs/api/hosted_pages?prod_cat_ver=2#update_payment_method}
25
+ * @param body - the parameters of a request.
26
+ * @returns
27
+ */
28
+ hostedPageUpdatePaymentMethod(body) {
29
+ return super.__action(SdPlatformRequestId_1.RequestId.ChargebeeHostedPageUpdatePaymentMethod, ResourcesApi_1.Action.Post, "hosted_page_update_payment_method", body);
30
+ }
31
+ /**
32
+ * Gets all the required data for opening a chargebee portal session.
33
+ * @see - {@link https://apidocs.chargebee.com/docs/api/portal_sessions?prod_cat_ver=2} for more.
34
+ * @param body - {@link @SdPlatformRequestChargebeePortalSession} body
35
+ * @returns - post response with {@link SdPlatformResponseChargebeePortalSession} data
36
+ */
37
+ portalSession(body) {
38
+ return super.__action(SdPlatformRequestId_1.RequestId.ChargebeePortalSession, ResourcesApi_1.Action.Post, "portal_session", body);
39
+ }
40
+ /**
41
+ * Queries the chargebee plans.
42
+ * @param body - {@link SdPlatformChargebeePlanQueryParameters } body
43
+ * @returns - post response with {@link SdPlatformResponseChargebeePlan} data
44
+ */
45
+ queryChargebeePlans(body) {
46
+ return super.__action(SdPlatformRequestId_1.RequestId.ChargebeeQueryPlan, ResourcesApi_1.Action.Post, "plans/query", body);
47
+ }
48
+ /**
49
+ *
50
+ * @returns Chargebee configuration
51
+ */
52
+ config() {
53
+ return super.__get(SdPlatformRequestId_1.RequestId.ChargebeeConfig, "config");
54
+ }
55
+ }
56
+ exports.SdPlatformChargebeeApi = SdPlatformChargebeeApi;
57
+ //# sourceMappingURL=SdPlatformChargebeeApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdPlatformChargebeeApi.js","sourceRoot":"","sources":["../../src/resources/SdPlatformChargebeeApi.ts"],"names":[],"mappings":";;;AAAA,yDAA8D;AAC9D,oEAAuD;AAOvD;;GAEG;AACH,MAAa,sBAAuB,SAAQ,2BAAY;IAEpD,IAAc,cAAc;QAExB,OAAO,WAAW,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,IAA0C;QAExD,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,mBAAmB,EAAE,qBAAM,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;IAC3F,CAAC;IAED;;;;;OAKG;IACI,6BAA6B,CAAC,IAA6D;QAE9F,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,sCAAsC,EAAE,qBAAM,CAAC,IAAI,EAAE,mCAAmC,EAAE,IAAI,CAAC,CAAC;IACpI,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,IAA6C;QAE9D,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,sBAAsB,EAAE,qBAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACjG,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CAAC,IAA4C;QAEnE,OAAO,KAAK,CAAC,QAAQ,CAAC,+BAAS,CAAC,kBAAkB,EAAE,qBAAM,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;IAC1F,CAAC;IAED;;;OAGG;IACI,MAAM;QAET,OAAO,KAAK,CAAC,KAAK,CAAC,+BAAS,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;CACJ;AA1DD,wDA0DC"}
File without changes
File without changes