polytomic 1.14.4 → 1.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.
- package/Client.d.ts +3 -0
- package/Client.js +13 -8
- package/api/resources/bulkSync/client/Client.js +10 -10
- package/api/resources/bulkSync/resources/executions/client/Client.js +5 -5
- package/api/resources/bulkSync/resources/schedules/client/Client.js +5 -5
- package/api/resources/bulkSync/resources/schemas/client/Client.js +4 -4
- package/api/resources/connections/client/Client.js +10 -10
- package/api/resources/events/client/Client.js +2 -2
- package/api/resources/identity/client/Client.js +1 -1
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/jobs/client/Client.js +1 -1
- package/api/resources/modelSync/client/Client.js +12 -12
- package/api/resources/modelSync/resources/executions/client/Client.js +5 -5
- package/api/resources/modelSync/resources/targets/client/Client.js +4 -4
- package/api/resources/models/client/Client.js +9 -9
- package/api/resources/notifications/client/Client.d.ts +55 -0
- package/api/resources/notifications/client/Client.js +182 -0
- package/api/resources/notifications/client/index.d.ts +1 -0
- package/api/resources/notifications/client/index.js +17 -0
- package/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +10 -0
- package/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.js +5 -0
- package/api/resources/notifications/client/requests/index.d.ts +1 -0
- package/api/resources/notifications/client/requests/index.js +2 -0
- package/api/resources/notifications/index.d.ts +1 -0
- package/api/resources/notifications/index.js +17 -0
- package/api/resources/organization/client/Client.js +5 -5
- package/api/resources/permissions/resources/policies/client/Client.js +5 -5
- package/api/resources/permissions/resources/roles/client/Client.js +5 -5
- package/api/resources/queryRunner/client/Client.js +2 -2
- package/api/resources/schemas/client/Client.js +8 -8
- package/api/resources/users/client/Client.js +6 -6
- package/api/resources/webhooks/client/Client.js +7 -7
- package/api/types/BackendConnectionCapabilities.d.ts +4 -4
- package/api/types/ConnectionType.d.ts +1 -1
- package/api/types/V4GlobalErrorSubscribersResponse.d.ts +6 -0
- package/api/types/V4GlobalErrorSubscribersResponse.js +5 -0
- package/api/types/index.d.ts +1 -0
- package/api/types/index.js +1 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +13 -8
- package/dist/api/resources/bulkSync/client/Client.js +10 -10
- package/dist/api/resources/bulkSync/resources/executions/client/Client.js +5 -5
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +5 -5
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +4 -4
- package/dist/api/resources/connections/client/Client.js +10 -10
- package/dist/api/resources/events/client/Client.js +2 -2
- package/dist/api/resources/identity/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/jobs/client/Client.js +1 -1
- package/dist/api/resources/modelSync/client/Client.js +12 -12
- package/dist/api/resources/modelSync/resources/executions/client/Client.js +5 -5
- package/dist/api/resources/modelSync/resources/targets/client/Client.js +4 -4
- package/dist/api/resources/models/client/Client.js +9 -9
- package/dist/api/resources/notifications/client/Client.d.ts +55 -0
- package/dist/api/resources/notifications/client/Client.js +182 -0
- package/dist/api/resources/notifications/client/index.d.ts +1 -0
- package/dist/api/resources/notifications/client/index.js +17 -0
- package/dist/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +10 -0
- package/dist/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.js +5 -0
- package/dist/api/resources/notifications/client/requests/index.d.ts +1 -0
- package/dist/api/resources/notifications/client/requests/index.js +2 -0
- package/dist/api/resources/notifications/index.d.ts +1 -0
- package/dist/api/resources/notifications/index.js +17 -0
- package/dist/api/resources/organization/client/Client.js +5 -5
- package/dist/api/resources/permissions/resources/policies/client/Client.js +5 -5
- package/dist/api/resources/permissions/resources/roles/client/Client.js +5 -5
- package/dist/api/resources/queryRunner/client/Client.js +2 -2
- package/dist/api/resources/schemas/client/Client.js +8 -8
- package/dist/api/resources/users/client/Client.js +6 -6
- package/dist/api/resources/webhooks/client/Client.js +7 -7
- package/dist/api/types/BackendConnectionCapabilities.d.ts +4 -4
- package/dist/api/types/ConnectionType.d.ts +1 -1
- package/dist/api/types/V4GlobalErrorSubscribersResponse.d.ts +6 -0
- package/dist/api/types/V4GlobalErrorSubscribersResponse.js +5 -0
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +90 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -96,7 +96,7 @@ class ModelSync {
|
|
|
96
96
|
method: "GET",
|
|
97
97
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
98
98
|
? yield core.Supplier.get(this._options.version)
|
|
99
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
99
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
100
100
|
contentType: "application/json",
|
|
101
101
|
queryParameters: _queryParams,
|
|
102
102
|
requestType: "json",
|
|
@@ -168,7 +168,7 @@ class ModelSync {
|
|
|
168
168
|
method: "GET",
|
|
169
169
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
170
170
|
? yield core.Supplier.get(this._options.version)
|
|
171
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
171
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
172
172
|
contentType: "application/json",
|
|
173
173
|
queryParameters: _queryParams,
|
|
174
174
|
requestType: "json",
|
|
@@ -247,7 +247,7 @@ class ModelSync {
|
|
|
247
247
|
method: "GET",
|
|
248
248
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
249
249
|
? yield core.Supplier.get(this._options.version)
|
|
250
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
250
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
251
251
|
contentType: "application/json",
|
|
252
252
|
queryParameters: _queryParams,
|
|
253
253
|
requestType: "json",
|
|
@@ -378,7 +378,7 @@ class ModelSync {
|
|
|
378
378
|
method: "POST",
|
|
379
379
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
380
380
|
? yield core.Supplier.get(this._options.version)
|
|
381
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
381
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
382
382
|
contentType: "application/json",
|
|
383
383
|
requestType: "json",
|
|
384
384
|
body: request,
|
|
@@ -440,7 +440,7 @@ class ModelSync {
|
|
|
440
440
|
method: "GET",
|
|
441
441
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
442
442
|
? yield core.Supplier.get(this._options.version)
|
|
443
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
443
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
444
444
|
contentType: "application/json",
|
|
445
445
|
requestType: "json",
|
|
446
446
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -497,7 +497,7 @@ class ModelSync {
|
|
|
497
497
|
method: "GET",
|
|
498
498
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
499
499
|
? yield core.Supplier.get(this._options.version)
|
|
500
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
500
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
501
501
|
contentType: "application/json",
|
|
502
502
|
requestType: "json",
|
|
503
503
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -570,7 +570,7 @@ class ModelSync {
|
|
|
570
570
|
method: "PUT",
|
|
571
571
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
572
572
|
? yield core.Supplier.get(this._options.version)
|
|
573
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
573
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
574
574
|
contentType: "application/json",
|
|
575
575
|
requestType: "json",
|
|
576
576
|
body: request,
|
|
@@ -638,7 +638,7 @@ class ModelSync {
|
|
|
638
638
|
method: "DELETE",
|
|
639
639
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
640
640
|
? yield core.Supplier.get(this._options.version)
|
|
641
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
641
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
642
642
|
contentType: "application/json",
|
|
643
643
|
requestType: "json",
|
|
644
644
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -705,7 +705,7 @@ class ModelSync {
|
|
|
705
705
|
method: "POST",
|
|
706
706
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
707
707
|
? yield core.Supplier.get(this._options.version)
|
|
708
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
708
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
709
709
|
contentType: "application/json",
|
|
710
710
|
requestType: "json",
|
|
711
711
|
body: request,
|
|
@@ -768,7 +768,7 @@ class ModelSync {
|
|
|
768
768
|
method: "POST",
|
|
769
769
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
770
770
|
? yield core.Supplier.get(this._options.version)
|
|
771
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
771
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
772
772
|
contentType: "application/json",
|
|
773
773
|
requestType: "json",
|
|
774
774
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -837,7 +837,7 @@ class ModelSync {
|
|
|
837
837
|
method: "POST",
|
|
838
838
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
839
839
|
? yield core.Supplier.get(this._options.version)
|
|
840
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
840
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
841
841
|
contentType: "application/json",
|
|
842
842
|
requestType: "json",
|
|
843
843
|
body: request,
|
|
@@ -903,7 +903,7 @@ class ModelSync {
|
|
|
903
903
|
method: "GET",
|
|
904
904
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
905
905
|
? yield core.Supplier.get(this._options.version)
|
|
906
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
906
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
907
907
|
contentType: "application/json",
|
|
908
908
|
requestType: "json",
|
|
909
909
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -92,7 +92,7 @@ class Executions {
|
|
|
92
92
|
method: "GET",
|
|
93
93
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
94
94
|
? yield core.Supplier.get(this._options.version)
|
|
95
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
95
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
96
96
|
contentType: "application/json",
|
|
97
97
|
queryParameters: _queryParams,
|
|
98
98
|
requestType: "json",
|
|
@@ -151,7 +151,7 @@ class Executions {
|
|
|
151
151
|
method: "GET",
|
|
152
152
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
153
153
|
? yield core.Supplier.get(this._options.version)
|
|
154
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
154
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
155
155
|
contentType: "application/json",
|
|
156
156
|
requestType: "json",
|
|
157
157
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -216,7 +216,7 @@ class Executions {
|
|
|
216
216
|
method: "PUT",
|
|
217
217
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
218
218
|
? yield core.Supplier.get(this._options.version)
|
|
219
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
219
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
220
220
|
contentType: "application/json",
|
|
221
221
|
requestType: "json",
|
|
222
222
|
body: request,
|
|
@@ -283,7 +283,7 @@ class Executions {
|
|
|
283
283
|
method: "GET",
|
|
284
284
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
285
285
|
? yield core.Supplier.get(this._options.version)
|
|
286
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
286
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
287
287
|
contentType: "application/json",
|
|
288
288
|
requestType: "json",
|
|
289
289
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -348,7 +348,7 @@ class Executions {
|
|
|
348
348
|
method: "GET",
|
|
349
349
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
350
350
|
? yield core.Supplier.get(this._options.version)
|
|
351
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
351
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
352
352
|
contentType: "application/json",
|
|
353
353
|
requestType: "json",
|
|
354
354
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -88,7 +88,7 @@ class Targets {
|
|
|
88
88
|
method: "GET",
|
|
89
89
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
90
90
|
? yield core.Supplier.get(this._options.version)
|
|
91
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
91
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
92
92
|
contentType: "application/json",
|
|
93
93
|
queryParameters: _queryParams,
|
|
94
94
|
requestType: "json",
|
|
@@ -163,7 +163,7 @@ class Targets {
|
|
|
163
163
|
method: "GET",
|
|
164
164
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
165
165
|
? yield core.Supplier.get(this._options.version)
|
|
166
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
166
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
167
167
|
contentType: "application/json",
|
|
168
168
|
queryParameters: _queryParams,
|
|
169
169
|
requestType: "json",
|
|
@@ -245,7 +245,7 @@ class Targets {
|
|
|
245
245
|
method: "GET",
|
|
246
246
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
247
247
|
? yield core.Supplier.get(this._options.version)
|
|
248
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
248
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
249
249
|
contentType: "application/json",
|
|
250
250
|
requestType: "json",
|
|
251
251
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -342,7 +342,7 @@ class Targets {
|
|
|
342
342
|
method: "GET",
|
|
343
343
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
344
344
|
? yield core.Supplier.get(this._options.version)
|
|
345
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
345
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
346
346
|
contentType: "application/json",
|
|
347
347
|
requestType: "json",
|
|
348
348
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -97,7 +97,7 @@ class Models {
|
|
|
97
97
|
method: "GET",
|
|
98
98
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
99
99
|
? yield core.Supplier.get(this._options.version)
|
|
100
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
100
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
101
101
|
contentType: "application/json",
|
|
102
102
|
queryParameters: _queryParams,
|
|
103
103
|
requestType: "json",
|
|
@@ -165,7 +165,7 @@ class Models {
|
|
|
165
165
|
method: "POST",
|
|
166
166
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
167
167
|
? yield core.Supplier.get(this._options.version)
|
|
168
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
168
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
169
169
|
contentType: "application/json",
|
|
170
170
|
requestType: "json",
|
|
171
171
|
body: request,
|
|
@@ -241,7 +241,7 @@ class Models {
|
|
|
241
241
|
method: "POST",
|
|
242
242
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
243
243
|
? yield core.Supplier.get(this._options.version)
|
|
244
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
244
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
245
245
|
contentType: "application/json",
|
|
246
246
|
queryParameters: _queryParams,
|
|
247
247
|
requestType: "json",
|
|
@@ -302,7 +302,7 @@ class Models {
|
|
|
302
302
|
method: "GET",
|
|
303
303
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
304
304
|
? yield core.Supplier.get(this._options.version)
|
|
305
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
305
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
306
306
|
contentType: "application/json",
|
|
307
307
|
requestType: "json",
|
|
308
308
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -373,7 +373,7 @@ class Models {
|
|
|
373
373
|
method: "POST",
|
|
374
374
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
375
375
|
? yield core.Supplier.get(this._options.version)
|
|
376
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
376
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
377
377
|
contentType: "application/json",
|
|
378
378
|
queryParameters: _queryParams,
|
|
379
379
|
requestType: "json",
|
|
@@ -442,7 +442,7 @@ class Models {
|
|
|
442
442
|
method: "GET",
|
|
443
443
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
444
444
|
? yield core.Supplier.get(this._options.version)
|
|
445
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
445
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
446
446
|
contentType: "application/json",
|
|
447
447
|
queryParameters: _queryParams,
|
|
448
448
|
requestType: "json",
|
|
@@ -516,7 +516,7 @@ class Models {
|
|
|
516
516
|
method: "PUT",
|
|
517
517
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
518
518
|
? yield core.Supplier.get(this._options.version)
|
|
519
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
519
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
520
520
|
contentType: "application/json",
|
|
521
521
|
queryParameters: _queryParams,
|
|
522
522
|
requestType: "json",
|
|
@@ -586,7 +586,7 @@ class Models {
|
|
|
586
586
|
method: "DELETE",
|
|
587
587
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
588
588
|
? yield core.Supplier.get(this._options.version)
|
|
589
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
589
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
590
590
|
contentType: "application/json",
|
|
591
591
|
queryParameters: _queryParams,
|
|
592
592
|
requestType: "json",
|
|
@@ -657,7 +657,7 @@ class Models {
|
|
|
657
657
|
method: "GET",
|
|
658
658
|
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
659
659
|
? yield core.Supplier.get(this._options.version)
|
|
660
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.
|
|
660
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
661
661
|
contentType: "application/json",
|
|
662
662
|
queryParameters: _queryParams,
|
|
663
663
|
requestType: "json",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as Polytomic from "../../../index";
|
|
7
|
+
export declare namespace Notifications {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.PolytomicEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token: core.Supplier<core.BearerToken>;
|
|
13
|
+
/** Override the X-Polytomic-Version header */
|
|
14
|
+
version?: core.Supplier<string | undefined>;
|
|
15
|
+
}
|
|
16
|
+
interface RequestOptions {
|
|
17
|
+
/** The maximum time to wait for a response in seconds. */
|
|
18
|
+
timeoutInSeconds?: number;
|
|
19
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
20
|
+
maxRetries?: number;
|
|
21
|
+
/** A hook to abort the request. */
|
|
22
|
+
abortSignal?: AbortSignal;
|
|
23
|
+
/** Override the X-Polytomic-Version header */
|
|
24
|
+
version?: string | undefined;
|
|
25
|
+
/** Additional headers to include in the request. */
|
|
26
|
+
headers?: Record<string, string>;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export declare class Notifications {
|
|
30
|
+
protected readonly _options: Notifications.Options;
|
|
31
|
+
constructor(_options: Notifications.Options);
|
|
32
|
+
/**
|
|
33
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
+
*
|
|
35
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
36
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.notifications.getGlobalErrorSubscribers()
|
|
40
|
+
*/
|
|
41
|
+
getGlobalErrorSubscribers(requestOptions?: Notifications.RequestOptions): Promise<Polytomic.V4GlobalErrorSubscribersResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* @param {Polytomic.V4GlobalErrorSubscribersRequest} request
|
|
44
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
+
*
|
|
46
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
47
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
48
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* await client.notifications.setGlobalErrorSubscribers()
|
|
52
|
+
*/
|
|
53
|
+
setGlobalErrorSubscribers(request?: Polytomic.V4GlobalErrorSubscribersRequest, requestOptions?: Notifications.RequestOptions): Promise<Polytomic.V4GlobalErrorSubscribersResponse>;
|
|
54
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.Notifications = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../core"));
|
|
54
|
+
const Polytomic = __importStar(require("../../../index"));
|
|
55
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
57
|
+
class Notifications {
|
|
58
|
+
constructor(_options) {
|
|
59
|
+
this._options = _options;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
65
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.notifications.getGlobalErrorSubscribers()
|
|
69
|
+
*/
|
|
70
|
+
getGlobalErrorSubscribers(requestOptions) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
const _response = yield core.fetcher({
|
|
74
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/notifications/global-error-subscribers"),
|
|
75
|
+
method: "GET",
|
|
76
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
77
|
+
? yield core.Supplier.get(this._options.version)
|
|
78
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
|
+
contentType: "application/json",
|
|
80
|
+
requestType: "json",
|
|
81
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
84
|
+
});
|
|
85
|
+
if (_response.ok) {
|
|
86
|
+
return _response.body;
|
|
87
|
+
}
|
|
88
|
+
if (_response.error.reason === "status-code") {
|
|
89
|
+
switch (_response.error.statusCode) {
|
|
90
|
+
case 401:
|
|
91
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
92
|
+
case 500:
|
|
93
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
94
|
+
default:
|
|
95
|
+
throw new errors.PolytomicError({
|
|
96
|
+
statusCode: _response.error.statusCode,
|
|
97
|
+
body: _response.error.body,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
switch (_response.error.reason) {
|
|
102
|
+
case "non-json":
|
|
103
|
+
throw new errors.PolytomicError({
|
|
104
|
+
statusCode: _response.error.statusCode,
|
|
105
|
+
body: _response.error.rawBody,
|
|
106
|
+
});
|
|
107
|
+
case "timeout":
|
|
108
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/notifications/global-error-subscribers.");
|
|
109
|
+
case "unknown":
|
|
110
|
+
throw new errors.PolytomicError({
|
|
111
|
+
message: _response.error.errorMessage,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @param {Polytomic.V4GlobalErrorSubscribersRequest} request
|
|
118
|
+
* @param {Notifications.RequestOptions} requestOptions - Request-specific configuration.
|
|
119
|
+
*
|
|
120
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
121
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
122
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* await client.notifications.setGlobalErrorSubscribers()
|
|
126
|
+
*/
|
|
127
|
+
setGlobalErrorSubscribers() {
|
|
128
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
129
|
+
var _a, _b;
|
|
130
|
+
const _response = yield core.fetcher({
|
|
131
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/notifications/global-error-subscribers"),
|
|
132
|
+
method: "PUT",
|
|
133
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
134
|
+
? yield core.Supplier.get(this._options.version)
|
|
135
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.15.2", "User-Agent": "polytomic/1.15.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
136
|
+
contentType: "application/json",
|
|
137
|
+
requestType: "json",
|
|
138
|
+
body: request,
|
|
139
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
140
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
141
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
142
|
+
});
|
|
143
|
+
if (_response.ok) {
|
|
144
|
+
return _response.body;
|
|
145
|
+
}
|
|
146
|
+
if (_response.error.reason === "status-code") {
|
|
147
|
+
switch (_response.error.statusCode) {
|
|
148
|
+
case 400:
|
|
149
|
+
throw new Polytomic.BadRequestError(_response.error.body);
|
|
150
|
+
case 401:
|
|
151
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
152
|
+
case 500:
|
|
153
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
154
|
+
default:
|
|
155
|
+
throw new errors.PolytomicError({
|
|
156
|
+
statusCode: _response.error.statusCode,
|
|
157
|
+
body: _response.error.body,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
switch (_response.error.reason) {
|
|
162
|
+
case "non-json":
|
|
163
|
+
throw new errors.PolytomicError({
|
|
164
|
+
statusCode: _response.error.statusCode,
|
|
165
|
+
body: _response.error.rawBody,
|
|
166
|
+
});
|
|
167
|
+
case "timeout":
|
|
168
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/notifications/global-error-subscribers.");
|
|
169
|
+
case "unknown":
|
|
170
|
+
throw new errors.PolytomicError({
|
|
171
|
+
message: _response.error.errorMessage,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
_getAuthorizationHeader() {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
exports.Notifications = Notifications;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./requests"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type V4GlobalErrorSubscribersRequest } from "./V4GlobalErrorSubscribersRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./client"), exports);
|