@fonderie/client 0.23.0 → 0.24.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
@@ -401,6 +401,107 @@ interface ITemplateRevision {
401
401
  actor: string | null;
402
402
  createdAt: string;
403
403
  }
404
+ interface IAdminReadinessProblem {
405
+ module: string;
406
+ severity: 'error' | 'warning';
407
+ message: string;
408
+ }
409
+ interface IAdminReadiness {
410
+ ok: boolean;
411
+ problems: IAdminReadinessProblem[];
412
+ }
413
+ interface IAdminModuleEntry {
414
+ name: string;
415
+ version: string | null;
416
+ readiness: IAdminReadiness;
417
+ describesAdmin: boolean;
418
+ }
419
+ interface IAdminRouteEntry {
420
+ method: string;
421
+ path: string;
422
+ module?: string;
423
+ }
424
+ interface IAdminManifest {
425
+ generatedAt: string;
426
+ env: string;
427
+ admin: {
428
+ version: string;
429
+ log: boolean;
430
+ };
431
+ modules: IAdminModuleEntry[];
432
+ readiness: IAdminReadiness;
433
+ routes: IAdminRouteEntry[];
434
+ }
435
+ interface IAdminCheckResult {
436
+ name: string;
437
+ module: string;
438
+ ok: boolean;
439
+ findings: string[];
440
+ skipped?: string;
441
+ durationMs: number;
442
+ }
443
+ interface IAdminDoctorReport {
444
+ generatedAt: string;
445
+ ok: boolean;
446
+ checks: IAdminCheckResult[];
447
+ }
448
+ interface IAdminAttentionItem {
449
+ source: string;
450
+ severity: 'error' | 'advice';
451
+ message: string;
452
+ }
453
+ interface IAdminAttention {
454
+ generatedAt: string;
455
+ ok: boolean;
456
+ items: IAdminAttentionItem[];
457
+ }
458
+ interface IAdminConfigReport {
459
+ generatedAt: string;
460
+ readiness: IAdminReadiness;
461
+ modules: Array<{
462
+ name: string;
463
+ problems: IAdminReadinessProblem[];
464
+ }>;
465
+ env: Array<{
466
+ name: string;
467
+ set: boolean;
468
+ }>;
469
+ }
470
+ type AdminRouteGuard = 'admin' | 'probe' | 'app';
471
+ interface IAdminRoutesReport {
472
+ generatedAt: string;
473
+ routes: Array<IAdminRouteEntry & {
474
+ guard: AdminRouteGuard;
475
+ }>;
476
+ }
477
+ interface IAdminTokensReport {
478
+ generatedAt: string;
479
+ admin: {
480
+ ok: boolean;
481
+ problems: IAdminReadinessProblem[];
482
+ };
483
+ legacy: Array<{
484
+ module: string;
485
+ set: boolean;
486
+ }>;
487
+ }
488
+ interface IAdminLogEntry {
489
+ id: string;
490
+ at: string;
491
+ actor: string;
492
+ method: string;
493
+ path: string;
494
+ route: string;
495
+ module: string;
496
+ status: number;
497
+ durationMs: number;
498
+ requestId: string | null;
499
+ clientIp: string | null;
500
+ }
501
+ interface IAdminLogPage {
502
+ entries: IAdminLogEntry[];
503
+ next: string | null;
504
+ }
404
505
  interface IConfigEntry {
405
506
  key: string;
406
507
  value: unknown;
@@ -1181,6 +1282,32 @@ declare class ConfigAdminClient {
1181
1282
  revealSecret(key: string, environment?: string): Promise<IApiResponse<IRevealSecretResult>>;
1182
1283
  }
1183
1284
 
1285
+ interface IAdminClientOptions {
1286
+ baseUrl: string;
1287
+ adminToken: string;
1288
+ prefix?: string;
1289
+ actor?: string;
1290
+ }
1291
+ interface IAdminLogQuery {
1292
+ limit?: number;
1293
+ before?: string;
1294
+ }
1295
+ declare class AdminClient {
1296
+ private http;
1297
+ private adminToken;
1298
+ private prefix;
1299
+ private actorHeaders;
1300
+ constructor(opts: IAdminClientOptions);
1301
+ private get;
1302
+ attention(): Promise<IApiResponse<IAdminAttention>>;
1303
+ manifest(): Promise<IApiResponse<IAdminManifest>>;
1304
+ doctor(): Promise<IApiResponse<IAdminDoctorReport>>;
1305
+ config(): Promise<IApiResponse<IAdminConfigReport>>;
1306
+ routes(): Promise<IApiResponse<IAdminRoutesReport>>;
1307
+ tokens(): Promise<IApiResponse<IAdminTokensReport>>;
1308
+ adminLog(query?: IAdminLogQuery): Promise<IApiResponse<IAdminLogPage>>;
1309
+ }
1310
+
1184
1311
  interface ISetTemplateInput {
1185
1312
  text: string;
1186
1313
  subject?: string;
@@ -1209,4 +1336,4 @@ declare class CourierAdminClient {
1209
1336
  rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
1210
1337
  }
1211
1338
 
1212
- 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 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -401,6 +401,107 @@ interface ITemplateRevision {
401
401
  actor: string | null;
402
402
  createdAt: string;
403
403
  }
404
+ interface IAdminReadinessProblem {
405
+ module: string;
406
+ severity: 'error' | 'warning';
407
+ message: string;
408
+ }
409
+ interface IAdminReadiness {
410
+ ok: boolean;
411
+ problems: IAdminReadinessProblem[];
412
+ }
413
+ interface IAdminModuleEntry {
414
+ name: string;
415
+ version: string | null;
416
+ readiness: IAdminReadiness;
417
+ describesAdmin: boolean;
418
+ }
419
+ interface IAdminRouteEntry {
420
+ method: string;
421
+ path: string;
422
+ module?: string;
423
+ }
424
+ interface IAdminManifest {
425
+ generatedAt: string;
426
+ env: string;
427
+ admin: {
428
+ version: string;
429
+ log: boolean;
430
+ };
431
+ modules: IAdminModuleEntry[];
432
+ readiness: IAdminReadiness;
433
+ routes: IAdminRouteEntry[];
434
+ }
435
+ interface IAdminCheckResult {
436
+ name: string;
437
+ module: string;
438
+ ok: boolean;
439
+ findings: string[];
440
+ skipped?: string;
441
+ durationMs: number;
442
+ }
443
+ interface IAdminDoctorReport {
444
+ generatedAt: string;
445
+ ok: boolean;
446
+ checks: IAdminCheckResult[];
447
+ }
448
+ interface IAdminAttentionItem {
449
+ source: string;
450
+ severity: 'error' | 'advice';
451
+ message: string;
452
+ }
453
+ interface IAdminAttention {
454
+ generatedAt: string;
455
+ ok: boolean;
456
+ items: IAdminAttentionItem[];
457
+ }
458
+ interface IAdminConfigReport {
459
+ generatedAt: string;
460
+ readiness: IAdminReadiness;
461
+ modules: Array<{
462
+ name: string;
463
+ problems: IAdminReadinessProblem[];
464
+ }>;
465
+ env: Array<{
466
+ name: string;
467
+ set: boolean;
468
+ }>;
469
+ }
470
+ type AdminRouteGuard = 'admin' | 'probe' | 'app';
471
+ interface IAdminRoutesReport {
472
+ generatedAt: string;
473
+ routes: Array<IAdminRouteEntry & {
474
+ guard: AdminRouteGuard;
475
+ }>;
476
+ }
477
+ interface IAdminTokensReport {
478
+ generatedAt: string;
479
+ admin: {
480
+ ok: boolean;
481
+ problems: IAdminReadinessProblem[];
482
+ };
483
+ legacy: Array<{
484
+ module: string;
485
+ set: boolean;
486
+ }>;
487
+ }
488
+ interface IAdminLogEntry {
489
+ id: string;
490
+ at: string;
491
+ actor: string;
492
+ method: string;
493
+ path: string;
494
+ route: string;
495
+ module: string;
496
+ status: number;
497
+ durationMs: number;
498
+ requestId: string | null;
499
+ clientIp: string | null;
500
+ }
501
+ interface IAdminLogPage {
502
+ entries: IAdminLogEntry[];
503
+ next: string | null;
504
+ }
404
505
  interface IConfigEntry {
405
506
  key: string;
406
507
  value: unknown;
@@ -1181,6 +1282,32 @@ declare class ConfigAdminClient {
1181
1282
  revealSecret(key: string, environment?: string): Promise<IApiResponse<IRevealSecretResult>>;
1182
1283
  }
1183
1284
 
1285
+ interface IAdminClientOptions {
1286
+ baseUrl: string;
1287
+ adminToken: string;
1288
+ prefix?: string;
1289
+ actor?: string;
1290
+ }
1291
+ interface IAdminLogQuery {
1292
+ limit?: number;
1293
+ before?: string;
1294
+ }
1295
+ declare class AdminClient {
1296
+ private http;
1297
+ private adminToken;
1298
+ private prefix;
1299
+ private actorHeaders;
1300
+ constructor(opts: IAdminClientOptions);
1301
+ private get;
1302
+ attention(): Promise<IApiResponse<IAdminAttention>>;
1303
+ manifest(): Promise<IApiResponse<IAdminManifest>>;
1304
+ doctor(): Promise<IApiResponse<IAdminDoctorReport>>;
1305
+ config(): Promise<IApiResponse<IAdminConfigReport>>;
1306
+ routes(): Promise<IApiResponse<IAdminRoutesReport>>;
1307
+ tokens(): Promise<IApiResponse<IAdminTokensReport>>;
1308
+ adminLog(query?: IAdminLogQuery): Promise<IApiResponse<IAdminLogPage>>;
1309
+ }
1310
+
1184
1311
  interface ISetTemplateInput {
1185
1312
  text: string;
1186
1313
  subject?: string;
@@ -1209,4 +1336,4 @@ declare class CourierAdminClient {
1209
1336
  rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
1210
1337
  }
1211
1338
 
1212
- 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 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 };
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 };
package/dist/index.js CHANGED
@@ -1664,6 +1664,53 @@ var ConfigAdminClient = class {
1664
1664
  }
1665
1665
  };
1666
1666
 
1667
+ // src/modules/admin.ts
1668
+ var AdminClient = class {
1669
+ http;
1670
+ adminToken;
1671
+ prefix;
1672
+ actorHeaders;
1673
+ constructor(opts) {
1674
+ this.http = new HttpClient(opts.baseUrl);
1675
+ this.adminToken = opts.adminToken;
1676
+ this.prefix = (opts.prefix ?? "/_admin").replace(/\/+$/, "");
1677
+ this.actorHeaders = opts.actor ? { "X-Actor": opts.actor } : void 0;
1678
+ }
1679
+ get(suffix) {
1680
+ return this.http.request({
1681
+ method: "GET",
1682
+ path: `${this.prefix}${suffix}`,
1683
+ token: this.adminToken,
1684
+ headers: this.actorHeaders
1685
+ });
1686
+ }
1687
+ attention() {
1688
+ return this.get("");
1689
+ }
1690
+ manifest() {
1691
+ return this.get("/manifest");
1692
+ }
1693
+ doctor() {
1694
+ return this.get("/doctor");
1695
+ }
1696
+ config() {
1697
+ return this.get("/config");
1698
+ }
1699
+ routes() {
1700
+ return this.get("/routes");
1701
+ }
1702
+ tokens() {
1703
+ return this.get("/access/tokens");
1704
+ }
1705
+ adminLog(query = {}) {
1706
+ const q = new URLSearchParams();
1707
+ if (query.limit) q.set("limit", String(query.limit));
1708
+ if (query.before) q.set("before", query.before);
1709
+ const qs = q.toString();
1710
+ return this.get(`/activity/admin-log${qs ? `?${qs}` : ""}`);
1711
+ }
1712
+ };
1713
+
1667
1714
  // src/modules/courier-admin.ts
1668
1715
  var CourierAdminClient = class {
1669
1716
  http;
@@ -1733,6 +1780,7 @@ function isMfaRequired(result) {
1733
1780
  return !("tokens" in result);
1734
1781
  }
1735
1782
  export {
1783
+ AdminClient,
1736
1784
  AuditClient,
1737
1785
  AuthClient,
1738
1786
  BillingClient,