@nvisy/sdk 0.51.0 → 0.53.0
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/CHANGELOG.md +48 -1
- package/dist/{client-SotZfT6b.d.ts → client-DywPcOzJ.d.ts} +127 -22
- package/dist/client-DywPcOzJ.d.ts.map +1 -0
- package/dist/datatypes/index.d.ts +2 -2
- package/dist/{error-DTQ8nnQc.js → error-D_h2zq6T.js} +3 -3
- package/dist/{error-DTQ8nnQc.js.map → error-D_h2zq6T.js.map} +1 -1
- package/dist/{errors-D2J3LbE-.js → errors-ChRSBkhj.js} +2 -9
- package/dist/errors-ChRSBkhj.js.map +1 -0
- package/dist/{errors-ClHc4LMK.d.ts → errors-aOivXE8A.d.ts} +2 -7
- package/dist/errors-aOivXE8A.d.ts.map +1 -0
- package/dist/{index-BxYFvgTy.d.ts → index-rc5Y8RNG.d.ts} +4558 -3089
- package/dist/index-rc5Y8RNG.d.ts.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/services/index.d.ts +2 -2
- package/dist/services/index.js +2 -2
- package/dist/{services-CFFmQDgA.js → services-DFJfjW1b.js} +324 -158
- package/dist/services-DFJfjW1b.js.map +1 -0
- package/dist/standalone/index.d.ts +4 -13
- package/dist/standalone/index.d.ts.map +1 -1
- package/dist/standalone/index.js +6 -7
- package/dist/standalone/index.js.map +1 -1
- package/dist/webhooks/index.d.ts +2 -2
- package/dist/webhooks/index.js +1 -1
- package/package.json +3 -3
- package/dist/client-SotZfT6b.d.ts.map +0 -1
- package/dist/errors-ClHc4LMK.d.ts.map +0 -1
- package/dist/errors-D2J3LbE-.js.map +0 -1
- package/dist/index-BxYFvgTy.d.ts.map +0 -1
- package/dist/services-CFFmQDgA.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as NvisyError } from "./errors-
|
|
1
|
+
import { n as NvisyError } from "./errors-ChRSBkhj.js";
|
|
2
2
|
|
|
3
3
|
//#region src/services/account.ts
|
|
4
4
|
/**
|
|
@@ -15,7 +15,7 @@ var Account = class {
|
|
|
15
15
|
* @throws {ApiError} if the request fails
|
|
16
16
|
*/
|
|
17
17
|
async getAccount() {
|
|
18
|
-
const { data } = await this.#api.GET("/account
|
|
18
|
+
const { data } = await this.#api.GET("/account");
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -25,7 +25,7 @@ var Account = class {
|
|
|
25
25
|
* @throws {ApiError} if the request fails
|
|
26
26
|
*/
|
|
27
27
|
async updateAccount(updates) {
|
|
28
|
-
const { data } = await this.#api.PATCH("/account
|
|
28
|
+
const { data } = await this.#api.PATCH("/account", { body: updates });
|
|
29
29
|
return data;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
@@ -34,7 +34,7 @@ var Account = class {
|
|
|
34
34
|
* @throws {ApiError} if the request fails
|
|
35
35
|
*/
|
|
36
36
|
async deleteAccount() {
|
|
37
|
-
await this.#api.DELETE("/account
|
|
37
|
+
await this.#api.DELETE("/account");
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Get a public account profile by account id
|
|
@@ -43,7 +43,7 @@ var Account = class {
|
|
|
43
43
|
* @throws {ApiError} if the request fails
|
|
44
44
|
*/
|
|
45
45
|
async getPublicAccount(accountId) {
|
|
46
|
-
const { data } = await this.#api.GET("/accounts/{accountId}
|
|
46
|
+
const { data } = await this.#api.GET("/accounts/{accountId}", { params: { path: { accountId } } });
|
|
47
47
|
return data;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
@@ -57,7 +57,7 @@ var Account = class {
|
|
|
57
57
|
const formData = new FormData();
|
|
58
58
|
const name = avatar instanceof File ? avatar.name : "avatar";
|
|
59
59
|
formData.append("avatar", avatar, name);
|
|
60
|
-
const { data } = await this.#api.PUT("/accounts/{accountId}/avatar
|
|
60
|
+
const { data } = await this.#api.PUT("/accounts/{accountId}/avatar", {
|
|
61
61
|
params: { path: { accountId } },
|
|
62
62
|
body: formData,
|
|
63
63
|
bodySerializer: (formData) => formData,
|
|
@@ -72,7 +72,7 @@ var Account = class {
|
|
|
72
72
|
* @throws {ApiError} if the request fails
|
|
73
73
|
*/
|
|
74
74
|
async deleteAvatar(accountId) {
|
|
75
|
-
await this.#api.DELETE("/accounts/{accountId}/avatar
|
|
75
|
+
await this.#api.DELETE("/accounts/{accountId}/avatar", { params: { path: { accountId } } });
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* List the account's sign-in methods: its password and linked providers.
|
|
@@ -80,7 +80,7 @@ var Account = class {
|
|
|
80
80
|
* @throws {ApiError} if the request fails
|
|
81
81
|
*/
|
|
82
82
|
async listIdentities() {
|
|
83
|
-
const { data } = await this.#api.GET("/account/identities
|
|
83
|
+
const { data } = await this.#api.GET("/account/identities");
|
|
84
84
|
return data;
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
@@ -95,7 +95,7 @@ var Account = class {
|
|
|
95
95
|
* @throws {ApiError} if the request fails
|
|
96
96
|
*/
|
|
97
97
|
async setPassword(request) {
|
|
98
|
-
await this.#api.PUT("/account/identities/password
|
|
98
|
+
await this.#api.PUT("/account/identities/password", { body: request });
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
101
|
* Remove the account's password, leaving only its linked providers.
|
|
@@ -106,7 +106,7 @@ var Account = class {
|
|
|
106
106
|
* @throws {ApiError} if the request fails
|
|
107
107
|
*/
|
|
108
108
|
async removePassword() {
|
|
109
|
-
await this.#api.DELETE("/account/identities/password
|
|
109
|
+
await this.#api.DELETE("/account/identities/password");
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* Begin linking an OIDC provider to the account.
|
|
@@ -121,7 +121,7 @@ var Account = class {
|
|
|
121
121
|
* @throws {ApiError} if the request fails
|
|
122
122
|
*/
|
|
123
123
|
async linkIdentity(provider, query) {
|
|
124
|
-
const { data } = await this.#api.POST("/account/identities/{provider}
|
|
124
|
+
const { data } = await this.#api.POST("/account/identities/{provider}", { params: {
|
|
125
125
|
path: { provider },
|
|
126
126
|
query
|
|
127
127
|
} });
|
|
@@ -137,7 +137,7 @@ var Account = class {
|
|
|
137
137
|
* @throws {ApiError} if the request fails
|
|
138
138
|
*/
|
|
139
139
|
async unlinkIdentity(provider) {
|
|
140
|
-
await this.#api.DELETE("/account/identities/{provider}
|
|
140
|
+
await this.#api.DELETE("/account/identities/{provider}", { params: { path: { provider } } });
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* Begin a step-up re-authentication with an already-linked provider.
|
|
@@ -152,7 +152,7 @@ var Account = class {
|
|
|
152
152
|
* @throws {ApiError} if the request fails
|
|
153
153
|
*/
|
|
154
154
|
async reauth(provider, query) {
|
|
155
|
-
const { data } = await this.#api.GET("/auth/{provider}/reauth
|
|
155
|
+
const { data } = await this.#api.GET("/auth/{provider}/reauth", { params: {
|
|
156
156
|
path: { provider },
|
|
157
157
|
query
|
|
158
158
|
} });
|
|
@@ -179,7 +179,7 @@ var Activities = class {
|
|
|
179
179
|
* @throws {ApiError} if the request fails
|
|
180
180
|
*/
|
|
181
181
|
async listActivities(workspaceId, query) {
|
|
182
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/activities
|
|
182
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/activities", { params: {
|
|
183
183
|
path: { workspaceId },
|
|
184
184
|
query
|
|
185
185
|
} });
|
|
@@ -222,7 +222,7 @@ var Analytics = class {
|
|
|
222
222
|
* @throws {ApiError} if the request fails
|
|
223
223
|
*/
|
|
224
224
|
async getAnalytics(workspaceId) {
|
|
225
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/analytics
|
|
225
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/analytics", { params: { path: { workspaceId } } });
|
|
226
226
|
return data;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
@@ -233,7 +233,7 @@ var Analytics = class {
|
|
|
233
233
|
* @throws {ApiError} if the request fails
|
|
234
234
|
*/
|
|
235
235
|
async getDetectionTimeSeries(workspaceId, query) {
|
|
236
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/analytics/detections/timeseries
|
|
236
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/analytics/detections/timeseries", { params: {
|
|
237
237
|
path: { workspaceId },
|
|
238
238
|
query
|
|
239
239
|
} });
|
|
@@ -258,7 +258,7 @@ var ApiTokens = class {
|
|
|
258
258
|
* @throws {ApiError} if the request fails
|
|
259
259
|
*/
|
|
260
260
|
async listApiTokens(query) {
|
|
261
|
-
const { data } = await this.#api.GET("/api-tokens
|
|
261
|
+
const { data } = await this.#api.GET("/api-tokens", { params: { query } });
|
|
262
262
|
return data;
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
@@ -268,7 +268,7 @@ var ApiTokens = class {
|
|
|
268
268
|
* @throws {ApiError} if the request fails
|
|
269
269
|
*/
|
|
270
270
|
async getApiToken(tokenId) {
|
|
271
|
-
const { data } = await this.#api.GET("/api-tokens/{tokenId}
|
|
271
|
+
const { data } = await this.#api.GET("/api-tokens/{tokenId}", { params: { path: { tokenId } } });
|
|
272
272
|
return data;
|
|
273
273
|
}
|
|
274
274
|
/**
|
|
@@ -278,7 +278,7 @@ var ApiTokens = class {
|
|
|
278
278
|
* @throws {ApiError} if the request fails
|
|
279
279
|
*/
|
|
280
280
|
async createApiToken(token) {
|
|
281
|
-
const { data } = await this.#api.POST("/api-tokens
|
|
281
|
+
const { data } = await this.#api.POST("/api-tokens", { body: token });
|
|
282
282
|
return data;
|
|
283
283
|
}
|
|
284
284
|
/**
|
|
@@ -289,7 +289,7 @@ var ApiTokens = class {
|
|
|
289
289
|
* @throws {ApiError} if the request fails
|
|
290
290
|
*/
|
|
291
291
|
async updateApiToken(tokenId, updates) {
|
|
292
|
-
const { data } = await this.#api.PATCH("/api-tokens/{tokenId}
|
|
292
|
+
const { data } = await this.#api.PATCH("/api-tokens/{tokenId}", {
|
|
293
293
|
params: { path: { tokenId } },
|
|
294
294
|
body: updates
|
|
295
295
|
});
|
|
@@ -302,7 +302,7 @@ var ApiTokens = class {
|
|
|
302
302
|
* @throws {ApiError} if the request fails
|
|
303
303
|
*/
|
|
304
304
|
async revokeApiToken(tokenId) {
|
|
305
|
-
await this.#api.DELETE("/api-tokens/{tokenId}
|
|
305
|
+
await this.#api.DELETE("/api-tokens/{tokenId}", { params: { path: { tokenId } } });
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
308
|
|
|
@@ -328,7 +328,7 @@ var Auth = class {
|
|
|
328
328
|
* @throws {ApiError} if the request fails
|
|
329
329
|
*/
|
|
330
330
|
async loginAccount(credentials) {
|
|
331
|
-
await this.#api.POST("/auth/login
|
|
331
|
+
await this.#api.POST("/auth/login", { body: credentials });
|
|
332
332
|
}
|
|
333
333
|
/**
|
|
334
334
|
* Sign up a new account, starting a browser session.
|
|
@@ -342,7 +342,7 @@ var Auth = class {
|
|
|
342
342
|
* @throws {ApiError} if the request fails
|
|
343
343
|
*/
|
|
344
344
|
async signupAccount(credentials) {
|
|
345
|
-
await this.#api.POST("/auth/signup
|
|
345
|
+
await this.#api.POST("/auth/signup", { body: credentials });
|
|
346
346
|
}
|
|
347
347
|
/**
|
|
348
348
|
* Logout, invalidating the current session and clearing its cookies.
|
|
@@ -350,7 +350,7 @@ var Auth = class {
|
|
|
350
350
|
* @throws {ApiError} if the request fails
|
|
351
351
|
*/
|
|
352
352
|
async logoutAccount() {
|
|
353
|
-
await this.#api.POST("/auth/logout
|
|
353
|
+
await this.#api.POST("/auth/logout");
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
356
356
|
* Begin an OpenID Connect sign-in with a provider.
|
|
@@ -365,7 +365,7 @@ var Auth = class {
|
|
|
365
365
|
* @throws {ApiError} if the request fails
|
|
366
366
|
*/
|
|
367
367
|
async startOidcSignIn(provider, query) {
|
|
368
|
-
const { data } = await this.#api.GET("/auth/{provider}/start
|
|
368
|
+
const { data } = await this.#api.GET("/auth/{provider}/start", { params: {
|
|
369
369
|
path: { provider },
|
|
370
370
|
query
|
|
371
371
|
} });
|
|
@@ -384,7 +384,7 @@ var Auth = class {
|
|
|
384
384
|
* @throws {ApiError} if the request fails
|
|
385
385
|
*/
|
|
386
386
|
async mintDesktopToken(request) {
|
|
387
|
-
const { data } = await this.#api.POST("/auth/desktop/token
|
|
387
|
+
const { data } = await this.#api.POST("/auth/desktop/token", { body: request });
|
|
388
388
|
return data;
|
|
389
389
|
}
|
|
390
390
|
};
|
|
@@ -406,7 +406,7 @@ var Capabilities = class {
|
|
|
406
406
|
* @returns Promise that resolves with the label catalog.
|
|
407
407
|
*/
|
|
408
408
|
async listLabels() {
|
|
409
|
-
const { data } = await this.#api.GET("/capabilities/labels
|
|
409
|
+
const { data } = await this.#api.GET("/capabilities/labels");
|
|
410
410
|
return data;
|
|
411
411
|
}
|
|
412
412
|
/**
|
|
@@ -414,7 +414,7 @@ var Capabilities = class {
|
|
|
414
414
|
* @returns Promise that resolves with the recognizer catalog.
|
|
415
415
|
*/
|
|
416
416
|
async listRecognizers() {
|
|
417
|
-
const { data } = await this.#api.GET("/capabilities/recognizers
|
|
417
|
+
const { data } = await this.#api.GET("/capabilities/recognizers");
|
|
418
418
|
return data;
|
|
419
419
|
}
|
|
420
420
|
/**
|
|
@@ -428,7 +428,7 @@ var Capabilities = class {
|
|
|
428
428
|
* @returns Promise that resolves with the connector capabilities.
|
|
429
429
|
*/
|
|
430
430
|
async listConnectors() {
|
|
431
|
-
const { data } = await this.#api.GET("/capabilities/connectors
|
|
431
|
+
const { data } = await this.#api.GET("/capabilities/connectors");
|
|
432
432
|
return data;
|
|
433
433
|
}
|
|
434
434
|
/**
|
|
@@ -436,7 +436,7 @@ var Capabilities = class {
|
|
|
436
436
|
* @returns Promise that resolves with the auth capabilities.
|
|
437
437
|
*/
|
|
438
438
|
async getAuthCapabilities() {
|
|
439
|
-
const { data } = await this.#api.GET("/capabilities/auth
|
|
439
|
+
const { data } = await this.#api.GET("/capabilities/auth");
|
|
440
440
|
return data;
|
|
441
441
|
}
|
|
442
442
|
};
|
|
@@ -459,7 +459,7 @@ var Connections = class {
|
|
|
459
459
|
* @throws {ApiError} if the request fails
|
|
460
460
|
*/
|
|
461
461
|
async listConnections(workspaceId, query) {
|
|
462
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/connections
|
|
462
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/connections", { params: {
|
|
463
463
|
path: { workspaceId },
|
|
464
464
|
query
|
|
465
465
|
} });
|
|
@@ -473,7 +473,7 @@ var Connections = class {
|
|
|
473
473
|
* @throws {ApiError} if the request fails
|
|
474
474
|
*/
|
|
475
475
|
async createConnection(workspaceId, connection) {
|
|
476
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections
|
|
476
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections", {
|
|
477
477
|
params: { path: { workspaceId } },
|
|
478
478
|
body: connection
|
|
479
479
|
});
|
|
@@ -487,7 +487,7 @@ var Connections = class {
|
|
|
487
487
|
* @throws {ApiError} if the request fails
|
|
488
488
|
*/
|
|
489
489
|
async getConnection(workspaceId, connectionId) {
|
|
490
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/connections/{connectionId}
|
|
490
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/connections/{connectionId}", { params: { path: {
|
|
491
491
|
workspaceId,
|
|
492
492
|
connectionId
|
|
493
493
|
} } });
|
|
@@ -502,7 +502,7 @@ var Connections = class {
|
|
|
502
502
|
* @throws {ApiError} if the request fails
|
|
503
503
|
*/
|
|
504
504
|
async updateConnection(workspaceId, connectionId, updates) {
|
|
505
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/connections/{connectionId}
|
|
505
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/connections/{connectionId}", {
|
|
506
506
|
params: { path: {
|
|
507
507
|
workspaceId,
|
|
508
508
|
connectionId
|
|
@@ -519,7 +519,7 @@ var Connections = class {
|
|
|
519
519
|
* @throws {ApiError} if the request fails
|
|
520
520
|
*/
|
|
521
521
|
async deleteConnection(workspaceId, connectionId) {
|
|
522
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/connections/{connectionId}
|
|
522
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/connections/{connectionId}", { params: { path: {
|
|
523
523
|
workspaceId,
|
|
524
524
|
connectionId
|
|
525
525
|
} } });
|
|
@@ -532,7 +532,7 @@ var Connections = class {
|
|
|
532
532
|
* @throws {ApiError} if the request fails
|
|
533
533
|
*/
|
|
534
534
|
async verifyConnection(workspaceId, connectionId) {
|
|
535
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/verify
|
|
535
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/verify", { params: { path: {
|
|
536
536
|
workspaceId,
|
|
537
537
|
connectionId
|
|
538
538
|
} } });
|
|
@@ -552,7 +552,7 @@ var Connections = class {
|
|
|
552
552
|
* @throws {ApiError} if the request fails
|
|
553
553
|
*/
|
|
554
554
|
async startFileServiceOAuth(workspaceId, provider, request) {
|
|
555
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/oauth/{provider}/start
|
|
555
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/oauth/{provider}/start", {
|
|
556
556
|
params: { path: {
|
|
557
557
|
workspaceId,
|
|
558
558
|
provider
|
|
@@ -575,7 +575,7 @@ var Connections = class {
|
|
|
575
575
|
* @throws {ApiError} if the request fails
|
|
576
576
|
*/
|
|
577
577
|
async importFiles(workspaceId, connectionId, request) {
|
|
578
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/import
|
|
578
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/import", {
|
|
579
579
|
params: { path: {
|
|
580
580
|
workspaceId,
|
|
581
581
|
connectionId
|
|
@@ -598,7 +598,7 @@ var Connections = class {
|
|
|
598
598
|
* @throws {ApiError} if the request fails
|
|
599
599
|
*/
|
|
600
600
|
async exportFiles(workspaceId, connectionId, request) {
|
|
601
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/export
|
|
601
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/export", {
|
|
602
602
|
params: { path: {
|
|
603
603
|
workspaceId,
|
|
604
604
|
connectionId
|
|
@@ -621,7 +621,7 @@ var Connections = class {
|
|
|
621
621
|
* @throws {ApiError} if the request fails
|
|
622
622
|
*/
|
|
623
623
|
async getPickerToken(workspaceId, connectionId, request = {}) {
|
|
624
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/picker-token
|
|
624
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/picker-token", {
|
|
625
625
|
params: { path: {
|
|
626
626
|
workspaceId,
|
|
627
627
|
connectionId
|
|
@@ -706,7 +706,7 @@ var Detections = class {
|
|
|
706
706
|
* @throws {ApiError} if the request fails
|
|
707
707
|
*/
|
|
708
708
|
async listDetections(workspaceId, query) {
|
|
709
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/pipelines/detections
|
|
709
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/pipelines/detections", { params: {
|
|
710
710
|
path: { workspaceId },
|
|
711
711
|
query
|
|
712
712
|
} });
|
|
@@ -722,7 +722,7 @@ var Detections = class {
|
|
|
722
722
|
* @throws {ApiError} if the request fails
|
|
723
723
|
*/
|
|
724
724
|
async listPipelineDetections(workspaceId, pipelineId, query) {
|
|
725
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/pipelines/{pipelineId}/detections
|
|
725
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/pipelines/{pipelineId}/detections", { params: {
|
|
726
726
|
path: {
|
|
727
727
|
workspaceId,
|
|
728
728
|
pipelineId
|
|
@@ -740,7 +740,7 @@ var Detections = class {
|
|
|
740
740
|
* @throws {ApiError} if the request fails
|
|
741
741
|
*/
|
|
742
742
|
async createDetection(workspaceId, pipelineId, detection) {
|
|
743
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/pipelines/{pipelineId}/detections
|
|
743
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/pipelines/{pipelineId}/detections", {
|
|
744
744
|
params: { path: {
|
|
745
745
|
workspaceId,
|
|
746
746
|
pipelineId
|
|
@@ -757,7 +757,7 @@ var Detections = class {
|
|
|
757
757
|
* @throws {ApiError} if the request fails
|
|
758
758
|
*/
|
|
759
759
|
async createAdhocDetection(workspaceId, detection) {
|
|
760
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/detections
|
|
760
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/detections", {
|
|
761
761
|
params: { path: { workspaceId } },
|
|
762
762
|
body: detection
|
|
763
763
|
});
|
|
@@ -771,7 +771,7 @@ var Detections = class {
|
|
|
771
771
|
* @throws {ApiError} if the request fails
|
|
772
772
|
*/
|
|
773
773
|
async getDetection(workspaceId, detectionId) {
|
|
774
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}
|
|
774
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}", { params: { path: {
|
|
775
775
|
workspaceId,
|
|
776
776
|
detectionId
|
|
777
777
|
} } });
|
|
@@ -785,7 +785,7 @@ var Detections = class {
|
|
|
785
785
|
* @throws {ApiError} if the request fails
|
|
786
786
|
*/
|
|
787
787
|
async getAnalysis(workspaceId, detectionId) {
|
|
788
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/analysis
|
|
788
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/analysis", { params: { path: {
|
|
789
789
|
workspaceId,
|
|
790
790
|
detectionId
|
|
791
791
|
} } });
|
|
@@ -805,7 +805,7 @@ var Detections = class {
|
|
|
805
805
|
* @throws {ApiError} if the request fails (404 when there are none)
|
|
806
806
|
*/
|
|
807
807
|
async getIntermediates(workspaceId, detectionId) {
|
|
808
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/intermediates
|
|
808
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/intermediates", { params: { path: {
|
|
809
809
|
workspaceId,
|
|
810
810
|
detectionId
|
|
811
811
|
} } });
|
|
@@ -824,7 +824,7 @@ var Detections = class {
|
|
|
824
824
|
* @throws {ApiError} if the request fails
|
|
825
825
|
*/
|
|
826
826
|
async downloadAudit(workspaceId, detectionId, query) {
|
|
827
|
-
const { response } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/audit
|
|
827
|
+
const { response } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/audit", {
|
|
828
828
|
params: {
|
|
829
829
|
path: {
|
|
830
830
|
workspaceId,
|
|
@@ -850,7 +850,7 @@ var Detections = class {
|
|
|
850
850
|
* @throws {ApiError} if the request fails
|
|
851
851
|
*/
|
|
852
852
|
async events(workspaceId, detectionId) {
|
|
853
|
-
const { response } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/events
|
|
853
|
+
const { response } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/events", {
|
|
854
854
|
params: { path: {
|
|
855
855
|
workspaceId,
|
|
856
856
|
detectionId
|
|
@@ -886,7 +886,7 @@ var Detections = class {
|
|
|
886
886
|
* @throws {ApiError} if the request fails
|
|
887
887
|
*/
|
|
888
888
|
async listRedactions(workspaceId, detectionId, query) {
|
|
889
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/redactions
|
|
889
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/detections/{detectionId}/redactions", { params: {
|
|
890
890
|
path: {
|
|
891
891
|
workspaceId,
|
|
892
892
|
detectionId
|
|
@@ -904,7 +904,7 @@ var Detections = class {
|
|
|
904
904
|
* @throws {ApiError} if the request fails
|
|
905
905
|
*/
|
|
906
906
|
async createRedaction(workspaceId, detectionId, redaction) {
|
|
907
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/detections/{detectionId}/redactions
|
|
907
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/detections/{detectionId}/redactions", {
|
|
908
908
|
params: { path: {
|
|
909
909
|
workspaceId,
|
|
910
910
|
detectionId
|
|
@@ -918,7 +918,7 @@ var Detections = class {
|
|
|
918
918
|
//#endregion
|
|
919
919
|
//#region src/services/documents.ts
|
|
920
920
|
/**
|
|
921
|
-
* Service for handling document operations
|
|
921
|
+
* Service for handling document operations.
|
|
922
922
|
*/
|
|
923
923
|
var Documents = class {
|
|
924
924
|
#api;
|
|
@@ -939,7 +939,7 @@ var Documents = class {
|
|
|
939
939
|
const name = document instanceof File ? document.name : "document";
|
|
940
940
|
formData.append("documents", document, name);
|
|
941
941
|
}
|
|
942
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/documents
|
|
942
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/documents", {
|
|
943
943
|
params: { path: { workspaceId } },
|
|
944
944
|
body: formData,
|
|
945
945
|
bodySerializer: (formData) => formData,
|
|
@@ -956,7 +956,7 @@ var Documents = class {
|
|
|
956
956
|
* @throws {ApiError} if the request fails
|
|
957
957
|
*/
|
|
958
958
|
async listDocuments(workspaceId, query) {
|
|
959
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/documents
|
|
959
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/documents", { params: {
|
|
960
960
|
path: { workspaceId },
|
|
961
961
|
query
|
|
962
962
|
} });
|
|
@@ -970,7 +970,7 @@ var Documents = class {
|
|
|
970
970
|
* @throws {ApiError} if the request fails
|
|
971
971
|
*/
|
|
972
972
|
async getDocument(workspaceId, documentId) {
|
|
973
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/documents/{documentId}
|
|
973
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/documents/{documentId}", { params: { path: {
|
|
974
974
|
workspaceId,
|
|
975
975
|
documentId
|
|
976
976
|
} } });
|
|
@@ -984,7 +984,7 @@ var Documents = class {
|
|
|
984
984
|
* @throws {ApiError} if the request fails
|
|
985
985
|
*/
|
|
986
986
|
async downloadDocument(workspaceId, documentId) {
|
|
987
|
-
const { response } = await this.#api.GET("/workspaces/{workspaceId}/documents/{documentId}/content
|
|
987
|
+
const { response } = await this.#api.GET("/workspaces/{workspaceId}/documents/{documentId}/content", {
|
|
988
988
|
params: { path: {
|
|
989
989
|
workspaceId,
|
|
990
990
|
documentId
|
|
@@ -1002,7 +1002,7 @@ var Documents = class {
|
|
|
1002
1002
|
* @throws {ApiError} if the request fails
|
|
1003
1003
|
*/
|
|
1004
1004
|
async updateDocument(workspaceId, documentId, updates) {
|
|
1005
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/documents/{documentId}
|
|
1005
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/documents/{documentId}", {
|
|
1006
1006
|
params: { path: {
|
|
1007
1007
|
workspaceId,
|
|
1008
1008
|
documentId
|
|
@@ -1019,7 +1019,7 @@ var Documents = class {
|
|
|
1019
1019
|
* @throws {ApiError} if the request fails
|
|
1020
1020
|
*/
|
|
1021
1021
|
async deleteDocument(workspaceId, documentId) {
|
|
1022
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/documents/{documentId}
|
|
1022
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/documents/{documentId}", { params: { path: {
|
|
1023
1023
|
workspaceId,
|
|
1024
1024
|
documentId
|
|
1025
1025
|
} } });
|
|
@@ -1037,44 +1037,12 @@ var Documents = class {
|
|
|
1037
1037
|
* @throws {ApiError} if the request fails
|
|
1038
1038
|
*/
|
|
1039
1039
|
async deleteDocuments(workspaceId, documentIds) {
|
|
1040
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/documents/delete
|
|
1040
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/documents/delete", {
|
|
1041
1041
|
params: { path: { workspaceId } },
|
|
1042
1042
|
body: { documentIds }
|
|
1043
1043
|
});
|
|
1044
1044
|
return data;
|
|
1045
1045
|
}
|
|
1046
|
-
/**
|
|
1047
|
-
* Assign a document for review, opening a review thread.
|
|
1048
|
-
* @param workspaceId - Workspace id
|
|
1049
|
-
* @param documentId - Document ID
|
|
1050
|
-
* @param assignment - Review assignment request
|
|
1051
|
-
* @returns Promise that resolves with the review thread
|
|
1052
|
-
* @throws {ApiError} if the request fails
|
|
1053
|
-
*/
|
|
1054
|
-
async assignReview(workspaceId, documentId, assignment) {
|
|
1055
|
-
const { data } = await this.#api.PUT("/workspaces/{workspaceId}/documents/{documentId}/review/assign/", {
|
|
1056
|
-
params: { path: {
|
|
1057
|
-
workspaceId,
|
|
1058
|
-
documentId
|
|
1059
|
-
} },
|
|
1060
|
-
body: assignment
|
|
1061
|
-
});
|
|
1062
|
-
return data;
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
* Mark a document's review as verified (resolved).
|
|
1066
|
-
* @param workspaceId - Workspace id
|
|
1067
|
-
* @param documentId - Document ID
|
|
1068
|
-
* @returns Promise that resolves with the review thread
|
|
1069
|
-
* @throws {ApiError} if the request fails
|
|
1070
|
-
*/
|
|
1071
|
-
async verifyReview(workspaceId, documentId) {
|
|
1072
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/documents/{documentId}/review/verify/", { params: { path: {
|
|
1073
|
-
workspaceId,
|
|
1074
|
-
documentId
|
|
1075
|
-
} } });
|
|
1076
|
-
return data;
|
|
1077
|
-
}
|
|
1078
1046
|
};
|
|
1079
1047
|
|
|
1080
1048
|
//#endregion
|
|
@@ -1095,7 +1063,7 @@ var Invites = class {
|
|
|
1095
1063
|
* @throws {ApiError} if the request fails
|
|
1096
1064
|
*/
|
|
1097
1065
|
async listInvites(workspaceId, query) {
|
|
1098
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/invites
|
|
1066
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/invites", { params: {
|
|
1099
1067
|
path: { workspaceId },
|
|
1100
1068
|
query
|
|
1101
1069
|
} });
|
|
@@ -1109,7 +1077,7 @@ var Invites = class {
|
|
|
1109
1077
|
* @throws {ApiError} if the request fails
|
|
1110
1078
|
*/
|
|
1111
1079
|
async sendInvite(workspaceId, invite) {
|
|
1112
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/invites
|
|
1080
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/invites", {
|
|
1113
1081
|
params: { path: { workspaceId } },
|
|
1114
1082
|
body: invite
|
|
1115
1083
|
});
|
|
@@ -1123,7 +1091,7 @@ var Invites = class {
|
|
|
1123
1091
|
* @throws {ApiError} if the request fails
|
|
1124
1092
|
*/
|
|
1125
1093
|
async cancelInvite(workspaceId, inviteId) {
|
|
1126
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/invites/{inviteId}
|
|
1094
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/invites/{inviteId}", { params: { path: {
|
|
1127
1095
|
workspaceId,
|
|
1128
1096
|
inviteId
|
|
1129
1097
|
} } });
|
|
@@ -1137,7 +1105,7 @@ var Invites = class {
|
|
|
1137
1105
|
* @throws {ApiError} if the request fails
|
|
1138
1106
|
*/
|
|
1139
1107
|
async replyToInvite(workspaceId, inviteId, reply) {
|
|
1140
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/invites/{inviteId}
|
|
1108
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/invites/{inviteId}", {
|
|
1141
1109
|
params: { path: {
|
|
1142
1110
|
workspaceId,
|
|
1143
1111
|
inviteId
|
|
@@ -1154,7 +1122,7 @@ var Invites = class {
|
|
|
1154
1122
|
* @throws {ApiError} if the request fails
|
|
1155
1123
|
*/
|
|
1156
1124
|
async generateInviteCode(workspaceId, options) {
|
|
1157
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/invites/code
|
|
1125
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/invites/code", {
|
|
1158
1126
|
params: { path: { workspaceId } },
|
|
1159
1127
|
body: options
|
|
1160
1128
|
});
|
|
@@ -1168,7 +1136,7 @@ var Invites = class {
|
|
|
1168
1136
|
* @throws {ApiError} if the request fails
|
|
1169
1137
|
*/
|
|
1170
1138
|
async replyToInviteCode(inviteCode, reply) {
|
|
1171
|
-
const { data } = await this.#api.POST("/invites/code/{inviteCode}
|
|
1139
|
+
const { data } = await this.#api.POST("/invites/code/{inviteCode}", {
|
|
1172
1140
|
params: { path: { inviteCode } },
|
|
1173
1141
|
body: reply
|
|
1174
1142
|
});
|
|
@@ -1181,7 +1149,7 @@ var Invites = class {
|
|
|
1181
1149
|
* @throws {ApiError} if the request fails
|
|
1182
1150
|
*/
|
|
1183
1151
|
async previewInvite(inviteCode) {
|
|
1184
|
-
const { data } = await this.#api.GET("/invites/code/{inviteCode}
|
|
1152
|
+
const { data } = await this.#api.GET("/invites/code/{inviteCode}", { params: { path: { inviteCode } } });
|
|
1185
1153
|
return data;
|
|
1186
1154
|
}
|
|
1187
1155
|
};
|
|
@@ -1204,7 +1172,7 @@ var Members = class {
|
|
|
1204
1172
|
* @throws {ApiError} if the request fails
|
|
1205
1173
|
*/
|
|
1206
1174
|
async listMembers(workspaceId, query) {
|
|
1207
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/members
|
|
1175
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/members", { params: {
|
|
1208
1176
|
path: { workspaceId },
|
|
1209
1177
|
query
|
|
1210
1178
|
} });
|
|
@@ -1218,7 +1186,7 @@ var Members = class {
|
|
|
1218
1186
|
* @throws {ApiError} if the request fails
|
|
1219
1187
|
*/
|
|
1220
1188
|
async getMember(workspaceId, accountId) {
|
|
1221
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/members/{accountId}
|
|
1189
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/members/{accountId}", { params: { path: {
|
|
1222
1190
|
workspaceId,
|
|
1223
1191
|
accountId
|
|
1224
1192
|
} } });
|
|
@@ -1233,7 +1201,7 @@ var Members = class {
|
|
|
1233
1201
|
* @throws {ApiError} if the request fails
|
|
1234
1202
|
*/
|
|
1235
1203
|
async updateMember(workspaceId, accountId, updates) {
|
|
1236
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/members/{accountId}
|
|
1204
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/members/{accountId}", {
|
|
1237
1205
|
params: { path: {
|
|
1238
1206
|
workspaceId,
|
|
1239
1207
|
accountId
|
|
@@ -1250,7 +1218,7 @@ var Members = class {
|
|
|
1250
1218
|
* @throws {ApiError} if the request fails
|
|
1251
1219
|
*/
|
|
1252
1220
|
async removeMember(workspaceId, accountId) {
|
|
1253
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/members/{accountId}
|
|
1221
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/members/{accountId}", { params: { path: {
|
|
1254
1222
|
workspaceId,
|
|
1255
1223
|
accountId
|
|
1256
1224
|
} } });
|
|
@@ -1262,7 +1230,7 @@ var Members = class {
|
|
|
1262
1230
|
* @throws {ApiError} if the request fails
|
|
1263
1231
|
*/
|
|
1264
1232
|
async leaveWorkspace(workspaceId) {
|
|
1265
|
-
await this.#api.POST("/workspaces/{workspaceId}/members/leave
|
|
1233
|
+
await this.#api.POST("/workspaces/{workspaceId}/members/leave", { params: { path: { workspaceId } } });
|
|
1266
1234
|
}
|
|
1267
1235
|
};
|
|
1268
1236
|
|
|
@@ -1283,7 +1251,7 @@ var Notifications = class {
|
|
|
1283
1251
|
* @throws {ApiError} if the request fails
|
|
1284
1252
|
*/
|
|
1285
1253
|
async listNotifications(query) {
|
|
1286
|
-
const { data } = await this.#api.GET("/notifications
|
|
1254
|
+
const { data } = await this.#api.GET("/notifications", { params: { query } });
|
|
1287
1255
|
return data;
|
|
1288
1256
|
}
|
|
1289
1257
|
/**
|
|
@@ -1292,7 +1260,7 @@ var Notifications = class {
|
|
|
1292
1260
|
* @throws {ApiError} if the request fails
|
|
1293
1261
|
*/
|
|
1294
1262
|
async getUnreadNotificationsStatus() {
|
|
1295
|
-
const { data } = await this.#api.GET("/notifications/unread
|
|
1263
|
+
const { data } = await this.#api.GET("/notifications/unread");
|
|
1296
1264
|
return data;
|
|
1297
1265
|
}
|
|
1298
1266
|
/**
|
|
@@ -1301,7 +1269,7 @@ var Notifications = class {
|
|
|
1301
1269
|
* @throws {ApiError} if the request fails
|
|
1302
1270
|
*/
|
|
1303
1271
|
async markAllRead() {
|
|
1304
|
-
const { data } = await this.#api.POST("/notifications/read
|
|
1272
|
+
const { data } = await this.#api.POST("/notifications/read");
|
|
1305
1273
|
return data;
|
|
1306
1274
|
}
|
|
1307
1275
|
/**
|
|
@@ -1310,7 +1278,7 @@ var Notifications = class {
|
|
|
1310
1278
|
* @throws {ApiError} if the request fails
|
|
1311
1279
|
*/
|
|
1312
1280
|
async markRead(notificationId) {
|
|
1313
|
-
await this.#api.POST("/notifications/{notificationId}/read
|
|
1281
|
+
await this.#api.POST("/notifications/{notificationId}/read", { params: { path: { notificationId } } });
|
|
1314
1282
|
}
|
|
1315
1283
|
/**
|
|
1316
1284
|
* Open the raw Server-Sent Events stream of the account's unread count.
|
|
@@ -1324,7 +1292,7 @@ var Notifications = class {
|
|
|
1324
1292
|
* @throws {ApiError} if the request fails
|
|
1325
1293
|
*/
|
|
1326
1294
|
async events() {
|
|
1327
|
-
const { response } = await this.#api.GET("/notifications/unread/events
|
|
1295
|
+
const { response } = await this.#api.GET("/notifications/unread/events", { parseAs: "stream" });
|
|
1328
1296
|
return response;
|
|
1329
1297
|
}
|
|
1330
1298
|
/**
|
|
@@ -1363,7 +1331,7 @@ var Pipelines = class {
|
|
|
1363
1331
|
* @throws {ApiError} if the request fails
|
|
1364
1332
|
*/
|
|
1365
1333
|
async listPipelines(workspaceId, query) {
|
|
1366
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/pipelines
|
|
1334
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/pipelines", { params: {
|
|
1367
1335
|
path: { workspaceId },
|
|
1368
1336
|
query
|
|
1369
1337
|
} });
|
|
@@ -1377,7 +1345,7 @@ var Pipelines = class {
|
|
|
1377
1345
|
* @throws {ApiError} if the request fails
|
|
1378
1346
|
*/
|
|
1379
1347
|
async createPipeline(workspaceId, pipeline) {
|
|
1380
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/pipelines
|
|
1348
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/pipelines", {
|
|
1381
1349
|
params: { path: { workspaceId } },
|
|
1382
1350
|
body: pipeline
|
|
1383
1351
|
});
|
|
@@ -1391,7 +1359,7 @@ var Pipelines = class {
|
|
|
1391
1359
|
* @throws {ApiError} if the request fails
|
|
1392
1360
|
*/
|
|
1393
1361
|
async getPipeline(workspaceId, pipelineId) {
|
|
1394
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/pipelines/{pipelineId}
|
|
1362
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/pipelines/{pipelineId}", { params: { path: {
|
|
1395
1363
|
workspaceId,
|
|
1396
1364
|
pipelineId
|
|
1397
1365
|
} } });
|
|
@@ -1406,7 +1374,7 @@ var Pipelines = class {
|
|
|
1406
1374
|
* @throws {ApiError} if the request fails
|
|
1407
1375
|
*/
|
|
1408
1376
|
async updatePipeline(workspaceId, pipelineId, updates) {
|
|
1409
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/pipelines/{pipelineId}
|
|
1377
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/pipelines/{pipelineId}", {
|
|
1410
1378
|
params: { path: {
|
|
1411
1379
|
workspaceId,
|
|
1412
1380
|
pipelineId
|
|
@@ -1423,7 +1391,7 @@ var Pipelines = class {
|
|
|
1423
1391
|
* @throws {ApiError} if the request fails
|
|
1424
1392
|
*/
|
|
1425
1393
|
async deletePipeline(workspaceId, pipelineId) {
|
|
1426
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/pipelines/{pipelineId}
|
|
1394
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/pipelines/{pipelineId}", { params: { path: {
|
|
1427
1395
|
workspaceId,
|
|
1428
1396
|
pipelineId
|
|
1429
1397
|
} } });
|
|
@@ -1448,7 +1416,7 @@ var Policies = class {
|
|
|
1448
1416
|
* @throws {ApiError} if the request fails
|
|
1449
1417
|
*/
|
|
1450
1418
|
async listPolicies(workspaceId, query) {
|
|
1451
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/policies
|
|
1419
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/policies", { params: {
|
|
1452
1420
|
path: { workspaceId },
|
|
1453
1421
|
query
|
|
1454
1422
|
} });
|
|
@@ -1462,7 +1430,7 @@ var Policies = class {
|
|
|
1462
1430
|
* @throws {ApiError} if the request fails
|
|
1463
1431
|
*/
|
|
1464
1432
|
async createPolicy(workspaceId, policy) {
|
|
1465
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/policies
|
|
1433
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/policies", {
|
|
1466
1434
|
params: { path: { workspaceId } },
|
|
1467
1435
|
body: policy
|
|
1468
1436
|
});
|
|
@@ -1476,7 +1444,7 @@ var Policies = class {
|
|
|
1476
1444
|
* @throws {ApiError} if the request fails
|
|
1477
1445
|
*/
|
|
1478
1446
|
async getPolicy(workspaceId, policyId) {
|
|
1479
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/policies/{policyId}
|
|
1447
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/policies/{policyId}", { params: { path: {
|
|
1480
1448
|
workspaceId,
|
|
1481
1449
|
policyId
|
|
1482
1450
|
} } });
|
|
@@ -1491,7 +1459,7 @@ var Policies = class {
|
|
|
1491
1459
|
* @throws {ApiError} if the request fails
|
|
1492
1460
|
*/
|
|
1493
1461
|
async updatePolicy(workspaceId, policyId, updates) {
|
|
1494
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/policies/{policyId}
|
|
1462
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/policies/{policyId}", {
|
|
1495
1463
|
params: { path: {
|
|
1496
1464
|
workspaceId,
|
|
1497
1465
|
policyId
|
|
@@ -1508,7 +1476,7 @@ var Policies = class {
|
|
|
1508
1476
|
* @throws {ApiError} if the request fails
|
|
1509
1477
|
*/
|
|
1510
1478
|
async deletePolicy(workspaceId, policyId) {
|
|
1511
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/policies/{policyId}
|
|
1479
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/policies/{policyId}", { params: { path: {
|
|
1512
1480
|
workspaceId,
|
|
1513
1481
|
policyId
|
|
1514
1482
|
} } });
|
|
@@ -1535,7 +1503,7 @@ var Providers = class {
|
|
|
1535
1503
|
* @throws {ApiError} if the request fails
|
|
1536
1504
|
*/
|
|
1537
1505
|
async listProviders(workspaceId, query) {
|
|
1538
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/providers
|
|
1506
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/providers", { params: {
|
|
1539
1507
|
path: { workspaceId },
|
|
1540
1508
|
query
|
|
1541
1509
|
} });
|
|
@@ -1549,7 +1517,7 @@ var Providers = class {
|
|
|
1549
1517
|
* @throws {ApiError} if the request fails
|
|
1550
1518
|
*/
|
|
1551
1519
|
async createProvider(workspaceId, provider) {
|
|
1552
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/providers
|
|
1520
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/providers", {
|
|
1553
1521
|
params: { path: { workspaceId } },
|
|
1554
1522
|
body: provider
|
|
1555
1523
|
});
|
|
@@ -1563,7 +1531,7 @@ var Providers = class {
|
|
|
1563
1531
|
* @throws {ApiError} if the request fails
|
|
1564
1532
|
*/
|
|
1565
1533
|
async getProvider(workspaceId, providerId) {
|
|
1566
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/providers/{providerId}
|
|
1534
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/providers/{providerId}", { params: { path: {
|
|
1567
1535
|
workspaceId,
|
|
1568
1536
|
providerId
|
|
1569
1537
|
} } });
|
|
@@ -1578,7 +1546,7 @@ var Providers = class {
|
|
|
1578
1546
|
* @throws {ApiError} if the request fails
|
|
1579
1547
|
*/
|
|
1580
1548
|
async updateProvider(workspaceId, providerId, updates) {
|
|
1581
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/providers/{providerId}
|
|
1549
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/providers/{providerId}", {
|
|
1582
1550
|
params: { path: {
|
|
1583
1551
|
workspaceId,
|
|
1584
1552
|
providerId
|
|
@@ -1595,7 +1563,7 @@ var Providers = class {
|
|
|
1595
1563
|
* @throws {ApiError} if the request fails
|
|
1596
1564
|
*/
|
|
1597
1565
|
async deleteProvider(workspaceId, providerId) {
|
|
1598
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/providers/{providerId}
|
|
1566
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/providers/{providerId}", { params: { path: {
|
|
1599
1567
|
workspaceId,
|
|
1600
1568
|
providerId
|
|
1601
1569
|
} } });
|
|
@@ -1608,7 +1576,7 @@ var Providers = class {
|
|
|
1608
1576
|
* @throws {ApiError} if the request fails
|
|
1609
1577
|
*/
|
|
1610
1578
|
async verifyProvider(workspaceId, providerId) {
|
|
1611
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/providers/{providerId}/verify
|
|
1579
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/providers/{providerId}/verify", { params: { path: {
|
|
1612
1580
|
workspaceId,
|
|
1613
1581
|
providerId
|
|
1614
1582
|
} } });
|
|
@@ -1643,6 +1611,176 @@ var Redactions = class {
|
|
|
1643
1611
|
}
|
|
1644
1612
|
};
|
|
1645
1613
|
|
|
1614
|
+
//#endregion
|
|
1615
|
+
//#region src/services/reviews.ts
|
|
1616
|
+
/**
|
|
1617
|
+
* Service for document reviews: assigning a document to a reviewer and tracking
|
|
1618
|
+
* the review through its lifecycle, with a timeline of events.
|
|
1619
|
+
*/
|
|
1620
|
+
var Reviews = class {
|
|
1621
|
+
#api;
|
|
1622
|
+
constructor(api) {
|
|
1623
|
+
this.#api = api;
|
|
1624
|
+
}
|
|
1625
|
+
/**
|
|
1626
|
+
* List the reviews on a document, most recent first.
|
|
1627
|
+
* @param workspaceId - Workspace id
|
|
1628
|
+
* @param documentId - Document ID
|
|
1629
|
+
* @returns Promise that resolves with the document's reviews
|
|
1630
|
+
* @throws {ApiError} if the request fails
|
|
1631
|
+
*/
|
|
1632
|
+
async listForDocument(workspaceId, documentId) {
|
|
1633
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/documents/{documentId}/reviews", { params: { path: {
|
|
1634
|
+
workspaceId,
|
|
1635
|
+
documentId
|
|
1636
|
+
} } });
|
|
1637
|
+
return data;
|
|
1638
|
+
}
|
|
1639
|
+
/**
|
|
1640
|
+
* Open a review on a document.
|
|
1641
|
+
* @param workspaceId - Workspace id
|
|
1642
|
+
* @param documentId - Document ID
|
|
1643
|
+
* @param review - Review creation request
|
|
1644
|
+
* @returns Promise that resolves with the created review
|
|
1645
|
+
* @throws {ApiError} if the request fails
|
|
1646
|
+
*/
|
|
1647
|
+
async createForDocument(workspaceId, documentId, review) {
|
|
1648
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/documents/{documentId}/reviews", {
|
|
1649
|
+
params: { path: {
|
|
1650
|
+
workspaceId,
|
|
1651
|
+
documentId
|
|
1652
|
+
} },
|
|
1653
|
+
body: review
|
|
1654
|
+
});
|
|
1655
|
+
return data;
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* List a workspace's reviews.
|
|
1659
|
+
* @param workspaceId - Workspace id
|
|
1660
|
+
* @param query - Optional pagination and filters (assignee, documentId,
|
|
1661
|
+
* reviewStatus, limit, after)
|
|
1662
|
+
* @returns Promise that resolves with a paginated list of reviews
|
|
1663
|
+
* @throws {ApiError} if the request fails
|
|
1664
|
+
*/
|
|
1665
|
+
async listReviews(workspaceId, query) {
|
|
1666
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/reviews", { params: {
|
|
1667
|
+
path: { workspaceId },
|
|
1668
|
+
query
|
|
1669
|
+
} });
|
|
1670
|
+
return data;
|
|
1671
|
+
}
|
|
1672
|
+
/**
|
|
1673
|
+
* Get review details by ID.
|
|
1674
|
+
* @param workspaceId - Workspace id
|
|
1675
|
+
* @param reviewId - Review ID
|
|
1676
|
+
* @returns Promise that resolves with the review details
|
|
1677
|
+
* @throws {ApiError} if the request fails
|
|
1678
|
+
*/
|
|
1679
|
+
async getReview(workspaceId, reviewId) {
|
|
1680
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/reviews/{reviewId}", { params: { path: {
|
|
1681
|
+
workspaceId,
|
|
1682
|
+
reviewId
|
|
1683
|
+
} } });
|
|
1684
|
+
return data;
|
|
1685
|
+
}
|
|
1686
|
+
/**
|
|
1687
|
+
* Assign (or reassign) a review to a reviewer.
|
|
1688
|
+
* @param workspaceId - Workspace id
|
|
1689
|
+
* @param reviewId - Review ID
|
|
1690
|
+
* @param assignment - Review assignment request (assignee)
|
|
1691
|
+
* @returns Promise that resolves with the updated review
|
|
1692
|
+
* @throws {ApiError} if the request fails
|
|
1693
|
+
*/
|
|
1694
|
+
async assignReview(workspaceId, reviewId, assignment) {
|
|
1695
|
+
const { data } = await this.#api.PUT("/workspaces/{workspaceId}/reviews/{reviewId}/assign", {
|
|
1696
|
+
params: { path: {
|
|
1697
|
+
workspaceId,
|
|
1698
|
+
reviewId
|
|
1699
|
+
} },
|
|
1700
|
+
body: assignment
|
|
1701
|
+
});
|
|
1702
|
+
return data;
|
|
1703
|
+
}
|
|
1704
|
+
/**
|
|
1705
|
+
* Verify (resolve) a review.
|
|
1706
|
+
* @param workspaceId - Workspace id
|
|
1707
|
+
* @param reviewId - Review ID
|
|
1708
|
+
* @returns Promise that resolves with the updated review
|
|
1709
|
+
* @throws {ApiError} if the request fails
|
|
1710
|
+
*/
|
|
1711
|
+
async verifyReview(workspaceId, reviewId) {
|
|
1712
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/reviews/{reviewId}/verify", { params: { path: {
|
|
1713
|
+
workspaceId,
|
|
1714
|
+
reviewId
|
|
1715
|
+
} } });
|
|
1716
|
+
return data;
|
|
1717
|
+
}
|
|
1718
|
+
/**
|
|
1719
|
+
* Reopen a resolved review.
|
|
1720
|
+
* @param workspaceId - Workspace id
|
|
1721
|
+
* @param reviewId - Review ID
|
|
1722
|
+
* @returns Promise that resolves with the updated review
|
|
1723
|
+
* @throws {ApiError} if the request fails
|
|
1724
|
+
*/
|
|
1725
|
+
async reopenReview(workspaceId, reviewId) {
|
|
1726
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/reviews/{reviewId}/reopen", { params: { path: {
|
|
1727
|
+
workspaceId,
|
|
1728
|
+
reviewId
|
|
1729
|
+
} } });
|
|
1730
|
+
return data;
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Get a review's timeline: the events in its life.
|
|
1734
|
+
* @param workspaceId - Workspace id
|
|
1735
|
+
* @param reviewId - Review ID
|
|
1736
|
+
* @param query - Optional pagination (limit, after)
|
|
1737
|
+
* @returns Promise that resolves with a paginated list of review events
|
|
1738
|
+
* @throws {ApiError} if the request fails
|
|
1739
|
+
*/
|
|
1740
|
+
async getTimeline(workspaceId, reviewId, query) {
|
|
1741
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/reviews/{reviewId}/timeline", { params: {
|
|
1742
|
+
path: {
|
|
1743
|
+
workspaceId,
|
|
1744
|
+
reviewId
|
|
1745
|
+
},
|
|
1746
|
+
query
|
|
1747
|
+
} });
|
|
1748
|
+
return data;
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Link a detection to a review (idempotent).
|
|
1752
|
+
* @param workspaceId - Workspace id
|
|
1753
|
+
* @param reviewId - Review ID
|
|
1754
|
+
* @param detectionId - Detection ID
|
|
1755
|
+
* @returns Promise that resolves with the updated review
|
|
1756
|
+
* @throws {ApiError} if the request fails
|
|
1757
|
+
*/
|
|
1758
|
+
async linkDetection(workspaceId, reviewId, detectionId) {
|
|
1759
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/reviews/{reviewId}/detections/{detectionId}", { params: { path: {
|
|
1760
|
+
workspaceId,
|
|
1761
|
+
reviewId,
|
|
1762
|
+
detectionId
|
|
1763
|
+
} } });
|
|
1764
|
+
return data;
|
|
1765
|
+
}
|
|
1766
|
+
/**
|
|
1767
|
+
* Link a redaction to a review (idempotent).
|
|
1768
|
+
* @param workspaceId - Workspace id
|
|
1769
|
+
* @param reviewId - Review ID
|
|
1770
|
+
* @param redactionId - Redaction ID
|
|
1771
|
+
* @returns Promise that resolves with the updated review
|
|
1772
|
+
* @throws {ApiError} if the request fails
|
|
1773
|
+
*/
|
|
1774
|
+
async linkRedaction(workspaceId, reviewId, redactionId) {
|
|
1775
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/reviews/{reviewId}/redactions/{redactionId}", { params: { path: {
|
|
1776
|
+
workspaceId,
|
|
1777
|
+
reviewId,
|
|
1778
|
+
redactionId
|
|
1779
|
+
} } });
|
|
1780
|
+
return data;
|
|
1781
|
+
}
|
|
1782
|
+
};
|
|
1783
|
+
|
|
1646
1784
|
//#endregion
|
|
1647
1785
|
//#region src/services/status.ts
|
|
1648
1786
|
/**
|
|
@@ -1654,11 +1792,39 @@ var Status = class {
|
|
|
1654
1792
|
this.#api = api;
|
|
1655
1793
|
}
|
|
1656
1794
|
/**
|
|
1657
|
-
* Check the health status of the API
|
|
1795
|
+
* Check the health status of the API.
|
|
1796
|
+
*
|
|
1797
|
+
* Reports the server's health and that of its dependencies. Returns `Health`
|
|
1798
|
+
* for both the healthy/degraded (200) and unhealthy (503) cases.
|
|
1799
|
+
*
|
|
1658
1800
|
* @returns Promise that resolves with the API health status
|
|
1659
1801
|
*/
|
|
1660
1802
|
async checkHealth() {
|
|
1661
|
-
const { data, error } = await this.#api.GET("/health
|
|
1803
|
+
const { data, error } = await this.#api.GET("/health");
|
|
1804
|
+
return data ?? error;
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* Liveness probe: resolves if the process is running. Probes no dependencies.
|
|
1808
|
+
*
|
|
1809
|
+
* Returns the raw `Response` (the endpoint has no body); a non-2xx status
|
|
1810
|
+
* throws via the error middleware.
|
|
1811
|
+
*
|
|
1812
|
+
* @returns Promise that resolves with the probe response
|
|
1813
|
+
* @throws {ApiError} if the process is not live
|
|
1814
|
+
*/
|
|
1815
|
+
async checkLiveness() {
|
|
1816
|
+
const { response } = await this.#api.GET("/health/live");
|
|
1817
|
+
return response;
|
|
1818
|
+
}
|
|
1819
|
+
/**
|
|
1820
|
+
* Readiness probe: reports the server's health and that of its dependencies,
|
|
1821
|
+
* served from a short-lived cache. Returns `Health` for both the
|
|
1822
|
+
* healthy/degraded (200) and unhealthy (503) cases. Safe to poll frequently.
|
|
1823
|
+
*
|
|
1824
|
+
* @returns Promise that resolves with the API health status
|
|
1825
|
+
*/
|
|
1826
|
+
async checkReadiness() {
|
|
1827
|
+
const { data, error } = await this.#api.GET("/health/ready");
|
|
1662
1828
|
return data ?? error;
|
|
1663
1829
|
}
|
|
1664
1830
|
};
|
|
@@ -1681,7 +1847,7 @@ var Syncs = class {
|
|
|
1681
1847
|
* @throws {ApiError} if the request fails
|
|
1682
1848
|
*/
|
|
1683
1849
|
async listWorkspaceSyncs(workspaceId, query) {
|
|
1684
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/syncs
|
|
1850
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/syncs", { params: {
|
|
1685
1851
|
path: { workspaceId },
|
|
1686
1852
|
query
|
|
1687
1853
|
} });
|
|
@@ -1701,7 +1867,7 @@ var Syncs = class {
|
|
|
1701
1867
|
* @throws {ApiError} if the request fails
|
|
1702
1868
|
*/
|
|
1703
1869
|
async startSync(workspaceId, connectionId) {
|
|
1704
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/sync
|
|
1870
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/sync", { params: { path: {
|
|
1705
1871
|
workspaceId,
|
|
1706
1872
|
connectionId
|
|
1707
1873
|
} } });
|
|
@@ -1716,7 +1882,7 @@ var Syncs = class {
|
|
|
1716
1882
|
* @throws {ApiError} if the request fails
|
|
1717
1883
|
*/
|
|
1718
1884
|
async listSyncs(workspaceId, connectionId, query) {
|
|
1719
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/connections/{connectionId}/syncs
|
|
1885
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/connections/{connectionId}/syncs", { params: {
|
|
1720
1886
|
path: {
|
|
1721
1887
|
workspaceId,
|
|
1722
1888
|
connectionId
|
|
@@ -1734,7 +1900,7 @@ var Syncs = class {
|
|
|
1734
1900
|
* @throws {ApiError} if the request fails
|
|
1735
1901
|
*/
|
|
1736
1902
|
async getSync(workspaceId, connectionId, syncId) {
|
|
1737
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/connections/{connectionId}/syncs/{syncId}
|
|
1903
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/connections/{connectionId}/syncs/{syncId}", { params: { path: {
|
|
1738
1904
|
workspaceId,
|
|
1739
1905
|
connectionId,
|
|
1740
1906
|
syncId
|
|
@@ -1750,7 +1916,7 @@ var Syncs = class {
|
|
|
1750
1916
|
* @throws {ApiError} if the request fails
|
|
1751
1917
|
*/
|
|
1752
1918
|
async cancelSync(workspaceId, connectionId, syncId) {
|
|
1753
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/syncs/{syncId}/cancel
|
|
1919
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/connections/{connectionId}/syncs/{syncId}/cancel", { params: { path: {
|
|
1754
1920
|
workspaceId,
|
|
1755
1921
|
connectionId,
|
|
1756
1922
|
syncId
|
|
@@ -1777,7 +1943,7 @@ var Threads = class {
|
|
|
1777
1943
|
* @throws {ApiError} if the request fails
|
|
1778
1944
|
*/
|
|
1779
1945
|
async listThreads(workspaceId, query) {
|
|
1780
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/threads
|
|
1946
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/threads", { params: {
|
|
1781
1947
|
path: { workspaceId },
|
|
1782
1948
|
query
|
|
1783
1949
|
} });
|
|
@@ -1791,7 +1957,7 @@ var Threads = class {
|
|
|
1791
1957
|
* @throws {ApiError} if the request fails
|
|
1792
1958
|
*/
|
|
1793
1959
|
async openThread(workspaceId, thread) {
|
|
1794
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/threads
|
|
1960
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/threads", {
|
|
1795
1961
|
params: { path: { workspaceId } },
|
|
1796
1962
|
body: thread
|
|
1797
1963
|
});
|
|
@@ -1806,7 +1972,7 @@ var Threads = class {
|
|
|
1806
1972
|
* @throws {ApiError} if the request fails
|
|
1807
1973
|
*/
|
|
1808
1974
|
async renameThread(workspaceId, threadId, updates) {
|
|
1809
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/threads/{threadId}
|
|
1975
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/threads/{threadId}", {
|
|
1810
1976
|
params: { path: {
|
|
1811
1977
|
workspaceId,
|
|
1812
1978
|
threadId
|
|
@@ -1823,7 +1989,7 @@ var Threads = class {
|
|
|
1823
1989
|
* @throws {ApiError} if the request fails
|
|
1824
1990
|
*/
|
|
1825
1991
|
async deleteThread(workspaceId, threadId) {
|
|
1826
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/threads/{threadId}
|
|
1992
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/threads/{threadId}", { params: { path: {
|
|
1827
1993
|
workspaceId,
|
|
1828
1994
|
threadId
|
|
1829
1995
|
} } });
|
|
@@ -1836,7 +2002,7 @@ var Threads = class {
|
|
|
1836
2002
|
* @throws {ApiError} if the request fails
|
|
1837
2003
|
*/
|
|
1838
2004
|
async closeThread(workspaceId, threadId) {
|
|
1839
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/threads/{threadId}/close
|
|
2005
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/threads/{threadId}/close", { params: { path: {
|
|
1840
2006
|
workspaceId,
|
|
1841
2007
|
threadId
|
|
1842
2008
|
} } });
|
|
@@ -1850,7 +2016,7 @@ var Threads = class {
|
|
|
1850
2016
|
* @throws {ApiError} if the request fails
|
|
1851
2017
|
*/
|
|
1852
2018
|
async reopenThread(workspaceId, threadId) {
|
|
1853
|
-
const { data } = await this.#api.DELETE("/workspaces/{workspaceId}/threads/{threadId}/close
|
|
2019
|
+
const { data } = await this.#api.DELETE("/workspaces/{workspaceId}/threads/{threadId}/close", { params: { path: {
|
|
1854
2020
|
workspaceId,
|
|
1855
2021
|
threadId
|
|
1856
2022
|
} } });
|
|
@@ -1865,7 +2031,7 @@ var Threads = class {
|
|
|
1865
2031
|
* @throws {ApiError} if the request fails
|
|
1866
2032
|
*/
|
|
1867
2033
|
async listTimeline(workspaceId, threadId, query) {
|
|
1868
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/threads/{threadId}/timeline
|
|
2034
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/threads/{threadId}/timeline", { params: {
|
|
1869
2035
|
path: {
|
|
1870
2036
|
workspaceId,
|
|
1871
2037
|
threadId
|
|
@@ -1883,7 +2049,7 @@ var Threads = class {
|
|
|
1883
2049
|
* @throws {ApiError} if the request fails
|
|
1884
2050
|
*/
|
|
1885
2051
|
async createComment(workspaceId, threadId, comment) {
|
|
1886
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/threads/{threadId}/comments
|
|
2052
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/threads/{threadId}/comments", {
|
|
1887
2053
|
params: { path: {
|
|
1888
2054
|
workspaceId,
|
|
1889
2055
|
threadId
|
|
@@ -1901,7 +2067,7 @@ var Threads = class {
|
|
|
1901
2067
|
* @throws {ApiError} if the request fails
|
|
1902
2068
|
*/
|
|
1903
2069
|
async updateComment(workspaceId, commentId, updates) {
|
|
1904
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/comments/{commentId}
|
|
2070
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/comments/{commentId}", {
|
|
1905
2071
|
params: { path: {
|
|
1906
2072
|
workspaceId,
|
|
1907
2073
|
commentId
|
|
@@ -1918,7 +2084,7 @@ var Threads = class {
|
|
|
1918
2084
|
* @throws {ApiError} if the request fails
|
|
1919
2085
|
*/
|
|
1920
2086
|
async deleteComment(workspaceId, commentId) {
|
|
1921
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/comments/{commentId}
|
|
2087
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/comments/{commentId}", { params: { path: {
|
|
1922
2088
|
workspaceId,
|
|
1923
2089
|
commentId
|
|
1924
2090
|
} } });
|
|
@@ -1943,7 +2109,7 @@ var Webhooks = class {
|
|
|
1943
2109
|
* @throws {ApiError} if the request fails
|
|
1944
2110
|
*/
|
|
1945
2111
|
async listWebhooks(workspaceId, query) {
|
|
1946
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/webhooks
|
|
2112
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/webhooks", { params: {
|
|
1947
2113
|
path: { workspaceId },
|
|
1948
2114
|
query
|
|
1949
2115
|
} });
|
|
@@ -1957,7 +2123,7 @@ var Webhooks = class {
|
|
|
1957
2123
|
* @throws {ApiError} if the request fails
|
|
1958
2124
|
*/
|
|
1959
2125
|
async createWebhook(workspaceId, webhook) {
|
|
1960
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/webhooks
|
|
2126
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/webhooks", {
|
|
1961
2127
|
params: { path: { workspaceId } },
|
|
1962
2128
|
body: webhook
|
|
1963
2129
|
});
|
|
@@ -1971,7 +2137,7 @@ var Webhooks = class {
|
|
|
1971
2137
|
* @throws {ApiError} if the request fails
|
|
1972
2138
|
*/
|
|
1973
2139
|
async getWebhook(workspaceId, webhookId) {
|
|
1974
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/webhooks/{webhookId}
|
|
2140
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/webhooks/{webhookId}", { params: { path: {
|
|
1975
2141
|
workspaceId,
|
|
1976
2142
|
webhookId
|
|
1977
2143
|
} } });
|
|
@@ -1986,7 +2152,7 @@ var Webhooks = class {
|
|
|
1986
2152
|
* @throws {ApiError} if the request fails
|
|
1987
2153
|
*/
|
|
1988
2154
|
async updateWebhook(workspaceId, webhookId, updates) {
|
|
1989
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/webhooks/{webhookId}
|
|
2155
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/webhooks/{webhookId}", {
|
|
1990
2156
|
params: { path: {
|
|
1991
2157
|
workspaceId,
|
|
1992
2158
|
webhookId
|
|
@@ -2003,7 +2169,7 @@ var Webhooks = class {
|
|
|
2003
2169
|
* @throws {ApiError} if the request fails
|
|
2004
2170
|
*/
|
|
2005
2171
|
async deleteWebhook(workspaceId, webhookId) {
|
|
2006
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/webhooks/{webhookId}
|
|
2172
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/webhooks/{webhookId}", { params: { path: {
|
|
2007
2173
|
workspaceId,
|
|
2008
2174
|
webhookId
|
|
2009
2175
|
} } });
|
|
@@ -2017,7 +2183,7 @@ var Webhooks = class {
|
|
|
2017
2183
|
* @throws {ApiError} if the request fails
|
|
2018
2184
|
*/
|
|
2019
2185
|
async testWebhook(workspaceId, webhookId, options) {
|
|
2020
|
-
const { data } = await this.#api.POST("/workspaces/{workspaceId}/webhooks/{webhookId}/test
|
|
2186
|
+
const { data } = await this.#api.POST("/workspaces/{workspaceId}/webhooks/{webhookId}/test", {
|
|
2021
2187
|
params: { path: {
|
|
2022
2188
|
workspaceId,
|
|
2023
2189
|
webhookId
|
|
@@ -2045,7 +2211,7 @@ var Workspaces = class {
|
|
|
2045
2211
|
* @throws {ApiError} if the request fails
|
|
2046
2212
|
*/
|
|
2047
2213
|
async listWorkspaces(query) {
|
|
2048
|
-
const { data } = await this.#api.GET("/workspaces
|
|
2214
|
+
const { data } = await this.#api.GET("/workspaces", { params: { query } });
|
|
2049
2215
|
return data;
|
|
2050
2216
|
}
|
|
2051
2217
|
/**
|
|
@@ -2055,7 +2221,7 @@ var Workspaces = class {
|
|
|
2055
2221
|
* @throws {ApiError} if the request fails
|
|
2056
2222
|
*/
|
|
2057
2223
|
async getWorkspace(workspaceId) {
|
|
2058
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}
|
|
2224
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}", { params: { path: { workspaceId } } });
|
|
2059
2225
|
return data;
|
|
2060
2226
|
}
|
|
2061
2227
|
/**
|
|
@@ -2065,7 +2231,7 @@ var Workspaces = class {
|
|
|
2065
2231
|
* @throws {ApiError} if the request fails
|
|
2066
2232
|
*/
|
|
2067
2233
|
async createWorkspace(workspace) {
|
|
2068
|
-
const { data } = await this.#api.POST("/workspaces
|
|
2234
|
+
const { data } = await this.#api.POST("/workspaces", { body: workspace });
|
|
2069
2235
|
return data;
|
|
2070
2236
|
}
|
|
2071
2237
|
/**
|
|
@@ -2076,7 +2242,7 @@ var Workspaces = class {
|
|
|
2076
2242
|
* @throws {ApiError} if the request fails
|
|
2077
2243
|
*/
|
|
2078
2244
|
async updateWorkspace(workspaceId, updates) {
|
|
2079
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}
|
|
2245
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}", {
|
|
2080
2246
|
params: { path: { workspaceId } },
|
|
2081
2247
|
body: updates
|
|
2082
2248
|
});
|
|
@@ -2089,7 +2255,7 @@ var Workspaces = class {
|
|
|
2089
2255
|
* @throws {ApiError} if the request fails
|
|
2090
2256
|
*/
|
|
2091
2257
|
async deleteWorkspace(workspaceId) {
|
|
2092
|
-
await this.#api.DELETE("/workspaces/{workspaceId}
|
|
2258
|
+
await this.#api.DELETE("/workspaces/{workspaceId}", { params: { path: { workspaceId } } });
|
|
2093
2259
|
}
|
|
2094
2260
|
/**
|
|
2095
2261
|
* Get notification settings for the authenticated user in a workspace
|
|
@@ -2098,7 +2264,7 @@ var Workspaces = class {
|
|
|
2098
2264
|
* @throws {ApiError} if the request fails
|
|
2099
2265
|
*/
|
|
2100
2266
|
async getNotificationSettings(workspaceId) {
|
|
2101
|
-
const { data } = await this.#api.GET("/workspaces/{workspaceId}/notifications
|
|
2267
|
+
const { data } = await this.#api.GET("/workspaces/{workspaceId}/notifications", { params: { path: { workspaceId } } });
|
|
2102
2268
|
return data;
|
|
2103
2269
|
}
|
|
2104
2270
|
/**
|
|
@@ -2109,7 +2275,7 @@ var Workspaces = class {
|
|
|
2109
2275
|
* @throws {ApiError} if the request fails
|
|
2110
2276
|
*/
|
|
2111
2277
|
async updateNotificationSettings(workspaceId, settings) {
|
|
2112
|
-
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/notifications
|
|
2278
|
+
const { data } = await this.#api.PATCH("/workspaces/{workspaceId}/notifications", {
|
|
2113
2279
|
params: { path: { workspaceId } },
|
|
2114
2280
|
body: settings
|
|
2115
2281
|
});
|
|
@@ -2126,7 +2292,7 @@ var Workspaces = class {
|
|
|
2126
2292
|
const formData = new FormData();
|
|
2127
2293
|
const name = avatar instanceof File ? avatar.name : "avatar";
|
|
2128
2294
|
formData.append("avatar", avatar, name);
|
|
2129
|
-
await this.#api.PUT("/workspaces/{workspaceId}/avatar
|
|
2295
|
+
await this.#api.PUT("/workspaces/{workspaceId}/avatar", {
|
|
2130
2296
|
params: { path: { workspaceId } },
|
|
2131
2297
|
body: formData,
|
|
2132
2298
|
bodySerializer: (formData) => formData,
|
|
@@ -2140,10 +2306,10 @@ var Workspaces = class {
|
|
|
2140
2306
|
* @throws {ApiError} if the request fails
|
|
2141
2307
|
*/
|
|
2142
2308
|
async deleteAvatar(workspaceId) {
|
|
2143
|
-
await this.#api.DELETE("/workspaces/{workspaceId}/avatar
|
|
2309
|
+
await this.#api.DELETE("/workspaces/{workspaceId}/avatar", { params: { path: { workspaceId } } });
|
|
2144
2310
|
}
|
|
2145
2311
|
};
|
|
2146
2312
|
|
|
2147
2313
|
//#endregion
|
|
2148
|
-
export {
|
|
2149
|
-
//# sourceMappingURL=services-
|
|
2314
|
+
export { Account as S, Capabilities as _, Status as a, Analytics as b, Providers as c, Notifications as d, Members as f, Connections as g, Detections as h, Syncs as i, Policies as l, Documents as m, Webhooks as n, Reviews as o, Invites as p, Threads as r, Redactions as s, Workspaces as t, Pipelines as u, Auth as v, Activities as x, ApiTokens as y };
|
|
2315
|
+
//# sourceMappingURL=services-DFJfjW1b.js.map
|