@fonderie/client 0.29.1 → 0.30.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
@@ -427,6 +427,7 @@ interface IAdminManifest {
427
427
  admin: {
428
428
  version: string;
429
429
  log: boolean;
430
+ host: string[] | null;
430
431
  };
431
432
  modules: IAdminModuleEntry[];
432
433
  readiness: IAdminReadiness;
@@ -548,6 +549,10 @@ interface IAdminWalletDTO extends IWalletDTO {
548
549
  version: number;
549
550
  updatedAt: string | null;
550
551
  }
552
+ interface IAdminSubscriptionPage {
553
+ subscriptions: IAdminSubscriptionDTO[];
554
+ nextCursor: string | null;
555
+ }
551
556
  interface IAdminWalletLedgerPage {
552
557
  currency: string;
553
558
  entries: IWalletTransactionDTO[];
@@ -632,6 +637,10 @@ interface ILoginEventDTO {
632
637
  userAgent: string | null;
633
638
  createdAt: string;
634
639
  }
640
+ interface IAdminUserPageResult {
641
+ users: IAdminUserDTO[];
642
+ nextCursor: string | null;
643
+ }
635
644
  interface ILoginHistoryPageResult {
636
645
  events: ILoginEventDTO[];
637
646
  nextCursor: string | null;
@@ -1396,6 +1405,10 @@ interface IAdminLoginHistoryQuery {
1396
1405
  limit?: number;
1397
1406
  cursor?: string;
1398
1407
  }
1408
+ interface IAdminUsersQuery {
1409
+ limit?: number;
1410
+ cursor?: string;
1411
+ }
1399
1412
  declare class AuthAdminClient {
1400
1413
  private http;
1401
1414
  private adminToken;
@@ -1403,6 +1416,7 @@ declare class AuthAdminClient {
1403
1416
  private actorHeaders;
1404
1417
  constructor(opts: IAuthAdminClientOptions);
1405
1418
  private call;
1419
+ listUsers(query?: IAdminUsersQuery): Promise<IApiResponse<IAdminUserPageResult>>;
1406
1420
  findUser(email: string): Promise<IApiResponse<IAdminUserDTO>>;
1407
1421
  getUser(id: string): Promise<IApiResponse<IAdminUserDTO>>;
1408
1422
  listUserSessions(id: string): Promise<IApiResponse<ISessionDTO[]>>;
@@ -1418,6 +1432,10 @@ interface IBillingAdminClientOptions {
1418
1432
  prefix?: string;
1419
1433
  actor?: string;
1420
1434
  }
1435
+ interface IAdminSubscriptionsQuery {
1436
+ limit?: number;
1437
+ cursor?: string;
1438
+ }
1421
1439
  interface IAdminLedgerQuery {
1422
1440
  currency?: string;
1423
1441
  limit?: number;
@@ -1437,6 +1455,7 @@ declare class BillingAdminClient {
1437
1455
  }): Promise<IApiResponse<IPlanDTO>>;
1438
1456
  updatePlan(planId: string, input: IAdminPlanInput): Promise<IApiResponse<IPlanDTO>>;
1439
1457
  deletePlan(planId: string): Promise<IApiResponse<undefined>>;
1458
+ listSubscriptions(query?: IAdminSubscriptionsQuery): Promise<IApiResponse<IAdminSubscriptionPage>>;
1440
1459
  subscription(type: SubscriberType, id: string): Promise<IApiResponse<IAdminSubscriptionDTO>>;
1441
1460
  wallet(type: SubscriberType, id: string, currency?: string): Promise<IApiResponse<IAdminWalletDTO>>;
1442
1461
  walletLedger(type: SubscriberType, id: string, query?: IAdminLedgerQuery): Promise<IApiResponse<IAdminWalletLedgerPage>>;
@@ -1477,6 +1496,18 @@ interface ISetTemplateInput {
1477
1496
  interface IRollbackTemplateInput {
1478
1497
  toVersion: number;
1479
1498
  }
1499
+ interface IPreviewTemplateInput {
1500
+ text: string;
1501
+ subject?: string;
1502
+ html?: string;
1503
+ data?: Record<string, unknown>;
1504
+ }
1505
+ interface IRenderedTemplateResult {
1506
+ subject?: string;
1507
+ html?: string;
1508
+ text: string;
1509
+ variables: string[];
1510
+ }
1480
1511
  interface ICourierAdminClientOptions {
1481
1512
  baseUrl: string;
1482
1513
  adminToken: string;
@@ -1496,6 +1527,7 @@ declare class CourierAdminClient {
1496
1527
  deleteTemplate(type: string, locale?: string | null): Promise<IApiResponse<undefined>>;
1497
1528
  listRevisions(type: string, locale?: string | null): Promise<IApiResponse<ITemplateRevision[]>>;
1498
1529
  rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
1530
+ previewTemplate(type: string, input: IPreviewTemplateInput, locale?: string | null): Promise<IApiResponse<IRenderedTemplateResult>>;
1499
1531
  }
1500
1532
 
1501
- export { AdminClient, type AdminRouteGuard, type AdminScope, AuditAdminClient, AuditClient, AuthAdminClient, AuthClient, BillingAdminClient, 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 IAdminAuditQuery, type IAdminCatalog, type IAdminCheckResult, type IAdminClientOptions, type IAdminConfigReport, type IAdminDoctorReport, type IAdminGrantInput, type IAdminIssueTokenInput, type IAdminIssuedToken, type IAdminLedgerQuery, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminModuleEntry, type IAdminPlanInput, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminSubscriptionDTO, type IAdminTokenRecord, type IAdminTokensReport, type IAdminUserDTO, type IAdminWalletDTO, type IAdminWalletLedgerPage, type IApiError, type IApiResponse, type IAppleNativeInput, type IAuditAdminClientOptions, type IAuditEventDTO, type IAuditPageResult, type IAuthAdminClientOptions, type IBillingAdminClientOptions, 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 };
1533
+ export { AdminClient, type AdminRouteGuard, type AdminScope, AuditAdminClient, AuditClient, AuthAdminClient, AuthClient, BillingAdminClient, 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 IAdminAuditQuery, type IAdminCatalog, type IAdminCheckResult, type IAdminClientOptions, type IAdminConfigReport, type IAdminDoctorReport, type IAdminGrantInput, type IAdminIssueTokenInput, type IAdminIssuedToken, type IAdminLedgerQuery, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminModuleEntry, type IAdminPlanInput, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminSubscriptionDTO, type IAdminSubscriptionPage, type IAdminSubscriptionsQuery, type IAdminTokenRecord, type IAdminTokensReport, type IAdminUserDTO, type IAdminUserPageResult, type IAdminUsersQuery, type IAdminWalletDTO, type IAdminWalletLedgerPage, type IApiError, type IApiResponse, type IAppleNativeInput, type IAuditAdminClientOptions, type IAuditEventDTO, type IAuditPageResult, type IAuthAdminClientOptions, type IBillingAdminClientOptions, 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 IPreviewTemplateInput, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRenderedTemplateResult, 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
@@ -427,6 +427,7 @@ interface IAdminManifest {
427
427
  admin: {
428
428
  version: string;
429
429
  log: boolean;
430
+ host: string[] | null;
430
431
  };
431
432
  modules: IAdminModuleEntry[];
432
433
  readiness: IAdminReadiness;
@@ -548,6 +549,10 @@ interface IAdminWalletDTO extends IWalletDTO {
548
549
  version: number;
549
550
  updatedAt: string | null;
550
551
  }
552
+ interface IAdminSubscriptionPage {
553
+ subscriptions: IAdminSubscriptionDTO[];
554
+ nextCursor: string | null;
555
+ }
551
556
  interface IAdminWalletLedgerPage {
552
557
  currency: string;
553
558
  entries: IWalletTransactionDTO[];
@@ -632,6 +637,10 @@ interface ILoginEventDTO {
632
637
  userAgent: string | null;
633
638
  createdAt: string;
634
639
  }
640
+ interface IAdminUserPageResult {
641
+ users: IAdminUserDTO[];
642
+ nextCursor: string | null;
643
+ }
635
644
  interface ILoginHistoryPageResult {
636
645
  events: ILoginEventDTO[];
637
646
  nextCursor: string | null;
@@ -1396,6 +1405,10 @@ interface IAdminLoginHistoryQuery {
1396
1405
  limit?: number;
1397
1406
  cursor?: string;
1398
1407
  }
1408
+ interface IAdminUsersQuery {
1409
+ limit?: number;
1410
+ cursor?: string;
1411
+ }
1399
1412
  declare class AuthAdminClient {
1400
1413
  private http;
1401
1414
  private adminToken;
@@ -1403,6 +1416,7 @@ declare class AuthAdminClient {
1403
1416
  private actorHeaders;
1404
1417
  constructor(opts: IAuthAdminClientOptions);
1405
1418
  private call;
1419
+ listUsers(query?: IAdminUsersQuery): Promise<IApiResponse<IAdminUserPageResult>>;
1406
1420
  findUser(email: string): Promise<IApiResponse<IAdminUserDTO>>;
1407
1421
  getUser(id: string): Promise<IApiResponse<IAdminUserDTO>>;
1408
1422
  listUserSessions(id: string): Promise<IApiResponse<ISessionDTO[]>>;
@@ -1418,6 +1432,10 @@ interface IBillingAdminClientOptions {
1418
1432
  prefix?: string;
1419
1433
  actor?: string;
1420
1434
  }
1435
+ interface IAdminSubscriptionsQuery {
1436
+ limit?: number;
1437
+ cursor?: string;
1438
+ }
1421
1439
  interface IAdminLedgerQuery {
1422
1440
  currency?: string;
1423
1441
  limit?: number;
@@ -1437,6 +1455,7 @@ declare class BillingAdminClient {
1437
1455
  }): Promise<IApiResponse<IPlanDTO>>;
1438
1456
  updatePlan(planId: string, input: IAdminPlanInput): Promise<IApiResponse<IPlanDTO>>;
1439
1457
  deletePlan(planId: string): Promise<IApiResponse<undefined>>;
1458
+ listSubscriptions(query?: IAdminSubscriptionsQuery): Promise<IApiResponse<IAdminSubscriptionPage>>;
1440
1459
  subscription(type: SubscriberType, id: string): Promise<IApiResponse<IAdminSubscriptionDTO>>;
1441
1460
  wallet(type: SubscriberType, id: string, currency?: string): Promise<IApiResponse<IAdminWalletDTO>>;
1442
1461
  walletLedger(type: SubscriberType, id: string, query?: IAdminLedgerQuery): Promise<IApiResponse<IAdminWalletLedgerPage>>;
@@ -1477,6 +1496,18 @@ interface ISetTemplateInput {
1477
1496
  interface IRollbackTemplateInput {
1478
1497
  toVersion: number;
1479
1498
  }
1499
+ interface IPreviewTemplateInput {
1500
+ text: string;
1501
+ subject?: string;
1502
+ html?: string;
1503
+ data?: Record<string, unknown>;
1504
+ }
1505
+ interface IRenderedTemplateResult {
1506
+ subject?: string;
1507
+ html?: string;
1508
+ text: string;
1509
+ variables: string[];
1510
+ }
1480
1511
  interface ICourierAdminClientOptions {
1481
1512
  baseUrl: string;
1482
1513
  adminToken: string;
@@ -1496,6 +1527,7 @@ declare class CourierAdminClient {
1496
1527
  deleteTemplate(type: string, locale?: string | null): Promise<IApiResponse<undefined>>;
1497
1528
  listRevisions(type: string, locale?: string | null): Promise<IApiResponse<ITemplateRevision[]>>;
1498
1529
  rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
1530
+ previewTemplate(type: string, input: IPreviewTemplateInput, locale?: string | null): Promise<IApiResponse<IRenderedTemplateResult>>;
1499
1531
  }
1500
1532
 
1501
- export { AdminClient, type AdminRouteGuard, type AdminScope, AuditAdminClient, AuditClient, AuthAdminClient, AuthClient, BillingAdminClient, 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 IAdminAuditQuery, type IAdminCatalog, type IAdminCheckResult, type IAdminClientOptions, type IAdminConfigReport, type IAdminDoctorReport, type IAdminGrantInput, type IAdminIssueTokenInput, type IAdminIssuedToken, type IAdminLedgerQuery, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminModuleEntry, type IAdminPlanInput, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminSubscriptionDTO, type IAdminTokenRecord, type IAdminTokensReport, type IAdminUserDTO, type IAdminWalletDTO, type IAdminWalletLedgerPage, type IApiError, type IApiResponse, type IAppleNativeInput, type IAuditAdminClientOptions, type IAuditEventDTO, type IAuditPageResult, type IAuthAdminClientOptions, type IBillingAdminClientOptions, 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 };
1533
+ export { AdminClient, type AdminRouteGuard, type AdminScope, AuditAdminClient, AuditClient, AuthAdminClient, AuthClient, BillingAdminClient, 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 IAdminAuditQuery, type IAdminCatalog, type IAdminCheckResult, type IAdminClientOptions, type IAdminConfigReport, type IAdminDoctorReport, type IAdminGrantInput, type IAdminIssueTokenInput, type IAdminIssuedToken, type IAdminLedgerQuery, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminModuleEntry, type IAdminPlanInput, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminSubscriptionDTO, type IAdminSubscriptionPage, type IAdminSubscriptionsQuery, type IAdminTokenRecord, type IAdminTokensReport, type IAdminUserDTO, type IAdminUserPageResult, type IAdminUsersQuery, type IAdminWalletDTO, type IAdminWalletLedgerPage, type IApiError, type IApiResponse, type IAppleNativeInput, type IAuditAdminClientOptions, type IAuditEventDTO, type IAuditPageResult, type IAuthAdminClientOptions, type IBillingAdminClientOptions, 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 IPreviewTemplateInput, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRenderedTemplateResult, 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
@@ -1808,6 +1808,15 @@ var AuthAdminClient = class {
1808
1808
  headers: this.actorHeaders
1809
1809
  });
1810
1810
  }
1811
+ // A page of users, newest first. The same route as findUser — with an email
1812
+ // it looks one up, without one it lists.
1813
+ listUsers(query = {}) {
1814
+ const q = new URLSearchParams();
1815
+ if (query.limit) q.set("limit", String(query.limit));
1816
+ if (query.cursor) q.set("cursor", query.cursor);
1817
+ const qs = q.toString();
1818
+ return this.call("GET", qs ? `?${qs}` : "");
1819
+ }
1811
1820
  findUser(email) {
1812
1821
  return this.call("GET", `?email=${encodeURIComponent(email)}`);
1813
1822
  }
@@ -1875,6 +1884,15 @@ var BillingAdminClient = class {
1875
1884
  deletePlan(planId) {
1876
1885
  return this.call("DELETE", `/plans/${encodeURIComponent(planId)}`);
1877
1886
  }
1887
+ // A page of subscribers, newest first. The lookup below still answers for a
1888
+ // known subscriber; this is for finding one you cannot name.
1889
+ listSubscriptions(query = {}) {
1890
+ const q = new URLSearchParams();
1891
+ if (query.limit) q.set("limit", String(query.limit));
1892
+ if (query.cursor) q.set("cursor", query.cursor);
1893
+ const qs = q.toString();
1894
+ return this.call("GET", `/subscriptions${qs ? `?${qs}` : ""}`);
1895
+ }
1878
1896
  subscription(type, id) {
1879
1897
  return this.call("GET", `/subscriptions${this.sub(type, id)}`);
1880
1898
  }
@@ -2013,6 +2031,22 @@ var CourierAdminClient = class {
2013
2031
  })
2014
2032
  );
2015
2033
  }
2034
+ // Renders content you are HOLDING, not what is stored — so an editor can
2035
+ // show the change before it is saved. Server-side on purpose: the shell and
2036
+ // the variable substitution are the resolver's, and a preview rendered any
2037
+ // other way would not be the mail that sends.
2038
+ previewTemplate(type, input, locale) {
2039
+ const q = locale ? `?locale=${encodeURIComponent(locale)}` : "";
2040
+ return this.http.request(
2041
+ this.rebase({
2042
+ method: "POST",
2043
+ path: `/admin/templates/${encodeURIComponent(type)}/preview${q}`,
2044
+ body: input,
2045
+ token: this.adminToken,
2046
+ headers: this.actorHeaders
2047
+ })
2048
+ );
2049
+ }
2016
2050
  };
2017
2051
 
2018
2052
  // src/types.ts