@lessly/sdk-app 76.1.0 → 78.0.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.
@@ -80006,45 +80006,93 @@ export interface DeploymentVolumeResizeOutput {
80006
80006
  }
80007
80007
  export interface MailApikeyCreateInput {
80008
80008
  /**
80009
- * Human-readable label for the key
80009
+ * Human-readable label for the key, e.g. "production sender"
80010
80010
  */
80011
80011
  name: string;
80012
80012
  /**
80013
- * Permission scope: 'full_access' or 'sending_access'
80013
+ * Permission scope: full_access can call every mail tool, sending_access can only send email
80014
80014
  */
80015
80015
  scope: ("full_access" | "sending_access");
80016
80016
  /**
80017
- * Optional Domain id this key is locked to
80017
+ * Lock the key to this sending domain; omit to let it send from any verified domain
80018
80018
  */
80019
80019
  domainId?: string;
80020
80020
  }
80021
80021
  export interface MailApikeyCreateOutput {
80022
+ /**
80023
+ * API key id; pass it to mail_apikey_delete to revoke the key
80024
+ */
80022
80025
  id: string;
80026
+ /**
80027
+ * The full secret. Returned only by this call and never retrievable again — store it now
80028
+ */
80023
80029
  key: string;
80030
+ /**
80031
+ * Human-readable label given when the key was issued
80032
+ */
80024
80033
  name: string;
80025
- scope: string;
80034
+ /**
80035
+ * Permission scope: full_access can call every mail tool, sending_access can only send email
80036
+ */
80037
+ scope: ("full_access" | "sending_access");
80038
+ /**
80039
+ * Opening characters of the secret, so a key can be recognised in a log or a header
80040
+ */
80026
80041
  prefix: string;
80042
+ /**
80043
+ * Sending domain this key is locked to; null if it may send from any verified domain
80044
+ */
80027
80045
  domainId: (string | null);
80046
+ /**
80047
+ * When the key was issued (ISO 8601 UTC)
80048
+ */
80028
80049
  createdAt: string;
80029
80050
  }
80030
80051
  export interface MailApikeyDeleteInput {
80031
80052
  /**
80032
- * UUID of the API key to revoke
80053
+ * Id of the API key to revoke; revocation is immediate and permanent
80033
80054
  */
80034
80055
  id: string;
80035
80056
  }
80036
80057
  export interface MailApikeyDeleteOutput {
80058
+ /**
80059
+ * Id of the key that was revoked
80060
+ */
80037
80061
  id: string;
80062
+ /**
80063
+ * Always true; the call throws rather than reporting a failure here
80064
+ */
80038
80065
  revoked: true;
80039
80066
  }
80040
80067
  export interface MailApikeyListInput {
80041
80068
  }
80069
+ /**
80070
+ * Active API keys for the current product, secrets omitted
80071
+ */
80042
80072
  export type MailApikeyListOutput = {
80073
+ /**
80074
+ * API key id; pass it to mail_apikey_delete to revoke the key
80075
+ */
80043
80076
  id: string;
80077
+ /**
80078
+ * Human-readable label given when the key was issued
80079
+ */
80044
80080
  name: string;
80045
- scope: string;
80081
+ /**
80082
+ * Permission scope: full_access can call every mail tool, sending_access can only send email
80083
+ */
80084
+ scope: ("full_access" | "sending_access");
80085
+ /**
80086
+ * Opening characters of the secret, so a key can be recognised in a log or a header
80087
+ */
80046
80088
  prefix: string;
80089
+ /**
80090
+ * Sending domain this key is locked to; null if it may send from any verified domain
80091
+ */
80047
80092
  domainId: (string | null);
80093
+ /**
80094
+ * When the key was issued (ISO 8601 UTC)
80095
+ */
80048
80096
  createdAt: string;
80049
80097
  }[];
80050
80098
  export interface MailAudienceCreateInput {
@@ -80054,9 +80102,21 @@ export interface MailAudienceCreateInput {
80054
80102
  name: string;
80055
80103
  }
80056
80104
  export interface MailAudienceCreateOutput {
80105
+ /**
80106
+ * Audience id
80107
+ */
80057
80108
  id: string;
80109
+ /**
80110
+ * Human label for the audience
80111
+ */
80058
80112
  name: string;
80113
+ /**
80114
+ * When the audience was created (ISO 8601 UTC)
80115
+ */
80059
80116
  createdAt: string;
80117
+ /**
80118
+ * When the audience was last modified (ISO 8601 UTC)
80119
+ */
80060
80120
  updatedAt: string;
80061
80121
  }
80062
80122
  export interface MailAudienceDeleteInput {
@@ -80066,6 +80126,9 @@ export interface MailAudienceDeleteInput {
80066
80126
  id: string;
80067
80127
  }
80068
80128
  export interface MailAudienceDeleteOutput {
80129
+ /**
80130
+ * True once the audience and its contacts are gone
80131
+ */
80069
80132
  deleted: boolean;
80070
80133
  }
80071
80134
  export interface MailAudienceGetInput {
@@ -80075,17 +80138,41 @@ export interface MailAudienceGetInput {
80075
80138
  id: string;
80076
80139
  }
80077
80140
  export interface MailAudienceGetOutput {
80141
+ /**
80142
+ * Audience id
80143
+ */
80078
80144
  id: string;
80145
+ /**
80146
+ * Human label for the audience
80147
+ */
80079
80148
  name: string;
80149
+ /**
80150
+ * When the audience was created (ISO 8601 UTC)
80151
+ */
80080
80152
  createdAt: string;
80153
+ /**
80154
+ * When the audience was last modified (ISO 8601 UTC)
80155
+ */
80081
80156
  updatedAt: string;
80082
80157
  }
80083
80158
  export interface MailAudienceListInput {
80084
80159
  }
80085
80160
  export type MailAudienceListOutput = {
80161
+ /**
80162
+ * Audience id
80163
+ */
80086
80164
  id: string;
80165
+ /**
80166
+ * Human label for the audience
80167
+ */
80087
80168
  name: string;
80169
+ /**
80170
+ * When the audience was created (ISO 8601 UTC)
80171
+ */
80088
80172
  createdAt: string;
80173
+ /**
80174
+ * When the audience was last modified (ISO 8601 UTC)
80175
+ */
80089
80176
  updatedAt: string;
80090
80177
  }[];
80091
80178
  export interface MailAudienceUpdateInput {
@@ -80099,219 +80186,708 @@ export interface MailAudienceUpdateInput {
80099
80186
  name?: string;
80100
80187
  }
80101
80188
  export interface MailAudienceUpdateOutput {
80189
+ /**
80190
+ * Audience id
80191
+ */
80102
80192
  id: string;
80193
+ /**
80194
+ * Human label for the audience
80195
+ */
80103
80196
  name: string;
80197
+ /**
80198
+ * When the audience was created (ISO 8601 UTC)
80199
+ */
80104
80200
  createdAt: string;
80201
+ /**
80202
+ * When the audience was last modified (ISO 8601 UTC)
80203
+ */
80105
80204
  updatedAt: string;
80106
80205
  }
80107
80206
  export interface MailBroadcastCancelInput {
80207
+ /**
80208
+ * Broadcast id
80209
+ */
80108
80210
  id: string;
80109
80211
  }
80110
80212
  export interface MailBroadcastCancelOutput {
80213
+ /**
80214
+ * Broadcast id
80215
+ */
80111
80216
  id: string;
80217
+ /**
80218
+ * Sender the messages are sent as
80219
+ */
80112
80220
  from: string;
80221
+ /**
80222
+ * Inline HTML body; null when a template supplies it
80223
+ */
80113
80224
  html: (string | null);
80225
+ /**
80226
+ * Internal label — never shown to recipients
80227
+ */
80114
80228
  name: string;
80229
+ /**
80230
+ * Inline plain-text body; null when a template supplies it
80231
+ */
80115
80232
  text: (string | null);
80233
+ /**
80234
+ * When the last message left; null until sending finishes
80235
+ */
80116
80236
  sentAt: (string | null);
80117
- status: string;
80237
+ /**
80238
+ * Lifecycle state: draft (editable), queued (fanned out, sending), sent, failed, canceled
80239
+ */
80240
+ status: ("draft" | "queued" | "sent" | "failed" | "canceled");
80241
+ /**
80242
+ * Custom MIME headers added to every message
80243
+ */
80118
80244
  headers: {
80119
80245
  [k: string]: string;
80120
80246
  };
80247
+ /**
80248
+ * Reply-To addresses; empty when replies go to `from`
80249
+ */
80121
80250
  replyTo: string[];
80251
+ /**
80252
+ * Subject line for inline content; null when a template supplies it
80253
+ */
80122
80254
  subject: (string | null);
80255
+ /**
80256
+ * When the broadcast was queued; null while it is a draft
80257
+ */
80123
80258
  queuedAt: (string | null);
80259
+ /**
80260
+ * When the broadcast was created
80261
+ */
80124
80262
  createdAt: string;
80263
+ /**
80264
+ * Why the broadcast failed; null unless status is failed
80265
+ */
80125
80266
  lastError: (string | null);
80267
+ /**
80268
+ * Product the broadcast belongs to
80269
+ */
80126
80270
  productId: string;
80271
+ /**
80272
+ * When the broadcast was last modified
80273
+ */
80127
80274
  updatedAt: string;
80128
- variables?: unknown;
80275
+ /**
80276
+ * Values passed to the template variables; {} for inline content
80277
+ */
80278
+ variables: ({
80279
+ [k: string]: unknown;
80280
+ } | null);
80281
+ /**
80282
+ * Audience whose contacts this broadcast is sent to
80283
+ */
80129
80284
  audienceId: string;
80285
+ /**
80286
+ * Template rendered for every recipient; null for inline content
80287
+ */
80130
80288
  templateId: (string | null);
80289
+ /**
80290
+ * Contacts the broadcast fanned out to; 0 while it is still a draft
80291
+ */
80131
80292
  recipientCount: number;
80132
80293
  }
80133
80294
  export interface MailBroadcastCreateInput {
80295
+ /**
80296
+ * Sender on a verified domain, e.g. "Name <you@your-domain.com>"
80297
+ */
80134
80298
  from: string;
80299
+ /**
80300
+ * HTML body. Inline content only — forbidden with a template.
80301
+ */
80135
80302
  html?: string;
80303
+ /**
80304
+ * Internal label for the broadcast — never shown to recipients
80305
+ */
80136
80306
  name: string;
80307
+ /**
80308
+ * Plain-text body. Inline content only — forbidden with a template.
80309
+ */
80137
80310
  text?: string;
80311
+ /**
80312
+ * Custom MIME headers added to every message. Defaults to {}.
80313
+ */
80138
80314
  headers?: {
80139
80315
  [k: string]: string;
80140
80316
  };
80317
+ /**
80318
+ * Reply-To addresses. Defaults to [] — replies go to `from`.
80319
+ */
80141
80320
  replyTo?: string[];
80321
+ /**
80322
+ * Subject line, capped at the RFC-5322 line limit. Required with inline content, forbidden with a template.
80323
+ */
80142
80324
  subject?: string;
80325
+ /**
80326
+ * Send by reference to a published template instead of inline content
80327
+ */
80143
80328
  template?: {
80329
+ /**
80330
+ * Published template id to render for every recipient
80331
+ */
80144
80332
  id: string;
80333
+ /**
80334
+ * Values for the template variables, the same for every recipient. Defaults to {}.
80335
+ */
80145
80336
  variables?: {
80146
80337
  [k: string]: (string | number | boolean);
80147
80338
  };
80148
80339
  };
80340
+ /**
80341
+ * Audience whose subscribed contacts receive this broadcast
80342
+ */
80149
80343
  audienceId: string;
80150
80344
  }
80151
80345
  export interface MailBroadcastCreateOutput {
80346
+ /**
80347
+ * Broadcast id
80348
+ */
80152
80349
  id: string;
80350
+ /**
80351
+ * Sender the messages are sent as
80352
+ */
80153
80353
  from: string;
80354
+ /**
80355
+ * Inline HTML body; null when a template supplies it
80356
+ */
80154
80357
  html: (string | null);
80358
+ /**
80359
+ * Internal label — never shown to recipients
80360
+ */
80155
80361
  name: string;
80362
+ /**
80363
+ * Inline plain-text body; null when a template supplies it
80364
+ */
80156
80365
  text: (string | null);
80366
+ /**
80367
+ * When the last message left; null until sending finishes
80368
+ */
80157
80369
  sentAt: (string | null);
80158
- status: string;
80370
+ /**
80371
+ * Lifecycle state: draft (editable), queued (fanned out, sending), sent, failed, canceled
80372
+ */
80373
+ status: ("draft" | "queued" | "sent" | "failed" | "canceled");
80374
+ /**
80375
+ * Custom MIME headers added to every message
80376
+ */
80159
80377
  headers: {
80160
80378
  [k: string]: string;
80161
80379
  };
80380
+ /**
80381
+ * Reply-To addresses; empty when replies go to `from`
80382
+ */
80162
80383
  replyTo: string[];
80384
+ /**
80385
+ * Subject line for inline content; null when a template supplies it
80386
+ */
80163
80387
  subject: (string | null);
80388
+ /**
80389
+ * When the broadcast was queued; null while it is a draft
80390
+ */
80164
80391
  queuedAt: (string | null);
80392
+ /**
80393
+ * When the broadcast was created
80394
+ */
80165
80395
  createdAt: string;
80396
+ /**
80397
+ * Why the broadcast failed; null unless status is failed
80398
+ */
80166
80399
  lastError: (string | null);
80400
+ /**
80401
+ * Product the broadcast belongs to
80402
+ */
80167
80403
  productId: string;
80404
+ /**
80405
+ * When the broadcast was last modified
80406
+ */
80168
80407
  updatedAt: string;
80169
- variables?: unknown;
80408
+ /**
80409
+ * Values passed to the template variables; {} for inline content
80410
+ */
80411
+ variables: ({
80412
+ [k: string]: unknown;
80413
+ } | null);
80414
+ /**
80415
+ * Audience whose contacts this broadcast is sent to
80416
+ */
80170
80417
  audienceId: string;
80418
+ /**
80419
+ * Template rendered for every recipient; null for inline content
80420
+ */
80171
80421
  templateId: (string | null);
80422
+ /**
80423
+ * Contacts the broadcast fanned out to; 0 while it is still a draft
80424
+ */
80172
80425
  recipientCount: number;
80173
80426
  }
80174
80427
  export interface MailBroadcastDeleteInput {
80428
+ /**
80429
+ * Broadcast id
80430
+ */
80175
80431
  id: string;
80176
80432
  }
80177
80433
  export interface MailBroadcastDeleteOutput {
80434
+ /**
80435
+ * Id of the deleted broadcast
80436
+ */
80178
80437
  id: string;
80438
+ /**
80439
+ * True when the broadcast was removed
80440
+ */
80179
80441
  deleted: boolean;
80180
80442
  }
80181
80443
  export interface MailBroadcastGetInput {
80444
+ /**
80445
+ * Broadcast id
80446
+ */
80182
80447
  id: string;
80183
80448
  }
80184
80449
  export interface MailBroadcastGetOutput {
80450
+ /**
80451
+ * Broadcast id
80452
+ */
80185
80453
  id: string;
80454
+ /**
80455
+ * Sender the messages are sent as
80456
+ */
80186
80457
  from: string;
80458
+ /**
80459
+ * Inline HTML body; null when a template supplies it
80460
+ */
80187
80461
  html: (string | null);
80462
+ /**
80463
+ * Internal label — never shown to recipients
80464
+ */
80188
80465
  name: string;
80466
+ /**
80467
+ * Inline plain-text body; null when a template supplies it
80468
+ */
80189
80469
  text: (string | null);
80470
+ /**
80471
+ * When the last message left; null until sending finishes
80472
+ */
80190
80473
  sentAt: (string | null);
80191
- status: string;
80474
+ /**
80475
+ * Lifecycle state: draft (editable), queued (fanned out, sending), sent, failed, canceled
80476
+ */
80477
+ status: ("draft" | "queued" | "sent" | "failed" | "canceled");
80478
+ /**
80479
+ * Custom MIME headers added to every message
80480
+ */
80192
80481
  headers: {
80193
80482
  [k: string]: string;
80194
80483
  };
80484
+ /**
80485
+ * Reply-To addresses; empty when replies go to `from`
80486
+ */
80195
80487
  replyTo: string[];
80488
+ /**
80489
+ * Subject line for inline content; null when a template supplies it
80490
+ */
80196
80491
  subject: (string | null);
80492
+ /**
80493
+ * When the broadcast was queued; null while it is a draft
80494
+ */
80197
80495
  queuedAt: (string | null);
80496
+ /**
80497
+ * When the broadcast was created
80498
+ */
80198
80499
  createdAt: string;
80500
+ /**
80501
+ * Why the broadcast failed; null unless status is failed
80502
+ */
80199
80503
  lastError: (string | null);
80504
+ /**
80505
+ * Product the broadcast belongs to
80506
+ */
80200
80507
  productId: string;
80508
+ /**
80509
+ * When the broadcast was last modified
80510
+ */
80201
80511
  updatedAt: string;
80202
- variables?: unknown;
80512
+ /**
80513
+ * Values passed to the template variables; {} for inline content
80514
+ */
80515
+ variables: ({
80516
+ [k: string]: unknown;
80517
+ } | null);
80518
+ /**
80519
+ * Audience whose contacts this broadcast is sent to
80520
+ */
80203
80521
  audienceId: string;
80522
+ /**
80523
+ * Template rendered for every recipient; null for inline content
80524
+ */
80204
80525
  templateId: (string | null);
80526
+ /**
80527
+ * Contacts the broadcast fanned out to; 0 while it is still a draft
80528
+ */
80205
80529
  recipientCount: number;
80206
80530
  }
80207
80531
  export interface MailBroadcastListInput {
80532
+ /**
80533
+ * Page size, 1-100. Defaults to 50.
80534
+ */
80208
80535
  limit?: number;
80536
+ /**
80537
+ * Opaque cursor from the previous page’s `nextCursor`. Omit for the first page.
80538
+ */
80209
80539
  cursor?: string;
80210
80540
  }
80211
80541
  export interface MailBroadcastListOutput {
80542
+ /**
80543
+ * The broadcasts on this page, newest first
80544
+ */
80212
80545
  items: {
80546
+ /**
80547
+ * Broadcast id
80548
+ */
80213
80549
  id: string;
80550
+ /**
80551
+ * Sender the messages are sent as
80552
+ */
80214
80553
  from: string;
80554
+ /**
80555
+ * Inline HTML body; null when a template supplies it
80556
+ */
80215
80557
  html: (string | null);
80558
+ /**
80559
+ * Internal label — never shown to recipients
80560
+ */
80216
80561
  name: string;
80562
+ /**
80563
+ * Inline plain-text body; null when a template supplies it
80564
+ */
80217
80565
  text: (string | null);
80566
+ /**
80567
+ * When the last message left; null until sending finishes
80568
+ */
80218
80569
  sentAt: (string | null);
80219
- status: string;
80570
+ /**
80571
+ * Lifecycle state: draft (editable), queued (fanned out, sending), sent, failed, canceled
80572
+ */
80573
+ status: ("draft" | "queued" | "sent" | "failed" | "canceled");
80574
+ /**
80575
+ * Custom MIME headers added to every message
80576
+ */
80220
80577
  headers: {
80221
80578
  [k: string]: string;
80222
80579
  };
80580
+ /**
80581
+ * Reply-To addresses; empty when replies go to `from`
80582
+ */
80223
80583
  replyTo: string[];
80584
+ /**
80585
+ * Subject line for inline content; null when a template supplies it
80586
+ */
80224
80587
  subject: (string | null);
80588
+ /**
80589
+ * When the broadcast was queued; null while it is a draft
80590
+ */
80225
80591
  queuedAt: (string | null);
80592
+ /**
80593
+ * When the broadcast was created
80594
+ */
80226
80595
  createdAt: string;
80596
+ /**
80597
+ * Why the broadcast failed; null unless status is failed
80598
+ */
80227
80599
  lastError: (string | null);
80600
+ /**
80601
+ * Product the broadcast belongs to
80602
+ */
80228
80603
  productId: string;
80604
+ /**
80605
+ * When the broadcast was last modified
80606
+ */
80229
80607
  updatedAt: string;
80230
- variables?: unknown;
80608
+ /**
80609
+ * Values passed to the template variables; {} for inline content
80610
+ */
80611
+ variables: ({
80612
+ [k: string]: unknown;
80613
+ } | null);
80614
+ /**
80615
+ * Audience whose contacts this broadcast is sent to
80616
+ */
80231
80617
  audienceId: string;
80618
+ /**
80619
+ * Template rendered for every recipient; null for inline content
80620
+ */
80232
80621
  templateId: (string | null);
80622
+ /**
80623
+ * Contacts the broadcast fanned out to; 0 while it is still a draft
80624
+ */
80233
80625
  recipientCount: number;
80234
80626
  }[];
80627
+ /**
80628
+ * Pass as `cursor` for the next page; null on the last page
80629
+ */
80235
80630
  nextCursor: (string | null);
80236
80631
  }
80237
80632
  export interface MailBroadcastQueueInput {
80633
+ /**
80634
+ * Broadcast id
80635
+ */
80238
80636
  id: string;
80239
80637
  }
80240
80638
  export interface MailBroadcastQueueOutput {
80639
+ /**
80640
+ * Broadcast id
80641
+ */
80241
80642
  id: string;
80643
+ /**
80644
+ * Sender the messages are sent as
80645
+ */
80242
80646
  from: string;
80647
+ /**
80648
+ * Inline HTML body; null when a template supplies it
80649
+ */
80243
80650
  html: (string | null);
80651
+ /**
80652
+ * Internal label — never shown to recipients
80653
+ */
80244
80654
  name: string;
80655
+ /**
80656
+ * Inline plain-text body; null when a template supplies it
80657
+ */
80245
80658
  text: (string | null);
80659
+ /**
80660
+ * When the last message left; null until sending finishes
80661
+ */
80246
80662
  sentAt: (string | null);
80247
- status: string;
80663
+ /**
80664
+ * Lifecycle state: draft (editable), queued (fanned out, sending), sent, failed, canceled
80665
+ */
80666
+ status: ("draft" | "queued" | "sent" | "failed" | "canceled");
80667
+ /**
80668
+ * Custom MIME headers added to every message
80669
+ */
80248
80670
  headers: {
80249
80671
  [k: string]: string;
80250
80672
  };
80673
+ /**
80674
+ * Reply-To addresses; empty when replies go to `from`
80675
+ */
80251
80676
  replyTo: string[];
80677
+ /**
80678
+ * Subject line for inline content; null when a template supplies it
80679
+ */
80252
80680
  subject: (string | null);
80681
+ /**
80682
+ * When the broadcast was queued; null while it is a draft
80683
+ */
80253
80684
  queuedAt: (string | null);
80685
+ /**
80686
+ * When the broadcast was created
80687
+ */
80254
80688
  createdAt: string;
80689
+ /**
80690
+ * Why the broadcast failed; null unless status is failed
80691
+ */
80255
80692
  lastError: (string | null);
80693
+ /**
80694
+ * Product the broadcast belongs to
80695
+ */
80256
80696
  productId: string;
80697
+ /**
80698
+ * When the broadcast was last modified
80699
+ */
80257
80700
  updatedAt: string;
80258
- variables?: unknown;
80701
+ /**
80702
+ * Values passed to the template variables; {} for inline content
80703
+ */
80704
+ variables: ({
80705
+ [k: string]: unknown;
80706
+ } | null);
80707
+ /**
80708
+ * Audience whose contacts this broadcast is sent to
80709
+ */
80259
80710
  audienceId: string;
80711
+ /**
80712
+ * Template rendered for every recipient; null for inline content
80713
+ */
80260
80714
  templateId: (string | null);
80715
+ /**
80716
+ * Contacts the broadcast fanned out to; 0 while it is still a draft
80717
+ */
80261
80718
  recipientCount: number;
80262
80719
  }
80263
80720
  export interface MailBroadcastStatsInput {
80721
+ /**
80722
+ * Broadcast id
80723
+ */
80264
80724
  id: string;
80265
80725
  }
80266
80726
  export interface MailBroadcastStatsOutput {
80727
+ /**
80728
+ * Messages that could not be handed to the provider
80729
+ */
80267
80730
  failed: number;
80731
+ /**
80732
+ * Messages opened at least once, as seen by the tracking pixel
80733
+ */
80268
80734
  opened: number;
80735
+ /**
80736
+ * Messages that bounced, hard or soft
80737
+ */
80269
80738
  bounced: number;
80739
+ /**
80740
+ * Messages with at least one tracked link click
80741
+ */
80270
80742
  clicked: number;
80743
+ /**
80744
+ * Messages the receiving server accepted
80745
+ */
80271
80746
  delivered: number;
80747
+ /**
80748
+ * Contacts the broadcast fanned out to
80749
+ */
80272
80750
  recipients: number;
80751
+ /**
80752
+ * Recipients skipped because they are on the suppression list
80753
+ */
80273
80754
  suppressed: number;
80274
80755
  }
80275
80756
  export interface MailBroadcastUpdateInput {
80757
+ /**
80758
+ * Broadcast id
80759
+ */
80276
80760
  id: string;
80761
+ /**
80762
+ * Sender on a verified domain, e.g. "Name <you@your-domain.com>"
80763
+ */
80277
80764
  from?: string;
80765
+ /**
80766
+ * HTML body. Inline content only — forbidden with a template.
80767
+ */
80278
80768
  html?: string;
80769
+ /**
80770
+ * Internal label for the broadcast — never shown to recipients
80771
+ */
80279
80772
  name?: string;
80773
+ /**
80774
+ * Plain-text body. Inline content only — forbidden with a template.
80775
+ */
80280
80776
  text?: string;
80777
+ /**
80778
+ * Custom MIME headers added to every message. Defaults to {}.
80779
+ */
80281
80780
  headers?: {
80282
80781
  [k: string]: string;
80283
80782
  };
80783
+ /**
80784
+ * Reply-To addresses. Defaults to [] — replies go to `from`.
80785
+ */
80284
80786
  replyTo?: string[];
80787
+ /**
80788
+ * Subject line, capped at the RFC-5322 line limit. Required with inline content, forbidden with a template.
80789
+ */
80285
80790
  subject?: string;
80791
+ /**
80792
+ * Send by reference to a published template instead of inline content
80793
+ */
80286
80794
  template?: {
80795
+ /**
80796
+ * Published template id to render for every recipient
80797
+ */
80287
80798
  id: string;
80799
+ /**
80800
+ * Values for the template variables, the same for every recipient. Defaults to {}.
80801
+ */
80288
80802
  variables?: {
80289
80803
  [k: string]: (string | number | boolean);
80290
80804
  };
80291
80805
  };
80806
+ /**
80807
+ * Audience whose subscribed contacts receive this broadcast
80808
+ */
80292
80809
  audienceId?: string;
80293
80810
  }
80294
80811
  export interface MailBroadcastUpdateOutput {
80812
+ /**
80813
+ * Broadcast id
80814
+ */
80295
80815
  id: string;
80816
+ /**
80817
+ * Sender the messages are sent as
80818
+ */
80296
80819
  from: string;
80820
+ /**
80821
+ * Inline HTML body; null when a template supplies it
80822
+ */
80297
80823
  html: (string | null);
80824
+ /**
80825
+ * Internal label — never shown to recipients
80826
+ */
80298
80827
  name: string;
80828
+ /**
80829
+ * Inline plain-text body; null when a template supplies it
80830
+ */
80299
80831
  text: (string | null);
80832
+ /**
80833
+ * When the last message left; null until sending finishes
80834
+ */
80300
80835
  sentAt: (string | null);
80301
- status: string;
80836
+ /**
80837
+ * Lifecycle state: draft (editable), queued (fanned out, sending), sent, failed, canceled
80838
+ */
80839
+ status: ("draft" | "queued" | "sent" | "failed" | "canceled");
80840
+ /**
80841
+ * Custom MIME headers added to every message
80842
+ */
80302
80843
  headers: {
80303
80844
  [k: string]: string;
80304
80845
  };
80846
+ /**
80847
+ * Reply-To addresses; empty when replies go to `from`
80848
+ */
80305
80849
  replyTo: string[];
80850
+ /**
80851
+ * Subject line for inline content; null when a template supplies it
80852
+ */
80306
80853
  subject: (string | null);
80854
+ /**
80855
+ * When the broadcast was queued; null while it is a draft
80856
+ */
80307
80857
  queuedAt: (string | null);
80858
+ /**
80859
+ * When the broadcast was created
80860
+ */
80308
80861
  createdAt: string;
80862
+ /**
80863
+ * Why the broadcast failed; null unless status is failed
80864
+ */
80309
80865
  lastError: (string | null);
80866
+ /**
80867
+ * Product the broadcast belongs to
80868
+ */
80310
80869
  productId: string;
80870
+ /**
80871
+ * When the broadcast was last modified
80872
+ */
80311
80873
  updatedAt: string;
80312
- variables?: unknown;
80874
+ /**
80875
+ * Values passed to the template variables; {} for inline content
80876
+ */
80877
+ variables: ({
80878
+ [k: string]: unknown;
80879
+ } | null);
80880
+ /**
80881
+ * Audience whose contacts this broadcast is sent to
80882
+ */
80313
80883
  audienceId: string;
80884
+ /**
80885
+ * Template rendered for every recipient; null for inline content
80886
+ */
80314
80887
  templateId: (string | null);
80888
+ /**
80889
+ * Contacts the broadcast fanned out to; 0 while it is still a draft
80890
+ */
80315
80891
  recipientCount: number;
80316
80892
  }
80317
80893
  export interface MailContactCreateInput {
@@ -80335,12 +80911,30 @@ export interface MailContactCreateInput {
80335
80911
  unsubscribed?: boolean;
80336
80912
  }
80337
80913
  export interface MailContactCreateOutput {
80914
+ /**
80915
+ * Contact id
80916
+ */
80338
80917
  id: string;
80918
+ /**
80919
+ * Contact email address, normalized to lowercase
80920
+ */
80339
80921
  email: string;
80922
+ /**
80923
+ * When the contact was created (ISO 8601 UTC)
80924
+ */
80340
80925
  createdAt: string;
80926
+ /**
80927
+ * When the contact was last modified (ISO 8601 UTC)
80928
+ */
80341
80929
  updatedAt: string;
80930
+ /**
80931
+ * Audience the contact belongs to
80932
+ */
80342
80933
  audienceId: string;
80343
80934
  properties?: unknown;
80935
+ /**
80936
+ * Marketing opt-out flag for this audience
80937
+ */
80344
80938
  unsubscribed: boolean;
80345
80939
  }
80346
80940
  export interface MailContactDeleteInput {
@@ -80354,6 +80948,9 @@ export interface MailContactDeleteInput {
80354
80948
  audience_id: string;
80355
80949
  }
80356
80950
  export interface MailContactDeleteOutput {
80951
+ /**
80952
+ * True once the contact is gone
80953
+ */
80357
80954
  deleted: boolean;
80358
80955
  }
80359
80956
  export interface MailContactGetInput {
@@ -80367,12 +80964,30 @@ export interface MailContactGetInput {
80367
80964
  audience_id: string;
80368
80965
  }
80369
80966
  export interface MailContactGetOutput {
80967
+ /**
80968
+ * Contact id
80969
+ */
80370
80970
  id: string;
80971
+ /**
80972
+ * Contact email address, normalized to lowercase
80973
+ */
80371
80974
  email: string;
80975
+ /**
80976
+ * When the contact was created (ISO 8601 UTC)
80977
+ */
80372
80978
  createdAt: string;
80979
+ /**
80980
+ * When the contact was last modified (ISO 8601 UTC)
80981
+ */
80373
80982
  updatedAt: string;
80983
+ /**
80984
+ * Audience the contact belongs to
80985
+ */
80374
80986
  audienceId: string;
80375
80987
  properties?: unknown;
80988
+ /**
80989
+ * Marketing opt-out flag for this audience
80990
+ */
80376
80991
  unsubscribed: boolean;
80377
80992
  }
80378
80993
  export interface MailContactListInput {
@@ -80381,7 +80996,7 @@ export interface MailContactListInput {
80381
80996
  */
80382
80997
  limit?: number;
80383
80998
  /**
80384
- * Opaque pagination cursor from a prior page
80999
+ * Opaque pagination cursor from a prior page; omit for the first page
80385
81000
  */
80386
81001
  cursor?: string;
80387
81002
  /**
@@ -80394,15 +81009,39 @@ export interface MailContactListInput {
80394
81009
  unsubscribed?: (("true" | "false") | boolean);
80395
81010
  }
80396
81011
  export interface MailContactListOutput {
81012
+ /**
81013
+ * Contacts on this page, newest first
81014
+ */
80397
81015
  data: {
81016
+ /**
81017
+ * Contact id
81018
+ */
80398
81019
  id: string;
81020
+ /**
81021
+ * Contact email address, normalized to lowercase
81022
+ */
80399
81023
  email: string;
81024
+ /**
81025
+ * When the contact was created (ISO 8601 UTC)
81026
+ */
80400
81027
  createdAt: string;
81028
+ /**
81029
+ * When the contact was last modified (ISO 8601 UTC)
81030
+ */
80401
81031
  updatedAt: string;
81032
+ /**
81033
+ * Audience the contact belongs to
81034
+ */
80402
81035
  audienceId: string;
80403
81036
  properties?: unknown;
81037
+ /**
81038
+ * Marketing opt-out flag for this audience
81039
+ */
80404
81040
  unsubscribed: boolean;
80405
81041
  }[];
81042
+ /**
81043
+ * Cursor for the next page; null on the last page
81044
+ */
80406
81045
  nextCursor: (string | null);
80407
81046
  }
80408
81047
  export interface MailContactUpdateInput {
@@ -80426,269 +81065,794 @@ export interface MailContactUpdateInput {
80426
81065
  unsubscribed?: boolean;
80427
81066
  }
80428
81067
  export interface MailContactUpdateOutput {
81068
+ /**
81069
+ * Contact id
81070
+ */
80429
81071
  id: string;
81072
+ /**
81073
+ * Contact email address, normalized to lowercase
81074
+ */
80430
81075
  email: string;
81076
+ /**
81077
+ * When the contact was created (ISO 8601 UTC)
81078
+ */
80431
81079
  createdAt: string;
81080
+ /**
81081
+ * When the contact was last modified (ISO 8601 UTC)
81082
+ */
80432
81083
  updatedAt: string;
81084
+ /**
81085
+ * Audience the contact belongs to
81086
+ */
80433
81087
  audienceId: string;
80434
81088
  properties?: unknown;
81089
+ /**
81090
+ * Marketing opt-out flag for this audience
81091
+ */
80435
81092
  unsubscribed: boolean;
80436
81093
  }
80437
81094
  export interface MailDomainAllowedListInput {
80438
81095
  }
81096
+ /**
81097
+ * Apex domains this product may register sending domains under
81098
+ */
80439
81099
  export type MailDomainAllowedListOutput = {
80440
- mode: string;
81100
+ /**
81101
+ * Who operates DNS under this apex: managed if the platform publishes the records, external if you do
81102
+ */
81103
+ mode: ("external" | "managed");
81104
+ /**
81105
+ * The apex domain itself, e.g. "example.com"
81106
+ */
80441
81107
  domain: string;
81108
+ /**
81109
+ * Governance domain id — pass it to the governance console, not to mail_domain_get
81110
+ */
80442
81111
  domainId: string;
81112
+ /**
81113
+ * How many extensions currently send under this apex
81114
+ */
80443
81115
  extensionCount: number;
80444
81116
  }[];
80445
81117
  export interface MailDomainCreateInput {
80446
81118
  /**
80447
- * The sending domain to register, e.g. "example.com"
81119
+ * The sending domain to register, e.g. "example.com"; it must sit under an apex this product is allowed to use (see mail_domain_allowed_list)
80448
81120
  */
80449
81121
  name: string;
80450
81122
  /**
80451
- * AWS region for the SES identity (data residency); immutable after create
81123
+ * AWS region for the SES identity, which fixes data residency (default "eu-north-1"); immutable once the domain is created
80452
81124
  */
80453
81125
  region?: string;
80454
81126
  }
80455
81127
  export interface MailDomainCreateOutput {
81128
+ /**
81129
+ * Sending domain id
81130
+ */
80456
81131
  id: string;
80457
- tls: string;
81132
+ /**
81133
+ * TLS policy for delivery: opportunistic falls back to plaintext if the recipient offers no TLS, enforced fails the send instead
81134
+ */
81135
+ tls: ("opportunistic" | "enforced");
81136
+ /**
81137
+ * Governed apex this domain sits under; null if it is not governed
81138
+ */
80458
81139
  apex: (string | null);
80459
- mode: (string | null);
81140
+ /**
81141
+ * Who operates DNS: managed if the platform publishes the records for you, external if you publish them yourself; null if the domain is not governed
81142
+ */
81143
+ mode: (("external" | "managed") | null);
81144
+ /**
81145
+ * The sending domain itself, e.g. "example.com"
81146
+ */
80460
81147
  name: string;
81148
+ /**
81149
+ * True only when the domain is verified AND its governance binding is active — the condition for sending from it
81150
+ */
80461
81151
  active: boolean;
81152
+ /**
81153
+ * AWS region hosting the SES identity, which fixes data residency; set at create time and immutable
81154
+ */
80462
81155
  region: string;
80463
- status: string;
81156
+ /**
81157
+ * SES verification state: not_started before the first check, pending while DNS propagates, verified once sending is allowed, failed or temporary_failure when SES could not verify
81158
+ */
81159
+ status: ("not_started" | "pending" | "verified" | "failed" | "temporary_failure");
81160
+ /**
81161
+ * DNS records to publish for this domain, each with its last-seen resolution status
81162
+ */
80464
81163
  records: {
81164
+ /**
81165
+ * Fully-qualified host the record is published at
81166
+ */
80465
81167
  name: string;
80466
- type: string;
81168
+ /**
81169
+ * DNS record type to publish
81170
+ */
81171
+ type: ("CNAME" | "TXT" | "MX");
81172
+ /**
81173
+ * Value the record must resolve to
81174
+ */
80467
81175
  value: string;
80468
- purpose: string;
81176
+ /**
81177
+ * What the record is for: dkim signs outgoing mail, spf authorises the sender, return-path-mx routes bounces back, dmarc states the policy
81178
+ */
81179
+ purpose: ("dkim" | "spf" | "return-path-mx" | "dmarc");
81180
+ /**
81181
+ * MX priority; present only on MX records
81182
+ */
80469
81183
  priority?: number;
81184
+ /**
81185
+ * True if the domain cannot verify without this record; false if it is optional
81186
+ */
80470
81187
  required: boolean;
81188
+ /**
81189
+ * True if the record was found in DNS at the last check; absent when no check has run
81190
+ */
80471
81191
  resolved?: boolean;
80472
81192
  }[];
81193
+ /**
81194
+ * When the domain was registered (ISO 8601 UTC)
81195
+ */
80473
81196
  createdAt: string;
81197
+ /**
81198
+ * When the domain record was last changed (ISO 8601 UTC)
81199
+ */
80474
81200
  updatedAt: string;
81201
+ /**
81202
+ * When the domain became verified (ISO 8601 UTC); null while it is not
81203
+ */
80475
81204
  verifiedAt: (string | null);
81205
+ /**
81206
+ * Human-readable steps still outstanding before this domain can send
81207
+ */
80476
81208
  instructions: string[];
81209
+ /**
81210
+ * True if a 1x1 pixel is injected into outgoing mail to record opens
81211
+ */
80477
81212
  openTracking: boolean;
80478
- bindingStatus: string;
81213
+ /**
81214
+ * Governance binding state: pending while it is being granted, active once the domain may be used, failed if it could not be granted
81215
+ */
81216
+ bindingStatus: ("pending" | "active" | "failed");
81217
+ /**
81218
+ * True if links are rewritten through the tracking host to record clicks
81219
+ */
80479
81220
  clickTracking: boolean;
81221
+ /**
81222
+ * Host used as the bounce (Return-Path) address, so bounces come back to this product
81223
+ */
80480
81224
  customReturnPath: string;
81225
+ /**
81226
+ * Host serving the click redirect and the open pixel; null if tracking is off
81227
+ */
80481
81228
  trackingSubdomain: (string | null);
81229
+ /**
81230
+ * Id of the governance domain this one is registered under; null if it is not governed
81231
+ */
80482
81232
  governanceDomainId: (string | null);
81233
+ /**
81234
+ * Id of the binding between this product and the governance domain; null if unbound
81235
+ */
80483
81236
  governanceBindingId: (string | null);
81237
+ /**
81238
+ * When verification was first requested (ISO 8601 UTC)
81239
+ */
80484
81240
  verificationStartedAt: string;
81241
+ /**
81242
+ * When DNS and SES were last checked (ISO 8601 UTC); null if no check has run yet
81243
+ */
80485
81244
  lastVerificationCheckAt: (string | null);
80486
81245
  }
80487
81246
  export interface MailDomainDeleteInput {
80488
81247
  /**
80489
- * Domain id to delete
81248
+ * Sending domain to delete, along with its SES identity
80490
81249
  */
80491
81250
  id: string;
80492
81251
  }
80493
81252
  export interface MailDomainDeleteOutput {
81253
+ /**
81254
+ * True once the domain and its SES identity are gone
81255
+ */
80494
81256
  deleted: boolean;
80495
81257
  }
80496
81258
  export interface MailDomainGetInput {
80497
81259
  /**
80498
- * Domain id
81260
+ * Sending domain id
80499
81261
  */
80500
81262
  id: string;
80501
81263
  }
80502
81264
  export interface MailDomainGetOutput {
81265
+ /**
81266
+ * Sending domain id
81267
+ */
80503
81268
  id: string;
80504
- tls: string;
81269
+ /**
81270
+ * TLS policy for delivery: opportunistic falls back to plaintext if the recipient offers no TLS, enforced fails the send instead
81271
+ */
81272
+ tls: ("opportunistic" | "enforced");
81273
+ /**
81274
+ * Governed apex this domain sits under; null if it is not governed
81275
+ */
80505
81276
  apex: (string | null);
80506
- mode: (string | null);
81277
+ /**
81278
+ * Who operates DNS: managed if the platform publishes the records for you, external if you publish them yourself; null if the domain is not governed
81279
+ */
81280
+ mode: (("external" | "managed") | null);
81281
+ /**
81282
+ * The sending domain itself, e.g. "example.com"
81283
+ */
80507
81284
  name: string;
81285
+ /**
81286
+ * True only when the domain is verified AND its governance binding is active — the condition for sending from it
81287
+ */
80508
81288
  active: boolean;
81289
+ /**
81290
+ * AWS region hosting the SES identity, which fixes data residency; set at create time and immutable
81291
+ */
80509
81292
  region: string;
80510
- status: string;
81293
+ /**
81294
+ * SES verification state: not_started before the first check, pending while DNS propagates, verified once sending is allowed, failed or temporary_failure when SES could not verify
81295
+ */
81296
+ status: ("not_started" | "pending" | "verified" | "failed" | "temporary_failure");
81297
+ /**
81298
+ * DNS records to publish for this domain, each with its last-seen resolution status
81299
+ */
80511
81300
  records: {
81301
+ /**
81302
+ * Fully-qualified host the record is published at
81303
+ */
80512
81304
  name: string;
80513
- type: string;
81305
+ /**
81306
+ * DNS record type to publish
81307
+ */
81308
+ type: ("CNAME" | "TXT" | "MX");
81309
+ /**
81310
+ * Value the record must resolve to
81311
+ */
80514
81312
  value: string;
80515
- purpose: string;
81313
+ /**
81314
+ * What the record is for: dkim signs outgoing mail, spf authorises the sender, return-path-mx routes bounces back, dmarc states the policy
81315
+ */
81316
+ purpose: ("dkim" | "spf" | "return-path-mx" | "dmarc");
81317
+ /**
81318
+ * MX priority; present only on MX records
81319
+ */
80516
81320
  priority?: number;
81321
+ /**
81322
+ * True if the domain cannot verify without this record; false if it is optional
81323
+ */
80517
81324
  required: boolean;
81325
+ /**
81326
+ * True if the record was found in DNS at the last check; absent when no check has run
81327
+ */
80518
81328
  resolved?: boolean;
80519
81329
  }[];
81330
+ /**
81331
+ * When the domain was registered (ISO 8601 UTC)
81332
+ */
80520
81333
  createdAt: string;
81334
+ /**
81335
+ * When the domain record was last changed (ISO 8601 UTC)
81336
+ */
80521
81337
  updatedAt: string;
81338
+ /**
81339
+ * When the domain became verified (ISO 8601 UTC); null while it is not
81340
+ */
80522
81341
  verifiedAt: (string | null);
81342
+ /**
81343
+ * Human-readable steps still outstanding before this domain can send
81344
+ */
80523
81345
  instructions: string[];
81346
+ /**
81347
+ * True if a 1x1 pixel is injected into outgoing mail to record opens
81348
+ */
80524
81349
  openTracking: boolean;
80525
- bindingStatus: string;
81350
+ /**
81351
+ * Governance binding state: pending while it is being granted, active once the domain may be used, failed if it could not be granted
81352
+ */
81353
+ bindingStatus: ("pending" | "active" | "failed");
81354
+ /**
81355
+ * True if links are rewritten through the tracking host to record clicks
81356
+ */
80526
81357
  clickTracking: boolean;
81358
+ /**
81359
+ * Host used as the bounce (Return-Path) address, so bounces come back to this product
81360
+ */
80527
81361
  customReturnPath: string;
81362
+ /**
81363
+ * Host serving the click redirect and the open pixel; null if tracking is off
81364
+ */
80528
81365
  trackingSubdomain: (string | null);
81366
+ /**
81367
+ * Id of the governance domain this one is registered under; null if it is not governed
81368
+ */
80529
81369
  governanceDomainId: (string | null);
81370
+ /**
81371
+ * Id of the binding between this product and the governance domain; null if unbound
81372
+ */
80530
81373
  governanceBindingId: (string | null);
81374
+ /**
81375
+ * When verification was first requested (ISO 8601 UTC)
81376
+ */
80531
81377
  verificationStartedAt: string;
81378
+ /**
81379
+ * When DNS and SES were last checked (ISO 8601 UTC); null if no check has run yet
81380
+ */
80532
81381
  lastVerificationCheckAt: (string | null);
80533
81382
  }
80534
81383
  export interface MailDomainListInput {
80535
81384
  }
81385
+ /**
81386
+ * Sending domains registered for the current product
81387
+ */
80536
81388
  export type MailDomainListOutput = {
81389
+ /**
81390
+ * Sending domain id
81391
+ */
80537
81392
  id: string;
80538
- tls: string;
81393
+ /**
81394
+ * TLS policy for delivery: opportunistic falls back to plaintext if the recipient offers no TLS, enforced fails the send instead
81395
+ */
81396
+ tls: ("opportunistic" | "enforced");
81397
+ /**
81398
+ * Governed apex this domain sits under; null if it is not governed
81399
+ */
80539
81400
  apex: (string | null);
80540
- mode: (string | null);
81401
+ /**
81402
+ * Who operates DNS: managed if the platform publishes the records for you, external if you publish them yourself; null if the domain is not governed
81403
+ */
81404
+ mode: (("external" | "managed") | null);
81405
+ /**
81406
+ * The sending domain itself, e.g. "example.com"
81407
+ */
80541
81408
  name: string;
81409
+ /**
81410
+ * True only when the domain is verified AND its governance binding is active — the condition for sending from it
81411
+ */
80542
81412
  active: boolean;
81413
+ /**
81414
+ * AWS region hosting the SES identity, which fixes data residency; set at create time and immutable
81415
+ */
80543
81416
  region: string;
80544
- status: string;
81417
+ /**
81418
+ * SES verification state: not_started before the first check, pending while DNS propagates, verified once sending is allowed, failed or temporary_failure when SES could not verify
81419
+ */
81420
+ status: ("not_started" | "pending" | "verified" | "failed" | "temporary_failure");
81421
+ /**
81422
+ * DNS records to publish for this domain, each with its last-seen resolution status
81423
+ */
80545
81424
  records: {
81425
+ /**
81426
+ * Fully-qualified host the record is published at
81427
+ */
80546
81428
  name: string;
80547
- type: string;
81429
+ /**
81430
+ * DNS record type to publish
81431
+ */
81432
+ type: ("CNAME" | "TXT" | "MX");
81433
+ /**
81434
+ * Value the record must resolve to
81435
+ */
80548
81436
  value: string;
80549
- purpose: string;
81437
+ /**
81438
+ * What the record is for: dkim signs outgoing mail, spf authorises the sender, return-path-mx routes bounces back, dmarc states the policy
81439
+ */
81440
+ purpose: ("dkim" | "spf" | "return-path-mx" | "dmarc");
81441
+ /**
81442
+ * MX priority; present only on MX records
81443
+ */
80550
81444
  priority?: number;
81445
+ /**
81446
+ * True if the domain cannot verify without this record; false if it is optional
81447
+ */
80551
81448
  required: boolean;
81449
+ /**
81450
+ * True if the record was found in DNS at the last check; absent when no check has run
81451
+ */
80552
81452
  resolved?: boolean;
80553
81453
  }[];
81454
+ /**
81455
+ * When the domain was registered (ISO 8601 UTC)
81456
+ */
80554
81457
  createdAt: string;
81458
+ /**
81459
+ * When the domain record was last changed (ISO 8601 UTC)
81460
+ */
80555
81461
  updatedAt: string;
81462
+ /**
81463
+ * When the domain became verified (ISO 8601 UTC); null while it is not
81464
+ */
80556
81465
  verifiedAt: (string | null);
81466
+ /**
81467
+ * Human-readable steps still outstanding before this domain can send
81468
+ */
80557
81469
  instructions: string[];
81470
+ /**
81471
+ * True if a 1x1 pixel is injected into outgoing mail to record opens
81472
+ */
80558
81473
  openTracking: boolean;
80559
- bindingStatus: string;
81474
+ /**
81475
+ * Governance binding state: pending while it is being granted, active once the domain may be used, failed if it could not be granted
81476
+ */
81477
+ bindingStatus: ("pending" | "active" | "failed");
81478
+ /**
81479
+ * True if links are rewritten through the tracking host to record clicks
81480
+ */
80560
81481
  clickTracking: boolean;
81482
+ /**
81483
+ * Host used as the bounce (Return-Path) address, so bounces come back to this product
81484
+ */
80561
81485
  customReturnPath: string;
81486
+ /**
81487
+ * Host serving the click redirect and the open pixel; null if tracking is off
81488
+ */
80562
81489
  trackingSubdomain: (string | null);
81490
+ /**
81491
+ * Id of the governance domain this one is registered under; null if it is not governed
81492
+ */
80563
81493
  governanceDomainId: (string | null);
81494
+ /**
81495
+ * Id of the binding between this product and the governance domain; null if unbound
81496
+ */
80564
81497
  governanceBindingId: (string | null);
81498
+ /**
81499
+ * When verification was first requested (ISO 8601 UTC)
81500
+ */
80565
81501
  verificationStartedAt: string;
81502
+ /**
81503
+ * When DNS and SES were last checked (ISO 8601 UTC); null if no check has run yet
81504
+ */
80566
81505
  lastVerificationCheckAt: (string | null);
80567
81506
  }[];
80568
81507
  export interface MailDomainUpdateInput {
80569
81508
  /**
80570
- * Domain id
81509
+ * Sending domain id
80571
81510
  */
80572
81511
  id: string;
80573
81512
  /**
80574
- * TLS policy: opportunistic (default) or enforced
81513
+ * TLS policy: opportunistic (default) falls back to plaintext, enforced fails the send instead; omit to leave it unchanged
80575
81514
  */
80576
81515
  tls?: ("opportunistic" | "enforced");
80577
81516
  /**
80578
- * Enable open tracking (1×1 pixel); off by default
81517
+ * Record opens by injecting a 1x1 pixel (off by default); omit to leave it unchanged
80579
81518
  */
80580
81519
  openTracking?: boolean;
80581
81520
  /**
80582
- * Enable click tracking (link rewrite); off by default
81521
+ * Record clicks by rewriting links through the tracking host (off by default); omit to leave it unchanged
80583
81522
  */
80584
81523
  clickTracking?: boolean;
80585
81524
  /**
80586
- * Host used for the click-redirect and open-pixel
81525
+ * Host to serve the click redirect and open pixel from, or null to clear it; omit to leave it unchanged
80587
81526
  */
80588
81527
  trackingSubdomain?: (string | null);
80589
81528
  }
80590
81529
  export interface MailDomainUpdateOutput {
81530
+ /**
81531
+ * Sending domain id
81532
+ */
80591
81533
  id: string;
80592
- tls: string;
81534
+ /**
81535
+ * TLS policy for delivery: opportunistic falls back to plaintext if the recipient offers no TLS, enforced fails the send instead
81536
+ */
81537
+ tls: ("opportunistic" | "enforced");
81538
+ /**
81539
+ * Governed apex this domain sits under; null if it is not governed
81540
+ */
80593
81541
  apex: (string | null);
80594
- mode: (string | null);
81542
+ /**
81543
+ * Who operates DNS: managed if the platform publishes the records for you, external if you publish them yourself; null if the domain is not governed
81544
+ */
81545
+ mode: (("external" | "managed") | null);
81546
+ /**
81547
+ * The sending domain itself, e.g. "example.com"
81548
+ */
80595
81549
  name: string;
81550
+ /**
81551
+ * True only when the domain is verified AND its governance binding is active — the condition for sending from it
81552
+ */
80596
81553
  active: boolean;
81554
+ /**
81555
+ * AWS region hosting the SES identity, which fixes data residency; set at create time and immutable
81556
+ */
80597
81557
  region: string;
80598
- status: string;
81558
+ /**
81559
+ * SES verification state: not_started before the first check, pending while DNS propagates, verified once sending is allowed, failed or temporary_failure when SES could not verify
81560
+ */
81561
+ status: ("not_started" | "pending" | "verified" | "failed" | "temporary_failure");
81562
+ /**
81563
+ * DNS records to publish for this domain, each with its last-seen resolution status
81564
+ */
80599
81565
  records: {
81566
+ /**
81567
+ * Fully-qualified host the record is published at
81568
+ */
80600
81569
  name: string;
80601
- type: string;
81570
+ /**
81571
+ * DNS record type to publish
81572
+ */
81573
+ type: ("CNAME" | "TXT" | "MX");
81574
+ /**
81575
+ * Value the record must resolve to
81576
+ */
80602
81577
  value: string;
80603
- purpose: string;
81578
+ /**
81579
+ * What the record is for: dkim signs outgoing mail, spf authorises the sender, return-path-mx routes bounces back, dmarc states the policy
81580
+ */
81581
+ purpose: ("dkim" | "spf" | "return-path-mx" | "dmarc");
81582
+ /**
81583
+ * MX priority; present only on MX records
81584
+ */
80604
81585
  priority?: number;
81586
+ /**
81587
+ * True if the domain cannot verify without this record; false if it is optional
81588
+ */
80605
81589
  required: boolean;
81590
+ /**
81591
+ * True if the record was found in DNS at the last check; absent when no check has run
81592
+ */
80606
81593
  resolved?: boolean;
80607
81594
  }[];
81595
+ /**
81596
+ * When the domain was registered (ISO 8601 UTC)
81597
+ */
80608
81598
  createdAt: string;
81599
+ /**
81600
+ * When the domain record was last changed (ISO 8601 UTC)
81601
+ */
80609
81602
  updatedAt: string;
81603
+ /**
81604
+ * When the domain became verified (ISO 8601 UTC); null while it is not
81605
+ */
80610
81606
  verifiedAt: (string | null);
81607
+ /**
81608
+ * Human-readable steps still outstanding before this domain can send
81609
+ */
80611
81610
  instructions: string[];
81611
+ /**
81612
+ * True if a 1x1 pixel is injected into outgoing mail to record opens
81613
+ */
80612
81614
  openTracking: boolean;
80613
- bindingStatus: string;
81615
+ /**
81616
+ * Governance binding state: pending while it is being granted, active once the domain may be used, failed if it could not be granted
81617
+ */
81618
+ bindingStatus: ("pending" | "active" | "failed");
81619
+ /**
81620
+ * True if links are rewritten through the tracking host to record clicks
81621
+ */
80614
81622
  clickTracking: boolean;
81623
+ /**
81624
+ * Host used as the bounce (Return-Path) address, so bounces come back to this product
81625
+ */
80615
81626
  customReturnPath: string;
81627
+ /**
81628
+ * Host serving the click redirect and the open pixel; null if tracking is off
81629
+ */
80616
81630
  trackingSubdomain: (string | null);
81631
+ /**
81632
+ * Id of the governance domain this one is registered under; null if it is not governed
81633
+ */
80617
81634
  governanceDomainId: (string | null);
81635
+ /**
81636
+ * Id of the binding between this product and the governance domain; null if unbound
81637
+ */
80618
81638
  governanceBindingId: (string | null);
81639
+ /**
81640
+ * When verification was first requested (ISO 8601 UTC)
81641
+ */
80619
81642
  verificationStartedAt: string;
81643
+ /**
81644
+ * When DNS and SES were last checked (ISO 8601 UTC); null if no check has run yet
81645
+ */
80620
81646
  lastVerificationCheckAt: (string | null);
80621
81647
  }
80622
81648
  export interface MailDomainVerifyInput {
80623
81649
  /**
80624
- * Domain id to re-check now
81650
+ * Sending domain to re-check against DNS and SES right now, instead of waiting for the next scheduled check
80625
81651
  */
80626
81652
  id: string;
80627
81653
  }
80628
81654
  export interface MailDomainVerifyOutput {
81655
+ /**
81656
+ * Sending domain id
81657
+ */
80629
81658
  id: string;
80630
- tls: string;
81659
+ /**
81660
+ * TLS policy for delivery: opportunistic falls back to plaintext if the recipient offers no TLS, enforced fails the send instead
81661
+ */
81662
+ tls: ("opportunistic" | "enforced");
81663
+ /**
81664
+ * Governed apex this domain sits under; null if it is not governed
81665
+ */
80631
81666
  apex: (string | null);
80632
- mode: (string | null);
81667
+ /**
81668
+ * Who operates DNS: managed if the platform publishes the records for you, external if you publish them yourself; null if the domain is not governed
81669
+ */
81670
+ mode: (("external" | "managed") | null);
81671
+ /**
81672
+ * The sending domain itself, e.g. "example.com"
81673
+ */
80633
81674
  name: string;
81675
+ /**
81676
+ * True only when the domain is verified AND its governance binding is active — the condition for sending from it
81677
+ */
80634
81678
  active: boolean;
81679
+ /**
81680
+ * AWS region hosting the SES identity, which fixes data residency; set at create time and immutable
81681
+ */
80635
81682
  region: string;
80636
- status: string;
81683
+ /**
81684
+ * SES verification state: not_started before the first check, pending while DNS propagates, verified once sending is allowed, failed or temporary_failure when SES could not verify
81685
+ */
81686
+ status: ("not_started" | "pending" | "verified" | "failed" | "temporary_failure");
81687
+ /**
81688
+ * DNS records to publish for this domain, each with its last-seen resolution status
81689
+ */
80637
81690
  records: {
81691
+ /**
81692
+ * Fully-qualified host the record is published at
81693
+ */
80638
81694
  name: string;
80639
- type: string;
81695
+ /**
81696
+ * DNS record type to publish
81697
+ */
81698
+ type: ("CNAME" | "TXT" | "MX");
81699
+ /**
81700
+ * Value the record must resolve to
81701
+ */
80640
81702
  value: string;
80641
- purpose: string;
81703
+ /**
81704
+ * What the record is for: dkim signs outgoing mail, spf authorises the sender, return-path-mx routes bounces back, dmarc states the policy
81705
+ */
81706
+ purpose: ("dkim" | "spf" | "return-path-mx" | "dmarc");
81707
+ /**
81708
+ * MX priority; present only on MX records
81709
+ */
80642
81710
  priority?: number;
81711
+ /**
81712
+ * True if the domain cannot verify without this record; false if it is optional
81713
+ */
80643
81714
  required: boolean;
81715
+ /**
81716
+ * True if the record was found in DNS at the last check; absent when no check has run
81717
+ */
80644
81718
  resolved?: boolean;
80645
81719
  }[];
81720
+ /**
81721
+ * When the domain was registered (ISO 8601 UTC)
81722
+ */
80646
81723
  createdAt: string;
81724
+ /**
81725
+ * When the domain record was last changed (ISO 8601 UTC)
81726
+ */
80647
81727
  updatedAt: string;
81728
+ /**
81729
+ * When the domain became verified (ISO 8601 UTC); null while it is not
81730
+ */
80648
81731
  verifiedAt: (string | null);
81732
+ /**
81733
+ * Human-readable steps still outstanding before this domain can send
81734
+ */
80649
81735
  instructions: string[];
81736
+ /**
81737
+ * True if a 1x1 pixel is injected into outgoing mail to record opens
81738
+ */
80650
81739
  openTracking: boolean;
80651
- bindingStatus: string;
81740
+ /**
81741
+ * Governance binding state: pending while it is being granted, active once the domain may be used, failed if it could not be granted
81742
+ */
81743
+ bindingStatus: ("pending" | "active" | "failed");
81744
+ /**
81745
+ * True if links are rewritten through the tracking host to record clicks
81746
+ */
80652
81747
  clickTracking: boolean;
81748
+ /**
81749
+ * Host used as the bounce (Return-Path) address, so bounces come back to this product
81750
+ */
80653
81751
  customReturnPath: string;
81752
+ /**
81753
+ * Host serving the click redirect and the open pixel; null if tracking is off
81754
+ */
80654
81755
  trackingSubdomain: (string | null);
81756
+ /**
81757
+ * Id of the governance domain this one is registered under; null if it is not governed
81758
+ */
80655
81759
  governanceDomainId: (string | null);
81760
+ /**
81761
+ * Id of the binding between this product and the governance domain; null if unbound
81762
+ */
80656
81763
  governanceBindingId: (string | null);
81764
+ /**
81765
+ * When verification was first requested (ISO 8601 UTC)
81766
+ */
80657
81767
  verificationStartedAt: string;
81768
+ /**
81769
+ * When DNS and SES were last checked (ISO 8601 UTC); null if no check has run yet
81770
+ */
80658
81771
  lastVerificationCheckAt: (string | null);
80659
81772
  }
80660
81773
  export interface MailEmailCancelInput {
80661
81774
  /**
80662
- * Email id
81775
+ * Email id — as returned by mail_email_send
80663
81776
  */
80664
81777
  id: string;
80665
81778
  }
80666
81779
  export interface MailEmailCancelOutput {
81780
+ /**
81781
+ * Id of the canceled email
81782
+ */
80667
81783
  id: string;
81784
+ /**
81785
+ * The email’s state after the call — always "canceled"
81786
+ */
80668
81787
  status: "canceled";
80669
81788
  }
80670
81789
  export interface MailEmailGetInput {
80671
81790
  /**
80672
- * Email id
81791
+ * Email id — as returned by mail_email_send
80673
81792
  */
80674
81793
  id: string;
80675
81794
  }
80676
81795
  export interface MailEmailGetOutput {
81796
+ /**
81797
+ * Cc recipients; empty when there were none
81798
+ */
80677
81799
  cc: string[];
81800
+ /**
81801
+ * Email id
81802
+ */
80678
81803
  id: string;
81804
+ /**
81805
+ * Primary recipients
81806
+ */
80679
81807
  to: string[];
81808
+ /**
81809
+ * Bcc recipients; empty when there were none. Never appeared in the message headers.
81810
+ */
80680
81811
  bcc: string[];
81812
+ /**
81813
+ * Sender the message was sent as
81814
+ */
80681
81815
  from: string;
81816
+ /**
81817
+ * Where the email stands: scheduled, queued, sent, failed, canceled, delivered, bounced, complained, suppressed or blocked
81818
+ */
80682
81819
  status: ("scheduled" | "queued" | "sent" | "failed" | "canceled" | "delivered" | "bounced" | "complained" | "suppressed" | "blocked");
81820
+ /**
81821
+ * Subject line as sent, after any template rendering
81822
+ */
80683
81823
  subject: string;
81824
+ /**
81825
+ * ISO-8601 instant the email was accepted
81826
+ */
80684
81827
  created_at: string;
81828
+ /**
81829
+ * The latest lifecycle event, the reason `status` reads as it does
81830
+ */
80685
81831
  last_event: {
81832
+ /**
81833
+ * The most recent lifecycle event — `email.` followed by the status it moved to
81834
+ */
80686
81835
  type: ("email.scheduled" | "email.queued" | "email.sent" | "email.failed" | "email.canceled" | "email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.blocked");
81836
+ /**
81837
+ * ISO-8601 instant of that event; null when no event has been recorded yet
81838
+ */
80687
81839
  created_at: (string | null);
80688
81840
  };
81841
+ /**
81842
+ * Template the email was rendered from; null for an inline send
81843
+ */
80689
81844
  template_id: (string | null);
81845
+ /**
81846
+ * ISO-8601 instant the email is scheduled for; null when it was sent immediately
81847
+ */
80690
81848
  scheduled_at: (string | null);
81849
+ /**
81850
+ * Name of that template; null for an inline send
81851
+ */
80691
81852
  template_name: (string | null);
81853
+ /**
81854
+ * The sending provider’s own id, for correlating with its logs; null until the email leaves
81855
+ */
80692
81856
  provider_message_id: (string | null);
80693
81857
  }
80694
81858
  export interface MailEmailSendInput {
@@ -80705,38 +81869,41 @@ export interface MailEmailSendInput {
80705
81869
  */
80706
81870
  bcc?: (string | string[]);
80707
81871
  /**
80708
- * Sender, e.g. "Name <you@your-domain.com>"
81872
+ * Sender on a verified domain, e.g. "Name <you@your-domain.com>"
80709
81873
  */
80710
81874
  from: string;
80711
81875
  /**
80712
- * HTML body
81876
+ * HTML body. Inline sends only — forbidden with a template.
80713
81877
  */
80714
81878
  html?: string;
80715
81879
  /**
80716
- * Metadata tags
81880
+ * Metadata tags attached to the message as `X-Tag-<name>` headers
80717
81881
  */
80718
81882
  tags?: {
80719
81883
  /**
80720
- * Tag name
81884
+ * Tag name — printable US-ASCII without a colon; becomes the `X-Tag-<name>` header
80721
81885
  */
80722
81886
  name: string;
80723
81887
  /**
80724
- * Tag value
81888
+ * Tag value; must not contain CR or LF
80725
81889
  */
80726
81890
  value: string;
80727
81891
  }[];
80728
81892
  /**
80729
- * Plain-text body; auto-derived from html if omitted
81893
+ * Plain-text body; auto-derived from html if omitted. Inline sends only.
80730
81894
  */
80731
81895
  text?: string;
80732
81896
  /**
80733
- * Custom headers map
81897
+ * Custom MIME headers, keyed by header name
80734
81898
  */
80735
81899
  headers?: {
81900
+ /**
81901
+ * Header value; must not contain CR or LF
81902
+ */
80736
81903
  [k: string]: string;
80737
81904
  };
80738
81905
  /**
80739
- * Email subject (required for inline sends)
81906
+ * Subject line, capped at the RFC-5322 line limit. Required for inline sends, forbidden with a template.
80740
81907
  */
80741
81908
  subject?: string;
80742
81909
  /**
@@ -80752,23 +81919,26 @@ export interface MailEmailSendInput {
80752
81919
  */
80753
81920
  id: string;
80754
81921
  /**
80755
- * Values for the template variables
81922
+ * Values for the template variables. Defaults to {}.
80756
81923
  */
80757
81924
  variables?: {
80758
81925
  [k: string]: (string | number | boolean);
80759
81926
  };
80760
81927
  };
80761
81928
  /**
80762
- * ISO-8601 instant to send at; future, within 30 days. Omit to send now.
81929
+ * ISO-8601 instant to send at; must be in the future and within 30 days. Omit to send now.
80763
81930
  */
80764
81931
  scheduled_at?: string;
80765
81932
  }
80766
81933
  export interface MailEmailSendOutput {
81934
+ /**
81935
+ * Id of the accepted email — pass it to mail_email_get to follow delivery
81936
+ */
80767
81937
  id: string;
80768
81938
  }
80769
81939
  export interface MailEmailSendBatchInput {
80770
81940
  /**
80771
- * Up to 100 emails to send, each shaped like a single send
81941
+ * Up to 100 emails to send; `scheduled_at` is not allowed on a batch item
80772
81942
  */
80773
81943
  emails: {
80774
81944
  /**
@@ -80784,38 +81954,41 @@ export interface MailEmailSendBatchInput {
80784
81954
  */
80785
81955
  bcc?: (string | string[]);
80786
81956
  /**
80787
- * Sender, e.g. "Name <you@your-domain.com>"
81957
+ * Sender on a verified domain, e.g. "Name <you@your-domain.com>"
80788
81958
  */
80789
81959
  from: string;
80790
81960
  /**
80791
- * HTML body
81961
+ * HTML body. Inline sends only — forbidden with a template.
80792
81962
  */
80793
81963
  html?: string;
80794
81964
  /**
80795
- * Metadata tags
81965
+ * Metadata tags attached to the message as `X-Tag-<name>` headers
80796
81966
  */
80797
81967
  tags?: {
80798
81968
  /**
80799
- * Tag name
81969
+ * Tag name — printable US-ASCII without a colon; becomes the `X-Tag-<name>` header
80800
81970
  */
80801
81971
  name: string;
80802
81972
  /**
80803
- * Tag value
81973
+ * Tag value; must not contain CR or LF
80804
81974
  */
80805
81975
  value: string;
80806
81976
  }[];
80807
81977
  /**
80808
- * Plain-text body; auto-derived from html if omitted
81978
+ * Plain-text body; auto-derived from html if omitted. Inline sends only.
80809
81979
  */
80810
81980
  text?: string;
80811
81981
  /**
80812
- * Custom headers map
81982
+ * Custom MIME headers, keyed by header name
80813
81983
  */
80814
81984
  headers?: {
81985
+ /**
81986
+ * Header value; must not contain CR or LF
81987
+ */
80815
81988
  [k: string]: string;
80816
81989
  };
80817
81990
  /**
80818
- * Email subject (required for inline sends)
81991
+ * Subject line, capped at the RFC-5322 line limit. Required for inline sends, forbidden with a template.
80819
81992
  */
80820
81993
  subject?: string;
80821
81994
  /**
@@ -80831,139 +82004,304 @@ export interface MailEmailSendBatchInput {
80831
82004
  */
80832
82005
  id: string;
80833
82006
  /**
80834
- * Values for the template variables
82007
+ * Values for the template variables. Defaults to {}.
80835
82008
  */
80836
82009
  variables?: {
80837
82010
  [k: string]: (string | number | boolean);
80838
82011
  };
80839
82012
  };
80840
82013
  /**
80841
- * ISO-8601 instant to send at; future, within 30 days. Omit to send now.
82014
+ * ISO-8601 instant to send at; must be in the future and within 30 days. Omit to send now.
80842
82015
  */
80843
82016
  scheduled_at?: string;
80844
82017
  }[];
80845
82018
  }
82019
+ /**
82020
+ * One entry per submitted email, in the order they were submitted
82021
+ */
80846
82022
  export type MailEmailSendBatchOutput = {
82023
+ /**
82024
+ * Id of the accepted email
82025
+ */
80847
82026
  id: string;
80848
82027
  }[];
80849
82028
  export interface MailEmailUpdateInput {
80850
82029
  /**
80851
- * Email id
82030
+ * Email id — as returned by mail_email_send
80852
82031
  */
80853
82032
  id: string;
80854
82033
  /**
80855
- * New ISO-8601 instant; future, within 30 days
82034
+ * New ISO-8601 instant to send at; must be in the future and within 30 days
80856
82035
  */
80857
82036
  scheduled_at: string;
80858
82037
  }
80859
82038
  export interface MailEmailUpdateOutput {
82039
+ /**
82040
+ * Id of the accepted email — pass it to mail_email_get to follow delivery
82041
+ */
80860
82042
  id: string;
80861
82043
  }
80862
82044
  export interface MailReputationGetInput {
80863
82045
  }
80864
82046
  export interface MailReputationGetOutput {
82047
+ /**
82048
+ * True when sending is currently throttled because a rate crossed its threshold
82049
+ */
80865
82050
  gated: boolean;
82051
+ /**
82052
+ * Emails sent in the window — the denominator of both rates
82053
+ */
80866
82054
  volume: number;
82055
+ /**
82056
+ * Spam complaints in the window
82057
+ */
80867
82058
  complaints: number;
82059
+ /**
82060
+ * The configured limits the rates above are compared against
82061
+ */
80868
82062
  thresholds: {
82063
+ /**
82064
+ * Emails needed in the window before either rate is acted on — below it the sample is too small to judge
82065
+ */
80869
82066
  min_volume: number;
82067
+ /**
82068
+ * Ratio 0-1 at or above which sending is gated
82069
+ */
80870
82070
  complaint_rate: number;
82071
+ /**
82072
+ * Ratio 0-1 at or above which sending is gated
82073
+ */
80871
82074
  hard_bounce_rate: number;
80872
82075
  };
82076
+ /**
82077
+ * Length in days of the rolling window the rates below are measured over
82078
+ */
80873
82079
  window_days: number;
82080
+ /**
82081
+ * Hard bounces in the window
82082
+ */
80874
82083
  hard_bounces: number;
82084
+ /**
82085
+ * Complaints divided by volume, as a ratio 0-1 (0.001 = 0.1%)
82086
+ */
80875
82087
  complaint_rate: number;
80876
- tripped_metric: (string | null);
82088
+ /**
82089
+ * Which rate crossed its threshold, or null when nothing did
82090
+ */
82091
+ tripped_metric: (("hard_bounce" | "complaint") | null);
82092
+ /**
82093
+ * Hard bounces divided by volume, as a ratio 0-1 (0.05 = 5%)
82094
+ */
80877
82095
  hard_bounce_rate: number;
80878
82096
  }
80879
82097
  export interface MailStatsGetInput {
82098
+ /**
82099
+ * Rolling window the aggregation covers, ending now. Defaults to 30d.
82100
+ */
80880
82101
  period?: ("7d" | "30d" | "90d");
80881
82102
  }
80882
82103
  export interface MailStatsGetOutput {
82104
+ /**
82105
+ * The absolute instants the period resolved to
82106
+ */
80883
82107
  range: {
82108
+ /**
82109
+ * Exclusive end of the window (ISO-8601 instant, UTC)
82110
+ */
80884
82111
  to: string;
82112
+ /**
82113
+ * Inclusive start of the window (ISO-8601 instant, UTC)
82114
+ */
80885
82115
  from: string;
80886
82116
  };
82117
+ /**
82118
+ * Percent change of each total against the immediately preceding window of the same length
82119
+ */
80887
82120
  deltas: {
82121
+ /**
82122
+ * Change in sent against the previous window of the same length, in percent (-100 = halved to nothing, 25 = a quarter more); null when the previous window was empty
82123
+ */
80888
82124
  sent: (number | null);
82125
+ /**
82126
+ * Change in bounced against the previous window, in percent; null when the previous window was empty
82127
+ */
80889
82128
  bounced: (number | null);
82129
+ /**
82130
+ * Change in delivered against the previous window, in percent; null when the previous window was empty
82131
+ */
80890
82132
  delivered: (number | null);
82133
+ /**
82134
+ * Change in complained against the previous window, in percent; null when the previous window was empty
82135
+ */
80891
82136
  complained: (number | null);
80892
82137
  };
80893
- period: string;
82138
+ /**
82139
+ * The window these numbers cover — the echo of the requested period
82140
+ */
82141
+ period: ("7d" | "30d" | "90d");
82142
+ /**
82143
+ * Counts over the window
82144
+ */
80894
82145
  totals: {
82146
+ /**
82147
+ * Emails accepted for delivery in the window
82148
+ */
80895
82149
  sent: number;
82150
+ /**
82151
+ * Emails that bounced, hard or soft
82152
+ */
80896
82153
  bounced: number;
82154
+ /**
82155
+ * Emails the receiving server accepted
82156
+ */
80897
82157
  delivered: number;
82158
+ /**
82159
+ * Emails a recipient marked as spam
82160
+ */
80898
82161
  complained: number;
80899
82162
  };
82163
+ /**
82164
+ * One bucket per UTC day in the window, oldest first
82165
+ */
80900
82166
  volume: {
82167
+ /**
82168
+ * The UTC day this bucket covers, as YYYY-MM-DD
82169
+ */
80901
82170
  date: string;
82171
+ /**
82172
+ * Emails accepted for delivery on this day
82173
+ */
80902
82174
  sent: number;
82175
+ /**
82176
+ * Emails bounced on this day
82177
+ */
80903
82178
  bounced: number;
82179
+ /**
82180
+ * Emails delivered on this day
82181
+ */
80904
82182
  delivered: number;
80905
82183
  }[];
82184
+ /**
82185
+ * The three rates senders are judged on, as percentages of sent
82186
+ */
80906
82187
  deliverability: {
82188
+ /**
82189
+ * Bounced as a percentage of sent (0-100)
82190
+ */
80907
82191
  bouncedPct: number;
82192
+ /**
82193
+ * Delivered as a percentage of sent (0-100)
82194
+ */
80908
82195
  deliveredPct: number;
82196
+ /**
82197
+ * Complaints as a percentage of sent (0-100)
82198
+ */
80909
82199
  complainedPct: number;
80910
82200
  };
80911
82201
  }
80912
82202
  export interface MailSuppressionAddInput {
80913
82203
  /**
80914
- * Optional free-text note
82204
+ * Optional free-text note explaining why the address was suppressed
80915
82205
  */
80916
82206
  note?: string;
80917
82207
  /**
80918
- * Email address to suppress
82208
+ * Email address to suppress, e.g. "user@example.com"; matched case-insensitively
80919
82209
  */
80920
82210
  address: string;
80921
82211
  }
80922
82212
  export interface MailSuppressionAddOutput {
82213
+ /**
82214
+ * Suppression entry id
82215
+ */
80923
82216
  id: string;
82217
+ /**
82218
+ * Free-text note recorded when the entry was added by hand; null otherwise
82219
+ */
80924
82220
  note: (string | null);
80925
- reason: string;
82221
+ /**
82222
+ * Why the address is suppressed: hard_bounce and complaint come from SES feedback, unsubscribe from the recipient, manual from mail_suppression_add
82223
+ */
82224
+ reason: ("hard_bounce" | "complaint" | "manual" | "unsubscribe");
82225
+ /**
82226
+ * The suppressed recipient address, lowercased and trimmed
82227
+ */
80926
82228
  address: string;
82229
+ /**
82230
+ * When the address was suppressed (ISO 8601 UTC)
82231
+ */
80927
82232
  created_at: string;
82233
+ /**
82234
+ * Id of the email event that caused the suppression; null for a manual entry
82235
+ */
80928
82236
  source_event_id: (string | null);
80929
82237
  }
80930
82238
  export interface MailSuppressionListInput {
80931
82239
  /**
80932
- * Case-insensitive substring match on address
82240
+ * Case-insensitive substring match on the address; omit for no address filter
80933
82241
  */
80934
82242
  q?: string;
80935
82243
  /**
80936
- * Max items per page (1–100, default 50)
82244
+ * Max entries per page, 1-100 (default 50)
80937
82245
  */
80938
82246
  limit?: number;
80939
82247
  /**
80940
- * Opaque pagination cursor from a prior page
82248
+ * Opaque pagination cursor from a prior page's next_cursor; omit for the first page
80941
82249
  */
80942
82250
  cursor?: string;
80943
82251
  /**
80944
- * Filter by reason
82252
+ * Only return entries suppressed for this reason; omit for every reason
80945
82253
  */
80946
82254
  reason?: ("hard_bounce" | "complaint" | "manual" | "unsubscribe");
80947
82255
  }
80948
82256
  export interface MailSuppressionListOutput {
82257
+ /**
82258
+ * This page of suppression entries, newest first
82259
+ */
80949
82260
  items: {
82261
+ /**
82262
+ * Suppression entry id
82263
+ */
80950
82264
  id: string;
82265
+ /**
82266
+ * Free-text note recorded when the entry was added by hand; null otherwise
82267
+ */
80951
82268
  note: (string | null);
80952
- reason: string;
82269
+ /**
82270
+ * Why the address is suppressed: hard_bounce and complaint come from SES feedback, unsubscribe from the recipient, manual from mail_suppression_add
82271
+ */
82272
+ reason: ("hard_bounce" | "complaint" | "manual" | "unsubscribe");
82273
+ /**
82274
+ * The suppressed recipient address, lowercased and trimmed
82275
+ */
80953
82276
  address: string;
82277
+ /**
82278
+ * When the address was suppressed (ISO 8601 UTC)
82279
+ */
80954
82280
  created_at: string;
82281
+ /**
82282
+ * Id of the email event that caused the suppression; null for a manual entry
82283
+ */
80955
82284
  source_event_id: (string | null);
80956
82285
  }[];
82286
+ /**
82287
+ * Opaque cursor to pass back as `cursor` for the next page; null on the last page
82288
+ */
80957
82289
  next_cursor: (string | null);
80958
82290
  }
80959
82291
  export interface MailSuppressionRemoveInput {
80960
82292
  /**
80961
- * Email address to remove from the suppression list
82293
+ * Email address to remove from the suppression list; matched case-insensitively
80962
82294
  */
80963
82295
  address: string;
80964
82296
  }
80965
82297
  export interface MailSuppressionRemoveOutput {
82298
+ /**
82299
+ * The address the removal was attempted for, as normalized
82300
+ */
80966
82301
  address: string;
82302
+ /**
82303
+ * True if an entry was removed; false if the address was not suppressed (the call is idempotent)
82304
+ */
80967
82305
  removed: boolean;
80968
82306
  }
80969
82307
  export interface MailTemplateCreateInput {
@@ -84791,18 +86129,57 @@ export interface MailTemplateCreateInput {
84791
86129
  ];
84792
86130
  }
84793
86131
  export interface MailTemplateCreateOutput {
86132
+ /**
86133
+ * Template id
86134
+ */
84794
86135
  id: string;
86136
+ /**
86137
+ * HTML body; may contain {{ variable }} placeholders
86138
+ */
84795
86139
  html: string;
86140
+ /**
86141
+ * Human label for the template
86142
+ */
84796
86143
  name: string;
86144
+ /**
86145
+ * Plaintext body; null when none was supplied
86146
+ */
84797
86147
  text: (string | null);
84798
- status: string;
86148
+ /**
86149
+ * Lifecycle status: a draft is editable, a published template is not
86150
+ */
86151
+ status: ("draft" | "published");
86152
+ /**
86153
+ * Email subject; may contain {{ variable }} placeholders
86154
+ */
84799
86155
  subject: string;
86156
+ /**
86157
+ * When the template was created (ISO 8601 UTC)
86158
+ */
84800
86159
  createdAt: string;
86160
+ /**
86161
+ * When the template was last modified (ISO 8601 UTC)
86162
+ */
84801
86163
  updatedAt: string;
86164
+ /**
86165
+ * Declared variables of this template (at most 20)
86166
+ */
84802
86167
  variables: {
86168
+ /**
86169
+ * Placeholder identifier used as {{ name }}
86170
+ */
84803
86171
  name: string;
84804
- type: string;
86172
+ /**
86173
+ * Declared type (metadata; rendered as string in v1)
86174
+ */
86175
+ type: ("string" | "number" | "boolean");
86176
+ /**
86177
+ * Value used when none is supplied
86178
+ */
84805
86179
  fallback?: string;
86180
+ /**
86181
+ * If true, an absent value renders as empty string
86182
+ */
84806
86183
  optional: boolean;
84807
86184
  }[];
84808
86185
  }
@@ -84813,6 +86190,9 @@ export interface MailTemplateDeleteInput {
84813
86190
  id: string;
84814
86191
  }
84815
86192
  export interface MailTemplateDeleteOutput {
86193
+ /**
86194
+ * True once the template is gone
86195
+ */
84816
86196
  deleted: boolean;
84817
86197
  }
84818
86198
  export interface MailTemplateGetInput {
@@ -84822,40 +86202,127 @@ export interface MailTemplateGetInput {
84822
86202
  id: string;
84823
86203
  }
84824
86204
  export interface MailTemplateGetOutput {
86205
+ /**
86206
+ * Template id
86207
+ */
84825
86208
  id: string;
86209
+ /**
86210
+ * HTML body; may contain {{ variable }} placeholders
86211
+ */
84826
86212
  html: string;
86213
+ /**
86214
+ * Human label for the template
86215
+ */
84827
86216
  name: string;
86217
+ /**
86218
+ * Plaintext body; null when none was supplied
86219
+ */
84828
86220
  text: (string | null);
86221
+ /**
86222
+ * Send-usage rollup for this template
86223
+ */
84829
86224
  usage: {
86225
+ /**
86226
+ * How many emails were sent from this template
86227
+ */
84830
86228
  email_count: number;
86229
+ /**
86230
+ * When the template was last sent from (ISO 8601 UTC); null if never
86231
+ */
84831
86232
  last_sent_at: (string | null);
84832
86233
  };
84833
- status: string;
86234
+ /**
86235
+ * Lifecycle status: a draft is editable, a published template is not
86236
+ */
86237
+ status: ("draft" | "published");
86238
+ /**
86239
+ * Email subject; may contain {{ variable }} placeholders
86240
+ */
84834
86241
  subject: string;
86242
+ /**
86243
+ * When the template was created (ISO 8601 UTC)
86244
+ */
84835
86245
  createdAt: string;
86246
+ /**
86247
+ * When the template was last modified (ISO 8601 UTC)
86248
+ */
84836
86249
  updatedAt: string;
86250
+ /**
86251
+ * Declared variables of this template (at most 20)
86252
+ */
84837
86253
  variables: {
86254
+ /**
86255
+ * Placeholder identifier used as {{ name }}
86256
+ */
84838
86257
  name: string;
84839
- type: string;
86258
+ /**
86259
+ * Declared type (metadata; rendered as string in v1)
86260
+ */
86261
+ type: ("string" | "number" | "boolean");
86262
+ /**
86263
+ * Value used when none is supplied
86264
+ */
84840
86265
  fallback?: string;
86266
+ /**
86267
+ * If true, an absent value renders as empty string
86268
+ */
84841
86269
  optional: boolean;
84842
86270
  }[];
84843
86271
  }
84844
86272
  export interface MailTemplateListInput {
84845
86273
  }
84846
86274
  export type MailTemplateListOutput = {
86275
+ /**
86276
+ * Template id
86277
+ */
84847
86278
  id: string;
86279
+ /**
86280
+ * HTML body; may contain {{ variable }} placeholders
86281
+ */
84848
86282
  html: string;
86283
+ /**
86284
+ * Human label for the template
86285
+ */
84849
86286
  name: string;
86287
+ /**
86288
+ * Plaintext body; null when none was supplied
86289
+ */
84850
86290
  text: (string | null);
84851
- status: string;
86291
+ /**
86292
+ * Lifecycle status: a draft is editable, a published template is not
86293
+ */
86294
+ status: ("draft" | "published");
86295
+ /**
86296
+ * Email subject; may contain {{ variable }} placeholders
86297
+ */
84852
86298
  subject: string;
86299
+ /**
86300
+ * When the template was created (ISO 8601 UTC)
86301
+ */
84853
86302
  createdAt: string;
86303
+ /**
86304
+ * When the template was last modified (ISO 8601 UTC)
86305
+ */
84854
86306
  updatedAt: string;
86307
+ /**
86308
+ * Declared variables of this template (at most 20)
86309
+ */
84855
86310
  variables: {
86311
+ /**
86312
+ * Placeholder identifier used as {{ name }}
86313
+ */
84856
86314
  name: string;
84857
- type: string;
86315
+ /**
86316
+ * Declared type (metadata; rendered as string in v1)
86317
+ */
86318
+ type: ("string" | "number" | "boolean");
86319
+ /**
86320
+ * Value used when none is supplied
86321
+ */
84858
86322
  fallback?: string;
86323
+ /**
86324
+ * If true, an absent value renders as empty string
86325
+ */
84859
86326
  optional: boolean;
84860
86327
  }[];
84861
86328
  }[];
@@ -84866,18 +86333,57 @@ export interface MailTemplatePublishInput {
84866
86333
  id: string;
84867
86334
  }
84868
86335
  export interface MailTemplatePublishOutput {
86336
+ /**
86337
+ * Template id
86338
+ */
84869
86339
  id: string;
86340
+ /**
86341
+ * HTML body; may contain {{ variable }} placeholders
86342
+ */
84870
86343
  html: string;
86344
+ /**
86345
+ * Human label for the template
86346
+ */
84871
86347
  name: string;
86348
+ /**
86349
+ * Plaintext body; null when none was supplied
86350
+ */
84872
86351
  text: (string | null);
84873
- status: string;
86352
+ /**
86353
+ * Lifecycle status: a draft is editable, a published template is not
86354
+ */
86355
+ status: ("draft" | "published");
86356
+ /**
86357
+ * Email subject; may contain {{ variable }} placeholders
86358
+ */
84874
86359
  subject: string;
86360
+ /**
86361
+ * When the template was created (ISO 8601 UTC)
86362
+ */
84875
86363
  createdAt: string;
86364
+ /**
86365
+ * When the template was last modified (ISO 8601 UTC)
86366
+ */
84876
86367
  updatedAt: string;
86368
+ /**
86369
+ * Declared variables of this template (at most 20)
86370
+ */
84877
86371
  variables: {
86372
+ /**
86373
+ * Placeholder identifier used as {{ name }}
86374
+ */
84878
86375
  name: string;
84879
- type: string;
86376
+ /**
86377
+ * Declared type (metadata; rendered as string in v1)
86378
+ */
86379
+ type: ("string" | "number" | "boolean");
86380
+ /**
86381
+ * Value used when none is supplied
86382
+ */
84880
86383
  fallback?: string;
86384
+ /**
86385
+ * If true, an absent value renders as empty string
86386
+ */
84881
86387
  optional: boolean;
84882
86388
  }[];
84883
86389
  }
@@ -84886,11 +86392,25 @@ export interface MailTemplateUpdateInput {
84886
86392
  * Template id
84887
86393
  */
84888
86394
  id: string;
86395
+ /**
86396
+ * New HTML body; unchanged when omitted
86397
+ */
84889
86398
  html?: string;
86399
+ /**
86400
+ * New human label; unchanged when omitted
86401
+ */
84890
86402
  name?: string;
86403
+ /**
86404
+ * New plaintext body; null clears it and it is re-derived from html. Unchanged when omitted
86405
+ */
84891
86406
  text?: (string | null);
86407
+ /**
86408
+ * New email subject; may contain {{ variable }} placeholders. Unchanged when omitted
86409
+ */
84892
86410
  subject?: string;
84893
86411
  /**
86412
+ * Replacement list of declared variables ([{name,type,optional,fallback}], <=20). Unchanged when omitted
86413
+ *
84894
86414
  * @maxItems 20
84895
86415
  */
84896
86416
  variables?: [] | [
@@ -88696,100 +90216,256 @@ export interface MailTemplateUpdateInput {
88696
90216
  ];
88697
90217
  }
88698
90218
  export interface MailTemplateUpdateOutput {
90219
+ /**
90220
+ * Template id
90221
+ */
88699
90222
  id: string;
90223
+ /**
90224
+ * HTML body; may contain {{ variable }} placeholders
90225
+ */
88700
90226
  html: string;
90227
+ /**
90228
+ * Human label for the template
90229
+ */
88701
90230
  name: string;
90231
+ /**
90232
+ * Plaintext body; null when none was supplied
90233
+ */
88702
90234
  text: (string | null);
88703
- status: string;
90235
+ /**
90236
+ * Lifecycle status: a draft is editable, a published template is not
90237
+ */
90238
+ status: ("draft" | "published");
90239
+ /**
90240
+ * Email subject; may contain {{ variable }} placeholders
90241
+ */
88704
90242
  subject: string;
90243
+ /**
90244
+ * When the template was created (ISO 8601 UTC)
90245
+ */
88705
90246
  createdAt: string;
90247
+ /**
90248
+ * When the template was last modified (ISO 8601 UTC)
90249
+ */
88706
90250
  updatedAt: string;
90251
+ /**
90252
+ * Declared variables of this template (at most 20)
90253
+ */
88707
90254
  variables: {
90255
+ /**
90256
+ * Placeholder identifier used as {{ name }}
90257
+ */
88708
90258
  name: string;
88709
- type: string;
90259
+ /**
90260
+ * Declared type (metadata; rendered as string in v1)
90261
+ */
90262
+ type: ("string" | "number" | "boolean");
90263
+ /**
90264
+ * Value used when none is supplied
90265
+ */
88710
90266
  fallback?: string;
90267
+ /**
90268
+ * If true, an absent value renders as empty string
90269
+ */
88711
90270
  optional: boolean;
88712
90271
  }[];
88713
90272
  }
88714
90273
  export interface MailUsageGetInput {
88715
90274
  }
88716
90275
  export interface MailUsageGetOutput {
90276
+ /**
90277
+ * Email sending usage against the free-tier limits
90278
+ */
88717
90279
  emails: {
88718
- day: MailUsageGetOutputDay;
88719
- month: MailUsageGetOutputDay;
90280
+ /**
90281
+ * Sending allowance today (UTC)
90282
+ */
90283
+ day: {
90284
+ /**
90285
+ * Emails accepted for delivery so far today (UTC)
90286
+ */
90287
+ used: number;
90288
+ /**
90289
+ * Free-tier allowance today (UTC)
90290
+ */
90291
+ limit: number;
90292
+ /**
90293
+ * Allowance left today (UTC) — limit minus used, never below zero
90294
+ */
90295
+ remaining: number;
90296
+ };
90297
+ /**
90298
+ * Sending allowance this month (UTC)
90299
+ */
90300
+ month: {
90301
+ /**
90302
+ * Emails accepted for delivery so far this month (UTC)
90303
+ */
90304
+ used: number;
90305
+ /**
90306
+ * Free-tier allowance this month (UTC)
90307
+ */
90308
+ limit: number;
90309
+ /**
90310
+ * Allowance left this month (UTC) — limit minus used, never below zero
90311
+ */
90312
+ remaining: number;
90313
+ };
90314
+ /**
90315
+ * True when a further send would be refused right now because a limit or the hard cap is reached
90316
+ */
88720
90317
  blocked: boolean;
90318
+ /**
90319
+ * Monthly ceiling that cannot be exceeded even with an allowance left elsewhere
90320
+ */
88721
90321
  hard_cap: number;
88722
90322
  };
90323
+ /**
90324
+ * The two windows the counters below are scoped to
90325
+ */
88723
90326
  period: {
90327
+ /**
90328
+ * The UTC day the daily counters cover, as YYYY-MM-DD
90329
+ */
88724
90330
  day: string;
90331
+ /**
90332
+ * The UTC month the monthly counters cover, as YYYY-MM
90333
+ */
88725
90334
  month: string;
88726
90335
  };
90336
+ /**
90337
+ * Point-in-time contact storage — a stock, not a per-period flow
90338
+ */
88727
90339
  contacts: {
90340
+ /**
90341
+ * Contacts stored for the product at this instant
90342
+ */
88728
90343
  count: number;
88729
90344
  };
88730
90345
  }
88731
- export interface MailUsageGetOutputDay {
88732
- used: number;
88733
- limit: number;
88734
- remaining: number;
88735
- }
88736
90346
  export interface MailWebhookCreateInput {
88737
90347
  /**
88738
- * HTTPS URL that signed events are POSTed to
90348
+ * HTTPS URL that signed events are POSTed to; plain http is rejected
88739
90349
  */
88740
90350
  url: string;
88741
90351
  /**
88742
- * Optional human label
90352
+ * Optional human label for the endpoint, e.g. "billing service"
88743
90353
  */
88744
90354
  description?: string;
88745
90355
  /**
88746
- * Event types to deliver. One or more of: email.delivered, email.bounced, email.complained, email.suppressed, email.opened, email.clicked
90356
+ * Event types to deliver; at least one. One or more of: email.delivered, email.bounced, email.complained, email.suppressed, email.opened, email.clicked
88747
90357
  *
88748
90358
  * @minItems 1
88749
90359
  */
88750
90360
  enabled_events: [("email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.opened" | "email.clicked"), ...(("email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.opened" | "email.clicked"))[]];
88751
90361
  }
88752
90362
  export interface MailWebhookCreateOutput {
90363
+ /**
90364
+ * Webhook endpoint id
90365
+ */
88753
90366
  id: string;
90367
+ /**
90368
+ * HTTPS URL that signed events are POSTed to
90369
+ */
88754
90370
  url: string;
90371
+ /**
90372
+ * Signing secret for verifying the delivery signature. Returned only when the endpoint is created and never retrievable again — store it now
90373
+ */
88755
90374
  secret: string;
90375
+ /**
90376
+ * False if delivery is switched off — the endpoint is kept but nothing is sent to it
90377
+ */
88756
90378
  enabled: boolean;
90379
+ /**
90380
+ * When the endpoint was registered (ISO 8601 UTC)
90381
+ */
88757
90382
  created_at: string;
90383
+ /**
90384
+ * When the endpoint was last changed (ISO 8601 UTC)
90385
+ */
88758
90386
  updated_at: string;
90387
+ /**
90388
+ * Human label for the endpoint; null if none was given
90389
+ */
88759
90390
  description: (string | null);
88760
- enabled_events: string[];
90391
+ /**
90392
+ * Event types this endpoint receives; anything else is not delivered to it
90393
+ */
90394
+ enabled_events: ("email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.opened" | "email.clicked")[];
88761
90395
  }
88762
90396
  export interface MailWebhookDeleteInput {
88763
90397
  /**
88764
- * Webhook endpoint id
90398
+ * Webhook endpoint id; deleting it also discards its delivery history
88765
90399
  */
88766
90400
  id: string;
88767
90401
  }
88768
90402
  export interface MailWebhookDeleteOutput {
90403
+ /**
90404
+ * Id of the endpoint that was deleted
90405
+ */
88769
90406
  id: string;
90407
+ /**
90408
+ * True once the endpoint and its delivery history are gone
90409
+ */
88770
90410
  deleted: boolean;
88771
90411
  }
88772
90412
  export interface MailWebhookDeliveriesListInput {
88773
90413
  /**
88774
- * Webhook endpoint id
90414
+ * Webhook endpoint whose delivery attempts to list
88775
90415
  */
88776
90416
  id: string;
88777
90417
  /**
88778
- * Max items (1-100, default 50)
90418
+ * Max delivery attempts to return, 1-100 (default 50)
88779
90419
  */
88780
90420
  limit?: number;
88781
90421
  }
90422
+ /**
90423
+ * Recent delivery attempts for the endpoint, newest first
90424
+ */
88782
90425
  export type MailWebhookDeliveriesListOutput = {
90426
+ /**
90427
+ * Delivery attempt id
90428
+ */
88783
90429
  id: string;
88784
- status: string;
90430
+ /**
90431
+ * Delivery state: pending while attempts remain, succeeded once the endpoint answered 2xx, failed once retries are exhausted
90432
+ */
90433
+ status: ("pending" | "succeeded" | "failed");
90434
+ /**
90435
+ * How many times delivery has been attempted so far
90436
+ */
88785
90437
  attempts: number;
90438
+ /**
90439
+ * Id of the email event that was delivered
90440
+ */
88786
90441
  event_id: string;
90442
+ /**
90443
+ * When the delivery was queued (ISO 8601 UTC)
90444
+ */
88787
90445
  created_at: string;
88788
- event_type: string;
90446
+ /**
90447
+ * Type of the delivered event
90448
+ */
90449
+ event_type: ("email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.opened" | "email.clicked");
90450
+ /**
90451
+ * Error from the last failed attempt; null if the last attempt succeeded or none has run
90452
+ */
88789
90453
  last_error: (string | null);
90454
+ /**
90455
+ * When the delivery record was last updated (ISO 8601 UTC)
90456
+ */
88790
90457
  updated_at: string;
90458
+ /**
90459
+ * Id of the webhook endpoint the event was delivered to
90460
+ */
88791
90461
  endpoint_id: string;
90462
+ /**
90463
+ * When delivery was last attempted (ISO 8601 UTC); null before the first attempt
90464
+ */
88792
90465
  last_attempt_at: (string | null);
90466
+ /**
90467
+ * HTTP status the endpoint returned on the last attempt; null if it could not be reached
90468
+ */
88793
90469
  response_status: (number | null);
88794
90470
  }[];
88795
90471
  export interface MailWebhookGetInput {
@@ -88799,24 +90475,69 @@ export interface MailWebhookGetInput {
88799
90475
  id: string;
88800
90476
  }
88801
90477
  export interface MailWebhookGetOutput {
90478
+ /**
90479
+ * Webhook endpoint id
90480
+ */
88802
90481
  id: string;
90482
+ /**
90483
+ * HTTPS URL that signed events are POSTed to
90484
+ */
88803
90485
  url: string;
90486
+ /**
90487
+ * False if delivery is switched off — the endpoint is kept but nothing is sent to it
90488
+ */
88804
90489
  enabled: boolean;
90490
+ /**
90491
+ * When the endpoint was registered (ISO 8601 UTC)
90492
+ */
88805
90493
  created_at: string;
90494
+ /**
90495
+ * When the endpoint was last changed (ISO 8601 UTC)
90496
+ */
88806
90497
  updated_at: string;
90498
+ /**
90499
+ * Human label for the endpoint; null if none was given
90500
+ */
88807
90501
  description: (string | null);
88808
- enabled_events: string[];
90502
+ /**
90503
+ * Event types this endpoint receives; anything else is not delivered to it
90504
+ */
90505
+ enabled_events: ("email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.opened" | "email.clicked")[];
88809
90506
  }
88810
90507
  export interface MailWebhookListInput {
88811
90508
  }
90509
+ /**
90510
+ * Webhook endpoints for the current product, signing secrets omitted
90511
+ */
88812
90512
  export type MailWebhookListOutput = {
90513
+ /**
90514
+ * Webhook endpoint id
90515
+ */
88813
90516
  id: string;
90517
+ /**
90518
+ * HTTPS URL that signed events are POSTed to
90519
+ */
88814
90520
  url: string;
90521
+ /**
90522
+ * False if delivery is switched off — the endpoint is kept but nothing is sent to it
90523
+ */
88815
90524
  enabled: boolean;
90525
+ /**
90526
+ * When the endpoint was registered (ISO 8601 UTC)
90527
+ */
88816
90528
  created_at: string;
90529
+ /**
90530
+ * When the endpoint was last changed (ISO 8601 UTC)
90531
+ */
88817
90532
  updated_at: string;
90533
+ /**
90534
+ * Human label for the endpoint; null if none was given
90535
+ */
88818
90536
  description: (string | null);
88819
- enabled_events: string[];
90537
+ /**
90538
+ * Event types this endpoint receives; anything else is not delivered to it
90539
+ */
90540
+ enabled_events: ("email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.opened" | "email.clicked")[];
88820
90541
  }[];
88821
90542
  export interface MailWebhookUpdateInput {
88822
90543
  /**
@@ -88824,32 +90545,53 @@ export interface MailWebhookUpdateInput {
88824
90545
  */
88825
90546
  id: string;
88826
90547
  /**
88827
- * HTTPS URL that signed events are POSTed to
90548
+ * New HTTPS delivery URL; omit to leave it unchanged
88828
90549
  */
88829
90550
  url?: string;
88830
90551
  /**
88831
- * Enable (true) or disable (false) delivery
90552
+ * Switch delivery on (true) or off (false); omit to leave it unchanged
88832
90553
  */
88833
90554
  enabled?: boolean;
88834
90555
  /**
88835
- * Optional human label
90556
+ * New human label, or null to clear it; omit to leave it unchanged
88836
90557
  */
88837
90558
  description?: (string | null);
88838
90559
  /**
88839
- * Event types to deliver. One or more of: email.delivered, email.bounced, email.complained, email.suppressed, email.opened, email.clicked
90560
+ * Replace the delivered event types; omit to leave them unchanged
88840
90561
  *
88841
90562
  * @minItems 1
88842
90563
  */
88843
90564
  enabled_events?: [("email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.opened" | "email.clicked"), ...(("email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.opened" | "email.clicked"))[]];
88844
90565
  }
88845
90566
  export interface MailWebhookUpdateOutput {
90567
+ /**
90568
+ * Webhook endpoint id
90569
+ */
88846
90570
  id: string;
90571
+ /**
90572
+ * HTTPS URL that signed events are POSTed to
90573
+ */
88847
90574
  url: string;
90575
+ /**
90576
+ * False if delivery is switched off — the endpoint is kept but nothing is sent to it
90577
+ */
88848
90578
  enabled: boolean;
90579
+ /**
90580
+ * When the endpoint was registered (ISO 8601 UTC)
90581
+ */
88849
90582
  created_at: string;
90583
+ /**
90584
+ * When the endpoint was last changed (ISO 8601 UTC)
90585
+ */
88850
90586
  updated_at: string;
90587
+ /**
90588
+ * Human label for the endpoint; null if none was given
90589
+ */
88851
90590
  description: (string | null);
88852
- enabled_events: string[];
90591
+ /**
90592
+ * Event types this endpoint receives; anything else is not delivered to it
90593
+ */
90594
+ enabled_events: ("email.delivered" | "email.bounced" | "email.complained" | "email.suppressed" | "email.opened" | "email.clicked")[];
88853
90595
  }
88854
90596
  export interface ObserveAlertsCreateInput {
88855
90597
  /**