@fonderie/client 1.10.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/brain/signatures.md +11 -0
- package/dist/index.cjs +48 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +45 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1724,6 +1724,25 @@ declare class CourierAdminClient {
|
|
|
1724
1724
|
previewTemplate(type: string, input: IPreviewTemplateInput, locale?: string | null): Promise<IApiResponse<IRenderedTemplateResult>>;
|
|
1725
1725
|
}
|
|
1726
1726
|
|
|
1727
|
+
/** One email and every locale it exists in. */
|
|
1728
|
+
interface ITemplateGroup {
|
|
1729
|
+
type: string;
|
|
1730
|
+
/** Default locale (null) first, then the rest alphabetically. */
|
|
1731
|
+
entries: ITemplateEntry[];
|
|
1732
|
+
/** The entry a click on the email itself should open: the default, else the first. */
|
|
1733
|
+
primary: ITemplateEntry;
|
|
1734
|
+
/** Built-in email (its default-locale row can never be deleted). */
|
|
1735
|
+
system: boolean;
|
|
1736
|
+
}
|
|
1737
|
+
/** Rows grouped by type, types in the order the server listed them. */
|
|
1738
|
+
declare function groupTemplatesByType(rows: readonly ITemplateEntry[]): ITemplateGroup[];
|
|
1739
|
+
/**
|
|
1740
|
+
* Locales the app already uses elsewhere that `type` has no version in yet —
|
|
1741
|
+
* what "Add locale" should suggest first. A French welcome email with no French
|
|
1742
|
+
* receipt is exactly the gap an operator is looking for.
|
|
1743
|
+
*/
|
|
1744
|
+
declare function missingTemplateLocales(rows: readonly ITemplateEntry[], type: string): string[];
|
|
1745
|
+
|
|
1727
1746
|
type ConfigValueType = 'string' | 'number' | 'boolean' | 'json';
|
|
1728
1747
|
declare const CONFIG_VALUE_TYPES: readonly ConfigValueType[];
|
|
1729
1748
|
/** The editor type for a stored value. Objects, arrays and null are JSON. */
|
|
@@ -2353,6 +2372,7 @@ declare const en: {
|
|
|
2353
2372
|
};
|
|
2354
2373
|
templates: {
|
|
2355
2374
|
defaultLocale: string;
|
|
2375
|
+
defaultChip: string;
|
|
2356
2376
|
builtInBadge: string;
|
|
2357
2377
|
subject: string;
|
|
2358
2378
|
htmlBody: string;
|
|
@@ -2362,9 +2382,12 @@ declare const en: {
|
|
|
2362
2382
|
newTemplate: string;
|
|
2363
2383
|
hint: string;
|
|
2364
2384
|
loading: string;
|
|
2385
|
+
openLocale: string;
|
|
2365
2386
|
};
|
|
2366
2387
|
editor: {
|
|
2367
2388
|
loading: string;
|
|
2389
|
+
locales: string;
|
|
2390
|
+
discardChanges: string;
|
|
2368
2391
|
addLocale: string;
|
|
2369
2392
|
builtInNote: string;
|
|
2370
2393
|
active: string;
|
|
@@ -2401,6 +2424,7 @@ declare const en: {
|
|
|
2401
2424
|
errorText: string;
|
|
2402
2425
|
exists: string;
|
|
2403
2426
|
existsLocale: string;
|
|
2427
|
+
untranslated: string;
|
|
2404
2428
|
};
|
|
2405
2429
|
};
|
|
2406
2430
|
};
|
|
@@ -2438,4 +2462,4 @@ type AdminT = ReturnType<typeof createAdminT>;
|
|
|
2438
2462
|
/** Dates in the console's language: 'date', 'datetime' or 'time'. */
|
|
2439
2463
|
declare function formatAdminDate(value: string | number | Date, locale?: AdminLocale | undefined, style?: 'date' | 'datetime' | 'time'): string;
|
|
2440
2464
|
|
|
2441
|
-
export { ADMIN_LOCALES, AdminClient, type AdminLocale, type AdminMessageKey, type AdminMessageParams, type AdminMessages, type AdminRouteGuard, type AdminScope, type AdminSessionState, type AdminT, AuditAdminClient, AuditClient, AuthAdminClient, AuthClient, BillingAdminClient, BillingClient, CONFIG_KEY_PATTERN, CONFIG_VALUE_TYPES, type CastResult, ConfigAdminClient, ConfigClient, type ConfigValueType, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, DEFAULT_ADMIN_LOCALE, 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 IAdminCreatedLink, type IAdminDoctorReport, type IAdminEnrollment, type IAdminEnvironmentReport, type IAdminGrantInput, type IAdminIssueTokenInput, type IAdminIssuedToken, type IAdminLedgerQuery, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminMigrationModule, type IAdminMigrationsReport, type IAdminModuleEntry, type IAdminOperator, type IAdminOperatorLink, type IAdminOperatorsReport, type IAdminPendingMigration, type IAdminPlanInput, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminSecondFactor, type IAdminSession, 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 IInferredConfigValue, 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 IRemoteConfigState, type IRenderedTemplateResult, type IRequestConfig, type IRequestLocationDTO, 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, type LocaleMap, MediaClient, type MigrationImpact, type SubscriberType, WebhooksClient, WorkspacesClient, adminLocaleNames, adminLocaleTags, castConfigValue, configKeyProblem, configValueLabel, configValueType, createAdminT, createMemoryCache, describeLocation, detectAdminLocale, formatAdminDate, formatConfigValue, inferConfigValue, isAdminLocale, isMfaRequired };
|
|
2465
|
+
export { ADMIN_LOCALES, AdminClient, type AdminLocale, type AdminMessageKey, type AdminMessageParams, type AdminMessages, type AdminRouteGuard, type AdminScope, type AdminSessionState, type AdminT, AuditAdminClient, AuditClient, AuthAdminClient, AuthClient, BillingAdminClient, BillingClient, CONFIG_KEY_PATTERN, CONFIG_VALUE_TYPES, type CastResult, ConfigAdminClient, ConfigClient, type ConfigValueType, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, DEFAULT_ADMIN_LOCALE, 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 IAdminCreatedLink, type IAdminDoctorReport, type IAdminEnrollment, type IAdminEnvironmentReport, type IAdminGrantInput, type IAdminIssueTokenInput, type IAdminIssuedToken, type IAdminLedgerQuery, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminMigrationModule, type IAdminMigrationsReport, type IAdminModuleEntry, type IAdminOperator, type IAdminOperatorLink, type IAdminOperatorsReport, type IAdminPendingMigration, type IAdminPlanInput, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminSecondFactor, type IAdminSession, 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 IInferredConfigValue, 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 IRemoteConfigState, type IRenderedTemplateResult, type IRequestConfig, type IRequestLocationDTO, 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 ITemplateGroup, 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, type LocaleMap, MediaClient, type MigrationImpact, type SubscriberType, WebhooksClient, WorkspacesClient, adminLocaleNames, adminLocaleTags, castConfigValue, configKeyProblem, configValueLabel, configValueType, createAdminT, createMemoryCache, describeLocation, detectAdminLocale, formatAdminDate, formatConfigValue, groupTemplatesByType, inferConfigValue, isAdminLocale, isMfaRequired, missingTemplateLocales };
|
package/dist/index.d.ts
CHANGED
|
@@ -1724,6 +1724,25 @@ declare class CourierAdminClient {
|
|
|
1724
1724
|
previewTemplate(type: string, input: IPreviewTemplateInput, locale?: string | null): Promise<IApiResponse<IRenderedTemplateResult>>;
|
|
1725
1725
|
}
|
|
1726
1726
|
|
|
1727
|
+
/** One email and every locale it exists in. */
|
|
1728
|
+
interface ITemplateGroup {
|
|
1729
|
+
type: string;
|
|
1730
|
+
/** Default locale (null) first, then the rest alphabetically. */
|
|
1731
|
+
entries: ITemplateEntry[];
|
|
1732
|
+
/** The entry a click on the email itself should open: the default, else the first. */
|
|
1733
|
+
primary: ITemplateEntry;
|
|
1734
|
+
/** Built-in email (its default-locale row can never be deleted). */
|
|
1735
|
+
system: boolean;
|
|
1736
|
+
}
|
|
1737
|
+
/** Rows grouped by type, types in the order the server listed them. */
|
|
1738
|
+
declare function groupTemplatesByType(rows: readonly ITemplateEntry[]): ITemplateGroup[];
|
|
1739
|
+
/**
|
|
1740
|
+
* Locales the app already uses elsewhere that `type` has no version in yet —
|
|
1741
|
+
* what "Add locale" should suggest first. A French welcome email with no French
|
|
1742
|
+
* receipt is exactly the gap an operator is looking for.
|
|
1743
|
+
*/
|
|
1744
|
+
declare function missingTemplateLocales(rows: readonly ITemplateEntry[], type: string): string[];
|
|
1745
|
+
|
|
1727
1746
|
type ConfigValueType = 'string' | 'number' | 'boolean' | 'json';
|
|
1728
1747
|
declare const CONFIG_VALUE_TYPES: readonly ConfigValueType[];
|
|
1729
1748
|
/** The editor type for a stored value. Objects, arrays and null are JSON. */
|
|
@@ -2353,6 +2372,7 @@ declare const en: {
|
|
|
2353
2372
|
};
|
|
2354
2373
|
templates: {
|
|
2355
2374
|
defaultLocale: string;
|
|
2375
|
+
defaultChip: string;
|
|
2356
2376
|
builtInBadge: string;
|
|
2357
2377
|
subject: string;
|
|
2358
2378
|
htmlBody: string;
|
|
@@ -2362,9 +2382,12 @@ declare const en: {
|
|
|
2362
2382
|
newTemplate: string;
|
|
2363
2383
|
hint: string;
|
|
2364
2384
|
loading: string;
|
|
2385
|
+
openLocale: string;
|
|
2365
2386
|
};
|
|
2366
2387
|
editor: {
|
|
2367
2388
|
loading: string;
|
|
2389
|
+
locales: string;
|
|
2390
|
+
discardChanges: string;
|
|
2368
2391
|
addLocale: string;
|
|
2369
2392
|
builtInNote: string;
|
|
2370
2393
|
active: string;
|
|
@@ -2401,6 +2424,7 @@ declare const en: {
|
|
|
2401
2424
|
errorText: string;
|
|
2402
2425
|
exists: string;
|
|
2403
2426
|
existsLocale: string;
|
|
2427
|
+
untranslated: string;
|
|
2404
2428
|
};
|
|
2405
2429
|
};
|
|
2406
2430
|
};
|
|
@@ -2438,4 +2462,4 @@ type AdminT = ReturnType<typeof createAdminT>;
|
|
|
2438
2462
|
/** Dates in the console's language: 'date', 'datetime' or 'time'. */
|
|
2439
2463
|
declare function formatAdminDate(value: string | number | Date, locale?: AdminLocale | undefined, style?: 'date' | 'datetime' | 'time'): string;
|
|
2440
2464
|
|
|
2441
|
-
export { ADMIN_LOCALES, AdminClient, type AdminLocale, type AdminMessageKey, type AdminMessageParams, type AdminMessages, type AdminRouteGuard, type AdminScope, type AdminSessionState, type AdminT, AuditAdminClient, AuditClient, AuthAdminClient, AuthClient, BillingAdminClient, BillingClient, CONFIG_KEY_PATTERN, CONFIG_VALUE_TYPES, type CastResult, ConfigAdminClient, ConfigClient, type ConfigValueType, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, DEFAULT_ADMIN_LOCALE, 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 IAdminCreatedLink, type IAdminDoctorReport, type IAdminEnrollment, type IAdminEnvironmentReport, type IAdminGrantInput, type IAdminIssueTokenInput, type IAdminIssuedToken, type IAdminLedgerQuery, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminMigrationModule, type IAdminMigrationsReport, type IAdminModuleEntry, type IAdminOperator, type IAdminOperatorLink, type IAdminOperatorsReport, type IAdminPendingMigration, type IAdminPlanInput, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminSecondFactor, type IAdminSession, 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 IInferredConfigValue, 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 IRemoteConfigState, type IRenderedTemplateResult, type IRequestConfig, type IRequestLocationDTO, 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, type LocaleMap, MediaClient, type MigrationImpact, type SubscriberType, WebhooksClient, WorkspacesClient, adminLocaleNames, adminLocaleTags, castConfigValue, configKeyProblem, configValueLabel, configValueType, createAdminT, createMemoryCache, describeLocation, detectAdminLocale, formatAdminDate, formatConfigValue, inferConfigValue, isAdminLocale, isMfaRequired };
|
|
2465
|
+
export { ADMIN_LOCALES, AdminClient, type AdminLocale, type AdminMessageKey, type AdminMessageParams, type AdminMessages, type AdminRouteGuard, type AdminScope, type AdminSessionState, type AdminT, AuditAdminClient, AuditClient, AuthAdminClient, AuthClient, BillingAdminClient, BillingClient, CONFIG_KEY_PATTERN, CONFIG_VALUE_TYPES, type CastResult, ConfigAdminClient, ConfigClient, type ConfigValueType, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, DEFAULT_ADMIN_LOCALE, 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 IAdminCreatedLink, type IAdminDoctorReport, type IAdminEnrollment, type IAdminEnvironmentReport, type IAdminGrantInput, type IAdminIssueTokenInput, type IAdminIssuedToken, type IAdminLedgerQuery, type IAdminLogEntry, type IAdminLogPage, type IAdminLogQuery, type IAdminLoginHistoryQuery, type IAdminManifest, type IAdminMigrationModule, type IAdminMigrationsReport, type IAdminModuleEntry, type IAdminOperator, type IAdminOperatorLink, type IAdminOperatorsReport, type IAdminPendingMigration, type IAdminPlanInput, type IAdminReadiness, type IAdminReadinessProblem, type IAdminRouteEntry, type IAdminRoutesReport, type IAdminSecondFactor, type IAdminSession, 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 IInferredConfigValue, 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 IRemoteConfigState, type IRenderedTemplateResult, type IRequestConfig, type IRequestLocationDTO, 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 ITemplateGroup, 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, type LocaleMap, MediaClient, type MigrationImpact, type SubscriberType, WebhooksClient, WorkspacesClient, adminLocaleNames, adminLocaleTags, castConfigValue, configKeyProblem, configValueLabel, configValueType, createAdminT, createMemoryCache, describeLocation, detectAdminLocale, formatAdminDate, formatConfigValue, groupTemplatesByType, inferConfigValue, isAdminLocale, isMfaRequired, missingTemplateLocales };
|
package/dist/index.js
CHANGED
|
@@ -2198,6 +2198,27 @@ var CourierAdminClient = class {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
};
|
|
2200
2200
|
|
|
2201
|
+
// src/template-locales.ts
|
|
2202
|
+
var byLocale = (a, b) => a.locale === b.locale ? 0 : a.locale === null ? -1 : b.locale === null ? 1 : a.locale.localeCompare(b.locale);
|
|
2203
|
+
function groupTemplatesByType(rows) {
|
|
2204
|
+
const groups = /* @__PURE__ */ new Map();
|
|
2205
|
+
for (const row of rows) {
|
|
2206
|
+
const entries = groups.get(row.type);
|
|
2207
|
+
if (entries) entries.push(row);
|
|
2208
|
+
else groups.set(row.type, [row]);
|
|
2209
|
+
}
|
|
2210
|
+
return [...groups].map(([type, entries]) => {
|
|
2211
|
+
entries.sort(byLocale);
|
|
2212
|
+
const primary = entries[0];
|
|
2213
|
+
return { type, entries, primary, system: entries.some((e) => e.system === true) };
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
function missingTemplateLocales(rows, type) {
|
|
2217
|
+
const has = new Set(rows.filter((r) => r.type === type).map((r) => r.locale));
|
|
2218
|
+
const used = new Set(rows.map((r) => r.locale).filter((l) => l !== null && !has.has(l)));
|
|
2219
|
+
return [...used].sort();
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2201
2222
|
// src/types.ts
|
|
2202
2223
|
function isMfaRequired(result) {
|
|
2203
2224
|
return !("tokens" in result);
|
|
@@ -2915,6 +2936,7 @@ var config_default = config;
|
|
|
2915
2936
|
// src/admin-i18n/en/templates.ts
|
|
2916
2937
|
var templates = {
|
|
2917
2938
|
defaultLocale: "default locale",
|
|
2939
|
+
defaultChip: "default",
|
|
2918
2940
|
builtInBadge: "built-in",
|
|
2919
2941
|
subject: "Subject",
|
|
2920
2942
|
htmlBody: "HTML body",
|
|
@@ -2923,10 +2945,13 @@ var templates = {
|
|
|
2923
2945
|
title: "Templates",
|
|
2924
2946
|
newTemplate: "New template",
|
|
2925
2947
|
hint: "Every email the app sends. Open one to edit its copy and preview it live.",
|
|
2926
|
-
loading: "Loading templates\u2026"
|
|
2948
|
+
loading: "Loading templates\u2026",
|
|
2949
|
+
openLocale: "Open the {locale} version of {type}"
|
|
2927
2950
|
},
|
|
2928
2951
|
editor: {
|
|
2929
2952
|
loading: "Loading template\u2026",
|
|
2953
|
+
locales: "Locales",
|
|
2954
|
+
discardChanges: "You have unsaved changes to this locale. Discard them and switch?",
|
|
2930
2955
|
addLocale: "+ Add locale",
|
|
2931
2956
|
builtInNote: "built-in email: edit or roll back, it cannot be deleted",
|
|
2932
2957
|
active: "Active",
|
|
@@ -2962,7 +2987,8 @@ var templates = {
|
|
|
2962
2987
|
errorLocale: "Locale: a language tag such as fr, es or fr-CA.",
|
|
2963
2988
|
errorText: "The plain-text body is required \u2014 it is what every email client can show.",
|
|
2964
2989
|
exists: '"{type}" already exists \u2014 open it from the list to edit.',
|
|
2965
|
-
existsLocale: '"{type}" ({locale}) already exists \u2014 open it from the list to edit.'
|
|
2990
|
+
existsLocale: '"{type}" ({locale}) already exists \u2014 open it from the list to edit.',
|
|
2991
|
+
untranslated: "Still the default copy: {fields}. Translate them before adding this locale."
|
|
2966
2992
|
}
|
|
2967
2993
|
};
|
|
2968
2994
|
var templates_default = templates;
|
|
@@ -3606,6 +3632,7 @@ var config_default2 = config2;
|
|
|
3606
3632
|
// src/admin-i18n/es/templates.ts
|
|
3607
3633
|
var templates2 = {
|
|
3608
3634
|
defaultLocale: "idioma predeterminado",
|
|
3635
|
+
defaultChip: "predeterminado",
|
|
3609
3636
|
builtInBadge: "integrado",
|
|
3610
3637
|
subject: "Asunto",
|
|
3611
3638
|
htmlBody: "Cuerpo HTML",
|
|
@@ -3614,10 +3641,13 @@ var templates2 = {
|
|
|
3614
3641
|
title: "Plantillas",
|
|
3615
3642
|
newTemplate: "Nueva plantilla",
|
|
3616
3643
|
hint: "Cada correo que env\xEDa la aplicaci\xF3n. Abre uno para editar su contenido y ver la vista previa en directo.",
|
|
3617
|
-
loading: "Cargando plantillas\u2026"
|
|
3644
|
+
loading: "Cargando plantillas\u2026",
|
|
3645
|
+
openLocale: "Abrir la versi\xF3n {locale} de {type}"
|
|
3618
3646
|
},
|
|
3619
3647
|
editor: {
|
|
3620
3648
|
loading: "Cargando plantilla\u2026",
|
|
3649
|
+
locales: "Idiomas",
|
|
3650
|
+
discardChanges: "Este idioma tiene cambios sin guardar. \xBFDescartarlos y cambiar de idioma?",
|
|
3621
3651
|
addLocale: "+ A\xF1adir idioma",
|
|
3622
3652
|
builtInNote: "correo integrado: se puede editar o restaurar, no eliminar",
|
|
3623
3653
|
active: "Activa",
|
|
@@ -3653,7 +3683,8 @@ var templates2 = {
|
|
|
3653
3683
|
errorLocale: "Idioma: una etiqueta de idioma como fr, es o fr-CA.",
|
|
3654
3684
|
errorText: "El cuerpo en texto plano es obligatorio \u2014 es lo que puede mostrar cualquier cliente de correo.",
|
|
3655
3685
|
exists: '"{type}" ya existe \u2014 \xE1brela desde la lista para editarla.',
|
|
3656
|
-
existsLocale: '"{type}" ({locale}) ya existe \u2014 \xE1brela desde la lista para editarla.'
|
|
3686
|
+
existsLocale: '"{type}" ({locale}) ya existe \u2014 \xE1brela desde la lista para editarla.',
|
|
3687
|
+
untranslated: "Todav\xEDa en la versi\xF3n predeterminada: {fields}. Trad\xFAcelos antes de a\xF1adir este idioma."
|
|
3657
3688
|
}
|
|
3658
3689
|
};
|
|
3659
3690
|
var templates_default2 = templates2;
|
|
@@ -4297,6 +4328,7 @@ var config_default3 = config3;
|
|
|
4297
4328
|
// src/admin-i18n/fr/templates.ts
|
|
4298
4329
|
var templates3 = {
|
|
4299
4330
|
defaultLocale: "langue par d\xE9faut",
|
|
4331
|
+
defaultChip: "par d\xE9faut",
|
|
4300
4332
|
builtInBadge: "int\xE9gr\xE9",
|
|
4301
4333
|
subject: "Objet",
|
|
4302
4334
|
htmlBody: "Corps HTML",
|
|
@@ -4305,10 +4337,13 @@ var templates3 = {
|
|
|
4305
4337
|
title: "Mod\xE8les",
|
|
4306
4338
|
newTemplate: "Nouveau mod\xE8le",
|
|
4307
4339
|
hint: "Chaque e-mail envoy\xE9 par l'application. Ouvrez-en un pour modifier son contenu et le pr\xE9visualiser en direct.",
|
|
4308
|
-
loading: "Chargement des mod\xE8les\u2026"
|
|
4340
|
+
loading: "Chargement des mod\xE8les\u2026",
|
|
4341
|
+
openLocale: "Ouvrir la version {locale} de {type}"
|
|
4309
4342
|
},
|
|
4310
4343
|
editor: {
|
|
4311
4344
|
loading: "Chargement du mod\xE8le\u2026",
|
|
4345
|
+
locales: "Langues",
|
|
4346
|
+
discardChanges: "Cette langue a des modifications non enregistr\xE9es. Les abandonner et changer de langue ?",
|
|
4312
4347
|
addLocale: "+ Ajouter une langue",
|
|
4313
4348
|
builtInNote: "e-mail int\xE9gr\xE9 : modifiable ou restaurable, mais pas supprimable",
|
|
4314
4349
|
active: "Actif",
|
|
@@ -4344,7 +4379,8 @@ var templates3 = {
|
|
|
4344
4379
|
errorLocale: "Langue : une \xE9tiquette de langue comme fr, es ou fr-CA.",
|
|
4345
4380
|
errorText: "Le corps en texte brut est obligatoire \u2014 c\u2019est ce que tout client e-mail peut afficher.",
|
|
4346
4381
|
exists: "\xAB {type} \xBB existe d\xE9j\xE0 \u2014 ouvrez-le depuis la liste pour le modifier.",
|
|
4347
|
-
existsLocale: "\xAB {type} \xBB ({locale}) existe d\xE9j\xE0 \u2014 ouvrez-le depuis la liste pour le modifier."
|
|
4382
|
+
existsLocale: "\xAB {type} \xBB ({locale}) existe d\xE9j\xE0 \u2014 ouvrez-le depuis la liste pour le modifier.",
|
|
4383
|
+
untranslated: "Encore dans la version par d\xE9faut : {fields}. Traduisez-les avant d\u2019ajouter cette langue."
|
|
4348
4384
|
}
|
|
4349
4385
|
};
|
|
4350
4386
|
var templates_default3 = templates3;
|
|
@@ -4428,8 +4464,10 @@ export {
|
|
|
4428
4464
|
detectAdminLocale,
|
|
4429
4465
|
formatAdminDate,
|
|
4430
4466
|
formatConfigValue,
|
|
4467
|
+
groupTemplatesByType,
|
|
4431
4468
|
inferConfigValue,
|
|
4432
4469
|
isAdminLocale,
|
|
4433
|
-
isMfaRequired
|
|
4470
|
+
isMfaRequired,
|
|
4471
|
+
missingTemplateLocales
|
|
4434
4472
|
};
|
|
4435
4473
|
//# sourceMappingURL=index.js.map
|