@fonderie/client 0.24.0 → 0.26.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
@@ -502,6 +502,9 @@ interface IAdminLogPage {
502
502
  entries: IAdminLogEntry[];
503
503
  next: string | null;
504
504
  }
505
+ interface IAdminUserDTO extends IUserDTO {
506
+ deletedAt: string | null;
507
+ }
505
508
  interface IConfigEntry {
506
509
  key: string;
507
510
  value: unknown;
@@ -1260,13 +1263,16 @@ interface IRollbackInput {
1260
1263
  interface IConfigAdminClientOptions {
1261
1264
  baseUrl: string;
1262
1265
  adminToken: string;
1266
+ prefix?: string;
1263
1267
  actor?: string;
1264
1268
  }
1265
1269
  declare class ConfigAdminClient {
1266
1270
  private http;
1267
1271
  private adminToken;
1272
+ private prefix;
1268
1273
  private actorHeaders;
1269
1274
  constructor(opts: IConfigAdminClientOptions);
1275
+ private rebase;
1270
1276
  listConfig(environment?: string): Promise<IApiResponse<IConfigEntry[]>>;
1271
1277
  getConfig(key: string, environment?: string): Promise<IApiResponse<IConfigEntry>>;
1272
1278
  setConfig(key: string, input: ISetConfigInput, environment?: string): Promise<IApiResponse<IConfigEntry>>;
@@ -1308,6 +1314,32 @@ declare class AdminClient {
1308
1314
  adminLog(query?: IAdminLogQuery): Promise<IApiResponse<IAdminLogPage>>;
1309
1315
  }
1310
1316
 
1317
+ interface IAuthAdminClientOptions {
1318
+ baseUrl: string;
1319
+ adminToken: string;
1320
+ prefix?: string;
1321
+ actor?: string;
1322
+ }
1323
+ interface IAdminLoginHistoryQuery {
1324
+ limit?: number;
1325
+ cursor?: string;
1326
+ }
1327
+ declare class AuthAdminClient {
1328
+ private http;
1329
+ private adminToken;
1330
+ private prefix;
1331
+ private actorHeaders;
1332
+ constructor(opts: IAuthAdminClientOptions);
1333
+ private call;
1334
+ findUser(email: string): Promise<IApiResponse<IAdminUserDTO>>;
1335
+ getUser(id: string): Promise<IApiResponse<IAdminUserDTO>>;
1336
+ listUserSessions(id: string): Promise<IApiResponse<ISessionDTO[]>>;
1337
+ revokeUserSessions(id: string): Promise<IApiResponse<undefined>>;
1338
+ userLoginHistory(id: string, query?: IAdminLoginHistoryQuery): Promise<IApiResponse<ILoginHistoryPageResult>>;
1339
+ suspendUser(id: string): Promise<IApiResponse<IAdminUserDTO>>;
1340
+ unsuspendUser(id: string): Promise<IApiResponse<IAdminUserDTO>>;
1341
+ }
1342
+
1311
1343
  interface ISetTemplateInput {
1312
1344
  text: string;
1313
1345
  subject?: string;
@@ -1321,13 +1353,16 @@ interface IRollbackTemplateInput {
1321
1353
  interface ICourierAdminClientOptions {
1322
1354
  baseUrl: string;
1323
1355
  adminToken: string;
1356
+ prefix?: string;
1324
1357
  actor?: string;
1325
1358
  }
1326
1359
  declare class CourierAdminClient {
1327
1360
  private http;
1328
1361
  private adminToken;
1362
+ private prefix;
1329
1363
  private actorHeaders;
1330
1364
  constructor(opts: ICourierAdminClientOptions);
1365
+ private rebase;
1331
1366
  listTemplates(): Promise<IApiResponse<ITemplateEntry[]>>;
1332
1367
  getTemplate(type: string, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
1333
1368
  setTemplate(type: string, input: ISetTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
@@ -1336,4 +1371,4 @@ declare class CourierAdminClient {
1336
1371
  rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
1337
1372
  }
1338
1373
 
1339
- export { AdminClient, type AdminRouteGuard, 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 IAdminAttention, type IAdminAttentionItem, type IAdminCheckResult, type IAdminClientOptions, type IAdminConfigReport, type IAdminDoctorReport, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminManifest, type IAdminModuleEntry, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminTokensReport, type IApiError, type IApiResponse, type IAppleNativeInput, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type ICancelSubscriptionInput, 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 IGetLoginHistoryInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IInvoiceDTO, type IInvoicesResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginEventDTO, type ILoginHistoryPageResult, type ILoginInput, type ILoginResult, type IMeResult, type IMediaAssetDTO, type IMediaAssetResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPaymentMethodDTO, type IPaymentMethodResult, 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 ISessionDTO, type ISessionsResult, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionChangeResult, 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 IUploadMediaInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletCheckoutInput, type IWalletDTO, type IWalletPreferencesInput, type IWalletPurchaseInput, type IWalletPurchaseResult, type IWalletResult, type IWalletTransactionDTO, type IWalletTransactionsResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, MediaClient, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
1374
+ export { AdminClient, type AdminRouteGuard, AuditClient, AuthAdminClient, 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 IAdminAttention, type IAdminAttentionItem, type IAdminCheckResult, type IAdminClientOptions, type IAdminConfigReport, type IAdminDoctorReport, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminModuleEntry, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminTokensReport, type IAdminUserDTO, type IApiError, type IApiResponse, type IAppleNativeInput, type IAuditEventDTO, type IAuditPageResult, type IAuthAdminClientOptions, type IBlacklistCustomerInput, type ICache, type ICancelSubscriptionInput, 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 IGetLoginHistoryInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IInvoiceDTO, type IInvoicesResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginEventDTO, type ILoginHistoryPageResult, type ILoginInput, type ILoginResult, type IMeResult, type IMediaAssetDTO, type IMediaAssetResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPaymentMethodDTO, type IPaymentMethodResult, 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 ISessionDTO, type ISessionsResult, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionChangeResult, 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 IUploadMediaInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletCheckoutInput, type IWalletDTO, type IWalletPreferencesInput, type IWalletPurchaseInput, type IWalletPurchaseResult, type IWalletResult, type IWalletTransactionDTO, type IWalletTransactionsResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, MediaClient, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
package/dist/index.d.ts CHANGED
@@ -502,6 +502,9 @@ interface IAdminLogPage {
502
502
  entries: IAdminLogEntry[];
503
503
  next: string | null;
504
504
  }
505
+ interface IAdminUserDTO extends IUserDTO {
506
+ deletedAt: string | null;
507
+ }
505
508
  interface IConfigEntry {
506
509
  key: string;
507
510
  value: unknown;
@@ -1260,13 +1263,16 @@ interface IRollbackInput {
1260
1263
  interface IConfigAdminClientOptions {
1261
1264
  baseUrl: string;
1262
1265
  adminToken: string;
1266
+ prefix?: string;
1263
1267
  actor?: string;
1264
1268
  }
1265
1269
  declare class ConfigAdminClient {
1266
1270
  private http;
1267
1271
  private adminToken;
1272
+ private prefix;
1268
1273
  private actorHeaders;
1269
1274
  constructor(opts: IConfigAdminClientOptions);
1275
+ private rebase;
1270
1276
  listConfig(environment?: string): Promise<IApiResponse<IConfigEntry[]>>;
1271
1277
  getConfig(key: string, environment?: string): Promise<IApiResponse<IConfigEntry>>;
1272
1278
  setConfig(key: string, input: ISetConfigInput, environment?: string): Promise<IApiResponse<IConfigEntry>>;
@@ -1308,6 +1314,32 @@ declare class AdminClient {
1308
1314
  adminLog(query?: IAdminLogQuery): Promise<IApiResponse<IAdminLogPage>>;
1309
1315
  }
1310
1316
 
1317
+ interface IAuthAdminClientOptions {
1318
+ baseUrl: string;
1319
+ adminToken: string;
1320
+ prefix?: string;
1321
+ actor?: string;
1322
+ }
1323
+ interface IAdminLoginHistoryQuery {
1324
+ limit?: number;
1325
+ cursor?: string;
1326
+ }
1327
+ declare class AuthAdminClient {
1328
+ private http;
1329
+ private adminToken;
1330
+ private prefix;
1331
+ private actorHeaders;
1332
+ constructor(opts: IAuthAdminClientOptions);
1333
+ private call;
1334
+ findUser(email: string): Promise<IApiResponse<IAdminUserDTO>>;
1335
+ getUser(id: string): Promise<IApiResponse<IAdminUserDTO>>;
1336
+ listUserSessions(id: string): Promise<IApiResponse<ISessionDTO[]>>;
1337
+ revokeUserSessions(id: string): Promise<IApiResponse<undefined>>;
1338
+ userLoginHistory(id: string, query?: IAdminLoginHistoryQuery): Promise<IApiResponse<ILoginHistoryPageResult>>;
1339
+ suspendUser(id: string): Promise<IApiResponse<IAdminUserDTO>>;
1340
+ unsuspendUser(id: string): Promise<IApiResponse<IAdminUserDTO>>;
1341
+ }
1342
+
1311
1343
  interface ISetTemplateInput {
1312
1344
  text: string;
1313
1345
  subject?: string;
@@ -1321,13 +1353,16 @@ interface IRollbackTemplateInput {
1321
1353
  interface ICourierAdminClientOptions {
1322
1354
  baseUrl: string;
1323
1355
  adminToken: string;
1356
+ prefix?: string;
1324
1357
  actor?: string;
1325
1358
  }
1326
1359
  declare class CourierAdminClient {
1327
1360
  private http;
1328
1361
  private adminToken;
1362
+ private prefix;
1329
1363
  private actorHeaders;
1330
1364
  constructor(opts: ICourierAdminClientOptions);
1365
+ private rebase;
1331
1366
  listTemplates(): Promise<IApiResponse<ITemplateEntry[]>>;
1332
1367
  getTemplate(type: string, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
1333
1368
  setTemplate(type: string, input: ISetTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
@@ -1336,4 +1371,4 @@ declare class CourierAdminClient {
1336
1371
  rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
1337
1372
  }
1338
1373
 
1339
- export { AdminClient, type AdminRouteGuard, 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 IAdminAttention, type IAdminAttentionItem, type IAdminCheckResult, type IAdminClientOptions, type IAdminConfigReport, type IAdminDoctorReport, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminManifest, type IAdminModuleEntry, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminTokensReport, type IApiError, type IApiResponse, type IAppleNativeInput, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type ICancelSubscriptionInput, 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 IGetLoginHistoryInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IInvoiceDTO, type IInvoicesResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginEventDTO, type ILoginHistoryPageResult, type ILoginInput, type ILoginResult, type IMeResult, type IMediaAssetDTO, type IMediaAssetResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPaymentMethodDTO, type IPaymentMethodResult, 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 ISessionDTO, type ISessionsResult, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionChangeResult, 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 IUploadMediaInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletCheckoutInput, type IWalletDTO, type IWalletPreferencesInput, type IWalletPurchaseInput, type IWalletPurchaseResult, type IWalletResult, type IWalletTransactionDTO, type IWalletTransactionsResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, MediaClient, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
1374
+ export { AdminClient, type AdminRouteGuard, AuditClient, AuthAdminClient, 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 IAdminAttention, type IAdminAttentionItem, type IAdminCheckResult, type IAdminClientOptions, type IAdminConfigReport, type IAdminDoctorReport, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminModuleEntry, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminTokensReport, type IAdminUserDTO, type IApiError, type IApiResponse, type IAppleNativeInput, type IAuditEventDTO, type IAuditPageResult, type IAuthAdminClientOptions, type IBlacklistCustomerInput, type ICache, type ICancelSubscriptionInput, 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 IGetLoginHistoryInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IInvoiceDTO, type IInvoicesResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginEventDTO, type ILoginHistoryPageResult, type ILoginInput, type ILoginResult, type IMeResult, type IMediaAssetDTO, type IMediaAssetResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPaymentMethodDTO, type IPaymentMethodResult, 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 ISessionDTO, type ISessionsResult, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionChangeResult, 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 IUploadMediaInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletCheckoutInput, type IWalletDTO, type IWalletPreferencesInput, type IWalletPurchaseInput, type IWalletPurchaseResult, type IWalletResult, type IWalletTransactionDTO, type IWalletTransactionsResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, MediaClient, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
package/dist/index.js CHANGED
@@ -1551,116 +1551,150 @@ function envQuery(environment) {
1551
1551
  var ConfigAdminClient = class {
1552
1552
  http;
1553
1553
  adminToken;
1554
+ prefix;
1554
1555
  actorHeaders;
1555
1556
  constructor(opts) {
1556
1557
  this.http = new HttpClient(opts.baseUrl);
1557
1558
  this.adminToken = opts.adminToken;
1559
+ this.prefix = opts.prefix?.replace(/\/+$/, "");
1558
1560
  this.actorHeaders = opts.actor ? { "X-Actor": opts.actor } : void 0;
1559
1561
  }
1562
+ // The path literals stay on the legacy '/admin/...' so the route table and
1563
+ // the coverage gate read them; the prefix is applied here at request time.
1564
+ rebase(opts) {
1565
+ if (!this.prefix) return opts;
1566
+ return { ...opts, path: opts.path.replace(/^\/admin(?=\/|\?|$)/, this.prefix) };
1567
+ }
1560
1568
  // ── Config ───────────────────────────────────────────────────────────────
1561
1569
  listConfig(environment) {
1562
- return this.http.request({
1563
- method: "GET",
1564
- path: `/admin/config${envQuery(environment)}`,
1565
- token: this.adminToken
1566
- });
1570
+ return this.http.request(
1571
+ this.rebase({
1572
+ method: "GET",
1573
+ path: `/admin/config${envQuery(environment)}`,
1574
+ token: this.adminToken
1575
+ })
1576
+ );
1567
1577
  }
1568
1578
  getConfig(key, environment) {
1569
- return this.http.request({
1570
- method: "GET",
1571
- path: `/admin/config/${encodeURIComponent(key)}${envQuery(environment)}`,
1572
- token: this.adminToken
1573
- });
1579
+ return this.http.request(
1580
+ this.rebase({
1581
+ method: "GET",
1582
+ path: `/admin/config/${encodeURIComponent(key)}${envQuery(environment)}`,
1583
+ token: this.adminToken
1584
+ })
1585
+ );
1574
1586
  }
1575
1587
  setConfig(key, input, environment) {
1576
- return this.http.request({
1577
- method: "PUT",
1578
- path: `/admin/config/${encodeURIComponent(key)}${envQuery(environment)}`,
1579
- body: input,
1580
- token: this.adminToken,
1581
- headers: this.actorHeaders
1582
- });
1588
+ return this.http.request(
1589
+ this.rebase({
1590
+ method: "PUT",
1591
+ path: `/admin/config/${encodeURIComponent(key)}${envQuery(environment)}`,
1592
+ body: input,
1593
+ token: this.adminToken,
1594
+ headers: this.actorHeaders
1595
+ })
1596
+ );
1583
1597
  }
1584
1598
  deleteConfig(key, environment) {
1585
- return this.http.request({
1586
- method: "DELETE",
1587
- path: `/admin/config/${encodeURIComponent(key)}${envQuery(environment)}`,
1588
- token: this.adminToken,
1589
- headers: this.actorHeaders
1590
- });
1599
+ return this.http.request(
1600
+ this.rebase({
1601
+ method: "DELETE",
1602
+ path: `/admin/config/${encodeURIComponent(key)}${envQuery(environment)}`,
1603
+ token: this.adminToken,
1604
+ headers: this.actorHeaders
1605
+ })
1606
+ );
1591
1607
  }
1592
1608
  listConfigRevisions(key, environment) {
1593
- return this.http.request({
1594
- method: "GET",
1595
- path: `/admin/config/${encodeURIComponent(key)}/revisions${envQuery(environment)}`,
1596
- token: this.adminToken
1597
- });
1609
+ return this.http.request(
1610
+ this.rebase({
1611
+ method: "GET",
1612
+ path: `/admin/config/${encodeURIComponent(key)}/revisions${envQuery(environment)}`,
1613
+ token: this.adminToken
1614
+ })
1615
+ );
1598
1616
  }
1599
1617
  rollbackConfig(key, input, environment) {
1600
- return this.http.request({
1601
- method: "POST",
1602
- path: `/admin/config/${encodeURIComponent(key)}/rollback${envQuery(environment)}`,
1603
- body: input,
1604
- token: this.adminToken,
1605
- headers: this.actorHeaders
1606
- });
1618
+ return this.http.request(
1619
+ this.rebase({
1620
+ method: "POST",
1621
+ path: `/admin/config/${encodeURIComponent(key)}/rollback${envQuery(environment)}`,
1622
+ body: input,
1623
+ token: this.adminToken,
1624
+ headers: this.actorHeaders
1625
+ })
1626
+ );
1607
1627
  }
1608
1628
  // ── Secrets (masked) ─────────────────────────────────────────────────────
1609
1629
  listSecrets(environment) {
1610
- return this.http.request({
1611
- method: "GET",
1612
- path: `/admin/secrets${envQuery(environment)}`,
1613
- token: this.adminToken
1614
- });
1630
+ return this.http.request(
1631
+ this.rebase({
1632
+ method: "GET",
1633
+ path: `/admin/secrets${envQuery(environment)}`,
1634
+ token: this.adminToken
1635
+ })
1636
+ );
1615
1637
  }
1616
1638
  getSecret(key, environment) {
1617
- return this.http.request({
1618
- method: "GET",
1619
- path: `/admin/secrets/${encodeURIComponent(key)}${envQuery(environment)}`,
1620
- token: this.adminToken
1621
- });
1639
+ return this.http.request(
1640
+ this.rebase({
1641
+ method: "GET",
1642
+ path: `/admin/secrets/${encodeURIComponent(key)}${envQuery(environment)}`,
1643
+ token: this.adminToken
1644
+ })
1645
+ );
1622
1646
  }
1623
1647
  setSecret(key, input, environment) {
1624
- return this.http.request({
1625
- method: "PUT",
1626
- path: `/admin/secrets/${encodeURIComponent(key)}${envQuery(environment)}`,
1627
- body: input,
1628
- token: this.adminToken,
1629
- headers: this.actorHeaders
1630
- });
1648
+ return this.http.request(
1649
+ this.rebase({
1650
+ method: "PUT",
1651
+ path: `/admin/secrets/${encodeURIComponent(key)}${envQuery(environment)}`,
1652
+ body: input,
1653
+ token: this.adminToken,
1654
+ headers: this.actorHeaders
1655
+ })
1656
+ );
1631
1657
  }
1632
1658
  deleteSecret(key, environment) {
1633
- return this.http.request({
1634
- method: "DELETE",
1635
- path: `/admin/secrets/${encodeURIComponent(key)}${envQuery(environment)}`,
1636
- token: this.adminToken,
1637
- headers: this.actorHeaders
1638
- });
1659
+ return this.http.request(
1660
+ this.rebase({
1661
+ method: "DELETE",
1662
+ path: `/admin/secrets/${encodeURIComponent(key)}${envQuery(environment)}`,
1663
+ token: this.adminToken,
1664
+ headers: this.actorHeaders
1665
+ })
1666
+ );
1639
1667
  }
1640
1668
  listSecretRevisions(key, environment) {
1641
- return this.http.request({
1642
- method: "GET",
1643
- path: `/admin/secrets/${encodeURIComponent(key)}/revisions${envQuery(environment)}`,
1644
- token: this.adminToken
1645
- });
1669
+ return this.http.request(
1670
+ this.rebase({
1671
+ method: "GET",
1672
+ path: `/admin/secrets/${encodeURIComponent(key)}/revisions${envQuery(environment)}`,
1673
+ token: this.adminToken
1674
+ })
1675
+ );
1646
1676
  }
1647
1677
  rollbackSecret(key, input, environment) {
1648
- return this.http.request({
1649
- method: "POST",
1650
- path: `/admin/secrets/${encodeURIComponent(key)}/rollback${envQuery(environment)}`,
1651
- body: input,
1652
- token: this.adminToken,
1653
- headers: this.actorHeaders
1654
- });
1678
+ return this.http.request(
1679
+ this.rebase({
1680
+ method: "POST",
1681
+ path: `/admin/secrets/${encodeURIComponent(key)}/rollback${envQuery(environment)}`,
1682
+ body: input,
1683
+ token: this.adminToken,
1684
+ headers: this.actorHeaders
1685
+ })
1686
+ );
1655
1687
  }
1656
1688
  // POST (not GET) so the decrypted value never lands in a URL or access log.
1657
1689
  revealSecret(key, environment) {
1658
- return this.http.request({
1659
- method: "POST",
1660
- path: `/admin/secrets/${encodeURIComponent(key)}/reveal${envQuery(environment)}`,
1661
- token: this.adminToken,
1662
- headers: this.actorHeaders
1663
- });
1690
+ return this.http.request(
1691
+ this.rebase({
1692
+ method: "POST",
1693
+ path: `/admin/secrets/${encodeURIComponent(key)}/reveal${envQuery(environment)}`,
1694
+ token: this.adminToken,
1695
+ headers: this.actorHeaders
1696
+ })
1697
+ );
1664
1698
  }
1665
1699
  };
1666
1700
 
@@ -1711,67 +1745,138 @@ var AdminClient = class {
1711
1745
  }
1712
1746
  };
1713
1747
 
1748
+ // src/modules/auth-admin.ts
1749
+ var AuthAdminClient = class {
1750
+ http;
1751
+ adminToken;
1752
+ prefix;
1753
+ actorHeaders;
1754
+ constructor(opts) {
1755
+ this.http = new HttpClient(opts.baseUrl);
1756
+ this.adminToken = opts.adminToken;
1757
+ this.prefix = (opts.prefix ?? "/_admin").replace(/\/+$/, "");
1758
+ this.actorHeaders = opts.actor ? { "X-Actor": opts.actor } : void 0;
1759
+ }
1760
+ call(method, suffix) {
1761
+ return this.http.request({
1762
+ method,
1763
+ path: `${this.prefix}/users${suffix}`,
1764
+ token: this.adminToken,
1765
+ headers: this.actorHeaders
1766
+ });
1767
+ }
1768
+ findUser(email) {
1769
+ return this.call("GET", `?email=${encodeURIComponent(email)}`);
1770
+ }
1771
+ getUser(id) {
1772
+ return this.call("GET", `/${encodeURIComponent(id)}`);
1773
+ }
1774
+ listUserSessions(id) {
1775
+ return this.call("GET", `/${encodeURIComponent(id)}/sessions`);
1776
+ }
1777
+ // Signs the user out everywhere.
1778
+ revokeUserSessions(id) {
1779
+ return this.call("DELETE", `/${encodeURIComponent(id)}/sessions`);
1780
+ }
1781
+ userLoginHistory(id, query = {}) {
1782
+ const q = new URLSearchParams();
1783
+ if (query.limit) q.set("limit", String(query.limit));
1784
+ if (query.cursor) q.set("cursor", query.cursor);
1785
+ const qs = q.toString();
1786
+ return this.call(
1787
+ "GET",
1788
+ `/${encodeURIComponent(id)}/login-history${qs ? `?${qs}` : ""}`
1789
+ );
1790
+ }
1791
+ suspendUser(id) {
1792
+ return this.call("POST", `/${encodeURIComponent(id)}/suspend`);
1793
+ }
1794
+ unsuspendUser(id) {
1795
+ return this.call("POST", `/${encodeURIComponent(id)}/unsuspend`);
1796
+ }
1797
+ };
1798
+
1714
1799
  // src/modules/courier-admin.ts
1715
1800
  var CourierAdminClient = class {
1716
1801
  http;
1717
1802
  adminToken;
1803
+ prefix;
1718
1804
  actorHeaders;
1719
1805
  constructor(opts) {
1720
1806
  this.http = new HttpClient(opts.baseUrl);
1721
1807
  this.adminToken = opts.adminToken;
1808
+ this.prefix = opts.prefix?.replace(/\/+$/, "");
1722
1809
  this.actorHeaders = opts.actor ? { "X-Actor": opts.actor } : void 0;
1723
1810
  }
1811
+ // The path literals stay on the legacy '/admin/...' so the route table and
1812
+ // the coverage gate read them; the prefix is applied here at request time.
1813
+ rebase(opts) {
1814
+ if (!this.prefix) return opts;
1815
+ return { ...opts, path: opts.path.replace(/^\/admin(?=\/|\?|$)/, this.prefix) };
1816
+ }
1724
1817
  listTemplates() {
1725
- return this.http.request({
1726
- method: "GET",
1727
- path: "/admin/templates",
1728
- token: this.adminToken
1729
- });
1818
+ return this.http.request(
1819
+ this.rebase({
1820
+ method: "GET",
1821
+ path: "/admin/templates",
1822
+ token: this.adminToken
1823
+ })
1824
+ );
1730
1825
  }
1731
1826
  getTemplate(type, locale) {
1732
1827
  const q = locale ? `?locale=${encodeURIComponent(locale)}` : "";
1733
- return this.http.request({
1734
- method: "GET",
1735
- path: `/admin/templates/${encodeURIComponent(type)}${q}`,
1736
- token: this.adminToken
1737
- });
1828
+ return this.http.request(
1829
+ this.rebase({
1830
+ method: "GET",
1831
+ path: `/admin/templates/${encodeURIComponent(type)}${q}`,
1832
+ token: this.adminToken
1833
+ })
1834
+ );
1738
1835
  }
1739
1836
  setTemplate(type, input, locale) {
1740
1837
  const q = locale ? `?locale=${encodeURIComponent(locale)}` : "";
1741
- return this.http.request({
1742
- method: "PUT",
1743
- path: `/admin/templates/${encodeURIComponent(type)}${q}`,
1744
- body: input,
1745
- token: this.adminToken,
1746
- headers: this.actorHeaders
1747
- });
1838
+ return this.http.request(
1839
+ this.rebase({
1840
+ method: "PUT",
1841
+ path: `/admin/templates/${encodeURIComponent(type)}${q}`,
1842
+ body: input,
1843
+ token: this.adminToken,
1844
+ headers: this.actorHeaders
1845
+ })
1846
+ );
1748
1847
  }
1749
1848
  deleteTemplate(type, locale) {
1750
1849
  const q = locale ? `?locale=${encodeURIComponent(locale)}` : "";
1751
- return this.http.request({
1752
- method: "DELETE",
1753
- path: `/admin/templates/${encodeURIComponent(type)}${q}`,
1754
- token: this.adminToken,
1755
- headers: this.actorHeaders
1756
- });
1850
+ return this.http.request(
1851
+ this.rebase({
1852
+ method: "DELETE",
1853
+ path: `/admin/templates/${encodeURIComponent(type)}${q}`,
1854
+ token: this.adminToken,
1855
+ headers: this.actorHeaders
1856
+ })
1857
+ );
1757
1858
  }
1758
1859
  listRevisions(type, locale) {
1759
1860
  const q = locale ? `?locale=${encodeURIComponent(locale)}` : "";
1760
- return this.http.request({
1761
- method: "GET",
1762
- path: `/admin/templates/${encodeURIComponent(type)}/revisions${q}`,
1763
- token: this.adminToken
1764
- });
1861
+ return this.http.request(
1862
+ this.rebase({
1863
+ method: "GET",
1864
+ path: `/admin/templates/${encodeURIComponent(type)}/revisions${q}`,
1865
+ token: this.adminToken
1866
+ })
1867
+ );
1765
1868
  }
1766
1869
  rollback(type, input, locale) {
1767
1870
  const q = locale ? `?locale=${encodeURIComponent(locale)}` : "";
1768
- return this.http.request({
1769
- method: "POST",
1770
- path: `/admin/templates/${encodeURIComponent(type)}/rollback${q}`,
1771
- body: input,
1772
- token: this.adminToken,
1773
- headers: this.actorHeaders
1774
- });
1871
+ return this.http.request(
1872
+ this.rebase({
1873
+ method: "POST",
1874
+ path: `/admin/templates/${encodeURIComponent(type)}/rollback${q}`,
1875
+ body: input,
1876
+ token: this.adminToken,
1877
+ headers: this.actorHeaders
1878
+ })
1879
+ );
1775
1880
  }
1776
1881
  };
1777
1882
 
@@ -1782,6 +1887,7 @@ function isMfaRequired(result) {
1782
1887
  export {
1783
1888
  AdminClient,
1784
1889
  AuditClient,
1890
+ AuthAdminClient,
1785
1891
  AuthClient,
1786
1892
  BillingClient,
1787
1893
  ConfigAdminClient,