@assembly-js/app-foundation 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4697 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/index.js
8
+ var api_exports = {};
9
+ __export(api_exports, {
10
+ ApiError: () => ApiError,
11
+ CancelError: () => CancelError,
12
+ CancelablePromise: () => CancelablePromise,
13
+ ClientsService: () => ClientsService,
14
+ CommentsService: () => CommentsService,
15
+ CompaniesService: () => CompaniesService,
16
+ ContractTemplatesService: () => ContractTemplatesService,
17
+ ContractsService: () => ContractsService,
18
+ CustomFieldsService: () => CustomFieldsService,
19
+ EventsService: () => EventsService,
20
+ FileChannelsService: () => FileChannelsService,
21
+ FilesService: () => FilesService,
22
+ FormResponsesService: () => FormResponsesService,
23
+ FormsService: () => FormsService,
24
+ InstallsService: () => InstallsService,
25
+ InternalUsersService: () => InternalUsersService,
26
+ InvoiceTemplatesService: () => InvoiceTemplatesService,
27
+ InvoicesService: () => InvoicesService,
28
+ MeService: () => MeService,
29
+ MessageChannelsService: () => MessageChannelsService,
30
+ MessagesService: () => MessagesService,
31
+ NotesService: () => NotesService,
32
+ NotificationsService: () => NotificationsService,
33
+ OpenAPI: () => OpenAPI,
34
+ PaymentsService: () => PaymentsService,
35
+ PricesService: () => PricesService,
36
+ ProductsService: () => ProductsService,
37
+ RefundsService: () => RefundsService,
38
+ SessionService: () => SessionService,
39
+ SubscriptionTemplatesService: () => SubscriptionTemplatesService,
40
+ SubscriptionsService: () => SubscriptionsService,
41
+ TaskTemplatesService: () => TaskTemplatesService,
42
+ TasksService: () => TasksService,
43
+ TokenService: () => TokenService,
44
+ WorkspacesService: () => WorkspacesService,
45
+ api_ClientItem: () => api_ClientItem,
46
+ api_InternalUserItem: () => api_InternalUserItem,
47
+ appConnection_AppConnectionMembershipType: () => appConnection_AppConnectionMembershipType,
48
+ appConnection_AppConnectionType: () => appConnection_AppConnectionType,
49
+ app_instance_AppConnectInput: () => app_instance_AppConnectInput,
50
+ app_instance_AppConnectionType: () => app_instance_AppConnectionType,
51
+ app_instance_AppInstall: () => app_instance_AppInstall,
52
+ audit_log_AuditEventType: () => audit_log_AuditEventType,
53
+ audit_log_AuditLog: () => audit_log_AuditLog,
54
+ audit_log_Source: () => audit_log_Source,
55
+ billing_Template: () => billing_Template,
56
+ billingutils_BillingPeriodType: () => billingutils_BillingPeriodType,
57
+ constants_ApiObject: () => constants_ApiObject,
58
+ constants_SignStatus: () => constants_SignStatus,
59
+ contracts_Contract: () => contracts_Contract,
60
+ contracts_ContractCreationMode: () => contracts_ContractCreationMode,
61
+ contracts_ContractField: () => contracts_ContractField,
62
+ contracts_ContractStatus: () => contracts_ContractStatus,
63
+ contracts_CreateContractRequest: () => contracts_CreateContractRequest,
64
+ contracts_FieldType: () => contracts_FieldType,
65
+ contracts_InputType: () => contracts_InputType,
66
+ contracts_SignatureEventType: () => contracts_SignatureEventType,
67
+ customfields_ClientCustomField: () => customfields_ClientCustomField,
68
+ customfields_createCustomFieldInput: () => customfields_createCustomFieldInput,
69
+ fields_models_VisibilityComparator: () => fields_models_VisibilityComparator,
70
+ fields_models_VisibilityRuleType: () => fields_models_VisibilityRuleType,
71
+ filechannel_CreateFileChannelInput: () => filechannel_CreateFileChannelInput,
72
+ filechannels_FileChannel: () => filechannels_FileChannel,
73
+ files_CreateFileInput: () => files_CreateFileInput,
74
+ files_DuplicateBehavior: () => files_DuplicateBehavior,
75
+ files_Fields: () => files_Fields,
76
+ files_File: () => files_File,
77
+ files_FileUploadStatus: () => files_FileUploadStatus,
78
+ forms_FormFieldType: () => forms_FormFieldType,
79
+ forms_FormFields: () => forms_FormFields,
80
+ forms_FormQuestionFields: () => forms_FormQuestionFields,
81
+ forms_FormResponseFields: () => forms_FormResponseFields,
82
+ forms_FormResponseQuestion: () => forms_FormResponseQuestion,
83
+ forms_FormVisibilityType: () => forms_FormVisibilityType,
84
+ handler_UpdateFolderPermissionsRequest: () => handler_UpdateFolderPermissionsRequest,
85
+ handler_UpdateRootFolderPermissionsRequest: () => handler_UpdateRootFolderPermissionsRequest,
86
+ internal_notes_CreateNoteHandlerInput: () => internal_notes_CreateNoteHandlerInput,
87
+ internal_notes_Note: () => internal_notes_Note,
88
+ invoice_CreateInvoiceRequest: () => invoice_CreateInvoiceRequest,
89
+ invoice_Invoice: () => invoice_Invoice,
90
+ invoice_Origin: () => invoice_Origin,
91
+ marketplace_application_TaskInput: () => marketplace_application_TaskInput,
92
+ messagechannel_CreateMessageChannelRequest: () => messagechannel_CreateMessageChannelRequest,
93
+ messagechannel_MessageChannel: () => messagechannel_MessageChannel,
94
+ notifications_CreateInput: () => notifications_CreateInput,
95
+ notifications_EventType: () => notifications_EventType,
96
+ notifications_MemberType: () => notifications_MemberType,
97
+ notifications_Notification: () => notifications_Notification,
98
+ notificationsettings_InternalUserNotificationSettings: () => notificationsettings_InternalUserNotificationSettings,
99
+ payment_FeeItem: () => payment_FeeItem,
100
+ payment_Payment: () => payment_Payment,
101
+ payment_PaymentMethodPreference: () => payment_PaymentMethodPreference,
102
+ price_CreatePriceInput: () => price_CreatePriceInput,
103
+ price_Price: () => price_Price,
104
+ price_PriceType: () => price_PriceType,
105
+ product_CreateProductInput: () => product_CreateProductInput,
106
+ product_Product: () => product_Product,
107
+ product_ProductStatusType: () => product_ProductStatusType,
108
+ refund_Refund: () => refund_Refund,
109
+ refund_RefundStatusType: () => refund_RefundStatusType,
110
+ subscription_CreateSubscriptionInput: () => subscription_CreateSubscriptionInput,
111
+ subscription_Subscription: () => subscription_Subscription
112
+ });
113
+
114
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/core/ApiError.js
115
+ var ApiError = class extends Error {
116
+ constructor(request2, response, message) {
117
+ super(message);
118
+ this.name = "ApiError";
119
+ this.url = response.url;
120
+ this.status = response.status;
121
+ this.statusText = response.statusText;
122
+ this.body = response.body;
123
+ this.request = request2;
124
+ }
125
+ };
126
+
127
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/core/CancelablePromise.js
128
+ var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
129
+ if (kind === "m") throw new TypeError("Private method is not writable");
130
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
131
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
132
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
133
+ };
134
+ var __classPrivateFieldGet = function(receiver, state, kind, f) {
135
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
136
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
137
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
138
+ };
139
+ var _CancelablePromise_isResolved;
140
+ var _CancelablePromise_isRejected;
141
+ var _CancelablePromise_isCancelled;
142
+ var _CancelablePromise_cancelHandlers;
143
+ var _CancelablePromise_promise;
144
+ var _CancelablePromise_resolve;
145
+ var _CancelablePromise_reject;
146
+ var CancelError = class extends Error {
147
+ constructor(message) {
148
+ super(message);
149
+ this.name = "CancelError";
150
+ }
151
+ get isCancelled() {
152
+ return true;
153
+ }
154
+ };
155
+ var CancelablePromise = class {
156
+ constructor(executor) {
157
+ _CancelablePromise_isResolved.set(this, void 0);
158
+ _CancelablePromise_isRejected.set(this, void 0);
159
+ _CancelablePromise_isCancelled.set(this, void 0);
160
+ _CancelablePromise_cancelHandlers.set(this, void 0);
161
+ _CancelablePromise_promise.set(this, void 0);
162
+ _CancelablePromise_resolve.set(this, void 0);
163
+ _CancelablePromise_reject.set(this, void 0);
164
+ __classPrivateFieldSet(this, _CancelablePromise_isResolved, false, "f");
165
+ __classPrivateFieldSet(this, _CancelablePromise_isRejected, false, "f");
166
+ __classPrivateFieldSet(this, _CancelablePromise_isCancelled, false, "f");
167
+ __classPrivateFieldSet(this, _CancelablePromise_cancelHandlers, [], "f");
168
+ __classPrivateFieldSet(this, _CancelablePromise_promise, new Promise((resolve2, reject) => {
169
+ __classPrivateFieldSet(this, _CancelablePromise_resolve, resolve2, "f");
170
+ __classPrivateFieldSet(this, _CancelablePromise_reject, reject, "f");
171
+ const onResolve = (value) => {
172
+ var _a;
173
+ if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
174
+ return;
175
+ }
176
+ __classPrivateFieldSet(this, _CancelablePromise_isResolved, true, "f");
177
+ (_a = __classPrivateFieldGet(this, _CancelablePromise_resolve, "f")) === null || _a === void 0 ? void 0 : _a.call(this, value);
178
+ };
179
+ const onReject = (reason) => {
180
+ var _a;
181
+ if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
182
+ return;
183
+ }
184
+ __classPrivateFieldSet(this, _CancelablePromise_isRejected, true, "f");
185
+ (_a = __classPrivateFieldGet(this, _CancelablePromise_reject, "f")) === null || _a === void 0 ? void 0 : _a.call(this, reason);
186
+ };
187
+ const onCancel = (cancelHandler) => {
188
+ if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
189
+ return;
190
+ }
191
+ __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").push(cancelHandler);
192
+ };
193
+ Object.defineProperty(onCancel, "isResolved", {
194
+ get: () => __classPrivateFieldGet(this, _CancelablePromise_isResolved, "f")
195
+ });
196
+ Object.defineProperty(onCancel, "isRejected", {
197
+ get: () => __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f")
198
+ });
199
+ Object.defineProperty(onCancel, "isCancelled", {
200
+ get: () => __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")
201
+ });
202
+ return executor(onResolve, onReject, onCancel);
203
+ }), "f");
204
+ }
205
+ get [(_CancelablePromise_isResolved = /* @__PURE__ */ new WeakMap(), _CancelablePromise_isRejected = /* @__PURE__ */ new WeakMap(), _CancelablePromise_isCancelled = /* @__PURE__ */ new WeakMap(), _CancelablePromise_cancelHandlers = /* @__PURE__ */ new WeakMap(), _CancelablePromise_promise = /* @__PURE__ */ new WeakMap(), _CancelablePromise_resolve = /* @__PURE__ */ new WeakMap(), _CancelablePromise_reject = /* @__PURE__ */ new WeakMap(), Symbol.toStringTag)]() {
206
+ return "Cancellable Promise";
207
+ }
208
+ then(onFulfilled, onRejected) {
209
+ return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").then(onFulfilled, onRejected);
210
+ }
211
+ catch(onRejected) {
212
+ return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").catch(onRejected);
213
+ }
214
+ finally(onFinally) {
215
+ return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").finally(onFinally);
216
+ }
217
+ cancel() {
218
+ var _a;
219
+ if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
220
+ return;
221
+ }
222
+ __classPrivateFieldSet(this, _CancelablePromise_isCancelled, true, "f");
223
+ if (__classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").length) {
224
+ try {
225
+ for (const cancelHandler of __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f")) {
226
+ cancelHandler();
227
+ }
228
+ } catch (error) {
229
+ console.warn("Cancellation threw an error", error);
230
+ return;
231
+ }
232
+ }
233
+ __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").length = 0;
234
+ (_a = __classPrivateFieldGet(this, _CancelablePromise_reject, "f")) === null || _a === void 0 ? void 0 : _a.call(this, new CancelError("Request aborted"));
235
+ }
236
+ get isCancelled() {
237
+ return __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f");
238
+ }
239
+ };
240
+
241
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/core/OpenAPI.js
242
+ var OpenAPI = {
243
+ BASE: process.env.COPILOT_ENV === "__SECRET_STAGING__" ? "https://api.copilot-staging.app" : "https://api.assembly.com",
244
+ VERSION: "",
245
+ WITH_CREDENTIALS: false,
246
+ CREDENTIALS: "include",
247
+ TOKEN: void 0,
248
+ USERNAME: void 0,
249
+ PASSWORD: void 0,
250
+ HEADERS: void 0,
251
+ ENCODE_PATH: void 0
252
+ };
253
+
254
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/api_ClientItem.js
255
+ var api_ClientItem;
256
+ (function(api_ClientItem2) {
257
+ let creationMethod;
258
+ (function(creationMethod2) {
259
+ creationMethod2["CLIENT"] = "client";
260
+ creationMethod2["DIRECT_SIGN_UP"] = "directSignUp";
261
+ creationMethod2["IMPORT"] = "import";
262
+ creationMethod2["INTERNAL_USER"] = "internalUser";
263
+ })(creationMethod = api_ClientItem2.creationMethod || (api_ClientItem2.creationMethod = {}));
264
+ let status;
265
+ (function(status2) {
266
+ status2["UNKNOWN"] = "unknown";
267
+ status2["DELETED"] = "deleted";
268
+ status2["ACTIVE"] = "active";
269
+ status2["NOT_INVITED"] = "notInvited";
270
+ status2["INVITED"] = "invited";
271
+ })(status = api_ClientItem2.status || (api_ClientItem2.status = {}));
272
+ })(api_ClientItem || (api_ClientItem = {}));
273
+
274
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/api_InternalUserItem.js
275
+ var api_InternalUserItem;
276
+ (function(api_InternalUserItem2) {
277
+ let role;
278
+ (function(role2) {
279
+ role2["ADMIN"] = "admin";
280
+ role2["STAFF"] = "staff";
281
+ })(role = api_InternalUserItem2.role || (api_InternalUserItem2.role = {}));
282
+ })(api_InternalUserItem || (api_InternalUserItem = {}));
283
+
284
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/app_instance_AppConnectInput.js
285
+ var app_instance_AppConnectInput;
286
+ (function(app_instance_AppConnectInput2) {
287
+ let membershipType;
288
+ (function(membershipType2) {
289
+ membershipType2["INDIVIDUAL"] = "individual";
290
+ membershipType2["GROUP"] = "group";
291
+ membershipType2["COMPANY"] = "company";
292
+ })(membershipType = app_instance_AppConnectInput2.membershipType || (app_instance_AppConnectInput2.membershipType = {}));
293
+ let type;
294
+ (function(type2) {
295
+ type2["EMBED"] = "embed";
296
+ type2["LINK"] = "link";
297
+ })(type = app_instance_AppConnectInput2.type || (app_instance_AppConnectInput2.type = {}));
298
+ })(app_instance_AppConnectInput || (app_instance_AppConnectInput = {}));
299
+
300
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/app_instance_AppConnectionType.js
301
+ var app_instance_AppConnectionType;
302
+ (function(app_instance_AppConnectionType2) {
303
+ app_instance_AppConnectionType2["AppConnectionEmbed"] = "embed";
304
+ app_instance_AppConnectionType2["AppConnectionLink"] = "link";
305
+ })(app_instance_AppConnectionType || (app_instance_AppConnectionType = {}));
306
+
307
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/app_instance_AppInstall.js
308
+ var app_instance_AppInstall;
309
+ (function(app_instance_AppInstall2) {
310
+ let status;
311
+ (function(status2) {
312
+ status2["DRAFT"] = "draft";
313
+ status2["PUBLISHED"] = "published";
314
+ })(status = app_instance_AppInstall2.status || (app_instance_AppInstall2.status = {}));
315
+ let type;
316
+ (function(type2) {
317
+ type2["CORE"] = "core";
318
+ type2["CUSTOM"] = "custom";
319
+ type2["MARKETPLACE"] = "marketplace";
320
+ type2["EMBED"] = "embed";
321
+ type2["LINK"] = "link";
322
+ type2["MANUAL"] = "manual";
323
+ })(type = app_instance_AppInstall2.type || (app_instance_AppInstall2.type = {}));
324
+ })(app_instance_AppInstall || (app_instance_AppInstall = {}));
325
+
326
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/appConnection_AppConnectionMembershipType.js
327
+ var appConnection_AppConnectionMembershipType;
328
+ (function(appConnection_AppConnectionMembershipType2) {
329
+ appConnection_AppConnectionMembershipType2["Individual"] = "individual";
330
+ appConnection_AppConnectionMembershipType2["Group"] = "group";
331
+ appConnection_AppConnectionMembershipType2["Company"] = "company";
332
+ })(appConnection_AppConnectionMembershipType || (appConnection_AppConnectionMembershipType = {}));
333
+
334
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/appConnection_AppConnectionType.js
335
+ var appConnection_AppConnectionType;
336
+ (function(appConnection_AppConnectionType2) {
337
+ appConnection_AppConnectionType2["AppConnectionEmbed"] = "embed";
338
+ appConnection_AppConnectionType2["AppConnectionLink"] = "link";
339
+ })(appConnection_AppConnectionType || (appConnection_AppConnectionType = {}));
340
+
341
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/audit_log_AuditEventType.js
342
+ var audit_log_AuditEventType;
343
+ (function(audit_log_AuditEventType2) {
344
+ audit_log_AuditEventType2["EventUserLoggedIn"] = "userLoggedIn";
345
+ audit_log_AuditEventType2["EventUserLoggedOut"] = "userLoggedOut";
346
+ audit_log_AuditEventType2["EventUserLoginSucceeded"] = "userLoginSucceeded";
347
+ audit_log_AuditEventType2["EventUserLoginFailed"] = "userLoginFailed";
348
+ audit_log_AuditEventType2["EventPasswordReset"] = "passwordReset";
349
+ audit_log_AuditEventType2["EventPasswordChanged"] = "passwordChanged";
350
+ audit_log_AuditEventType2["EventGoogleDelinked"] = "googleDelinked";
351
+ audit_log_AuditEventType2["EventMagicLinkSent"] = "magicLinkSent";
352
+ audit_log_AuditEventType2["EventWorkspaceMfaEnabled"] = "workspaceMfaEnabled";
353
+ audit_log_AuditEventType2["EventWorkspaceMfaDisabled"] = "workspaceMfaDisabled";
354
+ audit_log_AuditEventType2["EventClientCreated"] = "clientCreated";
355
+ audit_log_AuditEventType2["EventClientActivated"] = "clientActivated";
356
+ audit_log_AuditEventType2["EventClientUpdated"] = "clientUpdated";
357
+ audit_log_AuditEventType2["EventClientDeleted"] = "clientDeleted";
358
+ audit_log_AuditEventType2["EventClientInvited"] = "clientInvited";
359
+ audit_log_AuditEventType2["EventCompanyCreated"] = "companyCreated";
360
+ audit_log_AuditEventType2["EventCompanyUpdated"] = "companyUpdated";
361
+ audit_log_AuditEventType2["EventCompanyCustomFieldsUpdated"] = "companyCustomFieldsUpdated";
362
+ audit_log_AuditEventType2["EventCompanyDeleted"] = "companyDeleted";
363
+ audit_log_AuditEventType2["EventClientCustomFieldsUpdated"] = "clientCustomFieldsUpdated";
364
+ audit_log_AuditEventType2["EventFileCreated"] = "fileCreated";
365
+ audit_log_AuditEventType2["EventFileUpdated"] = "fileUpdated";
366
+ audit_log_AuditEventType2["EventFileDeleted"] = "fileDeleted";
367
+ audit_log_AuditEventType2["EventFolderCreated"] = "folderCreated";
368
+ audit_log_AuditEventType2["EventFolderUpdated"] = "folderUpdated";
369
+ audit_log_AuditEventType2["EventFolderDeleted"] = "folderDeleted";
370
+ audit_log_AuditEventType2["EventLinkCreated"] = "linkCreated";
371
+ audit_log_AuditEventType2["EventLinkUpdated"] = "linkUpdated";
372
+ audit_log_AuditEventType2["EventLinkDeleted"] = "linkDeleted";
373
+ audit_log_AuditEventType2["EventInvoiceCreated"] = "invoiceCreated";
374
+ audit_log_AuditEventType2["EventInvoiceInitiated"] = "invoiceInitiated";
375
+ audit_log_AuditEventType2["EventInvoicePaid"] = "invoicePaid";
376
+ audit_log_AuditEventType2["EventInvoiceUpdated"] = "invoiceUpdated";
377
+ audit_log_AuditEventType2["EventInvoiceDeleted"] = "invoiceDeleted";
378
+ audit_log_AuditEventType2["EventInvoiceVoided"] = "invoiceVoided";
379
+ audit_log_AuditEventType2["EventInvoiceDownloaded"] = "invoiceDownloaded";
380
+ audit_log_AuditEventType2["EventRefundRequested"] = "refundRequested";
381
+ audit_log_AuditEventType2["EventRefundSucceeded"] = "refundSucceeded";
382
+ audit_log_AuditEventType2["EventRefundFailed"] = "refundFailed";
383
+ audit_log_AuditEventType2["EventMessageSent"] = "messageSent";
384
+ audit_log_AuditEventType2["EventMessageChannelCreated"] = "messageChannelCreated";
385
+ audit_log_AuditEventType2["EventMessageChannelDeleted"] = "messageChannelDeleted";
386
+ audit_log_AuditEventType2["EventTaskCreated"] = "taskCreated";
387
+ audit_log_AuditEventType2["EventTaskUpdated"] = "taskUpdated";
388
+ audit_log_AuditEventType2["EventTaskDeleted"] = "taskDeleted";
389
+ audit_log_AuditEventType2["EventTaskArchived"] = "taskArchived";
390
+ audit_log_AuditEventType2["EventTaskCompleted"] = "taskCompleted";
391
+ audit_log_AuditEventType2["EventPaymentSucceeded"] = "paymentSucceeded";
392
+ audit_log_AuditEventType2["EventPaymentFailed"] = "paymentFailed";
393
+ audit_log_AuditEventType2["EventSubscriptionCreated"] = "subscriptionCreated";
394
+ audit_log_AuditEventType2["EventSubscriptionCancelled"] = "subscriptionCancelled";
395
+ audit_log_AuditEventType2["EventPriceCreated"] = "priceCreated";
396
+ audit_log_AuditEventType2["EventProductCreated"] = "productCreated";
397
+ audit_log_AuditEventType2["EventProductUpdated"] = "productUpdated";
398
+ audit_log_AuditEventType2["EventContractRequested"] = "contractRequested";
399
+ audit_log_AuditEventType2["EventContractCompleted"] = "contractCompleted";
400
+ audit_log_AuditEventType2["EventContractDownloaded"] = "contractDownloaded";
401
+ audit_log_AuditEventType2["EventFileDownloaded"] = "fileDownloaded";
402
+ audit_log_AuditEventType2["EventFileBatchDownloaded"] = "fileBatchDownloaded";
403
+ audit_log_AuditEventType2["EventFileBatchDeleted"] = "fileBatchDeleted";
404
+ audit_log_AuditEventType2["EventNoteCreated"] = "noteCreated";
405
+ audit_log_AuditEventType2["EventNoteUpdated"] = "noteUpdated";
406
+ audit_log_AuditEventType2["EventNoteDeleted"] = "noteDeleted";
407
+ audit_log_AuditEventType2["EventInternalUserCreated"] = "internalUserCreated";
408
+ audit_log_AuditEventType2["EventInternalUserDeleted"] = "internalUserDeleted";
409
+ audit_log_AuditEventType2["EventInternalUserAccessLevelChanged"] = "internalUserAccessLevelChanged";
410
+ audit_log_AuditEventType2["EventInternalUserClientVisibilitySet"] = "internalUserClientVisibilitySet";
411
+ audit_log_AuditEventType2["EventAPIKeyCreated"] = "apiKeyCreated";
412
+ audit_log_AuditEventType2["EventAPIKeyDeleted"] = "apiKeyDeleted";
413
+ audit_log_AuditEventType2["EventConnectorConnected"] = "connectorConnected";
414
+ audit_log_AuditEventType2["EventConnectorReconnected"] = "connectorReconnected";
415
+ audit_log_AuditEventType2["EventConnectorRevoked"] = "connectorRevoked";
416
+ audit_log_AuditEventType2["EventConnectorRevokedExternally"] = "connectorRevokedExternally";
417
+ audit_log_AuditEventType2["EventFormCreated"] = "formCreated";
418
+ audit_log_AuditEventType2["EventFormEdited"] = "formEdited";
419
+ audit_log_AuditEventType2["EventFormAssigned"] = "formAssigned";
420
+ audit_log_AuditEventType2["EventFormResponseCompleted"] = "formResponseCompleted";
421
+ audit_log_AuditEventType2["EventCustomEvent"] = "customEvent";
422
+ audit_log_AuditEventType2["EventSessionStarted"] = "sessionStarted";
423
+ audit_log_AuditEventType2["EventSessionEnded"] = "sessionEnded";
424
+ audit_log_AuditEventType2["EventAppApiResourceRegistered"] = "appApiResourceRegistered";
425
+ audit_log_AuditEventType2["EventAppApiResourceUpdated"] = "appApiResourceUpdated";
426
+ audit_log_AuditEventType2["EventAppApiResourceDeleted"] = "appApiResourceDeleted";
427
+ audit_log_AuditEventType2["EventAppAccessCreated"] = "appAccessCreated";
428
+ audit_log_AuditEventType2["EventAppAccessStatusChanged"] = "appAccessStatusChanged";
429
+ audit_log_AuditEventType2["EventAppAccessDeleted"] = "appAccessDeleted";
430
+ audit_log_AuditEventType2["EventAppBuilderSecretUpdated"] = "appBuilderSecretUpdated";
431
+ audit_log_AuditEventType2["EventAppEventEmitted"] = "appEventEmitted";
432
+ audit_log_AuditEventType2["EventQAAgentBearerMinted"] = "qaAgentBearerMinted";
433
+ audit_log_AuditEventType2["EventQAImpersonationTokenMinted"] = "qaImpersonationTokenMinted";
434
+ audit_log_AuditEventType2["EventQAPrincipalCreated"] = "qaPrincipalCreated";
435
+ audit_log_AuditEventType2["EventQAPrincipalDeleted"] = "qaPrincipalDeleted";
436
+ })(audit_log_AuditEventType || (audit_log_AuditEventType = {}));
437
+
438
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/audit_log_AuditLog.js
439
+ var audit_log_AuditLog;
440
+ (function(audit_log_AuditLog2) {
441
+ let actorType;
442
+ (function(actorType2) {
443
+ actorType2["INTERNAL_USER"] = "internalUser";
444
+ actorType2["CLIENT_USER"] = "clientUser";
445
+ })(actorType = audit_log_AuditLog2.actorType || (audit_log_AuditLog2.actorType = {}));
446
+ let source;
447
+ (function(source2) {
448
+ source2["WEB"] = "web";
449
+ source2["PLATFORM"] = "platform";
450
+ source2["AUTOMATION"] = "automation";
451
+ source2["SYSTEM"] = "system";
452
+ })(source = audit_log_AuditLog2.source || (audit_log_AuditLog2.source = {}));
453
+ })(audit_log_AuditLog || (audit_log_AuditLog = {}));
454
+
455
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/audit_log_Source.js
456
+ var audit_log_Source;
457
+ (function(audit_log_Source2) {
458
+ audit_log_Source2["SourceWeb"] = "web";
459
+ audit_log_Source2["SourcePlatform"] = "platform";
460
+ audit_log_Source2["SourceAutomation"] = "automation";
461
+ audit_log_Source2["SourceSystem"] = "system";
462
+ })(audit_log_Source || (audit_log_Source = {}));
463
+
464
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/billing_Template.js
465
+ var billing_Template;
466
+ (function(billing_Template2) {
467
+ let interval;
468
+ (function(interval2) {
469
+ interval2["DAY"] = "day";
470
+ interval2["WEEK"] = "week";
471
+ interval2["MONTH"] = "month";
472
+ interval2["QUARTERLY"] = "quarterly";
473
+ interval2["BIANNUALLY"] = "biannually";
474
+ interval2["YEAR"] = "year";
475
+ interval2["SEMIANNUALLY"] = "semiannually";
476
+ })(interval = billing_Template2.interval || (billing_Template2.interval = {}));
477
+ })(billing_Template || (billing_Template = {}));
478
+
479
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/billingutils_BillingPeriodType.js
480
+ var billingutils_BillingPeriodType;
481
+ (function(billingutils_BillingPeriodType2) {
482
+ billingutils_BillingPeriodType2["BillingPeriodTypeDay"] = "day";
483
+ billingutils_BillingPeriodType2["BillingPeriodTypeWeek"] = "week";
484
+ billingutils_BillingPeriodType2["BillingPeriodTypeMonth"] = "month";
485
+ billingutils_BillingPeriodType2["BillingPeriodTypeQuarter"] = "quarterly";
486
+ billingutils_BillingPeriodType2["BillingPeriodTypeBiannual"] = "biannually";
487
+ billingutils_BillingPeriodType2["BillingPeriodTypeYear"] = "year";
488
+ billingutils_BillingPeriodType2["BillingPeriodTypeSemiAnnually"] = "semiannually";
489
+ })(billingutils_BillingPeriodType || (billingutils_BillingPeriodType = {}));
490
+
491
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/constants_ApiObject.js
492
+ var constants_ApiObject;
493
+ (function(constants_ApiObject2) {
494
+ constants_ApiObject2["ApiObjectClient"] = "client";
495
+ constants_ApiObject2["ApiObjectInternalUser"] = "internalUser";
496
+ constants_ApiObject2["ApiObjectCompany"] = "company";
497
+ constants_ApiObject2["ApiObjectCustomField"] = "customField";
498
+ constants_ApiObject2["ApiObjectCustomFieldOption"] = "customFieldOption";
499
+ constants_ApiObject2["ApiObjectFile"] = "file";
500
+ constants_ApiObject2["ApiObjectFileChannel"] = "fileChannel";
501
+ constants_ApiObject2["ApiObjectFolder"] = "folder";
502
+ constants_ApiObject2["ApiObjectMessageChannel"] = "messageChannel";
503
+ constants_ApiObject2["ApiObjectMessage"] = "message";
504
+ constants_ApiObject2["ApiObjectNotification"] = "notification";
505
+ })(constants_ApiObject || (constants_ApiObject = {}));
506
+
507
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/constants_SignStatus.js
508
+ var constants_SignStatus;
509
+ (function(constants_SignStatus2) {
510
+ constants_SignStatus2["FileEsigStatusSignPending"] = "pending";
511
+ constants_SignStatus2["FileEsigStatusSignSent"] = "sent";
512
+ constants_SignStatus2["FileEsigStatusSignDone"] = "done";
513
+ })(constants_SignStatus || (constants_SignStatus = {}));
514
+
515
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/contracts_Contract.js
516
+ var contracts_Contract;
517
+ (function(contracts_Contract2) {
518
+ let creationMode;
519
+ (function(creationMode2) {
520
+ creationMode2["ONE_OFF"] = "oneOff";
521
+ creationMode2["TEMPLATE"] = "template";
522
+ })(creationMode = contracts_Contract2.creationMode || (contracts_Contract2.creationMode = {}));
523
+ let status;
524
+ (function(status2) {
525
+ status2["PENDING"] = "pending";
526
+ status2["SIGNED"] = "signed";
527
+ })(status = contracts_Contract2.status || (contracts_Contract2.status = {}));
528
+ })(contracts_Contract || (contracts_Contract = {}));
529
+
530
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/contracts_ContractCreationMode.js
531
+ var contracts_ContractCreationMode;
532
+ (function(contracts_ContractCreationMode2) {
533
+ contracts_ContractCreationMode2["ContractCreationModeOneOff"] = "oneOff";
534
+ contracts_ContractCreationMode2["ContractCreationModeTemplate"] = "template";
535
+ })(contracts_ContractCreationMode || (contracts_ContractCreationMode = {}));
536
+
537
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/contracts_ContractField.js
538
+ var contracts_ContractField;
539
+ (function(contracts_ContractField2) {
540
+ let inputType;
541
+ (function(inputType2) {
542
+ inputType2["CLIENT"] = "client";
543
+ inputType2["FIXED"] = "fixed";
544
+ inputType2["AUTO_FILL"] = "autoFill";
545
+ inputType2["VARIABLE"] = "variable";
546
+ })(inputType = contracts_ContractField2.inputType || (contracts_ContractField2.inputType = {}));
547
+ let type;
548
+ (function(type2) {
549
+ type2["SIGNATURE"] = "signature";
550
+ type2["INITIALS"] = "initials";
551
+ type2["DATE"] = "date";
552
+ type2["TEXT"] = "text";
553
+ })(type = contracts_ContractField2.type || (contracts_ContractField2.type = {}));
554
+ })(contracts_ContractField || (contracts_ContractField = {}));
555
+
556
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/contracts_ContractStatus.js
557
+ var contracts_ContractStatus;
558
+ (function(contracts_ContractStatus2) {
559
+ contracts_ContractStatus2["ContractStatusPending"] = "pending";
560
+ contracts_ContractStatus2["ContractStatusSigned"] = "signed";
561
+ })(contracts_ContractStatus || (contracts_ContractStatus = {}));
562
+
563
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/contracts_CreateContractRequest.js
564
+ var contracts_CreateContractRequest;
565
+ (function(contracts_CreateContractRequest2) {
566
+ let creationMode;
567
+ (function(creationMode2) {
568
+ creationMode2["ONE_OFF"] = "oneOff";
569
+ creationMode2["TEMPLATE"] = "template";
570
+ })(creationMode = contracts_CreateContractRequest2.creationMode || (contracts_CreateContractRequest2.creationMode = {}));
571
+ })(contracts_CreateContractRequest || (contracts_CreateContractRequest = {}));
572
+
573
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/contracts_FieldType.js
574
+ var contracts_FieldType;
575
+ (function(contracts_FieldType2) {
576
+ contracts_FieldType2["FieldTypeSignature"] = "signature";
577
+ contracts_FieldType2["FieldTypeInitials"] = "initials";
578
+ contracts_FieldType2["FieldTypeDate"] = "date";
579
+ contracts_FieldType2["FieldTypeText"] = "text";
580
+ contracts_FieldType2["FieldTypeCheckbox"] = "checkbox";
581
+ })(contracts_FieldType || (contracts_FieldType = {}));
582
+
583
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/contracts_InputType.js
584
+ var contracts_InputType;
585
+ (function(contracts_InputType2) {
586
+ contracts_InputType2["InputTypeClient"] = "client";
587
+ contracts_InputType2["InputTypeFixed"] = "fixed";
588
+ contracts_InputType2["InputTypeAutoFill"] = "autoFill";
589
+ contracts_InputType2["InputTypeVariable"] = "variable";
590
+ })(contracts_InputType || (contracts_InputType = {}));
591
+
592
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/contracts_SignatureEventType.js
593
+ var contracts_SignatureEventType;
594
+ (function(contracts_SignatureEventType2) {
595
+ contracts_SignatureEventType2["SignatureEventTypeSent"] = "sent";
596
+ contracts_SignatureEventType2["SignatureEventTypeSigned"] = "signed";
597
+ })(contracts_SignatureEventType || (contracts_SignatureEventType = {}));
598
+
599
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/customfields_ClientCustomField.js
600
+ var customfields_ClientCustomField;
601
+ (function(customfields_ClientCustomField2) {
602
+ let entityType;
603
+ (function(entityType2) {
604
+ entityType2["CLIENT"] = "client";
605
+ entityType2["COMPANY"] = "company";
606
+ })(entityType = customfields_ClientCustomField2.entityType || (customfields_ClientCustomField2.entityType = {}));
607
+ let type;
608
+ (function(type2) {
609
+ type2["TEXT"] = "text";
610
+ type2["NUMBER"] = "number";
611
+ type2["EMAIL"] = "email";
612
+ type2["URL"] = "url";
613
+ type2["PHONE_NUMBER"] = "phoneNumber";
614
+ type2["ADDRESS"] = "address";
615
+ type2["MULTI_SELECT"] = "multiSelect";
616
+ })(type = customfields_ClientCustomField2.type || (customfields_ClientCustomField2.type = {}));
617
+ })(customfields_ClientCustomField || (customfields_ClientCustomField = {}));
618
+
619
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/customfields_createCustomFieldInput.js
620
+ var customfields_createCustomFieldInput;
621
+ (function(customfields_createCustomFieldInput2) {
622
+ let entityType;
623
+ (function(entityType2) {
624
+ entityType2["CLIENT"] = "client";
625
+ entityType2["COMPANY"] = "company";
626
+ })(entityType = customfields_createCustomFieldInput2.entityType || (customfields_createCustomFieldInput2.entityType = {}));
627
+ let type;
628
+ (function(type2) {
629
+ type2["TEXT"] = "text";
630
+ type2["NUMBER"] = "number";
631
+ type2["EMAIL"] = "email";
632
+ type2["URL"] = "url";
633
+ type2["PHONE_NUMBER"] = "phoneNumber";
634
+ type2["ADDRESS"] = "address";
635
+ type2["MULTI_SELECT"] = "multiSelect";
636
+ })(type = customfields_createCustomFieldInput2.type || (customfields_createCustomFieldInput2.type = {}));
637
+ })(customfields_createCustomFieldInput || (customfields_createCustomFieldInput = {}));
638
+
639
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/fields_models_VisibilityComparator.js
640
+ var fields_models_VisibilityComparator;
641
+ (function(fields_models_VisibilityComparator2) {
642
+ fields_models_VisibilityComparator2["IncludesAnyOf"] = "includesAnyOf";
643
+ fields_models_VisibilityComparator2["DoesntContainAnyOf"] = "doesntContainAnyOf";
644
+ fields_models_VisibilityComparator2["IncludesAllOf"] = "includesAllOf";
645
+ })(fields_models_VisibilityComparator || (fields_models_VisibilityComparator = {}));
646
+
647
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/fields_models_VisibilityRuleType.js
648
+ var fields_models_VisibilityRuleType;
649
+ (function(fields_models_VisibilityRuleType2) {
650
+ fields_models_VisibilityRuleType2["ClientVisibility"] = "client";
651
+ fields_models_VisibilityRuleType2["CompanyVisibility"] = "company";
652
+ fields_models_VisibilityRuleType2["CustomFieldVisibility"] = "customField";
653
+ fields_models_VisibilityRuleType2["NoVisibility"] = "noVisibility";
654
+ })(fields_models_VisibilityRuleType || (fields_models_VisibilityRuleType = {}));
655
+
656
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/filechannel_CreateFileChannelInput.js
657
+ var filechannel_CreateFileChannelInput;
658
+ (function(filechannel_CreateFileChannelInput2) {
659
+ let membershipType;
660
+ (function(membershipType2) {
661
+ membershipType2["INDIVIDUAL"] = "individual";
662
+ membershipType2["COMPANY"] = "company";
663
+ membershipType2["GROUP"] = "group";
664
+ })(membershipType = filechannel_CreateFileChannelInput2.membershipType || (filechannel_CreateFileChannelInput2.membershipType = {}));
665
+ })(filechannel_CreateFileChannelInput || (filechannel_CreateFileChannelInput = {}));
666
+
667
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/filechannels_FileChannel.js
668
+ var filechannels_FileChannel;
669
+ (function(filechannels_FileChannel2) {
670
+ let membershipType;
671
+ (function(membershipType2) {
672
+ membershipType2["INDIVIDUAL"] = "individual";
673
+ membershipType2["COMPANY"] = "company";
674
+ membershipType2["GROUP"] = "group";
675
+ })(membershipType = filechannels_FileChannel2.membershipType || (filechannels_FileChannel2.membershipType = {}));
676
+ let rootClientPermissions;
677
+ (function(rootClientPermissions2) {
678
+ rootClientPermissions2["READ_WRITE"] = "read_write";
679
+ rootClientPermissions2["READ_ONLY"] = "read_only";
680
+ })(rootClientPermissions = filechannels_FileChannel2.rootClientPermissions || (filechannels_FileChannel2.rootClientPermissions = {}));
681
+ })(filechannels_FileChannel || (filechannels_FileChannel = {}));
682
+
683
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/files_CreateFileInput.js
684
+ var files_CreateFileInput;
685
+ (function(files_CreateFileInput2) {
686
+ let clientPermissions;
687
+ (function(clientPermissions2) {
688
+ clientPermissions2["READ_WRITE"] = "read_write";
689
+ clientPermissions2["READ_ONLY"] = "read_only";
690
+ })(clientPermissions = files_CreateFileInput2.clientPermissions || (files_CreateFileInput2.clientPermissions = {}));
691
+ let duplicateBehavior;
692
+ (function(duplicateBehavior2) {
693
+ duplicateBehavior2["APPEND"] = "append";
694
+ duplicateBehavior2["REPLACE"] = "replace";
695
+ })(duplicateBehavior = files_CreateFileInput2.duplicateBehavior || (files_CreateFileInput2.duplicateBehavior = {}));
696
+ let type;
697
+ (function(type2) {
698
+ type2["FILE"] = "file";
699
+ type2["FOLDER"] = "folder";
700
+ type2["LINK"] = "link";
701
+ })(type = files_CreateFileInput2.type || (files_CreateFileInput2.type = {}));
702
+ })(files_CreateFileInput || (files_CreateFileInput = {}));
703
+
704
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/files_DuplicateBehavior.js
705
+ var files_DuplicateBehavior;
706
+ (function(files_DuplicateBehavior2) {
707
+ files_DuplicateBehavior2["DuplicateBehaviorAppend"] = "append";
708
+ files_DuplicateBehavior2["DuplicateBehaviorReplace"] = "replace";
709
+ })(files_DuplicateBehavior || (files_DuplicateBehavior = {}));
710
+
711
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/files_Fields.js
712
+ var files_Fields;
713
+ (function(files_Fields2) {
714
+ let eSignatureStatus;
715
+ (function(eSignatureStatus2) {
716
+ eSignatureStatus2["PENDING"] = "pending";
717
+ eSignatureStatus2["SENT"] = "sent";
718
+ eSignatureStatus2["DONE"] = "done";
719
+ })(eSignatureStatus = files_Fields2.eSignatureStatus || (files_Fields2.eSignatureStatus = {}));
720
+ let status;
721
+ (function(status2) {
722
+ status2["PENDING"] = "pending";
723
+ status2["COMPLETE"] = "complete";
724
+ })(status = files_Fields2.status || (files_Fields2.status = {}));
725
+ })(files_Fields || (files_Fields = {}));
726
+
727
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/files_File.js
728
+ var files_File;
729
+ (function(files_File2) {
730
+ let clientPermissions;
731
+ (function(clientPermissions2) {
732
+ clientPermissions2["READ_WRITE"] = "read_write";
733
+ clientPermissions2["READ_ONLY"] = "read_only";
734
+ })(clientPermissions = files_File2.clientPermissions || (files_File2.clientPermissions = {}));
735
+ })(files_File || (files_File = {}));
736
+
737
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/files_FileUploadStatus.js
738
+ var files_FileUploadStatus;
739
+ (function(files_FileUploadStatus2) {
740
+ files_FileUploadStatus2["UploadPending"] = "pending";
741
+ files_FileUploadStatus2["UploadComplete"] = "complete";
742
+ })(files_FileUploadStatus || (files_FileUploadStatus = {}));
743
+
744
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/forms_FormFields.js
745
+ var forms_FormFields;
746
+ (function(forms_FormFields2) {
747
+ let visibility;
748
+ (function(visibility2) {
749
+ visibility2["REQUESTED_CLIENTS"] = "requestedClients";
750
+ visibility2["ALL_CLIENTS"] = "allClients";
751
+ })(visibility = forms_FormFields2.visibility || (forms_FormFields2.visibility = {}));
752
+ })(forms_FormFields || (forms_FormFields = {}));
753
+
754
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/forms_FormFieldType.js
755
+ var forms_FormFieldType;
756
+ (function(forms_FormFieldType2) {
757
+ forms_FormFieldType2["FormFieldTypeShortAnswer"] = "shortAnswer";
758
+ forms_FormFieldType2["FormFieldTypeLongAnswer"] = "longAnswer";
759
+ forms_FormFieldType2["FormFieldTypeSingleSelect"] = "singleSelect";
760
+ forms_FormFieldType2["FormFieldTypeMultiSelect"] = "multiSelect";
761
+ forms_FormFieldType2["FormFieldTypeTitle"] = "title";
762
+ forms_FormFieldType2["FormFieldTypeFileUpload"] = "fileUpload";
763
+ forms_FormFieldType2["FormFieldTypePhoneNumber"] = "phoneNumber";
764
+ forms_FormFieldType2["FormFieldTypeEmail"] = "email";
765
+ forms_FormFieldType2["FormFieldTypeDate"] = "date";
766
+ forms_FormFieldType2["FormFieldTypeDropdown"] = "dropdown";
767
+ })(forms_FormFieldType || (forms_FormFieldType = {}));
768
+
769
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/forms_FormQuestionFields.js
770
+ var forms_FormQuestionFields;
771
+ (function(forms_FormQuestionFields2) {
772
+ let type;
773
+ (function(type2) {
774
+ type2["SHORT_ANSWER"] = "shortAnswer";
775
+ type2["LONG_ANSWER"] = "longAnswer";
776
+ type2["SINGLE_SELECT"] = "singleSelect";
777
+ type2["MULTI_SELECT"] = "multiSelect";
778
+ type2["TITLE"] = "title";
779
+ type2["FILE_UPLOAD"] = "fileUpload";
780
+ type2["PHONE_NUMBER"] = "phoneNumber";
781
+ type2["EMAIL"] = "email";
782
+ type2["DATE"] = "date";
783
+ type2["DROPDOWN"] = "dropdown";
784
+ })(type = forms_FormQuestionFields2.type || (forms_FormQuestionFields2.type = {}));
785
+ })(forms_FormQuestionFields || (forms_FormQuestionFields = {}));
786
+
787
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/forms_FormResponseFields.js
788
+ var forms_FormResponseFields;
789
+ (function(forms_FormResponseFields2) {
790
+ let status;
791
+ (function(status2) {
792
+ status2["PENDING"] = "pending";
793
+ status2["COMPLETED"] = "completed";
794
+ status2["OPEN"] = "open";
795
+ })(status = forms_FormResponseFields2.status || (forms_FormResponseFields2.status = {}));
796
+ let visibility;
797
+ (function(visibility2) {
798
+ visibility2["REQUESTED_CLIENTS"] = "requestedClients";
799
+ visibility2["ALL_CLIENTS"] = "allClients";
800
+ })(visibility = forms_FormResponseFields2.visibility || (forms_FormResponseFields2.visibility = {}));
801
+ })(forms_FormResponseFields || (forms_FormResponseFields = {}));
802
+
803
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/forms_FormResponseQuestion.js
804
+ var forms_FormResponseQuestion;
805
+ (function(forms_FormResponseQuestion2) {
806
+ let type;
807
+ (function(type2) {
808
+ type2["SHORT_ANSWER"] = "shortAnswer";
809
+ type2["LONG_ANSWER"] = "longAnswer";
810
+ type2["SINGLE_SELECT"] = "singleSelect";
811
+ type2["MULTI_SELECT"] = "multiSelect";
812
+ type2["TITLE"] = "title";
813
+ type2["FILE_UPLOAD"] = "fileUpload";
814
+ type2["PHONE_NUMBER"] = "phoneNumber";
815
+ type2["EMAIL"] = "email";
816
+ type2["DATE"] = "date";
817
+ type2["DROPDOWN"] = "dropdown";
818
+ })(type = forms_FormResponseQuestion2.type || (forms_FormResponseQuestion2.type = {}));
819
+ })(forms_FormResponseQuestion || (forms_FormResponseQuestion = {}));
820
+
821
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/forms_FormVisibilityType.js
822
+ var forms_FormVisibilityType;
823
+ (function(forms_FormVisibilityType2) {
824
+ forms_FormVisibilityType2["FormVisibilityTypeOnSend"] = "requestedClients";
825
+ forms_FormVisibilityType2["FormVisibilityTypeAllClients"] = "allClients";
826
+ })(forms_FormVisibilityType || (forms_FormVisibilityType = {}));
827
+
828
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/handler_UpdateFolderPermissionsRequest.js
829
+ var handler_UpdateFolderPermissionsRequest;
830
+ (function(handler_UpdateFolderPermissionsRequest2) {
831
+ let clientPermissions;
832
+ (function(clientPermissions2) {
833
+ clientPermissions2["READ_ONLY_READ_WRITE"] = "read_only read_write";
834
+ })(clientPermissions = handler_UpdateFolderPermissionsRequest2.clientPermissions || (handler_UpdateFolderPermissionsRequest2.clientPermissions = {}));
835
+ })(handler_UpdateFolderPermissionsRequest || (handler_UpdateFolderPermissionsRequest = {}));
836
+
837
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/handler_UpdateRootFolderPermissionsRequest.js
838
+ var handler_UpdateRootFolderPermissionsRequest;
839
+ (function(handler_UpdateRootFolderPermissionsRequest2) {
840
+ let clientPermissions;
841
+ (function(clientPermissions2) {
842
+ clientPermissions2["READ_ONLY_READ_WRITE"] = "read_only read_write";
843
+ })(clientPermissions = handler_UpdateRootFolderPermissionsRequest2.clientPermissions || (handler_UpdateRootFolderPermissionsRequest2.clientPermissions = {}));
844
+ })(handler_UpdateRootFolderPermissionsRequest || (handler_UpdateRootFolderPermissionsRequest = {}));
845
+
846
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/internal_notes_CreateNoteHandlerInput.js
847
+ var internal_notes_CreateNoteHandlerInput;
848
+ (function(internal_notes_CreateNoteHandlerInput2) {
849
+ let entityType;
850
+ (function(entityType2) {
851
+ entityType2["CLIENT"] = "client";
852
+ entityType2["COMPANY"] = "company";
853
+ })(entityType = internal_notes_CreateNoteHandlerInput2.entityType || (internal_notes_CreateNoteHandlerInput2.entityType = {}));
854
+ })(internal_notes_CreateNoteHandlerInput || (internal_notes_CreateNoteHandlerInput = {}));
855
+
856
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/internal_notes_Note.js
857
+ var internal_notes_Note;
858
+ (function(internal_notes_Note2) {
859
+ let entityType;
860
+ (function(entityType2) {
861
+ entityType2["CLIENT"] = "client";
862
+ entityType2["COMPANY"] = "company";
863
+ })(entityType = internal_notes_Note2.entityType || (internal_notes_Note2.entityType = {}));
864
+ })(internal_notes_Note || (internal_notes_Note = {}));
865
+
866
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/invoice_CreateInvoiceRequest.js
867
+ var invoice_CreateInvoiceRequest;
868
+ (function(invoice_CreateInvoiceRequest2) {
869
+ let collectionMethod;
870
+ (function(collectionMethod2) {
871
+ collectionMethod2["SEND_INVOICE"] = "sendInvoice";
872
+ collectionMethod2["CHARGE_AUTOMATICALLY"] = "chargeAutomatically";
873
+ collectionMethod2["PAYMENT_LINK"] = "paymentLink";
874
+ })(collectionMethod = invoice_CreateInvoiceRequest2.collectionMethod || (invoice_CreateInvoiceRequest2.collectionMethod = {}));
875
+ })(invoice_CreateInvoiceRequest || (invoice_CreateInvoiceRequest = {}));
876
+
877
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/invoice_Invoice.js
878
+ var invoice_Invoice;
879
+ (function(invoice_Invoice2) {
880
+ let collectionMethod;
881
+ (function(collectionMethod2) {
882
+ collectionMethod2["SEND_INVOICE"] = "sendInvoice";
883
+ collectionMethod2["CHARGE_AUTOMATICALLY"] = "chargeAutomatically";
884
+ collectionMethod2["PAYMENT_LINK"] = "paymentLink";
885
+ })(collectionMethod = invoice_Invoice2.collectionMethod || (invoice_Invoice2.collectionMethod = {}));
886
+ let invoiceCreationStatus;
887
+ (function(invoiceCreationStatus2) {
888
+ invoiceCreationStatus2["EPHEMERAL"] = "ephemeral";
889
+ invoiceCreationStatus2["PENDING"] = "pending";
890
+ invoiceCreationStatus2["CREATED"] = "created";
891
+ })(invoiceCreationStatus = invoice_Invoice2.invoiceCreationStatus || (invoice_Invoice2.invoiceCreationStatus = {}));
892
+ let latestRefundStatus;
893
+ (function(latestRefundStatus2) {
894
+ latestRefundStatus2["PENDING"] = "pending";
895
+ latestRefundStatus2["SUCCEEDED"] = "succeeded";
896
+ latestRefundStatus2["FAILED"] = "failed";
897
+ })(latestRefundStatus = invoice_Invoice2.latestRefundStatus || (invoice_Invoice2.latestRefundStatus = {}));
898
+ let origin;
899
+ (function(origin2) {
900
+ origin2["INTERNAL"] = "internal";
901
+ origin2["PAYMENT_LINK"] = "payment_link";
902
+ origin2["PRODUCT_STORE"] = "product_store";
903
+ })(origin = invoice_Invoice2.origin || (invoice_Invoice2.origin = {}));
904
+ let status;
905
+ (function(status2) {
906
+ status2["DRAFT"] = "draft";
907
+ status2["OPEN"] = "open";
908
+ status2["VOID"] = "void";
909
+ status2["PAID"] = "paid";
910
+ status2["PROCESSING"] = "processing";
911
+ })(status = invoice_Invoice2.status || (invoice_Invoice2.status = {}));
912
+ })(invoice_Invoice || (invoice_Invoice = {}));
913
+
914
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/invoice_Origin.js
915
+ var invoice_Origin;
916
+ (function(invoice_Origin2) {
917
+ invoice_Origin2["OriginInternal"] = "internal";
918
+ invoice_Origin2["OriginPaymentLink"] = "payment_link";
919
+ invoice_Origin2["OriginProductStore"] = "product_store";
920
+ })(invoice_Origin || (invoice_Origin = {}));
921
+
922
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/marketplace_application_TaskInput.js
923
+ var marketplace_application_TaskInput;
924
+ (function(marketplace_application_TaskInput2) {
925
+ let status;
926
+ (function(status2) {
927
+ status2["TODO"] = "todo";
928
+ status2["IN_PROGRESS"] = "inProgress";
929
+ status2["COMPLETED"] = "completed";
930
+ })(status = marketplace_application_TaskInput2.status || (marketplace_application_TaskInput2.status = {}));
931
+ })(marketplace_application_TaskInput || (marketplace_application_TaskInput = {}));
932
+
933
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/messagechannel_CreateMessageChannelRequest.js
934
+ var messagechannel_CreateMessageChannelRequest;
935
+ (function(messagechannel_CreateMessageChannelRequest2) {
936
+ let membershipType;
937
+ (function(membershipType2) {
938
+ membershipType2["COMPANY"] = "company";
939
+ membershipType2["INDIVIDUAL"] = "individual";
940
+ membershipType2["GROUP"] = "group";
941
+ })(membershipType = messagechannel_CreateMessageChannelRequest2.membershipType || (messagechannel_CreateMessageChannelRequest2.membershipType = {}));
942
+ })(messagechannel_CreateMessageChannelRequest || (messagechannel_CreateMessageChannelRequest = {}));
943
+
944
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/messagechannel_MessageChannel.js
945
+ var messagechannel_MessageChannel;
946
+ (function(messagechannel_MessageChannel2) {
947
+ let membershipType;
948
+ (function(membershipType2) {
949
+ membershipType2["COMPANY"] = "company";
950
+ membershipType2["INDIVIDUAL"] = "individual";
951
+ membershipType2["GROUP"] = "group";
952
+ })(membershipType = messagechannel_MessageChannel2.membershipType || (messagechannel_MessageChannel2.membershipType = {}));
953
+ })(messagechannel_MessageChannel || (messagechannel_MessageChannel = {}));
954
+
955
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/notifications_CreateInput.js
956
+ var notifications_CreateInput;
957
+ (function(notifications_CreateInput2) {
958
+ let recipientType;
959
+ (function(recipientType2) {
960
+ recipientType2["CLIENT"] = "client";
961
+ recipientType2["INTERNAL_USER"] = "internalUser";
962
+ recipientType2["COMPANY"] = "company";
963
+ })(recipientType = notifications_CreateInput2.recipientType || (notifications_CreateInput2.recipientType = {}));
964
+ })(notifications_CreateInput || (notifications_CreateInput = {}));
965
+
966
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/notifications_EventType.js
967
+ var notifications_EventType;
968
+ (function(notifications_EventType2) {
969
+ notifications_EventType2["NewFileGroups"] = "files.created";
970
+ notifications_EventType2["NewFile"] = "file.created";
971
+ notifications_EventType2["ContractSigned"] = "contract.signed";
972
+ notifications_EventType2["ContractRequested"] = "contract.requested";
973
+ notifications_EventType2["FormResponseRequested"] = "formResponse.requested";
974
+ notifications_EventType2["FormResponseCompleted"] = "formResponse.completed";
975
+ notifications_EventType2["FormCreated"] = "form.created";
976
+ notifications_EventType2["InvoicePaid"] = "invoice.paid";
977
+ notifications_EventType2["InvoiceRequested"] = "invoice.requested";
978
+ notifications_EventType2["InvoiceProcessing"] = "invoice.processing";
979
+ notifications_EventType2["InvoicePaymentFailed"] = "invoice.paymentFailed";
980
+ notifications_EventType2["RefundRequested"] = "refund.requested";
981
+ notifications_EventType2["RefundProcessed"] = "refund.processed";
982
+ notifications_EventType2["RefundFailed"] = "refund.failed";
983
+ notifications_EventType2["AutoChargePayment"] = "autoChargePayment.requested";
984
+ notifications_EventType2["CustomAppAction"] = "customApp.action";
985
+ notifications_EventType2["AppBuilderBuildComplete"] = "customApp.buildComplete";
986
+ notifications_EventType2["InternalChatMention"] = "internalChat.mentioned";
987
+ notifications_EventType2["ChannelMention"] = "channel.mentioned";
988
+ })(notifications_EventType || (notifications_EventType = {}));
989
+
990
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/notifications_MemberType.js
991
+ var notifications_MemberType;
992
+ (function(notifications_MemberType2) {
993
+ notifications_MemberType2["Internal"] = "USER";
994
+ notifications_MemberType2["Client"] = "CLIENT_USER";
995
+ notifications_MemberType2["Company"] = "CLIENT_COMPANY";
996
+ })(notifications_MemberType || (notifications_MemberType = {}));
997
+
998
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/notifications_Notification.js
999
+ var notifications_Notification;
1000
+ (function(notifications_Notification2) {
1001
+ let event;
1002
+ (function(event2) {
1003
+ event2["FILES_CREATED"] = "files.created";
1004
+ event2["FILE_CREATED"] = "file.created";
1005
+ event2["CONTRACT_SIGNED"] = "contract.signed";
1006
+ event2["CONTRACT_REQUESTED"] = "contract.requested";
1007
+ event2["FORM_RESPONSE_REQUESTED"] = "formResponse.requested";
1008
+ event2["FORM_RESPONSE_COMPLETED"] = "formResponse.completed";
1009
+ event2["FORM_CREATED"] = "form.created";
1010
+ event2["INVOICE_PAID"] = "invoice.paid";
1011
+ event2["INVOICE_REQUESTED"] = "invoice.requested";
1012
+ event2["INVOICE_PROCESSING"] = "invoice.processing";
1013
+ event2["INVOICE_PAYMENT_FAILED"] = "invoice.paymentFailed";
1014
+ event2["REFUND_REQUESTED"] = "refund.requested";
1015
+ event2["REFUND_PROCESSED"] = "refund.processed";
1016
+ event2["REFUND_FAILED"] = "refund.failed";
1017
+ event2["AUTO_CHARGE_PAYMENT_REQUESTED"] = "autoChargePayment.requested";
1018
+ event2["CUSTOM_APP_ACTION"] = "customApp.action";
1019
+ event2["INTERNAL_CHAT_MENTIONED"] = "internalChat.mentioned";
1020
+ event2["CHANNEL_MENTIONED"] = "channel.mentioned";
1021
+ })(event = notifications_Notification2.event || (notifications_Notification2.event = {}));
1022
+ let senderType;
1023
+ (function(senderType2) {
1024
+ senderType2["CLIENT"] = "client";
1025
+ senderType2["INTERNAL_USER"] = "internalUser";
1026
+ senderType2["COMPANY"] = "company";
1027
+ })(senderType = notifications_Notification2.senderType || (notifications_Notification2.senderType = {}));
1028
+ })(notifications_Notification || (notifications_Notification = {}));
1029
+
1030
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/notificationsettings_InternalUserNotificationSettings.js
1031
+ var notificationsettings_InternalUserNotificationSettings;
1032
+ (function(notificationsettings_InternalUserNotificationSettings2) {
1033
+ let emailSettings;
1034
+ (function(emailSettings2) {
1035
+ emailSettings2["ALWAYS"] = "always";
1036
+ emailSettings2["NOT_ACTIVE"] = "not_active";
1037
+ emailSettings2["NO_EMAILS"] = "no_emails";
1038
+ })(emailSettings = notificationsettings_InternalUserNotificationSettings2.emailSettings || (notificationsettings_InternalUserNotificationSettings2.emailSettings = {}));
1039
+ })(notificationsettings_InternalUserNotificationSettings || (notificationsettings_InternalUserNotificationSettings = {}));
1040
+
1041
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/payment_FeeItem.js
1042
+ var payment_FeeItem;
1043
+ (function(payment_FeeItem2) {
1044
+ let type;
1045
+ (function(type2) {
1046
+ type2["ACH_FIXED"] = "achFixed";
1047
+ type2["ACH_PERCENTAGE"] = "achPercentage";
1048
+ type2["CC_FIXED"] = "ccFixed";
1049
+ type2["CC_PERCENTAGE"] = "ccPercentage";
1050
+ type2["CC_INTERNATIONAL_PERCENTAGE"] = "ccInternationalPercentage";
1051
+ type2["CC_CONVERSION_PERCENTAGE"] = "ccConversionPercentage";
1052
+ type2["RECURRING_PERCENTAGE"] = "recurringPercentage";
1053
+ type2["STORE_PERCENTAGE"] = "storePercentage";
1054
+ type2["INVOICE_PERCENTAGE"] = "invoicePercentage";
1055
+ type2["ACH_THRESHOLD_EXCEEDED_PERCENTAGE"] = "achThresholdExceededPercentage";
1056
+ })(type = payment_FeeItem2.type || (payment_FeeItem2.type = {}));
1057
+ })(payment_FeeItem || (payment_FeeItem = {}));
1058
+
1059
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/payment_Payment.js
1060
+ var payment_Payment;
1061
+ (function(payment_Payment2) {
1062
+ let paymentMethod;
1063
+ (function(paymentMethod2) {
1064
+ paymentMethod2["BANK_ACCOUNT"] = "bankAccount";
1065
+ paymentMethod2["CREDIT_CARD"] = "creditCard";
1066
+ })(paymentMethod = payment_Payment2.paymentMethod || (payment_Payment2.paymentMethod = {}));
1067
+ let status;
1068
+ (function(status2) {
1069
+ status2["PENDING"] = "pending";
1070
+ status2["PROCESSING"] = "processing";
1071
+ status2["SUCCEEDED"] = "succeeded";
1072
+ status2["FAILED"] = "failed";
1073
+ status2["REFUNDED"] = "refunded";
1074
+ })(status = payment_Payment2.status || (payment_Payment2.status = {}));
1075
+ })(payment_Payment || (payment_Payment = {}));
1076
+
1077
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/payment_PaymentMethodPreference.js
1078
+ var payment_PaymentMethodPreference;
1079
+ (function(payment_PaymentMethodPreference2) {
1080
+ let type;
1081
+ (function(type2) {
1082
+ type2["BANK_ACCOUNT"] = "bankAccount";
1083
+ type2["CREDIT_CARD"] = "creditCard";
1084
+ })(type = payment_PaymentMethodPreference2.type || (payment_PaymentMethodPreference2.type = {}));
1085
+ })(payment_PaymentMethodPreference || (payment_PaymentMethodPreference = {}));
1086
+
1087
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/price_CreatePriceInput.js
1088
+ var price_CreatePriceInput;
1089
+ (function(price_CreatePriceInput2) {
1090
+ let interval;
1091
+ (function(interval2) {
1092
+ interval2["DAY"] = "day";
1093
+ interval2["WEEK"] = "week";
1094
+ interval2["MONTH"] = "month";
1095
+ interval2["QUARTERLY"] = "quarterly";
1096
+ interval2["BIANNUALLY"] = "biannually";
1097
+ interval2["YEAR"] = "year";
1098
+ interval2["SEMIANNUALLY"] = "semiannually";
1099
+ })(interval = price_CreatePriceInput2.interval || (price_CreatePriceInput2.interval = {}));
1100
+ let type;
1101
+ (function(type2) {
1102
+ type2["ONE_TIME"] = "oneTime";
1103
+ type2["RECURRING"] = "recurring";
1104
+ })(type = price_CreatePriceInput2.type || (price_CreatePriceInput2.type = {}));
1105
+ })(price_CreatePriceInput || (price_CreatePriceInput = {}));
1106
+
1107
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/price_Price.js
1108
+ var price_Price;
1109
+ (function(price_Price2) {
1110
+ let interval;
1111
+ (function(interval2) {
1112
+ interval2["DAY"] = "day";
1113
+ interval2["WEEK"] = "week";
1114
+ interval2["MONTH"] = "month";
1115
+ interval2["QUARTERLY"] = "quarterly";
1116
+ interval2["BIANNUALLY"] = "biannually";
1117
+ interval2["YEAR"] = "year";
1118
+ interval2["SEMIANNUALLY"] = "semiannually";
1119
+ })(interval = price_Price2.interval || (price_Price2.interval = {}));
1120
+ let type;
1121
+ (function(type2) {
1122
+ type2["ONE_TIME"] = "oneTime";
1123
+ type2["RECURRING"] = "recurring";
1124
+ })(type = price_Price2.type || (price_Price2.type = {}));
1125
+ })(price_Price || (price_Price = {}));
1126
+
1127
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/price_PriceType.js
1128
+ var price_PriceType;
1129
+ (function(price_PriceType2) {
1130
+ price_PriceType2["PriceTypeOneTime"] = "oneTime";
1131
+ price_PriceType2["PriceTypeRecurring"] = "recurring";
1132
+ })(price_PriceType || (price_PriceType = {}));
1133
+
1134
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/product_CreateProductInput.js
1135
+ var product_CreateProductInput;
1136
+ (function(product_CreateProductInput2) {
1137
+ let status;
1138
+ (function(status2) {
1139
+ status2["ACTIVE"] = "active";
1140
+ status2["ARCHIVED"] = "archived";
1141
+ })(status = product_CreateProductInput2.status || (product_CreateProductInput2.status = {}));
1142
+ })(product_CreateProductInput || (product_CreateProductInput = {}));
1143
+
1144
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/product_Product.js
1145
+ var product_Product;
1146
+ (function(product_Product2) {
1147
+ let status;
1148
+ (function(status2) {
1149
+ status2["ACTIVE"] = "active";
1150
+ status2["ARCHIVED"] = "archived";
1151
+ })(status = product_Product2.status || (product_Product2.status = {}));
1152
+ })(product_Product || (product_Product = {}));
1153
+
1154
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/product_ProductStatusType.js
1155
+ var product_ProductStatusType;
1156
+ (function(product_ProductStatusType2) {
1157
+ product_ProductStatusType2["ProductStatusTypeActive"] = "active";
1158
+ product_ProductStatusType2["ProductStatusTypeArchived"] = "archived";
1159
+ })(product_ProductStatusType || (product_ProductStatusType = {}));
1160
+
1161
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/refund_Refund.js
1162
+ var refund_Refund;
1163
+ (function(refund_Refund2) {
1164
+ let status;
1165
+ (function(status2) {
1166
+ status2["PENDING"] = "pending";
1167
+ status2["SUCCEEDED"] = "succeeded";
1168
+ status2["FAILED"] = "failed";
1169
+ })(status = refund_Refund2.status || (refund_Refund2.status = {}));
1170
+ })(refund_Refund || (refund_Refund = {}));
1171
+
1172
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/refund_RefundStatusType.js
1173
+ var refund_RefundStatusType;
1174
+ (function(refund_RefundStatusType2) {
1175
+ refund_RefundStatusType2["RefundStatusPending"] = "pending";
1176
+ refund_RefundStatusType2["RefundStatusSucceeded"] = "succeeded";
1177
+ refund_RefundStatusType2["RefundStatusFailed"] = "failed";
1178
+ })(refund_RefundStatusType || (refund_RefundStatusType = {}));
1179
+
1180
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/subscription_CreateSubscriptionInput.js
1181
+ var subscription_CreateSubscriptionInput;
1182
+ (function(subscription_CreateSubscriptionInput2) {
1183
+ let collectionMethod;
1184
+ (function(collectionMethod2) {
1185
+ collectionMethod2["SEND_INVOICE"] = "sendInvoice";
1186
+ collectionMethod2["CHARGE_AUTOMATICALLY"] = "chargeAutomatically";
1187
+ })(collectionMethod = subscription_CreateSubscriptionInput2.collectionMethod || (subscription_CreateSubscriptionInput2.collectionMethod = {}));
1188
+ })(subscription_CreateSubscriptionInput || (subscription_CreateSubscriptionInput = {}));
1189
+
1190
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/models/subscription_Subscription.js
1191
+ var subscription_Subscription;
1192
+ (function(subscription_Subscription2) {
1193
+ let collectionMethod;
1194
+ (function(collectionMethod2) {
1195
+ collectionMethod2["SEND_INVOICE"] = "sendInvoice";
1196
+ collectionMethod2["CHARGE_AUTOMATICALLY"] = "chargeAutomatically";
1197
+ })(collectionMethod = subscription_Subscription2.collectionMethod || (subscription_Subscription2.collectionMethod = {}));
1198
+ })(subscription_Subscription || (subscription_Subscription = {}));
1199
+
1200
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/core/request.js
1201
+ var __awaiter = function(thisArg, _arguments, P, generator) {
1202
+ function adopt(value) {
1203
+ return value instanceof P ? value : new P(function(resolve2) {
1204
+ resolve2(value);
1205
+ });
1206
+ }
1207
+ return new (P || (P = Promise))(function(resolve2, reject) {
1208
+ function fulfilled(value) {
1209
+ try {
1210
+ step(generator.next(value));
1211
+ } catch (e) {
1212
+ reject(e);
1213
+ }
1214
+ }
1215
+ function rejected(value) {
1216
+ try {
1217
+ step(generator["throw"](value));
1218
+ } catch (e) {
1219
+ reject(e);
1220
+ }
1221
+ }
1222
+ function step(result) {
1223
+ result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
1224
+ }
1225
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1226
+ });
1227
+ };
1228
+ var isDefined = (value) => {
1229
+ return value !== void 0 && value !== null;
1230
+ };
1231
+ var isString = (value) => {
1232
+ return typeof value === "string";
1233
+ };
1234
+ var isStringWithValue = (value) => {
1235
+ return isString(value) && value !== "";
1236
+ };
1237
+ var isBlob = (value) => {
1238
+ return typeof value === "object" && typeof value.type === "string" && typeof value.stream === "function" && typeof value.arrayBuffer === "function" && typeof value.constructor === "function" && typeof value.constructor.name === "string" && /^(Blob|File)$/.test(value.constructor.name) && /^(Blob|File)$/.test(value[Symbol.toStringTag]);
1239
+ };
1240
+ var isFormData = (value) => {
1241
+ return value instanceof FormData;
1242
+ };
1243
+ var base64 = (str) => {
1244
+ try {
1245
+ return btoa(str);
1246
+ } catch (err) {
1247
+ return Buffer.from(str).toString("base64");
1248
+ }
1249
+ };
1250
+ var getQueryString = (params) => {
1251
+ const qs = [];
1252
+ const append = (key, value) => {
1253
+ qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
1254
+ };
1255
+ const process2 = (key, value) => {
1256
+ if (isDefined(value)) {
1257
+ if (Array.isArray(value)) {
1258
+ value.forEach((v) => {
1259
+ process2(key, v);
1260
+ });
1261
+ } else if (typeof value === "object") {
1262
+ Object.entries(value).forEach(([k, v]) => {
1263
+ process2(`${key}[${k}]`, v);
1264
+ });
1265
+ } else {
1266
+ append(key, value);
1267
+ }
1268
+ }
1269
+ };
1270
+ Object.entries(params).forEach(([key, value]) => {
1271
+ process2(key, value);
1272
+ });
1273
+ if (qs.length > 0) {
1274
+ return `?${qs.join("&")}`;
1275
+ }
1276
+ return "";
1277
+ };
1278
+ var getUrl = (config, options) => {
1279
+ const encoder = config.ENCODE_PATH || encodeURI;
1280
+ const path = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
1281
+ var _a;
1282
+ if ((_a = options.path) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(group)) {
1283
+ return encoder(String(options.path[group]));
1284
+ }
1285
+ return substring;
1286
+ });
1287
+ const url = `${config.BASE}${path}`;
1288
+ if (options.query) {
1289
+ return `${url}${getQueryString(options.query)}`;
1290
+ }
1291
+ return url;
1292
+ };
1293
+ var getFormData = (options) => {
1294
+ if (options.formData) {
1295
+ const formData = new FormData();
1296
+ const process2 = (key, value) => {
1297
+ if (isString(value) || isBlob(value)) {
1298
+ formData.append(key, value);
1299
+ } else {
1300
+ formData.append(key, JSON.stringify(value));
1301
+ }
1302
+ };
1303
+ Object.entries(options.formData).filter(([_, value]) => isDefined(value)).forEach(([key, value]) => {
1304
+ if (Array.isArray(value)) {
1305
+ value.forEach((v) => process2(key, v));
1306
+ } else {
1307
+ process2(key, value);
1308
+ }
1309
+ });
1310
+ return formData;
1311
+ }
1312
+ return void 0;
1313
+ };
1314
+ var resolve = (options, resolver) => __awaiter(void 0, void 0, void 0, function* () {
1315
+ if (typeof resolver === "function") {
1316
+ return resolver(options);
1317
+ }
1318
+ return resolver;
1319
+ });
1320
+ var getHeaders = (config, options) => __awaiter(void 0, void 0, void 0, function* () {
1321
+ const token = yield resolve(options, config.TOKEN);
1322
+ const username = yield resolve(options, config.USERNAME);
1323
+ const password = yield resolve(options, config.PASSWORD);
1324
+ const additionalHeaders = yield resolve(options, config.HEADERS);
1325
+ const headers = Object.entries(Object.assign(Object.assign({ Accept: "application/json" }, additionalHeaders), options.headers)).filter(([_, value]) => isDefined(value)).reduce((headers2, [key, value]) => Object.assign(Object.assign({}, headers2), { [key]: String(value) }), {});
1326
+ if (isStringWithValue(token)) {
1327
+ headers["Authorization"] = `Bearer ${token}`;
1328
+ }
1329
+ if (isStringWithValue(username) && isStringWithValue(password)) {
1330
+ const credentials = base64(`${username}:${password}`);
1331
+ headers["Authorization"] = `Basic ${credentials}`;
1332
+ }
1333
+ if (options.body) {
1334
+ if (options.mediaType) {
1335
+ headers["Content-Type"] = options.mediaType;
1336
+ } else if (isBlob(options.body)) {
1337
+ headers["Content-Type"] = options.body.type || "application/octet-stream";
1338
+ } else if (isString(options.body)) {
1339
+ headers["Content-Type"] = "text/plain";
1340
+ } else if (!isFormData(options.body)) {
1341
+ headers["Content-Type"] = "application/json";
1342
+ }
1343
+ }
1344
+ return new Headers(headers);
1345
+ });
1346
+ var getRequestBody = (options) => {
1347
+ var _a;
1348
+ if (options.body !== void 0) {
1349
+ if ((_a = options.mediaType) === null || _a === void 0 ? void 0 : _a.includes("/json")) {
1350
+ return JSON.stringify(options.body);
1351
+ } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
1352
+ return options.body;
1353
+ } else {
1354
+ return JSON.stringify(options.body);
1355
+ }
1356
+ }
1357
+ return void 0;
1358
+ };
1359
+ var sendRequest = (config, options, url, body, formData, headers, onCancel) => __awaiter(void 0, void 0, void 0, function* () {
1360
+ const controller = new AbortController();
1361
+ const request2 = {
1362
+ headers,
1363
+ body: body !== null && body !== void 0 ? body : formData,
1364
+ method: options.method,
1365
+ signal: controller.signal
1366
+ };
1367
+ if (config.WITH_CREDENTIALS) {
1368
+ request2.credentials = config.CREDENTIALS;
1369
+ }
1370
+ onCancel(() => controller.abort());
1371
+ return yield fetch(url, request2);
1372
+ });
1373
+ var getResponseHeader = (response, responseHeader) => {
1374
+ if (responseHeader) {
1375
+ const content = response.headers.get(responseHeader);
1376
+ if (isString(content)) {
1377
+ return content;
1378
+ }
1379
+ }
1380
+ return void 0;
1381
+ };
1382
+ var getResponseBody = (response) => __awaiter(void 0, void 0, void 0, function* () {
1383
+ if (response.status !== 204) {
1384
+ try {
1385
+ const contentType = response.headers.get("Content-Type");
1386
+ if (contentType) {
1387
+ const jsonTypes = ["application/json", "application/problem+json"];
1388
+ const isJSON = jsonTypes.some((type) => contentType.toLowerCase().startsWith(type));
1389
+ if (isJSON) {
1390
+ return yield response.json();
1391
+ } else {
1392
+ return yield response.text();
1393
+ }
1394
+ }
1395
+ } catch (error) {
1396
+ console.error(error);
1397
+ }
1398
+ }
1399
+ return void 0;
1400
+ });
1401
+ var catchErrorCodes = (options, result) => {
1402
+ var _a, _b;
1403
+ const errors = Object.assign({ 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", 500: "Internal Server Error", 502: "Bad Gateway", 503: "Service Unavailable" }, options.errors);
1404
+ const error = errors[result.status];
1405
+ if (error) {
1406
+ throw new ApiError(options, result, error);
1407
+ }
1408
+ if (!result.ok) {
1409
+ const errorStatus = (_a = result.status) !== null && _a !== void 0 ? _a : "unknown";
1410
+ const errorStatusText = (_b = result.statusText) !== null && _b !== void 0 ? _b : "unknown";
1411
+ const errorBody = (() => {
1412
+ try {
1413
+ return JSON.stringify(result.body, null, 2);
1414
+ } catch (e) {
1415
+ return void 0;
1416
+ }
1417
+ })();
1418
+ throw new ApiError(options, result, `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`);
1419
+ }
1420
+ };
1421
+ var request = (config, options) => {
1422
+ return new CancelablePromise((resolve2, reject, onCancel) => __awaiter(void 0, void 0, void 0, function* () {
1423
+ try {
1424
+ const url = getUrl(config, options);
1425
+ const formData = getFormData(options);
1426
+ const body = getRequestBody(options);
1427
+ const headers = yield getHeaders(config, options);
1428
+ if (!onCancel.isCancelled) {
1429
+ const response = yield sendRequest(config, options, url, body, formData, headers, onCancel);
1430
+ const responseBody = yield getResponseBody(response);
1431
+ const responseHeader = getResponseHeader(response, options.responseHeader);
1432
+ const result = {
1433
+ url,
1434
+ ok: response.ok,
1435
+ status: response.status,
1436
+ statusText: response.statusText,
1437
+ body: responseHeader !== null && responseHeader !== void 0 ? responseHeader : responseBody
1438
+ };
1439
+ catchErrorCodes(options, result);
1440
+ resolve2(result.body);
1441
+ }
1442
+ } catch (error) {
1443
+ reject(error);
1444
+ }
1445
+ }));
1446
+ };
1447
+
1448
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/ClientsService.js
1449
+ var ClientsService = class {
1450
+ /**
1451
+ * List clients
1452
+ *
1453
+ * Lists the clients within the portal, paginated. Supports filtering by
1454
+ * company, name, email, and tag-based custom field values.
1455
+ *
1456
+ * @param limit Maximum number of clients to return
1457
+ * @param nextToken Pagination cursor returned by a previous call
1458
+ * @param companyId Filter by company ID
1459
+ * @param givenName Filter by client given (first) name
1460
+ * @param familyName Filter by client family (last) name
1461
+ * @param email Filter by client email
1462
+ * @param customFields Filter by tag-based custom field values. Repeatable bracket-style param: customFields[<fieldKey>]=<optionKey>[,<optionKey>...]. Values within a single bracket are matched with OR; multiple bracketed fields are combined with AND. Only multi-select custom fields are supported.
1463
+ *
1464
+ * @example
1465
+ * await assembly.listClients();
1466
+ */
1467
+ static listClients({ limit, nextToken, companyId, givenName, familyName, email, customFields }) {
1468
+ return request(OpenAPI, {
1469
+ method: "GET",
1470
+ url: "/v1/clients",
1471
+ query: {
1472
+ "limit": limit,
1473
+ "nextToken": nextToken,
1474
+ "companyId": companyId,
1475
+ "givenName": givenName,
1476
+ "familyName": familyName,
1477
+ "email": email,
1478
+ "customFields": customFields
1479
+ },
1480
+ errors: {
1481
+ 400: `Invalid query parameters`,
1482
+ 401: `Missing or invalid API key`,
1483
+ 500: `Unexpected server error`
1484
+ }
1485
+ });
1486
+ }
1487
+ /**
1488
+ * Create a client
1489
+ *
1490
+ * Creates a client. Requires givenName, familyName, email, and a company
1491
+ * association (companyId, or companyIds in multi-company portals). Set the
1492
+ * `sendInvite=true` query param to email the client an invite on creation.
1493
+ *
1494
+ * @param sendInvite Send the client an invite email on creation
1495
+ *
1496
+ * @example
1497
+ * await assembly.createClient({ requestBody: ... });
1498
+ */
1499
+ static createClient({ requestBody, sendInvite }) {
1500
+ return request(OpenAPI, {
1501
+ method: "POST",
1502
+ url: "/v1/clients",
1503
+ query: {
1504
+ "sendInvite": sendInvite
1505
+ },
1506
+ body: requestBody,
1507
+ mediaType: "application/json",
1508
+ errors: {
1509
+ 400: `Invalid request body or field values`,
1510
+ 401: `Missing or invalid API key`,
1511
+ 500: `Unexpected server error`
1512
+ }
1513
+ });
1514
+ }
1515
+ /**
1516
+ * Delete a client
1517
+ *
1518
+ * Deletes a client by ID. The response echoes the deleted object's ID with
1519
+ * `deleted: true`.
1520
+ *
1521
+ * @param id Client ID
1522
+ *
1523
+ * @example
1524
+ * await assembly.deleteClient({ id: ... });
1525
+ */
1526
+ static deleteClient({ id }) {
1527
+ return request(OpenAPI, {
1528
+ method: "DELETE",
1529
+ url: "/v1/clients/{id}",
1530
+ path: {
1531
+ "id": id
1532
+ },
1533
+ errors: {
1534
+ 400: `Missing client ID or client could not be deleted`,
1535
+ 401: `Missing or invalid API key`,
1536
+ 500: `Unexpected server error`
1537
+ }
1538
+ });
1539
+ }
1540
+ /**
1541
+ * Retrieve a client
1542
+ *
1543
+ * Returns a single client by ID.
1544
+ *
1545
+ * @param id Client ID
1546
+ *
1547
+ * @example
1548
+ * await assembly.retrieveClient({ id: ... });
1549
+ */
1550
+ static retrieveClient({ id }) {
1551
+ return request(OpenAPI, {
1552
+ method: "GET",
1553
+ url: "/v1/clients/{id}",
1554
+ path: {
1555
+ "id": id
1556
+ },
1557
+ errors: {
1558
+ 400: `Invalid or unknown client ID`,
1559
+ 401: `Missing or invalid API key`,
1560
+ 500: `Unexpected server error`
1561
+ }
1562
+ });
1563
+ }
1564
+ /**
1565
+ * Update a client
1566
+ *
1567
+ * Partially updates a client. Only givenName, familyName, companyId, and
1568
+ * customFields are mutable; any other field in the body is ignored and
1569
+ * echoed back in the `X-Ignored-Fields` response header. Set
1570
+ * `sendInvite=true` to send (or resend) the client's invite when they are
1571
+ * not yet active.
1572
+ *
1573
+ * @param id Client ID
1574
+ * @param sendInvite Send or resend the client's invite email
1575
+ *
1576
+ * @example
1577
+ * await assembly.updateClient({ id: ..., requestBody: ... });
1578
+ */
1579
+ static updateClient({ id, requestBody, sendInvite }) {
1580
+ return request(OpenAPI, {
1581
+ method: "PATCH",
1582
+ url: "/v1/clients/{id}",
1583
+ path: {
1584
+ "id": id
1585
+ },
1586
+ query: {
1587
+ "sendInvite": sendInvite
1588
+ },
1589
+ body: requestBody,
1590
+ mediaType: "application/json",
1591
+ errors: {
1592
+ 400: `Invalid request body`,
1593
+ 401: `Missing or invalid API key`,
1594
+ 404: `Client not found`,
1595
+ 500: `Unexpected server error`
1596
+ }
1597
+ });
1598
+ }
1599
+ /**
1600
+ * Retrieve a client with app visibility
1601
+ *
1602
+ * Returns the same Client object as GET /v1/clients/{id} with an additional
1603
+ * `appVisibility` field nested at the root. The field is an array grouping
1604
+ * the apps visible to the client by each company the client belongs to. The
1605
+ * same install may appear in more than one group when visible across
1606
+ * multiple companies.
1607
+ *
1608
+ * @param id Client ID
1609
+ *
1610
+ * @example
1611
+ * await assembly.retrieveClientAppVisibility({ id: ... });
1612
+ */
1613
+ static retrieveClientAppVisibility({ id }) {
1614
+ return request(OpenAPI, {
1615
+ method: "GET",
1616
+ url: "/v1/clients/{id}/app-visibility",
1617
+ path: {
1618
+ "id": id
1619
+ },
1620
+ errors: {
1621
+ 400: `Invalid or unknown client ID`,
1622
+ 401: `Missing or invalid API key`,
1623
+ 500: `Unexpected server error`
1624
+ }
1625
+ });
1626
+ }
1627
+ };
1628
+
1629
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/CommentsService.js
1630
+ var CommentsService = class {
1631
+ /**
1632
+ * List task comments
1633
+ *
1634
+ * Lists task comments from the Tasks marketplace app installed on the
1635
+ * workspace. The request is proxied to the app's comments API. Requires the
1636
+ * Tasks app to be installed.
1637
+ *
1638
+ * @param limit Maximum number of comments to return
1639
+ * @param nextToken Pagination cursor returned by a previous list response
1640
+ * @param taskId Filter comments to a single task by its id
1641
+ *
1642
+ * @example
1643
+ * await assembly.getV1Comments();
1644
+ */
1645
+ static getV1Comments({ limit, nextToken, taskId }) {
1646
+ return request(OpenAPI, {
1647
+ method: "GET",
1648
+ url: "/v1/comments",
1649
+ query: {
1650
+ "limit": limit,
1651
+ "nextToken": nextToken,
1652
+ "taskId": taskId
1653
+ },
1654
+ errors: {
1655
+ 400: `Invalid query parameter for the app resource`,
1656
+ 401: `Missing or invalid API key`,
1657
+ 404: `App not found, not installed on the workspace, or app resource not found`,
1658
+ 422: `App API rejected the request as unprocessable`,
1659
+ 429: `App API rate limit exceeded`,
1660
+ 500: `App API request failed or unexpected server error`
1661
+ }
1662
+ });
1663
+ }
1664
+ /**
1665
+ * Delete a task comment
1666
+ *
1667
+ * Deletes a task comment by id via the Tasks marketplace app installed on
1668
+ * the workspace. The request is proxied to the app's comments API and
1669
+ * returns the deleted comment marker. Requires the Tasks app to be
1670
+ * installed.
1671
+ *
1672
+ * @param commentId Comment id
1673
+ *
1674
+ * @example
1675
+ * await assembly.deleteV1CommentsCommentid({ commentId: ... });
1676
+ */
1677
+ static deleteV1CommentsCommentid({ commentId }) {
1678
+ return request(OpenAPI, {
1679
+ method: "DELETE",
1680
+ url: "/v1/comments/{commentId}",
1681
+ path: {
1682
+ "commentId": commentId
1683
+ },
1684
+ errors: {
1685
+ 400: `Invalid request for the app resource`,
1686
+ 401: `Missing or invalid API key`,
1687
+ 404: `App not found, not installed on the workspace, app resource not found, or comment not found`,
1688
+ 422: `App API rejected the request as unprocessable`,
1689
+ 429: `App API rate limit exceeded`,
1690
+ 500: `App API request failed or unexpected server error`
1691
+ }
1692
+ });
1693
+ }
1694
+ /**
1695
+ * Retrieve a task comment
1696
+ *
1697
+ * Retrieves a single task comment by id from the Tasks marketplace app
1698
+ * installed on the workspace. The request is proxied to the app's comments
1699
+ * API. Requires the Tasks app to be installed.
1700
+ *
1701
+ * @param commentId Comment id
1702
+ *
1703
+ * @example
1704
+ * await assembly.getV1CommentsCommentid({ commentId: ... });
1705
+ */
1706
+ static getV1CommentsCommentid({ commentId }) {
1707
+ return request(OpenAPI, {
1708
+ method: "GET",
1709
+ url: "/v1/comments/{commentId}",
1710
+ path: {
1711
+ "commentId": commentId
1712
+ },
1713
+ errors: {
1714
+ 400: `Invalid request for the app resource`,
1715
+ 401: `Missing or invalid API key`,
1716
+ 404: `App not found, not installed on the workspace, app resource not found, or comment not found`,
1717
+ 422: `App API rejected the request as unprocessable`,
1718
+ 429: `App API rate limit exceeded`,
1719
+ 500: `App API request failed or unexpected server error`
1720
+ }
1721
+ });
1722
+ }
1723
+ };
1724
+
1725
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/CompaniesService.js
1726
+ var CompaniesService = class {
1727
+ /**
1728
+ * List companies
1729
+ *
1730
+ * Lists the companies within the portal, paginated. Supports filtering by
1731
+ * name (case-insensitive substring) and placeholder status.
1732
+ *
1733
+ * @param limit Maximum number of companies to return
1734
+ * @param nextToken Pagination cursor returned by a previous call
1735
+ * @param name Case-insensitive substring filter on company name
1736
+ * @param isPlaceholder Filter by placeholder status
1737
+ *
1738
+ * @example
1739
+ * await assembly.listCompanies();
1740
+ */
1741
+ static listCompanies({ limit, nextToken, name, isPlaceholder }) {
1742
+ return request(OpenAPI, {
1743
+ method: "GET",
1744
+ url: "/v1/companies",
1745
+ query: {
1746
+ "limit": limit,
1747
+ "nextToken": nextToken,
1748
+ "name": name,
1749
+ "isPlaceholder": isPlaceholder
1750
+ },
1751
+ errors: {
1752
+ 400: `Invalid pagination parameters`,
1753
+ 401: `Missing or invalid API key`,
1754
+ 500: `Unexpected server error`
1755
+ }
1756
+ });
1757
+ }
1758
+ /**
1759
+ * Create a company
1760
+ *
1761
+ * Creates a company. Requires a name; fallbackColor, iconImageUrl, and
1762
+ * customFields are optional.
1763
+ *
1764
+ * @example
1765
+ * await assembly.createCompany({ requestBody: ... });
1766
+ */
1767
+ static createCompany({ requestBody }) {
1768
+ return request(OpenAPI, {
1769
+ method: "POST",
1770
+ url: "/v1/companies",
1771
+ body: requestBody,
1772
+ mediaType: "application/json",
1773
+ errors: {
1774
+ 400: `Invalid request body or field values`,
1775
+ 401: `Missing or invalid API key`,
1776
+ 500: `Unexpected server error`
1777
+ }
1778
+ });
1779
+ }
1780
+ /**
1781
+ * Delete a company
1782
+ *
1783
+ * Deletes a company by its ID. Returns the deleted object marker.
1784
+ *
1785
+ * @param id Company ID
1786
+ *
1787
+ * @example
1788
+ * await assembly.deleteCompany({ id: ... });
1789
+ */
1790
+ static deleteCompany({ id }) {
1791
+ return request(OpenAPI, {
1792
+ method: "DELETE",
1793
+ url: "/v1/companies/{id}",
1794
+ path: {
1795
+ "id": id
1796
+ },
1797
+ errors: {
1798
+ 400: `Missing company ID`,
1799
+ 401: `Missing or invalid API key`,
1800
+ 404: `Company not found`,
1801
+ 500: `Unexpected server error`
1802
+ }
1803
+ });
1804
+ }
1805
+ /**
1806
+ * Retrieve a company
1807
+ *
1808
+ * Retrieves a single company by its ID.
1809
+ *
1810
+ * @param id Company ID
1811
+ *
1812
+ * @example
1813
+ * await assembly.retrieveCompany({ id: ... });
1814
+ */
1815
+ static retrieveCompany({ id }) {
1816
+ return request(OpenAPI, {
1817
+ method: "GET",
1818
+ url: "/v1/companies/{id}",
1819
+ path: {
1820
+ "id": id
1821
+ },
1822
+ errors: {
1823
+ 400: `Missing company ID`,
1824
+ 401: `Missing or invalid API key`,
1825
+ 404: `Company not found`,
1826
+ 500: `Unexpected server error`
1827
+ }
1828
+ });
1829
+ }
1830
+ /**
1831
+ * Update a company
1832
+ *
1833
+ * Updates a company's name and/or custom field values. A non-empty name is
1834
+ * required.
1835
+ *
1836
+ * @param id Company ID
1837
+ *
1838
+ * @example
1839
+ * await assembly.updateCompany({ id: ..., requestBody: ... });
1840
+ */
1841
+ static updateCompany({ id, requestBody }) {
1842
+ return request(OpenAPI, {
1843
+ method: "PATCH",
1844
+ url: "/v1/companies/{id}",
1845
+ path: {
1846
+ "id": id
1847
+ },
1848
+ body: requestBody,
1849
+ mediaType: "application/json",
1850
+ errors: {
1851
+ 400: `Invalid request body or missing company name`,
1852
+ 401: `Missing or invalid API key`,
1853
+ 500: `Unexpected server error`
1854
+ }
1855
+ });
1856
+ }
1857
+ /**
1858
+ * Add clients to a company
1859
+ *
1860
+ * Associates one or more existing clients with a company. Set
1861
+ * `confirmPromotePlaceholder=true` to promote a placeholder company when
1862
+ * adding clients.
1863
+ *
1864
+ * @param id Company ID
1865
+ * @param confirmPromotePlaceholder Promote a placeholder company when adding clients
1866
+ *
1867
+ * @example
1868
+ * await assembly.addClientsToCompany({ id: ..., requestBody: ... });
1869
+ */
1870
+ static addClientsToCompany({ id, requestBody, confirmPromotePlaceholder }) {
1871
+ return request(OpenAPI, {
1872
+ method: "POST",
1873
+ url: "/v1/companies/{id}/clients",
1874
+ path: {
1875
+ "id": id
1876
+ },
1877
+ query: {
1878
+ "confirmPromotePlaceholder": confirmPromotePlaceholder
1879
+ },
1880
+ body: requestBody,
1881
+ mediaType: "application/json",
1882
+ errors: {
1883
+ 400: `Invalid request body`,
1884
+ 401: `Missing or invalid API key`,
1885
+ 500: `Unexpected server error`
1886
+ }
1887
+ });
1888
+ }
1889
+ };
1890
+
1891
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/ContractsService.js
1892
+ var ContractsService = class {
1893
+ /**
1894
+ * List contracts
1895
+ *
1896
+ * Returns a paginated list of contracts for the workspace, optionally
1897
+ * filtered by status, template, recipient, or name.
1898
+ *
1899
+ * @param status Filter contracts by status.
1900
+ * @param contractTemplateId Filter contracts by contract template ID.
1901
+ * @param recipientId Filter contracts by recipient ID. Deprecated alias for clientId.
1902
+ * @param clientId Filter contracts by client ID.
1903
+ * @param name Filter contracts by name.
1904
+ * @param limit Maximum number of records to return.
1905
+ * @param nextToken Pagination cursor returned by a previous request.
1906
+ *
1907
+ * @example
1908
+ * await assembly.listContracts();
1909
+ */
1910
+ static listContracts({ status, contractTemplateId, recipientId, clientId, name, limit, nextToken }) {
1911
+ return request(OpenAPI, {
1912
+ method: "GET",
1913
+ url: "/v1/contracts",
1914
+ query: {
1915
+ "status": status,
1916
+ "contractTemplateId": contractTemplateId,
1917
+ "recipientId": recipientId,
1918
+ "clientId": clientId,
1919
+ "name": name,
1920
+ "limit": limit,
1921
+ "nextToken": nextToken
1922
+ },
1923
+ errors: {
1924
+ 400: `Invalid pagination parameters`,
1925
+ 401: `Missing or invalid API key`,
1926
+ 500: `Unexpected server error`
1927
+ }
1928
+ });
1929
+ }
1930
+ /**
1931
+ * Send Contract
1932
+ *
1933
+ * Creates and sends a contract to a recipient, either from a contract
1934
+ * template or as a one-off contract.
1935
+ *
1936
+ * @example
1937
+ * await assembly.sendContract({ requestBody: ... });
1938
+ */
1939
+ static sendContract({ requestBody }) {
1940
+ return request(OpenAPI, {
1941
+ method: "POST",
1942
+ url: "/v1/contracts",
1943
+ body: requestBody,
1944
+ mediaType: "application/json",
1945
+ errors: {
1946
+ 400: `Malformed body or invalid recipient/template/variable values`,
1947
+ 401: `Missing or invalid API key`,
1948
+ 404: `Contract template not found`
1949
+ }
1950
+ });
1951
+ }
1952
+ /**
1953
+ * Get Contract
1954
+ *
1955
+ * Retrieves a single contract by its ID.
1956
+ *
1957
+ * @param id Contract ID
1958
+ *
1959
+ * @example
1960
+ * await assembly.retrieveContract({ id: ... });
1961
+ */
1962
+ static retrieveContract({ id }) {
1963
+ return request(OpenAPI, {
1964
+ method: "GET",
1965
+ url: "/v1/contracts/{id}",
1966
+ path: {
1967
+ "id": id
1968
+ },
1969
+ errors: {
1970
+ 401: `Missing or invalid API key`,
1971
+ 404: `Contract not found`,
1972
+ 500: `Unexpected server error`
1973
+ }
1974
+ });
1975
+ }
1976
+ };
1977
+
1978
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/ContractTemplatesService.js
1979
+ var ContractTemplatesService = class {
1980
+ /**
1981
+ * List Contract Templates
1982
+ *
1983
+ * Returns a paginated list of contract templates for the workspace,
1984
+ * optionally filtered by name.
1985
+ *
1986
+ * @param name Filter templates by name.
1987
+ * @param limit Maximum number of records to return.
1988
+ * @param nextToken Pagination cursor returned by a previous request.
1989
+ *
1990
+ * @example
1991
+ * await assembly.listContractTemplates();
1992
+ */
1993
+ static listContractTemplates({ name, limit, nextToken }) {
1994
+ return request(OpenAPI, {
1995
+ method: "GET",
1996
+ url: "/v1/contract-templates",
1997
+ query: {
1998
+ "name": name,
1999
+ "limit": limit,
2000
+ "nextToken": nextToken
2001
+ },
2002
+ errors: {
2003
+ 400: `Invalid pagination parameters or unable to list templates`,
2004
+ 401: `Missing or invalid API key`
2005
+ }
2006
+ });
2007
+ }
2008
+ /**
2009
+ * Get Contract Template by ID
2010
+ *
2011
+ * Retrieves a single contract template by its ID.
2012
+ *
2013
+ * @param id Contract template ID
2014
+ *
2015
+ * @example
2016
+ * await assembly.retrieveContractTemplate({ id: ... });
2017
+ */
2018
+ static retrieveContractTemplate({ id }) {
2019
+ return request(OpenAPI, {
2020
+ method: "GET",
2021
+ url: "/v1/contract-templates/{id}",
2022
+ path: {
2023
+ "id": id
2024
+ },
2025
+ errors: {
2026
+ 401: `Missing or invalid API key`,
2027
+ 404: `Contract template not found`,
2028
+ 500: `Unexpected server error`
2029
+ }
2030
+ });
2031
+ }
2032
+ };
2033
+
2034
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/CustomFieldsService.js
2035
+ var CustomFieldsService = class {
2036
+ /**
2037
+ * List custom fields
2038
+ *
2039
+ * Lists the custom fields configured for the portal. Supports filtering by
2040
+ * name and by the entity the field belongs to (client or company).
2041
+ *
2042
+ * @param name Filter custom fields by name (case-insensitive exact match)
2043
+ * @param entityType Filter custom fields by the entity they belong to
2044
+ *
2045
+ * @example
2046
+ * await assembly.listCustomFields();
2047
+ */
2048
+ static listCustomFields({ name, entityType }) {
2049
+ return request(OpenAPI, {
2050
+ method: "GET",
2051
+ url: "/v1/custom-fields",
2052
+ query: {
2053
+ "name": name,
2054
+ "entityType": entityType
2055
+ },
2056
+ errors: {
2057
+ 401: `Missing or invalid API key`,
2058
+ 404: `Custom fields could not be retrieved`
2059
+ }
2060
+ });
2061
+ }
2062
+ /**
2063
+ * Create custom fields
2064
+ *
2065
+ * Creates one or more custom fields for the portal. Each field requires a
2066
+ * name, a type, and the entity it belongs to. Options may only be supplied
2067
+ * for multi-select fields.
2068
+ *
2069
+ * @example
2070
+ * await assembly.createCustomField({ requestBody: ... });
2071
+ */
2072
+ static createCustomField({ requestBody }) {
2073
+ return request(OpenAPI, {
2074
+ method: "POST",
2075
+ url: "/v1/custom-fields",
2076
+ body: requestBody,
2077
+ mediaType: "application/json",
2078
+ errors: {
2079
+ 400: `Invalid request body or field values`,
2080
+ 401: `Missing or invalid API key`,
2081
+ 500: `Unexpected server error`
2082
+ }
2083
+ });
2084
+ }
2085
+ /**
2086
+ * List custom field options
2087
+ *
2088
+ * Lists the selectable options for a multi-select custom field. Supports
2089
+ * filtering the returned options by label.
2090
+ *
2091
+ * @param id Custom field ID
2092
+ * @param label Filter options by label (case-insensitive exact match)
2093
+ *
2094
+ * @example
2095
+ * await assembly.listCustomFieldOptions({ id: ... });
2096
+ */
2097
+ static listCustomFieldOptions({ id, label }) {
2098
+ return request(OpenAPI, {
2099
+ method: "GET",
2100
+ url: "/v1/custom-fields/{id}/options",
2101
+ path: {
2102
+ "id": id
2103
+ },
2104
+ query: {
2105
+ "label": label
2106
+ },
2107
+ errors: {
2108
+ 400: `Missing custom field ID or unknown custom field`,
2109
+ 401: `Missing or invalid API key`,
2110
+ 500: `Unexpected server error`
2111
+ }
2112
+ });
2113
+ }
2114
+ };
2115
+
2116
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/EventsService.js
2117
+ var EventsService = class {
2118
+ /**
2119
+ * List audit events
2120
+ *
2121
+ * Returns a paginated list of audit log events for the authenticated
2122
+ * workspace, optionally filtered by date range, event type, and actor.
2123
+ * Requires internal-user privileges.
2124
+ *
2125
+ * @param startDate Inclusive start date filter (RFC3339)
2126
+ * @param endDate Inclusive end date filter (RFC3339)
2127
+ * @param eventType Comma-separated list of event types to filter by
2128
+ * @param actorId Comma-separated list of actor IDs to filter by
2129
+ * @param nextToken Pagination cursor returned by a previous request.
2130
+ * @param limit Maximum number of records to return.
2131
+ *
2132
+ * @example
2133
+ * await assembly.listEvents();
2134
+ */
2135
+ static listEvents({ startDate, endDate, eventType, actorId, nextToken, limit }) {
2136
+ return request(OpenAPI, {
2137
+ method: "GET",
2138
+ url: "/v1/events",
2139
+ query: {
2140
+ "startDate": startDate,
2141
+ "endDate": endDate,
2142
+ "eventType": eventType,
2143
+ "actorId": actorId,
2144
+ "nextToken": nextToken,
2145
+ "limit": limit
2146
+ },
2147
+ errors: {
2148
+ 400: `Invalid pagination parameters`,
2149
+ 401: `Missing or invalid API key, or caller lacks internal-user privileges`,
2150
+ 500: `Unexpected server error`
2151
+ }
2152
+ });
2153
+ }
2154
+ /**
2155
+ * Create an audit event
2156
+ *
2157
+ * Records a custom audit log event for the authenticated workspace.
2158
+ * Platform-API callers must be on an enterprise plan.
2159
+ *
2160
+ * @example
2161
+ * await assembly.createEvent({ requestBody: ... });
2162
+ */
2163
+ static createEvent({ requestBody }) {
2164
+ return request(OpenAPI, {
2165
+ method: "POST",
2166
+ url: "/v1/events",
2167
+ body: requestBody,
2168
+ mediaType: "application/json",
2169
+ errors: {
2170
+ 400: `Invalid request body, validation error, or disallowed event type`,
2171
+ 401: `Missing or invalid API key`,
2172
+ 403: `Caller lacks privileges or workspace is not on an enterprise plan`,
2173
+ 500: `Unexpected server error`
2174
+ }
2175
+ });
2176
+ }
2177
+ /**
2178
+ * Get audit event by ID
2179
+ *
2180
+ * Returns a single audit log event by its ID for the authenticated
2181
+ * workspace.
2182
+ *
2183
+ * @param id Audit event ID
2184
+ *
2185
+ * @example
2186
+ * await assembly.retrieveEvent({ id: ... });
2187
+ */
2188
+ static retrieveEvent({ id }) {
2189
+ return request(OpenAPI, {
2190
+ method: "GET",
2191
+ url: "/v1/events/{id}",
2192
+ path: {
2193
+ "id": id
2194
+ },
2195
+ errors: {
2196
+ 401: `Missing or invalid API key`,
2197
+ 404: `Audit event not found`,
2198
+ 500: `Unexpected server error`
2199
+ }
2200
+ });
2201
+ }
2202
+ };
2203
+
2204
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/FileChannelsService.js
2205
+ var FileChannelsService = class {
2206
+ /**
2207
+ * List File Channels
2208
+ *
2209
+ * Returns a paginated list of file channels, optionally filtered by
2210
+ * company, client, or membership type.
2211
+ *
2212
+ * @param companyId Filter by company id
2213
+ * @param clientId Filter by client id
2214
+ * @param membershipType Filter by channel grouping type
2215
+ * @param memberId Filter by member id (deprecated legacy schema)
2216
+ * @param membershipEntityId Filter by id of entity the channel is based on (deprecated legacy schema)
2217
+ * @param limit Maximum number of items to return
2218
+ * @param nextToken Pagination cursor returned by a previous response
2219
+ *
2220
+ * @example
2221
+ * await assembly.listFileChannels();
2222
+ */
2223
+ static listFileChannels({ companyId, clientId, membershipType, memberId, membershipEntityId, limit, nextToken }) {
2224
+ return request(OpenAPI, {
2225
+ method: "GET",
2226
+ url: "/v1/channels/files",
2227
+ query: {
2228
+ "companyId": companyId,
2229
+ "clientId": clientId,
2230
+ "membershipType": membershipType,
2231
+ "memberId": memberId,
2232
+ "membershipEntityId": membershipEntityId,
2233
+ "limit": limit,
2234
+ "nextToken": nextToken
2235
+ },
2236
+ errors: {
2237
+ 400: `Bad Request`,
2238
+ 401: `Unauthorized`,
2239
+ 500: `Internal Server Error`
2240
+ }
2241
+ });
2242
+ }
2243
+ /**
2244
+ * Create File Channel
2245
+ *
2246
+ * Creates a file channel. Provide companyId for a company channel, clientId
2247
+ * for an individual channel, or membershipType=group with memberIds. The
2248
+ * legacy membershipEntityId/membershipType pair is still accepted.
2249
+ *
2250
+ * @example
2251
+ * await assembly.createFileChannel({ requestBody: ... });
2252
+ */
2253
+ static createFileChannel({ requestBody }) {
2254
+ return request(OpenAPI, {
2255
+ method: "POST",
2256
+ url: "/v1/channels/files",
2257
+ body: requestBody,
2258
+ mediaType: "application/json",
2259
+ errors: {
2260
+ 400: `Bad Request`,
2261
+ 401: `Unauthorized`,
2262
+ 500: `Internal Server Error`
2263
+ }
2264
+ });
2265
+ }
2266
+ /**
2267
+ * Get File Channel by id
2268
+ *
2269
+ * Retrieves a single file channel by its id. The requesting user must be a
2270
+ * member of the channel.
2271
+ *
2272
+ * @param id File channel id
2273
+ *
2274
+ * @example
2275
+ * await assembly.retrieveFileChannel({ id: ... });
2276
+ */
2277
+ static retrieveFileChannel({ id }) {
2278
+ return request(OpenAPI, {
2279
+ method: "GET",
2280
+ url: "/v1/channels/files/{id}",
2281
+ path: {
2282
+ "id": id
2283
+ },
2284
+ errors: {
2285
+ 400: `Bad Request`,
2286
+ 401: `Unauthorized`,
2287
+ 500: `Internal Server Error`
2288
+ }
2289
+ });
2290
+ }
2291
+ };
2292
+
2293
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/FilesService.js
2294
+ var FilesService = class {
2295
+ /**
2296
+ * List files within a file channel
2297
+ *
2298
+ * Lists files, folders, and links within a file channel. `channelId` is
2299
+ * required; pass `path` to scope the listing to a folder within the
2300
+ * channel.
2301
+ *
2302
+ * @param channelId File channel id to list files from
2303
+ * @param path Folder path within the channel to scope the listing
2304
+ * @param limit Maximum number of items to return
2305
+ * @param nextToken Pagination token for the next page of results
2306
+ *
2307
+ * @example
2308
+ * await assembly.listFiles({ channelId: ... });
2309
+ */
2310
+ static listFiles({ channelId, path, limit, nextToken }) {
2311
+ return request(OpenAPI, {
2312
+ method: "GET",
2313
+ url: "/v1/files",
2314
+ query: {
2315
+ "channelId": channelId,
2316
+ "path": path,
2317
+ "limit": limit,
2318
+ "nextToken": nextToken
2319
+ },
2320
+ errors: {
2321
+ 400: `Invalid pagination params or missing channelId`,
2322
+ 401: `Missing or invalid API key`,
2323
+ 500: `Unexpected server error`
2324
+ }
2325
+ });
2326
+ }
2327
+ /**
2328
+ * Update Root Folder Permissions
2329
+ *
2330
+ * Updates the client access level on a file channel's root folder. Requires
2331
+ * internal-user privileges. On the Internal API the change cascades to all
2332
+ * folders in the channel; on the Platform API only the root folder is
2333
+ * updated.
2334
+ *
2335
+ * @example
2336
+ * await assembly.updateRootFolderPermissions({ requestBody: ... });
2337
+ */
2338
+ static updateRootFolderPermissions({ requestBody }) {
2339
+ return request(OpenAPI, {
2340
+ method: "PUT",
2341
+ url: "/v1/files/root/permissions",
2342
+ body: requestBody,
2343
+ mediaType: "application/json",
2344
+ errors: {
2345
+ 400: `Invalid request body, missing channelId, or clientPermissions is missing or not one of read_only/read_write`,
2346
+ 403: `Caller lacks internal-user privileges or access to the channel's company`,
2347
+ 404: `File channel not found`,
2348
+ 500: `Unexpected server error`
2349
+ }
2350
+ });
2351
+ }
2352
+ /**
2353
+ * Create a File
2354
+ *
2355
+ * Creates a file, folder, or link record within a file channel. `channelID`
2356
+ * is required; `path` is required for folders and `linkUrl` for links.
2357
+ * Files default to "append" behavior (keep both, adding a numbered suffix)
2358
+ * when a file with the same name already exists at the path.
2359
+ *
2360
+ * @param fileType The type of file object to be created. This can be 'file', 'folder', or 'link'.
2361
+ *
2362
+ * @example
2363
+ * await assembly.createFile({ fileType: ..., requestBody: ... });
2364
+ */
2365
+ static createFile({ fileType, requestBody }) {
2366
+ return request(OpenAPI, {
2367
+ method: "POST",
2368
+ url: "/v1/files/{fileType}",
2369
+ path: {
2370
+ "fileType": fileType
2371
+ },
2372
+ body: requestBody,
2373
+ mediaType: "application/json",
2374
+ errors: {
2375
+ 400: `Invalid request body or field values`,
2376
+ 401: `Missing or invalid API key`,
2377
+ 500: `Unexpected server error`
2378
+ }
2379
+ });
2380
+ }
2381
+ /**
2382
+ * Delete a File
2383
+ *
2384
+ * Deletes a file, folder, or link by its id and returns the deleted item
2385
+ * reference.
2386
+ *
2387
+ * @param id File id
2388
+ *
2389
+ * @example
2390
+ * await assembly.deleteFile({ id: ... });
2391
+ */
2392
+ static deleteFile({ id }) {
2393
+ return request(OpenAPI, {
2394
+ method: "DELETE",
2395
+ url: "/v1/files/{id}",
2396
+ path: {
2397
+ "id": id
2398
+ },
2399
+ errors: {
2400
+ 400: `Missing file id`,
2401
+ 401: `Missing or invalid API key`,
2402
+ 403: `Not authorized to delete this file`,
2403
+ 404: `File not found`,
2404
+ 500: `Unexpected server error`
2405
+ }
2406
+ });
2407
+ }
2408
+ /**
2409
+ * Get a File's metadata
2410
+ *
2411
+ * Returns the metadata for a single file, folder, or link by its id.
2412
+ *
2413
+ * @param id File id
2414
+ *
2415
+ * @example
2416
+ * await assembly.retrieveFile({ id: ... });
2417
+ */
2418
+ static retrieveFile({ id }) {
2419
+ return request(OpenAPI, {
2420
+ method: "GET",
2421
+ url: "/v1/files/{id}",
2422
+ path: {
2423
+ "id": id
2424
+ },
2425
+ errors: {
2426
+ 400: `Missing file id`,
2427
+ 401: `Missing or invalid API key`,
2428
+ 404: `File not found`,
2429
+ 500: `Unexpected server error`
2430
+ }
2431
+ });
2432
+ }
2433
+ /**
2434
+ * Get a File's contents
2435
+ *
2436
+ * Streams the raw contents of a file as an octet-stream.
2437
+ *
2438
+ * @param id File id
2439
+ *
2440
+ * @example
2441
+ * await assembly.downloadAFile({ id: ... });
2442
+ */
2443
+ static downloadAFile({ id }) {
2444
+ return request(OpenAPI, {
2445
+ method: "GET",
2446
+ url: "/v1/files/{id}/download",
2447
+ path: {
2448
+ "id": id
2449
+ },
2450
+ errors: {
2451
+ 400: `Missing file id, record is not a downloadable file, or file is too large`,
2452
+ 401: `Missing or invalid API key`,
2453
+ 404: `File not found`,
2454
+ 500: `Unexpected server error`
2455
+ }
2456
+ });
2457
+ }
2458
+ /**
2459
+ * Get a File's download url
2460
+ *
2461
+ * Returns a short-lived presigned download URL for a file's contents.
2462
+ *
2463
+ * @param id File id
2464
+ *
2465
+ * @example
2466
+ * await assembly.retrieveDownloadUrlOfAFile({ id: ... });
2467
+ */
2468
+ static retrieveDownloadUrlOfAFile({ id }) {
2469
+ return request(OpenAPI, {
2470
+ method: "GET",
2471
+ url: "/v1/files/{id}/download-url",
2472
+ path: {
2473
+ "id": id
2474
+ },
2475
+ errors: {
2476
+ 400: `Missing file id or record is not a downloadable file`,
2477
+ 401: `Missing or invalid API key`,
2478
+ 404: `File not found`,
2479
+ 500: `Unexpected server error`
2480
+ }
2481
+ });
2482
+ }
2483
+ /**
2484
+ * Update Folder Permissions
2485
+ *
2486
+ * Updates the client access level on a folder. Requires internal-user
2487
+ * privileges. On the Internal API the change cascades to all descendant
2488
+ * folders; on the Platform API only the target folder is updated.
2489
+ *
2490
+ * @param id ID of the folder to update
2491
+ *
2492
+ * @example
2493
+ * await assembly.putV1FilesIdPermissions({ id: ..., requestBody: ... });
2494
+ */
2495
+ static putV1FilesIdPermissions({ id, requestBody }) {
2496
+ return request(OpenAPI, {
2497
+ method: "PUT",
2498
+ url: "/v1/files/{id}/permissions/",
2499
+ path: {
2500
+ "id": id
2501
+ },
2502
+ body: requestBody,
2503
+ mediaType: "application/json",
2504
+ errors: {
2505
+ 400: `Invalid request body, missing clientPermissions, or target is not a folder`,
2506
+ 403: `Caller lacks internal-user privileges or access to the folder's company`,
2507
+ 404: `Folder not found`,
2508
+ 500: `Unexpected server error`
2509
+ }
2510
+ });
2511
+ }
2512
+ };
2513
+
2514
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/FormResponsesService.js
2515
+ var FormResponsesService = class {
2516
+ /**
2517
+ * Assign a form to clients
2518
+ *
2519
+ * Assigns a form to one or more clients, creating a pending form response
2520
+ * for each recipient. Provide either clientIds or clientCompanyIds.
2521
+ *
2522
+ * @example
2523
+ * await assembly.requestFormResponse({ requestBody: ... });
2524
+ */
2525
+ static requestFormResponse({ requestBody }) {
2526
+ return request(OpenAPI, {
2527
+ method: "POST",
2528
+ url: "/v1/form-responses",
2529
+ body: requestBody,
2530
+ mediaType: "application/json",
2531
+ errors: {
2532
+ 400: `Invalid request body or recipient information`,
2533
+ 401: `Missing or invalid API key`,
2534
+ 404: `Form not found or could not be assigned`,
2535
+ 500: `Unexpected server error`
2536
+ }
2537
+ });
2538
+ }
2539
+ };
2540
+
2541
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/FormsService.js
2542
+ var FormsService = class {
2543
+ /**
2544
+ * List forms
2545
+ *
2546
+ * Lists the forms within the portal, paginated.
2547
+ *
2548
+ * @param limit Maximum number of forms to return
2549
+ * @param nextToken Pagination cursor returned by a previous call
2550
+ *
2551
+ * @example
2552
+ * await assembly.listForms();
2553
+ */
2554
+ static listForms({ limit, nextToken }) {
2555
+ return request(OpenAPI, {
2556
+ method: "GET",
2557
+ url: "/v1/forms",
2558
+ query: {
2559
+ "limit": limit,
2560
+ "nextToken": nextToken
2561
+ },
2562
+ errors: {
2563
+ 400: `Invalid query parameters`,
2564
+ 401: `Missing or invalid API key`,
2565
+ 500: `Unexpected server error`
2566
+ }
2567
+ });
2568
+ }
2569
+ /**
2570
+ * Create a form
2571
+ *
2572
+ * Creates a form with its questions. Note: Assembly forms do not support
2573
+ * conditional/branching logic — questions are presented as a flat, ordered
2574
+ * sequence.
2575
+ *
2576
+ * @example
2577
+ * await assembly.createForm({ requestBody: ... });
2578
+ */
2579
+ static createForm({ requestBody }) {
2580
+ return request(OpenAPI, {
2581
+ method: "POST",
2582
+ url: "/v1/forms",
2583
+ body: requestBody,
2584
+ mediaType: "application/json",
2585
+ errors: {
2586
+ 400: `Invalid request body or field values`,
2587
+ 401: `Missing or invalid API key`,
2588
+ 500: `Unexpected server error`
2589
+ }
2590
+ });
2591
+ }
2592
+ /**
2593
+ * Retrieve a form
2594
+ *
2595
+ * Returns a single form, including its questions and response counts, by
2596
+ * ID.
2597
+ *
2598
+ * @param id Form ID
2599
+ *
2600
+ * @example
2601
+ * await assembly.retrieveForm({ id: ... });
2602
+ */
2603
+ static retrieveForm({ id }) {
2604
+ return request(OpenAPI, {
2605
+ method: "GET",
2606
+ url: "/v1/forms/{id}",
2607
+ path: {
2608
+ "id": id
2609
+ },
2610
+ errors: {
2611
+ 401: `Missing or invalid API key`,
2612
+ 404: `Form not found`
2613
+ }
2614
+ });
2615
+ }
2616
+ /**
2617
+ * List a form's submissions
2618
+ *
2619
+ * Lists the submissions (form responses) for a form, paginated. Optionally
2620
+ * filter by completion status.
2621
+ *
2622
+ * @param id Form ID
2623
+ * @param status Filter form responses by completion status
2624
+ * @param limit Maximum number of form responses to return
2625
+ * @param nextToken Pagination cursor returned by a previous call
2626
+ *
2627
+ * @example
2628
+ * await assembly.listFormResponses({ id: ... });
2629
+ */
2630
+ static listFormResponses({ id, status, limit, nextToken }) {
2631
+ return request(OpenAPI, {
2632
+ method: "GET",
2633
+ url: "/v1/forms/{id}/form-responses",
2634
+ path: {
2635
+ "id": id
2636
+ },
2637
+ query: {
2638
+ "status": status,
2639
+ "limit": limit,
2640
+ "nextToken": nextToken
2641
+ },
2642
+ errors: {
2643
+ 400: `Invalid query parameters`,
2644
+ 401: `Missing or invalid API key`,
2645
+ 500: `Unexpected server error`
2646
+ }
2647
+ });
2648
+ }
2649
+ };
2650
+
2651
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/InstallsService.js
2652
+ var InstallsService = class {
2653
+ /**
2654
+ * List app installs
2655
+ *
2656
+ * Returns every app install visible to the caller in the workspace,
2657
+ * including core modules, marketplace apps, custom apps, embeds, and links.
2658
+ * The set is scoped by the caller's permissions: clients only receive
2659
+ * installs whose visibility rules include them.
2660
+ *
2661
+ * @param previewAsClient When true, an internal caller previews the install list as a client would see it.
2662
+ *
2663
+ * @example
2664
+ * await assembly.listAppInstalls();
2665
+ */
2666
+ static listAppInstalls({ previewAsClient }) {
2667
+ return request(OpenAPI, {
2668
+ method: "GET",
2669
+ url: "/v1/installs",
2670
+ query: {
2671
+ "previewAsClient": previewAsClient
2672
+ },
2673
+ errors: {
2674
+ 401: `Missing or invalid API key`,
2675
+ 404: `Workspace app installs could not be found`,
2676
+ 500: `Unexpected server error`
2677
+ }
2678
+ });
2679
+ }
2680
+ /**
2681
+ * Get an app install
2682
+ *
2683
+ * Returns a single app install by its ID. Core modules may be addressed by
2684
+ * their deterministic UUID; marketplace, custom, embed, and link installs
2685
+ * are addressed by their install ID.
2686
+ *
2687
+ * @param installId Unique identifier of the app install
2688
+ *
2689
+ * @example
2690
+ * await assembly.retrieveAppInstall({ installId: ... });
2691
+ */
2692
+ static retrieveAppInstall({ installId }) {
2693
+ return request(OpenAPI, {
2694
+ method: "GET",
2695
+ url: "/v1/installs/{installId}",
2696
+ path: {
2697
+ "installId": installId
2698
+ },
2699
+ errors: {
2700
+ 401: `Missing or invalid API key`,
2701
+ 404: `App install not found`,
2702
+ 500: `Unexpected server error`
2703
+ }
2704
+ });
2705
+ }
2706
+ /**
2707
+ * List app install connections
2708
+ *
2709
+ * Returns the app connections (per-client, per-group, or per-company embeds
2710
+ * and links) attached to a manual app install. Optionally filter the result
2711
+ * by company or client. The install must be a manual-type app; core and
2712
+ * marketplace installs do not support connections.
2713
+ *
2714
+ * @param installId Unique identifier of the manual app install
2715
+ * @param companyId Filter connections to a single company
2716
+ * @param clientId Filter connections to a single client
2717
+ *
2718
+ * @example
2719
+ * await assembly.listAppConnections({ installId: ... });
2720
+ */
2721
+ static listAppConnections({ installId, companyId, clientId }) {
2722
+ return request(OpenAPI, {
2723
+ method: "GET",
2724
+ url: "/v1/installs/{installId}/connections",
2725
+ path: {
2726
+ "installId": installId
2727
+ },
2728
+ query: {
2729
+ "companyId": companyId,
2730
+ "clientId": clientId
2731
+ },
2732
+ errors: {
2733
+ 400: `App install is not a manual app or its connections could not be loaded`,
2734
+ 401: `Missing or invalid API key, or caller is not permitted to list connections`,
2735
+ 404: `App install not found`,
2736
+ 500: `Unexpected server error`
2737
+ }
2738
+ });
2739
+ }
2740
+ /**
2741
+ * Create an app install connection
2742
+ *
2743
+ * Creates an embed or link connection on a manual app install, scoped to a
2744
+ * set of clients or a company. All targeted clients must belong to the same
2745
+ * company. Requires internal-user privileges.
2746
+ *
2747
+ * @param installId Unique identifier of the manual app install
2748
+ *
2749
+ * @example
2750
+ * await assembly.createAppConnection({ installId: ..., requestBody: ... });
2751
+ */
2752
+ static createAppConnection({ installId, requestBody }) {
2753
+ return request(OpenAPI, {
2754
+ method: "POST",
2755
+ url: "/v1/installs/{installId}/connections",
2756
+ path: {
2757
+ "installId": installId
2758
+ },
2759
+ body: requestBody,
2760
+ mediaType: "application/json",
2761
+ errors: {
2762
+ 400: `Invalid request body, install type, link, company, or client set`,
2763
+ 401: `Missing or invalid API key`,
2764
+ 404: `App install not found`,
2765
+ 409: `A matching connection already exists or could not be created`,
2766
+ 500: `Unexpected server error`
2767
+ }
2768
+ });
2769
+ }
2770
+ /**
2771
+ * Get an app install's notification settings
2772
+ *
2773
+ * Returns the notification settings an app declares for the given install.
2774
+ * Each setting's `id` is the value to pass as `notificationSettingId` when
2775
+ * creating a notification via POST /v1/notifications. Installs whose
2776
+ * backing app declares no notification settings return an empty
2777
+ * `notifications` array.
2778
+ *
2779
+ * @param installId Unique identifier of the app install
2780
+ *
2781
+ * @example
2782
+ * await assembly.retrieveInstallNotificationSettings({ installId: ... });
2783
+ */
2784
+ static retrieveInstallNotificationSettings({ installId }) {
2785
+ return request(OpenAPI, {
2786
+ method: "GET",
2787
+ url: "/v1/installs/{installId}/notification-settings",
2788
+ path: {
2789
+ "installId": installId
2790
+ },
2791
+ errors: {
2792
+ 401: `Missing or invalid API key`,
2793
+ 404: `App install not found`,
2794
+ 500: `Unexpected server error`
2795
+ }
2796
+ });
2797
+ }
2798
+ /**
2799
+ * Update an app install's notification settings
2800
+ *
2801
+ * Applies partial changes to the notification settings of the install's
2802
+ * backing app. Entries in `notifications` are per-setting deltas: an entry
2803
+ * without an `id` adds a new setting (label and surfaces required; the id
2804
+ * is generated), an entry with only an `id` deletes that setting, and an
2805
+ * entry with an `id` plus fields updates the provided fields of that
2806
+ * setting. Settings not referenced are left unchanged; an id that matches
2807
+ * no setting fails with 400. `actionLabel`, when present, replaces the
2808
+ * app's action label — send an empty object to clear it. Fails with 404
2809
+ * until the app's settings are created via POST or the App Setup page.
2810
+ * Requests authenticated with an app API key may only manage the calling
2811
+ * app's own installs — for a published marketplace app this changes the
2812
+ * app's settings in every workspace it is installed in. Requests
2813
+ * authenticated with a regular API key require workspace admin privileges.
2814
+ *
2815
+ * @param installId Unique identifier of the app install
2816
+ *
2817
+ * @example
2818
+ * await assembly.updateInstallNotificationSettings({ installId: ..., requestBody: ... });
2819
+ */
2820
+ static updateInstallNotificationSettings({ installId, requestBody }) {
2821
+ return request(OpenAPI, {
2822
+ method: "PATCH",
2823
+ url: "/v1/installs/{installId}/notification-settings",
2824
+ path: {
2825
+ "installId": installId
2826
+ },
2827
+ body: requestBody,
2828
+ mediaType: "application/json",
2829
+ errors: {
2830
+ 400: `Invalid body, unknown or duplicate setting ids, or the install has no backing app`,
2831
+ 401: `Missing or invalid API key, app key targeting another app's install, or caller lacks admin privileges`,
2832
+ 404: `App install not found, or the app has no notification settings yet`,
2833
+ 500: `Unexpected server error`
2834
+ }
2835
+ });
2836
+ }
2837
+ /**
2838
+ * Create an app install's notification settings
2839
+ *
2840
+ * Declares the initial notification settings of the install's backing app.
2841
+ * This endpoint is create-only: when the app already has notification
2842
+ * settings (created here or authored on the App Setup page) it fails with
2843
+ * 409 and the settings must be changed via PATCH. Setting ids are stable
2844
+ * identifiers referenced by `notificationSettingId` on POST
2845
+ * /v1/notifications and by internal users' saved preferences; omit a
2846
+ * setting's id to have one generated. Requests authenticated with an app
2847
+ * API key may only manage the calling app's own installs — for a published
2848
+ * marketplace app this changes the app's settings in every workspace it is
2849
+ * installed in. Requests authenticated with a regular API key require
2850
+ * workspace admin privileges.
2851
+ *
2852
+ * @param installId Unique identifier of the app install
2853
+ *
2854
+ * @example
2855
+ * await assembly.createInstallNotificationSettings({ installId: ..., requestBody: ... });
2856
+ */
2857
+ static createInstallNotificationSettings({ installId, requestBody }) {
2858
+ return request(OpenAPI, {
2859
+ method: "POST",
2860
+ url: "/v1/installs/{installId}/notification-settings",
2861
+ path: {
2862
+ "installId": installId
2863
+ },
2864
+ body: requestBody,
2865
+ mediaType: "application/json",
2866
+ errors: {
2867
+ 400: `Invalid body, duplicate setting ids, or the install has no backing app`,
2868
+ 401: `Missing or invalid API key, app key targeting another app's install, or caller lacks admin privileges`,
2869
+ 404: `App install not found`,
2870
+ 409: `The app already has notification settings`,
2871
+ 500: `Unexpected server error`
2872
+ }
2873
+ });
2874
+ }
2875
+ };
2876
+
2877
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/InternalUsersService.js
2878
+ var InternalUsersService = class {
2879
+ /**
2880
+ * List internal users
2881
+ *
2882
+ * Lists the internal users (portal team members) within the portal,
2883
+ * paginated.
2884
+ *
2885
+ * @param limit Maximum number of internal users to return
2886
+ * @param nextToken Pagination cursor returned by a previous call
2887
+ *
2888
+ * @example
2889
+ * await assembly.listInternalUsers();
2890
+ */
2891
+ static listInternalUsers({ limit, nextToken }) {
2892
+ return request(OpenAPI, {
2893
+ method: "GET",
2894
+ url: "/v1/internal-users",
2895
+ query: {
2896
+ "limit": limit,
2897
+ "nextToken": nextToken
2898
+ },
2899
+ errors: {
2900
+ 400: `Invalid pagination parameters`,
2901
+ 401: `Missing or invalid API key`,
2902
+ 500: `Unexpected server error`
2903
+ }
2904
+ });
2905
+ }
2906
+ /**
2907
+ * Get an internal user
2908
+ *
2909
+ * Retrieves a single internal user (portal team member) by ID.
2910
+ *
2911
+ * @param id ID of the internal user to retrieve
2912
+ *
2913
+ * @example
2914
+ * await assembly.retrieveInternalUser({ id: ... });
2915
+ */
2916
+ static retrieveInternalUser({ id }) {
2917
+ return request(OpenAPI, {
2918
+ method: "GET",
2919
+ url: "/v1/internal-users/{id}",
2920
+ path: {
2921
+ "id": id
2922
+ },
2923
+ errors: {
2924
+ 401: `Missing or invalid API key`,
2925
+ 404: `No internal user found with the given ID`,
2926
+ 500: `Unexpected server error`
2927
+ }
2928
+ });
2929
+ }
2930
+ /**
2931
+ * Update an internal user
2932
+ *
2933
+ * Updates an internal user's client-access scope. Only the
2934
+ * isClientAccessLimited and companyAccessList fields are accepted; all
2935
+ * other fields are server-managed.
2936
+ *
2937
+ * @param id ID of the internal user to update
2938
+ *
2939
+ * @example
2940
+ * await assembly.updateInternalUser({ id: ..., requestBody: ... });
2941
+ */
2942
+ static updateInternalUser({ id, requestBody }) {
2943
+ return request(OpenAPI, {
2944
+ method: "PATCH",
2945
+ url: "/v1/internal-users/{id}",
2946
+ path: {
2947
+ "id": id
2948
+ },
2949
+ body: requestBody,
2950
+ mediaType: "application/json",
2951
+ errors: {
2952
+ 400: `Malformed request body`,
2953
+ 401: `Missing or invalid API key`,
2954
+ 403: `Caller lacks permission to update internal users`,
2955
+ 404: `Internal user or a referenced company was not found`,
2956
+ 500: `Unexpected server error`
2957
+ }
2958
+ });
2959
+ }
2960
+ /**
2961
+ * Get an internal user's notification settings
2962
+ *
2963
+ * Retrieves an internal user's notification preferences: the global
2964
+ * in-product toggle, the global email delivery mode, and per-category
2965
+ * opt-outs under notifyAbout. Settings declared by the workspace's
2966
+ * installed apps appear under dynamic
2967
+ * customApp:<appId>:<notificationSettingId> keys, using the app's declared
2968
+ * defaults until the user customizes them. Users who have never changed
2969
+ * their settings return the default preferences.
2970
+ *
2971
+ * @param id ID of the internal user
2972
+ *
2973
+ * @example
2974
+ * await assembly.retrieveInternalUserNotificationSettings({ id: ... });
2975
+ */
2976
+ static retrieveInternalUserNotificationSettings({ id }) {
2977
+ return request(OpenAPI, {
2978
+ method: "GET",
2979
+ url: "/v1/internal-users/{id}/notification-settings",
2980
+ path: {
2981
+ "id": id
2982
+ },
2983
+ errors: {
2984
+ 401: `Missing or invalid API key`,
2985
+ 404: `No internal user found with the given ID`,
2986
+ 500: `Unexpected server error`
2987
+ }
2988
+ });
2989
+ }
2990
+ };
2991
+
2992
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/InvoicesService.js
2993
+ var InvoicesService = class {
2994
+ /**
2995
+ * List invoices
2996
+ *
2997
+ * Returns a paginated list of invoices for the portal. Supports filtering
2998
+ * by client, company, and subscription.
2999
+ *
3000
+ * @param clientId Filter by client ID
3001
+ * @param companyId Filter by company ID. Required with clientId when includeCompanyInvoices is true (returns that client's invoices plus the company's).
3002
+ * @param includeCompanyInvoices When true with clientId, also include invoices billed to companyId. companyId is required in that case.
3003
+ * @param subscriptionId Filter by subscription ID
3004
+ * @param limit Maximum number of records to return
3005
+ * @param nextToken Pagination cursor returned by a previous request
3006
+ *
3007
+ * @example
3008
+ * await assembly.listInvoices();
3009
+ */
3010
+ static listInvoices({ clientId, companyId, includeCompanyInvoices, subscriptionId, limit, nextToken }) {
3011
+ return request(OpenAPI, {
3012
+ method: "GET",
3013
+ url: "/v1/invoices",
3014
+ query: {
3015
+ "clientId": clientId,
3016
+ "companyId": companyId,
3017
+ "includeCompanyInvoices": includeCompanyInvoices,
3018
+ "subscriptionId": subscriptionId,
3019
+ "limit": limit,
3020
+ "nextToken": nextToken
3021
+ },
3022
+ errors: {
3023
+ 400: `Invalid query or pagination parameters`,
3024
+ 401: `Missing or invalid API key`,
3025
+ 500: `Unexpected server error`
3026
+ }
3027
+ });
3028
+ }
3029
+ /**
3030
+ * Create an invoice
3031
+ *
3032
+ * Creates an invoice for a client or company. Requires a recipient
3033
+ * (clientId or companyId) and at least one line item. The collection method
3034
+ * determines how the invoice is collected.
3035
+ *
3036
+ * @example
3037
+ * await assembly.createInvoice({ requestBody: ... });
3038
+ */
3039
+ static createInvoice({ requestBody }) {
3040
+ return request(OpenAPI, {
3041
+ method: "POST",
3042
+ url: "/v1/invoices",
3043
+ body: requestBody,
3044
+ mediaType: "application/json",
3045
+ errors: {
3046
+ 400: `Invalid request body or invoice field values`,
3047
+ 401: `Missing or invalid API key`,
3048
+ 404: `Referenced subscription or connected account not found`,
3049
+ 500: `Unexpected server error`
3050
+ }
3051
+ });
3052
+ }
3053
+ /**
3054
+ * Retrieve an invoice
3055
+ *
3056
+ * Returns a single invoice by ID.
3057
+ *
3058
+ * @param id Invoice ID
3059
+ *
3060
+ * @example
3061
+ * await assembly.retrieveInvoice({ id: ... });
3062
+ */
3063
+ static retrieveInvoice({ id }) {
3064
+ return request(OpenAPI, {
3065
+ method: "GET",
3066
+ url: "/v1/invoices/{id}",
3067
+ path: {
3068
+ "id": id
3069
+ },
3070
+ errors: {
3071
+ 401: `Missing or invalid API key`,
3072
+ 404: `Invoice not found`,
3073
+ 500: `Unexpected server error`
3074
+ }
3075
+ });
3076
+ }
3077
+ };
3078
+
3079
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/InvoiceTemplatesService.js
3080
+ var InvoiceTemplatesService = class {
3081
+ /**
3082
+ * List invoice templates
3083
+ *
3084
+ * Returns a paginated list of the invoice templates configured for the
3085
+ * portal.
3086
+ *
3087
+ * @param limit Maximum number of records to return.
3088
+ * @param nextToken Pagination cursor returned by a previous request.
3089
+ *
3090
+ * @example
3091
+ * await assembly.listInvoiceTemplates();
3092
+ */
3093
+ static listInvoiceTemplates({ limit, nextToken }) {
3094
+ return request(OpenAPI, {
3095
+ method: "GET",
3096
+ url: "/v1/invoice-templates",
3097
+ query: {
3098
+ "limit": limit,
3099
+ "nextToken": nextToken
3100
+ },
3101
+ errors: {
3102
+ 400: `Invalid pagination parameters`,
3103
+ 401: `Missing or invalid API key`,
3104
+ 500: `Unexpected server error`
3105
+ }
3106
+ });
3107
+ }
3108
+ };
3109
+
3110
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/MeService.js
3111
+ var MeService = class {
3112
+ /**
3113
+ * Retrieve the current user
3114
+ *
3115
+ * Returns the user that owns the API key making the request.
3116
+ *
3117
+ * @example
3118
+ * await assembly.retrieveMe();
3119
+ */
3120
+ static retrieveMe() {
3121
+ return request(OpenAPI, {
3122
+ method: "GET",
3123
+ url: "/v1/me",
3124
+ errors: {
3125
+ 401: `Missing or invalid API key`,
3126
+ 403: `The API key doesn't have permissions to perform the request`,
3127
+ 404: `User not found`,
3128
+ 500: `Unexpected server error`
3129
+ }
3130
+ });
3131
+ }
3132
+ };
3133
+
3134
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/MessageChannelsService.js
3135
+ var MessageChannelsService = class {
3136
+ /**
3137
+ * Get a list of Message Channels
3138
+ *
3139
+ * Returns a paginated list of message channels the requester is a member
3140
+ * of, optionally filtered by membership and enriched with unread state.
3141
+ *
3142
+ * @param clientId Filter by client id. Alias for membershipEntityId.
3143
+ * @param membershipEntityId Filter by the entity (company or client) the channel is scoped to.
3144
+ * @param companyId Filter to channels scoped to this company. Combine with clientId to fetch the individual channel for a specific client/company pair.
3145
+ * @param memberId Filter to channels containing this member id, and use it as the viewer for includeUnread enrichment.
3146
+ * @param membershipType Filter by channel membership type.
3147
+ * @param includeUnread Enrich each channel with unreadCount and lastRead for the viewer.
3148
+ * @param limit Maximum number of records to return. Capped at 100.
3149
+ * @param nextToken Pagination cursor returned by a previous request.
3150
+ *
3151
+ * @example
3152
+ * await assembly.listMessageChannels();
3153
+ */
3154
+ static listMessageChannels({ clientId, membershipEntityId, companyId, memberId, membershipType, includeUnread = false, limit, nextToken }) {
3155
+ return request(OpenAPI, {
3156
+ method: "GET",
3157
+ url: "/v1/message-channels",
3158
+ query: {
3159
+ "clientId": clientId,
3160
+ "membershipEntityId": membershipEntityId,
3161
+ "companyId": companyId,
3162
+ "memberId": memberId,
3163
+ "membershipType": membershipType,
3164
+ "includeUnread": includeUnread,
3165
+ "limit": limit,
3166
+ "nextToken": nextToken
3167
+ },
3168
+ errors: {
3169
+ 400: `Invalid pagination parameters, membership type, includeUnread value, or limit exceeded`,
3170
+ 401: `Missing or invalid API key`,
3171
+ 500: `Unexpected server error`
3172
+ }
3173
+ });
3174
+ }
3175
+ /**
3176
+ * Create Message Channel
3177
+ *
3178
+ * Creates a message channel. Required fields depend on membershipType:
3179
+ * company channels need membershipEntityId or companyId; individual
3180
+ * channels need membershipEntityId or clientId; group channels need
3181
+ * memberIds.
3182
+ *
3183
+ * @example
3184
+ * await assembly.createMessageChannel({ requestBody: ... });
3185
+ */
3186
+ static createMessageChannel({ requestBody }) {
3187
+ return request(OpenAPI, {
3188
+ method: "POST",
3189
+ url: "/v1/message-channels",
3190
+ body: requestBody,
3191
+ mediaType: "application/json",
3192
+ errors: {
3193
+ 400: `Invalid request body or membership parameters`,
3194
+ 401: `Missing or invalid API key`,
3195
+ 404: `Referenced company or client user not found`,
3196
+ 500: `Unexpected server error`
3197
+ }
3198
+ });
3199
+ }
3200
+ /**
3201
+ * Get unread message channels for a user
3202
+ *
3203
+ * Returns the messaging channels where the specified user has unread
3204
+ * messages, plus an aggregate total. When userId is omitted, the
3205
+ * requester's own user is used.
3206
+ *
3207
+ * @param userId Internal user or client id whose unread channels to summarize. Defaults to the requester's user id.
3208
+ *
3209
+ * @example
3210
+ * await assembly.listUnreadMessageChannels();
3211
+ */
3212
+ static listUnreadMessageChannels({ userId }) {
3213
+ return request(OpenAPI, {
3214
+ method: "GET",
3215
+ url: "/v1/message-channels/unread",
3216
+ query: {
3217
+ "userId": userId
3218
+ },
3219
+ errors: {
3220
+ 401: `Missing or invalid API key`,
3221
+ 404: `User not found`,
3222
+ 500: `Unexpected server error`
3223
+ }
3224
+ });
3225
+ }
3226
+ /**
3227
+ * Get Message Channel by id
3228
+ *
3229
+ * Returns a single message channel by id. The requester must be a member of
3230
+ * the channel.
3231
+ *
3232
+ * @param id ID of the message channel to retrieve
3233
+ *
3234
+ * @example
3235
+ * await assembly.retrieveMessageChannel({ id: ... });
3236
+ */
3237
+ static retrieveMessageChannel({ id }) {
3238
+ return request(OpenAPI, {
3239
+ method: "GET",
3240
+ url: "/v1/message-channels/{id}",
3241
+ path: {
3242
+ "id": id
3243
+ },
3244
+ errors: {
3245
+ 400: `Missing channel id`,
3246
+ 401: `Missing or invalid API key`,
3247
+ 404: `Channel not found or requester is not a member`,
3248
+ 500: `Unexpected server error`
3249
+ }
3250
+ });
3251
+ }
3252
+ };
3253
+
3254
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/MessagesService.js
3255
+ var MessagesService = class {
3256
+ /**
3257
+ * List messages
3258
+ *
3259
+ * Returns a paginated list of messages in a channel, most recent first. The
3260
+ * channelId query parameter is required and must be a bare UUID (do not
3261
+ * include the GetStream 'messaging:' prefix). A maximum of 100 messages are
3262
+ * returned per page.
3263
+ *
3264
+ * @param channelId Channel ID to list messages for (UUID format only, do not include the 'messaging:' prefix)
3265
+ * @param limit Maximum number of messages to return (capped at 100)
3266
+ * @param nextToken Pagination cursor returned by a previous call
3267
+ *
3268
+ * @example
3269
+ * await assembly.listMessages({ channelId: ... });
3270
+ */
3271
+ static listMessages({ channelId, limit, nextToken }) {
3272
+ return request(OpenAPI, {
3273
+ method: "GET",
3274
+ url: "/v1/messages",
3275
+ query: {
3276
+ "channelId": channelId,
3277
+ "limit": limit,
3278
+ "nextToken": nextToken
3279
+ },
3280
+ errors: {
3281
+ 400: `Invalid pagination parameters or channel ID`,
3282
+ 401: `Missing or invalid API key`,
3283
+ 404: `Message channel not found`,
3284
+ 429: `Rate limit exceeded`
3285
+ }
3286
+ });
3287
+ }
3288
+ /**
3289
+ * Send a message
3290
+ *
3291
+ * Sends a message to a channel. Requires channelId and text. channelId must
3292
+ * be a bare UUID (do not include the GetStream 'messaging:' prefix). When
3293
+ * senderId is provided it must be a member of the channel; otherwise the
3294
+ * authenticated user is used as the author.
3295
+ *
3296
+ * @example
3297
+ * await assembly.sendMessage({ requestBody: ... });
3298
+ */
3299
+ static sendMessage({ requestBody }) {
3300
+ return request(OpenAPI, {
3301
+ method: "POST",
3302
+ url: "/v1/messages",
3303
+ body: requestBody,
3304
+ mediaType: "application/json",
3305
+ errors: {
3306
+ 400: `Invalid request body, channel ID, or sender ID`,
3307
+ 401: `Missing or invalid API key`,
3308
+ 500: `Unexpected server error`
3309
+ }
3310
+ });
3311
+ }
3312
+ };
3313
+
3314
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/NotesService.js
3315
+ var NotesService = class {
3316
+ /**
3317
+ * List notes
3318
+ *
3319
+ * Returns a paginated list of notes. Filter by a client or company by
3320
+ * supplying both entityId and entityType; when neither is supplied, all
3321
+ * notes the caller can access are returned. Supplying entityId without
3322
+ * entityType is rejected.
3323
+ *
3324
+ * @param entityId Filter by the ID of the client or company the note is attached to
3325
+ * @param entityType Filter by entity type
3326
+ * @param limit Maximum number of records to return
3327
+ * @param nextToken Pagination cursor returned by a previous request
3328
+ *
3329
+ * @example
3330
+ * await assembly.listNotes();
3331
+ */
3332
+ static listNotes({ entityId, entityType, limit = 20, nextToken }) {
3333
+ return request(OpenAPI, {
3334
+ method: "GET",
3335
+ url: "/v1/notes",
3336
+ query: {
3337
+ "entityId": entityId,
3338
+ "entityType": entityType,
3339
+ "limit": limit,
3340
+ "nextToken": nextToken
3341
+ },
3342
+ errors: {
3343
+ 400: `Invalid limit, missing entity type, or invalid entity type`,
3344
+ 401: `Missing or invalid API key, or caller lacks access to the entity`,
3345
+ 500: `Unexpected server error`
3346
+ }
3347
+ });
3348
+ }
3349
+ /**
3350
+ * Create a note
3351
+ *
3352
+ * Creates an internal note attached to a client or company. Requires title,
3353
+ * entityId, and entityType; content is optional. Only internal users with
3354
+ * sufficient privileges can create notes.
3355
+ *
3356
+ * @example
3357
+ * await assembly.createNote({ requestBody: ... });
3358
+ */
3359
+ static createNote({ requestBody }) {
3360
+ return request(OpenAPI, {
3361
+ method: "POST",
3362
+ url: "/v1/notes",
3363
+ body: requestBody,
3364
+ mediaType: "application/json",
3365
+ errors: {
3366
+ 400: `Invalid request body, content too long, or invalid entity type/ID`,
3367
+ 401: `Missing or invalid API key, or caller lacks access to the entity`,
3368
+ 500: `Unexpected server error`
3369
+ }
3370
+ });
3371
+ }
3372
+ /**
3373
+ * Delete a note
3374
+ *
3375
+ * Permanently deletes a note by ID and returns a deletion confirmation.
3376
+ * Only internal users with access to the note's entity can delete it.
3377
+ *
3378
+ * @param id Note ID
3379
+ *
3380
+ * @example
3381
+ * await assembly.deleteNote({ id: ... });
3382
+ */
3383
+ static deleteNote({ id }) {
3384
+ return request(OpenAPI, {
3385
+ method: "DELETE",
3386
+ url: "/v1/notes/{id}",
3387
+ path: {
3388
+ "id": id
3389
+ },
3390
+ errors: {
3391
+ 401: `Missing or invalid API key, or caller lacks access to the note`,
3392
+ 404: `Note not found`,
3393
+ 500: `Unexpected server error`
3394
+ }
3395
+ });
3396
+ }
3397
+ /**
3398
+ * Retrieve a note
3399
+ *
3400
+ * Returns a single note by ID. Only internal users with access to the
3401
+ * note's entity can retrieve it.
3402
+ *
3403
+ * @param id Note ID
3404
+ *
3405
+ * @example
3406
+ * await assembly.retrieveNote({ id: ... });
3407
+ */
3408
+ static retrieveNote({ id }) {
3409
+ return request(OpenAPI, {
3410
+ method: "GET",
3411
+ url: "/v1/notes/{id}",
3412
+ path: {
3413
+ "id": id
3414
+ },
3415
+ errors: {
3416
+ 400: `Invalid entity type associated with the note`,
3417
+ 401: `Missing or invalid API key, or caller lacks access to the note`,
3418
+ 404: `Note not found`,
3419
+ 500: `Unexpected server error`
3420
+ }
3421
+ });
3422
+ }
3423
+ /**
3424
+ * Update a note
3425
+ *
3426
+ * Updates the title and/or content of an existing note. Only the fields
3427
+ * supplied are changed. Only internal users with access to the note's
3428
+ * entity can update it.
3429
+ *
3430
+ * @param id Note ID
3431
+ *
3432
+ * @example
3433
+ * await assembly.updateNote({ id: ..., requestBody: ... });
3434
+ */
3435
+ static updateNote({ id, requestBody }) {
3436
+ return request(OpenAPI, {
3437
+ method: "PATCH",
3438
+ url: "/v1/notes/{id}",
3439
+ path: {
3440
+ "id": id
3441
+ },
3442
+ body: requestBody,
3443
+ mediaType: "application/json",
3444
+ errors: {
3445
+ 400: `Invalid request body, empty title, or content too long`,
3446
+ 401: `Missing or invalid API key, or caller lacks access to the note`,
3447
+ 404: `Note not found`,
3448
+ 500: `Unexpected server error`
3449
+ }
3450
+ });
3451
+ }
3452
+ };
3453
+
3454
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/NotificationsService.js
3455
+ var NotificationsService = class {
3456
+ /**
3457
+ * List notifications
3458
+ *
3459
+ * Returns a paginated list of notifications for a recipient. When no
3460
+ * recipient filter is supplied, the authenticated user's notifications are
3461
+ * returned. Only unread notifications are returned unless includeRead is
3462
+ * true.
3463
+ *
3464
+ * @param recipientId Filter by recipient user ID. Defaults to the authenticated user when omitted.
3465
+ * @param recipientClientId Filter by recipient client ID.
3466
+ * @param recipientInternalUserId Filter by recipient internal user ID.
3467
+ * @param includeRead Include read notifications in the response.
3468
+ * @param recipientCompanyId Filter by recipient company ID.
3469
+ * @param limit Maximum number of records to return.
3470
+ * @param nextToken Pagination cursor returned by a previous request.
3471
+ *
3472
+ * @example
3473
+ * await assembly.listNotifications();
3474
+ */
3475
+ static listNotifications({ recipientId, recipientClientId, recipientInternalUserId, includeRead = false, recipientCompanyId, limit, nextToken }) {
3476
+ return request(OpenAPI, {
3477
+ method: "GET",
3478
+ url: "/v1/notifications",
3479
+ query: {
3480
+ "recipientId": recipientId,
3481
+ "recipientClientId": recipientClientId,
3482
+ "recipientInternalUserId": recipientInternalUserId,
3483
+ "includeRead": includeRead,
3484
+ "recipientCompanyId": recipientCompanyId,
3485
+ "limit": limit,
3486
+ "nextToken": nextToken
3487
+ },
3488
+ errors: {
3489
+ 400: `Invalid pagination parameters or missing recipient ID`,
3490
+ 401: `Missing or invalid API key`,
3491
+ 500: `Unexpected server error`
3492
+ }
3493
+ });
3494
+ }
3495
+ /**
3496
+ * Create a notification
3497
+ *
3498
+ * Creates a notification for a recipient. Requires senderId, a recipient
3499
+ * (recipientClientId or recipientInternalUserId), and at least one delivery
3500
+ * target. Notifications can only be created from a custom app. When
3501
+ * notificationSettingId is provided and the recipient's notification
3502
+ * settings disable every requested delivery target, no notification is
3503
+ * created and the request returns 202.
3504
+ *
3505
+ * @example
3506
+ * await assembly.createNotification({ requestBody: ... });
3507
+ */
3508
+ static createNotification({ requestBody }) {
3509
+ return request(OpenAPI, {
3510
+ method: "POST",
3511
+ url: "/v1/notifications",
3512
+ body: requestBody,
3513
+ mediaType: "application/json",
3514
+ errors: {
3515
+ 400: `Invalid request body or notification parameters`,
3516
+ 401: `Missing or invalid API key`,
3517
+ 500: `Unexpected server error`
3518
+ }
3519
+ });
3520
+ }
3521
+ /**
3522
+ * Delete a notification
3523
+ *
3524
+ * Deletes a notification by ID.
3525
+ *
3526
+ * @param id Notification ID
3527
+ *
3528
+ * @example
3529
+ * await assembly.deleteNotification({ id: ... });
3530
+ */
3531
+ static deleteNotification({ id }) {
3532
+ return request(OpenAPI, {
3533
+ method: "DELETE",
3534
+ url: "/v1/notifications/{id}",
3535
+ path: {
3536
+ "id": id
3537
+ },
3538
+ errors: {
3539
+ 401: `Missing or invalid API key`,
3540
+ 404: `Notification not found`,
3541
+ 500: `Unexpected server error`
3542
+ }
3543
+ });
3544
+ }
3545
+ /**
3546
+ * Retrieve a notification
3547
+ *
3548
+ * Returns a single notification by ID.
3549
+ *
3550
+ * @param id Notification ID
3551
+ *
3552
+ * @example
3553
+ * await assembly.retrieveNotification({ id: ... });
3554
+ */
3555
+ static retrieveNotification({ id }) {
3556
+ return request(OpenAPI, {
3557
+ method: "GET",
3558
+ url: "/v1/notifications/{id}",
3559
+ path: {
3560
+ "id": id
3561
+ },
3562
+ errors: {
3563
+ 401: `Missing or invalid API key`,
3564
+ 404: `Notification not found`,
3565
+ 500: `Unexpected server error`
3566
+ }
3567
+ });
3568
+ }
3569
+ /**
3570
+ * Mark notification as read
3571
+ *
3572
+ * Marks a notification as read and returns the updated notification.
3573
+ *
3574
+ * @param id Notification ID
3575
+ *
3576
+ * @example
3577
+ * await assembly.markNotificationRead({ id: ... });
3578
+ */
3579
+ static markNotificationRead({ id }) {
3580
+ return request(OpenAPI, {
3581
+ method: "POST",
3582
+ url: "/v1/notifications/{id}/read",
3583
+ path: {
3584
+ "id": id
3585
+ },
3586
+ errors: {
3587
+ 401: `Missing or invalid API key`,
3588
+ 404: `Notification not found`,
3589
+ 500: `Unexpected server error`
3590
+ }
3591
+ });
3592
+ }
3593
+ /**
3594
+ * Mark notification as unread
3595
+ *
3596
+ * Marks a notification as unread and returns the updated notification.
3597
+ *
3598
+ * @param id Notification ID
3599
+ *
3600
+ * @example
3601
+ * await assembly.markNotificationUnread({ id: ... });
3602
+ */
3603
+ static markNotificationUnread({ id }) {
3604
+ return request(OpenAPI, {
3605
+ method: "POST",
3606
+ url: "/v1/notifications/{id}/unread",
3607
+ path: {
3608
+ "id": id
3609
+ },
3610
+ errors: {
3611
+ 401: `Missing or invalid API key`,
3612
+ 404: `Notification not found`,
3613
+ 500: `Unexpected server error`
3614
+ }
3615
+ });
3616
+ }
3617
+ };
3618
+
3619
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/PaymentsService.js
3620
+ var PaymentsService = class {
3621
+ /**
3622
+ * List payments
3623
+ *
3624
+ * Returns a paginated list of payments for the portal. When invoiceId is
3625
+ * supplied, only payments for that invoice are returned. Requires
3626
+ * internal-user privileges.
3627
+ *
3628
+ * @param invoiceId Filter payments by invoice ID
3629
+ * @param limit Maximum number of records to return.
3630
+ * @param nextToken Pagination cursor returned by a previous request.
3631
+ *
3632
+ * @example
3633
+ * await assembly.listPayments();
3634
+ */
3635
+ static listPayments({ invoiceId, limit, nextToken }) {
3636
+ return request(OpenAPI, {
3637
+ method: "GET",
3638
+ url: "/v1/payments",
3639
+ query: {
3640
+ "invoiceId": invoiceId,
3641
+ "limit": limit,
3642
+ "nextToken": nextToken
3643
+ },
3644
+ errors: {
3645
+ 400: `Invalid pagination parameters`,
3646
+ 401: `Missing or invalid API key, or caller lacks internal-user privileges`,
3647
+ 404: `The invoice referenced by invoiceId was not found`,
3648
+ 500: `Unexpected server error`
3649
+ }
3650
+ });
3651
+ }
3652
+ };
3653
+
3654
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/PricesService.js
3655
+ var PricesService = class {
3656
+ /**
3657
+ * List prices
3658
+ *
3659
+ * Returns a paginated list of prices. When productId is supplied, only
3660
+ * prices belonging to that product are returned; otherwise all prices for
3661
+ * the portal are returned. Requires internal-user privileges.
3662
+ *
3663
+ * @param productId Filter prices by product ID.
3664
+ * @param limit Maximum number of records to return.
3665
+ * @param nextToken Pagination cursor returned by a previous request.
3666
+ *
3667
+ * @example
3668
+ * await assembly.listPrices();
3669
+ */
3670
+ static listPrices({ productId, limit, nextToken }) {
3671
+ return request(OpenAPI, {
3672
+ method: "GET",
3673
+ url: "/v1/prices",
3674
+ query: {
3675
+ "productId": productId,
3676
+ "limit": limit,
3677
+ "nextToken": nextToken
3678
+ },
3679
+ errors: {
3680
+ 400: `Invalid pagination parameters`,
3681
+ 500: `Unexpected server error`
3682
+ }
3683
+ });
3684
+ }
3685
+ /**
3686
+ * Create a price
3687
+ *
3688
+ * Creates a price for a product. Requires internal-user privileges. The
3689
+ * product must already exist, and the price must be unique within the
3690
+ * product (a recurring price is unique by amount, currency, and interval; a
3691
+ * one-time price is unique by amount and currency).
3692
+ *
3693
+ * @example
3694
+ * await assembly.createAPrice({ requestBody: ... });
3695
+ */
3696
+ static createAPrice({ requestBody }) {
3697
+ return request(OpenAPI, {
3698
+ method: "POST",
3699
+ url: "/v1/prices",
3700
+ body: requestBody,
3701
+ mediaType: "application/json",
3702
+ errors: {
3703
+ 400: `Invalid request body, unknown product, invalid billing period, or negative amount`,
3704
+ 409: `A matching price already exists for the product`,
3705
+ 500: `Unexpected server error`
3706
+ }
3707
+ });
3708
+ }
3709
+ /**
3710
+ * Retrieve a price
3711
+ *
3712
+ * Returns a single price by ID scoped to the authenticated portal.
3713
+ *
3714
+ * @param id Price ID
3715
+ *
3716
+ * @example
3717
+ * await assembly.retrievePrice({ id: ... });
3718
+ */
3719
+ static retrievePrice({ id }) {
3720
+ return request(OpenAPI, {
3721
+ method: "GET",
3722
+ url: "/v1/prices/{id}",
3723
+ path: {
3724
+ "id": id
3725
+ },
3726
+ errors: {
3727
+ 404: `Price not found`,
3728
+ 500: `Unexpected server error`
3729
+ }
3730
+ });
3731
+ }
3732
+ };
3733
+
3734
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/ProductsService.js
3735
+ var ProductsService = class {
3736
+ /**
3737
+ * List products
3738
+ *
3739
+ * Returns a paginated list of products in the caller's portal, optionally
3740
+ * filtered by name (case-insensitive substring match).
3741
+ *
3742
+ * @param name Filter by product name (case-insensitive substring match)
3743
+ * @param limit Maximum number of products to return
3744
+ * @param nextToken Pagination cursor returned by a previous call
3745
+ *
3746
+ * @example
3747
+ * await assembly.listProducts();
3748
+ */
3749
+ static listProducts({ name, limit, nextToken }) {
3750
+ return request(OpenAPI, {
3751
+ method: "GET",
3752
+ url: "/v1/products",
3753
+ query: {
3754
+ "name": name,
3755
+ "limit": limit,
3756
+ "nextToken": nextToken
3757
+ },
3758
+ errors: {
3759
+ 400: `Invalid pagination token`,
3760
+ 401: `Missing or invalid API key`,
3761
+ 403: `API key lacks the payments permission`,
3762
+ 500: `Unexpected server error`
3763
+ }
3764
+ });
3765
+ }
3766
+ /**
3767
+ * Create a product
3768
+ *
3769
+ * Creates a product, optionally bundling one or more prices supplied in the
3770
+ * request body. Only the product name is required; status, portal, and
3771
+ * price IDs are assigned by the server.
3772
+ *
3773
+ * @example
3774
+ * await assembly.createAProduct({ requestBody: ... });
3775
+ */
3776
+ static createAProduct({ requestBody }) {
3777
+ return request(OpenAPI, {
3778
+ method: "POST",
3779
+ url: "/v1/products",
3780
+ body: requestBody,
3781
+ mediaType: "application/json",
3782
+ errors: {
3783
+ 400: `Product name already exists or a supplied price has an invalid billing period`,
3784
+ 401: `Missing or invalid API key`,
3785
+ 403: `API key lacks the payments permission`,
3786
+ 500: `Unexpected server error`
3787
+ }
3788
+ });
3789
+ }
3790
+ /**
3791
+ * Get a product by ID
3792
+ *
3793
+ * Returns a single product scoped to the caller's portal. When the product
3794
+ * has exactly one price, that price is embedded in the response.
3795
+ *
3796
+ * @param id ID of the product to retrieve
3797
+ *
3798
+ * @example
3799
+ * await assembly.retrieveProduct({ id: ... });
3800
+ */
3801
+ static retrieveProduct({ id }) {
3802
+ return request(OpenAPI, {
3803
+ method: "GET",
3804
+ url: "/v1/products/{id}",
3805
+ path: {
3806
+ "id": id
3807
+ },
3808
+ errors: {
3809
+ 401: `Missing or invalid API key`,
3810
+ 403: `API key lacks the payments permission`,
3811
+ 404: `Product not found in the caller's portal`,
3812
+ 500: `Unexpected server error`
3813
+ }
3814
+ });
3815
+ }
3816
+ };
3817
+
3818
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/RefundsService.js
3819
+ var RefundsService = class {
3820
+ /**
3821
+ * List refunds
3822
+ * Returns a paginated list of refunds issued against an invoice. Requires internal-user privileges.
3823
+ * @returns refund_GetRefundsResponse OK
3824
+ * @throws ApiError
3825
+ */
3826
+ static listRefunds({ invoiceId, limit, nextToken }) {
3827
+ return request(OpenAPI, {
3828
+ method: "GET",
3829
+ url: "/v1/refunds",
3830
+ query: {
3831
+ "invoiceId": invoiceId,
3832
+ "limit": limit,
3833
+ "nextToken": nextToken
3834
+ },
3835
+ errors: {
3836
+ 400: `Missing invoiceId or invalid pagination parameters`,
3837
+ 401: `Missing or invalid API key, or caller lacks internal-user privileges`,
3838
+ 500: `Unexpected server error`
3839
+ }
3840
+ });
3841
+ }
3842
+ /**
3843
+ * Create a refund
3844
+ * Issues a refund against a paid invoice. The refund may be queued for
3845
+ * review depending on the portal's billing configuration.
3846
+ * @returns refund_Refund OK
3847
+ * @throws ApiError
3848
+ */
3849
+ static createRefund({ requestBody }) {
3850
+ return request(OpenAPI, {
3851
+ method: "POST",
3852
+ url: "/v1/refunds",
3853
+ body: requestBody,
3854
+ mediaType: "application/json",
3855
+ errors: {
3856
+ 400: `Invalid request body or invoice cannot be refunded in its current state`,
3857
+ 401: `Missing or invalid API key`,
3858
+ 404: `Invoice not found`,
3859
+ 500: `Unexpected server error`
3860
+ }
3861
+ });
3862
+ }
3863
+ };
3864
+
3865
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/SessionService.js
3866
+ var SessionService = class {
3867
+ /**
3868
+ * Exchange a session token for a bearer token
3869
+ *
3870
+ * Validates the presented session token (issued for this app) and returns
3871
+ * the session payload together with a short-lived, user-scoped bearer
3872
+ * token.
3873
+ *
3874
+ * @example
3875
+ * await assembly.sessionExchange({ requestBody: ... });
3876
+ */
3877
+ static sessionExchange({ requestBody }) {
3878
+ return request(OpenAPI, {
3879
+ method: "POST",
3880
+ url: "/v1/session",
3881
+ body: requestBody,
3882
+ mediaType: "application/json",
3883
+ errors: {
3884
+ 400: `Missing or invalid sessionId, or session has no associated user`,
3885
+ 401: `App API key required; session token expired; or session belongs to a different app`,
3886
+ 403: `Missing or invalid API key`,
3887
+ 404: `Session token not found`,
3888
+ 500: `Unexpected server error`
3889
+ }
3890
+ });
3891
+ }
3892
+ };
3893
+
3894
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/SubscriptionsService.js
3895
+ var SubscriptionsService = class {
3896
+ /**
3897
+ * List subscriptions
3898
+ *
3899
+ * Returns a paginated list of subscriptions. Client users always receive
3900
+ * their own subscriptions plus company-targeted subscriptions for their
3901
+ * company; recipient query params are ignored. Internal callers can filter
3902
+ * by recipient: companyId alone returns every subscription in that company,
3903
+ * clientId returns that client's subscriptions, and clientId with companyId
3904
+ * returns that client's subscriptions in that company.
3905
+ *
3906
+ * @param clientId Filter by client ID. Combined with companyId when both are supplied. Ignored for client-user callers.
3907
+ * @param companyId Filter by company ID. Combined with clientId when both are supplied. Ignored for client-user callers.
3908
+ * @param recipientId Filter by recipient ID (deprecated; prefer clientId or companyId). Ignored for client-user callers.
3909
+ * @param limit Maximum number of records to return.
3910
+ * @param nextToken Pagination cursor returned by a previous request.
3911
+ *
3912
+ * @example
3913
+ * await assembly.listSubscriptions();
3914
+ */
3915
+ static listSubscriptions({ clientId, companyId, recipientId, limit, nextToken }) {
3916
+ return request(OpenAPI, {
3917
+ method: "GET",
3918
+ url: "/v1/subscriptions",
3919
+ query: {
3920
+ "clientId": clientId,
3921
+ "companyId": companyId,
3922
+ "recipientId": recipientId,
3923
+ "limit": limit,
3924
+ "nextToken": nextToken
3925
+ },
3926
+ errors: {
3927
+ 400: `Invalid pagination parameters`,
3928
+ 401: `Missing or invalid API key, or caller lacks permission`,
3929
+ 500: `Unexpected server error`
3930
+ }
3931
+ });
3932
+ }
3933
+ /**
3934
+ * Create a subscription
3935
+ *
3936
+ * Creates a recurring subscription for a client or company. Requires a
3937
+ * recipient (clientId or companyId), at least one line item, and a
3938
+ * connected payout account on the portal. The billing interval is inferred
3939
+ * from recurring prices when present, otherwise taken from the request.
3940
+ *
3941
+ * @example
3942
+ * await assembly.createSubscription({ requestBody: ... });
3943
+ */
3944
+ static createSubscription({ requestBody }) {
3945
+ return request(OpenAPI, {
3946
+ method: "POST",
3947
+ url: "/v1/subscriptions",
3948
+ body: requestBody,
3949
+ mediaType: "application/json",
3950
+ errors: {
3951
+ 400: `Invalid request body, recipient, interval, or line items`,
3952
+ 401: `Missing or invalid API key, or caller lacks permission`,
3953
+ 404: `Payout account, recipient, or subscription template not found`,
3954
+ 500: `Unexpected server error`
3955
+ }
3956
+ });
3957
+ }
3958
+ /**
3959
+ * Retrieve a subscription
3960
+ *
3961
+ * Returns a single subscription by ID. Client users may only retrieve their
3962
+ * own subscriptions or company-targeted subscriptions for their company;
3963
+ * other subscriptions in the portal return 404.
3964
+ *
3965
+ * @param id Subscription ID
3966
+ *
3967
+ * @example
3968
+ * await assembly.retrieveSubscription({ id: ... });
3969
+ */
3970
+ static retrieveSubscription({ id }) {
3971
+ return request(OpenAPI, {
3972
+ method: "GET",
3973
+ url: "/v1/subscriptions/{id}",
3974
+ path: {
3975
+ "id": id
3976
+ },
3977
+ errors: {
3978
+ 401: `Missing or invalid API key, or caller lacks permission`,
3979
+ 404: `Subscription not found`,
3980
+ 500: `Unexpected server error`
3981
+ }
3982
+ });
3983
+ }
3984
+ /**
3985
+ * Cancel a subscription
3986
+ *
3987
+ * Cancels an active subscription (or its underlying schedule) and returns
3988
+ * the updated subscription. Cancelling an already-cancelled subscription
3989
+ * returns an error.
3990
+ *
3991
+ * @param id Subscription ID
3992
+ *
3993
+ * @example
3994
+ * await assembly.cancelSubscription({ id: ... });
3995
+ */
3996
+ static cancelSubscription({ id }) {
3997
+ return request(OpenAPI, {
3998
+ method: "POST",
3999
+ url: "/v1/subscriptions/{id}/cancel",
4000
+ path: {
4001
+ "id": id
4002
+ },
4003
+ errors: {
4004
+ 400: `Missing subscription ID or subscription already cancelled`,
4005
+ 401: `Missing or invalid API key, or caller lacks permission`,
4006
+ 404: `Subscription not found`,
4007
+ 500: `Unexpected server error`
4008
+ }
4009
+ });
4010
+ }
4011
+ };
4012
+
4013
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/SubscriptionTemplatesService.js
4014
+ var SubscriptionTemplatesService = class {
4015
+ /**
4016
+ * List subscription templates
4017
+ *
4018
+ * Returns a paginated list of the portal's subscription templates.
4019
+ *
4020
+ * @param limit Maximum number of records to return.
4021
+ * @param nextToken Pagination cursor returned by a previous request.
4022
+ *
4023
+ * @example
4024
+ * await assembly.listSubscriptionTemplates();
4025
+ */
4026
+ static listSubscriptionTemplates({ limit, nextToken }) {
4027
+ return request(OpenAPI, {
4028
+ method: "GET",
4029
+ url: "/v1/subscription-templates",
4030
+ query: {
4031
+ "limit": limit,
4032
+ "nextToken": nextToken
4033
+ },
4034
+ errors: {
4035
+ 400: `Invalid pagination parameters`,
4036
+ 401: `Missing or invalid API key`,
4037
+ 500: `Unexpected server error`
4038
+ }
4039
+ });
4040
+ }
4041
+ };
4042
+
4043
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/TasksService.js
4044
+ var TasksService = class {
4045
+ /**
4046
+ * List tasks
4047
+ *
4048
+ * Lists tasks from the Tasks marketplace app installed on the workspace.
4049
+ * The request is proxied to the app's task API and the response shape is
4050
+ * defined by that app's registered resource schema. Requires the Tasks app
4051
+ * to be installed.
4052
+ *
4053
+ * @param limit Maximum number of tasks to return
4054
+ * @param nextToken Pagination cursor returned by a previous list response
4055
+ * @param createdBy Filter tasks by the id of the internal user that created them
4056
+ * @param parentTaskId Filter to the subtasks of the given parent task id
4057
+ * @param status Filter tasks by status
4058
+ * @param clientId Filter tasks by the id of the assigned client
4059
+ * @param internalUserId Filter tasks by the id of the assigned internal user
4060
+ * @param companyId Filter tasks by the id of the assigned company
4061
+ *
4062
+ * @example
4063
+ * await assembly.retrieveTasks();
4064
+ */
4065
+ static retrieveTasks({ limit, nextToken, createdBy, parentTaskId, status, clientId, internalUserId, companyId }) {
4066
+ return request(OpenAPI, {
4067
+ method: "GET",
4068
+ url: "/v1/tasks",
4069
+ query: {
4070
+ "limit": limit,
4071
+ "nextToken": nextToken,
4072
+ "createdBy": createdBy,
4073
+ "parentTaskId": parentTaskId,
4074
+ "status": status,
4075
+ "clientId": clientId,
4076
+ "internalUserId": internalUserId,
4077
+ "companyId": companyId
4078
+ },
4079
+ errors: {
4080
+ 400: `Invalid query parameter for the app resource`,
4081
+ 401: `Missing or invalid API key`,
4082
+ 404: `App not found, not installed on the workspace, or app resource not found`,
4083
+ 422: `App API rejected the request as unprocessable`,
4084
+ 429: `App API rate limit exceeded`,
4085
+ 500: `App API request failed or unexpected server error`
4086
+ }
4087
+ });
4088
+ }
4089
+ /**
4090
+ * Create a task
4091
+ *
4092
+ * Creates a task via the Tasks marketplace app installed on the workspace.
4093
+ * The request body is validated against the app's registered resource
4094
+ * schema and proxied to the app's task API. Requires the Tasks app to be
4095
+ * installed.
4096
+ *
4097
+ * @example
4098
+ * await assembly.createTask({ requestBody: ... });
4099
+ */
4100
+ static createTask({ requestBody }) {
4101
+ return request(OpenAPI, {
4102
+ method: "POST",
4103
+ url: "/v1/tasks",
4104
+ body: requestBody,
4105
+ mediaType: "application/json",
4106
+ errors: {
4107
+ 400: `Invalid request body for the app resource`,
4108
+ 401: `Missing or invalid API key`,
4109
+ 404: `App not found, not installed on the workspace, or app resource not found`,
4110
+ 422: `App API rejected the request as unprocessable`,
4111
+ 429: `App API rate limit exceeded`,
4112
+ 500: `App API request failed or unexpected server error`
4113
+ }
4114
+ });
4115
+ }
4116
+ /**
4117
+ * Delete a task
4118
+ *
4119
+ * Deletes a task by id via the Tasks marketplace app installed on the
4120
+ * workspace. The request is proxied to the app's task API and returns the
4121
+ * deleted task marker. Requires the Tasks app to be installed.
4122
+ *
4123
+ * @param id Task id
4124
+ *
4125
+ * @example
4126
+ * await assembly.deleteTask({ id: ... });
4127
+ */
4128
+ static deleteTask({ id }) {
4129
+ return request(OpenAPI, {
4130
+ method: "DELETE",
4131
+ url: "/v1/tasks/{id}",
4132
+ path: {
4133
+ "id": id
4134
+ },
4135
+ errors: {
4136
+ 400: `Invalid request for the app resource`,
4137
+ 401: `Missing or invalid API key`,
4138
+ 404: `App not found, not installed on the workspace, app resource not found, or task not found`,
4139
+ 422: `App API rejected the request as unprocessable`,
4140
+ 429: `App API rate limit exceeded`,
4141
+ 500: `App API request failed or unexpected server error`
4142
+ }
4143
+ });
4144
+ }
4145
+ /**
4146
+ * Retrieve a task
4147
+ *
4148
+ * Retrieves a single task by id from the Tasks marketplace app installed on
4149
+ * the workspace. The request is proxied to the app's task API. Requires the
4150
+ * Tasks app to be installed.
4151
+ *
4152
+ * @param id Task id
4153
+ *
4154
+ * @example
4155
+ * await assembly.retrieveTask({ id: ... });
4156
+ */
4157
+ static retrieveTask({ id }) {
4158
+ return request(OpenAPI, {
4159
+ method: "GET",
4160
+ url: "/v1/tasks/{id}",
4161
+ path: {
4162
+ "id": id
4163
+ },
4164
+ errors: {
4165
+ 400: `Invalid request for the app resource`,
4166
+ 401: `Missing or invalid API key`,
4167
+ 404: `App not found, not installed on the workspace, app resource not found, or task not found`,
4168
+ 422: `App API rejected the request as unprocessable`,
4169
+ 429: `App API rate limit exceeded`,
4170
+ 500: `App API request failed or unexpected server error`
4171
+ }
4172
+ });
4173
+ }
4174
+ /**
4175
+ * Update a task
4176
+ *
4177
+ * Partially updates a task by id via the Tasks marketplace app installed on
4178
+ * the workspace. Only the provided fields are changed. The request is
4179
+ * proxied to the app's task API. Requires the Tasks app to be installed.
4180
+ *
4181
+ * @param id Task id
4182
+ *
4183
+ * @example
4184
+ * await assembly.updateTask({ id: ..., requestBody: ... });
4185
+ */
4186
+ static updateTask({ id, requestBody }) {
4187
+ return request(OpenAPI, {
4188
+ method: "PATCH",
4189
+ url: "/v1/tasks/{id}",
4190
+ path: {
4191
+ "id": id
4192
+ },
4193
+ body: requestBody,
4194
+ mediaType: "application/json",
4195
+ errors: {
4196
+ 400: `Invalid request body for the app resource`,
4197
+ 401: `Missing or invalid API key`,
4198
+ 404: `App not found, not installed on the workspace, app resource not found, or task not found`,
4199
+ 422: `App API rejected the request as unprocessable`,
4200
+ 429: `App API rate limit exceeded`,
4201
+ 500: `App API request failed or unexpected server error`
4202
+ }
4203
+ });
4204
+ }
4205
+ };
4206
+
4207
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/TaskTemplatesService.js
4208
+ var TaskTemplatesService = class {
4209
+ /**
4210
+ * List task templates
4211
+ *
4212
+ * Lists task templates from the Tasks marketplace app installed on the
4213
+ * workspace. The request is proxied to the app's task-templates API.
4214
+ * Requires the Tasks app to be installed.
4215
+ *
4216
+ * @param limit Maximum number of task templates to return
4217
+ * @param nextToken Pagination cursor returned by a previous list response
4218
+ *
4219
+ * @example
4220
+ * await assembly.listTaskTemplates();
4221
+ */
4222
+ static listTaskTemplates({ limit, nextToken }) {
4223
+ return request(OpenAPI, {
4224
+ method: "GET",
4225
+ url: "/v1/task-templates",
4226
+ query: {
4227
+ "limit": limit,
4228
+ "nextToken": nextToken
4229
+ },
4230
+ errors: {
4231
+ 400: `Invalid query parameter for the app resource`,
4232
+ 401: `Missing or invalid API key`,
4233
+ 404: `App not found, not installed on the workspace, or app resource not found`,
4234
+ 422: `App API rejected the request as unprocessable`,
4235
+ 429: `App API rate limit exceeded`,
4236
+ 500: `App API request failed or unexpected server error`
4237
+ }
4238
+ });
4239
+ }
4240
+ /**
4241
+ * Retrieve a task template
4242
+ *
4243
+ * Retrieves a single task template by id from the Tasks marketplace app
4244
+ * installed on the workspace. The request is proxied to the app's
4245
+ * task-templates API. Requires the Tasks app to be installed.
4246
+ *
4247
+ * @param id Task template id
4248
+ *
4249
+ * @example
4250
+ * await assembly.retrieveTaskTemplate({ id: ... });
4251
+ */
4252
+ static retrieveTaskTemplate({ id }) {
4253
+ return request(OpenAPI, {
4254
+ method: "GET",
4255
+ url: "/v1/task-templates/{id}",
4256
+ path: {
4257
+ "id": id
4258
+ },
4259
+ errors: {
4260
+ 400: `Invalid request for the app resource`,
4261
+ 401: `Missing or invalid API key`,
4262
+ 404: `App not found, not installed on the workspace, app resource not found, or task template not found`,
4263
+ 422: `App API rejected the request as unprocessable`,
4264
+ 429: `App API rate limit exceeded`,
4265
+ 500: `App API request failed or unexpected server error`
4266
+ }
4267
+ });
4268
+ }
4269
+ };
4270
+
4271
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/TokenService.js
4272
+ var TokenService = class {
4273
+ /**
4274
+ * Issue an app-scoped offline bearer token
4275
+ *
4276
+ * Issues a short-lived, app-scoped bearer token using the app API key alone
4277
+ * — no user session required. Intended for cron jobs and background workers
4278
+ * that operate outside a user iframe. The token expires after one hour;
4279
+ * re-mint it from the API key on expiry.
4280
+ *
4281
+ * @example
4282
+ * await assembly.offlineTokenIssue();
4283
+ */
4284
+ static offlineTokenIssue() {
4285
+ return request(OpenAPI, {
4286
+ method: "POST",
4287
+ url: "/v1/token",
4288
+ errors: {
4289
+ 401: `App API key required`,
4290
+ 403: `Missing or invalid API key`,
4291
+ 500: `Unexpected server error`
4292
+ }
4293
+ });
4294
+ }
4295
+ };
4296
+
4297
+ // node_modules/@assembly-js/node-sdk/dist/codegen/api/services/WorkspacesService.js
4298
+ var WorkspacesService = class {
4299
+ /**
4300
+ * Retrieve the workspace
4301
+ *
4302
+ * Returns the configuration and branding of the workspace associated with
4303
+ * the authenticated API key's portal.
4304
+ *
4305
+ * @example
4306
+ * await assembly.retrieveWorkspace();
4307
+ */
4308
+ static retrieveWorkspace() {
4309
+ return request(OpenAPI, {
4310
+ method: "GET",
4311
+ url: "/v1/workspaces",
4312
+ errors: {
4313
+ 400: `Workspace configuration could not be resolved`,
4314
+ 401: `Missing or invalid API key`
4315
+ }
4316
+ });
4317
+ }
4318
+ };
4319
+
4320
+ // node_modules/@assembly-js/node-sdk/dist/utils/crypto-web.js
4321
+ var __awaiter2 = function(thisArg, _arguments, P, generator) {
4322
+ function adopt(value) {
4323
+ return value instanceof P ? value : new P(function(resolve2) {
4324
+ resolve2(value);
4325
+ });
4326
+ }
4327
+ return new (P || (P = Promise))(function(resolve2, reject) {
4328
+ function fulfilled(value) {
4329
+ try {
4330
+ step(generator.next(value));
4331
+ } catch (e) {
4332
+ reject(e);
4333
+ }
4334
+ }
4335
+ function rejected(value) {
4336
+ try {
4337
+ step(generator["throw"](value));
4338
+ } catch (e) {
4339
+ reject(e);
4340
+ }
4341
+ }
4342
+ function step(result) {
4343
+ result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
4344
+ }
4345
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
4346
+ });
4347
+ };
4348
+ function hexToUint8Array(hex) {
4349
+ const bytes = new Uint8Array(hex.length / 2);
4350
+ for (let i = 0; i < bytes.length; i++) {
4351
+ bytes[i] = parseInt(hex.substr(i * 2, 2), 16);
4352
+ }
4353
+ return bytes;
4354
+ }
4355
+ function uint8ArrayToHex(bytes) {
4356
+ return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("");
4357
+ }
4358
+ function generate128BitKey(apiKey) {
4359
+ return __awaiter2(this, void 0, void 0, function* () {
4360
+ const encoder = new TextEncoder();
4361
+ const keyData = encoder.encode(apiKey);
4362
+ const cryptoKey = yield crypto.subtle.importKey("raw", keyData, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
4363
+ const emptyMessage = new Uint8Array(0);
4364
+ const signature = yield crypto.subtle.sign("HMAC", cryptoKey, emptyMessage);
4365
+ const hashHex = uint8ArrayToHex(new Uint8Array(signature));
4366
+ return hashHex.slice(0, 32);
4367
+ });
4368
+ }
4369
+ function decryptAES128BitToken(key, encryptedMessage) {
4370
+ return __awaiter2(this, void 0, void 0, function* () {
4371
+ const keyBuffer = hexToUint8Array(key);
4372
+ const encryptedBuffer = hexToUint8Array(encryptedMessage);
4373
+ const iv = encryptedBuffer.slice(0, 16);
4374
+ const ciphertext = encryptedBuffer.slice(16);
4375
+ const cryptoKey = yield crypto.subtle.importKey("raw", keyBuffer, { name: "AES-CBC" }, false, ["decrypt"]);
4376
+ const decrypted = yield crypto.subtle.decrypt({ name: "AES-CBC", iv }, cryptoKey, ciphertext);
4377
+ return new TextDecoder().decode(decrypted);
4378
+ });
4379
+ }
4380
+
4381
+ // node_modules/@assembly-js/node-sdk/dist/api/context.js
4382
+ import { AsyncLocalStorage } from "node:async_hooks";
4383
+ var requestContext = new AsyncLocalStorage();
4384
+ var installed = false;
4385
+ function installOpenAPIProxy(openapi) {
4386
+ if (installed)
4387
+ return;
4388
+ installed = true;
4389
+ const defaults = {};
4390
+ const proxiedKeys = [
4391
+ "BASE",
4392
+ "HEADERS",
4393
+ "TOKEN",
4394
+ "USERNAME",
4395
+ "PASSWORD",
4396
+ "WITH_CREDENTIALS",
4397
+ "CREDENTIALS",
4398
+ "ENCODE_PATH",
4399
+ "VERSION"
4400
+ ];
4401
+ for (const key of proxiedKeys) {
4402
+ defaults[key] = openapi[key];
4403
+ Object.defineProperty(openapi, key, {
4404
+ get() {
4405
+ const store = requestContext.getStore();
4406
+ if (store && key in store) {
4407
+ return store[key];
4408
+ }
4409
+ return defaults[key];
4410
+ },
4411
+ set(value) {
4412
+ const store = requestContext.getStore();
4413
+ if (store) {
4414
+ store[key] = value;
4415
+ } else {
4416
+ defaults[key] = value;
4417
+ }
4418
+ },
4419
+ configurable: true,
4420
+ enumerable: true
4421
+ });
4422
+ }
4423
+ }
4424
+
4425
+ // node_modules/@assembly-js/node-sdk/dist/api/init.js
4426
+ var __awaiter3 = function(thisArg, _arguments, P, generator) {
4427
+ function adopt(value) {
4428
+ return value instanceof P ? value : new P(function(resolve2) {
4429
+ resolve2(value);
4430
+ });
4431
+ }
4432
+ return new (P || (P = Promise))(function(resolve2, reject) {
4433
+ function fulfilled(value) {
4434
+ try {
4435
+ step(generator.next(value));
4436
+ } catch (e) {
4437
+ reject(e);
4438
+ }
4439
+ }
4440
+ function rejected(value) {
4441
+ try {
4442
+ step(generator["throw"](value));
4443
+ } catch (e) {
4444
+ reject(e);
4445
+ }
4446
+ }
4447
+ function step(result) {
4448
+ result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
4449
+ }
4450
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
4451
+ });
4452
+ };
4453
+ var { OpenAPI: OpenAPI2 } = api_exports;
4454
+ var SDK_VERSION = "4.2.4";
4455
+ installOpenAPIProxy(OpenAPI2);
4456
+ var CLASS_OWN_KEYS = /* @__PURE__ */ new Set(["length", "name", "prototype"]);
4457
+ var SERVICE_NAME_PATTERN = /Service$/;
4458
+ function collectServiceMethods() {
4459
+ const methods = /* @__PURE__ */ new Map();
4460
+ for (const [exportName, exported] of Object.entries(api_exports)) {
4461
+ if (!SERVICE_NAME_PATTERN.test(exportName))
4462
+ continue;
4463
+ if (typeof exported !== "function")
4464
+ continue;
4465
+ for (const methodName of Object.getOwnPropertyNames(exported)) {
4466
+ if (CLASS_OWN_KEYS.has(methodName))
4467
+ continue;
4468
+ const method = exported[methodName];
4469
+ if (typeof method !== "function")
4470
+ continue;
4471
+ if (methods.has(methodName)) {
4472
+ throw new Error(`Duplicate SDK method "${methodName}" across generated services; operationIds must be globally unique.`);
4473
+ }
4474
+ methods.set(methodName, method);
4475
+ }
4476
+ }
4477
+ if (methods.size === 0) {
4478
+ throw new Error("No generated service methods found in ../codegen/api \u2014 regenerate the SDK (yarn generate-api).");
4479
+ }
4480
+ return methods;
4481
+ }
4482
+ var SERVICE_METHODS = collectServiceMethods();
4483
+ function getIsDebug() {
4484
+ var _a;
4485
+ return !!((_a = process.env.ASSEMBLY_DEBUG) !== null && _a !== void 0 ? _a : process.env.COPILOT_DEBUG);
4486
+ }
4487
+ function getEnvMode() {
4488
+ var _a;
4489
+ return (_a = process.env.ASSEMBLY_ENV) !== null && _a !== void 0 ? _a : process.env.COPILOT_ENV;
4490
+ }
4491
+ function payloadFromBearer(bearer) {
4492
+ const parts = bearer.split(".");
4493
+ if (parts.length !== 3)
4494
+ return null;
4495
+ try {
4496
+ const b64 = parts[1].replace(/-/g, "+").replace(/_/g, "/");
4497
+ const json = JSON.parse(typeof Buffer !== "undefined" ? Buffer.from(b64, "base64").toString("utf8") : atob(b64));
4498
+ if (typeof json.exp === "number" && json.exp * 1e3 <= Date.now()) {
4499
+ return null;
4500
+ }
4501
+ if (!json.workspace_id)
4502
+ return null;
4503
+ return {
4504
+ workspaceId: json.workspace_id,
4505
+ clientId: json.client_id || void 0,
4506
+ companyId: json.company_id || void 0,
4507
+ internalUserId: json.internal_user_id || void 0,
4508
+ notificationId: json.notification_id || void 0
4509
+ };
4510
+ } catch (_a) {
4511
+ return null;
4512
+ }
4513
+ }
4514
+ function processToken(token) {
4515
+ try {
4516
+ const json = JSON.parse(token);
4517
+ if (!("workspaceId" in json)) {
4518
+ throw new Error("Missing required field in token payload: workspaceId");
4519
+ }
4520
+ const areAllValuesValid = Object.values(json).every((val) => typeof val === "string");
4521
+ if (!areAllValuesValid) {
4522
+ throw new Error("Invalid values in token payload.");
4523
+ }
4524
+ const result = {
4525
+ companyId: json.companyId,
4526
+ clientId: json.clientId,
4527
+ internalUserId: json.internalUserId,
4528
+ workspaceId: json.workspaceId,
4529
+ notificationId: json.notificationId,
4530
+ baseUrl: json.baseUrl,
4531
+ tokenId: json.tokenId
4532
+ };
4533
+ return result;
4534
+ } catch (e) {
4535
+ if (getIsDebug()) {
4536
+ console.error(e);
4537
+ }
4538
+ return null;
4539
+ }
4540
+ }
4541
+ function createRequestScopedSdk(config, payload) {
4542
+ const sdk = {};
4543
+ for (const [methodName, method] of SERVICE_METHODS) {
4544
+ sdk[methodName] = (...args) => {
4545
+ return requestContext.run(config, () => method(...args));
4546
+ };
4547
+ }
4548
+ if (payload) {
4549
+ sdk.getTokenPayload = () => Promise.resolve(payload);
4550
+ }
4551
+ sdk.sendWebhook = (event, webhookPayload) => {
4552
+ return requestContext.run(config, () => request(OpenAPI2, {
4553
+ method: "POST",
4554
+ url: "/v1/webhooks/{event}",
4555
+ path: { event },
4556
+ body: webhookPayload,
4557
+ mediaType: "application/json"
4558
+ }));
4559
+ };
4560
+ sdk.fetch = (path, init) => {
4561
+ const url = config.BASE.replace(/\/$/, "") + (path.startsWith("/") ? path : "/" + path);
4562
+ const mergedHeaders = new Headers(init === null || init === void 0 ? void 0 : init.headers);
4563
+ if (config.HEADERS && typeof config.HEADERS !== "function") {
4564
+ for (const [k, v] of Object.entries(config.HEADERS)) {
4565
+ if (!mergedHeaders.has(k))
4566
+ mergedHeaders.set(k, v);
4567
+ }
4568
+ }
4569
+ if ((init === null || init === void 0 ? void 0 : init.body) && typeof init.body === "string" && !mergedHeaders.has("Content-Type")) {
4570
+ mergedHeaders.set("Content-Type", "application/json");
4571
+ }
4572
+ return fetch(url, Object.assign(Object.assign({}, init), { headers: mergedHeaders }));
4573
+ };
4574
+ return sdk;
4575
+ }
4576
+ function assemblyApi({ apiKey, token: tokenString, bearer, baseUrl }) {
4577
+ return __awaiter3(this, void 0, void 0, function* () {
4578
+ const isDebug = getIsDebug();
4579
+ const envMode = getEnvMode();
4580
+ let key = ["local", "__SECRET_STAGING__"].includes(envMode !== null && envMode !== void 0 ? envMode : "") ? apiKey : void 0;
4581
+ if (isDebug) {
4582
+ console.log("Debugging the assemblyApi init script.");
4583
+ console.log({ env: envMode });
4584
+ }
4585
+ let payload = null;
4586
+ let base = baseUrl;
4587
+ if (tokenString && apiKey) {
4588
+ if (isDebug) {
4589
+ console.log({ tokenString, apiKey });
4590
+ }
4591
+ try {
4592
+ const decipherKey = yield generate128BitKey(apiKey);
4593
+ const decryptedPayload = yield decryptAES128BitToken(decipherKey, tokenString);
4594
+ if (isDebug) {
4595
+ console.log("Decrypted Payload:", decryptedPayload);
4596
+ }
4597
+ payload = processToken(decryptedPayload);
4598
+ if (!payload) {
4599
+ throw new Error("Invalid token payload.");
4600
+ }
4601
+ if (isDebug) {
4602
+ console.log("Payload:", payload);
4603
+ }
4604
+ if (payload.baseUrl) {
4605
+ base = payload.baseUrl;
4606
+ }
4607
+ key = payload.tokenId ? `${payload.workspaceId}/${apiKey}/${payload.tokenId}` : `${payload.workspaceId}/${apiKey}`;
4608
+ } catch (error) {
4609
+ console.error(error);
4610
+ }
4611
+ }
4612
+ if (!payload && bearer) {
4613
+ payload = payloadFromBearer(bearer);
4614
+ if (payload && !key && apiKey) {
4615
+ key = `${payload.workspaceId}/${apiKey}`;
4616
+ }
4617
+ }
4618
+ if (!key && !bearer) {
4619
+ console.warn('We were unable to authorize the SDK. If you are working in a local development environment, set the ASSEMBLY_ENV environment variable to "local" (COPILOT_ENV also works).');
4620
+ throw new Error("Unable to authorize Assembly SDK.");
4621
+ }
4622
+ if (isDebug) {
4623
+ console.log(`Authorizing with key: ${key}`);
4624
+ }
4625
+ const requestConfig = {
4626
+ BASE: base !== null && base !== void 0 ? base : OpenAPI2.BASE,
4627
+ VERSION: OpenAPI2.VERSION,
4628
+ WITH_CREDENTIALS: OpenAPI2.WITH_CREDENTIALS,
4629
+ CREDENTIALS: OpenAPI2.CREDENTIALS,
4630
+ TOKEN: void 0,
4631
+ USERNAME: void 0,
4632
+ PASSWORD: void 0,
4633
+ HEADERS: Object.assign(Object.assign(Object.assign({}, key ? { "X-API-Key": key } : {}), bearer ? { Authorization: `Bearer ${bearer}` } : {}), { "X-Assembly-SDK-Version": SDK_VERSION }),
4634
+ ENCODE_PATH: OpenAPI2.ENCODE_PATH
4635
+ };
4636
+ return createRequestScopedSdk(requestConfig, payload);
4637
+ });
4638
+ }
4639
+
4640
+ // src/session-exchange.ts
4641
+ var BEARER_TTL_MS = 60 * 60 * 1e3;
4642
+ var COOKIE_PROBE_TTL_SECONDS = 24 * 60 * 60;
4643
+
4644
+ // src/mint-bearer.ts
4645
+ var mintBaseUrl = process.env.ASSEMBLY_API_BASE_URL || void 0;
4646
+ var EXCHANGE_TIMEOUT_MS = 15e3;
4647
+ async function mintBearerFromAppKey() {
4648
+ const apiKey = process.env.ASSEMBLY_API_KEY;
4649
+ if (!apiKey) return null;
4650
+ const base = (mintBaseUrl ?? OpenAPI2.BASE).replace(/\/$/, "");
4651
+ const now = Date.now();
4652
+ const controller = new AbortController();
4653
+ const timeoutId = setTimeout(() => controller.abort(), EXCHANGE_TIMEOUT_MS);
4654
+ try {
4655
+ const resp = await fetch(`${base}/v1/token`, {
4656
+ method: "POST",
4657
+ headers: { "X-API-Key": apiKey },
4658
+ signal: controller.signal
4659
+ });
4660
+ if (!resp.ok) return null;
4661
+ const json = await resp.json();
4662
+ if (typeof json.token !== "string" || json.token.length === 0 || typeof json.tokenExpiresAt !== "number" || !Number.isFinite(json.tokenExpiresAt) || json.tokenExpiresAt * 1e3 <= now) {
4663
+ return null;
4664
+ }
4665
+ const bearerExpiresAt = Math.min(
4666
+ json.tokenExpiresAt * 1e3,
4667
+ now + BEARER_TTL_MS
4668
+ );
4669
+ return { bearer: json.token, bearerExpiresAt };
4670
+ } catch {
4671
+ return null;
4672
+ } finally {
4673
+ clearTimeout(timeoutId);
4674
+ }
4675
+ }
4676
+
4677
+ // src/scripts.ts
4678
+ async function getOfflineAssembly() {
4679
+ if (!process.env.ASSEMBLY_API_KEY) {
4680
+ throw new Error(
4681
+ "getOfflineAssembly: ASSEMBLY_API_KEY is not set \u2014 cannot mint an app-scoped bearer"
4682
+ );
4683
+ }
4684
+ const minted = await mintBearerFromAppKey();
4685
+ if (!minted) {
4686
+ throw new Error(
4687
+ "getOfflineAssembly: failed to mint an app-scoped bearer from the app API key"
4688
+ );
4689
+ }
4690
+ return assemblyApi({
4691
+ bearer: minted.bearer,
4692
+ baseUrl: process.env.ASSEMBLY_API_BASE_URL || void 0
4693
+ });
4694
+ }
4695
+ export {
4696
+ getOfflineAssembly
4697
+ };