useyuva 0.0.17 → 0.0.18

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.
@@ -889,7 +889,7 @@ export interface paths {
889
889
  /**
890
890
  * Delete an inbox
891
891
  * @description Owners, admins and API keys. Deletes its channels, conversations,
892
- * messages and attachments.
892
+ * messages and attachments, and its Amazon SES tenant, when the server manages one.
893
893
  *
894
894
  * Scope: `inboxes:manage`.
895
895
  */
@@ -1491,9 +1491,10 @@ export interface paths {
1491
1491
  * Export a contact's consent records
1492
1492
  * @description Every consent event of the contact's subscriptions to the lists the caller can see, oldest
1493
1493
  * first, in the rows of `exportListConsent`: for answering a data subject's access request
1494
- * (GDPR Art. 15, KVKK Art. 11).
1494
+ * (GDPR Art. 15, KVKK Art. 11). The rows carry IP addresses and user agents, so agents are
1495
+ * refused with `403 forbidden`.
1495
1496
  *
1496
- * Scopes: `contacts:read` and `lists:read`.
1497
+ * Owners, admins and API keys. Scopes: `contacts:read` and `lists:read`.
1497
1498
  */
1498
1499
  get: operations["exportContactConsent"];
1499
1500
  put?: never;
@@ -2664,7 +2665,10 @@ export interface paths {
2664
2665
  };
2665
2666
  /**
2666
2667
  * A subscription with its consent events
2667
- * @description Scope: `lists:read`.
2668
+ * @description The events carry the subscriber's IP address and user agent and the acting member or key,
2669
+ * so agents are refused with `403 forbidden`.
2670
+ *
2671
+ * Owners, admins and API keys. Scope: `lists:read`.
2668
2672
  */
2669
2673
  get: operations["getSubscription"];
2670
2674
  put?: never;
@@ -2738,7 +2742,8 @@ export interface paths {
2738
2742
  * agreed or refused from then on. Pending subscriptions are left out. Check the rows against
2739
2743
  * your own records before uploading; only commercial lists need registering.
2740
2744
  *
2741
- * Scope: `lists:read`.
2745
+ * The rows carry IP addresses and user agents, so agents are refused with `403 forbidden`.
2746
+ * Owners, admins and API keys. Scope: `lists:read`.
2742
2747
  */
2743
2748
  get: operations["exportListConsent"];
2744
2749
  put?: never;
@@ -3160,7 +3165,8 @@ export interface paths {
3160
3165
  * (`422 image_too_large`).
3161
3166
  *
3162
3167
  * The same image uploaded again answers `200` with the existing one. `409 image_quota` when
3163
- * the workspace's images would exceed the server's limit.
3168
+ * the workspace's images would exceed the server's limit. A workspace can upload 30 images a
3169
+ * minute; more are refused with `429 rate_limited` and `Retry-After`.
3164
3170
  *
3165
3171
  * Owners, admins and API keys. Scope: `broadcasts:write`.
3166
3172
  */
@@ -3217,8 +3223,9 @@ export interface paths {
3217
3223
  * @description A draft of an inbox. `channel_id` names the inbox's e-mail channel that sends it: one with
3218
3224
  * an SMTP account and an address to send from (`409 email_channel_required`). The audience
3219
3225
  * names up to 10 lists of the same inbox, up to 10 attribute conditions and the contact
3220
- * languages to keep. Everything can be changed while the broadcast is a draft; the review
3221
- * (`GET .../review`) says what is still missing before it can be scheduled.
3226
+ * languages to keep. `pace` sets its own pace (`BroadcastPace`). Everything can be changed
3227
+ * while the broadcast is a draft; the review (`GET .../review`) says what is still missing
3228
+ * before it can be scheduled.
3222
3229
  *
3223
3230
  * Owners, admins and API keys. Scope: `broadcasts:write`. With `YUVA_BROADCASTS=off` every
3224
3231
  * broadcast write answers `403 broadcasts_disabled`.
@@ -3258,7 +3265,11 @@ export interface paths {
3258
3265
  /**
3259
3266
  * Change a draft
3260
3267
  * @description Changes the given fields of a draft (`409 not_draft` otherwise). `channel_id: null` and
3261
- * `design_id: null` clear them; `audience` replaces the whole audience.
3268
+ * `design_id: null` clear them; `audience` replaces the whole audience; `pace` replaces the
3269
+ * whole pace and `{}` removes it. While the broadcast is scheduled, preparing, sending or
3270
+ * paused, `pace` alone can still change (`409 invalid_state` once it finished); it applies to
3271
+ * the next mail, and `409 pace_too_slow` (with `days`, the estimate) refuses a pace under which
3272
+ * the mail still to go out would take more than 365 days.
3262
3273
  *
3263
3274
  * Owners, admins and API keys. Scope: `broadcasts:write`.
3264
3275
  */
@@ -3306,9 +3317,10 @@ export interface paths {
3306
3317
  * `audience_nonempty`, `merge_fields` (no field without a fallback is empty for anyone),
3307
3318
  * `html_size` (at most 102 KB, where Gmail clips; a warning above 90 KB), `images_alt`
3308
3319
  * (warning), `links` (warning for `http:` links), `subject` (1 to 300 characters; a warning
3309
- * above 80), `daily_cap` (warning when the send will take more than one day),
3310
- * `test_sent` (warning when no test went out since the last change) and `click_tracking`
3311
- * (warning: links point at the server's link domain).
3320
+ * above 80), `daily_cap` (warning when the send will take more than one day), `pace`
3321
+ * (blocking when sending at the broadcast's pace, or the channel's rate if slower, would
3322
+ * take more than 365 days), `test_sent` (warning when no test went out since the last change)
3323
+ * and `click_tracking` (warning: links point at the server's link domain).
3312
3324
  *
3313
3325
  * Owners, admins, agents of its inbox and API keys. Scope: `broadcasts:read`.
3314
3326
  */
@@ -3439,8 +3451,10 @@ export interface paths {
3439
3451
  * Resume sending
3440
3452
  * @description A paused broadcast continues where it stopped, whatever paused it; the bounce and
3441
3453
  * complaint rates that pause it on their own count again from now. Refused like scheduling
3442
- * while the workspace is suspended or keys may not schedule (`403`), and `409 invalid_state`
3443
- * when it is not paused.
3454
+ * while the workspace is suspended or keys may not schedule (`403`), `409 invalid_state`
3455
+ * when it is not paused, and `409 ses_tenant_blocked` while the review item `ses_tenant`
3456
+ * would block it (the inbox's Amazon SES tenant is paused, or its channel lost its tenant
3457
+ * isolation).
3444
3458
  *
3445
3459
  * Owners, admins and API keys. Scope: `broadcasts:send`.
3446
3460
  */
@@ -7056,7 +7070,8 @@ export interface webhooks {
7056
7070
  /**
7057
7071
  * A broadcast changed state
7058
7072
  * @description Scheduled, back to draft, preparing, sending (started or resumed), paused (with
7059
- * `pause_reason`), sent, cancelled or failed; `previous_state` is the state before. Endpoints
7073
+ * `pause_reason`), sent, cancelled or failed; `previous_state` is the state before. A pace
7074
+ * change of a broadcast that is no longer a draft comes without `previous_state`. Endpoints
7060
7075
  * of an inbox get the broadcasts of that inbox.
7061
7076
  */
7062
7077
  post: operations["webhookBroadcastUpdated"];
@@ -7651,6 +7666,7 @@ export interface components {
7651
7666
  ask_for_rating: boolean;
7652
7667
  sender: components["schemas"]["InboxSender"];
7653
7668
  import?: components["schemas"]["InboxImport"];
7669
+ ses_tenant?: components["schemas"]["SesTenantStatus"];
7654
7670
  /** Format: date-time */
7655
7671
  created_at: string;
7656
7672
  /** Format: date-time */
@@ -7810,6 +7826,7 @@ export interface components {
7810
7826
  broadcast_rate: number;
7811
7827
  /** @description The channel's Yuva DKIM key; absent without one. */
7812
7828
  dkim?: components["schemas"]["EmailDkim"];
7829
+ ses?: components["schemas"]["EmailSes"];
7813
7830
  };
7814
7831
  EmailChannelInput: {
7815
7832
  /**
@@ -7837,6 +7854,69 @@ export interface components {
7837
7854
  */
7838
7855
  broadcast_rate?: number;
7839
7856
  dkim?: components["schemas"]["EmailDkimInput"];
7857
+ ses?: components["schemas"]["EmailSesInput"];
7858
+ };
7859
+ /**
7860
+ * @description How the channel's mail through Amazon SES is isolated in an SES tenant. Absent when neither SMTP
7861
+ * account is Amazon SES. `source: server`: the server manages a tenant for the channel's inbox in
7862
+ * its own AWS account and writes `X-SES-TENANT` and `X-SES-CONFIGURATION-SET`; `channel`: the
7863
+ * tenant typed on the channel is written as is; `none`: no tenant header.
7864
+ */
7865
+ EmailSes: {
7866
+ /** @enum {string} */
7867
+ source: "server" | "channel" | "none";
7868
+ /**
7869
+ * @description `isolated`: mail carries the tenant. `pending`: Yuva is setting the tenant up.
7870
+ * `identity_missing`: the sending address and domain are not a verified identity in the
7871
+ * server's SES account; mail goes out without the tenant and broadcasts are blocked.
7872
+ * `paused`: Amazon SES paused the inbox's tenant; mail is refused until it is reinstated.
7873
+ * `not_isolated`: SES through another AWS account or region and no tenant typed.
7874
+ * `error`: AWS refused a step (`detail`).
7875
+ * @enum {string}
7876
+ */
7877
+ state: "isolated" | "pending" | "identity_missing" | "paused" | "not_isolated" | "error";
7878
+ /** @description The `X-SES-TENANT` value written; absent unless `isolated` or `paused`. */
7879
+ tenant?: string;
7880
+ /** @description The `X-SES-CONFIGURATION-SET` value written; absent without one. */
7881
+ configuration_set?: string;
7882
+ detail?: string;
7883
+ /** @description The tenant typed on the channel; used when `source` is not `server`. */
7884
+ channel_tenant?: string;
7885
+ channel_configuration_set?: string;
7886
+ };
7887
+ /**
7888
+ * @description A tenant of your own SES account for this channel's mail, for servers that do not manage
7889
+ * tenants. Absent keeps the stored values; an empty string removes one. Ignored while the server
7890
+ * manages the inbox's tenant.
7891
+ */
7892
+ EmailSesInput: {
7893
+ tenant?: string;
7894
+ configuration_set?: string;
7895
+ };
7896
+ /**
7897
+ * @description The inbox's Amazon SES tenant, when the server manages one. `sending_status: disabled` means SES
7898
+ * paused it: the inbox's mail through the server's SES account is refused and its broadcasts pause
7899
+ * until the server's operator reinstates it. Other inboxes are not affected. `state: missing`
7900
+ * means the tenant is gone from SES: broadcasts are blocked and mail goes out without the tenant
7901
+ * until the server has set it up again.
7902
+ */
7903
+ SesTenantStatus: {
7904
+ /** @enum {string} */
7905
+ state: "pending" | "ready" | "error" | "missing";
7906
+ /** @enum {string} */
7907
+ sending_status: "enabled" | "reinstated" | "disabled";
7908
+ /** @enum {string} */
7909
+ reputation_impact: "none" | "low" | "high";
7910
+ /**
7911
+ * @description `policy`: the reputation policy or the operator; `aws`: Amazon SES itself. Only while disabled.
7912
+ * @enum {string}
7913
+ */
7914
+ paused_by?: "policy" | "aws";
7915
+ cause?: string;
7916
+ /** Format: date-time */
7917
+ status_at?: string;
7918
+ /** Format: date-time */
7919
+ checked_at?: string;
7840
7920
  };
7841
7921
  /**
7842
7922
  * @description A DKIM key Yuva signs the channel's broadcast mail with. `dns_name` and `dns_value` are the
@@ -11228,9 +11308,11 @@ export interface components {
11228
11308
  * spam (after at least 1,000). `sender_error`: the SMTP server refused the account, its TLS or
11229
11309
  * too many mails in a row (`state_detail` has its answer). `workspace_suspended`: the
11230
11310
  * workspace was suspended from sending. `operator`: the server's operator paused it.
11311
+ * `ses_tenant`: Amazon SES paused the inbox's tenant, or the channel lost its tenant isolation;
11312
+ * `state_detail` says which.
11231
11313
  * @enum {string}
11232
11314
  */
11233
- BroadcastPauseReason: "member" | "bounce_rate" | "complaint_rate" | "sender_error" | "workspace_suspended" | "operator";
11315
+ BroadcastPauseReason: "member" | "bounce_rate" | "complaint_rate" | "sender_error" | "workspace_suspended" | "operator" | "ses_tenant";
11234
11316
  /**
11235
11317
  * @description Compares the contact attribute named by `attribute`: `eq`, `neq`, `contains` (text,
11236
11318
  * ignoring case) and `gt`, `lt` (as numbers when both sides are numbers, else as text) with
@@ -11355,8 +11437,15 @@ export interface components {
11355
11437
  /**
11356
11438
  * Format: date-time
11357
11439
  * @description The workspace's daily limit is reached; sending continues at this time (the next 00:00 UTC).
11440
+ * The broadcast's own pace shows in `pace_next_at`.
11358
11441
  */
11359
11442
  waiting_until?: string;
11443
+ pace?: components["schemas"]["BroadcastPace"];
11444
+ /**
11445
+ * Format: date-time
11446
+ * @description While sending with at least a minute between mails: the earliest time the next mail may go out.
11447
+ */
11448
+ pace_next_at?: string;
11360
11449
  /** Format: date-time */
11361
11450
  started_at?: string;
11362
11451
  /** Format: date-time */
@@ -11405,6 +11494,7 @@ export interface components {
11405
11494
  utm?: boolean;
11406
11495
  /** @description Lowercase letters, digits, `-`, `_` and `.`; made from `name` when absent at creation. */
11407
11496
  utm_campaign?: string;
11497
+ pace?: components["schemas"]["BroadcastPace"];
11408
11498
  };
11409
11499
  BroadcastUpdate: {
11410
11500
  /** Format: uuid */
@@ -11420,6 +11510,26 @@ export interface components {
11420
11510
  utm?: boolean;
11421
11511
  /** @description Lowercase letters, digits, `-`, `_` and `.`; made from `name` when absent at creation. */
11422
11512
  utm_campaign?: string;
11513
+ /** @description Replaces the whole pace; `{}` removes it. */
11514
+ pace?: components["schemas"]["BroadcastPace"];
11515
+ };
11516
+ /**
11517
+ * @description The broadcast's own pace, below the channel's `broadcast_rate` and the workspace's daily limit:
11518
+ * at most `per_hour` mails in any 60 minutes, `per_day` in any 24 hours and `per_month` in any
11519
+ * 30 days. Mails are spaced evenly at the gap of the tightest one (3,600 / `per_hour`,
11520
+ * 86,400 / `per_day` or 2,592,000 / `per_month` seconds). Every SMTP attempt counts, retries
11521
+ * included; skipped recipients do not. An empty object is no pace.
11522
+ */
11523
+ BroadcastPace: {
11524
+ /** Format: int32 */
11525
+ per_hour?: number;
11526
+ /** Format: int32 */
11527
+ per_day?: number;
11528
+ /**
11529
+ * Format: int32
11530
+ * @description Any 30 days, not a calendar month.
11531
+ */
11532
+ per_month?: number;
11423
11533
  };
11424
11534
  BroadcastPage: {
11425
11535
  items: components["schemas"]["Broadcast"][];
@@ -11465,7 +11575,7 @@ export interface components {
11465
11575
  by_list: components["schemas"]["BroadcastListCount"][];
11466
11576
  };
11467
11577
  /** @enum {string} */
11468
- BroadcastReviewKey: "sender_identity" | "sender_ready" | "approval" | "design" | "audience_nonempty" | "merge_fields" | "html_size" | "images_alt" | "links" | "subject" | "deliverability" | "daily_cap" | "test_sent" | "click_tracking";
11578
+ BroadcastReviewKey: "sender_identity" | "sender_ready" | "approval" | "design" | "audience_nonempty" | "merge_fields" | "html_size" | "images_alt" | "links" | "subject" | "deliverability" | "daily_cap" | "pace" | "test_sent" | "click_tracking" | "ses_tenant";
11469
11579
  /** @enum {string} */
11470
11580
  BroadcastReviewStatus: "ok" | "warning" | "blocking";
11471
11581
  BroadcastReviewItem: {
@@ -11489,6 +11599,12 @@ export interface components {
11489
11599
  * @description How many UTC days sending takes under the workspace's daily limit; absent without a limit.
11490
11600
  */
11491
11601
  days?: number;
11602
+ /**
11603
+ * Format: int64
11604
+ * @description About how long sending takes from its start: the slowest of the pace, the channel's rate and
11605
+ * the workspace's daily limit (as if no other broadcast used it). Absent when nobody would get it.
11606
+ */
11607
+ duration_seconds?: number;
11492
11608
  items: components["schemas"]["BroadcastReviewItem"][];
11493
11609
  };
11494
11610
  BroadcastProblem: components["schemas"]["Problem"] & {
@@ -11647,7 +11763,7 @@ export interface components {
11647
11763
  previous_state?: components["schemas"]["BroadcastState"];
11648
11764
  };
11649
11765
  /**
11650
- * @description `broadcast.updated`: the broadcast changed state. Delivered to callers who hold
11766
+ * @description `broadcast.updated`: the broadcast changed state or its pace. Delivered to callers who hold
11651
11767
  * `broadcasts:read` and can see its inbox.
11652
11768
  */
11653
11769
  BroadcastEvent: {
@@ -11673,6 +11789,11 @@ export interface components {
11673
11789
  counts: components["schemas"]["BroadcastCounts"];
11674
11790
  /** Format: date-time */
11675
11791
  waiting_until?: string;
11792
+ /**
11793
+ * Format: date-time
11794
+ * @description While sending with at least a minute between mails: the earliest time the next mail may go out.
11795
+ */
11796
+ pace_next_at?: string;
11676
11797
  };
11677
11798
  /**
11678
11799
  * @description `broadcast.progress`, on `/v1/realtime` only: the counts of a preparing or sending broadcast,
@@ -20245,6 +20366,7 @@ export interface operations {
20245
20366
  413: components["responses"]["Problem"];
20246
20367
  415: components["responses"]["Problem"];
20247
20368
  422: components["responses"]["Problem"];
20369
+ 429: components["responses"]["Problem"];
20248
20370
  };
20249
20371
  };
20250
20372
  deleteEmailImage: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "useyuva",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Yuva for the web: a headless client for contacts, the <yuva-chat> element, documentation page feedback and discussions, the <yuva-subscribe> mailing list form, cookieless web analytics, React hooks, a Nuxt module, a typed /v1 client and server helpers for identity tokens, webhooks and server-side analytics.",
5
5
  "license": "MIT",
6
6
  "repository": {