@airweave/sdk 0.1.19 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/api/resources/connections/client/Client.d.ts +86 -5
  2. package/api/resources/connections/client/Client.js +98 -17
  3. package/api/resources/destinations/client/Client.d.ts +19 -0
  4. package/api/resources/destinations/client/Client.js +21 -2
  5. package/api/resources/embeddingModels/client/Client.js +2 -2
  6. package/api/resources/search/client/Client.js +2 -2
  7. package/api/resources/sources/client/Client.d.ts +6 -1
  8. package/api/resources/sources/client/Client.js +8 -3
  9. package/api/resources/sync/client/Client.d.ts +85 -0
  10. package/api/resources/sync/client/Client.js +93 -8
  11. package/api/resources/users/client/Client.js +1 -1
  12. package/api/resources/whiteLabels/client/Client.d.ts +81 -0
  13. package/api/resources/whiteLabels/client/Client.js +89 -8
  14. package/dist/api/resources/connections/client/Client.d.ts +86 -5
  15. package/dist/api/resources/connections/client/Client.js +98 -17
  16. package/dist/api/resources/destinations/client/Client.d.ts +19 -0
  17. package/dist/api/resources/destinations/client/Client.js +21 -2
  18. package/dist/api/resources/embeddingModels/client/Client.js +2 -2
  19. package/dist/api/resources/search/client/Client.js +2 -2
  20. package/dist/api/resources/sources/client/Client.d.ts +6 -1
  21. package/dist/api/resources/sources/client/Client.js +8 -3
  22. package/dist/api/resources/sync/client/Client.d.ts +85 -0
  23. package/dist/api/resources/sync/client/Client.js +93 -8
  24. package/dist/api/resources/users/client/Client.js +1 -1
  25. package/dist/api/resources/whiteLabels/client/Client.d.ts +81 -0
  26. package/dist/api/resources/whiteLabels/client/Client.js +89 -8
  27. package/dist/version.d.ts +1 -1
  28. package/dist/version.js +1 -1
  29. package/package.json +1 -1
  30. package/reference.md +307 -35
  31. package/version.d.ts +1 -1
  32. package/version.js +1 -1
@@ -62,6 +62,18 @@ class Sync {
62
62
  /**
63
63
  * List all syncs for the current user.
64
64
  *
65
+ * Args:
66
+ * -----
67
+ * db: The database session
68
+ * skip: The number of syncs to skip
69
+ * limit: The number of syncs to return
70
+ * with_source_connection: Whether to include the source connection in the response
71
+ * user: The current user
72
+ *
73
+ * Returns:
74
+ * --------
75
+ * list[schemas.Sync] | list[schemas.SyncWithSourceConnection]: A list of syncs
76
+ *
65
77
  * @param {AirweaveSDK.ListSyncsSyncGetRequest} request
66
78
  * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
67
79
  *
@@ -89,7 +101,7 @@ class Sync {
89
101
  method: "GET",
90
102
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
91
103
  ? yield core.Supplier.get(this._options.apiKey)
92
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
104
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
93
105
  contentType: "application/json",
94
106
  queryParameters: _queryParams,
95
107
  requestType: "json",
@@ -139,6 +151,17 @@ class Sync {
139
151
  /**
140
152
  * Create a new sync configuration.
141
153
  *
154
+ * Args:
155
+ * -----
156
+ * db: The database session
157
+ * sync_in: The sync to create
158
+ * user: The current user
159
+ * background_tasks: The background tasks
160
+ *
161
+ * Returns:
162
+ * --------
163
+ * sync (schemas.Sync): The created sync
164
+ *
142
165
  * @param {AirweaveSDK.SyncCreate} request
143
166
  * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
144
167
  *
@@ -158,7 +181,7 @@ class Sync {
158
181
  method: "POST",
159
182
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
160
183
  ? yield core.Supplier.get(this._options.apiKey)
161
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
184
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
162
185
  contentType: "application/json",
163
186
  requestType: "json",
164
187
  body: serializers.SyncCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -208,6 +231,16 @@ class Sync {
208
231
  /**
209
232
  * Get a specific sync by ID.
210
233
  *
234
+ * Args:
235
+ * -----
236
+ * db: The database session
237
+ * sync_id: The ID of the sync to get
238
+ * user: The current user
239
+ *
240
+ * Returns:
241
+ * --------
242
+ * sync (schemas.Sync): The sync
243
+ *
211
244
  * @param {string} syncId
212
245
  * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
213
246
  *
@@ -224,7 +257,7 @@ class Sync {
224
257
  method: "GET",
225
258
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
226
259
  ? yield core.Supplier.get(this._options.apiKey)
227
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
260
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
228
261
  contentType: "application/json",
229
262
  requestType: "json",
230
263
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -273,6 +306,17 @@ class Sync {
273
306
  /**
274
307
  * Delete a sync configuration and optionally its associated data.
275
308
  *
309
+ * Args:
310
+ * -----
311
+ * db: The database session
312
+ * sync_id: The ID of the sync to delete
313
+ * delete_data: Whether to delete the data associated with the sync
314
+ * user: The current user
315
+ *
316
+ * Returns:
317
+ * --------
318
+ * sync (schemas.Sync): The deleted sync
319
+ *
276
320
  * @param {string} syncId
277
321
  * @param {AirweaveSDK.DeleteSyncSyncSyncIdDeleteRequest} request
278
322
  * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
@@ -295,7 +339,7 @@ class Sync {
295
339
  method: "DELETE",
296
340
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
297
341
  ? yield core.Supplier.get(this._options.apiKey)
298
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
342
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
299
343
  contentType: "application/json",
300
344
  queryParameters: _queryParams,
301
345
  requestType: "json",
@@ -345,6 +389,17 @@ class Sync {
345
389
  /**
346
390
  * Trigger a sync run.
347
391
  *
392
+ * Args:
393
+ * -----
394
+ * db: The database session
395
+ * sync_id: The ID of the sync to run
396
+ * user: The current user
397
+ * background_tasks: The background tasks
398
+ *
399
+ * Returns:
400
+ * --------
401
+ * sync_job (schemas.SyncJob): The sync job
402
+ *
348
403
  * @param {string} syncId
349
404
  * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
350
405
  *
@@ -361,7 +416,7 @@ class Sync {
361
416
  method: "POST",
362
417
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
363
418
  ? yield core.Supplier.get(this._options.apiKey)
364
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
419
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
365
420
  contentType: "application/json",
366
421
  requestType: "json",
367
422
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -410,6 +465,16 @@ class Sync {
410
465
  /**
411
466
  * List all jobs for a specific sync.
412
467
  *
468
+ * Args:
469
+ * -----
470
+ * db: The database session
471
+ * sync_id: The ID of the sync to list jobs for
472
+ * user: The current user
473
+ *
474
+ * Returns:
475
+ * --------
476
+ * list[schemas.SyncJob]: A list of sync jobs
477
+ *
413
478
  * @param {string} syncId
414
479
  * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
415
480
  *
@@ -426,7 +491,7 @@ class Sync {
426
491
  method: "GET",
427
492
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
428
493
  ? yield core.Supplier.get(this._options.apiKey)
429
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
494
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
430
495
  contentType: "application/json",
431
496
  requestType: "json",
432
497
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -475,6 +540,17 @@ class Sync {
475
540
  /**
476
541
  * Get details of a specific sync job.
477
542
  *
543
+ * Args:
544
+ * -----
545
+ * db: The database session
546
+ * sync_id: The ID of the sync to list jobs for
547
+ * job_id: The ID of the job to get
548
+ * user: The current user
549
+ *
550
+ * Returns:
551
+ * --------
552
+ * sync_job (schemas.SyncJob): The sync job
553
+ *
478
554
  * @param {string} jobId
479
555
  * @param {AirweaveSDK.GetSyncJobSyncJobJobIdGetRequest} request
480
556
  * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
@@ -497,7 +573,7 @@ class Sync {
497
573
  method: "GET",
498
574
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
499
575
  ? yield core.Supplier.get(this._options.apiKey)
500
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
576
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
501
577
  contentType: "application/json",
502
578
  queryParameters: _queryParams,
503
579
  requestType: "json",
@@ -547,6 +623,15 @@ class Sync {
547
623
  /**
548
624
  * Server-Sent Events (SSE) endpoint to subscribe to a sync job's progress.
549
625
  *
626
+ * Args:
627
+ * -----
628
+ * job_id: The ID of the job to subscribe to
629
+ * user: The current user
630
+ *
631
+ * Returns:
632
+ * --------
633
+ * StreamingResponse: The streaming response
634
+ *
550
635
  * @param {string} jobId
551
636
  * @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
552
637
  *
@@ -563,7 +648,7 @@ class Sync {
563
648
  method: "GET",
564
649
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
565
650
  ? yield core.Supplier.get(this._options.apiKey)
566
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
651
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
567
652
  contentType: "application/json",
568
653
  requestType: "json",
569
654
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -85,7 +85,7 @@ class Users {
85
85
  method: "GET",
86
86
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
87
87
  ? yield core.Supplier.get(this._options.apiKey)
88
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
89
89
  contentType: "application/json",
90
90
  requestType: "json",
91
91
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -29,6 +29,15 @@ export declare class WhiteLabels {
29
29
  /**
30
30
  * List all white labels for the current user's organization.
31
31
  *
32
+ * Args:
33
+ * -----
34
+ * db: The database session
35
+ * current_user: The current user
36
+ *
37
+ * Returns:
38
+ * --------
39
+ * list[schemas.WhiteLabel]: A list of white labels
40
+ *
32
41
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
33
42
  *
34
43
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
@@ -40,6 +49,16 @@ export declare class WhiteLabels {
40
49
  /**
41
50
  * Create new white label integration.
42
51
  *
52
+ * Args:
53
+ * -----
54
+ * db: The database session
55
+ * current_user: The current user
56
+ * white_label_in: The white label to create
57
+ *
58
+ * Returns:
59
+ * --------
60
+ * white_label (schemas.WhiteLabel): The created white label
61
+ *
43
62
  * @param {AirweaveSDK.WhiteLabelCreate} request
44
63
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
45
64
  *
@@ -58,6 +77,16 @@ export declare class WhiteLabels {
58
77
  /**
59
78
  * Get a specific white label integration.
60
79
  *
80
+ * Args:
81
+ * -----
82
+ * db: The database session
83
+ * white_label_id: The ID of the white label to get
84
+ * current_user: The current user
85
+ *
86
+ * Returns:
87
+ * --------
88
+ * white_label (schemas.WhiteLabel): The white label
89
+ *
61
90
  * @param {string} whiteLabelId
62
91
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
63
92
  *
@@ -70,6 +99,17 @@ export declare class WhiteLabels {
70
99
  /**
71
100
  * Update a white label integration.
72
101
  *
102
+ * Args:
103
+ * -----
104
+ * db: The database session
105
+ * current_user: The current user
106
+ * white_label_id: The ID of the white label to update
107
+ * white_label_in: The white label to update
108
+ *
109
+ * Returns:
110
+ * --------
111
+ * white_label (schemas.WhiteLabel): The updated white label
112
+ *
73
113
  * @param {string} whiteLabelId
74
114
  * @param {AirweaveSDK.WhiteLabelUpdate} request
75
115
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
@@ -83,6 +123,16 @@ export declare class WhiteLabels {
83
123
  /**
84
124
  * Delete a white label integration.
85
125
  *
126
+ * Args:
127
+ * -----
128
+ * db: The database session
129
+ * current_user: The current user
130
+ * white_label_id: The ID of the white label to delete
131
+ *
132
+ * Returns:
133
+ * --------
134
+ * white_label (schemas.WhiteLabel): The deleted white label
135
+ *
86
136
  * @param {string} whiteLabelId
87
137
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
88
138
  *
@@ -95,6 +145,16 @@ export declare class WhiteLabels {
95
145
  /**
96
146
  * Generate the OAuth2 authorization URL by delegating to oauth2_service.
97
147
  *
148
+ * Args:
149
+ * -----
150
+ * db: The database session
151
+ * white_label_id: The ID of the white label to get the auth URL for
152
+ * user: The current user
153
+ *
154
+ * Returns:
155
+ * --------
156
+ * str: The OAuth2 authorization URL
157
+ *
98
158
  * @param {string} whiteLabelId
99
159
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
100
160
  *
@@ -107,6 +167,17 @@ export declare class WhiteLabels {
107
167
  /**
108
168
  * Exchange OAuth2 code for tokens and create connection.
109
169
  *
170
+ * Args:
171
+ * -----
172
+ * white_label_id: The ID of the white label to exchange the code for
173
+ * code: The OAuth2 code
174
+ * db: The database session
175
+ * user: The current user
176
+ *
177
+ * Returns:
178
+ * --------
179
+ * connection (schemas.Connection): The created connection
180
+ *
110
181
  * @param {string} whiteLabelId
111
182
  * @param {string} request
112
183
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
@@ -120,6 +191,16 @@ export declare class WhiteLabels {
120
191
  /**
121
192
  * List all syncs for a specific white label.
122
193
  *
194
+ * Args:
195
+ * -----
196
+ * white_label_id: The ID of the white label to list syncs for
197
+ * db: The database session
198
+ * current_user: The current user
199
+ *
200
+ * Returns:
201
+ * --------
202
+ * list[schemas.Sync]: A list of syncs
203
+ *
123
204
  * @param {string} whiteLabelId
124
205
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
125
206
  *
@@ -62,6 +62,15 @@ class WhiteLabels {
62
62
  /**
63
63
  * List all white labels for the current user's organization.
64
64
  *
65
+ * Args:
66
+ * -----
67
+ * db: The database session
68
+ * current_user: The current user
69
+ *
70
+ * Returns:
71
+ * --------
72
+ * list[schemas.WhiteLabel]: A list of white labels
73
+ *
65
74
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
66
75
  *
67
76
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
@@ -77,7 +86,7 @@ class WhiteLabels {
77
86
  method: "GET",
78
87
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
79
88
  ? yield core.Supplier.get(this._options.apiKey)
80
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
89
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
90
  contentType: "application/json",
82
91
  requestType: "json",
83
92
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -126,6 +135,16 @@ class WhiteLabels {
126
135
  /**
127
136
  * Create new white label integration.
128
137
  *
138
+ * Args:
139
+ * -----
140
+ * db: The database session
141
+ * current_user: The current user
142
+ * white_label_in: The white label to create
143
+ *
144
+ * Returns:
145
+ * --------
146
+ * white_label (schemas.WhiteLabel): The created white label
147
+ *
129
148
  * @param {AirweaveSDK.WhiteLabelCreate} request
130
149
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
131
150
  *
@@ -148,7 +167,7 @@ class WhiteLabels {
148
167
  method: "POST",
149
168
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
150
169
  ? yield core.Supplier.get(this._options.apiKey)
151
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
170
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
152
171
  contentType: "application/json",
153
172
  requestType: "json",
154
173
  body: serializers.WhiteLabelCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -198,6 +217,16 @@ class WhiteLabels {
198
217
  /**
199
218
  * Get a specific white label integration.
200
219
  *
220
+ * Args:
221
+ * -----
222
+ * db: The database session
223
+ * white_label_id: The ID of the white label to get
224
+ * current_user: The current user
225
+ *
226
+ * Returns:
227
+ * --------
228
+ * white_label (schemas.WhiteLabel): The white label
229
+ *
201
230
  * @param {string} whiteLabelId
202
231
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
203
232
  *
@@ -214,7 +243,7 @@ class WhiteLabels {
214
243
  method: "GET",
215
244
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
216
245
  ? yield core.Supplier.get(this._options.apiKey)
217
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
246
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
218
247
  contentType: "application/json",
219
248
  requestType: "json",
220
249
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -263,6 +292,17 @@ class WhiteLabels {
263
292
  /**
264
293
  * Update a white label integration.
265
294
  *
295
+ * Args:
296
+ * -----
297
+ * db: The database session
298
+ * current_user: The current user
299
+ * white_label_id: The ID of the white label to update
300
+ * white_label_in: The white label to update
301
+ *
302
+ * Returns:
303
+ * --------
304
+ * white_label (schemas.WhiteLabel): The updated white label
305
+ *
266
306
  * @param {string} whiteLabelId
267
307
  * @param {AirweaveSDK.WhiteLabelUpdate} request
268
308
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
@@ -280,7 +320,7 @@ class WhiteLabels {
280
320
  method: "PUT",
281
321
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
282
322
  ? yield core.Supplier.get(this._options.apiKey)
283
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
323
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
284
324
  contentType: "application/json",
285
325
  requestType: "json",
286
326
  body: serializers.WhiteLabelUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -330,6 +370,16 @@ class WhiteLabels {
330
370
  /**
331
371
  * Delete a white label integration.
332
372
  *
373
+ * Args:
374
+ * -----
375
+ * db: The database session
376
+ * current_user: The current user
377
+ * white_label_id: The ID of the white label to delete
378
+ *
379
+ * Returns:
380
+ * --------
381
+ * white_label (schemas.WhiteLabel): The deleted white label
382
+ *
333
383
  * @param {string} whiteLabelId
334
384
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
335
385
  *
@@ -346,7 +396,7 @@ class WhiteLabels {
346
396
  method: "DELETE",
347
397
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
348
398
  ? yield core.Supplier.get(this._options.apiKey)
349
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
399
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
350
400
  contentType: "application/json",
351
401
  requestType: "json",
352
402
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -395,6 +445,16 @@ class WhiteLabels {
395
445
  /**
396
446
  * Generate the OAuth2 authorization URL by delegating to oauth2_service.
397
447
  *
448
+ * Args:
449
+ * -----
450
+ * db: The database session
451
+ * white_label_id: The ID of the white label to get the auth URL for
452
+ * user: The current user
453
+ *
454
+ * Returns:
455
+ * --------
456
+ * str: The OAuth2 authorization URL
457
+ *
398
458
  * @param {string} whiteLabelId
399
459
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
400
460
  *
@@ -411,7 +471,7 @@ class WhiteLabels {
411
471
  method: "GET",
412
472
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
413
473
  ? yield core.Supplier.get(this._options.apiKey)
414
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
474
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
415
475
  contentType: "application/json",
416
476
  requestType: "json",
417
477
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -460,6 +520,17 @@ class WhiteLabels {
460
520
  /**
461
521
  * Exchange OAuth2 code for tokens and create connection.
462
522
  *
523
+ * Args:
524
+ * -----
525
+ * white_label_id: The ID of the white label to exchange the code for
526
+ * code: The OAuth2 code
527
+ * db: The database session
528
+ * user: The current user
529
+ *
530
+ * Returns:
531
+ * --------
532
+ * connection (schemas.Connection): The created connection
533
+ *
463
534
  * @param {string} whiteLabelId
464
535
  * @param {string} request
465
536
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
@@ -477,7 +548,7 @@ class WhiteLabels {
477
548
  method: "POST",
478
549
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
479
550
  ? yield core.Supplier.get(this._options.apiKey)
480
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
551
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
481
552
  contentType: "application/json",
482
553
  requestType: "json",
483
554
  body: serializers.whiteLabels.exchangeWhiteLabelOauth2Code.Request.jsonOrThrow(request, {
@@ -529,6 +600,16 @@ class WhiteLabels {
529
600
  /**
530
601
  * List all syncs for a specific white label.
531
602
  *
603
+ * Args:
604
+ * -----
605
+ * white_label_id: The ID of the white label to list syncs for
606
+ * db: The database session
607
+ * current_user: The current user
608
+ *
609
+ * Returns:
610
+ * --------
611
+ * list[schemas.Sync]: A list of syncs
612
+ *
532
613
  * @param {string} whiteLabelId
533
614
  * @param {WhiteLabels.RequestOptions} requestOptions - Request-specific configuration.
534
615
  *
@@ -545,7 +626,7 @@ class WhiteLabels {
545
626
  method: "GET",
546
627
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
547
628
  ? yield core.Supplier.get(this._options.apiKey)
548
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.19", "User-Agent": "@airweave/sdk/0.1.19", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
629
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.21", "User-Agent": "@airweave/sdk/0.1.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
549
630
  contentType: "application/json",
550
631
  requestType: "json",
551
632
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.19";
1
+ export declare const SDK_VERSION = "0.1.21";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.1.19";
4
+ exports.SDK_VERSION = "0.1.21";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airweave/sdk",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "private": false,
5
5
  "repository": "https://github.com/airweave-ai/typescript-sdk",
6
6
  "main": "./index.js",