@fonderie/client 0.10.0 → 0.12.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/dist/index.d.cts CHANGED
@@ -26,6 +26,7 @@ interface IRequestOptions {
26
26
  token?: string | undefined;
27
27
  cookie?: string | undefined;
28
28
  workspaceId?: string | undefined;
29
+ headers?: Record<string, string> | undefined;
29
30
  cache?: number | false | undefined;
30
31
  bust?: boolean | undefined;
31
32
  invalidate?: string[] | undefined;
@@ -79,10 +80,6 @@ interface IUserPreferences {
79
80
  dateFormat: string;
80
81
  timeFormat: string;
81
82
  }
82
- interface IUserSkill {
83
- name: string;
84
- level: string;
85
- }
86
83
  interface IUserDTO {
87
84
  id: string;
88
85
  email: string;
@@ -92,9 +89,9 @@ interface IUserDTO {
92
89
  profileImageUrl: string;
93
90
  isActive: boolean;
94
91
  lastLogin: string;
95
- skills: IUserSkill[];
96
92
  preferences: IUserPreferences;
97
93
  isEmailVerified: boolean;
94
+ isPhoneVerified: boolean;
98
95
  mfaEnabled: boolean;
99
96
  suspended: boolean;
100
97
  whitelist: boolean;
@@ -109,10 +106,12 @@ interface ITokens {
109
106
  interface IRegisterResult {
110
107
  tokens: ITokens;
111
108
  user: IUserDTO;
109
+ requiresVerification?: boolean;
112
110
  }
113
111
  interface ILoginResult {
114
112
  tokens: ITokens;
115
113
  user: IUserDTO;
114
+ requiresVerification?: boolean;
116
115
  }
117
116
  interface IMfaRequiredResult {
118
117
  mfaToken: string;
@@ -126,13 +125,8 @@ interface IVerifyEmailResult {
126
125
  email: string;
127
126
  }
128
127
  interface IResendVerificationResult {
129
- stat: string;
130
- message: string;
131
- data: {
132
- token: string;
133
- expiresAt: string;
134
- email: string;
135
- };
128
+ email?: string;
129
+ verified?: boolean;
136
130
  }
137
131
  interface IMeResult {
138
132
  user: IUserDTO;
@@ -142,8 +136,7 @@ interface IMfaSetupResult {
142
136
  backupCodes: string[];
143
137
  }
144
138
  interface IMfaEnabledResult {
145
- tokens: ITokens;
146
- user: IUserDTO;
139
+ mfaEnabled: boolean;
147
140
  }
148
141
  interface IPlanFeature {
149
142
  name: string;
@@ -164,6 +157,9 @@ interface IPlanDTO {
164
157
  yearly: number;
165
158
  currency: string;
166
159
  };
160
+ /** True when pricing came from a stale cache — a provider outage or a
161
+ * transfer window. Show prices as indicative when set. */
162
+ pricingStale?: boolean;
167
163
  features: IPlanFeature[];
168
164
  metadata: Record<string, unknown>;
169
165
  }
@@ -201,6 +197,18 @@ interface IUsageResult {
201
197
  total: number;
202
198
  since: string;
203
199
  }
200
+ interface IWalletDTO {
201
+ balance: string;
202
+ currency: string;
203
+ precision: number;
204
+ granted?: string;
205
+ purchased?: string;
206
+ spendPurchased?: boolean;
207
+ grantedExpiresAt?: string | null;
208
+ }
209
+ interface IWalletResult {
210
+ wallet: IWalletDTO;
211
+ }
204
212
  interface IWorkspaceAddressDTO {
205
213
  line1: string;
206
214
  line2: string;
@@ -224,6 +232,7 @@ interface IWorkspaceDTO {
224
232
  isPersonal: boolean;
225
233
  isArchived: boolean;
226
234
  archivedAt: string;
235
+ archivedBy: string;
227
236
  createdAt: string;
228
237
  updatedAt: string;
229
238
  }
@@ -242,6 +251,11 @@ interface IMemberDTO {
242
251
  roleName: string;
243
252
  confirmed: boolean;
244
253
  createdAt: string;
254
+ /** Identity, so a member list can be rendered without a second request. */
255
+ email: string;
256
+ firstName: string;
257
+ lastName: string;
258
+ profileImageUrl: string;
245
259
  }
246
260
  interface IInvitationDTO {
247
261
  id: string;
@@ -376,7 +390,10 @@ interface IWebhookDeliveryDTO {
376
390
  eventType: string;
377
391
  status: string;
378
392
  attempts: number;
393
+ payload: Record<string, unknown>;
379
394
  responseStatus: number | null;
395
+ responseBody: string | null;
396
+ nextAttemptAt: string | null;
380
397
  deliveredAt: string | null;
381
398
  createdAt: string;
382
399
  }
@@ -418,6 +435,7 @@ interface ICustomerEmailDTO {
418
435
  id: string;
419
436
  email: string;
420
437
  label: string;
438
+ labelId: string | null;
421
439
  isPrimary: boolean;
422
440
  createdAt: string;
423
441
  }
@@ -425,6 +443,7 @@ interface ICustomerPhoneDTO {
425
443
  id: string;
426
444
  phone: string;
427
445
  label: string;
446
+ labelId: string | null;
428
447
  isPrimary: boolean;
429
448
  createdAt: string;
430
449
  }
@@ -440,6 +459,7 @@ interface IAddressDTO {
440
459
  interface ICustomerAddressDTO {
441
460
  id: string;
442
461
  label: string;
462
+ labelId: string | null;
443
463
  isPrimary: boolean;
444
464
  address: IAddressDTO;
445
465
  }
@@ -462,6 +482,7 @@ type ICustomerRelationshipExpandedDTO = Omit<ICustomerShallowDTO, 'id'> & {
462
482
  customerId: string;
463
483
  relationship: string;
464
484
  isPrimary: boolean;
485
+ relationshipCreatedAt: string;
465
486
  };
466
487
  type ICustomerRelationshipExpandedD2DTO = ICustomerRelationshipExpandedDTO & {
467
488
  relationships: ICustomerRelationshipExpandedDTO[];
@@ -567,17 +588,22 @@ interface IResetPasswordInput {
567
588
  password: string;
568
589
  }
569
590
  interface IUpdateProfileInput {
570
- firstName?: string;
571
- lastName?: string;
572
- avatarUrl?: string;
591
+ firstName?: string | null;
592
+ lastName?: string | null;
593
+ avatarUrl?: string | null;
573
594
  }
574
595
  interface IUpdatePreferencesInput {
575
596
  locale?: string;
576
597
  timezone?: string;
577
- notifications?: unknown;
578
- emailDigest?: unknown;
579
- dateFormat?: unknown;
580
- timeFormat?: unknown;
598
+ notifications?: {
599
+ email?: boolean;
600
+ inApp?: boolean;
601
+ sms?: boolean;
602
+ push?: boolean;
603
+ };
604
+ emailDigest?: string;
605
+ dateFormat?: string;
606
+ timeFormat?: string;
581
607
  }
582
608
  interface IChangePasswordInput {
583
609
  currentPassword: string;
@@ -627,6 +653,9 @@ interface IRecordUsageInput {
627
653
  metric: string;
628
654
  quantity?: number;
629
655
  }
656
+ interface IWalletPreferencesInput {
657
+ spendPurchased: boolean;
658
+ }
630
659
  interface ICreatePlanInput {
631
660
  name: string;
632
661
  description?: string | null;
@@ -658,6 +687,8 @@ declare class BillingClient {
658
687
  createPortalSession(): Promise<IApiResponse<IPortalUrlResult>>;
659
688
  recordUsage(input: IRecordUsageInput): Promise<IApiResponse<undefined>>;
660
689
  getUsage(metric: string, opts?: IReadOptions): Promise<IApiResponse<IUsageResult>>;
690
+ getWallet(opts?: IReadOptions): Promise<IApiResponse<IWalletResult>>;
691
+ setWalletPreferences(input: IWalletPreferencesInput): Promise<IApiResponse<IWalletResult>>;
661
692
  }
662
693
 
663
694
  interface IListCustomersInput {
@@ -681,7 +712,7 @@ interface ICreateCustomerInput {
681
712
  referralCode?: string | null;
682
713
  referredByCode?: string | null;
683
714
  }
684
- type IUpdateCustomerInput = ICreateCustomerInput;
715
+ type IUpdateCustomerInput = Omit<ICreateCustomerInput, 'referralCode' | 'referredByCode'>;
685
716
  interface IBlacklistCustomerInput {
686
717
  reason?: string;
687
718
  }
@@ -708,7 +739,7 @@ interface IAddAddressInput {
708
739
  }
709
740
  interface IAddRelationshipInput {
710
741
  relatedId: string;
711
- relationship?: string;
742
+ relationship: string;
712
743
  isPrimary?: boolean;
713
744
  }
714
745
  declare class CustomersClient {
@@ -927,11 +958,13 @@ declare class FonderieClient {
927
958
  interface ISetConfigInput {
928
959
  value: unknown;
929
960
  description?: string;
961
+ active?: boolean;
930
962
  ifVersion?: number;
931
963
  }
932
964
  interface ISetSecretInput {
933
965
  value: string;
934
966
  description?: string;
967
+ active?: boolean;
935
968
  ifVersion?: number;
936
969
  }
937
970
  interface IRollbackInput {
@@ -940,10 +973,12 @@ interface IRollbackInput {
940
973
  interface IConfigAdminClientOptions {
941
974
  baseUrl: string;
942
975
  adminToken: string;
976
+ actor?: string;
943
977
  }
944
978
  declare class ConfigAdminClient {
945
979
  private http;
946
980
  private adminToken;
981
+ private actorHeaders;
947
982
  constructor(opts: IConfigAdminClientOptions);
948
983
  listConfig(environment?: string): Promise<IApiResponse<IConfigEntry[]>>;
949
984
  getConfig(key: string, environment?: string): Promise<IApiResponse<IConfigEntry>>;
@@ -973,10 +1008,12 @@ interface IRollbackTemplateInput {
973
1008
  interface ICourierAdminClientOptions {
974
1009
  baseUrl: string;
975
1010
  adminToken: string;
1011
+ actor?: string;
976
1012
  }
977
1013
  declare class CourierAdminClient {
978
1014
  private http;
979
1015
  private adminToken;
1016
+ private actorHeaders;
980
1017
  constructor(opts: ICourierAdminClientOptions);
981
1018
  listTemplates(): Promise<IApiResponse<ITemplateEntry[]>>;
982
1019
  getTemplate(type: string, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
@@ -986,4 +1023,4 @@ declare class CourierAdminClient {
986
1023
  rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
987
1024
  }
988
1025
 
989
- export { AuditClient, AuthClient, BillingClient, ConfigAdminClient, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, FonderieApiError, FonderieClient, type IAcceptInvitationResult, type IAddAddressInput, type IAddEmailInput, type IAddPhoneInput, type IAddRelationshipInput, type IAddressDTO, type IApiError, type IApiResponse, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type IChangePasswordInput, type ICheckoutInput, type ICheckoutUrlResult, type IClientAuthConfig, type IConfigAdminClientOptions, type IConfigEntry, type IConfigRevision, type ICourierAdminClientOptions, type ICreateCustomerInput, type ICreatePlanInput, type ICreateRoleInput, type ICreateWebhookEndpointInput, type ICreateWorkspaceInput, type ICustomerAddressDTO, type ICustomerAddressListResult, type ICustomerAddressResult, type ICustomerDTO, type ICustomerDetailD2DTO, type ICustomerDetailDTO, type ICustomerEmailDTO, type ICustomerEmailListResult, type ICustomerEmailResult, type ICustomerLabelDTO, type ICustomerLabelListResult, type ICustomerListResult, type ICustomerNoteDTO, type ICustomerNoteListResult, type ICustomerNoteResult, type ICustomerPhoneDTO, type ICustomerPhoneListResult, type ICustomerPhoneResult, type ICustomerRelationshipDTO, type ICustomerRelationshipExpandedD2DTO, type ICustomerRelationshipExpandedDTO, type ICustomerRelationshipListResult, type ICustomerRelationshipResult, type ICustomerResult, type ICustomerShallowDTO, type ICustomerTagListResult, type IFonderieClientOptions, type IGetCustomerInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginInput, type ILoginResult, type IMeResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPlanDTO, type IPlanFeature, type IPlanListResult, type IPlanResult, type IPortalUrlResult, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRequestConfig, type IResendVerificationResult, type IResetPasswordInput, type IRevealSecretResult, type IRoleDTO, type IRoleListResult, type IRolePermission, type IRolePermissionInput, type IRolePermissionsResult, type IRoleResult, type IRollbackInput, type IRollbackTemplateInput, type ISecretEntry, type ISecretRevision, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionDTO, type ISubscriptionResult, type ITemplateEntry, type ITemplateRevision, type ITestWebhookResult, type ITokens, type IUpdateCustomerInput, type IUpdatePlanInput, type IUpdatePreferencesInput, type IUpdateProfileInput, type IUpdateRoleInput, type IUpdateSettingsInput, type IUpdateWebhookEndpointInput, type IUpdateWorkspaceInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IUserSkill, type IVerifyEmailResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
1026
+ export { AuditClient, AuthClient, BillingClient, ConfigAdminClient, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, FonderieApiError, FonderieClient, type IAcceptInvitationResult, type IAddAddressInput, type IAddEmailInput, type IAddPhoneInput, type IAddRelationshipInput, type IAddressDTO, type IApiError, type IApiResponse, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type IChangePasswordInput, type ICheckoutInput, type ICheckoutUrlResult, type IClientAuthConfig, type IConfigAdminClientOptions, type IConfigEntry, type IConfigRevision, type ICourierAdminClientOptions, type ICreateCustomerInput, type ICreatePlanInput, type ICreateRoleInput, type ICreateWebhookEndpointInput, type ICreateWorkspaceInput, type ICustomerAddressDTO, type ICustomerAddressListResult, type ICustomerAddressResult, type ICustomerDTO, type ICustomerDetailD2DTO, type ICustomerDetailDTO, type ICustomerEmailDTO, type ICustomerEmailListResult, type ICustomerEmailResult, type ICustomerLabelDTO, type ICustomerLabelListResult, type ICustomerListResult, type ICustomerNoteDTO, type ICustomerNoteListResult, type ICustomerNoteResult, type ICustomerPhoneDTO, type ICustomerPhoneListResult, type ICustomerPhoneResult, type ICustomerRelationshipDTO, type ICustomerRelationshipExpandedD2DTO, type ICustomerRelationshipExpandedDTO, type ICustomerRelationshipListResult, type ICustomerRelationshipResult, type ICustomerResult, type ICustomerShallowDTO, type ICustomerTagListResult, type IFonderieClientOptions, type IGetCustomerInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginInput, type ILoginResult, type IMeResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPlanDTO, type IPlanFeature, type IPlanListResult, type IPlanResult, type IPortalUrlResult, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRequestConfig, type IResendVerificationResult, type IResetPasswordInput, type IRevealSecretResult, type IRoleDTO, type IRoleListResult, type IRolePermission, type IRolePermissionInput, type IRolePermissionsResult, type IRoleResult, type IRollbackInput, type IRollbackTemplateInput, type ISecretEntry, type ISecretRevision, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionDTO, type ISubscriptionResult, type ITemplateEntry, type ITemplateRevision, type ITestWebhookResult, type ITokens, type IUpdateCustomerInput, type IUpdatePlanInput, type IUpdatePreferencesInput, type IUpdateProfileInput, type IUpdateRoleInput, type IUpdateSettingsInput, type IUpdateWebhookEndpointInput, type IUpdateWorkspaceInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletDTO, type IWalletPreferencesInput, type IWalletResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
package/dist/index.d.ts CHANGED
@@ -26,6 +26,7 @@ interface IRequestOptions {
26
26
  token?: string | undefined;
27
27
  cookie?: string | undefined;
28
28
  workspaceId?: string | undefined;
29
+ headers?: Record<string, string> | undefined;
29
30
  cache?: number | false | undefined;
30
31
  bust?: boolean | undefined;
31
32
  invalidate?: string[] | undefined;
@@ -79,10 +80,6 @@ interface IUserPreferences {
79
80
  dateFormat: string;
80
81
  timeFormat: string;
81
82
  }
82
- interface IUserSkill {
83
- name: string;
84
- level: string;
85
- }
86
83
  interface IUserDTO {
87
84
  id: string;
88
85
  email: string;
@@ -92,9 +89,9 @@ interface IUserDTO {
92
89
  profileImageUrl: string;
93
90
  isActive: boolean;
94
91
  lastLogin: string;
95
- skills: IUserSkill[];
96
92
  preferences: IUserPreferences;
97
93
  isEmailVerified: boolean;
94
+ isPhoneVerified: boolean;
98
95
  mfaEnabled: boolean;
99
96
  suspended: boolean;
100
97
  whitelist: boolean;
@@ -109,10 +106,12 @@ interface ITokens {
109
106
  interface IRegisterResult {
110
107
  tokens: ITokens;
111
108
  user: IUserDTO;
109
+ requiresVerification?: boolean;
112
110
  }
113
111
  interface ILoginResult {
114
112
  tokens: ITokens;
115
113
  user: IUserDTO;
114
+ requiresVerification?: boolean;
116
115
  }
117
116
  interface IMfaRequiredResult {
118
117
  mfaToken: string;
@@ -126,13 +125,8 @@ interface IVerifyEmailResult {
126
125
  email: string;
127
126
  }
128
127
  interface IResendVerificationResult {
129
- stat: string;
130
- message: string;
131
- data: {
132
- token: string;
133
- expiresAt: string;
134
- email: string;
135
- };
128
+ email?: string;
129
+ verified?: boolean;
136
130
  }
137
131
  interface IMeResult {
138
132
  user: IUserDTO;
@@ -142,8 +136,7 @@ interface IMfaSetupResult {
142
136
  backupCodes: string[];
143
137
  }
144
138
  interface IMfaEnabledResult {
145
- tokens: ITokens;
146
- user: IUserDTO;
139
+ mfaEnabled: boolean;
147
140
  }
148
141
  interface IPlanFeature {
149
142
  name: string;
@@ -164,6 +157,9 @@ interface IPlanDTO {
164
157
  yearly: number;
165
158
  currency: string;
166
159
  };
160
+ /** True when pricing came from a stale cache — a provider outage or a
161
+ * transfer window. Show prices as indicative when set. */
162
+ pricingStale?: boolean;
167
163
  features: IPlanFeature[];
168
164
  metadata: Record<string, unknown>;
169
165
  }
@@ -201,6 +197,18 @@ interface IUsageResult {
201
197
  total: number;
202
198
  since: string;
203
199
  }
200
+ interface IWalletDTO {
201
+ balance: string;
202
+ currency: string;
203
+ precision: number;
204
+ granted?: string;
205
+ purchased?: string;
206
+ spendPurchased?: boolean;
207
+ grantedExpiresAt?: string | null;
208
+ }
209
+ interface IWalletResult {
210
+ wallet: IWalletDTO;
211
+ }
204
212
  interface IWorkspaceAddressDTO {
205
213
  line1: string;
206
214
  line2: string;
@@ -224,6 +232,7 @@ interface IWorkspaceDTO {
224
232
  isPersonal: boolean;
225
233
  isArchived: boolean;
226
234
  archivedAt: string;
235
+ archivedBy: string;
227
236
  createdAt: string;
228
237
  updatedAt: string;
229
238
  }
@@ -242,6 +251,11 @@ interface IMemberDTO {
242
251
  roleName: string;
243
252
  confirmed: boolean;
244
253
  createdAt: string;
254
+ /** Identity, so a member list can be rendered without a second request. */
255
+ email: string;
256
+ firstName: string;
257
+ lastName: string;
258
+ profileImageUrl: string;
245
259
  }
246
260
  interface IInvitationDTO {
247
261
  id: string;
@@ -376,7 +390,10 @@ interface IWebhookDeliveryDTO {
376
390
  eventType: string;
377
391
  status: string;
378
392
  attempts: number;
393
+ payload: Record<string, unknown>;
379
394
  responseStatus: number | null;
395
+ responseBody: string | null;
396
+ nextAttemptAt: string | null;
380
397
  deliveredAt: string | null;
381
398
  createdAt: string;
382
399
  }
@@ -418,6 +435,7 @@ interface ICustomerEmailDTO {
418
435
  id: string;
419
436
  email: string;
420
437
  label: string;
438
+ labelId: string | null;
421
439
  isPrimary: boolean;
422
440
  createdAt: string;
423
441
  }
@@ -425,6 +443,7 @@ interface ICustomerPhoneDTO {
425
443
  id: string;
426
444
  phone: string;
427
445
  label: string;
446
+ labelId: string | null;
428
447
  isPrimary: boolean;
429
448
  createdAt: string;
430
449
  }
@@ -440,6 +459,7 @@ interface IAddressDTO {
440
459
  interface ICustomerAddressDTO {
441
460
  id: string;
442
461
  label: string;
462
+ labelId: string | null;
443
463
  isPrimary: boolean;
444
464
  address: IAddressDTO;
445
465
  }
@@ -462,6 +482,7 @@ type ICustomerRelationshipExpandedDTO = Omit<ICustomerShallowDTO, 'id'> & {
462
482
  customerId: string;
463
483
  relationship: string;
464
484
  isPrimary: boolean;
485
+ relationshipCreatedAt: string;
465
486
  };
466
487
  type ICustomerRelationshipExpandedD2DTO = ICustomerRelationshipExpandedDTO & {
467
488
  relationships: ICustomerRelationshipExpandedDTO[];
@@ -567,17 +588,22 @@ interface IResetPasswordInput {
567
588
  password: string;
568
589
  }
569
590
  interface IUpdateProfileInput {
570
- firstName?: string;
571
- lastName?: string;
572
- avatarUrl?: string;
591
+ firstName?: string | null;
592
+ lastName?: string | null;
593
+ avatarUrl?: string | null;
573
594
  }
574
595
  interface IUpdatePreferencesInput {
575
596
  locale?: string;
576
597
  timezone?: string;
577
- notifications?: unknown;
578
- emailDigest?: unknown;
579
- dateFormat?: unknown;
580
- timeFormat?: unknown;
598
+ notifications?: {
599
+ email?: boolean;
600
+ inApp?: boolean;
601
+ sms?: boolean;
602
+ push?: boolean;
603
+ };
604
+ emailDigest?: string;
605
+ dateFormat?: string;
606
+ timeFormat?: string;
581
607
  }
582
608
  interface IChangePasswordInput {
583
609
  currentPassword: string;
@@ -627,6 +653,9 @@ interface IRecordUsageInput {
627
653
  metric: string;
628
654
  quantity?: number;
629
655
  }
656
+ interface IWalletPreferencesInput {
657
+ spendPurchased: boolean;
658
+ }
630
659
  interface ICreatePlanInput {
631
660
  name: string;
632
661
  description?: string | null;
@@ -658,6 +687,8 @@ declare class BillingClient {
658
687
  createPortalSession(): Promise<IApiResponse<IPortalUrlResult>>;
659
688
  recordUsage(input: IRecordUsageInput): Promise<IApiResponse<undefined>>;
660
689
  getUsage(metric: string, opts?: IReadOptions): Promise<IApiResponse<IUsageResult>>;
690
+ getWallet(opts?: IReadOptions): Promise<IApiResponse<IWalletResult>>;
691
+ setWalletPreferences(input: IWalletPreferencesInput): Promise<IApiResponse<IWalletResult>>;
661
692
  }
662
693
 
663
694
  interface IListCustomersInput {
@@ -681,7 +712,7 @@ interface ICreateCustomerInput {
681
712
  referralCode?: string | null;
682
713
  referredByCode?: string | null;
683
714
  }
684
- type IUpdateCustomerInput = ICreateCustomerInput;
715
+ type IUpdateCustomerInput = Omit<ICreateCustomerInput, 'referralCode' | 'referredByCode'>;
685
716
  interface IBlacklistCustomerInput {
686
717
  reason?: string;
687
718
  }
@@ -708,7 +739,7 @@ interface IAddAddressInput {
708
739
  }
709
740
  interface IAddRelationshipInput {
710
741
  relatedId: string;
711
- relationship?: string;
742
+ relationship: string;
712
743
  isPrimary?: boolean;
713
744
  }
714
745
  declare class CustomersClient {
@@ -927,11 +958,13 @@ declare class FonderieClient {
927
958
  interface ISetConfigInput {
928
959
  value: unknown;
929
960
  description?: string;
961
+ active?: boolean;
930
962
  ifVersion?: number;
931
963
  }
932
964
  interface ISetSecretInput {
933
965
  value: string;
934
966
  description?: string;
967
+ active?: boolean;
935
968
  ifVersion?: number;
936
969
  }
937
970
  interface IRollbackInput {
@@ -940,10 +973,12 @@ interface IRollbackInput {
940
973
  interface IConfigAdminClientOptions {
941
974
  baseUrl: string;
942
975
  adminToken: string;
976
+ actor?: string;
943
977
  }
944
978
  declare class ConfigAdminClient {
945
979
  private http;
946
980
  private adminToken;
981
+ private actorHeaders;
947
982
  constructor(opts: IConfigAdminClientOptions);
948
983
  listConfig(environment?: string): Promise<IApiResponse<IConfigEntry[]>>;
949
984
  getConfig(key: string, environment?: string): Promise<IApiResponse<IConfigEntry>>;
@@ -973,10 +1008,12 @@ interface IRollbackTemplateInput {
973
1008
  interface ICourierAdminClientOptions {
974
1009
  baseUrl: string;
975
1010
  adminToken: string;
1011
+ actor?: string;
976
1012
  }
977
1013
  declare class CourierAdminClient {
978
1014
  private http;
979
1015
  private adminToken;
1016
+ private actorHeaders;
980
1017
  constructor(opts: ICourierAdminClientOptions);
981
1018
  listTemplates(): Promise<IApiResponse<ITemplateEntry[]>>;
982
1019
  getTemplate(type: string, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
@@ -986,4 +1023,4 @@ declare class CourierAdminClient {
986
1023
  rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
987
1024
  }
988
1025
 
989
- export { AuditClient, AuthClient, BillingClient, ConfigAdminClient, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, FonderieApiError, FonderieClient, type IAcceptInvitationResult, type IAddAddressInput, type IAddEmailInput, type IAddPhoneInput, type IAddRelationshipInput, type IAddressDTO, type IApiError, type IApiResponse, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type IChangePasswordInput, type ICheckoutInput, type ICheckoutUrlResult, type IClientAuthConfig, type IConfigAdminClientOptions, type IConfigEntry, type IConfigRevision, type ICourierAdminClientOptions, type ICreateCustomerInput, type ICreatePlanInput, type ICreateRoleInput, type ICreateWebhookEndpointInput, type ICreateWorkspaceInput, type ICustomerAddressDTO, type ICustomerAddressListResult, type ICustomerAddressResult, type ICustomerDTO, type ICustomerDetailD2DTO, type ICustomerDetailDTO, type ICustomerEmailDTO, type ICustomerEmailListResult, type ICustomerEmailResult, type ICustomerLabelDTO, type ICustomerLabelListResult, type ICustomerListResult, type ICustomerNoteDTO, type ICustomerNoteListResult, type ICustomerNoteResult, type ICustomerPhoneDTO, type ICustomerPhoneListResult, type ICustomerPhoneResult, type ICustomerRelationshipDTO, type ICustomerRelationshipExpandedD2DTO, type ICustomerRelationshipExpandedDTO, type ICustomerRelationshipListResult, type ICustomerRelationshipResult, type ICustomerResult, type ICustomerShallowDTO, type ICustomerTagListResult, type IFonderieClientOptions, type IGetCustomerInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginInput, type ILoginResult, type IMeResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPlanDTO, type IPlanFeature, type IPlanListResult, type IPlanResult, type IPortalUrlResult, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRequestConfig, type IResendVerificationResult, type IResetPasswordInput, type IRevealSecretResult, type IRoleDTO, type IRoleListResult, type IRolePermission, type IRolePermissionInput, type IRolePermissionsResult, type IRoleResult, type IRollbackInput, type IRollbackTemplateInput, type ISecretEntry, type ISecretRevision, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionDTO, type ISubscriptionResult, type ITemplateEntry, type ITemplateRevision, type ITestWebhookResult, type ITokens, type IUpdateCustomerInput, type IUpdatePlanInput, type IUpdatePreferencesInput, type IUpdateProfileInput, type IUpdateRoleInput, type IUpdateSettingsInput, type IUpdateWebhookEndpointInput, type IUpdateWorkspaceInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IUserSkill, type IVerifyEmailResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
1026
+ export { AuditClient, AuthClient, BillingClient, ConfigAdminClient, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, FonderieApiError, FonderieClient, type IAcceptInvitationResult, type IAddAddressInput, type IAddEmailInput, type IAddPhoneInput, type IAddRelationshipInput, type IAddressDTO, type IApiError, type IApiResponse, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type IChangePasswordInput, type ICheckoutInput, type ICheckoutUrlResult, type IClientAuthConfig, type IConfigAdminClientOptions, type IConfigEntry, type IConfigRevision, type ICourierAdminClientOptions, type ICreateCustomerInput, type ICreatePlanInput, type ICreateRoleInput, type ICreateWebhookEndpointInput, type ICreateWorkspaceInput, type ICustomerAddressDTO, type ICustomerAddressListResult, type ICustomerAddressResult, type ICustomerDTO, type ICustomerDetailD2DTO, type ICustomerDetailDTO, type ICustomerEmailDTO, type ICustomerEmailListResult, type ICustomerEmailResult, type ICustomerLabelDTO, type ICustomerLabelListResult, type ICustomerListResult, type ICustomerNoteDTO, type ICustomerNoteListResult, type ICustomerNoteResult, type ICustomerPhoneDTO, type ICustomerPhoneListResult, type ICustomerPhoneResult, type ICustomerRelationshipDTO, type ICustomerRelationshipExpandedD2DTO, type ICustomerRelationshipExpandedDTO, type ICustomerRelationshipListResult, type ICustomerRelationshipResult, type ICustomerResult, type ICustomerShallowDTO, type ICustomerTagListResult, type IFonderieClientOptions, type IGetCustomerInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginInput, type ILoginResult, type IMeResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPlanDTO, type IPlanFeature, type IPlanListResult, type IPlanResult, type IPortalUrlResult, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRequestConfig, type IResendVerificationResult, type IResetPasswordInput, type IRevealSecretResult, type IRoleDTO, type IRoleListResult, type IRolePermission, type IRolePermissionInput, type IRolePermissionsResult, type IRoleResult, type IRollbackInput, type IRollbackTemplateInput, type ISecretEntry, type ISecretRevision, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionDTO, type ISubscriptionResult, type ITemplateEntry, type ITemplateRevision, type ITestWebhookResult, type ITokens, type IUpdateCustomerInput, type IUpdatePlanInput, type IUpdatePreferencesInput, type IUpdateProfileInput, type IUpdateRoleInput, type IUpdateSettingsInput, type IUpdateWebhookEndpointInput, type IUpdateWorkspaceInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletDTO, type IWalletPreferencesInput, type IWalletResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };