@marlinjai/mail-contract 0.8.0 → 0.9.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.mts CHANGED
@@ -3916,19 +3916,55 @@ declare const SavedSectionUpdate: z.ZodEffects<z.ZodObject<{
3916
3916
  section?: Record<string, unknown> | undefined;
3917
3917
  }>;
3918
3918
  type SavedSectionUpdate = z.infer<typeof SavedSectionUpdate>;
3919
+ /**
3920
+ * Deleting a template. `base_version`, when given, is the version the person
3921
+ * confirmed the deletion against: if the template has moved on since (saved,
3922
+ * renamed, archived or unarchived, each of which is a new version), the delete
3923
+ * fails with `conflict` (409) and nothing is deleted. Without it the template
3924
+ * is deleted whatever its version. A query value arrives as a string, so it
3925
+ * is accepted as either and validated as an integer.
3926
+ */
3927
+ declare const TemplateDeleteQuery: z.ZodObject<{
3928
+ base_version: z.ZodOptional<z.ZodNumber>;
3929
+ }, "strip", z.ZodTypeAny, {
3930
+ base_version?: number | undefined;
3931
+ }, {
3932
+ base_version?: number | undefined;
3933
+ }>;
3934
+ type TemplateDeleteQuery = z.infer<typeof TemplateDeleteQuery>;
3935
+ /** What `templates.list` can order by. */
3936
+ declare const TEMPLATE_SORTS: readonly ["updated_at", "name", "version"];
3937
+ type TemplateSort = (typeof TEMPLATE_SORTS)[number];
3938
+ /**
3939
+ * The direction each sort takes when `order` is left out: the name A to Z,
3940
+ * the most recent change and the highest version first.
3941
+ */
3942
+ declare const TEMPLATE_SORT_DEFAULT_ORDER: Record<TemplateSort, 'asc' | 'desc'>;
3943
+ /**
3944
+ * `sort` defaults to `updated_at` (the most recent change first). A name sorts
3945
+ * without regard to case; ties fall back to the id, in the same direction, so
3946
+ * the order is total. A cursor is the id of the previous page's last row, so
3947
+ * the next page is asked for with the same `sort` and `order` as the first.
3948
+ */
3919
3949
  declare const TemplateListQuery: z.ZodObject<{
3920
3950
  cursor: z.ZodOptional<z.ZodString>;
3921
3951
  limit: z.ZodOptional<z.ZodNumber>;
3922
3952
  } & {
3923
3953
  archived: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
3954
+ sort: z.ZodOptional<z.ZodEnum<["updated_at", "name", "version"]>>;
3955
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
3924
3956
  }, "strip", z.ZodTypeAny, {
3957
+ sort?: "name" | "version" | "updated_at" | undefined;
3925
3958
  cursor?: string | undefined;
3926
3959
  limit?: number | undefined;
3927
3960
  archived?: "true" | "false" | undefined;
3961
+ order?: "asc" | "desc" | undefined;
3928
3962
  }, {
3963
+ sort?: "name" | "version" | "updated_at" | undefined;
3929
3964
  cursor?: string | undefined;
3930
3965
  limit?: number | undefined;
3931
3966
  archived?: "true" | "false" | undefined;
3967
+ order?: "asc" | "desc" | undefined;
3932
3968
  }>;
3933
3969
  type TemplateListQuery = z.infer<typeof TemplateListQuery>;
3934
3970
  /** One saved version, every language of it: restoring it restores all of them together. */
@@ -29153,14 +29189,20 @@ declare const templateRoutes: {
29153
29189
  limit: z.ZodOptional<z.ZodNumber>;
29154
29190
  } & {
29155
29191
  archived: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
29192
+ sort: z.ZodOptional<z.ZodEnum<["updated_at", "name", "version"]>>;
29193
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
29156
29194
  }, "strip", z.ZodTypeAny, {
29195
+ sort?: "name" | "version" | "updated_at" | undefined;
29157
29196
  cursor?: string | undefined;
29158
29197
  limit?: number | undefined;
29159
29198
  archived?: "true" | "false" | undefined;
29199
+ order?: "asc" | "desc" | undefined;
29160
29200
  }, {
29201
+ sort?: "name" | "version" | "updated_at" | undefined;
29161
29202
  cursor?: string | undefined;
29162
29203
  limit?: number | undefined;
29163
29204
  archived?: "true" | "false" | undefined;
29205
+ order?: "asc" | "desc" | undefined;
29164
29206
  }>;
29165
29207
  readonly response: z.ZodObject<{
29166
29208
  data: z.ZodArray<z.ZodObject<Omit<{
@@ -34385,6 +34427,13 @@ declare const templateRoutes: {
34385
34427
  }, {
34386
34428
  id: string;
34387
34429
  }>;
34430
+ readonly query: z.ZodObject<{
34431
+ base_version: z.ZodOptional<z.ZodNumber>;
34432
+ }, "strip", z.ZodTypeAny, {
34433
+ base_version?: number | undefined;
34434
+ }, {
34435
+ base_version?: number | undefined;
34436
+ }>;
34388
34437
  readonly response: z.ZodObject<{
34389
34438
  ok: z.ZodLiteral<true>;
34390
34439
  }, "strip", z.ZodTypeAny, {
@@ -96422,14 +96471,20 @@ declare const routes: {
96422
96471
  limit: z.ZodOptional<z.ZodNumber>;
96423
96472
  } & {
96424
96473
  archived: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
96474
+ sort: z.ZodOptional<z.ZodEnum<["updated_at", "name", "version"]>>;
96475
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
96425
96476
  }, "strip", z.ZodTypeAny, {
96477
+ sort?: "name" | "version" | "updated_at" | undefined;
96426
96478
  cursor?: string | undefined;
96427
96479
  limit?: number | undefined;
96428
96480
  archived?: "true" | "false" | undefined;
96481
+ order?: "asc" | "desc" | undefined;
96429
96482
  }, {
96483
+ sort?: "name" | "version" | "updated_at" | undefined;
96430
96484
  cursor?: string | undefined;
96431
96485
  limit?: number | undefined;
96432
96486
  archived?: "true" | "false" | undefined;
96487
+ order?: "asc" | "desc" | undefined;
96433
96488
  }>;
96434
96489
  readonly response: z.ZodObject<{
96435
96490
  data: z.ZodArray<z.ZodObject<Omit<{
@@ -101654,6 +101709,13 @@ declare const routes: {
101654
101709
  }, {
101655
101710
  id: string;
101656
101711
  }>;
101712
+ readonly query: z.ZodObject<{
101713
+ base_version: z.ZodOptional<z.ZodNumber>;
101714
+ }, "strip", z.ZodTypeAny, {
101715
+ base_version?: number | undefined;
101716
+ }, {
101717
+ base_version?: number | undefined;
101718
+ }>;
101657
101719
  readonly response: z.ZodObject<{
101658
101720
  ok: z.ZodLiteral<true>;
101659
101721
  }, "strip", z.ZodTypeAny, {
@@ -105284,4 +105346,4 @@ declare function matchRoute(method: HttpMethod, pathname: string): {
105284
105346
  params: Record<string, string>;
105285
105347
  } | null;
105286
105348
 
105287
- export { AB_TEST_STATUSES, AB_WINNER_METRICS, API_KEY_SCOPES, API_VERSION_PREFIX, ASSET_CONTENT_TYPES, ASSET_POLICIES, ASSET_UPLOAD_FIELD, AUDIT_ACTIONS, AUTHORIZATION_HEADER, AUTOMATION_DATE_TRIGGER_KINDS, AUTOMATION_END_REASONS, AUTOMATION_ENTRY_REFUSALS, AUTOMATION_FILTER_FIELD_OPERATORS, AUTOMATION_FILTER_FIELD_PATTERN, AUTOMATION_ISSUE_CODES, AUTOMATION_STATUSES, AUTOMATION_STEP_KINDS, AUTOMATION_TRIGGER_KINDS, AUTOMATION_WAIT_REASONS, AbTestConfig, AbTestState, AbVariant, AbWinnerRequest, ApiKey, ApiKeyCreate, ApiKeyCreated, ApiKeyScope, Asset, AssetContentType, AssetHost, AssetImport, AssetPolicy, AuditAction, AuditActor, AuditEntry, AuditQuery, Automation, AutomationCounts, AutomationCreate, type AutomationDateTriggerKind, AutomationDuplicateRequest, AutomationEndReason, AutomationEnrollRequest, AutomationEnrollResult, AutomationEnrollment, AutomationEntryRefusal, AutomationExitRunRequest, AutomationFilter, AutomationFilterCondition, AutomationFilterField, AutomationFlow, AutomationIssue, AutomationIssueCode, AutomationJourney, AutomationListQuery, AutomationPublishMove, AutomationPublishRequest, AutomationPublishResult, AutomationReport, AutomationRun, AutomationRunCompletedData, AutomationRunExitedData, AutomationRunFailedData, AutomationRunListQuery, AutomationRunParams, AutomationRunStartedData, AutomationRunStatus, AutomationSettings, AutomationStatus, AutomationStep, AutomationStepExecution, AutomationStepKind, AutomationStepParams, AutomationStepReport, AutomationSummary, AutomationTestEmailRequest, AutomationTrigger, AutomationTriggerKind, AutomationUpdate, AutomationValidateRequest, AutomationValidation, AutomationWaitReason, AutomationWebhookData, AutomationWithFlow, BEARER_PREFIX, BILLING_NOT_CONFIGURED_REASON, BoundedAutomationFilter, BoundedSegmentFilter, CONTACT_PROPERTY_TYPES, CatalogPlan, CheckoutRequest, CheckoutSession, CompanyId, CompileMessage, CompileRequest, CompileResult, ConditionStep, Contact, ContactAutomationListQuery, ContactAutomationRun, ContactBouncedData, ContactErased, ContactListQuery, ContactPropertyDefinition, ContactPropertyKey, ContactPropertyParams, ContactPropertyType, ContactResubscribedData, ContactSubscribedData, ContactTaggedData, ContactUnsubscribedData, ContactUpdatedData, ContactUpsert, ContactUpsertResult, DATE_PASSED_ANSWERS, DEFAULT_INVITE_TTL_DAYS, DEFAULT_PAGE_LIMIT, DOCUMENT_SCHEMA_VERSIONS, DateOnly, DatePassedAnswer, DelayStep, DocumentSchemaVersion, type DraftInsertionProblem, EDITABLE_MAILING_STATUSES, ERROR_CODES, ERROR_STATUS, EXPORT_CONTENT_TYPES, EXPORT_FORMATS, EXPORT_WARNINGS_HEADER, EXPORT_WARNING_COUNT_HEADER, type EditableLanguage, Email, EmailStep, EmailStepLanguage, ErrorBody, type ErrorCode, ErrorCodeSchema, Event, EventCreate, EventListQuery, EventName, ExportFormat, FILTER_FIELD_OPERATORS, FILTER_OPERATORS, FilterCondition, FilterField, type FilterLeafProblem, FilterOperator, GotoStep, HEALTH_PATH, HOSTED_PAGE_LOCALES, type HttpMethod, ICLOUD_SMTP_POLICY, IDEMPOTENCY_KEY_HEADER, IDEMPOTENCY_KEY_MAX_LENGTH, IDEMPOTENCY_KEY_RETENTION_HOURS, IMPORT_FILE_FIELD, IMPORT_ROW_OUTCOMES, IMPORT_SKIP_REASONS, IMPORT_STATUSES, IMPORT_TERMINAL_STATUSES, INSERTION_PROBLEM_REASONS, INSERTION_TEXT_SLOTS, INVITE_REFUSAL_REASONS, INVITE_STATUSES, Id, IdParams, ImportColumnMapping, ImportCommitRequest, ImportFinishedData, ImportJob, ImportMappingRequest, ImportReport, ImportRow, ImportRowListQuery, ImportRowOutcome, ImportSkipReason, ImportStatus, ImportWarning, ImportedAsset, Insertion, InsertionChoice, InsertionChoiceKey, type InsertionChoiceMade, InsertionChoices, type InsertionEdit, InsertionName, type InsertionProblem, type InsertionProblemReason, InsertionText, Insertions, Invite, InviteAccept, InviteAccepted, InviteCreate, InviteCreated, InviteListQuery, type InviteRefusalReason, InviteStatus, JsonValue, LETTER_RECIPIENT_REFUSAL, LIST_UNSUBSCRIBE_POST_VALUE, LOCALE_TAG_PATTERN, type LanguageDrafts, type LanguageTab, LocaleTag, MAILING_ACTIONS, MAILING_KINDS, MAILING_STATUSES, MAILING_TRANSITIONS, MAX_ALLOWED_ASSET_HOSTS, MAX_ASSET_BYTES, MAX_DELAY_SECONDS, MAX_DOCUMENT_BYTES, MAX_ENGAGEMENT_DAYS, MAX_EXPORT_WARNINGS_HEADER_LENGTH, MAX_FILTER_DEPTH, MAX_IMPORTED_REMOTE_IMAGES, MAX_IMPORT_BYTES, MAX_IMPORT_ROWS, MAX_IMPORT_URL_LENGTH, MAX_INSERTIONS, MAX_INSERTION_CHOICES, MAX_INSERTION_TEXT_LENGTH, MAX_INVITE_TTL_DAYS, MAX_IN_LIST, MAX_LETTER_RECIPIENTS, MAX_MERGE_DEFAULTS, MAX_MERGE_DEFAULT_LENGTH, MAX_MJML_DEPTH, MAX_MJML_ELEMENTS, MAX_MJML_IMPORT_BYTES, MAX_PAGE_LIMIT, MAX_PREHEADER_LENGTH, MAX_RECIPIENTS_PER_BATCH, MAX_RE_ENTRY_COOLDOWN_SECONDS, MAX_SAVED_SECTIONS, MAX_SPLIT_BRANCHES, MAX_STEPS, MAX_STEP_VISITS, MAX_SUBJECT_LENGTH, MAX_TEMPLATE_INPUTS, MAX_TEMPLATE_INPUTS_APP_LENGTH, MAX_TEMPLATE_INPUTS_SEEN, MAX_TEMPLATE_INPUT_EXAMPLE_LENGTH, MAX_TEMPLATE_INPUT_LABEL_LENGTH, MAX_TEMPLATE_INPUT_NOTE_LENGTH, MAX_TEMPLATE_INPUT_VALUES, MAX_TEMPLATE_TRANSLATIONS, MAX_TRIGGERS, MEMBER_ROLES, MERGE_FIELD_PATTERN, MESSAGE_OUTCOMES, MIN_SPLIT_BRANCHES, MJML_IMPORT_REFUSALS, Mailing, MailingAbWinnerSelectedData, MailingAction, MailingActionRequest, MailingAnalytics, MailingAudienceFromSegment, MailingCounts, MailingCreate, MailingExportQuery, MailingFinishedData, MailingKind, MailingLanguage, MailingLanguageReport, MailingLanguageStatus, MailingListQuery, MailingMetadata, MailingRetryFailedRequest, MailingScheduleFailedData, MailingScheduleRequest, MailingScheduledData, MailingSendRequest, MailingStartedData, MailingStatus, MailingSummary, MailingTestRequest, MailingTestResult, MailingUpdate, Member, MemberCreate, MemberRole, MemberUpdate, MergeDefaultValue, MergeDefaults, MergeFieldName, type MergeFieldUse, type MergeValue, Message, MessageFailedData, MessageListQuery, MessageOutcome, MessageSentData, MessageSummary, type MissingInsertionText, type MjmlImportRefusal, NotifyRecipients, NotifyStep, ON_BEHALF_OF_HEADER, ON_BEHALF_OF_MAX_LENGTH, OffsetDays, Ok, type OperationId, PLAN_FEATURES, PLAN_IDS, PREVIEW_EMPTY, PREVIEW_FILLED, PROVIDER_KINDS, type Page, PageQuery, type Personalization, type Phase, Plan, type PlanFeature, PlanFeatures, PlanId, PlanLimits, PortalRequest, PortalSession, type PreviewControl, Properties, Provider, ProviderCreate, ProviderEvents, ProviderEventsSecret, ProviderKind, ProviderPolicy, ProviderRejections, ProviderUpdate, ProviderUsage, ProviderVerifyResult, QuietHours, RECIPIENT_REJECTIONS, RECIPIENT_STATUSES, REQUEST_ID_HEADER, RESEND_EVENT_TYPES, RESERVED_MERGE_FIELDS, RETRYABLE_ERRORS, RETRY_AFTER_HEADER, RE_ENTRY_MODES, ReEntryMode, Recipient, RecipientBatch, RecipientBatchResult, RecipientInput, RecipientListQuery, RecipientStatus, RemoteImage, type RenamedPlacement, ResendSigningSecret, type ReservedMergeField, type RouteAccess, type RouteBody, type RouteDef, type RouteParams, type RouteQuery, type RouteResponse, type Routes, SERVICE_FILLED_MERGE_FIELDS, SIGNUP_FORM_FIELDS, SKIP_REASONS, SMTP_SECURITY, SUBJECT_HEADER, SUPPRESSION_REASONS, type SaveDemotion, SavedSection, SavedSectionBody, SavedSectionCreate, SavedSectionUpdate, Segment, SegmentCreate, SegmentFilter, SegmentPreview, SegmentPreviewRequest, SignupForm, SignupFormCreate, SignupFormEmbed, SignupFormTranslation, SignupSubmission, SkipReason, Slug, SplitBranchKey, SplitStep, StepId, type StepTarget, Subscription, Suppression, SuppressionCreate, SuppressionListQuery, SuppressionReason, TEMPLATE_INPUT_KINDS, TEMPLATE_INPUT_PROBLEM_REASONS, TEMPLATE_LANGUAGE_STATUSES, TERMINAL_MAILING_STATUSES, Tag, TagAssignment, TagCreate, Template, TemplateCompileRequest, TemplateCreate, TemplateCreatedData, TemplateDeletedData, TemplateDocument, TemplateExportQuery, TemplateImport, TemplateImportPreview, TemplateImportPreviewRequest, TemplateImportResult, TemplateInput, type TemplateInputKind, TemplateInputMap, TemplateInputName, type TemplateInputProblem, type TemplateInputProblemReason, TemplateInputSeen, TemplateInputSource, TemplateInputValue, TemplateInputs, TemplateInputsDeclaration, TemplateInputsDeclared, TemplateInputsSeen, TemplateLanguageStatus, TemplateListQuery, TemplatePreheader, TemplateSubject, TemplateSummary, TemplateTranslation, TemplateTranslations, TemplateUpdate, TemplateUpdatedData, TemplateVersion, TemplateVersionParams, TimeOfDay, Timestamp, TimezoneName, Topic, TopicCreate, TopicUpdate, TrackingSettings, TranslationInsertion, TranslationInsertions, UNSUBSCRIBE_PATH_PREFIX, UNSUBSCRIBE_SOURCES, USAGE_METRICS, USAGE_WARNING_HEADER, USAGE_WARNING_RATIO, type UnsubscribeToken, type UnsubscribeTokenClaims, Usage, UsageMetric, UsageWarning, type UsageWarningHeaderEntry, type ValidationContext, ValidationIssue, VariantAnalytics, type VerifyWebhookInput, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_MAX_ATTEMPTS, WEBHOOK_RETRY_DELAYS_SECONDS, WEBHOOK_SECRET_PREFIX, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_SIGNATURE_VERSION, WEBHOOK_TIMESTAMP_HEADER, WEBHOOK_TOLERANCE_SECONDS, WORKSPACE_HEADER, WebhookDelivery, WebhookDeliveryListQuery, WebhookDeliveryParams, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointCreate, WebhookEndpointUpdate, WebhookEndpointWithSecret, WebhookEvent, type WebhookEventOf, WebhookEventType, WebhookStep, WebhookUrl, type WebhookVerifyFailure, type WebhookVerifyResult, Weekday, Workspace, WorkspaceCreate, WorkspaceMembership, WorkspaceMove, WorkspaceSettings, WorkspaceUpdate, acceptsIdempotencyKey, addInsertion, addInsertionChoice, addLanguageDraft, alignTranslationInsertions, alwaysWaits, automationFilterFamily, automationRoutes, billingRoutes, buildPath, buildTemplatePatch, canTransition, canonicalLocale, choiceKeyProblem, chooseInsertion, cycles, defaultPreviewPick, defaultSettings, demoteForSave, demotedBySave, describeMissingTexts, draftDocument, draftInsertionProblems, draftsDirty, draftsFromTemplate, draftsPatch, editInsertionText, editLanguageDraft, editMainInsertionText, editMainInsertions, effectivePreviewPicks, emptyFlow, errorBody, escapeMergeHtml, exportFilename, filterConditions, filterDepth, filterFieldFamily, filterLeafProblem, findMergeFields, formatExportWarningsHeader, formatUsageWarningHeader, foundationRoutes, insertionByProblem, insertionChoices, insertionCoverage, insertionInputs, insertionNameProblem, insertionProblems, insertionRefusalHint, insertionSlotLabel, insertionTextSlots, insertionTokens, insertionValue, inviteRoutes, isDayEntirelyPast, isPublishable, isRetryableError, keepLanguageDocument, languageInsertions, languageName, languageTabs, mainInsertionText, matchLocale, matchRoute, missingInsertionTexts, missingRequiredMergeFields, normalizeChoiceKey, nowSeconds, operationsWithAccess, ownEntry, page, parseExportWarningsHeader, parseUsageWarningHeader, personalizeHtml, personalizeText, placementProblems, platformRoutes, previewControls, previewInsertions, previewPersonalization, primaryLanguage, reachable, readyWithoutInsertions, readyWithoutSubject, rebaseDrafts, removeInsertion, removeInsertionChoice, removeLanguageDraft, renameInsertion, renameInsertionChecked, renameInsertionChoice, renameInsertionChoiceChecked, renameInsertionEverywhere, renameInsertionPlacements, renameTokenInDocument, renameTokenInText, resolveInsertions, restorePatch, routes, sameJson, sampleMergeValue, saveDemotions, sendingRoutes, setInsertionBy, setInsertionFilled, setLanguageStatus, signWebhook, statusForError, stepTargets, storedTemplateLine, stronglyConnected, templateInputDrift, templateInputProblems, templateRoutes, testGroupSize, tightLoops, timingSafeEqualString, translationInsertionProblems, translationTextFromInput, triggerKey, unknownRefusedInsertions, unplacedInsertions, validateAutomation, verifyWebhook };
105349
+ export { AB_TEST_STATUSES, AB_WINNER_METRICS, API_KEY_SCOPES, API_VERSION_PREFIX, ASSET_CONTENT_TYPES, ASSET_POLICIES, ASSET_UPLOAD_FIELD, AUDIT_ACTIONS, AUTHORIZATION_HEADER, AUTOMATION_DATE_TRIGGER_KINDS, AUTOMATION_END_REASONS, AUTOMATION_ENTRY_REFUSALS, AUTOMATION_FILTER_FIELD_OPERATORS, AUTOMATION_FILTER_FIELD_PATTERN, AUTOMATION_ISSUE_CODES, AUTOMATION_STATUSES, AUTOMATION_STEP_KINDS, AUTOMATION_TRIGGER_KINDS, AUTOMATION_WAIT_REASONS, AbTestConfig, AbTestState, AbVariant, AbWinnerRequest, ApiKey, ApiKeyCreate, ApiKeyCreated, ApiKeyScope, Asset, AssetContentType, AssetHost, AssetImport, AssetPolicy, AuditAction, AuditActor, AuditEntry, AuditQuery, Automation, AutomationCounts, AutomationCreate, type AutomationDateTriggerKind, AutomationDuplicateRequest, AutomationEndReason, AutomationEnrollRequest, AutomationEnrollResult, AutomationEnrollment, AutomationEntryRefusal, AutomationExitRunRequest, AutomationFilter, AutomationFilterCondition, AutomationFilterField, AutomationFlow, AutomationIssue, AutomationIssueCode, AutomationJourney, AutomationListQuery, AutomationPublishMove, AutomationPublishRequest, AutomationPublishResult, AutomationReport, AutomationRun, AutomationRunCompletedData, AutomationRunExitedData, AutomationRunFailedData, AutomationRunListQuery, AutomationRunParams, AutomationRunStartedData, AutomationRunStatus, AutomationSettings, AutomationStatus, AutomationStep, AutomationStepExecution, AutomationStepKind, AutomationStepParams, AutomationStepReport, AutomationSummary, AutomationTestEmailRequest, AutomationTrigger, AutomationTriggerKind, AutomationUpdate, AutomationValidateRequest, AutomationValidation, AutomationWaitReason, AutomationWebhookData, AutomationWithFlow, BEARER_PREFIX, BILLING_NOT_CONFIGURED_REASON, BoundedAutomationFilter, BoundedSegmentFilter, CONTACT_PROPERTY_TYPES, CatalogPlan, CheckoutRequest, CheckoutSession, CompanyId, CompileMessage, CompileRequest, CompileResult, ConditionStep, Contact, ContactAutomationListQuery, ContactAutomationRun, ContactBouncedData, ContactErased, ContactListQuery, ContactPropertyDefinition, ContactPropertyKey, ContactPropertyParams, ContactPropertyType, ContactResubscribedData, ContactSubscribedData, ContactTaggedData, ContactUnsubscribedData, ContactUpdatedData, ContactUpsert, ContactUpsertResult, DATE_PASSED_ANSWERS, DEFAULT_INVITE_TTL_DAYS, DEFAULT_PAGE_LIMIT, DOCUMENT_SCHEMA_VERSIONS, DateOnly, DatePassedAnswer, DelayStep, DocumentSchemaVersion, type DraftInsertionProblem, EDITABLE_MAILING_STATUSES, ERROR_CODES, ERROR_STATUS, EXPORT_CONTENT_TYPES, EXPORT_FORMATS, EXPORT_WARNINGS_HEADER, EXPORT_WARNING_COUNT_HEADER, type EditableLanguage, Email, EmailStep, EmailStepLanguage, ErrorBody, type ErrorCode, ErrorCodeSchema, Event, EventCreate, EventListQuery, EventName, ExportFormat, FILTER_FIELD_OPERATORS, FILTER_OPERATORS, FilterCondition, FilterField, type FilterLeafProblem, FilterOperator, GotoStep, HEALTH_PATH, HOSTED_PAGE_LOCALES, type HttpMethod, ICLOUD_SMTP_POLICY, IDEMPOTENCY_KEY_HEADER, IDEMPOTENCY_KEY_MAX_LENGTH, IDEMPOTENCY_KEY_RETENTION_HOURS, IMPORT_FILE_FIELD, IMPORT_ROW_OUTCOMES, IMPORT_SKIP_REASONS, IMPORT_STATUSES, IMPORT_TERMINAL_STATUSES, INSERTION_PROBLEM_REASONS, INSERTION_TEXT_SLOTS, INVITE_REFUSAL_REASONS, INVITE_STATUSES, Id, IdParams, ImportColumnMapping, ImportCommitRequest, ImportFinishedData, ImportJob, ImportMappingRequest, ImportReport, ImportRow, ImportRowListQuery, ImportRowOutcome, ImportSkipReason, ImportStatus, ImportWarning, ImportedAsset, Insertion, InsertionChoice, InsertionChoiceKey, type InsertionChoiceMade, InsertionChoices, type InsertionEdit, InsertionName, type InsertionProblem, type InsertionProblemReason, InsertionText, Insertions, Invite, InviteAccept, InviteAccepted, InviteCreate, InviteCreated, InviteListQuery, type InviteRefusalReason, InviteStatus, JsonValue, LETTER_RECIPIENT_REFUSAL, LIST_UNSUBSCRIBE_POST_VALUE, LOCALE_TAG_PATTERN, type LanguageDrafts, type LanguageTab, LocaleTag, MAILING_ACTIONS, MAILING_KINDS, MAILING_STATUSES, MAILING_TRANSITIONS, MAX_ALLOWED_ASSET_HOSTS, MAX_ASSET_BYTES, MAX_DELAY_SECONDS, MAX_DOCUMENT_BYTES, MAX_ENGAGEMENT_DAYS, MAX_EXPORT_WARNINGS_HEADER_LENGTH, MAX_FILTER_DEPTH, MAX_IMPORTED_REMOTE_IMAGES, MAX_IMPORT_BYTES, MAX_IMPORT_ROWS, MAX_IMPORT_URL_LENGTH, MAX_INSERTIONS, MAX_INSERTION_CHOICES, MAX_INSERTION_TEXT_LENGTH, MAX_INVITE_TTL_DAYS, MAX_IN_LIST, MAX_LETTER_RECIPIENTS, MAX_MERGE_DEFAULTS, MAX_MERGE_DEFAULT_LENGTH, MAX_MJML_DEPTH, MAX_MJML_ELEMENTS, MAX_MJML_IMPORT_BYTES, MAX_PAGE_LIMIT, MAX_PREHEADER_LENGTH, MAX_RECIPIENTS_PER_BATCH, MAX_RE_ENTRY_COOLDOWN_SECONDS, MAX_SAVED_SECTIONS, MAX_SPLIT_BRANCHES, MAX_STEPS, MAX_STEP_VISITS, MAX_SUBJECT_LENGTH, MAX_TEMPLATE_INPUTS, MAX_TEMPLATE_INPUTS_APP_LENGTH, MAX_TEMPLATE_INPUTS_SEEN, MAX_TEMPLATE_INPUT_EXAMPLE_LENGTH, MAX_TEMPLATE_INPUT_LABEL_LENGTH, MAX_TEMPLATE_INPUT_NOTE_LENGTH, MAX_TEMPLATE_INPUT_VALUES, MAX_TEMPLATE_TRANSLATIONS, MAX_TRIGGERS, MEMBER_ROLES, MERGE_FIELD_PATTERN, MESSAGE_OUTCOMES, MIN_SPLIT_BRANCHES, MJML_IMPORT_REFUSALS, Mailing, MailingAbWinnerSelectedData, MailingAction, MailingActionRequest, MailingAnalytics, MailingAudienceFromSegment, MailingCounts, MailingCreate, MailingExportQuery, MailingFinishedData, MailingKind, MailingLanguage, MailingLanguageReport, MailingLanguageStatus, MailingListQuery, MailingMetadata, MailingRetryFailedRequest, MailingScheduleFailedData, MailingScheduleRequest, MailingScheduledData, MailingSendRequest, MailingStartedData, MailingStatus, MailingSummary, MailingTestRequest, MailingTestResult, MailingUpdate, Member, MemberCreate, MemberRole, MemberUpdate, MergeDefaultValue, MergeDefaults, MergeFieldName, type MergeFieldUse, type MergeValue, Message, MessageFailedData, MessageListQuery, MessageOutcome, MessageSentData, MessageSummary, type MissingInsertionText, type MjmlImportRefusal, NotifyRecipients, NotifyStep, ON_BEHALF_OF_HEADER, ON_BEHALF_OF_MAX_LENGTH, OffsetDays, Ok, type OperationId, PLAN_FEATURES, PLAN_IDS, PREVIEW_EMPTY, PREVIEW_FILLED, PROVIDER_KINDS, type Page, PageQuery, type Personalization, type Phase, Plan, type PlanFeature, PlanFeatures, PlanId, PlanLimits, PortalRequest, PortalSession, type PreviewControl, Properties, Provider, ProviderCreate, ProviderEvents, ProviderEventsSecret, ProviderKind, ProviderPolicy, ProviderRejections, ProviderUpdate, ProviderUsage, ProviderVerifyResult, QuietHours, RECIPIENT_REJECTIONS, RECIPIENT_STATUSES, REQUEST_ID_HEADER, RESEND_EVENT_TYPES, RESERVED_MERGE_FIELDS, RETRYABLE_ERRORS, RETRY_AFTER_HEADER, RE_ENTRY_MODES, ReEntryMode, Recipient, RecipientBatch, RecipientBatchResult, RecipientInput, RecipientListQuery, RecipientStatus, RemoteImage, type RenamedPlacement, ResendSigningSecret, type ReservedMergeField, type RouteAccess, type RouteBody, type RouteDef, type RouteParams, type RouteQuery, type RouteResponse, type Routes, SERVICE_FILLED_MERGE_FIELDS, SIGNUP_FORM_FIELDS, SKIP_REASONS, SMTP_SECURITY, SUBJECT_HEADER, SUPPRESSION_REASONS, type SaveDemotion, SavedSection, SavedSectionBody, SavedSectionCreate, SavedSectionUpdate, Segment, SegmentCreate, SegmentFilter, SegmentPreview, SegmentPreviewRequest, SignupForm, SignupFormCreate, SignupFormEmbed, SignupFormTranslation, SignupSubmission, SkipReason, Slug, SplitBranchKey, SplitStep, StepId, type StepTarget, Subscription, Suppression, SuppressionCreate, SuppressionListQuery, SuppressionReason, TEMPLATE_INPUT_KINDS, TEMPLATE_INPUT_PROBLEM_REASONS, TEMPLATE_LANGUAGE_STATUSES, TEMPLATE_SORTS, TEMPLATE_SORT_DEFAULT_ORDER, TERMINAL_MAILING_STATUSES, Tag, TagAssignment, TagCreate, Template, TemplateCompileRequest, TemplateCreate, TemplateCreatedData, TemplateDeleteQuery, TemplateDeletedData, TemplateDocument, TemplateExportQuery, TemplateImport, TemplateImportPreview, TemplateImportPreviewRequest, TemplateImportResult, TemplateInput, type TemplateInputKind, TemplateInputMap, TemplateInputName, type TemplateInputProblem, type TemplateInputProblemReason, TemplateInputSeen, TemplateInputSource, TemplateInputValue, TemplateInputs, TemplateInputsDeclaration, TemplateInputsDeclared, TemplateInputsSeen, TemplateLanguageStatus, TemplateListQuery, TemplatePreheader, type TemplateSort, TemplateSubject, TemplateSummary, TemplateTranslation, TemplateTranslations, TemplateUpdate, TemplateUpdatedData, TemplateVersion, TemplateVersionParams, TimeOfDay, Timestamp, TimezoneName, Topic, TopicCreate, TopicUpdate, TrackingSettings, TranslationInsertion, TranslationInsertions, UNSUBSCRIBE_PATH_PREFIX, UNSUBSCRIBE_SOURCES, USAGE_METRICS, USAGE_WARNING_HEADER, USAGE_WARNING_RATIO, type UnsubscribeToken, type UnsubscribeTokenClaims, Usage, UsageMetric, UsageWarning, type UsageWarningHeaderEntry, type ValidationContext, ValidationIssue, VariantAnalytics, type VerifyWebhookInput, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_MAX_ATTEMPTS, WEBHOOK_RETRY_DELAYS_SECONDS, WEBHOOK_SECRET_PREFIX, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_SIGNATURE_VERSION, WEBHOOK_TIMESTAMP_HEADER, WEBHOOK_TOLERANCE_SECONDS, WORKSPACE_HEADER, WebhookDelivery, WebhookDeliveryListQuery, WebhookDeliveryParams, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointCreate, WebhookEndpointUpdate, WebhookEndpointWithSecret, WebhookEvent, type WebhookEventOf, WebhookEventType, WebhookStep, WebhookUrl, type WebhookVerifyFailure, type WebhookVerifyResult, Weekday, Workspace, WorkspaceCreate, WorkspaceMembership, WorkspaceMove, WorkspaceSettings, WorkspaceUpdate, acceptsIdempotencyKey, addInsertion, addInsertionChoice, addLanguageDraft, alignTranslationInsertions, alwaysWaits, automationFilterFamily, automationRoutes, billingRoutes, buildPath, buildTemplatePatch, canTransition, canonicalLocale, choiceKeyProblem, chooseInsertion, cycles, defaultPreviewPick, defaultSettings, demoteForSave, demotedBySave, describeMissingTexts, draftDocument, draftInsertionProblems, draftsDirty, draftsFromTemplate, draftsPatch, editInsertionText, editLanguageDraft, editMainInsertionText, editMainInsertions, effectivePreviewPicks, emptyFlow, errorBody, escapeMergeHtml, exportFilename, filterConditions, filterDepth, filterFieldFamily, filterLeafProblem, findMergeFields, formatExportWarningsHeader, formatUsageWarningHeader, foundationRoutes, insertionByProblem, insertionChoices, insertionCoverage, insertionInputs, insertionNameProblem, insertionProblems, insertionRefusalHint, insertionSlotLabel, insertionTextSlots, insertionTokens, insertionValue, inviteRoutes, isDayEntirelyPast, isPublishable, isRetryableError, keepLanguageDocument, languageInsertions, languageName, languageTabs, mainInsertionText, matchLocale, matchRoute, missingInsertionTexts, missingRequiredMergeFields, normalizeChoiceKey, nowSeconds, operationsWithAccess, ownEntry, page, parseExportWarningsHeader, parseUsageWarningHeader, personalizeHtml, personalizeText, placementProblems, platformRoutes, previewControls, previewInsertions, previewPersonalization, primaryLanguage, reachable, readyWithoutInsertions, readyWithoutSubject, rebaseDrafts, removeInsertion, removeInsertionChoice, removeLanguageDraft, renameInsertion, renameInsertionChecked, renameInsertionChoice, renameInsertionChoiceChecked, renameInsertionEverywhere, renameInsertionPlacements, renameTokenInDocument, renameTokenInText, resolveInsertions, restorePatch, routes, sameJson, sampleMergeValue, saveDemotions, sendingRoutes, setInsertionBy, setInsertionFilled, setLanguageStatus, signWebhook, statusForError, stepTargets, storedTemplateLine, stronglyConnected, templateInputDrift, templateInputProblems, templateRoutes, testGroupSize, tightLoops, timingSafeEqualString, translationInsertionProblems, translationTextFromInput, triggerKey, unknownRefusedInsertions, unplacedInsertions, validateAutomation, verifyWebhook };
package/dist/index.d.ts CHANGED
@@ -3916,19 +3916,55 @@ declare const SavedSectionUpdate: z.ZodEffects<z.ZodObject<{
3916
3916
  section?: Record<string, unknown> | undefined;
3917
3917
  }>;
3918
3918
  type SavedSectionUpdate = z.infer<typeof SavedSectionUpdate>;
3919
+ /**
3920
+ * Deleting a template. `base_version`, when given, is the version the person
3921
+ * confirmed the deletion against: if the template has moved on since (saved,
3922
+ * renamed, archived or unarchived, each of which is a new version), the delete
3923
+ * fails with `conflict` (409) and nothing is deleted. Without it the template
3924
+ * is deleted whatever its version. A query value arrives as a string, so it
3925
+ * is accepted as either and validated as an integer.
3926
+ */
3927
+ declare const TemplateDeleteQuery: z.ZodObject<{
3928
+ base_version: z.ZodOptional<z.ZodNumber>;
3929
+ }, "strip", z.ZodTypeAny, {
3930
+ base_version?: number | undefined;
3931
+ }, {
3932
+ base_version?: number | undefined;
3933
+ }>;
3934
+ type TemplateDeleteQuery = z.infer<typeof TemplateDeleteQuery>;
3935
+ /** What `templates.list` can order by. */
3936
+ declare const TEMPLATE_SORTS: readonly ["updated_at", "name", "version"];
3937
+ type TemplateSort = (typeof TEMPLATE_SORTS)[number];
3938
+ /**
3939
+ * The direction each sort takes when `order` is left out: the name A to Z,
3940
+ * the most recent change and the highest version first.
3941
+ */
3942
+ declare const TEMPLATE_SORT_DEFAULT_ORDER: Record<TemplateSort, 'asc' | 'desc'>;
3943
+ /**
3944
+ * `sort` defaults to `updated_at` (the most recent change first). A name sorts
3945
+ * without regard to case; ties fall back to the id, in the same direction, so
3946
+ * the order is total. A cursor is the id of the previous page's last row, so
3947
+ * the next page is asked for with the same `sort` and `order` as the first.
3948
+ */
3919
3949
  declare const TemplateListQuery: z.ZodObject<{
3920
3950
  cursor: z.ZodOptional<z.ZodString>;
3921
3951
  limit: z.ZodOptional<z.ZodNumber>;
3922
3952
  } & {
3923
3953
  archived: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
3954
+ sort: z.ZodOptional<z.ZodEnum<["updated_at", "name", "version"]>>;
3955
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
3924
3956
  }, "strip", z.ZodTypeAny, {
3957
+ sort?: "name" | "version" | "updated_at" | undefined;
3925
3958
  cursor?: string | undefined;
3926
3959
  limit?: number | undefined;
3927
3960
  archived?: "true" | "false" | undefined;
3961
+ order?: "asc" | "desc" | undefined;
3928
3962
  }, {
3963
+ sort?: "name" | "version" | "updated_at" | undefined;
3929
3964
  cursor?: string | undefined;
3930
3965
  limit?: number | undefined;
3931
3966
  archived?: "true" | "false" | undefined;
3967
+ order?: "asc" | "desc" | undefined;
3932
3968
  }>;
3933
3969
  type TemplateListQuery = z.infer<typeof TemplateListQuery>;
3934
3970
  /** One saved version, every language of it: restoring it restores all of them together. */
@@ -29153,14 +29189,20 @@ declare const templateRoutes: {
29153
29189
  limit: z.ZodOptional<z.ZodNumber>;
29154
29190
  } & {
29155
29191
  archived: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
29192
+ sort: z.ZodOptional<z.ZodEnum<["updated_at", "name", "version"]>>;
29193
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
29156
29194
  }, "strip", z.ZodTypeAny, {
29195
+ sort?: "name" | "version" | "updated_at" | undefined;
29157
29196
  cursor?: string | undefined;
29158
29197
  limit?: number | undefined;
29159
29198
  archived?: "true" | "false" | undefined;
29199
+ order?: "asc" | "desc" | undefined;
29160
29200
  }, {
29201
+ sort?: "name" | "version" | "updated_at" | undefined;
29161
29202
  cursor?: string | undefined;
29162
29203
  limit?: number | undefined;
29163
29204
  archived?: "true" | "false" | undefined;
29205
+ order?: "asc" | "desc" | undefined;
29164
29206
  }>;
29165
29207
  readonly response: z.ZodObject<{
29166
29208
  data: z.ZodArray<z.ZodObject<Omit<{
@@ -34385,6 +34427,13 @@ declare const templateRoutes: {
34385
34427
  }, {
34386
34428
  id: string;
34387
34429
  }>;
34430
+ readonly query: z.ZodObject<{
34431
+ base_version: z.ZodOptional<z.ZodNumber>;
34432
+ }, "strip", z.ZodTypeAny, {
34433
+ base_version?: number | undefined;
34434
+ }, {
34435
+ base_version?: number | undefined;
34436
+ }>;
34388
34437
  readonly response: z.ZodObject<{
34389
34438
  ok: z.ZodLiteral<true>;
34390
34439
  }, "strip", z.ZodTypeAny, {
@@ -96422,14 +96471,20 @@ declare const routes: {
96422
96471
  limit: z.ZodOptional<z.ZodNumber>;
96423
96472
  } & {
96424
96473
  archived: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
96474
+ sort: z.ZodOptional<z.ZodEnum<["updated_at", "name", "version"]>>;
96475
+ order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
96425
96476
  }, "strip", z.ZodTypeAny, {
96477
+ sort?: "name" | "version" | "updated_at" | undefined;
96426
96478
  cursor?: string | undefined;
96427
96479
  limit?: number | undefined;
96428
96480
  archived?: "true" | "false" | undefined;
96481
+ order?: "asc" | "desc" | undefined;
96429
96482
  }, {
96483
+ sort?: "name" | "version" | "updated_at" | undefined;
96430
96484
  cursor?: string | undefined;
96431
96485
  limit?: number | undefined;
96432
96486
  archived?: "true" | "false" | undefined;
96487
+ order?: "asc" | "desc" | undefined;
96433
96488
  }>;
96434
96489
  readonly response: z.ZodObject<{
96435
96490
  data: z.ZodArray<z.ZodObject<Omit<{
@@ -101654,6 +101709,13 @@ declare const routes: {
101654
101709
  }, {
101655
101710
  id: string;
101656
101711
  }>;
101712
+ readonly query: z.ZodObject<{
101713
+ base_version: z.ZodOptional<z.ZodNumber>;
101714
+ }, "strip", z.ZodTypeAny, {
101715
+ base_version?: number | undefined;
101716
+ }, {
101717
+ base_version?: number | undefined;
101718
+ }>;
101657
101719
  readonly response: z.ZodObject<{
101658
101720
  ok: z.ZodLiteral<true>;
101659
101721
  }, "strip", z.ZodTypeAny, {
@@ -105284,4 +105346,4 @@ declare function matchRoute(method: HttpMethod, pathname: string): {
105284
105346
  params: Record<string, string>;
105285
105347
  } | null;
105286
105348
 
105287
- export { AB_TEST_STATUSES, AB_WINNER_METRICS, API_KEY_SCOPES, API_VERSION_PREFIX, ASSET_CONTENT_TYPES, ASSET_POLICIES, ASSET_UPLOAD_FIELD, AUDIT_ACTIONS, AUTHORIZATION_HEADER, AUTOMATION_DATE_TRIGGER_KINDS, AUTOMATION_END_REASONS, AUTOMATION_ENTRY_REFUSALS, AUTOMATION_FILTER_FIELD_OPERATORS, AUTOMATION_FILTER_FIELD_PATTERN, AUTOMATION_ISSUE_CODES, AUTOMATION_STATUSES, AUTOMATION_STEP_KINDS, AUTOMATION_TRIGGER_KINDS, AUTOMATION_WAIT_REASONS, AbTestConfig, AbTestState, AbVariant, AbWinnerRequest, ApiKey, ApiKeyCreate, ApiKeyCreated, ApiKeyScope, Asset, AssetContentType, AssetHost, AssetImport, AssetPolicy, AuditAction, AuditActor, AuditEntry, AuditQuery, Automation, AutomationCounts, AutomationCreate, type AutomationDateTriggerKind, AutomationDuplicateRequest, AutomationEndReason, AutomationEnrollRequest, AutomationEnrollResult, AutomationEnrollment, AutomationEntryRefusal, AutomationExitRunRequest, AutomationFilter, AutomationFilterCondition, AutomationFilterField, AutomationFlow, AutomationIssue, AutomationIssueCode, AutomationJourney, AutomationListQuery, AutomationPublishMove, AutomationPublishRequest, AutomationPublishResult, AutomationReport, AutomationRun, AutomationRunCompletedData, AutomationRunExitedData, AutomationRunFailedData, AutomationRunListQuery, AutomationRunParams, AutomationRunStartedData, AutomationRunStatus, AutomationSettings, AutomationStatus, AutomationStep, AutomationStepExecution, AutomationStepKind, AutomationStepParams, AutomationStepReport, AutomationSummary, AutomationTestEmailRequest, AutomationTrigger, AutomationTriggerKind, AutomationUpdate, AutomationValidateRequest, AutomationValidation, AutomationWaitReason, AutomationWebhookData, AutomationWithFlow, BEARER_PREFIX, BILLING_NOT_CONFIGURED_REASON, BoundedAutomationFilter, BoundedSegmentFilter, CONTACT_PROPERTY_TYPES, CatalogPlan, CheckoutRequest, CheckoutSession, CompanyId, CompileMessage, CompileRequest, CompileResult, ConditionStep, Contact, ContactAutomationListQuery, ContactAutomationRun, ContactBouncedData, ContactErased, ContactListQuery, ContactPropertyDefinition, ContactPropertyKey, ContactPropertyParams, ContactPropertyType, ContactResubscribedData, ContactSubscribedData, ContactTaggedData, ContactUnsubscribedData, ContactUpdatedData, ContactUpsert, ContactUpsertResult, DATE_PASSED_ANSWERS, DEFAULT_INVITE_TTL_DAYS, DEFAULT_PAGE_LIMIT, DOCUMENT_SCHEMA_VERSIONS, DateOnly, DatePassedAnswer, DelayStep, DocumentSchemaVersion, type DraftInsertionProblem, EDITABLE_MAILING_STATUSES, ERROR_CODES, ERROR_STATUS, EXPORT_CONTENT_TYPES, EXPORT_FORMATS, EXPORT_WARNINGS_HEADER, EXPORT_WARNING_COUNT_HEADER, type EditableLanguage, Email, EmailStep, EmailStepLanguage, ErrorBody, type ErrorCode, ErrorCodeSchema, Event, EventCreate, EventListQuery, EventName, ExportFormat, FILTER_FIELD_OPERATORS, FILTER_OPERATORS, FilterCondition, FilterField, type FilterLeafProblem, FilterOperator, GotoStep, HEALTH_PATH, HOSTED_PAGE_LOCALES, type HttpMethod, ICLOUD_SMTP_POLICY, IDEMPOTENCY_KEY_HEADER, IDEMPOTENCY_KEY_MAX_LENGTH, IDEMPOTENCY_KEY_RETENTION_HOURS, IMPORT_FILE_FIELD, IMPORT_ROW_OUTCOMES, IMPORT_SKIP_REASONS, IMPORT_STATUSES, IMPORT_TERMINAL_STATUSES, INSERTION_PROBLEM_REASONS, INSERTION_TEXT_SLOTS, INVITE_REFUSAL_REASONS, INVITE_STATUSES, Id, IdParams, ImportColumnMapping, ImportCommitRequest, ImportFinishedData, ImportJob, ImportMappingRequest, ImportReport, ImportRow, ImportRowListQuery, ImportRowOutcome, ImportSkipReason, ImportStatus, ImportWarning, ImportedAsset, Insertion, InsertionChoice, InsertionChoiceKey, type InsertionChoiceMade, InsertionChoices, type InsertionEdit, InsertionName, type InsertionProblem, type InsertionProblemReason, InsertionText, Insertions, Invite, InviteAccept, InviteAccepted, InviteCreate, InviteCreated, InviteListQuery, type InviteRefusalReason, InviteStatus, JsonValue, LETTER_RECIPIENT_REFUSAL, LIST_UNSUBSCRIBE_POST_VALUE, LOCALE_TAG_PATTERN, type LanguageDrafts, type LanguageTab, LocaleTag, MAILING_ACTIONS, MAILING_KINDS, MAILING_STATUSES, MAILING_TRANSITIONS, MAX_ALLOWED_ASSET_HOSTS, MAX_ASSET_BYTES, MAX_DELAY_SECONDS, MAX_DOCUMENT_BYTES, MAX_ENGAGEMENT_DAYS, MAX_EXPORT_WARNINGS_HEADER_LENGTH, MAX_FILTER_DEPTH, MAX_IMPORTED_REMOTE_IMAGES, MAX_IMPORT_BYTES, MAX_IMPORT_ROWS, MAX_IMPORT_URL_LENGTH, MAX_INSERTIONS, MAX_INSERTION_CHOICES, MAX_INSERTION_TEXT_LENGTH, MAX_INVITE_TTL_DAYS, MAX_IN_LIST, MAX_LETTER_RECIPIENTS, MAX_MERGE_DEFAULTS, MAX_MERGE_DEFAULT_LENGTH, MAX_MJML_DEPTH, MAX_MJML_ELEMENTS, MAX_MJML_IMPORT_BYTES, MAX_PAGE_LIMIT, MAX_PREHEADER_LENGTH, MAX_RECIPIENTS_PER_BATCH, MAX_RE_ENTRY_COOLDOWN_SECONDS, MAX_SAVED_SECTIONS, MAX_SPLIT_BRANCHES, MAX_STEPS, MAX_STEP_VISITS, MAX_SUBJECT_LENGTH, MAX_TEMPLATE_INPUTS, MAX_TEMPLATE_INPUTS_APP_LENGTH, MAX_TEMPLATE_INPUTS_SEEN, MAX_TEMPLATE_INPUT_EXAMPLE_LENGTH, MAX_TEMPLATE_INPUT_LABEL_LENGTH, MAX_TEMPLATE_INPUT_NOTE_LENGTH, MAX_TEMPLATE_INPUT_VALUES, MAX_TEMPLATE_TRANSLATIONS, MAX_TRIGGERS, MEMBER_ROLES, MERGE_FIELD_PATTERN, MESSAGE_OUTCOMES, MIN_SPLIT_BRANCHES, MJML_IMPORT_REFUSALS, Mailing, MailingAbWinnerSelectedData, MailingAction, MailingActionRequest, MailingAnalytics, MailingAudienceFromSegment, MailingCounts, MailingCreate, MailingExportQuery, MailingFinishedData, MailingKind, MailingLanguage, MailingLanguageReport, MailingLanguageStatus, MailingListQuery, MailingMetadata, MailingRetryFailedRequest, MailingScheduleFailedData, MailingScheduleRequest, MailingScheduledData, MailingSendRequest, MailingStartedData, MailingStatus, MailingSummary, MailingTestRequest, MailingTestResult, MailingUpdate, Member, MemberCreate, MemberRole, MemberUpdate, MergeDefaultValue, MergeDefaults, MergeFieldName, type MergeFieldUse, type MergeValue, Message, MessageFailedData, MessageListQuery, MessageOutcome, MessageSentData, MessageSummary, type MissingInsertionText, type MjmlImportRefusal, NotifyRecipients, NotifyStep, ON_BEHALF_OF_HEADER, ON_BEHALF_OF_MAX_LENGTH, OffsetDays, Ok, type OperationId, PLAN_FEATURES, PLAN_IDS, PREVIEW_EMPTY, PREVIEW_FILLED, PROVIDER_KINDS, type Page, PageQuery, type Personalization, type Phase, Plan, type PlanFeature, PlanFeatures, PlanId, PlanLimits, PortalRequest, PortalSession, type PreviewControl, Properties, Provider, ProviderCreate, ProviderEvents, ProviderEventsSecret, ProviderKind, ProviderPolicy, ProviderRejections, ProviderUpdate, ProviderUsage, ProviderVerifyResult, QuietHours, RECIPIENT_REJECTIONS, RECIPIENT_STATUSES, REQUEST_ID_HEADER, RESEND_EVENT_TYPES, RESERVED_MERGE_FIELDS, RETRYABLE_ERRORS, RETRY_AFTER_HEADER, RE_ENTRY_MODES, ReEntryMode, Recipient, RecipientBatch, RecipientBatchResult, RecipientInput, RecipientListQuery, RecipientStatus, RemoteImage, type RenamedPlacement, ResendSigningSecret, type ReservedMergeField, type RouteAccess, type RouteBody, type RouteDef, type RouteParams, type RouteQuery, type RouteResponse, type Routes, SERVICE_FILLED_MERGE_FIELDS, SIGNUP_FORM_FIELDS, SKIP_REASONS, SMTP_SECURITY, SUBJECT_HEADER, SUPPRESSION_REASONS, type SaveDemotion, SavedSection, SavedSectionBody, SavedSectionCreate, SavedSectionUpdate, Segment, SegmentCreate, SegmentFilter, SegmentPreview, SegmentPreviewRequest, SignupForm, SignupFormCreate, SignupFormEmbed, SignupFormTranslation, SignupSubmission, SkipReason, Slug, SplitBranchKey, SplitStep, StepId, type StepTarget, Subscription, Suppression, SuppressionCreate, SuppressionListQuery, SuppressionReason, TEMPLATE_INPUT_KINDS, TEMPLATE_INPUT_PROBLEM_REASONS, TEMPLATE_LANGUAGE_STATUSES, TERMINAL_MAILING_STATUSES, Tag, TagAssignment, TagCreate, Template, TemplateCompileRequest, TemplateCreate, TemplateCreatedData, TemplateDeletedData, TemplateDocument, TemplateExportQuery, TemplateImport, TemplateImportPreview, TemplateImportPreviewRequest, TemplateImportResult, TemplateInput, type TemplateInputKind, TemplateInputMap, TemplateInputName, type TemplateInputProblem, type TemplateInputProblemReason, TemplateInputSeen, TemplateInputSource, TemplateInputValue, TemplateInputs, TemplateInputsDeclaration, TemplateInputsDeclared, TemplateInputsSeen, TemplateLanguageStatus, TemplateListQuery, TemplatePreheader, TemplateSubject, TemplateSummary, TemplateTranslation, TemplateTranslations, TemplateUpdate, TemplateUpdatedData, TemplateVersion, TemplateVersionParams, TimeOfDay, Timestamp, TimezoneName, Topic, TopicCreate, TopicUpdate, TrackingSettings, TranslationInsertion, TranslationInsertions, UNSUBSCRIBE_PATH_PREFIX, UNSUBSCRIBE_SOURCES, USAGE_METRICS, USAGE_WARNING_HEADER, USAGE_WARNING_RATIO, type UnsubscribeToken, type UnsubscribeTokenClaims, Usage, UsageMetric, UsageWarning, type UsageWarningHeaderEntry, type ValidationContext, ValidationIssue, VariantAnalytics, type VerifyWebhookInput, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_MAX_ATTEMPTS, WEBHOOK_RETRY_DELAYS_SECONDS, WEBHOOK_SECRET_PREFIX, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_SIGNATURE_VERSION, WEBHOOK_TIMESTAMP_HEADER, WEBHOOK_TOLERANCE_SECONDS, WORKSPACE_HEADER, WebhookDelivery, WebhookDeliveryListQuery, WebhookDeliveryParams, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointCreate, WebhookEndpointUpdate, WebhookEndpointWithSecret, WebhookEvent, type WebhookEventOf, WebhookEventType, WebhookStep, WebhookUrl, type WebhookVerifyFailure, type WebhookVerifyResult, Weekday, Workspace, WorkspaceCreate, WorkspaceMembership, WorkspaceMove, WorkspaceSettings, WorkspaceUpdate, acceptsIdempotencyKey, addInsertion, addInsertionChoice, addLanguageDraft, alignTranslationInsertions, alwaysWaits, automationFilterFamily, automationRoutes, billingRoutes, buildPath, buildTemplatePatch, canTransition, canonicalLocale, choiceKeyProblem, chooseInsertion, cycles, defaultPreviewPick, defaultSettings, demoteForSave, demotedBySave, describeMissingTexts, draftDocument, draftInsertionProblems, draftsDirty, draftsFromTemplate, draftsPatch, editInsertionText, editLanguageDraft, editMainInsertionText, editMainInsertions, effectivePreviewPicks, emptyFlow, errorBody, escapeMergeHtml, exportFilename, filterConditions, filterDepth, filterFieldFamily, filterLeafProblem, findMergeFields, formatExportWarningsHeader, formatUsageWarningHeader, foundationRoutes, insertionByProblem, insertionChoices, insertionCoverage, insertionInputs, insertionNameProblem, insertionProblems, insertionRefusalHint, insertionSlotLabel, insertionTextSlots, insertionTokens, insertionValue, inviteRoutes, isDayEntirelyPast, isPublishable, isRetryableError, keepLanguageDocument, languageInsertions, languageName, languageTabs, mainInsertionText, matchLocale, matchRoute, missingInsertionTexts, missingRequiredMergeFields, normalizeChoiceKey, nowSeconds, operationsWithAccess, ownEntry, page, parseExportWarningsHeader, parseUsageWarningHeader, personalizeHtml, personalizeText, placementProblems, platformRoutes, previewControls, previewInsertions, previewPersonalization, primaryLanguage, reachable, readyWithoutInsertions, readyWithoutSubject, rebaseDrafts, removeInsertion, removeInsertionChoice, removeLanguageDraft, renameInsertion, renameInsertionChecked, renameInsertionChoice, renameInsertionChoiceChecked, renameInsertionEverywhere, renameInsertionPlacements, renameTokenInDocument, renameTokenInText, resolveInsertions, restorePatch, routes, sameJson, sampleMergeValue, saveDemotions, sendingRoutes, setInsertionBy, setInsertionFilled, setLanguageStatus, signWebhook, statusForError, stepTargets, storedTemplateLine, stronglyConnected, templateInputDrift, templateInputProblems, templateRoutes, testGroupSize, tightLoops, timingSafeEqualString, translationInsertionProblems, translationTextFromInput, triggerKey, unknownRefusedInsertions, unplacedInsertions, validateAutomation, verifyWebhook };
105349
+ export { AB_TEST_STATUSES, AB_WINNER_METRICS, API_KEY_SCOPES, API_VERSION_PREFIX, ASSET_CONTENT_TYPES, ASSET_POLICIES, ASSET_UPLOAD_FIELD, AUDIT_ACTIONS, AUTHORIZATION_HEADER, AUTOMATION_DATE_TRIGGER_KINDS, AUTOMATION_END_REASONS, AUTOMATION_ENTRY_REFUSALS, AUTOMATION_FILTER_FIELD_OPERATORS, AUTOMATION_FILTER_FIELD_PATTERN, AUTOMATION_ISSUE_CODES, AUTOMATION_STATUSES, AUTOMATION_STEP_KINDS, AUTOMATION_TRIGGER_KINDS, AUTOMATION_WAIT_REASONS, AbTestConfig, AbTestState, AbVariant, AbWinnerRequest, ApiKey, ApiKeyCreate, ApiKeyCreated, ApiKeyScope, Asset, AssetContentType, AssetHost, AssetImport, AssetPolicy, AuditAction, AuditActor, AuditEntry, AuditQuery, Automation, AutomationCounts, AutomationCreate, type AutomationDateTriggerKind, AutomationDuplicateRequest, AutomationEndReason, AutomationEnrollRequest, AutomationEnrollResult, AutomationEnrollment, AutomationEntryRefusal, AutomationExitRunRequest, AutomationFilter, AutomationFilterCondition, AutomationFilterField, AutomationFlow, AutomationIssue, AutomationIssueCode, AutomationJourney, AutomationListQuery, AutomationPublishMove, AutomationPublishRequest, AutomationPublishResult, AutomationReport, AutomationRun, AutomationRunCompletedData, AutomationRunExitedData, AutomationRunFailedData, AutomationRunListQuery, AutomationRunParams, AutomationRunStartedData, AutomationRunStatus, AutomationSettings, AutomationStatus, AutomationStep, AutomationStepExecution, AutomationStepKind, AutomationStepParams, AutomationStepReport, AutomationSummary, AutomationTestEmailRequest, AutomationTrigger, AutomationTriggerKind, AutomationUpdate, AutomationValidateRequest, AutomationValidation, AutomationWaitReason, AutomationWebhookData, AutomationWithFlow, BEARER_PREFIX, BILLING_NOT_CONFIGURED_REASON, BoundedAutomationFilter, BoundedSegmentFilter, CONTACT_PROPERTY_TYPES, CatalogPlan, CheckoutRequest, CheckoutSession, CompanyId, CompileMessage, CompileRequest, CompileResult, ConditionStep, Contact, ContactAutomationListQuery, ContactAutomationRun, ContactBouncedData, ContactErased, ContactListQuery, ContactPropertyDefinition, ContactPropertyKey, ContactPropertyParams, ContactPropertyType, ContactResubscribedData, ContactSubscribedData, ContactTaggedData, ContactUnsubscribedData, ContactUpdatedData, ContactUpsert, ContactUpsertResult, DATE_PASSED_ANSWERS, DEFAULT_INVITE_TTL_DAYS, DEFAULT_PAGE_LIMIT, DOCUMENT_SCHEMA_VERSIONS, DateOnly, DatePassedAnswer, DelayStep, DocumentSchemaVersion, type DraftInsertionProblem, EDITABLE_MAILING_STATUSES, ERROR_CODES, ERROR_STATUS, EXPORT_CONTENT_TYPES, EXPORT_FORMATS, EXPORT_WARNINGS_HEADER, EXPORT_WARNING_COUNT_HEADER, type EditableLanguage, Email, EmailStep, EmailStepLanguage, ErrorBody, type ErrorCode, ErrorCodeSchema, Event, EventCreate, EventListQuery, EventName, ExportFormat, FILTER_FIELD_OPERATORS, FILTER_OPERATORS, FilterCondition, FilterField, type FilterLeafProblem, FilterOperator, GotoStep, HEALTH_PATH, HOSTED_PAGE_LOCALES, type HttpMethod, ICLOUD_SMTP_POLICY, IDEMPOTENCY_KEY_HEADER, IDEMPOTENCY_KEY_MAX_LENGTH, IDEMPOTENCY_KEY_RETENTION_HOURS, IMPORT_FILE_FIELD, IMPORT_ROW_OUTCOMES, IMPORT_SKIP_REASONS, IMPORT_STATUSES, IMPORT_TERMINAL_STATUSES, INSERTION_PROBLEM_REASONS, INSERTION_TEXT_SLOTS, INVITE_REFUSAL_REASONS, INVITE_STATUSES, Id, IdParams, ImportColumnMapping, ImportCommitRequest, ImportFinishedData, ImportJob, ImportMappingRequest, ImportReport, ImportRow, ImportRowListQuery, ImportRowOutcome, ImportSkipReason, ImportStatus, ImportWarning, ImportedAsset, Insertion, InsertionChoice, InsertionChoiceKey, type InsertionChoiceMade, InsertionChoices, type InsertionEdit, InsertionName, type InsertionProblem, type InsertionProblemReason, InsertionText, Insertions, Invite, InviteAccept, InviteAccepted, InviteCreate, InviteCreated, InviteListQuery, type InviteRefusalReason, InviteStatus, JsonValue, LETTER_RECIPIENT_REFUSAL, LIST_UNSUBSCRIBE_POST_VALUE, LOCALE_TAG_PATTERN, type LanguageDrafts, type LanguageTab, LocaleTag, MAILING_ACTIONS, MAILING_KINDS, MAILING_STATUSES, MAILING_TRANSITIONS, MAX_ALLOWED_ASSET_HOSTS, MAX_ASSET_BYTES, MAX_DELAY_SECONDS, MAX_DOCUMENT_BYTES, MAX_ENGAGEMENT_DAYS, MAX_EXPORT_WARNINGS_HEADER_LENGTH, MAX_FILTER_DEPTH, MAX_IMPORTED_REMOTE_IMAGES, MAX_IMPORT_BYTES, MAX_IMPORT_ROWS, MAX_IMPORT_URL_LENGTH, MAX_INSERTIONS, MAX_INSERTION_CHOICES, MAX_INSERTION_TEXT_LENGTH, MAX_INVITE_TTL_DAYS, MAX_IN_LIST, MAX_LETTER_RECIPIENTS, MAX_MERGE_DEFAULTS, MAX_MERGE_DEFAULT_LENGTH, MAX_MJML_DEPTH, MAX_MJML_ELEMENTS, MAX_MJML_IMPORT_BYTES, MAX_PAGE_LIMIT, MAX_PREHEADER_LENGTH, MAX_RECIPIENTS_PER_BATCH, MAX_RE_ENTRY_COOLDOWN_SECONDS, MAX_SAVED_SECTIONS, MAX_SPLIT_BRANCHES, MAX_STEPS, MAX_STEP_VISITS, MAX_SUBJECT_LENGTH, MAX_TEMPLATE_INPUTS, MAX_TEMPLATE_INPUTS_APP_LENGTH, MAX_TEMPLATE_INPUTS_SEEN, MAX_TEMPLATE_INPUT_EXAMPLE_LENGTH, MAX_TEMPLATE_INPUT_LABEL_LENGTH, MAX_TEMPLATE_INPUT_NOTE_LENGTH, MAX_TEMPLATE_INPUT_VALUES, MAX_TEMPLATE_TRANSLATIONS, MAX_TRIGGERS, MEMBER_ROLES, MERGE_FIELD_PATTERN, MESSAGE_OUTCOMES, MIN_SPLIT_BRANCHES, MJML_IMPORT_REFUSALS, Mailing, MailingAbWinnerSelectedData, MailingAction, MailingActionRequest, MailingAnalytics, MailingAudienceFromSegment, MailingCounts, MailingCreate, MailingExportQuery, MailingFinishedData, MailingKind, MailingLanguage, MailingLanguageReport, MailingLanguageStatus, MailingListQuery, MailingMetadata, MailingRetryFailedRequest, MailingScheduleFailedData, MailingScheduleRequest, MailingScheduledData, MailingSendRequest, MailingStartedData, MailingStatus, MailingSummary, MailingTestRequest, MailingTestResult, MailingUpdate, Member, MemberCreate, MemberRole, MemberUpdate, MergeDefaultValue, MergeDefaults, MergeFieldName, type MergeFieldUse, type MergeValue, Message, MessageFailedData, MessageListQuery, MessageOutcome, MessageSentData, MessageSummary, type MissingInsertionText, type MjmlImportRefusal, NotifyRecipients, NotifyStep, ON_BEHALF_OF_HEADER, ON_BEHALF_OF_MAX_LENGTH, OffsetDays, Ok, type OperationId, PLAN_FEATURES, PLAN_IDS, PREVIEW_EMPTY, PREVIEW_FILLED, PROVIDER_KINDS, type Page, PageQuery, type Personalization, type Phase, Plan, type PlanFeature, PlanFeatures, PlanId, PlanLimits, PortalRequest, PortalSession, type PreviewControl, Properties, Provider, ProviderCreate, ProviderEvents, ProviderEventsSecret, ProviderKind, ProviderPolicy, ProviderRejections, ProviderUpdate, ProviderUsage, ProviderVerifyResult, QuietHours, RECIPIENT_REJECTIONS, RECIPIENT_STATUSES, REQUEST_ID_HEADER, RESEND_EVENT_TYPES, RESERVED_MERGE_FIELDS, RETRYABLE_ERRORS, RETRY_AFTER_HEADER, RE_ENTRY_MODES, ReEntryMode, Recipient, RecipientBatch, RecipientBatchResult, RecipientInput, RecipientListQuery, RecipientStatus, RemoteImage, type RenamedPlacement, ResendSigningSecret, type ReservedMergeField, type RouteAccess, type RouteBody, type RouteDef, type RouteParams, type RouteQuery, type RouteResponse, type Routes, SERVICE_FILLED_MERGE_FIELDS, SIGNUP_FORM_FIELDS, SKIP_REASONS, SMTP_SECURITY, SUBJECT_HEADER, SUPPRESSION_REASONS, type SaveDemotion, SavedSection, SavedSectionBody, SavedSectionCreate, SavedSectionUpdate, Segment, SegmentCreate, SegmentFilter, SegmentPreview, SegmentPreviewRequest, SignupForm, SignupFormCreate, SignupFormEmbed, SignupFormTranslation, SignupSubmission, SkipReason, Slug, SplitBranchKey, SplitStep, StepId, type StepTarget, Subscription, Suppression, SuppressionCreate, SuppressionListQuery, SuppressionReason, TEMPLATE_INPUT_KINDS, TEMPLATE_INPUT_PROBLEM_REASONS, TEMPLATE_LANGUAGE_STATUSES, TEMPLATE_SORTS, TEMPLATE_SORT_DEFAULT_ORDER, TERMINAL_MAILING_STATUSES, Tag, TagAssignment, TagCreate, Template, TemplateCompileRequest, TemplateCreate, TemplateCreatedData, TemplateDeleteQuery, TemplateDeletedData, TemplateDocument, TemplateExportQuery, TemplateImport, TemplateImportPreview, TemplateImportPreviewRequest, TemplateImportResult, TemplateInput, type TemplateInputKind, TemplateInputMap, TemplateInputName, type TemplateInputProblem, type TemplateInputProblemReason, TemplateInputSeen, TemplateInputSource, TemplateInputValue, TemplateInputs, TemplateInputsDeclaration, TemplateInputsDeclared, TemplateInputsSeen, TemplateLanguageStatus, TemplateListQuery, TemplatePreheader, type TemplateSort, TemplateSubject, TemplateSummary, TemplateTranslation, TemplateTranslations, TemplateUpdate, TemplateUpdatedData, TemplateVersion, TemplateVersionParams, TimeOfDay, Timestamp, TimezoneName, Topic, TopicCreate, TopicUpdate, TrackingSettings, TranslationInsertion, TranslationInsertions, UNSUBSCRIBE_PATH_PREFIX, UNSUBSCRIBE_SOURCES, USAGE_METRICS, USAGE_WARNING_HEADER, USAGE_WARNING_RATIO, type UnsubscribeToken, type UnsubscribeTokenClaims, Usage, UsageMetric, UsageWarning, type UsageWarningHeaderEntry, type ValidationContext, ValidationIssue, VariantAnalytics, type VerifyWebhookInput, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPES, WEBHOOK_MAX_ATTEMPTS, WEBHOOK_RETRY_DELAYS_SECONDS, WEBHOOK_SECRET_PREFIX, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_SIGNATURE_VERSION, WEBHOOK_TIMESTAMP_HEADER, WEBHOOK_TOLERANCE_SECONDS, WORKSPACE_HEADER, WebhookDelivery, WebhookDeliveryListQuery, WebhookDeliveryParams, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointCreate, WebhookEndpointUpdate, WebhookEndpointWithSecret, WebhookEvent, type WebhookEventOf, WebhookEventType, WebhookStep, WebhookUrl, type WebhookVerifyFailure, type WebhookVerifyResult, Weekday, Workspace, WorkspaceCreate, WorkspaceMembership, WorkspaceMove, WorkspaceSettings, WorkspaceUpdate, acceptsIdempotencyKey, addInsertion, addInsertionChoice, addLanguageDraft, alignTranslationInsertions, alwaysWaits, automationFilterFamily, automationRoutes, billingRoutes, buildPath, buildTemplatePatch, canTransition, canonicalLocale, choiceKeyProblem, chooseInsertion, cycles, defaultPreviewPick, defaultSettings, demoteForSave, demotedBySave, describeMissingTexts, draftDocument, draftInsertionProblems, draftsDirty, draftsFromTemplate, draftsPatch, editInsertionText, editLanguageDraft, editMainInsertionText, editMainInsertions, effectivePreviewPicks, emptyFlow, errorBody, escapeMergeHtml, exportFilename, filterConditions, filterDepth, filterFieldFamily, filterLeafProblem, findMergeFields, formatExportWarningsHeader, formatUsageWarningHeader, foundationRoutes, insertionByProblem, insertionChoices, insertionCoverage, insertionInputs, insertionNameProblem, insertionProblems, insertionRefusalHint, insertionSlotLabel, insertionTextSlots, insertionTokens, insertionValue, inviteRoutes, isDayEntirelyPast, isPublishable, isRetryableError, keepLanguageDocument, languageInsertions, languageName, languageTabs, mainInsertionText, matchLocale, matchRoute, missingInsertionTexts, missingRequiredMergeFields, normalizeChoiceKey, nowSeconds, operationsWithAccess, ownEntry, page, parseExportWarningsHeader, parseUsageWarningHeader, personalizeHtml, personalizeText, placementProblems, platformRoutes, previewControls, previewInsertions, previewPersonalization, primaryLanguage, reachable, readyWithoutInsertions, readyWithoutSubject, rebaseDrafts, removeInsertion, removeInsertionChoice, removeLanguageDraft, renameInsertion, renameInsertionChecked, renameInsertionChoice, renameInsertionChoiceChecked, renameInsertionEverywhere, renameInsertionPlacements, renameTokenInDocument, renameTokenInText, resolveInsertions, restorePatch, routes, sameJson, sampleMergeValue, saveDemotions, sendingRoutes, setInsertionBy, setInsertionFilled, setLanguageStatus, signWebhook, statusForError, stepTargets, storedTemplateLine, stronglyConnected, templateInputDrift, templateInputProblems, templateRoutes, testGroupSize, tightLoops, timingSafeEqualString, translationInsertionProblems, translationTextFromInput, triggerKey, unknownRefusedInsertions, unplacedInsertions, validateAutomation, verifyWebhook };
package/dist/index.js CHANGED
@@ -382,6 +382,8 @@ __export(index_exports, {
382
382
  TEMPLATE_INPUT_KINDS: () => TEMPLATE_INPUT_KINDS,
383
383
  TEMPLATE_INPUT_PROBLEM_REASONS: () => TEMPLATE_INPUT_PROBLEM_REASONS,
384
384
  TEMPLATE_LANGUAGE_STATUSES: () => TEMPLATE_LANGUAGE_STATUSES,
385
+ TEMPLATE_SORTS: () => TEMPLATE_SORTS,
386
+ TEMPLATE_SORT_DEFAULT_ORDER: () => TEMPLATE_SORT_DEFAULT_ORDER,
385
387
  TERMINAL_MAILING_STATUSES: () => TERMINAL_MAILING_STATUSES,
386
388
  Tag: () => Tag,
387
389
  TagAssignment: () => TagAssignment,
@@ -390,6 +392,7 @@ __export(index_exports, {
390
392
  TemplateCompileRequest: () => TemplateCompileRequest,
391
393
  TemplateCreate: () => TemplateCreate,
392
394
  TemplateCreatedData: () => TemplateCreatedData,
395
+ TemplateDeleteQuery: () => TemplateDeleteQuery,
393
396
  TemplateDeletedData: () => TemplateDeletedData,
394
397
  TemplateDocument: () => TemplateDocument,
395
398
  TemplateExportQuery: () => TemplateExportQuery,
@@ -1287,8 +1290,15 @@ var SavedSectionUpdate = import_zod5.z.object({
1287
1290
  description: import_zod5.z.string().max(2e3).nullable().optional(),
1288
1291
  section: SavedSectionBody.optional()
1289
1292
  }).refine((v) => v.name !== void 0 || v.description !== void 0 || v.section !== void 0, "at least one field");
1293
+ var TemplateDeleteQuery = import_zod5.z.object({
1294
+ base_version: import_zod5.z.coerce.number().int().min(1).optional()
1295
+ });
1296
+ var TEMPLATE_SORTS = ["updated_at", "name", "version"];
1297
+ var TEMPLATE_SORT_DEFAULT_ORDER = { updated_at: "desc", name: "asc", version: "desc" };
1290
1298
  var TemplateListQuery = PageQuery.extend({
1291
- archived: import_zod5.z.enum(["true", "false"]).optional()
1299
+ archived: import_zod5.z.enum(["true", "false"]).optional(),
1300
+ sort: import_zod5.z.enum(TEMPLATE_SORTS).optional(),
1301
+ order: import_zod5.z.enum(["asc", "desc"]).optional()
1292
1302
  });
1293
1303
  var TemplateVersion = import_zod5.z.object({
1294
1304
  template_id: Id,
@@ -4894,6 +4904,7 @@ var templateRoutes = {
4894
4904
  method: "DELETE",
4895
4905
  path: "/v1/templates/:id",
4896
4906
  params: IdParams,
4907
+ query: TemplateDeleteQuery,
4897
4908
  response: Ok,
4898
4909
  status: 200,
4899
4910
  access: "write",
@@ -6473,6 +6484,8 @@ function matchRoute(method, pathname) {
6473
6484
  TEMPLATE_INPUT_KINDS,
6474
6485
  TEMPLATE_INPUT_PROBLEM_REASONS,
6475
6486
  TEMPLATE_LANGUAGE_STATUSES,
6487
+ TEMPLATE_SORTS,
6488
+ TEMPLATE_SORT_DEFAULT_ORDER,
6476
6489
  TERMINAL_MAILING_STATUSES,
6477
6490
  Tag,
6478
6491
  TagAssignment,
@@ -6481,6 +6494,7 @@ function matchRoute(method, pathname) {
6481
6494
  TemplateCompileRequest,
6482
6495
  TemplateCreate,
6483
6496
  TemplateCreatedData,
6497
+ TemplateDeleteQuery,
6484
6498
  TemplateDeletedData,
6485
6499
  TemplateDocument,
6486
6500
  TemplateExportQuery,
package/dist/index.mjs CHANGED
@@ -690,8 +690,15 @@ var SavedSectionUpdate = z5.object({
690
690
  description: z5.string().max(2e3).nullable().optional(),
691
691
  section: SavedSectionBody.optional()
692
692
  }).refine((v) => v.name !== void 0 || v.description !== void 0 || v.section !== void 0, "at least one field");
693
+ var TemplateDeleteQuery = z5.object({
694
+ base_version: z5.coerce.number().int().min(1).optional()
695
+ });
696
+ var TEMPLATE_SORTS = ["updated_at", "name", "version"];
697
+ var TEMPLATE_SORT_DEFAULT_ORDER = { updated_at: "desc", name: "asc", version: "desc" };
693
698
  var TemplateListQuery = PageQuery.extend({
694
- archived: z5.enum(["true", "false"]).optional()
699
+ archived: z5.enum(["true", "false"]).optional(),
700
+ sort: z5.enum(TEMPLATE_SORTS).optional(),
701
+ order: z5.enum(["asc", "desc"]).optional()
695
702
  });
696
703
  var TemplateVersion = z5.object({
697
704
  template_id: Id,
@@ -4297,6 +4304,7 @@ var templateRoutes = {
4297
4304
  method: "DELETE",
4298
4305
  path: "/v1/templates/:id",
4299
4306
  params: IdParams,
4307
+ query: TemplateDeleteQuery,
4300
4308
  response: Ok,
4301
4309
  status: 200,
4302
4310
  access: "write",
@@ -5875,6 +5883,8 @@ export {
5875
5883
  TEMPLATE_INPUT_KINDS,
5876
5884
  TEMPLATE_INPUT_PROBLEM_REASONS,
5877
5885
  TEMPLATE_LANGUAGE_STATUSES,
5886
+ TEMPLATE_SORTS,
5887
+ TEMPLATE_SORT_DEFAULT_ORDER,
5878
5888
  TERMINAL_MAILING_STATUSES,
5879
5889
  Tag,
5880
5890
  TagAssignment,
@@ -5883,6 +5893,7 @@ export {
5883
5893
  TemplateCompileRequest,
5884
5894
  TemplateCreate,
5885
5895
  TemplateCreatedData,
5896
+ TemplateDeleteQuery,
5886
5897
  TemplateDeletedData,
5887
5898
  TemplateDocument,
5888
5899
  TemplateExportQuery,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.8.0",
6
+ "version": "0.9.0",
7
7
  "description": "The v1 API contract of the mail service: zod schemas and types for every request, response, error and webhook, the route table, and webhook signing helpers",
8
8
  "license": "MIT",
9
9
  "repository": {