@fonderie/client 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/brain/signatures.md +31 -27
- package/dist/index.cjs +85 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -28
- package/dist/index.d.ts +31 -28
- package/dist/index.js +85 -55
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/brain/signatures.md
CHANGED
|
@@ -80,7 +80,7 @@ interface IListAuditEventsInput {
|
|
|
80
80
|
new AuditClient(http: HttpClient, tokens: TokenStore): AuditClient
|
|
81
81
|
.setAccessToken(token: string | undefined): void
|
|
82
82
|
.setWorkspaceId(workspaceId: string | undefined): void
|
|
83
|
-
.listEvents(input?: IListAuditEventsInput): Promise<IApiResponse<IAuditPageResult>>
|
|
83
|
+
.listEvents(input?: IListAuditEventsInput, opts?: IReadOptions | undefined): Promise<IApiResponse<IAuditPageResult>>
|
|
84
84
|
|
|
85
85
|
interface IChangePasswordInput {
|
|
86
86
|
currentPassword: string;
|
|
@@ -130,7 +130,7 @@ new AuthClient(http: HttpClient, tokens: TokenStore): AuthClient
|
|
|
130
130
|
.verifyEmail(token: string): Promise<IApiResponse<IVerifyEmailResult>>
|
|
131
131
|
.logout(refreshToken?: string | undefined): Promise<IApiResponse<undefined>>
|
|
132
132
|
.sendVerificationEmail(): Promise<IApiResponse<IResendVerificationResult>>
|
|
133
|
-
.getUser(): Promise<IApiResponse<IMeResult>>
|
|
133
|
+
.getUser(opts?: IReadOptions | undefined): Promise<IApiResponse<IMeResult>>
|
|
134
134
|
.updateProfile(input: IUpdateProfileInput): Promise<IApiResponse<IMeResult>>
|
|
135
135
|
.updatePreferences(input: IUpdatePreferencesInput): Promise<IApiResponse<IMeResult>>
|
|
136
136
|
.updateEmail(email: string): Promise<IApiResponse<unknown>>
|
|
@@ -168,16 +168,16 @@ type IUpdatePlanInput = Partial<ICreatePlanInput>;
|
|
|
168
168
|
new BillingClient(http: HttpClient, tokens: TokenStore): BillingClient
|
|
169
169
|
.setAccessToken(token: string | undefined): void
|
|
170
170
|
.setWorkspaceId(workspaceId: string | undefined): void
|
|
171
|
-
.listPlans(): Promise<IApiResponse<IPlanListResult>>
|
|
172
|
-
.getPlan(planId: string): Promise<IApiResponse<IPlanResult>>
|
|
171
|
+
.listPlans(opts?: IReadOptions | undefined): Promise<IApiResponse<IPlanListResult>>
|
|
172
|
+
.getPlan(planId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<IPlanResult>>
|
|
173
173
|
.createPlan(input: ICreatePlanInput): Promise<IApiResponse<IPlanResult>>
|
|
174
174
|
.updatePlan(planId: string, input: Partial<ICreatePlanInput>): Promise<IApiResponse<IPlanResult>>
|
|
175
175
|
.deletePlan(planId: string): Promise<IApiResponse<undefined>>
|
|
176
|
-
.getSubscription(): Promise<IApiResponse<ISubscriptionResult>>
|
|
176
|
+
.getSubscription(opts?: IReadOptions | undefined): Promise<IApiResponse<ISubscriptionResult>>
|
|
177
177
|
.createCheckoutSession(input: ICheckoutInput): Promise<IApiResponse<ICheckoutUrlResult>>
|
|
178
178
|
.createPortalSession(): Promise<IApiResponse<IPortalUrlResult>>
|
|
179
179
|
.recordUsage(input: IRecordUsageInput): Promise<IApiResponse<undefined>>
|
|
180
|
-
.getUsage(metric: string): Promise<IApiResponse<IUsageResult>>
|
|
180
|
+
.getUsage(metric: string, opts?: IReadOptions | undefined): Promise<IApiResponse<IUsageResult>>
|
|
181
181
|
|
|
182
182
|
interface IConfigAdminClientOptions {
|
|
183
183
|
baseUrl: string;
|
|
@@ -303,40 +303,40 @@ type IUpdateCustomerInput = ICreateCustomerInput;
|
|
|
303
303
|
new CustomersClient(http: HttpClient, tokens: TokenStore): CustomersClient
|
|
304
304
|
.setAccessToken(token: string | undefined): void
|
|
305
305
|
.setWorkspaceId(workspaceId: string | undefined): void
|
|
306
|
-
.listCustomers(input?: IListCustomersInput): Promise<IApiResponse<ICustomerListResult>>
|
|
306
|
+
.listCustomers(input?: IListCustomersInput, opts?: IReadOptions | undefined): Promise<IApiResponse<ICustomerListResult>>
|
|
307
307
|
.createCustomer(input?: ICreateCustomerInput): Promise<IApiResponse<ICustomerResult>>
|
|
308
|
-
.getCustomer(customerId: string, input?: IGetCustomerInput): Promise<IApiResponse<ICustomerDetailDTO | ICustomerDetailD2DTO>>
|
|
308
|
+
.getCustomer(customerId: string, input?: IGetCustomerInput, opts?: IReadOptions | undefined): Promise<IApiResponse<ICustomerDetailDTO | ICustomerDetailD2DTO>>
|
|
309
309
|
.updateCustomer(customerId: string, input: ICreateCustomerInput): Promise<IApiResponse<ICustomerResult>>
|
|
310
310
|
.deleteCustomer(customerId: string): Promise<IApiResponse<undefined>>
|
|
311
311
|
.blacklistCustomer(customerId: string, input?: IBlacklistCustomerInput): Promise<IApiResponse<undefined>>
|
|
312
312
|
.unblacklistCustomer(customerId: string): Promise<IApiResponse<undefined>>
|
|
313
|
-
.listEmails(customerId: string): Promise<IApiResponse<ICustomerEmailListResult>>
|
|
313
|
+
.listEmails(customerId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<ICustomerEmailListResult>>
|
|
314
314
|
.addEmail(customerId: string, input: IAddEmailInput): Promise<IApiResponse<ICustomerEmailResult>>
|
|
315
315
|
.updateEmailLabel(customerId: string, emailId: string, label: string): Promise<IApiResponse<ICustomerEmailResult>>
|
|
316
316
|
.setPrimaryEmail(customerId: string, emailId: string): Promise<IApiResponse<undefined>>
|
|
317
317
|
.removeEmail(customerId: string, emailId: string): Promise<IApiResponse<undefined>>
|
|
318
|
-
.listPhones(customerId: string): Promise<IApiResponse<ICustomerPhoneListResult>>
|
|
318
|
+
.listPhones(customerId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<ICustomerPhoneListResult>>
|
|
319
319
|
.addPhone(customerId: string, input: IAddPhoneInput): Promise<IApiResponse<ICustomerPhoneResult>>
|
|
320
320
|
.updatePhoneLabel(customerId: string, phoneId: string, label: string): Promise<IApiResponse<ICustomerPhoneResult>>
|
|
321
321
|
.setPrimaryPhone(customerId: string, phoneId: string): Promise<IApiResponse<undefined>>
|
|
322
322
|
.removePhone(customerId: string, phoneId: string): Promise<IApiResponse<undefined>>
|
|
323
|
-
.listAddresses(customerId: string): Promise<IApiResponse<ICustomerAddressListResult>>
|
|
323
|
+
.listAddresses(customerId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<ICustomerAddressListResult>>
|
|
324
324
|
.addAddress(customerId: string, input: IAddAddressInput): Promise<IApiResponse<ICustomerAddressResult>>
|
|
325
325
|
.updateAddressLabel(customerId: string, addrId: string, label: string): Promise<IApiResponse<ICustomerAddressResult>>
|
|
326
326
|
.setPrimaryAddress(customerId: string, addrId: string): Promise<IApiResponse<undefined>>
|
|
327
327
|
.removeAddress(customerId: string, addrId: string): Promise<IApiResponse<undefined>>
|
|
328
|
-
.listNotes(customerId: string): Promise<IApiResponse<ICustomerNoteListResult>>
|
|
328
|
+
.listNotes(customerId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<ICustomerNoteListResult>>
|
|
329
329
|
.createNote(customerId: string, body: string): Promise<IApiResponse<ICustomerNoteResult>>
|
|
330
330
|
.updateNote(customerId: string, noteId: string, body: string): Promise<IApiResponse<ICustomerNoteResult>>
|
|
331
331
|
.deleteNote(customerId: string, noteId: string): Promise<IApiResponse<undefined>>
|
|
332
|
-
.listTags(customerId: string): Promise<IApiResponse<ICustomerTagListResult>>
|
|
332
|
+
.listTags(customerId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<ICustomerTagListResult>>
|
|
333
333
|
.addTag(customerId: string, tag: string): Promise<IApiResponse<undefined>>
|
|
334
334
|
.removeTag(customerId: string, tag: string): Promise<IApiResponse<undefined>>
|
|
335
|
-
.listRelationships(customerId: string): Promise<IApiResponse<ICustomerRelationshipListResult>>
|
|
335
|
+
.listRelationships(customerId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<ICustomerRelationshipListResult>>
|
|
336
336
|
.addRelationship(customerId: string, input: IAddRelationshipInput): Promise<IApiResponse<ICustomerRelationshipResult>>
|
|
337
337
|
.setPrimaryRelationship(customerId: string, relatedId: string): Promise<IApiResponse<undefined>>
|
|
338
338
|
.removeRelationship(customerId: string, relatedId: string): Promise<IApiResponse<undefined>>
|
|
339
|
-
.listLabels(type: CustomerLabelType): Promise<IApiResponse<ICustomerLabelListResult>>
|
|
339
|
+
.listLabels(type: CustomerLabelType, opts?: IReadOptions | undefined): Promise<IApiResponse<ICustomerLabelListResult>>
|
|
340
340
|
.removeLabel(labelId: string): Promise<IApiResponse<undefined>>
|
|
341
341
|
|
|
342
342
|
interface ICreateWebhookEndpointInput {
|
|
@@ -353,12 +353,12 @@ interface IUpdateWebhookEndpointInput {
|
|
|
353
353
|
new WebhooksClient(http: HttpClient, tokens: TokenStore): WebhooksClient
|
|
354
354
|
.setAccessToken(token: string | undefined): void
|
|
355
355
|
.setWorkspaceId(workspaceId: string | undefined): void
|
|
356
|
-
.listEndpoints(): Promise<IApiResponse<IWebhookEndpointListResult>>
|
|
356
|
+
.listEndpoints(opts?: IReadOptions | undefined): Promise<IApiResponse<IWebhookEndpointListResult>>
|
|
357
357
|
.createEndpoint(input: ICreateWebhookEndpointInput): Promise<IApiResponse<IWebhookEndpointCreatedDTO>>
|
|
358
|
-
.getEndpoint(endpointId: string): Promise<IApiResponse<IWebhookEndpointDTO>>
|
|
358
|
+
.getEndpoint(endpointId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<IWebhookEndpointDTO>>
|
|
359
359
|
.updateEndpoint(endpointId: string, input: IUpdateWebhookEndpointInput): Promise<IApiResponse<IWebhookEndpointDTO>>
|
|
360
360
|
.deleteEndpoint(endpointId: string): Promise<undefined>
|
|
361
|
-
.listDeliveries(endpointId: string): Promise<IApiResponse<IWebhookDeliveryListResult>>
|
|
361
|
+
.listDeliveries(endpointId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<IWebhookDeliveryListResult>>
|
|
362
362
|
.testEndpoint(endpointId: string): Promise<IApiResponse<ITestWebhookResult>>
|
|
363
363
|
|
|
364
364
|
interface ICreateRoleInput {
|
|
@@ -430,29 +430,29 @@ interface IUpdateWorkspaceInput {
|
|
|
430
430
|
new WorkspacesClient(http: HttpClient, tokens: TokenStore): WorkspacesClient
|
|
431
431
|
.setAccessToken(token: string | undefined): void
|
|
432
432
|
.setWorkspaceId(workspaceId: string | undefined): void
|
|
433
|
-
.listWorkspaces(): Promise<IApiResponse<IWorkspaceListResult>>
|
|
433
|
+
.listWorkspaces(opts?: IReadOptions | undefined): Promise<IApiResponse<IWorkspaceListResult>>
|
|
434
434
|
.createWorkspace(input: ICreateWorkspaceInput): Promise<IApiResponse<IWorkspaceResult>>
|
|
435
|
-
.getWorkspace(id: string): Promise<IApiResponse<IWorkspaceResult>>
|
|
435
|
+
.getWorkspace(id: string, opts?: IReadOptions | undefined): Promise<IApiResponse<IWorkspaceResult>>
|
|
436
436
|
.updateWorkspace(input: IUpdateWorkspaceInput): Promise<IApiResponse<IWorkspaceResult>>
|
|
437
437
|
.archiveWorkspace(): Promise<IApiResponse<undefined>>
|
|
438
438
|
.restoreWorkspace(): Promise<IApiResponse<undefined>>
|
|
439
|
-
.listRoles(): Promise<IApiResponse<IRoleListResult>>
|
|
439
|
+
.listRoles(opts?: IReadOptions | undefined): Promise<IApiResponse<IRoleListResult>>
|
|
440
440
|
.createRole(input: ICreateRoleInput): Promise<IApiResponse<IRoleResult>>
|
|
441
|
-
.getRole(roleId: string): Promise<IApiResponse<IRoleResult>>
|
|
441
|
+
.getRole(roleId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<IRoleResult>>
|
|
442
442
|
.updateRole(roleId: string, input: IUpdateRoleInput): Promise<IApiResponse<IRoleResult>>
|
|
443
443
|
.removeRole(roleId: string): Promise<IApiResponse<undefined>>
|
|
444
|
-
.getRolePermissions(roleId: string): Promise<IApiResponse<IRolePermissionsResult>>
|
|
444
|
+
.getRolePermissions(roleId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<IRolePermissionsResult>>
|
|
445
445
|
.setRolePermissions(roleId: string, permissions: IRolePermissionInput[]): Promise<IApiResponse<undefined>>
|
|
446
|
-
.listMembers(): Promise<IApiResponse<IMemberListResult>>
|
|
446
|
+
.listMembers(opts?: IReadOptions | undefined): Promise<IApiResponse<IMemberListResult>>
|
|
447
447
|
.removeMember(userId: string): Promise<IApiResponse<undefined>>
|
|
448
|
-
.getMemberRoles(userId: string): Promise<IApiResponse<IRoleListResult>>
|
|
448
|
+
.getMemberRoles(userId: string, opts?: IReadOptions | undefined): Promise<IApiResponse<IRoleListResult>>
|
|
449
449
|
.addMemberRole(userId: string, roleId: string): Promise<IApiResponse<undefined>>
|
|
450
450
|
.removeMemberRole(userId: string, roleId: string): Promise<IApiResponse<undefined>>
|
|
451
|
-
.listInvitations(): Promise<IApiResponse<IInvitationListResult>>
|
|
451
|
+
.listInvitations(opts?: IReadOptions | undefined): Promise<IApiResponse<IInvitationListResult>>
|
|
452
452
|
.invite(entries: IInviteEntry | IInviteEntry[]): Promise<IApiResponse<IInviteResult>>
|
|
453
453
|
.cancelInvitation(inviteId: string): Promise<IApiResponse<undefined>>
|
|
454
454
|
.acceptInvitation(pin: string): Promise<IApiResponse<IAcceptInvitationResult>>
|
|
455
|
-
.getSettings(): Promise<IApiResponse<IWorkspaceSettingsResult>>
|
|
455
|
+
.getSettings(opts?: IReadOptions | undefined): Promise<IApiResponse<IWorkspaceSettingsResult>>
|
|
456
456
|
.updateSettings(input: IUpdateSettingsInput): Promise<IApiResponse<IWorkspaceSettingsResult>>
|
|
457
457
|
|
|
458
458
|
type CustomerLabelType = 'phone' | 'email' | 'address';
|
|
@@ -779,6 +779,10 @@ interface IRefreshResult {
|
|
|
779
779
|
tokens: ITokens;
|
|
780
780
|
}
|
|
781
781
|
|
|
782
|
+
interface IReadOptions {
|
|
783
|
+
bust?: boolean | undefined;
|
|
784
|
+
}
|
|
785
|
+
|
|
782
786
|
interface IRegisterResult {
|
|
783
787
|
tokens: ITokens;
|
|
784
788
|
user: IUserDTO;
|
package/dist/index.cjs
CHANGED
|
@@ -169,7 +169,7 @@ var AuditClient = class {
|
|
|
169
169
|
setWorkspaceId(workspaceId) {
|
|
170
170
|
this.workspaceId = workspaceId;
|
|
171
171
|
}
|
|
172
|
-
listEvents(input = {}) {
|
|
172
|
+
listEvents(input = {}, opts) {
|
|
173
173
|
const params = new URLSearchParams();
|
|
174
174
|
if (input.limit !== void 0) params.set("limit", String(input.limit));
|
|
175
175
|
if (input.type) params.set("type", input.type);
|
|
@@ -182,7 +182,8 @@ var AuditClient = class {
|
|
|
182
182
|
method: "GET",
|
|
183
183
|
path: `/audit${qs ? `?${qs}` : ""}`,
|
|
184
184
|
token: this.tokens.get(),
|
|
185
|
-
workspaceId: this.workspaceId
|
|
185
|
+
workspaceId: this.workspaceId,
|
|
186
|
+
bust: opts?.bust
|
|
186
187
|
});
|
|
187
188
|
}
|
|
188
189
|
};
|
|
@@ -309,15 +310,19 @@ var AuthClient = class {
|
|
|
309
310
|
return this.http.request({
|
|
310
311
|
method: "GET",
|
|
311
312
|
path: "/auth/send-verification",
|
|
312
|
-
token: this.tokens.get()
|
|
313
|
+
token: this.tokens.get(),
|
|
314
|
+
// A send-action on a GET route: never serve it from the cache, or a
|
|
315
|
+
// resend inside the TTL would silently no-op.
|
|
316
|
+
cache: false
|
|
313
317
|
});
|
|
314
318
|
}
|
|
315
319
|
// ── Protected + Verified ───────────────────────────────────────────────────
|
|
316
|
-
getUser() {
|
|
320
|
+
getUser(opts) {
|
|
317
321
|
return this.http.request({
|
|
318
322
|
method: "GET",
|
|
319
323
|
path: "/users",
|
|
320
|
-
token: this.tokens.get()
|
|
324
|
+
token: this.tokens.get(),
|
|
325
|
+
bust: opts?.bust
|
|
321
326
|
});
|
|
322
327
|
}
|
|
323
328
|
updateProfile(input) {
|
|
@@ -396,16 +401,18 @@ var BillingClient = class {
|
|
|
396
401
|
this.workspaceId = workspaceId;
|
|
397
402
|
}
|
|
398
403
|
// ── Plans — public read-only ────────────────────────────────────────────────
|
|
399
|
-
listPlans() {
|
|
404
|
+
listPlans(opts) {
|
|
400
405
|
return this.http.request({
|
|
401
406
|
method: "GET",
|
|
402
|
-
path: "/plans"
|
|
407
|
+
path: "/plans",
|
|
408
|
+
bust: opts?.bust
|
|
403
409
|
});
|
|
404
410
|
}
|
|
405
|
-
getPlan(planId) {
|
|
411
|
+
getPlan(planId, opts) {
|
|
406
412
|
return this.http.request({
|
|
407
413
|
method: "GET",
|
|
408
|
-
path: `/plans/${planId}
|
|
414
|
+
path: `/plans/${planId}`,
|
|
415
|
+
bust: opts?.bust
|
|
409
416
|
});
|
|
410
417
|
}
|
|
411
418
|
// ── Plans — admin write ──────────────────────────────────────────────────────
|
|
@@ -439,12 +446,13 @@ var BillingClient = class {
|
|
|
439
446
|
});
|
|
440
447
|
}
|
|
441
448
|
// ── Subscription ─────────────────────────────────────────────────────────────
|
|
442
|
-
getSubscription() {
|
|
449
|
+
getSubscription(opts) {
|
|
443
450
|
return this.http.request({
|
|
444
451
|
method: "GET",
|
|
445
452
|
path: "/billing/subscription",
|
|
446
453
|
token: this.tokens.get(),
|
|
447
|
-
workspaceId: this.workspaceId
|
|
454
|
+
workspaceId: this.workspaceId,
|
|
455
|
+
bust: opts?.bust
|
|
448
456
|
});
|
|
449
457
|
}
|
|
450
458
|
// ── Checkout / portal ────────────────────────────────────────────────────────
|
|
@@ -475,12 +483,13 @@ var BillingClient = class {
|
|
|
475
483
|
workspaceId: this.workspaceId
|
|
476
484
|
});
|
|
477
485
|
}
|
|
478
|
-
getUsage(metric) {
|
|
486
|
+
getUsage(metric, opts) {
|
|
479
487
|
return this.http.request({
|
|
480
488
|
method: "GET",
|
|
481
489
|
path: `/billing/usage/${metric}`,
|
|
482
490
|
token: this.tokens.get(),
|
|
483
|
-
workspaceId: this.workspaceId
|
|
491
|
+
workspaceId: this.workspaceId,
|
|
492
|
+
bust: opts?.bust
|
|
484
493
|
});
|
|
485
494
|
}
|
|
486
495
|
};
|
|
@@ -503,7 +512,7 @@ var CustomersClient = class {
|
|
|
503
512
|
this.workspaceId = workspaceId;
|
|
504
513
|
}
|
|
505
514
|
// ── Core customer CRUD ───────────────────────────────────────────────────────
|
|
506
|
-
listCustomers(input = {}) {
|
|
515
|
+
listCustomers(input = {}, opts) {
|
|
507
516
|
const params = new URLSearchParams();
|
|
508
517
|
if (input.search !== void 0) params.set("search", input.search);
|
|
509
518
|
if (input.blacklisted !== void 0) params.set("blacklisted", String(input.blacklisted));
|
|
@@ -514,7 +523,8 @@ var CustomersClient = class {
|
|
|
514
523
|
method: "GET",
|
|
515
524
|
path: qs ? `/customers?${qs}` : "/customers",
|
|
516
525
|
token: this.tokens.get(),
|
|
517
|
-
workspaceId: this.workspaceId
|
|
526
|
+
workspaceId: this.workspaceId,
|
|
527
|
+
bust: opts?.bust
|
|
518
528
|
});
|
|
519
529
|
}
|
|
520
530
|
createCustomer(input = {}) {
|
|
@@ -528,13 +538,14 @@ var CustomersClient = class {
|
|
|
528
538
|
}
|
|
529
539
|
// depth defaults to 2 server-side; pass { depth: 1 } for one level of
|
|
530
540
|
// relationship expansion instead of the D2 (nested-relationships) shape.
|
|
531
|
-
getCustomer(customerId, input = {}) {
|
|
541
|
+
getCustomer(customerId, input = {}, opts) {
|
|
532
542
|
const qs = input.depth === 1 ? "?depth=1" : "";
|
|
533
543
|
return this.http.request({
|
|
534
544
|
method: "GET",
|
|
535
545
|
path: `/customers/${customerId}${qs}`,
|
|
536
546
|
token: this.tokens.get(),
|
|
537
|
-
workspaceId: this.workspaceId
|
|
547
|
+
workspaceId: this.workspaceId,
|
|
548
|
+
bust: opts?.bust
|
|
538
549
|
});
|
|
539
550
|
}
|
|
540
551
|
updateCustomer(customerId, input) {
|
|
@@ -572,12 +583,13 @@ var CustomersClient = class {
|
|
|
572
583
|
});
|
|
573
584
|
}
|
|
574
585
|
// ── Emails ───────────────────────────────────────────────────────────────────
|
|
575
|
-
listEmails(customerId) {
|
|
586
|
+
listEmails(customerId, opts) {
|
|
576
587
|
return this.http.request({
|
|
577
588
|
method: "GET",
|
|
578
589
|
path: `/customers/${customerId}/emails`,
|
|
579
590
|
token: this.tokens.get(),
|
|
580
|
-
workspaceId: this.workspaceId
|
|
591
|
+
workspaceId: this.workspaceId,
|
|
592
|
+
bust: opts?.bust
|
|
581
593
|
});
|
|
582
594
|
}
|
|
583
595
|
addEmail(customerId, input) {
|
|
@@ -617,12 +629,13 @@ var CustomersClient = class {
|
|
|
617
629
|
});
|
|
618
630
|
}
|
|
619
631
|
// ── Phones ───────────────────────────────────────────────────────────────────
|
|
620
|
-
listPhones(customerId) {
|
|
632
|
+
listPhones(customerId, opts) {
|
|
621
633
|
return this.http.request({
|
|
622
634
|
method: "GET",
|
|
623
635
|
path: `/customers/${customerId}/phones`,
|
|
624
636
|
token: this.tokens.get(),
|
|
625
|
-
workspaceId: this.workspaceId
|
|
637
|
+
workspaceId: this.workspaceId,
|
|
638
|
+
bust: opts?.bust
|
|
626
639
|
});
|
|
627
640
|
}
|
|
628
641
|
addPhone(customerId, input) {
|
|
@@ -661,12 +674,13 @@ var CustomersClient = class {
|
|
|
661
674
|
});
|
|
662
675
|
}
|
|
663
676
|
// ── Addresses ────────────────────────────────────────────────────────────────
|
|
664
|
-
listAddresses(customerId) {
|
|
677
|
+
listAddresses(customerId, opts) {
|
|
665
678
|
return this.http.request({
|
|
666
679
|
method: "GET",
|
|
667
680
|
path: `/customers/${customerId}/addresses`,
|
|
668
681
|
token: this.tokens.get(),
|
|
669
|
-
workspaceId: this.workspaceId
|
|
682
|
+
workspaceId: this.workspaceId,
|
|
683
|
+
bust: opts?.bust
|
|
670
684
|
});
|
|
671
685
|
}
|
|
672
686
|
addAddress(customerId, input) {
|
|
@@ -705,12 +719,13 @@ var CustomersClient = class {
|
|
|
705
719
|
});
|
|
706
720
|
}
|
|
707
721
|
// ── Notes ────────────────────────────────────────────────────────────────────
|
|
708
|
-
listNotes(customerId) {
|
|
722
|
+
listNotes(customerId, opts) {
|
|
709
723
|
return this.http.request({
|
|
710
724
|
method: "GET",
|
|
711
725
|
path: `/customers/${customerId}/notes`,
|
|
712
726
|
token: this.tokens.get(),
|
|
713
|
-
workspaceId: this.workspaceId
|
|
727
|
+
workspaceId: this.workspaceId,
|
|
728
|
+
bust: opts?.bust
|
|
714
729
|
});
|
|
715
730
|
}
|
|
716
731
|
createNote(customerId, body) {
|
|
@@ -740,12 +755,13 @@ var CustomersClient = class {
|
|
|
740
755
|
});
|
|
741
756
|
}
|
|
742
757
|
// ── Tags ─────────────────────────────────────────────────────────────────────
|
|
743
|
-
listTags(customerId) {
|
|
758
|
+
listTags(customerId, opts) {
|
|
744
759
|
return this.http.request({
|
|
745
760
|
method: "GET",
|
|
746
761
|
path: `/customers/${customerId}/tags`,
|
|
747
762
|
token: this.tokens.get(),
|
|
748
|
-
workspaceId: this.workspaceId
|
|
763
|
+
workspaceId: this.workspaceId,
|
|
764
|
+
bust: opts?.bust
|
|
749
765
|
});
|
|
750
766
|
}
|
|
751
767
|
addTag(customerId, tag) {
|
|
@@ -766,12 +782,13 @@ var CustomersClient = class {
|
|
|
766
782
|
});
|
|
767
783
|
}
|
|
768
784
|
// ── Relationships ────────────────────────────────────────────────────────────
|
|
769
|
-
listRelationships(customerId) {
|
|
785
|
+
listRelationships(customerId, opts) {
|
|
770
786
|
return this.http.request({
|
|
771
787
|
method: "GET",
|
|
772
788
|
path: `/customers/${customerId}/relationships`,
|
|
773
789
|
token: this.tokens.get(),
|
|
774
|
-
workspaceId: this.workspaceId
|
|
790
|
+
workspaceId: this.workspaceId,
|
|
791
|
+
bust: opts?.bust
|
|
775
792
|
});
|
|
776
793
|
}
|
|
777
794
|
addRelationship(customerId, input) {
|
|
@@ -804,12 +821,13 @@ var CustomersClient = class {
|
|
|
804
821
|
// looked up/created implicitly by addEmail/addPhone/addAddress's `label`
|
|
805
822
|
// string; these two methods are for managing the vocabulary directly
|
|
806
823
|
// (e.g. an admin screen listing/pruning unused labels).
|
|
807
|
-
listLabels(type) {
|
|
824
|
+
listLabels(type, opts) {
|
|
808
825
|
return this.http.request({
|
|
809
826
|
method: "GET",
|
|
810
827
|
path: `/customers/labels?type=${type}`,
|
|
811
828
|
token: this.tokens.get(),
|
|
812
|
-
workspaceId: this.workspaceId
|
|
829
|
+
workspaceId: this.workspaceId,
|
|
830
|
+
bust: opts?.bust
|
|
813
831
|
});
|
|
814
832
|
}
|
|
815
833
|
removeLabel(labelId) {
|
|
@@ -839,12 +857,13 @@ var WebhooksClient = class {
|
|
|
839
857
|
setWorkspaceId(workspaceId) {
|
|
840
858
|
this.workspaceId = workspaceId;
|
|
841
859
|
}
|
|
842
|
-
listEndpoints() {
|
|
860
|
+
listEndpoints(opts) {
|
|
843
861
|
return this.http.request({
|
|
844
862
|
method: "GET",
|
|
845
863
|
path: "/webhooks",
|
|
846
864
|
token: this.tokens.get(),
|
|
847
|
-
workspaceId: this.workspaceId
|
|
865
|
+
workspaceId: this.workspaceId,
|
|
866
|
+
bust: opts?.bust
|
|
848
867
|
});
|
|
849
868
|
}
|
|
850
869
|
// The response includes `secret` — shown once, at creation. There is no
|
|
@@ -858,12 +877,13 @@ var WebhooksClient = class {
|
|
|
858
877
|
workspaceId: this.workspaceId
|
|
859
878
|
});
|
|
860
879
|
}
|
|
861
|
-
getEndpoint(endpointId) {
|
|
880
|
+
getEndpoint(endpointId, opts) {
|
|
862
881
|
return this.http.request({
|
|
863
882
|
method: "GET",
|
|
864
883
|
path: `/webhooks/${endpointId}`,
|
|
865
884
|
token: this.tokens.get(),
|
|
866
|
-
workspaceId: this.workspaceId
|
|
885
|
+
workspaceId: this.workspaceId,
|
|
886
|
+
bust: opts?.bust
|
|
867
887
|
});
|
|
868
888
|
}
|
|
869
889
|
updateEndpoint(endpointId, input) {
|
|
@@ -883,12 +903,13 @@ var WebhooksClient = class {
|
|
|
883
903
|
workspaceId: this.workspaceId
|
|
884
904
|
});
|
|
885
905
|
}
|
|
886
|
-
listDeliveries(endpointId) {
|
|
906
|
+
listDeliveries(endpointId, opts) {
|
|
887
907
|
return this.http.request({
|
|
888
908
|
method: "GET",
|
|
889
909
|
path: `/webhooks/${endpointId}/deliveries`,
|
|
890
910
|
token: this.tokens.get(),
|
|
891
|
-
workspaceId: this.workspaceId
|
|
911
|
+
workspaceId: this.workspaceId,
|
|
912
|
+
bust: opts?.bust
|
|
892
913
|
});
|
|
893
914
|
}
|
|
894
915
|
testEndpoint(endpointId) {
|
|
@@ -919,11 +940,12 @@ var WorkspacesClient = class {
|
|
|
919
940
|
this.workspaceId = workspaceId;
|
|
920
941
|
}
|
|
921
942
|
// ── Workspace creation + listing ─────────────────────────────────────────────
|
|
922
|
-
listWorkspaces() {
|
|
943
|
+
listWorkspaces(opts) {
|
|
923
944
|
return this.http.request({
|
|
924
945
|
method: "GET",
|
|
925
946
|
path: "/workspaces",
|
|
926
|
-
token: this.tokens.get()
|
|
947
|
+
token: this.tokens.get(),
|
|
948
|
+
bust: opts?.bust
|
|
927
949
|
});
|
|
928
950
|
}
|
|
929
951
|
createWorkspace(input) {
|
|
@@ -934,11 +956,12 @@ var WorkspacesClient = class {
|
|
|
934
956
|
token: this.tokens.get()
|
|
935
957
|
});
|
|
936
958
|
}
|
|
937
|
-
getWorkspace(id) {
|
|
959
|
+
getWorkspace(id, opts) {
|
|
938
960
|
return this.http.request({
|
|
939
961
|
method: "GET",
|
|
940
962
|
path: `/workspaces/${id}`,
|
|
941
|
-
token: this.tokens.get()
|
|
963
|
+
token: this.tokens.get(),
|
|
964
|
+
bust: opts?.bust
|
|
942
965
|
});
|
|
943
966
|
}
|
|
944
967
|
updateWorkspace(input) {
|
|
@@ -968,12 +991,13 @@ var WorkspacesClient = class {
|
|
|
968
991
|
});
|
|
969
992
|
}
|
|
970
993
|
// ── Roles ────────────────────────────────────────────────────────────────────
|
|
971
|
-
listRoles() {
|
|
994
|
+
listRoles(opts) {
|
|
972
995
|
return this.http.request({
|
|
973
996
|
method: "GET",
|
|
974
997
|
path: "/workspaces/roles",
|
|
975
998
|
token: this.tokens.get(),
|
|
976
|
-
workspaceId: this.workspaceId
|
|
999
|
+
workspaceId: this.workspaceId,
|
|
1000
|
+
bust: opts?.bust
|
|
977
1001
|
});
|
|
978
1002
|
}
|
|
979
1003
|
createRole(input) {
|
|
@@ -985,12 +1009,13 @@ var WorkspacesClient = class {
|
|
|
985
1009
|
workspaceId: this.workspaceId
|
|
986
1010
|
});
|
|
987
1011
|
}
|
|
988
|
-
getRole(roleId) {
|
|
1012
|
+
getRole(roleId, opts) {
|
|
989
1013
|
return this.http.request({
|
|
990
1014
|
method: "GET",
|
|
991
1015
|
path: `/workspaces/roles/${roleId}`,
|
|
992
1016
|
token: this.tokens.get(),
|
|
993
|
-
workspaceId: this.workspaceId
|
|
1017
|
+
workspaceId: this.workspaceId,
|
|
1018
|
+
bust: opts?.bust
|
|
994
1019
|
});
|
|
995
1020
|
}
|
|
996
1021
|
updateRole(roleId, input) {
|
|
@@ -1010,12 +1035,13 @@ var WorkspacesClient = class {
|
|
|
1010
1035
|
workspaceId: this.workspaceId
|
|
1011
1036
|
});
|
|
1012
1037
|
}
|
|
1013
|
-
getRolePermissions(roleId) {
|
|
1038
|
+
getRolePermissions(roleId, opts) {
|
|
1014
1039
|
return this.http.request({
|
|
1015
1040
|
method: "GET",
|
|
1016
1041
|
path: `/workspaces/roles/${roleId}/permissions`,
|
|
1017
1042
|
token: this.tokens.get(),
|
|
1018
|
-
workspaceId: this.workspaceId
|
|
1043
|
+
workspaceId: this.workspaceId,
|
|
1044
|
+
bust: opts?.bust
|
|
1019
1045
|
});
|
|
1020
1046
|
}
|
|
1021
1047
|
setRolePermissions(roleId, permissions) {
|
|
@@ -1028,12 +1054,13 @@ var WorkspacesClient = class {
|
|
|
1028
1054
|
});
|
|
1029
1055
|
}
|
|
1030
1056
|
// ── Members ──────────────────────────────────────────────────────────────────
|
|
1031
|
-
listMembers() {
|
|
1057
|
+
listMembers(opts) {
|
|
1032
1058
|
return this.http.request({
|
|
1033
1059
|
method: "GET",
|
|
1034
1060
|
path: "/workspaces/members",
|
|
1035
1061
|
token: this.tokens.get(),
|
|
1036
|
-
workspaceId: this.workspaceId
|
|
1062
|
+
workspaceId: this.workspaceId,
|
|
1063
|
+
bust: opts?.bust
|
|
1037
1064
|
});
|
|
1038
1065
|
}
|
|
1039
1066
|
removeMember(userId) {
|
|
@@ -1044,12 +1071,13 @@ var WorkspacesClient = class {
|
|
|
1044
1071
|
workspaceId: this.workspaceId
|
|
1045
1072
|
});
|
|
1046
1073
|
}
|
|
1047
|
-
getMemberRoles(userId) {
|
|
1074
|
+
getMemberRoles(userId, opts) {
|
|
1048
1075
|
return this.http.request({
|
|
1049
1076
|
method: "GET",
|
|
1050
1077
|
path: `/workspaces/members/${userId}/roles`,
|
|
1051
1078
|
token: this.tokens.get(),
|
|
1052
|
-
workspaceId: this.workspaceId
|
|
1079
|
+
workspaceId: this.workspaceId,
|
|
1080
|
+
bust: opts?.bust
|
|
1053
1081
|
});
|
|
1054
1082
|
}
|
|
1055
1083
|
addMemberRole(userId, roleId) {
|
|
@@ -1070,12 +1098,13 @@ var WorkspacesClient = class {
|
|
|
1070
1098
|
});
|
|
1071
1099
|
}
|
|
1072
1100
|
// ── Invitations ──────────────────────────────────────────────────────────────
|
|
1073
|
-
listInvitations() {
|
|
1101
|
+
listInvitations(opts) {
|
|
1074
1102
|
return this.http.request({
|
|
1075
1103
|
method: "GET",
|
|
1076
1104
|
path: "/workspaces/invitations",
|
|
1077
1105
|
token: this.tokens.get(),
|
|
1078
|
-
workspaceId: this.workspaceId
|
|
1106
|
+
workspaceId: this.workspaceId,
|
|
1107
|
+
bust: opts?.bust
|
|
1079
1108
|
});
|
|
1080
1109
|
}
|
|
1081
1110
|
invite(entries) {
|
|
@@ -1104,12 +1133,13 @@ var WorkspacesClient = class {
|
|
|
1104
1133
|
});
|
|
1105
1134
|
}
|
|
1106
1135
|
// ── Settings ─────────────────────────────────────────────────────────────────
|
|
1107
|
-
getSettings() {
|
|
1136
|
+
getSettings(opts) {
|
|
1108
1137
|
return this.http.request({
|
|
1109
1138
|
method: "GET",
|
|
1110
1139
|
path: "/workspaces/settings",
|
|
1111
1140
|
token: this.tokens.get(),
|
|
1112
|
-
workspaceId: this.workspaceId
|
|
1141
|
+
workspaceId: this.workspaceId,
|
|
1142
|
+
bust: opts?.bust
|
|
1113
1143
|
});
|
|
1114
1144
|
}
|
|
1115
1145
|
updateSettings(input) {
|