@fonderie/client 1.12.0 → 1.13.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/brain/signatures.md +52 -0
- package/dist/index.cjs +123 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +84 -1
- package/dist/index.d.ts +84 -1
- package/dist/index.js +120 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -380,6 +380,47 @@ interface IAcceptInvitationResult {
|
|
|
380
380
|
interface IWorkspaceSettingsResult {
|
|
381
381
|
settings: IWorkspaceSettingsDTO;
|
|
382
382
|
}
|
|
383
|
+
interface ITemplateCatalog {
|
|
384
|
+
/** The system locale: the default (untagged) version is written in it. */
|
|
385
|
+
defaultLocale: string;
|
|
386
|
+
/** Per market or language, where its content comes from, before the system locale. */
|
|
387
|
+
fallbacks: Record<string, string[]>;
|
|
388
|
+
emails: ITemplateCatalogEntry[];
|
|
389
|
+
}
|
|
390
|
+
interface ITemplateCatalogEntry {
|
|
391
|
+
type: string;
|
|
392
|
+
/** Built-in email: its default version can be edited and rolled back, never deleted. */
|
|
393
|
+
system: boolean;
|
|
394
|
+
/** What Fonderie ships: the English default, and the other languages. */
|
|
395
|
+
builtIn: {
|
|
396
|
+
default: boolean;
|
|
397
|
+
languages: string[];
|
|
398
|
+
};
|
|
399
|
+
/** The app's saved versions (locale null = the default version). */
|
|
400
|
+
versions: Array<{
|
|
401
|
+
locale: string | null;
|
|
402
|
+
active: boolean;
|
|
403
|
+
version: number;
|
|
404
|
+
updatedAt: string;
|
|
405
|
+
}>;
|
|
406
|
+
}
|
|
407
|
+
interface IBuiltInTemplate {
|
|
408
|
+
type: string;
|
|
409
|
+
/** The language key it matched ('fr' for fr-CA), or the system locale for the English. */
|
|
410
|
+
locale: string;
|
|
411
|
+
subject: string | null;
|
|
412
|
+
html: string | null;
|
|
413
|
+
text: string;
|
|
414
|
+
}
|
|
415
|
+
interface ITemplateResolution {
|
|
416
|
+
requested: string;
|
|
417
|
+
/** Locales tried before the system locale, in order. */
|
|
418
|
+
chain: string[];
|
|
419
|
+
defaultLocale: string;
|
|
420
|
+
/** The version used: a saved tag, a built-in language, or the system locale. */
|
|
421
|
+
sent: string;
|
|
422
|
+
source: 'saved' | 'built-in';
|
|
423
|
+
}
|
|
383
424
|
interface ITemplateEntry {
|
|
384
425
|
system?: boolean;
|
|
385
426
|
type: string;
|
|
@@ -1722,6 +1763,9 @@ declare class CourierAdminClient {
|
|
|
1722
1763
|
constructor(opts: ICourierAdminClientOptions);
|
|
1723
1764
|
private rebase;
|
|
1724
1765
|
listTemplates(): Promise<IApiResponse<ITemplateEntry[]>>;
|
|
1766
|
+
getTemplateCatalog(): Promise<IApiResponse<ITemplateCatalog>>;
|
|
1767
|
+
getBuiltInTemplate(type: string, locale?: string | null): Promise<IApiResponse<IBuiltInTemplate>>;
|
|
1768
|
+
resolveTemplate(type: string, locale?: string | null): Promise<IApiResponse<ITemplateResolution>>;
|
|
1725
1769
|
getTemplate(type: string, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
|
|
1726
1770
|
setTemplate(type: string, input: ISetTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
|
|
1727
1771
|
deleteTemplate(type: string, locale?: string | null): Promise<IApiResponse<undefined>>;
|
|
@@ -1748,6 +1792,32 @@ declare function groupTemplatesByType(rows: readonly ITemplateEntry[]): ITemplat
|
|
|
1748
1792
|
* receipt is exactly the gap an operator is looking for.
|
|
1749
1793
|
*/
|
|
1750
1794
|
declare function missingTemplateLocales(rows: readonly ITemplateEntry[], type: string): string[];
|
|
1795
|
+
/** One language an email exists in, as the console shows it. */
|
|
1796
|
+
interface ITemplateLanguage {
|
|
1797
|
+
/** What to open: null is the default version. */
|
|
1798
|
+
locale: string | null;
|
|
1799
|
+
/** What to show: the default version is labelled with the system locale. */
|
|
1800
|
+
label: string;
|
|
1801
|
+
/** The app saved this version (else it is Fonderie's built-in copy, untouched). */
|
|
1802
|
+
saved: boolean;
|
|
1803
|
+
/** Fonderie ships this language. */
|
|
1804
|
+
builtIn: boolean;
|
|
1805
|
+
/** A saved version switched off is skipped when sending. Built-in copy is always on. */
|
|
1806
|
+
active: boolean;
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Every language one email exists in, sorted by label — the default version
|
|
1810
|
+
* shown as the system locale ('en-US'), then e.g. 'es', 'fr', 'fr-CA'. A saved
|
|
1811
|
+
* version and the built-in copy of the same language are one entry: the saved
|
|
1812
|
+
* one is what sends.
|
|
1813
|
+
*/
|
|
1814
|
+
declare function templateLanguages(email: ITemplateCatalogEntry, defaultLocale: string): ITemplateLanguage[];
|
|
1815
|
+
/**
|
|
1816
|
+
* What "Add locale" should suggest for `type`: locales the app already uses on
|
|
1817
|
+
* other emails (saved or built-in) that this one lacks. Never the system locale
|
|
1818
|
+
* — the default version already is that locale.
|
|
1819
|
+
*/
|
|
1820
|
+
declare function suggestTemplateLocales(catalog: ITemplateCatalog, type: string): string[];
|
|
1751
1821
|
|
|
1752
1822
|
type ConfigValueType = 'string' | 'number' | 'boolean' | 'json';
|
|
1753
1823
|
declare const CONFIG_VALUE_TYPES: readonly ConfigValueType[];
|
|
@@ -2389,6 +2459,8 @@ declare const en: {
|
|
|
2389
2459
|
hint: string;
|
|
2390
2460
|
loading: string;
|
|
2391
2461
|
openLocale: string;
|
|
2462
|
+
legend: string;
|
|
2463
|
+
languages: string;
|
|
2392
2464
|
};
|
|
2393
2465
|
editor: {
|
|
2394
2466
|
loading: string;
|
|
@@ -2412,6 +2484,16 @@ declare const en: {
|
|
|
2412
2484
|
rollBack: string;
|
|
2413
2485
|
confirmDelete: string;
|
|
2414
2486
|
confirmDeleteLocale: string;
|
|
2487
|
+
builtInCopy: string;
|
|
2488
|
+
resetToBuiltIn: string;
|
|
2489
|
+
confirmReset: string;
|
|
2490
|
+
chain: string;
|
|
2491
|
+
whoReceives: string;
|
|
2492
|
+
whoPlaceholder: string;
|
|
2493
|
+
check: string;
|
|
2494
|
+
receives: string;
|
|
2495
|
+
sourceSaved: string;
|
|
2496
|
+
sourceBuiltIn: string;
|
|
2415
2497
|
};
|
|
2416
2498
|
create: {
|
|
2417
2499
|
titleNew: string;
|
|
@@ -2431,6 +2513,7 @@ declare const en: {
|
|
|
2431
2513
|
exists: string;
|
|
2432
2514
|
existsLocale: string;
|
|
2433
2515
|
untranslated: string;
|
|
2516
|
+
errorDefaultLocale: string;
|
|
2434
2517
|
};
|
|
2435
2518
|
};
|
|
2436
2519
|
};
|
|
@@ -2468,4 +2551,4 @@ type AdminT = ReturnType<typeof createAdminT>;
|
|
|
2468
2551
|
/** Dates in the console's language: 'date', 'datetime' or 'time'. */
|
|
2469
2552
|
declare function formatAdminDate(value: string | number | Date, locale?: AdminLocale | undefined, style?: 'date' | 'datetime' | 'time'): string;
|
|
2470
2553
|
|
|
2471
|
-
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 };
|
|
2554
|
+
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 IBuiltInTemplate, 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 ITemplateCatalog, type ITemplateCatalogEntry, type ITemplateEntry, type ITemplateGroup, type ITemplateLanguage, type ITemplateResolution, 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, suggestTemplateLocales, templateLanguages };
|
package/dist/index.d.ts
CHANGED
|
@@ -380,6 +380,47 @@ interface IAcceptInvitationResult {
|
|
|
380
380
|
interface IWorkspaceSettingsResult {
|
|
381
381
|
settings: IWorkspaceSettingsDTO;
|
|
382
382
|
}
|
|
383
|
+
interface ITemplateCatalog {
|
|
384
|
+
/** The system locale: the default (untagged) version is written in it. */
|
|
385
|
+
defaultLocale: string;
|
|
386
|
+
/** Per market or language, where its content comes from, before the system locale. */
|
|
387
|
+
fallbacks: Record<string, string[]>;
|
|
388
|
+
emails: ITemplateCatalogEntry[];
|
|
389
|
+
}
|
|
390
|
+
interface ITemplateCatalogEntry {
|
|
391
|
+
type: string;
|
|
392
|
+
/** Built-in email: its default version can be edited and rolled back, never deleted. */
|
|
393
|
+
system: boolean;
|
|
394
|
+
/** What Fonderie ships: the English default, and the other languages. */
|
|
395
|
+
builtIn: {
|
|
396
|
+
default: boolean;
|
|
397
|
+
languages: string[];
|
|
398
|
+
};
|
|
399
|
+
/** The app's saved versions (locale null = the default version). */
|
|
400
|
+
versions: Array<{
|
|
401
|
+
locale: string | null;
|
|
402
|
+
active: boolean;
|
|
403
|
+
version: number;
|
|
404
|
+
updatedAt: string;
|
|
405
|
+
}>;
|
|
406
|
+
}
|
|
407
|
+
interface IBuiltInTemplate {
|
|
408
|
+
type: string;
|
|
409
|
+
/** The language key it matched ('fr' for fr-CA), or the system locale for the English. */
|
|
410
|
+
locale: string;
|
|
411
|
+
subject: string | null;
|
|
412
|
+
html: string | null;
|
|
413
|
+
text: string;
|
|
414
|
+
}
|
|
415
|
+
interface ITemplateResolution {
|
|
416
|
+
requested: string;
|
|
417
|
+
/** Locales tried before the system locale, in order. */
|
|
418
|
+
chain: string[];
|
|
419
|
+
defaultLocale: string;
|
|
420
|
+
/** The version used: a saved tag, a built-in language, or the system locale. */
|
|
421
|
+
sent: string;
|
|
422
|
+
source: 'saved' | 'built-in';
|
|
423
|
+
}
|
|
383
424
|
interface ITemplateEntry {
|
|
384
425
|
system?: boolean;
|
|
385
426
|
type: string;
|
|
@@ -1722,6 +1763,9 @@ declare class CourierAdminClient {
|
|
|
1722
1763
|
constructor(opts: ICourierAdminClientOptions);
|
|
1723
1764
|
private rebase;
|
|
1724
1765
|
listTemplates(): Promise<IApiResponse<ITemplateEntry[]>>;
|
|
1766
|
+
getTemplateCatalog(): Promise<IApiResponse<ITemplateCatalog>>;
|
|
1767
|
+
getBuiltInTemplate(type: string, locale?: string | null): Promise<IApiResponse<IBuiltInTemplate>>;
|
|
1768
|
+
resolveTemplate(type: string, locale?: string | null): Promise<IApiResponse<ITemplateResolution>>;
|
|
1725
1769
|
getTemplate(type: string, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
|
|
1726
1770
|
setTemplate(type: string, input: ISetTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
|
|
1727
1771
|
deleteTemplate(type: string, locale?: string | null): Promise<IApiResponse<undefined>>;
|
|
@@ -1748,6 +1792,32 @@ declare function groupTemplatesByType(rows: readonly ITemplateEntry[]): ITemplat
|
|
|
1748
1792
|
* receipt is exactly the gap an operator is looking for.
|
|
1749
1793
|
*/
|
|
1750
1794
|
declare function missingTemplateLocales(rows: readonly ITemplateEntry[], type: string): string[];
|
|
1795
|
+
/** One language an email exists in, as the console shows it. */
|
|
1796
|
+
interface ITemplateLanguage {
|
|
1797
|
+
/** What to open: null is the default version. */
|
|
1798
|
+
locale: string | null;
|
|
1799
|
+
/** What to show: the default version is labelled with the system locale. */
|
|
1800
|
+
label: string;
|
|
1801
|
+
/** The app saved this version (else it is Fonderie's built-in copy, untouched). */
|
|
1802
|
+
saved: boolean;
|
|
1803
|
+
/** Fonderie ships this language. */
|
|
1804
|
+
builtIn: boolean;
|
|
1805
|
+
/** A saved version switched off is skipped when sending. Built-in copy is always on. */
|
|
1806
|
+
active: boolean;
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Every language one email exists in, sorted by label — the default version
|
|
1810
|
+
* shown as the system locale ('en-US'), then e.g. 'es', 'fr', 'fr-CA'. A saved
|
|
1811
|
+
* version and the built-in copy of the same language are one entry: the saved
|
|
1812
|
+
* one is what sends.
|
|
1813
|
+
*/
|
|
1814
|
+
declare function templateLanguages(email: ITemplateCatalogEntry, defaultLocale: string): ITemplateLanguage[];
|
|
1815
|
+
/**
|
|
1816
|
+
* What "Add locale" should suggest for `type`: locales the app already uses on
|
|
1817
|
+
* other emails (saved or built-in) that this one lacks. Never the system locale
|
|
1818
|
+
* — the default version already is that locale.
|
|
1819
|
+
*/
|
|
1820
|
+
declare function suggestTemplateLocales(catalog: ITemplateCatalog, type: string): string[];
|
|
1751
1821
|
|
|
1752
1822
|
type ConfigValueType = 'string' | 'number' | 'boolean' | 'json';
|
|
1753
1823
|
declare const CONFIG_VALUE_TYPES: readonly ConfigValueType[];
|
|
@@ -2389,6 +2459,8 @@ declare const en: {
|
|
|
2389
2459
|
hint: string;
|
|
2390
2460
|
loading: string;
|
|
2391
2461
|
openLocale: string;
|
|
2462
|
+
legend: string;
|
|
2463
|
+
languages: string;
|
|
2392
2464
|
};
|
|
2393
2465
|
editor: {
|
|
2394
2466
|
loading: string;
|
|
@@ -2412,6 +2484,16 @@ declare const en: {
|
|
|
2412
2484
|
rollBack: string;
|
|
2413
2485
|
confirmDelete: string;
|
|
2414
2486
|
confirmDeleteLocale: string;
|
|
2487
|
+
builtInCopy: string;
|
|
2488
|
+
resetToBuiltIn: string;
|
|
2489
|
+
confirmReset: string;
|
|
2490
|
+
chain: string;
|
|
2491
|
+
whoReceives: string;
|
|
2492
|
+
whoPlaceholder: string;
|
|
2493
|
+
check: string;
|
|
2494
|
+
receives: string;
|
|
2495
|
+
sourceSaved: string;
|
|
2496
|
+
sourceBuiltIn: string;
|
|
2415
2497
|
};
|
|
2416
2498
|
create: {
|
|
2417
2499
|
titleNew: string;
|
|
@@ -2431,6 +2513,7 @@ declare const en: {
|
|
|
2431
2513
|
exists: string;
|
|
2432
2514
|
existsLocale: string;
|
|
2433
2515
|
untranslated: string;
|
|
2516
|
+
errorDefaultLocale: string;
|
|
2434
2517
|
};
|
|
2435
2518
|
};
|
|
2436
2519
|
};
|
|
@@ -2468,4 +2551,4 @@ type AdminT = ReturnType<typeof createAdminT>;
|
|
|
2468
2551
|
/** Dates in the console's language: 'date', 'datetime' or 'time'. */
|
|
2469
2552
|
declare function formatAdminDate(value: string | number | Date, locale?: AdminLocale | undefined, style?: 'date' | 'datetime' | 'time'): string;
|
|
2470
2553
|
|
|
2471
|
-
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 };
|
|
2554
|
+
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 IBuiltInTemplate, 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 ITemplateCatalog, type ITemplateCatalogEntry, type ITemplateEntry, type ITemplateGroup, type ITemplateLanguage, type ITemplateResolution, 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, suggestTemplateLocales, templateLanguages };
|
package/dist/index.js
CHANGED
|
@@ -2125,6 +2125,41 @@ var CourierAdminClient = class {
|
|
|
2125
2125
|
})
|
|
2126
2126
|
);
|
|
2127
2127
|
}
|
|
2128
|
+
// Every email — saved or built-in only — with its languages and the app's
|
|
2129
|
+
// locales. The flat listTemplates() only sees saved rows.
|
|
2130
|
+
getTemplateCatalog() {
|
|
2131
|
+
return this.http.request(
|
|
2132
|
+
this.rebase({
|
|
2133
|
+
method: "GET",
|
|
2134
|
+
path: "/admin/template-catalog",
|
|
2135
|
+
token: this.adminToken
|
|
2136
|
+
})
|
|
2137
|
+
);
|
|
2138
|
+
}
|
|
2139
|
+
// Fonderie's own copy in a language (omitted: the English default). 404 when
|
|
2140
|
+
// none ships in that language.
|
|
2141
|
+
getBuiltInTemplate(type, locale) {
|
|
2142
|
+
const q = locale ? `?locale=${encodeURIComponent(locale)}` : "";
|
|
2143
|
+
return this.http.request(
|
|
2144
|
+
this.rebase({
|
|
2145
|
+
method: "GET",
|
|
2146
|
+
path: `/admin/templates/${encodeURIComponent(type)}/built-in${q}`,
|
|
2147
|
+
token: this.adminToken
|
|
2148
|
+
})
|
|
2149
|
+
);
|
|
2150
|
+
}
|
|
2151
|
+
// Who receives what: decided server-side by the same function a real send
|
|
2152
|
+
// runs, so the answer cannot drift from delivery.
|
|
2153
|
+
resolveTemplate(type, locale) {
|
|
2154
|
+
const q = locale ? `?locale=${encodeURIComponent(locale)}` : "";
|
|
2155
|
+
return this.http.request(
|
|
2156
|
+
this.rebase({
|
|
2157
|
+
method: "GET",
|
|
2158
|
+
path: `/admin/templates/${encodeURIComponent(type)}/resolve${q}`,
|
|
2159
|
+
token: this.adminToken
|
|
2160
|
+
})
|
|
2161
|
+
);
|
|
2162
|
+
}
|
|
2128
2163
|
getTemplate(type, locale) {
|
|
2129
2164
|
const q = locale ? `?locale=${encodeURIComponent(locale)}` : "";
|
|
2130
2165
|
return this.http.request(
|
|
@@ -2218,6 +2253,40 @@ function missingTemplateLocales(rows, type) {
|
|
|
2218
2253
|
const used = new Set(rows.map((r) => r.locale).filter((l) => l !== null && !has.has(l)));
|
|
2219
2254
|
return [...used].sort();
|
|
2220
2255
|
}
|
|
2256
|
+
function templateLanguages(email, defaultLocale) {
|
|
2257
|
+
const out = /* @__PURE__ */ new Map();
|
|
2258
|
+
const saved = new Map(email.versions.map((v) => [v.locale, v]));
|
|
2259
|
+
const base = saved.get(null);
|
|
2260
|
+
if (base || email.builtIn.default) {
|
|
2261
|
+
out.set("", {
|
|
2262
|
+
locale: null,
|
|
2263
|
+
label: defaultLocale,
|
|
2264
|
+
saved: Boolean(base),
|
|
2265
|
+
builtIn: email.builtIn.default,
|
|
2266
|
+
active: base ? base.active : true
|
|
2267
|
+
});
|
|
2268
|
+
}
|
|
2269
|
+
for (const lang of email.builtIn.languages) {
|
|
2270
|
+
const own = saved.get(lang);
|
|
2271
|
+
out.set(lang, { locale: lang, label: lang, saved: Boolean(own), builtIn: true, active: own ? own.active : true });
|
|
2272
|
+
}
|
|
2273
|
+
for (const v of email.versions) {
|
|
2274
|
+
if (v.locale === null || out.has(v.locale)) continue;
|
|
2275
|
+
out.set(v.locale, { locale: v.locale, label: v.locale, saved: true, builtIn: false, active: v.active });
|
|
2276
|
+
}
|
|
2277
|
+
return [...out.values()].sort((a, b) => a.label.localeCompare(b.label));
|
|
2278
|
+
}
|
|
2279
|
+
function suggestTemplateLocales(catalog4, type) {
|
|
2280
|
+
const email = catalog4.emails.find((e) => e.type === type);
|
|
2281
|
+
const has = new Set(email ? templateLanguages(email, catalog4.defaultLocale).map((l) => l.label) : []);
|
|
2282
|
+
const used = /* @__PURE__ */ new Set();
|
|
2283
|
+
for (const e of catalog4.emails) {
|
|
2284
|
+
for (const l of templateLanguages(e, catalog4.defaultLocale)) {
|
|
2285
|
+
if (l.locale !== null && !has.has(l.label)) used.add(l.label);
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
return [...used].sort();
|
|
2289
|
+
}
|
|
2221
2290
|
|
|
2222
2291
|
// src/types.ts
|
|
2223
2292
|
function isMfaRequired(result) {
|
|
@@ -2946,7 +3015,9 @@ var templates = {
|
|
|
2946
3015
|
newTemplate: "New template",
|
|
2947
3016
|
hint: "Every email the app sends. Open one to edit its copy and preview it live.",
|
|
2948
3017
|
loading: "Loading templates\u2026",
|
|
2949
|
-
openLocale: "Open the {locale} version of {type}"
|
|
3018
|
+
openLocale: "Open the {locale} version of {type}",
|
|
3019
|
+
legend: "Solid: a version you saved. Dashed: Fonderie\u2019s built-in copy, not edited. Struck through: switched off.",
|
|
3020
|
+
languages: "Languages"
|
|
2950
3021
|
},
|
|
2951
3022
|
editor: {
|
|
2952
3023
|
loading: "Loading template\u2026",
|
|
@@ -2969,7 +3040,17 @@ var templates = {
|
|
|
2969
3040
|
unknownActor: "unknown",
|
|
2970
3041
|
rollBack: "Roll back",
|
|
2971
3042
|
confirmDelete: 'Delete "{type}"?',
|
|
2972
|
-
confirmDeleteLocale: 'Delete the {locale} version of "{type}"? People in that locale will receive the default version.'
|
|
3043
|
+
confirmDeleteLocale: 'Delete the {locale} version of "{type}"? People in that locale will receive the default version.',
|
|
3044
|
+
builtInCopy: "Fonderie\u2019s built-in copy. Saving creates your own version of it.",
|
|
3045
|
+
resetToBuiltIn: "Reset to built-in",
|
|
3046
|
+
confirmReset: "Replace your {locale} version with Fonderie\u2019s built-in copy?",
|
|
3047
|
+
chain: "Fallback: {chain}",
|
|
3048
|
+
whoReceives: "Who receives what",
|
|
3049
|
+
whoPlaceholder: "A locale, e.g. fr-BE",
|
|
3050
|
+
check: "Check",
|
|
3051
|
+
receives: "A {requested} user receives the {sent} version.",
|
|
3052
|
+
sourceSaved: "It is your saved version.",
|
|
3053
|
+
sourceBuiltIn: "It is Fonderie\u2019s built-in copy."
|
|
2973
3054
|
},
|
|
2974
3055
|
create: {
|
|
2975
3056
|
titleNew: "New template",
|
|
@@ -2988,7 +3069,8 @@ var templates = {
|
|
|
2988
3069
|
errorText: "The plain-text body is required \u2014 it is what every email client can show.",
|
|
2989
3070
|
exists: '"{type}" already exists \u2014 open it from the list to edit.',
|
|
2990
3071
|
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."
|
|
3072
|
+
untranslated: "Still the default copy: {fields}. Translate them before adding this locale.",
|
|
3073
|
+
errorDefaultLocale: "{locale} is the default version of this email. Edit the default instead."
|
|
2992
3074
|
}
|
|
2993
3075
|
};
|
|
2994
3076
|
var templates_default = templates;
|
|
@@ -3642,7 +3724,9 @@ var templates2 = {
|
|
|
3642
3724
|
newTemplate: "Nueva plantilla",
|
|
3643
3725
|
hint: "Cada correo que env\xEDa la aplicaci\xF3n. Abre uno para editar su contenido y ver la vista previa en directo.",
|
|
3644
3726
|
loading: "Cargando plantillas\u2026",
|
|
3645
|
-
openLocale: "Abrir la versi\xF3n {locale} de {type}"
|
|
3727
|
+
openLocale: "Abrir la versi\xF3n {locale} de {type}",
|
|
3728
|
+
legend: "S\xF3lido: una versi\xF3n que guardaste. Discontinuo: la versi\xF3n integrada de Fonderie, sin editar. Tachado: desactivada.",
|
|
3729
|
+
languages: "Idiomas"
|
|
3646
3730
|
},
|
|
3647
3731
|
editor: {
|
|
3648
3732
|
loading: "Cargando plantilla\u2026",
|
|
@@ -3665,7 +3749,17 @@ var templates2 = {
|
|
|
3665
3749
|
unknownActor: "desconocido",
|
|
3666
3750
|
rollBack: "Restaurar",
|
|
3667
3751
|
confirmDelete: '\xBFEliminar "{type}"?',
|
|
3668
|
-
confirmDeleteLocale: '\xBFEliminar la versi\xF3n {locale} de "{type}"? Las personas de ese idioma recibir\xE1n la versi\xF3n predeterminada.'
|
|
3752
|
+
confirmDeleteLocale: '\xBFEliminar la versi\xF3n {locale} de "{type}"? Las personas de ese idioma recibir\xE1n la versi\xF3n predeterminada.',
|
|
3753
|
+
builtInCopy: "Versi\xF3n integrada de Fonderie. Al guardarla se crea tu propia versi\xF3n.",
|
|
3754
|
+
resetToBuiltIn: "Restablecer la versi\xF3n integrada",
|
|
3755
|
+
confirmReset: "\xBFReemplazar tu versi\xF3n {locale} por la versi\xF3n integrada de Fonderie?",
|
|
3756
|
+
chain: "Respaldo: {chain}",
|
|
3757
|
+
whoReceives: "Qui\xE9n recibe qu\xE9",
|
|
3758
|
+
whoPlaceholder: "Un idioma, p. ej. fr-BE",
|
|
3759
|
+
check: "Comprobar",
|
|
3760
|
+
receives: "Un usuario {requested} recibe la versi\xF3n {sent}.",
|
|
3761
|
+
sourceSaved: "Es tu versi\xF3n guardada.",
|
|
3762
|
+
sourceBuiltIn: "Es la versi\xF3n integrada de Fonderie."
|
|
3669
3763
|
},
|
|
3670
3764
|
create: {
|
|
3671
3765
|
titleNew: "Nueva plantilla",
|
|
@@ -3684,7 +3778,8 @@ var templates2 = {
|
|
|
3684
3778
|
errorText: "El cuerpo en texto plano es obligatorio \u2014 es lo que puede mostrar cualquier cliente de correo.",
|
|
3685
3779
|
exists: '"{type}" ya existe \u2014 \xE1brela desde la lista para editarla.',
|
|
3686
3780
|
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."
|
|
3781
|
+
untranslated: "Todav\xEDa en la versi\xF3n predeterminada: {fields}. Trad\xFAcelos antes de a\xF1adir este idioma.",
|
|
3782
|
+
errorDefaultLocale: "{locale} es la versi\xF3n predeterminada de este correo. Edita la predeterminada en su lugar."
|
|
3688
3783
|
}
|
|
3689
3784
|
};
|
|
3690
3785
|
var templates_default2 = templates2;
|
|
@@ -4338,7 +4433,9 @@ var templates3 = {
|
|
|
4338
4433
|
newTemplate: "Nouveau mod\xE8le",
|
|
4339
4434
|
hint: "Chaque e-mail envoy\xE9 par l'application. Ouvrez-en un pour modifier son contenu et le pr\xE9visualiser en direct.",
|
|
4340
4435
|
loading: "Chargement des mod\xE8les\u2026",
|
|
4341
|
-
openLocale: "Ouvrir la version {locale} de {type}"
|
|
4436
|
+
openLocale: "Ouvrir la version {locale} de {type}",
|
|
4437
|
+
legend: "Plein : une version que vous avez enregistr\xE9e. Pointill\xE9s : la version int\xE9gr\xE9e de Fonderie, non modifi\xE9e. Barr\xE9 : d\xE9sactiv\xE9e.",
|
|
4438
|
+
languages: "Langues"
|
|
4342
4439
|
},
|
|
4343
4440
|
editor: {
|
|
4344
4441
|
loading: "Chargement du mod\xE8le\u2026",
|
|
@@ -4361,7 +4458,17 @@ var templates3 = {
|
|
|
4361
4458
|
unknownActor: "inconnu",
|
|
4362
4459
|
rollBack: "Restaurer",
|
|
4363
4460
|
confirmDelete: "Supprimer \xAB {type} \xBB ?",
|
|
4364
|
-
confirmDeleteLocale: "Supprimer la version {locale} de \xAB {type} \xBB ? Les personnes de cette langue recevront la version par d\xE9faut."
|
|
4461
|
+
confirmDeleteLocale: "Supprimer la version {locale} de \xAB {type} \xBB ? Les personnes de cette langue recevront la version par d\xE9faut.",
|
|
4462
|
+
builtInCopy: "Version int\xE9gr\xE9e de Fonderie. L\u2019enregistrer cr\xE9e votre propre version.",
|
|
4463
|
+
resetToBuiltIn: "R\xE9tablir la version int\xE9gr\xE9e",
|
|
4464
|
+
confirmReset: "Remplacer votre version {locale} par la version int\xE9gr\xE9e de Fonderie ?",
|
|
4465
|
+
chain: "Repli : {chain}",
|
|
4466
|
+
whoReceives: "Qui re\xE7oit quoi",
|
|
4467
|
+
whoPlaceholder: "Une langue, p. ex. fr-BE",
|
|
4468
|
+
check: "V\xE9rifier",
|
|
4469
|
+
receives: "Un utilisateur {requested} re\xE7oit la version {sent}.",
|
|
4470
|
+
sourceSaved: "C\u2019est votre version enregistr\xE9e.",
|
|
4471
|
+
sourceBuiltIn: "C\u2019est la version int\xE9gr\xE9e de Fonderie."
|
|
4365
4472
|
},
|
|
4366
4473
|
create: {
|
|
4367
4474
|
titleNew: "Nouveau mod\xE8le",
|
|
@@ -4380,7 +4487,8 @@ var templates3 = {
|
|
|
4380
4487
|
errorText: "Le corps en texte brut est obligatoire \u2014 c\u2019est ce que tout client e-mail peut afficher.",
|
|
4381
4488
|
exists: "\xAB {type} \xBB existe d\xE9j\xE0 \u2014 ouvrez-le depuis la liste pour le modifier.",
|
|
4382
4489
|
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."
|
|
4490
|
+
untranslated: "Encore dans la version par d\xE9faut : {fields}. Traduisez-les avant d\u2019ajouter cette langue.",
|
|
4491
|
+
errorDefaultLocale: "{locale} est la version par d\xE9faut de cet e-mail. Modifiez plut\xF4t la version par d\xE9faut."
|
|
4384
4492
|
}
|
|
4385
4493
|
};
|
|
4386
4494
|
var templates_default3 = templates3;
|
|
@@ -4468,6 +4576,8 @@ export {
|
|
|
4468
4576
|
inferConfigValue,
|
|
4469
4577
|
isAdminLocale,
|
|
4470
4578
|
isMfaRequired,
|
|
4471
|
-
missingTemplateLocales
|
|
4579
|
+
missingTemplateLocales,
|
|
4580
|
+
suggestTemplateLocales,
|
|
4581
|
+
templateLanguages
|
|
4472
4582
|
};
|
|
4473
4583
|
//# sourceMappingURL=index.js.map
|