useyuva 0.0.10 → 0.0.12

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.
@@ -1429,6 +1429,33 @@ export interface paths {
1429
1429
  patch?: never;
1430
1430
  trace?: never;
1431
1431
  };
1432
+ "/v1/contacts/{contactId}/visits": {
1433
+ parameters: {
1434
+ query?: never;
1435
+ header?: never;
1436
+ path?: never;
1437
+ cookie?: never;
1438
+ };
1439
+ /**
1440
+ * A contact's recent visits
1441
+ * @description The visits linked to the contact on the analytics properties the caller can see, newest
1442
+ * first, from the raw window (`YUVA_ANALYTICS_RAW_DAYS`). A visit is linked only when the
1443
+ * visitor consented to the `persistent` and `identify` features of the property and the
1444
+ * host's backend identified them with a valid identity token; visits of anyone else are never
1445
+ * joined to a contact, so for most contacts the list is empty. Deleting the contact deletes
1446
+ * these visits; merging contacts moves them.
1447
+ *
1448
+ * Scopes: `contacts:read` and `analytics:read`.
1449
+ */
1450
+ get: operations["listContactVisits"];
1451
+ put?: never;
1452
+ post?: never;
1453
+ delete?: never;
1454
+ options?: never;
1455
+ head?: never;
1456
+ patch?: never;
1457
+ trace?: never;
1458
+ };
1432
1459
  "/v1/contacts/{contactId}/subscriptions": {
1433
1460
  parameters: {
1434
1461
  query?: never;
@@ -4708,7 +4735,8 @@ export interface paths {
4708
4735
  * (one column per dimension and metric) instead.
4709
4736
  *
4710
4737
  * A visitor exists for one day (its salt does), so `visitors` over a range is the sum of each
4711
- * day's visitors. Finished days are read from daily rollups and open days (today, yesterday
4738
+ * day's visitors; only a visitor who consented to the `persistent` feature counts once over
4739
+ * the range (`AnalyticsMetric`). Finished days are read from daily rollups and open days (today, yesterday
4712
4740
  * until it is rolled up, days with late events) from raw rows; `meta.served_from` says which.
4713
4741
  * Totals, any single dimension, totals with one `is` filter on a visit dimension, and pages
4714
4742
  * with one `is` filter on `channel`, `source` or `country` come from rollups. Other
@@ -4721,6 +4749,10 @@ export interface paths {
4721
4749
  * raw rows inside the raw window, for any prop key, and the rollups of the property's
4722
4750
  * `tracked_props` before it. `segment_id` adds a saved segment's filters.
4723
4751
  *
4752
+ * `dataset: support` puts the linked inbox's conversations, page feedback, page ratings and
4753
+ * discussions next to each page's views (`AnalyticsDataset`). `insights: true` adds fixed-rule
4754
+ * `insights` to the answer.
4755
+ *
4724
4756
  * Queries run for at most 15 seconds and four at a time per workspace; a fifth waits up to
4725
4757
  * two seconds and then answers `429`. Answers about finished days are cached for ten minutes,
4726
4758
  * answers that include today for 30 seconds.
@@ -4757,6 +4789,110 @@ export interface paths {
4757
4789
  patch?: never;
4758
4790
  trace?: never;
4759
4791
  };
4792
+ "/v1/analytics/properties/{propertyId}/events": {
4793
+ parameters: {
4794
+ query?: never;
4795
+ header?: never;
4796
+ path?: never;
4797
+ cookie?: never;
4798
+ };
4799
+ get?: never;
4800
+ put?: never;
4801
+ /**
4802
+ * Send server-side analytics events
4803
+ * @description A host backend reports up to 100 events of its visitors, such as a signup its server
4804
+ * handled, with `sdk/go/analytics` or any HTTP client. API keys only (`403 forbidden` for
4805
+ * members' sessions); a key limited to inboxes reaches the properties of its inboxes. Scope:
4806
+ * `analytics:write`.
4807
+ *
4808
+ * Each event names its visitor in one of two ways, neither stored:
4809
+ * - `ip` and `user_agent` forwarded from the visitor's request, with `sec_ch_ua_platform`
4810
+ * and `sec_ch_ua_mobile` when the request had them. They are hashed exactly as the
4811
+ * collection endpoint hashes the browser's own request, so the event joins the visitor's
4812
+ * browser visit of that day; the address is shortened first and used for the location,
4813
+ * excluded addresses and the per-address limit like a browser's.
4814
+ * - `visitor_key`, the backend's own key for the visitor (a session id, never an e-mail
4815
+ * address), hashed under the day's salt like an app's process key. With it, `ip` only
4816
+ * places the visitor and `user_agent` only describes the device.
4817
+ *
4818
+ * A visitor who consented to `persistent` in the browser or app can be named by the
4819
+ * `persistent_id` it holds, with `consent: true`, so the event joins that visitor's days;
4820
+ * `identity_token` with it identifies them, as `AnalyticsConsent` describes.
4821
+ *
4822
+ * `url` is the page (http(s), on one of the property's `domains`) or, for a property with
4823
+ * `ios` or `android`, an app screen (`app://<app id>/<screen>`). A visit that a server event
4824
+ * starts has platform `server`. `name` is `pageview` or a custom or built-in event with the
4825
+ * rules of `AnalyticsEvent`; `engagement` is for browsers only. `timestamp` defaults to now;
4826
+ * an event older than 72 hours is dropped as `late`.
4827
+ *
4828
+ * Invalid events are left out on their own and listed in `errors`; the others are taken.
4829
+ * Taken but not stored, as on the collection endpoint and counted in the property's health:
4830
+ * events with `dnt` or `gpc`; events of a `consent` property without `consent: true`; events
4831
+ * from bots, excluded addresses or paths; events over the per-address or per-property limit
4832
+ * or the workspace's monthly cap. When the server cannot take more events it answers `503`
4833
+ * with `Retry-After`.
4834
+ */
4835
+ post: operations["sendAnalyticsEvents"];
4836
+ delete?: never;
4837
+ options?: never;
4838
+ head?: never;
4839
+ patch?: never;
4840
+ trace?: never;
4841
+ };
4842
+ "/v1/analytics/properties/{propertyId}/retention": {
4843
+ parameters: {
4844
+ query?: never;
4845
+ header?: never;
4846
+ path?: never;
4847
+ cookie?: never;
4848
+ };
4849
+ /**
4850
+ * How consented visitors come back
4851
+ * @description Cohorts of the visitors with a persistent id (the `persistent` consent feature): each
4852
+ * cohort holds the visitors first seen in one day, week (from Monday) or month of the
4853
+ * property's time zone, and `periods[n]` how many of them came back in the n-th period after
4854
+ * it, `periods[0]` being the cohort itself. Days go up to 30 periods, weeks and months up to
4855
+ * 12. Visitors without consent are never in a cohort, so a property without the feature has
4856
+ * none. The cohorts job rebuilds the numbers every hour (`built_at`); a persistent id is
4857
+ * forgotten 13 months after it was first seen, so cohorts reach back at most that far.
4858
+ *
4859
+ * Scope: `analytics:read`.
4860
+ */
4861
+ get: operations["getAnalyticsRetention"];
4862
+ put?: never;
4863
+ post?: never;
4864
+ delete?: never;
4865
+ options?: never;
4866
+ head?: never;
4867
+ patch?: never;
4868
+ trace?: never;
4869
+ };
4870
+ "/v1/analytics/properties/{propertyId}/visitors/{persistentId}": {
4871
+ parameters: {
4872
+ query?: never;
4873
+ header?: never;
4874
+ path?: never;
4875
+ cookie?: never;
4876
+ };
4877
+ get?: never;
4878
+ put?: never;
4879
+ post?: never;
4880
+ /**
4881
+ * Delete a consented visitor's analytics
4882
+ * @description For a person's erasure request: deletes everything stored under a persistent id (the
4883
+ * value their browser or app holds, `AnalyticsConsent.p`), its raw visits and events, its
4884
+ * cohort days and its link to a contact. Days already rolled up are rolled up again without
4885
+ * them. Answers `204` whether or not anything was stored under the id. Owners, admins and
4886
+ * API keys without an inbox limit.
4887
+ *
4888
+ * Scope: `analytics:manage`.
4889
+ */
4890
+ delete: operations["deleteAnalyticsVisitor"];
4891
+ options?: never;
4892
+ head?: never;
4893
+ patch?: never;
4894
+ trace?: never;
4895
+ };
4760
4896
  "/v1/analytics/properties/{propertyId}/health": {
4761
4897
  parameters: {
4762
4898
  query?: never;
@@ -4908,7 +5044,9 @@ export interface paths {
4908
5044
  * How visitors went through a funnel
4909
5045
  * @description Per step, the visitors who completed it after every step before it within one visit, from
4910
5046
  * the raw events of the range. A visitor exists for one day, so a funnel never crosses
4911
- * midnight; visitors over a range are added up per day. The range must lie inside the raw
5047
+ * midnight; visitors over a range are added up per day. Visitors with a persistent id (the
5048
+ * `persistent` consent feature) are also followed across visits and days of the range, in
5049
+ * `consented_visitors`. The range must lie inside the raw
4912
5050
  * window (`422 needs_raw_window`) and span at most 90 days, or 31 when the property counted
4913
5051
  * more than 10 million events over the last 30 days (`422 range_too_large`). Answers are
4914
5052
  * cached for ten minutes.
@@ -5042,6 +5180,269 @@ export interface paths {
5042
5180
  patch: operations["updateAnalyticsAnnotation"];
5043
5181
  trace?: never;
5044
5182
  };
5183
+ "/v1/analytics/properties/{propertyId}/subscription": {
5184
+ parameters: {
5185
+ query?: never;
5186
+ header?: never;
5187
+ path?: never;
5188
+ cookie?: never;
5189
+ };
5190
+ /**
5191
+ * Get my reports and alerts of a property
5192
+ * @description The calling member's e-mail report (`none`, `weekly`, `monthly`) and the alert kinds they
5193
+ * get by e-mail for the property; `none` and no alerts until they choose. Member session only.
5194
+ */
5195
+ get: operations["getAnalyticsSubscription"];
5196
+ /**
5197
+ * Choose my reports and alerts of a property
5198
+ * @description Weekly reports go out on Monday morning (08:00 in the property's time zone) about the week
5199
+ * before, monthly ones on the 1st about the month before, in the member's language, to the
5200
+ * member's address: plain numbers, no images, nothing that tracks opening or clicks. Alerts
5201
+ * are fixed rules checked every hour (`AnalyticsAlertKind`); each alert is sent once. Member
5202
+ * session only; the member must see the property.
5203
+ */
5204
+ put: operations["updateAnalyticsSubscription"];
5205
+ post?: never;
5206
+ delete?: never;
5207
+ options?: never;
5208
+ head?: never;
5209
+ patch?: never;
5210
+ trace?: never;
5211
+ };
5212
+ "/v1/analytics/properties/{propertyId}/subscription/send-report": {
5213
+ parameters: {
5214
+ query?: never;
5215
+ header?: never;
5216
+ path?: never;
5217
+ cookie?: never;
5218
+ };
5219
+ get?: never;
5220
+ put?: never;
5221
+ /**
5222
+ * Send me a report now
5223
+ * @description Mails the calling member the report of the last seven finished days (`weekly`) or the last
5224
+ * month (`monthly`, by the subscription; `weekly` when there is none), so they see what it
5225
+ * looks like. Five an hour per member (`429`). Member session only.
5226
+ */
5227
+ post: operations["sendAnalyticsReport"];
5228
+ delete?: never;
5229
+ options?: never;
5230
+ head?: never;
5231
+ patch?: never;
5232
+ trace?: never;
5233
+ };
5234
+ "/v1/analytics/properties/{propertyId}/alerts": {
5235
+ parameters: {
5236
+ query?: never;
5237
+ header?: never;
5238
+ path?: never;
5239
+ cookie?: never;
5240
+ };
5241
+ /**
5242
+ * List a property's alerts
5243
+ * @description The alerts the property raised, newest first, at most 100; each also has an annotation on
5244
+ * its day and an `analytics.alert` event and webhook. With `before`, older ones.
5245
+ *
5246
+ * Scope: `analytics:read`.
5247
+ */
5248
+ get: operations["listAnalyticsAlerts"];
5249
+ put?: never;
5250
+ post?: never;
5251
+ delete?: never;
5252
+ options?: never;
5253
+ head?: never;
5254
+ patch?: never;
5255
+ trace?: never;
5256
+ };
5257
+ "/v1/analytics/properties/{propertyId}/shares": {
5258
+ parameters: {
5259
+ query?: never;
5260
+ header?: never;
5261
+ path?: never;
5262
+ cookie?: never;
5263
+ };
5264
+ /**
5265
+ * List a property's share links
5266
+ * @description Newest first, revoked and expired links included (`active` tells them apart). A link's
5267
+ * token is shown only once, when it is made; the list carries its first characters as
5268
+ * `token_prefix`.
5269
+ *
5270
+ * Scope: `analytics:read`.
5271
+ */
5272
+ get: operations["listAnalyticsShares"];
5273
+ put?: never;
5274
+ /**
5275
+ * Make a read-only share link
5276
+ * @description A link anyone holding it can open at `<public URL>/share/<token>` without signing in. It
5277
+ * shows only the `views` it lists, of this property only, read-only. With a `password` the
5278
+ * viewer unlocks it first (`POST /client/v1/analytics-shares/{token}/access`); the password
5279
+ * is stored as an argon2id hash and the token as a SHA-256 hash, so neither can be shown
5280
+ * again: the answer carries the `token` and the `url` once. `expires_at` ends the link;
5281
+ * `embed_origins` lists the sites whose pages may show it in an iframe (the share page's
5282
+ * `frame-ancestors`); without them no other site can frame it. A property has at most 50
5283
+ * links (`403 share_limit`).
5284
+ *
5285
+ * Owners, admins and API keys without an inbox limit. Scope: `analytics:manage`.
5286
+ */
5287
+ post: operations["createAnalyticsShare"];
5288
+ delete?: never;
5289
+ options?: never;
5290
+ head?: never;
5291
+ patch?: never;
5292
+ trace?: never;
5293
+ };
5294
+ "/v1/analytics/properties/{propertyId}/shares/{shareId}": {
5295
+ parameters: {
5296
+ query?: never;
5297
+ header?: never;
5298
+ path?: never;
5299
+ cookie?: never;
5300
+ };
5301
+ get?: never;
5302
+ put?: never;
5303
+ post?: never;
5304
+ /**
5305
+ * Delete a share link
5306
+ * @description The link stops working at once and leaves the list.
5307
+ *
5308
+ * Owners, admins and API keys without an inbox limit. Scope: `analytics:manage`.
5309
+ */
5310
+ delete: operations["deleteAnalyticsShare"];
5311
+ options?: never;
5312
+ head?: never;
5313
+ /**
5314
+ * Change a share link
5315
+ * @description Changes the given fields; the token stays. A new `password` (or `password: null`, which
5316
+ * removes it) ends every viewer's unlocked access at once. `expires_at: null` keeps the link
5317
+ * until it is revoked. A revoked link cannot be changed (`409 share_revoked`).
5318
+ *
5319
+ * Owners, admins and API keys without an inbox limit. Scope: `analytics:manage`.
5320
+ */
5321
+ patch: operations["updateAnalyticsShare"];
5322
+ trace?: never;
5323
+ };
5324
+ "/v1/analytics/properties/{propertyId}/shares/{shareId}/revoke": {
5325
+ parameters: {
5326
+ query?: never;
5327
+ header?: never;
5328
+ path?: never;
5329
+ cookie?: never;
5330
+ };
5331
+ get?: never;
5332
+ put?: never;
5333
+ /**
5334
+ * Revoke a share link
5335
+ * @description The link stops working at once and stays in the list with `revoked_at`. Revoking a revoked
5336
+ * link changes nothing.
5337
+ *
5338
+ * Owners, admins and API keys without an inbox limit. Scope: `analytics:manage`.
5339
+ */
5340
+ post: operations["revokeAnalyticsShare"];
5341
+ delete?: never;
5342
+ options?: never;
5343
+ head?: never;
5344
+ patch?: never;
5345
+ trace?: never;
5346
+ };
5347
+ "/v1/analytics/properties/{propertyId}/exports": {
5348
+ parameters: {
5349
+ query?: never;
5350
+ header?: never;
5351
+ path?: never;
5352
+ cookie?: never;
5353
+ };
5354
+ /**
5355
+ * List a property's exports
5356
+ * @description Newest first, until each expires. `raw` exports are listed only for callers who may make
5357
+ * them.
5358
+ *
5359
+ * Scope: `analytics:read`.
5360
+ */
5361
+ get: operations["listAnalyticsExports"];
5362
+ put?: never;
5363
+ /**
5364
+ * Export a property's numbers or raw events
5365
+ * @description A background job writes the file to the server's storage; poll `getAnalyticsExport` until
5366
+ * `status` is `done`, then download it with `downloadAnalyticsExport`. Files are kept seven
5367
+ * days (`expires_at`) and then deleted.
5368
+ *
5369
+ * - `view`: the rows of one `query` (as `queryAnalytics` answers it, every row, no
5370
+ * comparison), CSV or NDJSON.
5371
+ * - `daily`: one row per day of `range` (at most 400 days) with visitors, visits, page views,
5372
+ * views per visit, bounce rate, visit duration, time on page and scroll depth, broken down
5373
+ * by `dimension` when given, CSV or NDJSON.
5374
+ * - `raw`: every stored event of `range` (at most 31 days, inside the raw window of
5375
+ * `YUVA_ANALYTICS_RAW_DAYS`, else `422 needs_raw_window`) with its visit's description, as
5376
+ * NDJSON only (`AnalyticsRawEvent`). It carries no visitor hash, salt, address, contact or
5377
+ * stored visit id: a visit is a number that counts up within the file. Bots are left out.
5378
+ * Raw rows are pseudonymous personal data, so raw exports need `analytics:manage` and an
5379
+ * owner, an admin or an API key without an inbox limit (`403`).
5380
+ *
5381
+ * CSV cells that start with `=`, `+`, `-`, `@`, a tab or a carriage return get a leading `'`
5382
+ * so spreadsheets do not run them as formulas. A file larger than 1 GiB fails with
5383
+ * `error` `too_large`. A workspace runs at most three exports at a time (`429 rate_limited`).
5384
+ *
5385
+ * Scope: `analytics:read`; `analytics:manage` for `raw`.
5386
+ */
5387
+ post: operations["createAnalyticsExport"];
5388
+ delete?: never;
5389
+ options?: never;
5390
+ head?: never;
5391
+ patch?: never;
5392
+ trace?: never;
5393
+ };
5394
+ "/v1/analytics/properties/{propertyId}/exports/{exportId}": {
5395
+ parameters: {
5396
+ query?: never;
5397
+ header?: never;
5398
+ path?: never;
5399
+ cookie?: never;
5400
+ };
5401
+ /**
5402
+ * An export and its progress
5403
+ * @description Scope: `analytics:read`; `analytics:manage` for `raw`.
5404
+ */
5405
+ get: operations["getAnalyticsExport"];
5406
+ put?: never;
5407
+ post?: never;
5408
+ /**
5409
+ * Delete an export
5410
+ * @description Deletes the export and its file before it expires; one still running stops at its next
5411
+ * step.
5412
+ *
5413
+ * Scope: `analytics:read`; `analytics:manage` for `raw`.
5414
+ */
5415
+ delete: operations["deleteAnalyticsExport"];
5416
+ options?: never;
5417
+ head?: never;
5418
+ patch?: never;
5419
+ trace?: never;
5420
+ };
5421
+ "/v1/analytics/properties/{propertyId}/exports/{exportId}/download": {
5422
+ parameters: {
5423
+ query?: never;
5424
+ header?: never;
5425
+ path?: never;
5426
+ cookie?: never;
5427
+ };
5428
+ /**
5429
+ * Download an export's file
5430
+ * @description `text/csv` or `application/x-ndjson`, always as a download (`Content-Disposition:
5431
+ * attachment`). An export that is not `done` answers `409 export_not_ready`; an expired or
5432
+ * deleted one `404`. Links cannot carry headers, so the workspace can also be named with the
5433
+ * `workspace_id` query parameter instead of `Yuva-Workspace`.
5434
+ *
5435
+ * Scope: `analytics:read`; `analytics:manage` for `raw`.
5436
+ */
5437
+ get: operations["downloadAnalyticsExport"];
5438
+ put?: never;
5439
+ post?: never;
5440
+ delete?: never;
5441
+ options?: never;
5442
+ head?: never;
5443
+ patch?: never;
5444
+ trace?: never;
5445
+ };
5045
5446
  "/v1/realtime": {
5046
5447
  parameters: {
5047
5448
  query?: never;
@@ -5601,9 +6002,15 @@ export interface paths {
5601
6002
  /**
5602
6003
  * Start a conversation
5603
6004
  * @description Starts a conversation on the session's channel with its first message. Send
5604
- * `multipart/form-data` to attach files (`body`, `subject`, `client_id` as form fields and up
5605
- * to 10 `files` parts), with the same size and type rules as `/v1`. Rate limited per IP
5606
- * address and per channel.
6005
+ * `multipart/form-data` to attach files (`body`, `subject`, `client_id`, `page_url` and
6006
+ * `page_title` as form fields and up to 10 `files` parts), with the same size and type rules
6007
+ * as `/v1`. Rate limited per IP address and per channel.
6008
+ *
6009
+ * `page_url` is the page the conversation starts on, kept without query and fragment only
6010
+ * when the channel is a chat channel and the page's origin is one of its allowed origins;
6011
+ * otherwise `page_url` and `page_title` are dropped and the conversation starts without a
6012
+ * page. The page never refuses a conversation. It is shown as `page` on the conversation and
6013
+ * counted per page, and never joined to a visitor of Analytics.
5607
6014
  */
5608
6015
  post: operations["createClientConversation"];
5609
6016
  delete?: never;
@@ -5835,16 +6242,41 @@ export interface paths {
5835
6242
  *
5836
6243
  * A browser's `Origin` host and every event's page host (`u`) must be one of the property's
5837
6244
  * `domains` (`403 origin_not_allowed`, `403 page_not_allowed`); refusals carry
5838
- * `Access-Control-Allow-Origin` so the script can read them. Requests without an `Origin`
5839
- * are refused until app collection exists. An unknown or deleted key answers `404`.
6245
+ * `Access-Control-Allow-Origin` so the script can read them. An unknown or deleted key
6246
+ * answers `404`.
6247
+ *
6248
+ * Apps (the Swift and Kotlin SDKs) send without an `Origin`, always in the batch form with
6249
+ * `k` and `a` (`AnalyticsEventBatch`), to a property whose `platforms` hold `a.platform`
6250
+ * (`403 platform_not_allowed` otherwise; a request without an `Origin` to a property with
6251
+ * neither `ios` nor `android` answers `403 origin_not_allowed`). A screen is a page view whose
6252
+ * `u` is `app://<app id>/<screen>`; the app id is the visit's `hostname` and is not checked
6253
+ * against `domains`. The visitor is a keyed hash of `k`, a random key the app holds in memory
6254
+ * for the life of its process, under the salt of the event's day, or of the day the event
6255
+ * arrives once that day's salt is gone: a new process is a new visitor and a new visit. Events
6256
+ * carry their own time in `t`; one older than 72 hours is dropped and counted as `late`, one
6257
+ * in the future is taken as now. The browser-only header rules for bots do not apply to apps,
6258
+ * the volume rules do.
5840
6259
  *
5841
6260
  * Custom and built-in events carry props (`p`) and revenue (`$`) within the limits of
5842
- * `AnalyticsEvent`; an event that breaks them, an `outbound_click` or `file_download` without
5843
- * an http(s) `url` prop (for `outbound_click` on another host), or revenue on a page view
5844
- * answers `400` for the whole request.
6261
+ * `AnalyticsEvent`. An invalid event (a `u` that is not an http(s) URL, a reserved name, props
6262
+ * or revenue that break those limits, revenue on a page view or engagement, an
6263
+ * `outbound_click` or `file_download` without an http(s) `url` prop, or an `outbound_click`
6264
+ * to the page's own host) answers `400` with the reason when it is sent alone. In a batch
6265
+ * it is dropped on its own and counted as `invalid` in the property's health, the batch's
6266
+ * other events are taken, and the answer is `202`. A body that is not JSON or does not match
6267
+ * `AnalyticsBatch`, a body over 64 KiB, a refused origin or page host and an unknown key
6268
+ * still refuse the whole request.
6269
+ *
6270
+ * Consent features (`AnalyticsConsent`): an event with `c.a: 1` and a persistent id `c.p`, on
6271
+ * a general-audience property that offers `persistent`, is the visitor of that id on every
6272
+ * day instead of the day's hash; `c.j` with it, on a property that also offers `identify`,
6273
+ * links the id to a contact. Without them, or on any other property, the event is counted
6274
+ * exactly as in default mode. `yuva_consent` carries an identification or a withdrawal at
6275
+ * once and is never stored; 20 a minute per shortened address and property.
5845
6276
  *
5846
- * Accepted but not stored, still `202`: every request with `Sec-GPC: 1` or `DNT: 1`; events
5847
- * of a `consent` property that do not carry `c.a: 1`; events from an excluded address or
6277
+ * Accepted but not stored, still `202`: every request with `Sec-GPC: 1` or `DNT: 1` (but for
6278
+ * a `yuva_consent` withdrawal); events
6279
+ * older than 72 hours; events of a `consent` property that do not carry `c.a: 1`; events from an excluded address or
5848
6280
  * path; events over the property's per-minute limit or the workspace's monthly cap. One
5849
6281
  * shortened address may send 120 events a minute to a property (`429 rate_limited` with
5850
6282
  * `Retry-After`). When the server cannot take more events it answers `503` with
@@ -5857,7 +6289,7 @@ export interface paths {
5857
6289
  patch?: never;
5858
6290
  trace?: never;
5859
6291
  };
5860
- "/client/v1/realtime": {
6292
+ "/client/v1/analytics-shares/{token}": {
5861
6293
  parameters: {
5862
6294
  query?: never;
5863
6295
  header?: never;
@@ -5865,18 +6297,124 @@ export interface paths {
5865
6297
  cookie?: never;
5866
6298
  };
5867
6299
  /**
5868
- * Live events for a contact (WebSocket)
5869
- * @description Upgrades to a WebSocket that streams the events of the contact's own conversations in the
5870
- * session's inbox. Authenticate with the session token, either as the `token` query
5871
- * parameter or as a WebSocket subprotocol: offer `yuva` and `yuva.token.<token>`
5872
- * (`new WebSocket(url, ["yuva", "yuva.token." + token])`); the server selects `yuva`.
5873
- * Cookies are not used. A browser's `Origin` must be one of the channel's allowed origins.
6300
+ * A share link's page settings
6301
+ * @description What the public share page (`<public URL>/share/<token>`, served by the panel) needs first.
6302
+ * A link with a password answers only `password_required: true` until the request carries
6303
+ * an access token from `unlockSharedAnalytics` as `Authorization: Bearer yuva_sa_…`; then,
6304
+ * like a link without a password, it answers the views it may show, the property's name,
6305
+ * time zone and currency, the raw window, its goals (with the `goals` view) and the GeoIP
6306
+ * attribution to show next to locations.
5874
6307
  *
5875
- * Every server message is one JSON text frame matching `ClientRealtimeMessage`. Stored events
5876
- * (`conversation.created`, `conversation.updated`, `message.created`, `message.updated`,
5877
- * `read`) carry an increasing `id`; resume exactly as on `/v1/realtime`: remember the larger
5878
- * of `ready.last_event_id` and the last `id` received, reconnect with `?last_event_id=`, and
5879
- * reload over HTTP on `resync_required`. `typing`, `presence` and `inbox.updated` have no
6308
+ * The share page itself is served with `Content-Security-Policy: frame-ancestors` set to the
6309
+ * link's `embed_origins` (`'none'` without them, an unknown, revoked or expired link included),
6310
+ * so only those sites can show it in an iframe; it carries no analytics script.
6311
+ *
6312
+ * An unknown, revoked or expired token answers `404`. Every share endpoint is limited per IP
6313
+ * address (`429 rate_limited` with `Retry-After`).
6314
+ */
6315
+ get: operations["getSharedAnalytics"];
6316
+ put?: never;
6317
+ post?: never;
6318
+ delete?: never;
6319
+ options?: never;
6320
+ head?: never;
6321
+ patch?: never;
6322
+ trace?: never;
6323
+ };
6324
+ "/client/v1/analytics-shares/{token}/access": {
6325
+ parameters: {
6326
+ query?: never;
6327
+ header?: never;
6328
+ path?: never;
6329
+ cookie?: never;
6330
+ };
6331
+ get?: never;
6332
+ put?: never;
6333
+ /**
6334
+ * Unlock a share link with its password
6335
+ * @description Answers an access token for the link's other endpoints, valid for 12 hours or until the
6336
+ * link expires, is revoked or gets another password. A wrong password answers
6337
+ * `401 wrong_password`; an IP address may try 10 times a minute per link and 30 times a minute
6338
+ * in all (`429 rate_limited`). A link without a password answers `409 no_password`.
6339
+ */
6340
+ post: operations["unlockSharedAnalytics"];
6341
+ delete?: never;
6342
+ options?: never;
6343
+ head?: never;
6344
+ patch?: never;
6345
+ trace?: never;
6346
+ };
6347
+ "/client/v1/analytics-shares/{token}/query": {
6348
+ parameters: {
6349
+ query?: never;
6350
+ header?: never;
6351
+ path?: never;
6352
+ cookie?: never;
6353
+ };
6354
+ get?: never;
6355
+ put?: never;
6356
+ /**
6357
+ * Query a shared property's numbers
6358
+ * @description `queryAnalytics` for a share link, with the same body and answer, limited to the link's
6359
+ * views: totals and time grains with any view; `page`, `entry_page`, `exit_page` and
6360
+ * `hostname` with `pages`; `channel`, `source`, `referrer` and the UTM dimensions with
6361
+ * `sources`; `country`, `region` and `city` with `locations`; `device`, `browser`,
6362
+ * `browser_version`, `os`, `os_version`, `screen_size`, `language`, `platform` and
6363
+ * `app_version` with `devices`; `event`, `prop` and the `events` metric with `events`; a
6364
+ * `goal_id` of the property and the goal metrics with `goals`. Dimensions and filters outside
6365
+ * them answer `403 view_not_shared`; `segment_id` is refused (`400`).
6366
+ *
6367
+ * A link with a password needs its access token (`401 share_password_required`). Answers are
6368
+ * cached like `queryAnalytics` and count towards the workspace's four concurrent queries.
6369
+ */
6370
+ post: operations["querySharedAnalytics"];
6371
+ delete?: never;
6372
+ options?: never;
6373
+ head?: never;
6374
+ patch?: never;
6375
+ trace?: never;
6376
+ };
6377
+ "/client/v1/analytics-shares/{token}/realtime": {
6378
+ parameters: {
6379
+ query?: never;
6380
+ header?: never;
6381
+ path?: never;
6382
+ cookie?: never;
6383
+ };
6384
+ /**
6385
+ * A shared property's last 30 minutes
6386
+ * @description `getAnalyticsRealtime` for a share link with the `realtime` view (`403 view_not_shared`
6387
+ * otherwise). A link with a password needs its access token (`401 share_password_required`).
6388
+ */
6389
+ get: operations["getSharedAnalyticsRealtime"];
6390
+ put?: never;
6391
+ post?: never;
6392
+ delete?: never;
6393
+ options?: never;
6394
+ head?: never;
6395
+ patch?: never;
6396
+ trace?: never;
6397
+ };
6398
+ "/client/v1/realtime": {
6399
+ parameters: {
6400
+ query?: never;
6401
+ header?: never;
6402
+ path?: never;
6403
+ cookie?: never;
6404
+ };
6405
+ /**
6406
+ * Live events for a contact (WebSocket)
6407
+ * @description Upgrades to a WebSocket that streams the events of the contact's own conversations in the
6408
+ * session's inbox. Authenticate with the session token, either as the `token` query
6409
+ * parameter or as a WebSocket subprotocol: offer `yuva` and `yuva.token.<token>`
6410
+ * (`new WebSocket(url, ["yuva", "yuva.token." + token])`); the server selects `yuva`.
6411
+ * Cookies are not used. A browser's `Origin` must be one of the channel's allowed origins.
6412
+ *
6413
+ * Every server message is one JSON text frame matching `ClientRealtimeMessage`. Stored events
6414
+ * (`conversation.created`, `conversation.updated`, `message.created`, `message.updated`,
6415
+ * `read`) carry an increasing `id`; resume exactly as on `/v1/realtime`: remember the larger
6416
+ * of `ready.last_event_id` and the last `id` received, reconnect with `?last_event_id=`, and
6417
+ * reload over HTTP on `resync_required`. `typing`, `presence` and `inbox.updated` have no
5880
6418
  * `id` and are not replayed. `message.*` carries only messages (no notes or internal events),
5881
6419
  * and `conversation.updated` only the status. `typing` (a member typing), `read` (how far
5882
6420
  * members have read) and `presence` (whether someone is available; sent after `ready` and
@@ -6480,6 +7018,27 @@ export interface webhooks {
6480
7018
  patch?: never;
6481
7019
  trace?: never;
6482
7020
  };
7021
+ "analytics.alert": {
7022
+ parameters: {
7023
+ query?: never;
7024
+ header?: never;
7025
+ path?: never;
7026
+ cookie?: never;
7027
+ };
7028
+ get?: never;
7029
+ put?: never;
7030
+ /**
7031
+ * A property raised an alert
7032
+ * @description A spike, a drop, a goal drop, support load or a new referrer (`AnalyticsAlertKind`), once
7033
+ * per alert. Endpoints of an inbox get the alerts of properties linked to that inbox.
7034
+ */
7035
+ post: operations["webhookAnalyticsAlert"];
7036
+ delete?: never;
7037
+ options?: never;
7038
+ head?: never;
7039
+ patch?: never;
7040
+ trace?: never;
7041
+ };
6483
7042
  }
6484
7043
  export interface components {
6485
7044
  schemas: {
@@ -7532,7 +8091,7 @@ export interface components {
7532
8091
  count: number;
7533
8092
  };
7534
8093
  /** @enum {string} */
7535
- WebhookEventType: "conversation.created" | "conversation.updated" | "conversation.rated" | "message.created" | "feedback.created" | "contact.updated" | "contact.deleted" | "draft.created" | "draft.updated" | "draft.deleted" | "discussion.created" | "discussion.post_created" | "discussion.answered" | "discussion.updated" | "subscription.created" | "subscription.updated" | "broadcast.updated";
8094
+ WebhookEventType: "conversation.created" | "conversation.updated" | "conversation.rated" | "message.created" | "feedback.created" | "contact.updated" | "contact.deleted" | "draft.created" | "draft.updated" | "draft.deleted" | "discussion.created" | "discussion.post_created" | "discussion.answered" | "discussion.updated" | "subscription.created" | "subscription.updated" | "broadcast.updated" | "analytics.alert";
7536
8095
  WebhookEndpoint: {
7537
8096
  /** Format: uuid */
7538
8097
  id: string;
@@ -9953,7 +10512,7 @@ export interface components {
9953
10512
  type: "resync_required";
9954
10513
  };
9955
10514
  /** @description An event as `GET /v1/events` returns it, told apart by `type`; the same objects realtime and webhooks carry. */
9956
- StoredEvent: components["schemas"]["ConversationEvent"] | components["schemas"]["ConversationMovedEvent"] | components["schemas"]["MessageCreatedEvent"] | components["schemas"]["MessageUpdatedEvent"] | components["schemas"]["DraftEvent"] | components["schemas"]["ContactUpdatedEvent"] | components["schemas"]["ContactDeletedEvent"] | components["schemas"]["InboxCreatedEvent"] | components["schemas"]["InboxUpdatedEvent"] | components["schemas"]["InboxDeletedEvent"] | components["schemas"]["InboxAccessChangedEvent"] | components["schemas"]["ConversationReadEvent"] | components["schemas"]["ContactReadEvent"] | components["schemas"]["ConversationPinEvent"] | components["schemas"]["DiscussionEvent"] | components["schemas"]["SubscriptionEvent"] | components["schemas"]["BroadcastEvent"] | components["schemas"]["MigrationEvent"];
10515
+ StoredEvent: components["schemas"]["ConversationEvent"] | components["schemas"]["ConversationMovedEvent"] | components["schemas"]["MessageCreatedEvent"] | components["schemas"]["MessageUpdatedEvent"] | components["schemas"]["DraftEvent"] | components["schemas"]["ContactUpdatedEvent"] | components["schemas"]["ContactDeletedEvent"] | components["schemas"]["InboxCreatedEvent"] | components["schemas"]["InboxUpdatedEvent"] | components["schemas"]["InboxDeletedEvent"] | components["schemas"]["InboxAccessChangedEvent"] | components["schemas"]["ConversationReadEvent"] | components["schemas"]["ContactReadEvent"] | components["schemas"]["ConversationPinEvent"] | components["schemas"]["DiscussionEvent"] | components["schemas"]["SubscriptionEvent"] | components["schemas"]["BroadcastEvent"] | components["schemas"]["MigrationEvent"] | components["schemas"]["AnalyticsAlertEvent"];
9957
10516
  EventPage: {
9958
10517
  events: components["schemas"]["StoredEvent"][];
9959
10518
  /**
@@ -9972,7 +10531,7 @@ export interface components {
9972
10531
  id: number;
9973
10532
  };
9974
10533
  /** @description One server message on `/v1/realtime`, told apart by `type`. */
9975
- RealtimeMessage: components["schemas"]["ConversationEvent"] | components["schemas"]["ConversationMovedEvent"] | components["schemas"]["MessageCreatedEvent"] | components["schemas"]["MessageUpdatedEvent"] | components["schemas"]["DraftEvent"] | components["schemas"]["ContactUpdatedEvent"] | components["schemas"]["ContactDeletedEvent"] | components["schemas"]["InboxCreatedEvent"] | components["schemas"]["InboxUpdatedEvent"] | components["schemas"]["InboxDeletedEvent"] | components["schemas"]["InboxAccessChangedEvent"] | components["schemas"]["ConversationReadEvent"] | components["schemas"]["ContactReadEvent"] | components["schemas"]["ConversationPinEvent"] | components["schemas"]["DiscussionEvent"] | components["schemas"]["SubscriptionEvent"] | components["schemas"]["BroadcastEvent"] | components["schemas"]["MigrationEvent"] | components["schemas"]["MigrationProgressEvent"] | components["schemas"]["MigrationForwardingConfirmationEvent"] | components["schemas"]["BroadcastProgressEvent"] | components["schemas"]["ListImportEvent"] | components["schemas"]["ListImportProgressEvent"] | components["schemas"]["TypingEvent"] | components["schemas"]["MemberPresenceEvent"] | components["schemas"]["ContactPresenceEvent"] | components["schemas"]["ViewingEvent"] | components["schemas"]["RealtimeReady"] | components["schemas"]["RealtimeResyncRequired"];
10534
+ RealtimeMessage: components["schemas"]["ConversationEvent"] | components["schemas"]["ConversationMovedEvent"] | components["schemas"]["MessageCreatedEvent"] | components["schemas"]["MessageUpdatedEvent"] | components["schemas"]["DraftEvent"] | components["schemas"]["ContactUpdatedEvent"] | components["schemas"]["ContactDeletedEvent"] | components["schemas"]["InboxCreatedEvent"] | components["schemas"]["InboxUpdatedEvent"] | components["schemas"]["InboxDeletedEvent"] | components["schemas"]["InboxAccessChangedEvent"] | components["schemas"]["ConversationReadEvent"] | components["schemas"]["ContactReadEvent"] | components["schemas"]["ConversationPinEvent"] | components["schemas"]["DiscussionEvent"] | components["schemas"]["SubscriptionEvent"] | components["schemas"]["BroadcastEvent"] | components["schemas"]["MigrationEvent"] | components["schemas"]["AnalyticsAlertEvent"] | components["schemas"]["MigrationProgressEvent"] | components["schemas"]["MigrationForwardingConfirmationEvent"] | components["schemas"]["BroadcastProgressEvent"] | components["schemas"]["ListImportEvent"] | components["schemas"]["ListImportProgressEvent"] | components["schemas"]["TypingEvent"] | components["schemas"]["MemberPresenceEvent"] | components["schemas"]["ContactPresenceEvent"] | components["schemas"]["ViewingEvent"] | components["schemas"]["RealtimeReady"] | components["schemas"]["RealtimeResyncRequired"];
9976
10535
  /**
9977
10536
  * @description `auto`: available in `live` inboxes while connected to `/v1/realtime` within business
9978
10537
  * hours. `away`: never shown as available.
@@ -10605,6 +11164,14 @@ export interface components {
10605
11164
  audience: components["schemas"]["BroadcastAudience"];
10606
11165
  /** @description Links go through `/c/{token}` on the server's link domain and unique clicks are counted. Off by default. */
10607
11166
  click_tracking: boolean;
11167
+ /**
11168
+ * @description Links to the web get `utm_source=newsletter`, `utm_medium=email` and
11169
+ * `utm_campaign=<utm_campaign>` (a link that has a `utm_` parameter of its own keeps its
11170
+ * own), so Analytics counts the visits of the campaign. On by default.
11171
+ */
11172
+ utm: boolean;
11173
+ /** @description The campaign's name in links; made from `name` when the broadcast is created. */
11174
+ utm_campaign: string;
10608
11175
  state: components["schemas"]["BroadcastState"];
10609
11176
  pause_reason?: components["schemas"]["BroadcastPauseReason"];
10610
11177
  /** @description Why it paused or failed, in words (an SMTP answer, the rates). */
@@ -10663,6 +11230,10 @@ export interface components {
10663
11230
  design_id?: string;
10664
11231
  audience?: components["schemas"]["BroadcastAudienceInput"];
10665
11232
  click_tracking?: boolean;
11233
+ /** @description On when absent at creation. */
11234
+ utm?: boolean;
11235
+ /** @description Lowercase letters, digits, `-`, `_` and `.`; made from `name` when absent at creation. */
11236
+ utm_campaign?: string;
10666
11237
  };
10667
11238
  BroadcastUpdate: {
10668
11239
  /** Format: uuid */
@@ -10674,6 +11245,10 @@ export interface components {
10674
11245
  design_id?: string | null;
10675
11246
  audience?: components["schemas"]["BroadcastAudienceInput"];
10676
11247
  click_tracking?: boolean;
11248
+ /** @description On when absent at creation. */
11249
+ utm?: boolean;
11250
+ /** @description Lowercase letters, digits, `-`, `_` and `.`; made from `name` when absent at creation. */
11251
+ utm_campaign?: string;
10677
11252
  };
10678
11253
  BroadcastPage: {
10679
11254
  items: components["schemas"]["Broadcast"][];
@@ -10878,6 +11453,23 @@ export interface components {
10878
11453
  links?: components["schemas"]["BroadcastReportLink"][];
10879
11454
  /** @description The first 50 conversations opened by replies. */
10880
11455
  replies: components["schemas"]["BroadcastReportReply"][];
11456
+ /**
11457
+ * @description With `utm` and the scope `analytics:read`: per Analytics property the caller sees, the
11458
+ * visits whose `utm_campaign` is the broadcast's, from the day sending started; only
11459
+ * properties with any.
11460
+ */
11461
+ campaign_visits?: components["schemas"]["BroadcastCampaignVisits"][];
11462
+ };
11463
+ BroadcastCampaignVisits: {
11464
+ /** Format: uuid */
11465
+ property_id: string;
11466
+ property_name: string;
11467
+ /** Format: int64 */
11468
+ visitors: number;
11469
+ /** Format: int64 */
11470
+ visits: number;
11471
+ /** Format: int64 */
11472
+ pageviews: number;
10881
11473
  };
10882
11474
  BroadcastEventData: {
10883
11475
  broadcast: components["schemas"]["Broadcast"];
@@ -11909,11 +12501,19 @@ export interface components {
11909
12501
  body?: string;
11910
12502
  /** @description The first message's `client_id`. */
11911
12503
  client_id?: string;
12504
+ /** @description The page the conversation starts on, an absolute http(s) URL; query and fragment are dropped, and so is a page a chat channel does not allow. */
12505
+ page_url?: string;
12506
+ /** @description The page's title; ignored without a kept `page_url`. */
12507
+ page_title?: string;
11912
12508
  };
11913
12509
  ClientConversationCreateMultipart: {
11914
12510
  subject?: string;
11915
12511
  body?: string;
11916
12512
  client_id?: string;
12513
+ /** @description The page the conversation starts on, an absolute http(s) URL; query and fragment are dropped, and so is a page a chat channel does not allow. */
12514
+ page_url?: string;
12515
+ /** @description The page's title; ignored without a kept `page_url`. */
12516
+ page_title?: string;
11917
12517
  files?: string[];
11918
12518
  };
11919
12519
  ClientConversationCreated: {
@@ -12050,7 +12650,8 @@ export interface components {
12050
12650
  /** @description One server message on `/client/v1/realtime`, told apart by `type`. */
12051
12651
  ClientRealtimeMessage: components["schemas"]["ClientConversationCreatedEvent"] | components["schemas"]["ClientConversationUpdatedEvent"] | components["schemas"]["ClientMessageEvent"] | components["schemas"]["ClientReadEvent"] | components["schemas"]["ClientTypingEvent"] | components["schemas"]["ClientPresenceEvent"] | components["schemas"]["ClientInboxUpdatedEvent"] | components["schemas"]["RealtimeReady"] | components["schemas"]["RealtimeResyncRequired"];
12052
12652
  /**
12053
- * @description Where a property's events come from. Browsers send from `web` pages; `ios` and `android` apps send without an `Origin`.
12653
+ * @description Where a property's events come from. Browsers send from `web` pages; `ios` and `android`
12654
+ * apps send without an `Origin`. Server-side events (`sendAnalyticsEvents`) need no platform.
12054
12655
  * @enum {string}
12055
12656
  */
12056
12657
  AnalyticsPlatform: "web" | "ios" | "android";
@@ -12063,7 +12664,10 @@ export interface components {
12063
12664
  AnalyticsCollection: "anonymous" | "consent";
12064
12665
  /**
12065
12666
  * @description Offered only to visitors who consented: `persistent` keeps a random id on the device for at
12066
- * most 13 months, `identify` links a verified user's visits to their contact.
12667
+ * most 13 months, `identify` links a verified user's visits to their contact. `identify`
12668
+ * needs `persistent` and a linked inbox, whose identity secret signs the tokens; a children's
12669
+ * property offers neither. Visitors who did not consent are counted exactly as without
12670
+ * these features.
12067
12671
  * @enum {string}
12068
12672
  */
12069
12673
  AnalyticsConsentFeature: "persistent" | "identify";
@@ -12242,7 +12846,10 @@ export interface components {
12242
12846
  all?: boolean;
12243
12847
  };
12244
12848
  /**
12245
- * @description `visitors` (distinct visitors per day, added up over the range), `visits`, `pageviews`,
12849
+ * @description `visitors` (distinct visitors per day, added up over the range; a visitor with a persistent
12850
+ * id counts once over the range's totals and once per `time:week` or `time:month` bucket,
12851
+ * from their cohort days without filters and from raw rows inside the raw window with
12852
+ * filters), `visits`, `pageviews`,
12246
12853
  * `views_per_visit`, `bounce_rate` (percent of visits with one page view and no interaction),
12247
12854
  * `visit_duration` (seconds per visit), `time_on_page` (seconds the page was visible and
12248
12855
  * focused, per page view that reported it), `scroll_depth` (deepest scroll in percent, per
@@ -12253,9 +12860,15 @@ export interface components {
12253
12860
  * completed) and `revenue` (what the completing events carried, per currency, in
12254
12861
  * `metrics.revenue`). With an `event` or `prop` dimension only `visitors`, `visits`, `events`
12255
12862
  * and `revenue` are offered, counted over the events of each row. `revenue` cannot order rows.
12863
+ *
12864
+ * With `dataset: support` (a property linked to an inbox): `conversations` (conversations
12865
+ * started on the page), `feedback` (page feedback sent from it), `ratings_up` and
12866
+ * `ratings_down` (page ratings), `helpful_rate` (percent of ratings that are `up`),
12867
+ * `discussions` (discussion threads started on it) and `support_rate` (conversations per
12868
+ * 1,000 page views), next to `visitors` and `pageviews`.
12256
12869
  * @enum {string}
12257
12870
  */
12258
- AnalyticsMetric: "visitors" | "visits" | "pageviews" | "views_per_visit" | "bounce_rate" | "visit_duration" | "time_on_page" | "scroll_depth" | "events" | "conversions" | "conversion_rate" | "completions" | "revenue";
12871
+ AnalyticsMetric: "visitors" | "visits" | "pageviews" | "views_per_visit" | "bounce_rate" | "visit_duration" | "time_on_page" | "scroll_depth" | "events" | "conversions" | "conversion_rate" | "completions" | "revenue" | "conversations" | "feedback" | "ratings_up" | "ratings_down" | "helpful_rate" | "discussions" | "support_rate";
12259
12872
  /**
12260
12873
  * @description A value of a visit or page. `page` is a path that was viewed (pages are counted by path;
12261
12874
  * `hostname` tells sites apart), `entry_page` and `exit_page` the first and last of a visit.
@@ -12263,14 +12876,19 @@ export interface components {
12263
12876
  * `email`, `referral`, `ai_assistants`, `internal`; `source` the UTM source, or the named site
12264
12877
  * (Google, ChatGPT) or host a visit came from; `device` is `desktop`, `mobile` or `tablet`;
12265
12878
  * `screen_size` is `phone`, `tablet`, `laptop` or `desktop`; `country` an ISO 3166-1 alpha-2
12266
- * code. Unknown values are empty strings. `event` is the name of a custom or built-in event
12879
+ * code. `platform` is `web`, `ios`, `android` or `server` (a visit a server event started);
12880
+ * `app_version` the version an app sent, empty on the web. In an app, a page is a screen:
12881
+ * its `hostname` is the app id and `page`, `entry_page` and `exit_page` are screen paths, so
12882
+ * an app property's "Screens" are a `page` breakdown filtered by `platform`. `visitor_type` is
12883
+ * `new` (the day a consented visitor with a persistent id was first seen) or `returning` (a
12884
+ * later day) for consented traffic, and empty for every other visit. Unknown values are empty strings. `event` is the name of a custom or built-in event
12267
12885
  * and `prop` the value of the event prop the filter's `prop` (or the query's `prop`) names, empty
12268
12886
  * for events without it: as
12269
12887
  * a filter of visits they keep the visits with such an event; in an `event` or `prop`
12270
12888
  * breakdown they keep the matching events.
12271
12889
  * @enum {string}
12272
12890
  */
12273
- AnalyticsFilterDimension: "page" | "entry_page" | "exit_page" | "hostname" | "channel" | "source" | "referrer" | "utm_source" | "utm_medium" | "utm_campaign" | "utm_term" | "utm_content" | "country" | "region" | "city" | "device" | "browser" | "browser_version" | "os" | "os_version" | "screen_size" | "language" | "platform" | "app_version" | "event" | "prop";
12891
+ AnalyticsFilterDimension: "page" | "entry_page" | "exit_page" | "hostname" | "channel" | "source" | "referrer" | "utm_source" | "utm_medium" | "utm_campaign" | "utm_term" | "utm_content" | "country" | "region" | "city" | "device" | "browser" | "browser_version" | "os" | "os_version" | "screen_size" | "language" | "platform" | "app_version" | "visitor_type" | "event" | "prop";
12274
12892
  /**
12275
12893
  * @description A filter dimension (`AnalyticsFilterDimension`), or a time grain: `time:hour` (local hours
12276
12894
  * of the property's time zone; only alone, and only with `visitors`, `visits`, `pageviews` and
@@ -12281,7 +12899,7 @@ export interface components {
12281
12899
  * a time grain other than `time:hour` or a visit dimension.
12282
12900
  * @enum {string}
12283
12901
  */
12284
- AnalyticsDimension: "time:hour" | "time:day" | "time:week" | "time:month" | "page" | "entry_page" | "exit_page" | "hostname" | "channel" | "source" | "referrer" | "utm_source" | "utm_medium" | "utm_campaign" | "utm_term" | "utm_content" | "country" | "region" | "city" | "device" | "browser" | "browser_version" | "os" | "os_version" | "screen_size" | "language" | "platform" | "app_version" | "event" | "prop";
12902
+ AnalyticsDimension: "time:hour" | "time:day" | "time:week" | "time:month" | "page" | "entry_page" | "exit_page" | "hostname" | "channel" | "source" | "referrer" | "utm_source" | "utm_medium" | "utm_campaign" | "utm_term" | "utm_content" | "country" | "region" | "city" | "device" | "browser" | "browser_version" | "os" | "os_version" | "screen_size" | "language" | "platform" | "app_version" | "visitor_type" | "event" | "prop";
12285
12903
  /**
12286
12904
  * @description `is` and `is_not` compare whole values, `contains` and `not_contains` parts of them (case
12287
12905
  * does not matter), `matches` patterns: on paths `*` is one segment and `**` any number of
@@ -12330,8 +12948,29 @@ export interface components {
12330
12948
  */
12331
12949
  dir: "asc" | "desc";
12332
12950
  };
12951
+ /**
12952
+ * @description `traffic` (default) counts visits, page views and events. `support` counts, per page and
12953
+ * day, what the property's linked inbox received from its pages: conversations started on a
12954
+ * page, page feedback, page ratings and discussion threads, next to the page's `pageviews`
12955
+ * and `visitors`. Pages are joined by host and path only; no visitor is ever joined to a
12956
+ * contact or conversation. It takes the dimensions `page`, `hostname` and `time:day`,
12957
+ * `time:week` or `time:month` (a page or host and a grain at most), filters on `page` and
12958
+ * `hostname`, no goal, prop or segment, and answers `422 no_linked_inbox` for a property
12959
+ * without an inbox. Rows are the pages (or hosts) with any support in the range, ordered by
12960
+ * `support_rate` with pages of fewer than 100 page views after the others unless `order_by`
12961
+ * says otherwise. Days of the past come from the support rollup, today and days not yet rolled
12962
+ * up from the inbox itself.
12963
+ * @enum {string}
12964
+ */
12965
+ AnalyticsDataset: "traffic" | "support";
12333
12966
  AnalyticsQuery: {
12967
+ dataset?: components["schemas"]["AnalyticsDataset"];
12334
12968
  metrics: components["schemas"]["AnalyticsMetric"][];
12969
+ /**
12970
+ * @description Add `insights` to the answer, worked out from its own numbers by fixed rules.
12971
+ * @default false
12972
+ */
12973
+ insights: boolean;
12335
12974
  /**
12336
12975
  * Format: uuid
12337
12976
  * @description The goal whose `conversions`, `conversion_rate`, `completions` and `revenue` the query
@@ -12390,6 +13029,20 @@ export interface components {
12390
13029
  completions?: number;
12391
13030
  /** @description Per currency, most first. */
12392
13031
  revenue?: components["schemas"]["AnalyticsRevenue"][];
13032
+ /** Format: double */
13033
+ conversations?: number;
13034
+ /** Format: double */
13035
+ feedback?: number;
13036
+ /** Format: double */
13037
+ ratings_up?: number;
13038
+ /** Format: double */
13039
+ ratings_down?: number;
13040
+ /** Format: double */
13041
+ helpful_rate?: number;
13042
+ /** Format: double */
13043
+ discussions?: number;
13044
+ /** Format: double */
13045
+ support_rate?: number;
12393
13046
  };
12394
13047
  AnalyticsRevenue: {
12395
13048
  /** @description ISO 4217 code. */
@@ -12452,6 +13105,47 @@ export interface components {
12452
13105
  meta: components["schemas"]["AnalyticsResultMeta"];
12453
13106
  /** @description Present when there are more rows. */
12454
13107
  next_cursor?: string;
13108
+ /** @description With `insights` in the query; empty when no rule applies. */
13109
+ insights?: components["schemas"]["AnalyticsInsight"][];
13110
+ };
13111
+ /**
13112
+ * @description A fixed rule over the answer's own numbers; Yuva runs no model. Each insight appears once
13113
+ * per answer, and `current` and `previous` are the plain numbers to phrase and pluralise it.
13114
+ * The change rules need `compare`; a number below 10 is never compared in percent.
13115
+ * `metric_change`: a count total that moved by at least 20% from a comparison total of at
13116
+ * least 10; `change` is the percentage. `metric_new`: a count total of at least 10 whose
13117
+ * comparison total is 0 ("no visitors in the compared days"); it has no `change`. A
13118
+ * comparison total from 1 to 9 gives neither. With one dimension other than time:
13119
+ * `row_change`, a row whose first count metric (by `order_by`, else the first one asked)
13120
+ * moved by at least 50% from at least 10, the three largest moves; `new_value`, a row with at
13121
+ * least 10 that had none in the comparison range (a new referrer, page or campaign), the
13122
+ * three largest, without `change`. `support_hotspot` (`dataset: support` by page): a page
13123
+ * with at least 3 conversations whose `support_rate` (`current`) is at least twice the
13124
+ * range's (`previous`), the three highest; `change` is how much higher in percent.
13125
+ */
13126
+ AnalyticsInsight: {
13127
+ /** @enum {string} */
13128
+ kind: "metric_change" | "metric_new" | "row_change" | "new_value" | "support_hotspot";
13129
+ metric: components["schemas"]["AnalyticsMetric"];
13130
+ /** @description The dimension of the row; absent for a total. */
13131
+ dimension?: string;
13132
+ /** @description The row's value of `dimension`. */
13133
+ value?: string;
13134
+ /**
13135
+ * Format: double
13136
+ * @description The range's number.
13137
+ */
13138
+ current: number;
13139
+ /**
13140
+ * Format: double
13141
+ * @description The comparison range's number (0 for `metric_new` and `new_value`), or the range's overall `support_rate` for a hotspot.
13142
+ */
13143
+ previous: number;
13144
+ /**
13145
+ * Format: double
13146
+ * @description The change in percent of `previous`, one decimal; only for `metric_change`, `row_change` and `support_hotspot`.
13147
+ */
13148
+ change?: number;
12455
13149
  };
12456
13150
  AnalyticsRangeProblem: components["schemas"]["Problem"] & {
12457
13151
  /** Format: date */
@@ -12560,6 +13254,88 @@ export interface components {
12560
13254
  /** @description Why no database is loaded, or why the last update failed. */
12561
13255
  error?: string;
12562
13256
  };
13257
+ AnalyticsServerEvents: {
13258
+ events: components["schemas"]["AnalyticsServerEvent"][];
13259
+ };
13260
+ /** @description One server-side event. Give `ip` and `user_agent`, or `visitor_key`. */
13261
+ AnalyticsServerEvent: {
13262
+ /**
13263
+ * @description `pageview`, a built-in event or a custom event's name, as in `AnalyticsEvent.n`.
13264
+ * @example Signup
13265
+ */
13266
+ name: string;
13267
+ /**
13268
+ * @description The page or app screen, read like `AnalyticsEvent.u`.
13269
+ * @example https://example.com/signup
13270
+ */
13271
+ url: string;
13272
+ /** @description The page's referrer, for a `pageview` that starts a visit. */
13273
+ referrer?: string;
13274
+ /**
13275
+ * Format: date-time
13276
+ * @description When it happened; now when absent.
13277
+ */
13278
+ timestamp?: string;
13279
+ /**
13280
+ * @description Up to 30 props with the rules of `AnalyticsEvent.p`.
13281
+ * @example {
13282
+ * "plan": "pro"
13283
+ * }
13284
+ */
13285
+ props?: {
13286
+ [key: string]: string | number | boolean;
13287
+ };
13288
+ revenue?: components["schemas"]["AnalyticsEventRevenue"];
13289
+ /** @description `false` makes a custom event non-interactive. */
13290
+ interactive?: boolean;
13291
+ /**
13292
+ * @description The visitor's IP address as your server saw it. Shortened on arrival, never stored.
13293
+ * @example 203.0.113.7
13294
+ */
13295
+ ip?: string;
13296
+ /** @description The visitor's `User-Agent` header. Never stored. */
13297
+ user_agent?: string;
13298
+ /**
13299
+ * @description The visitor's `Sec-CH-UA-Platform` header, as sent.
13300
+ * @example "macOS"
13301
+ */
13302
+ sec_ch_ua_platform?: string;
13303
+ /**
13304
+ * @description The visitor's `Sec-CH-UA-Mobile` header, as sent.
13305
+ * @example ?0
13306
+ */
13307
+ sec_ch_ua_mobile?: string;
13308
+ /** @description The visitor's `Accept-Language` header; only the primary language of its first entry is kept. */
13309
+ accept_language?: string;
13310
+ /** @description Your own key for the visitor instead of `ip` and `user_agent`; hashed under the day's salt, never stored. */
13311
+ visitor_key?: string;
13312
+ /** @description The visitor's request had `DNT: 1`; the event is not stored. */
13313
+ dnt?: boolean;
13314
+ /** @description The visitor's request had `Sec-GPC: 1`; the event is not stored. */
13315
+ gpc?: boolean;
13316
+ /** @description The visitor agreed to analytics; required for a `consent` property to store the event. */
13317
+ consent?: boolean;
13318
+ /**
13319
+ * @description The persistent id the visitor's browser or app holds (`AnalyticsConsent.p`), forwarded
13320
+ * for a visitor who agreed to `persistent`; taken only with `consent: true` on a property
13321
+ * that offers `persistent`, and then names the visitor in place of `ip` and `user_agent`
13322
+ * or `visitor_key`. Those are still required: they describe the visit, and name the
13323
+ * visitor whenever the id is not taken.
13324
+ */
13325
+ persistent_id?: string;
13326
+ /** @description An identity token as in `AnalyticsConsent.j`, with `persistent_id` and `consent: true`, on a property that offers `identify`. */
13327
+ identity_token?: string;
13328
+ };
13329
+ AnalyticsEventsResult: {
13330
+ /** @description The valid events, stored unless a rule of the operation dropped them. */
13331
+ accepted: number;
13332
+ /** @description The events left out as invalid, by their position in `events`. */
13333
+ errors: components["schemas"]["AnalyticsEventError"][];
13334
+ };
13335
+ AnalyticsEventError: {
13336
+ index: number;
13337
+ detail: string;
13338
+ };
12563
13339
  AnalyticsHealth: {
12564
13340
  /** Format: date-time */
12565
13341
  first_event_at?: string;
@@ -12661,6 +13437,12 @@ export interface components {
12661
13437
  visitors: number;
12662
13438
  /** Format: int64 */
12663
13439
  visits: number;
13440
+ /**
13441
+ * Format: int64
13442
+ * @description Visitors with a persistent id who reached this step after all before it anywhere in
13443
+ * the range, across visits and days, each counted once; 0 on a property without them.
13444
+ */
13445
+ consented_visitors: number;
12664
13446
  /**
12665
13447
  * Format: int64
12666
13448
  * @description Visitors of the step before who did not reach this one; 0 for the first step.
@@ -12677,6 +13459,76 @@ export interface components {
12677
13459
  */
12678
13460
  step_rate: number;
12679
13461
  };
13462
+ AnalyticsRetention: {
13463
+ /** @enum {string} */
13464
+ grain: "day" | "week" | "month";
13465
+ /**
13466
+ * Format: date
13467
+ * @description The first cohort's start.
13468
+ */
13469
+ from: string;
13470
+ /** Format: date */
13471
+ to: string;
13472
+ /**
13473
+ * Format: date-time
13474
+ * @description When the cohorts job last rebuilt the numbers; absent before it ran.
13475
+ */
13476
+ built_at?: string;
13477
+ /** @description Cohorts with at least one visitor. */
13478
+ cohorts: components["schemas"]["AnalyticsCohort"][];
13479
+ };
13480
+ AnalyticsCohort: {
13481
+ /**
13482
+ * Format: date
13483
+ * @description The start of the day, week or month the cohort's visitors were first seen.
13484
+ */
13485
+ cohort: string;
13486
+ /**
13487
+ * Format: int64
13488
+ * @description The cohort's size, `periods[0]`.
13489
+ */
13490
+ visitors: number;
13491
+ /** @description Visitors of the cohort seen in each period from the cohort's own, up to the period that holds today. */
13492
+ periods: number[];
13493
+ };
13494
+ AnalyticsContactVisitList: {
13495
+ items: components["schemas"]["AnalyticsContactVisit"][];
13496
+ /** @description Present when there are older visits. */
13497
+ next_cursor?: string;
13498
+ };
13499
+ /** @description One visit, described as its first event saw it, as the dimensions of `AnalyticsFilterDimension` name its values. */
13500
+ AnalyticsContactVisit: {
13501
+ /** Format: uuid */
13502
+ property_id: string;
13503
+ property_name: string;
13504
+ /** Format: date-time */
13505
+ started_at: string;
13506
+ /** Format: date-time */
13507
+ ended_at: string;
13508
+ hostname: string;
13509
+ entry_page: string;
13510
+ exit_page: string;
13511
+ pageviews: number;
13512
+ events: number;
13513
+ channel: string;
13514
+ source: string;
13515
+ utm_campaign: string;
13516
+ country: string;
13517
+ city: string;
13518
+ device: string;
13519
+ browser: string;
13520
+ os: string;
13521
+ platform: string;
13522
+ app_version: string;
13523
+ /** @description `new` or `returning`. */
13524
+ visitor_type: string;
13525
+ /** @description The paths (or app screens) the visit viewed, most viewed first, at most 20. */
13526
+ pages: components["schemas"]["AnalyticsVisitPage"][];
13527
+ };
13528
+ AnalyticsVisitPage: {
13529
+ path: string;
13530
+ views: number;
13531
+ };
12680
13532
  AnalyticsFunnelReport: {
12681
13533
  /** Format: uuid */
12682
13534
  funnel_id: string;
@@ -12718,11 +13570,12 @@ export interface components {
12718
13570
  /** Format: uuid */
12719
13571
  id: string;
12720
13572
  /**
12721
- * @description `note` is a member's; Yuva adds `key_rotated` when the property got a new key and
12722
- * `goal_created` (with `goal_id` while the goal exists, and its name as `text`).
13573
+ * @description `note` is a member's; Yuva adds `key_rotated` when the property got a new key,
13574
+ * `goal_created` (with `goal_id` while the goal exists, and its name as `text`) and
13575
+ * `alert` (with `alert_id`, what the alert found as `text`).
12723
13576
  * @enum {string}
12724
13577
  */
12725
- kind: "note" | "key_rotated" | "goal_created";
13578
+ kind: "note" | "key_rotated" | "goal_created" | "alert";
12726
13579
  /** Format: date */
12727
13580
  starts_on: string;
12728
13581
  /** Format: date */
@@ -12730,6 +13583,8 @@ export interface components {
12730
13583
  text: string;
12731
13584
  /** Format: uuid */
12732
13585
  goal_id?: string;
13586
+ /** Format: uuid */
13587
+ alert_id?: string;
12733
13588
  /**
12734
13589
  * Format: uuid
12735
13590
  * @description The member who wrote it; absent for Yuva's own, API keys and removed members.
@@ -12760,62 +13615,439 @@ export interface components {
12760
13615
  AnalyticsAnnotationList: {
12761
13616
  items: components["schemas"]["AnalyticsAnnotation"][];
12762
13617
  };
12763
- AnalyticsConsent: {
12764
- /**
12765
- * @description `1` when the visitor agreed to analytics.
12766
- * @enum {integer}
12767
- */
12768
- a?: 0 | 1;
12769
- };
12770
13618
  /**
12771
- * @description One event. Keys the server does not know are ignored, so newer scripts keep working with
12772
- * older servers.
13619
+ * @description Fixed rules, checked every hour over the property's finished hours and days:
13620
+ * `spike` and `drop`, page views of the last two finished hours at least three times, or at
13621
+ * most half, the same two hours' average over the seven days before (at least 20 views
13622
+ * a day in those hours); `goal_drop`, a goal's conversions yesterday at most half its
13623
+ * average of the seven days before (at least 10 a day); `support_load`, yesterday's
13624
+ * conversations per 1,000 page views at least twice the rate of the 28 days before, with at
13625
+ * least 5 conversations (a property linked to an inbox); `new_referrer`, a referring site with
13626
+ * at least 10 visits yesterday and none in the 28 days before. Each kind fires once per
13627
+ * property and day (`new_referrer` once per site).
13628
+ * @enum {string}
12773
13629
  */
12774
- AnalyticsEvent: {
13630
+ AnalyticsAlertKind: "spike" | "drop" | "goal_drop" | "support_load" | "new_referrer";
13631
+ /** @enum {string} */
13632
+ AnalyticsReportFrequency: "none" | "weekly" | "monthly";
13633
+ AnalyticsSubscription: {
13634
+ /** Format: uuid */
13635
+ property_id: string;
13636
+ report: components["schemas"]["AnalyticsReportFrequency"];
13637
+ alerts: components["schemas"]["AnalyticsAlertKind"][];
12775
13638
  /**
12776
- * @description `pageview`; `engagement` (sent once per view when the page is hidden or left); a built-in
12777
- * event: `outbound_click` (a link to another host, with prop `url`), `file_download` (a
12778
- * link to a file, with prop `url`), `not_found` (the page is the site's 404 page) or
12779
- * `chat_open` (the page's chat was opened); or a custom event's name, 1 to 120
12780
- * characters. `screen` and names starting with `$` or `yuva_` are reserved.
12781
- * @example pageview
12782
- * @example Signup
12783
- * @example outbound_click
13639
+ * Format: date-time
13640
+ * @description When the last scheduled report went out.
12784
13641
  */
12785
- n: string;
13642
+ last_report_at?: string;
12786
13643
  /**
12787
- * @description The page URL. Only the host and the path are kept; of the query, only `utm_source`,
12788
- * `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `ref` and `source` are read, into
12789
- * the visit's acquisition. Path segments shaped like e-mail addresses are stored as
12790
- * `:email`.
13644
+ * Format: date-time
13645
+ * @description Absent until the member chose.
12791
13646
  */
12792
- u: string;
12793
- /** @description `document.referrer`; only its host and path are kept, and none when it is the page's own host. */
12794
- r?: string;
12795
- /** @description Viewport width in CSS pixels, turned into a screen size class and not stored. */
12796
- w?: number;
12797
- /** @description The page uses hash routing, so the fragment is part of the path. */
12798
- h?: boolean;
12799
- /** @description `engagement` only: milliseconds the page was visible and focused, at most 30 minutes. */
12800
- ms?: number;
12801
- /** @description `engagement` only: the deepest scroll position reached, in percent. */
12802
- sd?: number;
13647
+ updated_at?: string;
13648
+ };
13649
+ AnalyticsSubscriptionUpdate: {
13650
+ report?: components["schemas"]["AnalyticsReportFrequency"];
13651
+ alerts?: components["schemas"]["AnalyticsAlertKind"][];
13652
+ };
13653
+ AnalyticsAlert: {
13654
+ /** Format: uuid */
13655
+ id: string;
13656
+ /** Format: uuid */
13657
+ property_id: string;
13658
+ kind: components["schemas"]["AnalyticsAlertKind"];
12803
13659
  /**
12804
- * @description Custom and built-in events only: up to 30 props. Keys have 1 to 300 characters and must
12805
- * not start with `$` or `yuva_`; values are strings, numbers or booleans, kept as text of
12806
- * at most 2,000 characters. A value shaped like an e-mail address is dropped (and counted
12807
- * as scrubbed); a children's property keeps no props but a built-in event's `url`. The
12808
- * `url` of `outbound_click` and `file_download` is kept without its query and fragment.
12809
- * @example {
12810
- * "plan": "pro",
12811
- * "seats": 3
12812
- * }
13660
+ * Format: date
13661
+ * @description The property's day the alert is about.
12813
13662
  */
12814
- p?: {
12815
- [key: string]: string | number | boolean;
12816
- };
12817
- $?: components["schemas"]["AnalyticsEventRevenue"];
12818
- /** @description `false` makes a custom event non-interactive, so a visit with only that event still bounces. */
13663
+ day: string;
13664
+ /**
13665
+ * Format: date-time
13666
+ * @description `spike` and `drop`: the start of the two hours.
13667
+ */
13668
+ hours_from?: string;
13669
+ /** Format: date-time */
13670
+ hours_to?: string;
13671
+ /** @description `pageviews`, `conversions`, `support_rate` or `visits`. */
13672
+ metric: string;
13673
+ /** Format: double */
13674
+ current: number;
13675
+ /**
13676
+ * Format: double
13677
+ * @description What the rule compared `current` with; 0 for a new referrer.
13678
+ */
13679
+ baseline: number;
13680
+ /** Format: uuid */
13681
+ goal_id?: string;
13682
+ goal_name?: string;
13683
+ /** @description `new_referrer`: the site's host. */
13684
+ referrer?: string;
13685
+ /** @description What was found, in English, as on the annotation. */
13686
+ text: string;
13687
+ /** Format: uuid */
13688
+ annotation_id?: string;
13689
+ /** Format: date-time */
13690
+ created_at: string;
13691
+ };
13692
+ AnalyticsAlertList: {
13693
+ items: components["schemas"]["AnalyticsAlert"][];
13694
+ };
13695
+ AnalyticsAlertEventData: {
13696
+ alert: components["schemas"]["AnalyticsAlert"];
13697
+ property: components["schemas"]["AnalyticsPropertyRef"];
13698
+ };
13699
+ AnalyticsPropertyRef: {
13700
+ /** Format: uuid */
13701
+ id: string;
13702
+ name: string;
13703
+ };
13704
+ /**
13705
+ * @description `analytics.alert`: a property raised an alert. Delivered to callers who hold
13706
+ * `analytics:read` and can see the property; `inbox_id` is the property's linked inbox.
13707
+ */
13708
+ AnalyticsAlertEvent: {
13709
+ /** Format: int64 */
13710
+ id: number;
13711
+ /**
13712
+ * @description discriminator enum property added by openapi-typescript
13713
+ * @enum {string}
13714
+ */
13715
+ type: "analytics.alert";
13716
+ /** Format: uuid */
13717
+ workspace_id: string;
13718
+ /** Format: uuid */
13719
+ inbox_id?: string;
13720
+ /** Format: date-time */
13721
+ created_at: string;
13722
+ data: components["schemas"]["AnalyticsAlertEventData"];
13723
+ };
13724
+ WebhookAnalyticsAlertPayload: components["schemas"]["WebhookPayloadBase"] & {
13725
+ data: components["schemas"]["AnalyticsAlertEventData"];
13726
+ };
13727
+ /**
13728
+ * @description A part of the property's report a share link shows: `overview` (totals and the chart),
13729
+ * `realtime`, `pages`, `sources`, `locations`, `devices`, `events`, `goals`.
13730
+ * @enum {string}
13731
+ */
13732
+ AnalyticsShareView: "overview" | "realtime" | "pages" | "sources" | "locations" | "devices" | "events" | "goals";
13733
+ /**
13734
+ * @description A site whose pages may frame the link: `https://` (or `http://`) and a host with an
13735
+ * optional port, nothing after it; `https://*.example.com` allows every subdomain.
13736
+ */
13737
+ AnalyticsEmbedOrigin: string;
13738
+ AnalyticsShare: {
13739
+ /** Format: uuid */
13740
+ id: string;
13741
+ /** Format: uuid */
13742
+ property_id: string;
13743
+ /** @description What the link is for, shown to members only. */
13744
+ name: string;
13745
+ views: components["schemas"]["AnalyticsShareView"][];
13746
+ has_password: boolean;
13747
+ embed_origins: components["schemas"]["AnalyticsEmbedOrigin"][];
13748
+ /** @description The first characters of the token, to tell links apart. */
13749
+ token_prefix: string;
13750
+ /** Format: date-time */
13751
+ expires_at?: string;
13752
+ /** Format: date-time */
13753
+ revoked_at?: string;
13754
+ /** @description Neither revoked nor expired. */
13755
+ active: boolean;
13756
+ /**
13757
+ * Format: date-time
13758
+ * @description The last time the link's page settings were read, to the minute.
13759
+ */
13760
+ last_viewed_at?: string;
13761
+ /**
13762
+ * Format: uuid
13763
+ * @description The member who made it; absent for API keys and removed members.
13764
+ */
13765
+ created_by?: string;
13766
+ /** Format: date-time */
13767
+ created_at: string;
13768
+ /** Format: date-time */
13769
+ updated_at: string;
13770
+ };
13771
+ AnalyticsShareCreated: {
13772
+ share: components["schemas"]["AnalyticsShare"];
13773
+ /** @description The link's token, `yuva_sh_…`; shown only in this answer. */
13774
+ token: string;
13775
+ /**
13776
+ * Format: uri
13777
+ * @description The share page, `<public URL>/share/<token>`.
13778
+ */
13779
+ url: string;
13780
+ };
13781
+ AnalyticsShareCreate: {
13782
+ name: string;
13783
+ views: components["schemas"]["AnalyticsShareView"][];
13784
+ password?: string;
13785
+ embed_origins?: components["schemas"]["AnalyticsEmbedOrigin"][];
13786
+ /**
13787
+ * Format: date-time
13788
+ * @description When the link stops working; in the future.
13789
+ */
13790
+ expires_at?: string;
13791
+ };
13792
+ AnalyticsShareUpdate: {
13793
+ name?: string;
13794
+ views?: components["schemas"]["AnalyticsShareView"][];
13795
+ /** @description A new password; `null` removes it. */
13796
+ password?: string | null;
13797
+ embed_origins?: components["schemas"]["AnalyticsEmbedOrigin"][];
13798
+ /**
13799
+ * Format: date-time
13800
+ * @description `null` keeps the link until it is revoked.
13801
+ */
13802
+ expires_at?: string | null;
13803
+ };
13804
+ AnalyticsShareList: {
13805
+ items: components["schemas"]["AnalyticsShare"][];
13806
+ };
13807
+ AnalyticsShareUnlock: {
13808
+ password: string;
13809
+ };
13810
+ AnalyticsShareAccess: {
13811
+ /** @description `yuva_sa_…`, sent as `Authorization: Bearer` to the link's other endpoints. */
13812
+ access_token: string;
13813
+ /** Format: date-time */
13814
+ expires_at: string;
13815
+ };
13816
+ AnalyticsSharedProperty: {
13817
+ name: string;
13818
+ timezone: string;
13819
+ currency: string;
13820
+ platforms: components["schemas"]["AnalyticsPlatform"][];
13821
+ };
13822
+ /**
13823
+ * @description With `password_required` and no valid access token only that field is present; otherwise
13824
+ * everything the page shows.
13825
+ */
13826
+ AnalyticsSharedPage: {
13827
+ password_required: boolean;
13828
+ /** @description The link's name. */
13829
+ name?: string;
13830
+ views?: components["schemas"]["AnalyticsShareView"][];
13831
+ property?: components["schemas"]["AnalyticsSharedProperty"];
13832
+ /** Format: date-time */
13833
+ expires_at?: string;
13834
+ /**
13835
+ * Format: date
13836
+ * @description The first day queries that need raw rows can serve.
13837
+ */
13838
+ raw_window_from?: string;
13839
+ /** @description With the `goals` view, the property's goals. */
13840
+ goals?: components["schemas"]["AnalyticsGoal"][];
13841
+ geoip?: components["schemas"]["AnalyticsGeoIP"];
13842
+ };
13843
+ /** @enum {string} */
13844
+ AnalyticsExportKind: "view" | "daily" | "raw";
13845
+ /** @enum {string} */
13846
+ AnalyticsExportFormat: "csv" | "ndjson";
13847
+ /**
13848
+ * @description `view` takes `query` (its own range; `compare`, `limit` and `cursor` are ignored); `daily`
13849
+ * and `raw` take `range`, `daily` also an optional `dimension` other than `event` and `prop`.
13850
+ * `format` is `csv` by default, and must be `ndjson` for `raw`.
13851
+ */
13852
+ AnalyticsExportCreate: {
13853
+ kind: components["schemas"]["AnalyticsExportKind"];
13854
+ format?: components["schemas"]["AnalyticsExportFormat"];
13855
+ query?: components["schemas"]["AnalyticsQuery"];
13856
+ range?: components["schemas"]["AnalyticsRange"];
13857
+ dimension?: components["schemas"]["AnalyticsFilterDimension"];
13858
+ };
13859
+ AnalyticsExport: {
13860
+ /** Format: uuid */
13861
+ id: string;
13862
+ /** Format: uuid */
13863
+ property_id: string;
13864
+ kind: components["schemas"]["AnalyticsExportKind"];
13865
+ format: components["schemas"]["AnalyticsExportFormat"];
13866
+ /** @enum {string} */
13867
+ status: "queued" | "running" | "done" | "failed";
13868
+ /** Format: date */
13869
+ from: string;
13870
+ /** Format: date */
13871
+ to: string;
13872
+ /** @description Percent of the work done. */
13873
+ progress: number;
13874
+ /**
13875
+ * Format: int64
13876
+ * @description Rows written so far.
13877
+ */
13878
+ rows: number;
13879
+ /** Format: int64 */
13880
+ size_bytes: number;
13881
+ /**
13882
+ * @description Why a `failed` export failed: `too_large`, `needs_raw_window`, `invalid_query` (with the
13883
+ * reason after a colon) or `internal`.
13884
+ */
13885
+ error?: string;
13886
+ /** @description The file's name, when it is `done`. */
13887
+ file_name?: string;
13888
+ /**
13889
+ * Format: uuid
13890
+ * @description The member who asked for it; absent for API keys and removed members.
13891
+ */
13892
+ created_by?: string;
13893
+ /** Format: date-time */
13894
+ created_at: string;
13895
+ /** Format: date-time */
13896
+ finished_at?: string;
13897
+ /**
13898
+ * Format: date-time
13899
+ * @description When the export and its file are deleted, seven days after it was made or finished.
13900
+ */
13901
+ expires_at: string;
13902
+ };
13903
+ AnalyticsExportList: {
13904
+ items: components["schemas"]["AnalyticsExport"][];
13905
+ };
13906
+ /**
13907
+ * @description One line of a `raw` export. `visit` counts up from 1 within the file and joins a visit's
13908
+ * events; it is not the stored visit and says nothing about the visitor. `type` is
13909
+ * `pageview`, `screen`, `event` or `engagement`. Places, devices and sources describe the
13910
+ * visit as its first event did.
13911
+ */
13912
+ AnalyticsRawEvent: {
13913
+ /** Format: date */
13914
+ day: string;
13915
+ /** Format: date-time */
13916
+ time: string;
13917
+ /** Format: int64 */
13918
+ visit: number;
13919
+ /** @enum {string} */
13920
+ type: "pageview" | "screen" | "event" | "engagement";
13921
+ name?: string;
13922
+ hostname: string;
13923
+ path: string;
13924
+ props?: {
13925
+ [key: string]: unknown;
13926
+ };
13927
+ /**
13928
+ * Format: int64
13929
+ * @description Revenue the event carried, in the currency's minor units.
13930
+ */
13931
+ revenue_minor?: number;
13932
+ currency?: string;
13933
+ engaged_ms?: number;
13934
+ scroll?: number;
13935
+ channel: string;
13936
+ source?: string;
13937
+ referrer?: string;
13938
+ utm_source?: string;
13939
+ utm_medium?: string;
13940
+ utm_campaign?: string;
13941
+ utm_term?: string;
13942
+ utm_content?: string;
13943
+ country?: string;
13944
+ region?: string;
13945
+ city?: string;
13946
+ device?: string;
13947
+ browser?: string;
13948
+ browser_version?: string;
13949
+ os?: string;
13950
+ os_version?: string;
13951
+ screen_size?: string;
13952
+ language?: string;
13953
+ platform: string;
13954
+ app_version?: string;
13955
+ };
13956
+ /**
13957
+ * @description What the visitor agreed to in the site's or app's own consent tool. `p` and `j` count only
13958
+ * with `a: 1`, on a property whose `consent_features` offer them; otherwise they are ignored
13959
+ * and the event is counted as in default mode.
13960
+ */
13961
+ AnalyticsConsent: {
13962
+ /**
13963
+ * @description `1` when the visitor agreed to analytics.
13964
+ * @enum {integer}
13965
+ */
13966
+ a?: 0 | 1;
13967
+ /**
13968
+ * @description The persistent id, for a visitor who also agreed to `persistent`: a random value of at
13969
+ * least 128 bits (a UUID or base64url) that the script or SDK keeps on the device for at
13970
+ * most 13 months from when it made it, and sends on every event, engagements included.
13971
+ * The server keeps only a keyed hash of it under the property's own secret, so the same
13972
+ * id means nothing on another property. With it the visitor counts once over several
13973
+ * days, is told apart as new or returning, enters retention cohorts and crosses days in
13974
+ * funnels. A value of the wrong shape is ignored.
13975
+ * @example 0f8fad5b-d9cb-469f-a165-70867728950e
13976
+ */
13977
+ p?: string;
13978
+ /**
13979
+ * @description An identity token of the property's linked inbox, signed by the host's backend as for
13980
+ * `/client/v1/session` (HS256, `sub`, `exp` at most 10 minutes ahead, a `jti` used once),
13981
+ * sent once after the user signs in, together with `p`, on a property that offers
13982
+ * `identify`. It links the persistent id, and its visits, to the contact; the contact is
13983
+ * found or made exactly as `/client/v1/session` does. A forged, expired or reused token is
13984
+ * ignored and the event is still counted.
13985
+ */
13986
+ j?: string;
13987
+ };
13988
+ /**
13989
+ * @description One event. Keys the server does not know are ignored, so newer scripts keep working with
13990
+ * older servers.
13991
+ */
13992
+ AnalyticsEvent: {
13993
+ /**
13994
+ * @description `pageview`; `engagement` (sent once per view when the page is hidden or left); a built-in
13995
+ * event: `outbound_click` (a link to another host, with prop `url`), `file_download` (a
13996
+ * link to a file, with prop `url`), `not_found` (the page is the site's 404 page) or
13997
+ * `chat_open` (the page's chat was opened); or a custom event's name, 1 to 120
13998
+ * characters. `screen` and names starting with `$` or `yuva_` are reserved.
13999
+ *
14000
+ * `yuva_consent` is not an event and is never stored or counted: it carries a change of
14001
+ * consent at once. With `c.a: 1`, `c.p` and `c.j` it identifies the visitor (see
14002
+ * `AnalyticsConsent`); with `c.a: 0` and `c.p` it withdraws: the persistent id's link to
14003
+ * a contact and its cohort days are deleted, so its visits leave the contact's page and
14004
+ * retention. A withdrawal is taken even with `Sec-GPC` or `DNT`.
14005
+ * @example pageview
14006
+ * @example Signup
14007
+ * @example outbound_click
14008
+ */
14009
+ n: string;
14010
+ /**
14011
+ * @description The page URL. Only the host and the path are kept; of the query, only `utm_source`,
14012
+ * `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`, `ref` and `source` are read, into
14013
+ * the visit's acquisition. Path segments shaped like e-mail addresses are stored as
14014
+ * `:email`. In an app, the screen: `app://<app id>/<screen>`, the screen's path
14015
+ * percent-encoded (`app://com.example.shop/Product%20Detail`), read the same way.
14016
+ */
14017
+ u: string;
14018
+ /**
14019
+ * Format: int64
14020
+ * @description Apps only: when the event happened, in milliseconds since the Unix epoch. Taken as now
14021
+ * when absent or in the future; an event older than 72 hours is dropped as `late`.
14022
+ * @example 1760263200000
14023
+ */
14024
+ t?: number;
14025
+ /** @description `document.referrer`; only its host and path are kept, and none when it is the page's own host. */
14026
+ r?: string;
14027
+ /** @description Viewport width in CSS pixels, turned into a screen size class and not stored. */
14028
+ w?: number;
14029
+ /** @description The page uses hash routing, so the fragment is part of the path. */
14030
+ h?: boolean;
14031
+ /** @description `engagement` only: milliseconds the page was visible and focused, at most 30 minutes. */
14032
+ ms?: number;
14033
+ /** @description `engagement` only: the deepest scroll position reached, in percent. */
14034
+ sd?: number;
14035
+ /**
14036
+ * @description Custom and built-in events only: up to 30 props. Keys have 1 to 300 characters and must
14037
+ * not start with `$` or `yuva_`; values are strings, numbers or booleans, kept as text of
14038
+ * at most 2,000 characters. A value shaped like an e-mail address is dropped (and counted
14039
+ * as scrubbed); a children's property keeps no props but a built-in event's `url`. The
14040
+ * `url` of `outbound_click` and `file_download` is kept without its query and fragment.
14041
+ * @example {
14042
+ * "plan": "pro",
14043
+ * "seats": 3
14044
+ * }
14045
+ */
14046
+ p?: {
14047
+ [key: string]: string | number | boolean;
14048
+ };
14049
+ $?: components["schemas"]["AnalyticsEventRevenue"];
14050
+ /** @description `false` makes a custom event non-interactive, so a visit with only that event still bounces. */
12819
14051
  i?: boolean;
12820
14052
  c?: components["schemas"]["AnalyticsConsent"];
12821
14053
  };
@@ -12833,9 +14065,52 @@ export interface components {
12833
14065
  /** @example EUR */
12834
14066
  c: string;
12835
14067
  };
14068
+ /** @description Up to 100 events. Apps also send `k` and `a`, and one request per process key. */
12836
14069
  AnalyticsEventBatch: {
14070
+ /**
14071
+ * @description Apps only, required there: the process key, a random value (at least 128 bits, such as
14072
+ * a UUID) the app makes at launch and keeps in memory only, never on disk. It stands for
14073
+ * the visitor in place of the address: a relaunch makes a new key, so a new visitor and
14074
+ * visit. Queued events keep the key of the process that recorded them.
14075
+ * @example 0f8fad5b-d9cb-469f-a165-70867728950e
14076
+ */
14077
+ k?: string;
14078
+ a?: components["schemas"]["AnalyticsApp"];
12837
14079
  e: components["schemas"]["AnalyticsEvent"][];
12838
14080
  };
14081
+ /**
14082
+ * @description Apps only, required there: the app that sent the events, describing a visit it starts.
14083
+ * Nothing here identifies a device.
14084
+ */
14085
+ AnalyticsApp: {
14086
+ /** @enum {string} */
14087
+ platform: "ios" | "android";
14088
+ /**
14089
+ * @description The app's version as users see it (`CFBundleShortVersionString`, `versionName`), the `app_version` dimension.
14090
+ * @example 2.3.1
14091
+ */
14092
+ version?: string;
14093
+ /**
14094
+ * @description The OS version; its major number is kept (`os_version` dimension `iOS 18`).
14095
+ * @example 18.1
14096
+ */
14097
+ os_version?: string;
14098
+ /**
14099
+ * @description `tablet` for iPads and Android tablets, `desktop` for Mac and ChromeOS.
14100
+ * @enum {string}
14101
+ */
14102
+ device?: "mobile" | "tablet" | "desktop";
14103
+ /**
14104
+ * @description Screen width in points or dp, turned into a screen size class and not stored.
14105
+ * @example 390
14106
+ */
14107
+ width?: number;
14108
+ /**
14109
+ * @description The app's language as a BCP 47 tag; only its primary language is kept. `Accept-Language` when absent.
14110
+ * @example tr-TR
14111
+ */
14112
+ language?: string;
14113
+ };
12839
14114
  /** @description One event, or up to 100 in `e`. */
12840
14115
  AnalyticsBatch: components["schemas"]["AnalyticsEvent"] | components["schemas"]["AnalyticsEventBatch"];
12841
14116
  IngressResult: {
@@ -13667,6 +14942,10 @@ export interface components {
13667
14942
  AnalyticsGoalId: string;
13668
14943
  AnalyticsFunnelId: string;
13669
14944
  AnalyticsSegmentId: string;
14945
+ AnalyticsShareId: string;
14946
+ AnalyticsExportId: string;
14947
+ /** @description The share link's token, `yuva_sh_…`. */
14948
+ AnalyticsShareToken: string;
13670
14949
  AnalyticsAnnotationId: string;
13671
14950
  ListId: string;
13672
14951
  MigrationId: string;
@@ -15962,9 +17241,13 @@ export interface operations {
15962
17241
  404: components["responses"]["Problem"];
15963
17242
  };
15964
17243
  };
15965
- listContactSubscriptions: {
17244
+ listContactVisits: {
15966
17245
  parameters: {
15967
- query?: never;
17246
+ query?: {
17247
+ limit?: number;
17248
+ /** @description `next_cursor` of the previous page. */
17249
+ cursor?: string;
17250
+ };
15968
17251
  header?: {
15969
17252
  /** @description The workspace to act on; see "Workspace selection". */
15970
17253
  "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
@@ -15976,26 +17259,55 @@ export interface operations {
15976
17259
  };
15977
17260
  requestBody?: never;
15978
17261
  responses: {
15979
- /** @description The subscriptions, newest first. */
17262
+ /** @description The visits, newest first. */
15980
17263
  200: {
15981
17264
  headers: {
15982
17265
  [name: string]: unknown;
15983
17266
  };
15984
17267
  content: {
15985
- "application/json": components["schemas"]["ContactSubscriptionList"];
17268
+ "application/json": components["schemas"]["AnalyticsContactVisitList"];
15986
17269
  };
15987
17270
  };
17271
+ 400: components["responses"]["Problem"];
15988
17272
  401: components["responses"]["Problem"];
15989
17273
  403: components["responses"]["Problem"];
15990
17274
  404: components["responses"]["Problem"];
15991
17275
  };
15992
17276
  };
15993
- exportContactConsent: {
17277
+ listContactSubscriptions: {
15994
17278
  parameters: {
15995
- query?: {
15996
- /** @description `csv` (the default) or `json`. */
15997
- format?: components["parameters"]["ConsentFormat"];
15998
- };
17279
+ query?: never;
17280
+ header?: {
17281
+ /** @description The workspace to act on; see "Workspace selection". */
17282
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
17283
+ };
17284
+ path: {
17285
+ contactId: components["parameters"]["ContactId"];
17286
+ };
17287
+ cookie?: never;
17288
+ };
17289
+ requestBody?: never;
17290
+ responses: {
17291
+ /** @description The subscriptions, newest first. */
17292
+ 200: {
17293
+ headers: {
17294
+ [name: string]: unknown;
17295
+ };
17296
+ content: {
17297
+ "application/json": components["schemas"]["ContactSubscriptionList"];
17298
+ };
17299
+ };
17300
+ 401: components["responses"]["Problem"];
17301
+ 403: components["responses"]["Problem"];
17302
+ 404: components["responses"]["Problem"];
17303
+ };
17304
+ };
17305
+ exportContactConsent: {
17306
+ parameters: {
17307
+ query?: {
17308
+ /** @description `csv` (the default) or `json`. */
17309
+ format?: components["parameters"]["ConsentFormat"];
17310
+ };
15999
17311
  header?: {
16000
17312
  /** @description The workspace to act on; see "Workspace selection". */
16001
17313
  "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
@@ -20909,6 +22221,110 @@ export interface operations {
20909
22221
  429: components["responses"]["Problem"];
20910
22222
  };
20911
22223
  };
22224
+ sendAnalyticsEvents: {
22225
+ parameters: {
22226
+ query?: never;
22227
+ header?: never;
22228
+ path: {
22229
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
22230
+ };
22231
+ cookie?: never;
22232
+ };
22233
+ requestBody: {
22234
+ content: {
22235
+ "application/json": components["schemas"]["AnalyticsServerEvents"];
22236
+ };
22237
+ };
22238
+ responses: {
22239
+ /** @description Taken; stored unless one of the rules above dropped them. */
22240
+ 202: {
22241
+ headers: {
22242
+ [name: string]: unknown;
22243
+ };
22244
+ content: {
22245
+ "application/json": components["schemas"]["AnalyticsEventsResult"];
22246
+ };
22247
+ };
22248
+ 400: components["responses"]["Problem"];
22249
+ 401: components["responses"]["Problem"];
22250
+ 403: components["responses"]["Problem"];
22251
+ 404: components["responses"]["Problem"];
22252
+ 503: components["responses"]["Problem"];
22253
+ };
22254
+ };
22255
+ getAnalyticsRetention: {
22256
+ parameters: {
22257
+ query?: {
22258
+ /** @description `week` when absent. */
22259
+ grain?: "day" | "week" | "month";
22260
+ /** @description The first cohort's day; 30 days, 12 weeks or 12 months before today when absent. */
22261
+ from?: string;
22262
+ /** @description The last cohort's day; today when absent. */
22263
+ to?: string;
22264
+ };
22265
+ header?: {
22266
+ /** @description The workspace to act on; see "Workspace selection". */
22267
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
22268
+ };
22269
+ path: {
22270
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
22271
+ };
22272
+ cookie?: never;
22273
+ };
22274
+ requestBody?: never;
22275
+ responses: {
22276
+ /** @description The cohorts, oldest first. */
22277
+ 200: {
22278
+ headers: {
22279
+ [name: string]: unknown;
22280
+ };
22281
+ content: {
22282
+ "application/json": components["schemas"]["AnalyticsRetention"];
22283
+ };
22284
+ };
22285
+ 400: components["responses"]["Problem"];
22286
+ 401: components["responses"]["Problem"];
22287
+ 403: components["responses"]["Problem"];
22288
+ 404: components["responses"]["Problem"];
22289
+ /** @description `range_too_large`: `from` and `to` are more than 400 days apart. */
22290
+ 422: {
22291
+ headers: {
22292
+ [name: string]: unknown;
22293
+ };
22294
+ content: {
22295
+ "application/problem+json": components["schemas"]["Problem"];
22296
+ };
22297
+ };
22298
+ };
22299
+ };
22300
+ deleteAnalyticsVisitor: {
22301
+ parameters: {
22302
+ query?: never;
22303
+ header?: {
22304
+ /** @description The workspace to act on; see "Workspace selection". */
22305
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
22306
+ };
22307
+ path: {
22308
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
22309
+ persistentId: string;
22310
+ };
22311
+ cookie?: never;
22312
+ };
22313
+ requestBody?: never;
22314
+ responses: {
22315
+ /** @description Nothing is stored under the id any more. */
22316
+ 204: {
22317
+ headers: {
22318
+ [name: string]: unknown;
22319
+ };
22320
+ content?: never;
22321
+ };
22322
+ 400: components["responses"]["Problem"];
22323
+ 401: components["responses"]["Problem"];
22324
+ 403: components["responses"]["Problem"];
22325
+ 404: components["responses"]["Problem"];
22326
+ };
22327
+ };
20912
22328
  getAnalyticsHealth: {
20913
22329
  parameters: {
20914
22330
  query?: {
@@ -21493,84 +22909,88 @@ export interface operations {
21493
22909
  404: components["responses"]["Problem"];
21494
22910
  };
21495
22911
  };
21496
- realtime: {
22912
+ getAnalyticsSubscription: {
21497
22913
  parameters: {
21498
- query?: {
21499
- /** @description The workspace to act on, for clients that cannot send `Yuva-Workspace`. */
21500
- workspace_id?: string;
21501
- /** @description Replay the events after this one before streaming live ones. */
21502
- last_event_id?: number;
21503
- };
22914
+ query?: never;
21504
22915
  header?: {
21505
22916
  /** @description The workspace to act on; see "Workspace selection". */
21506
22917
  "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
21507
22918
  };
21508
- path?: never;
22919
+ path: {
22920
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
22921
+ };
21509
22922
  cookie?: never;
21510
22923
  };
21511
22924
  requestBody?: never;
21512
22925
  responses: {
21513
- /**
21514
- * @description Switching to the WebSocket protocol. Each text frame is one `RealtimeMessage`; the
21515
- * content below describes a frame, not an HTTP body.
21516
- */
21517
- 101: {
22926
+ /** @description The subscription. */
22927
+ 200: {
21518
22928
  headers: {
21519
22929
  [name: string]: unknown;
21520
22930
  };
21521
22931
  content: {
21522
- "application/json": components["schemas"]["RealtimeMessage"];
22932
+ "application/json": components["schemas"]["AnalyticsSubscription"];
21523
22933
  };
21524
22934
  };
21525
22935
  400: components["responses"]["Problem"];
21526
22936
  401: components["responses"]["Problem"];
21527
22937
  403: components["responses"]["Problem"];
21528
- 503: components["responses"]["Problem"];
22938
+ 404: components["responses"]["Problem"];
21529
22939
  };
21530
22940
  };
21531
- getClientSession: {
22941
+ updateAnalyticsSubscription: {
21532
22942
  parameters: {
21533
22943
  query?: never;
21534
- header?: never;
21535
- path?: never;
22944
+ header?: {
22945
+ /** @description The workspace to act on; see "Workspace selection". */
22946
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
22947
+ };
22948
+ path: {
22949
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
22950
+ };
21536
22951
  cookie?: never;
21537
22952
  };
21538
- requestBody?: never;
22953
+ requestBody: {
22954
+ content: {
22955
+ "application/json": components["schemas"]["AnalyticsSubscriptionUpdate"];
22956
+ };
22957
+ };
21539
22958
  responses: {
21540
- /** @description The session. */
22959
+ /** @description The subscription. */
21541
22960
  200: {
21542
22961
  headers: {
21543
22962
  [name: string]: unknown;
21544
22963
  };
21545
22964
  content: {
21546
- "application/json": components["schemas"]["ClientSessionInfo"];
22965
+ "application/json": components["schemas"]["AnalyticsSubscription"];
21547
22966
  };
21548
22967
  };
22968
+ 400: components["responses"]["Problem"];
21549
22969
  401: components["responses"]["Problem"];
21550
22970
  403: components["responses"]["Problem"];
22971
+ 404: components["responses"]["Problem"];
21551
22972
  };
21552
22973
  };
21553
- createClientSession: {
22974
+ sendAnalyticsReport: {
21554
22975
  parameters: {
21555
22976
  query?: never;
21556
- header?: never;
21557
- path?: never;
21558
- cookie?: never;
21559
- };
21560
- requestBody: {
21561
- content: {
21562
- "application/json": components["schemas"]["ClientSessionCreate"];
22977
+ header?: {
22978
+ /** @description The workspace to act on; see "Workspace selection". */
22979
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
22980
+ };
22981
+ path: {
22982
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
21563
22983
  };
22984
+ cookie?: never;
21564
22985
  };
22986
+ requestBody?: never;
21565
22987
  responses: {
21566
- /** @description The session, the contact and the inbox's public settings. */
21567
- 201: {
22988
+ /** @description The report is on its way. */
22989
+ 202: {
21568
22990
  headers: {
21569
22991
  [name: string]: unknown;
21570
22992
  };
21571
- content: {
21572
- "application/json": components["schemas"]["ClientSession"];
21573
- };
22993
+ content?: never;
21574
22994
  };
21575
22995
  400: components["responses"]["Problem"];
21576
22996
  401: components["responses"]["Problem"];
@@ -21579,96 +22999,533 @@ export interface operations {
21579
22999
  429: components["responses"]["Problem"];
21580
23000
  };
21581
23001
  };
21582
- deleteClientSession: {
23002
+ listAnalyticsAlerts: {
21583
23003
  parameters: {
21584
- query?: never;
21585
- header?: never;
21586
- path?: never;
23004
+ query?: {
23005
+ /** @description `created_at` of the last alert of the previous page. */
23006
+ before?: string;
23007
+ };
23008
+ header?: {
23009
+ /** @description The workspace to act on; see "Workspace selection". */
23010
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23011
+ };
23012
+ path: {
23013
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
23014
+ };
21587
23015
  cookie?: never;
21588
23016
  };
21589
23017
  requestBody?: never;
21590
23018
  responses: {
21591
- /** @description Ended. */
21592
- 204: {
23019
+ /** @description The alerts. */
23020
+ 200: {
21593
23021
  headers: {
21594
23022
  [name: string]: unknown;
21595
23023
  };
21596
- content?: never;
23024
+ content: {
23025
+ "application/json": components["schemas"]["AnalyticsAlertList"];
23026
+ };
21597
23027
  };
23028
+ 400: components["responses"]["Problem"];
21598
23029
  401: components["responses"]["Problem"];
21599
23030
  403: components["responses"]["Problem"];
23031
+ 404: components["responses"]["Problem"];
21600
23032
  };
21601
23033
  };
21602
- getClientChannel: {
23034
+ listAnalyticsShares: {
21603
23035
  parameters: {
21604
23036
  query?: never;
21605
- header?: never;
23037
+ header?: {
23038
+ /** @description The workspace to act on; see "Workspace selection". */
23039
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23040
+ };
21606
23041
  path: {
21607
- /** @description The chat or app channel's public key. */
21608
- channel_key: string;
23042
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
21609
23043
  };
21610
23044
  cookie?: never;
21611
23045
  };
21612
23046
  requestBody?: never;
21613
23047
  responses: {
21614
- /** @description The inbox's public settings. */
23048
+ /** @description The share links. */
21615
23049
  200: {
21616
23050
  headers: {
21617
23051
  [name: string]: unknown;
21618
23052
  };
21619
23053
  content: {
21620
- "application/json": components["schemas"]["ClientInbox"];
23054
+ "application/json": components["schemas"]["AnalyticsShareList"];
21621
23055
  };
21622
23056
  };
23057
+ 401: components["responses"]["Problem"];
21623
23058
  403: components["responses"]["Problem"];
21624
23059
  404: components["responses"]["Problem"];
21625
- 429: components["responses"]["Problem"];
21626
23060
  };
21627
23061
  };
21628
- createPageRating: {
23062
+ createAnalyticsShare: {
21629
23063
  parameters: {
21630
23064
  query?: never;
21631
- header?: never;
23065
+ header?: {
23066
+ /** @description Makes a retried request return the first response; see "Idempotency". */
23067
+ "Idempotency-Key"?: components["parameters"]["IdempotencyKey"];
23068
+ /** @description The workspace to act on; see "Workspace selection". */
23069
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23070
+ };
21632
23071
  path: {
21633
- /** @description The chat channel's public key. */
21634
- channel_key: components["parameters"]["ChannelKey"];
23072
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
21635
23073
  };
21636
23074
  cookie?: never;
21637
23075
  };
21638
23076
  requestBody: {
21639
23077
  content: {
21640
- "application/json": components["schemas"]["PageRatingCreate"];
23078
+ "application/json": components["schemas"]["AnalyticsShareCreate"];
21641
23079
  };
21642
23080
  };
21643
23081
  responses: {
21644
- /** @description Counted. */
21645
- 204: {
23082
+ /** @description The link with its token, shown only now. */
23083
+ 201: {
21646
23084
  headers: {
21647
23085
  [name: string]: unknown;
21648
23086
  };
21649
- content?: never;
23087
+ content: {
23088
+ "application/json": components["schemas"]["AnalyticsShareCreated"];
23089
+ };
21650
23090
  };
21651
23091
  400: components["responses"]["Problem"];
23092
+ 401: components["responses"]["Problem"];
21652
23093
  403: components["responses"]["Problem"];
21653
23094
  404: components["responses"]["Problem"];
21654
- 429: components["responses"]["Problem"];
21655
23095
  };
21656
23096
  };
21657
- listClientDiscussions: {
23097
+ deleteAnalyticsShare: {
21658
23098
  parameters: {
21659
- query: {
21660
- /** @description The page's URL. */
21661
- page: string;
21662
- sort?: components["schemas"]["DiscussionSort"];
21663
- /** @description The `next_cursor` of the previous page. */
21664
- cursor?: components["parameters"]["Cursor"];
21665
- /** @description Page size, 1 to 100; 25 by default. */
21666
- limit?: components["parameters"]["Limit"];
23099
+ query?: never;
23100
+ header?: {
23101
+ /** @description The workspace to act on; see "Workspace selection". */
23102
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
21667
23103
  };
21668
- header?: never;
21669
23104
  path: {
21670
- /** @description The chat channel's public key. */
21671
- channel_key: components["parameters"]["ChannelKey"];
23105
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
23106
+ shareId: components["parameters"]["AnalyticsShareId"];
23107
+ };
23108
+ cookie?: never;
23109
+ };
23110
+ requestBody?: never;
23111
+ responses: {
23112
+ /** @description Deleted. */
23113
+ 204: {
23114
+ headers: {
23115
+ [name: string]: unknown;
23116
+ };
23117
+ content?: never;
23118
+ };
23119
+ 401: components["responses"]["Problem"];
23120
+ 403: components["responses"]["Problem"];
23121
+ 404: components["responses"]["Problem"];
23122
+ };
23123
+ };
23124
+ updateAnalyticsShare: {
23125
+ parameters: {
23126
+ query?: never;
23127
+ header?: {
23128
+ /** @description The workspace to act on; see "Workspace selection". */
23129
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23130
+ };
23131
+ path: {
23132
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
23133
+ shareId: components["parameters"]["AnalyticsShareId"];
23134
+ };
23135
+ cookie?: never;
23136
+ };
23137
+ requestBody: {
23138
+ content: {
23139
+ "application/json": components["schemas"]["AnalyticsShareUpdate"];
23140
+ };
23141
+ };
23142
+ responses: {
23143
+ /** @description The updated link. */
23144
+ 200: {
23145
+ headers: {
23146
+ [name: string]: unknown;
23147
+ };
23148
+ content: {
23149
+ "application/json": components["schemas"]["AnalyticsShare"];
23150
+ };
23151
+ };
23152
+ 400: components["responses"]["Problem"];
23153
+ 401: components["responses"]["Problem"];
23154
+ 403: components["responses"]["Problem"];
23155
+ 404: components["responses"]["Problem"];
23156
+ 409: components["responses"]["Problem"];
23157
+ };
23158
+ };
23159
+ revokeAnalyticsShare: {
23160
+ parameters: {
23161
+ query?: never;
23162
+ header?: {
23163
+ /** @description The workspace to act on; see "Workspace selection". */
23164
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23165
+ };
23166
+ path: {
23167
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
23168
+ shareId: components["parameters"]["AnalyticsShareId"];
23169
+ };
23170
+ cookie?: never;
23171
+ };
23172
+ requestBody?: never;
23173
+ responses: {
23174
+ /** @description The revoked link. */
23175
+ 200: {
23176
+ headers: {
23177
+ [name: string]: unknown;
23178
+ };
23179
+ content: {
23180
+ "application/json": components["schemas"]["AnalyticsShare"];
23181
+ };
23182
+ };
23183
+ 401: components["responses"]["Problem"];
23184
+ 403: components["responses"]["Problem"];
23185
+ 404: components["responses"]["Problem"];
23186
+ };
23187
+ };
23188
+ listAnalyticsExports: {
23189
+ parameters: {
23190
+ query?: never;
23191
+ header?: {
23192
+ /** @description The workspace to act on; see "Workspace selection". */
23193
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23194
+ };
23195
+ path: {
23196
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
23197
+ };
23198
+ cookie?: never;
23199
+ };
23200
+ requestBody?: never;
23201
+ responses: {
23202
+ /** @description The exports. */
23203
+ 200: {
23204
+ headers: {
23205
+ [name: string]: unknown;
23206
+ };
23207
+ content: {
23208
+ "application/json": components["schemas"]["AnalyticsExportList"];
23209
+ };
23210
+ };
23211
+ 401: components["responses"]["Problem"];
23212
+ 403: components["responses"]["Problem"];
23213
+ 404: components["responses"]["Problem"];
23214
+ };
23215
+ };
23216
+ createAnalyticsExport: {
23217
+ parameters: {
23218
+ query?: never;
23219
+ header?: {
23220
+ /** @description Makes a retried request return the first response; see "Idempotency". */
23221
+ "Idempotency-Key"?: components["parameters"]["IdempotencyKey"];
23222
+ /** @description The workspace to act on; see "Workspace selection". */
23223
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23224
+ };
23225
+ path: {
23226
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
23227
+ };
23228
+ cookie?: never;
23229
+ };
23230
+ requestBody: {
23231
+ content: {
23232
+ "application/json": components["schemas"]["AnalyticsExportCreate"];
23233
+ };
23234
+ };
23235
+ responses: {
23236
+ /** @description The export, queued. */
23237
+ 202: {
23238
+ headers: {
23239
+ [name: string]: unknown;
23240
+ };
23241
+ content: {
23242
+ "application/json": components["schemas"]["AnalyticsExport"];
23243
+ };
23244
+ };
23245
+ 400: components["responses"]["Problem"];
23246
+ 401: components["responses"]["Problem"];
23247
+ 403: components["responses"]["Problem"];
23248
+ 404: components["responses"]["Problem"];
23249
+ /** @description `needs_raw_window` or `range_too_large`: the range cannot be exported. */
23250
+ 422: {
23251
+ headers: {
23252
+ [name: string]: unknown;
23253
+ };
23254
+ content: {
23255
+ "application/problem+json": components["schemas"]["AnalyticsRangeProblem"];
23256
+ };
23257
+ };
23258
+ 429: components["responses"]["Problem"];
23259
+ };
23260
+ };
23261
+ getAnalyticsExport: {
23262
+ parameters: {
23263
+ query?: never;
23264
+ header?: {
23265
+ /** @description The workspace to act on; see "Workspace selection". */
23266
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23267
+ };
23268
+ path: {
23269
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
23270
+ exportId: components["parameters"]["AnalyticsExportId"];
23271
+ };
23272
+ cookie?: never;
23273
+ };
23274
+ requestBody?: never;
23275
+ responses: {
23276
+ /** @description The export. */
23277
+ 200: {
23278
+ headers: {
23279
+ [name: string]: unknown;
23280
+ };
23281
+ content: {
23282
+ "application/json": components["schemas"]["AnalyticsExport"];
23283
+ };
23284
+ };
23285
+ 401: components["responses"]["Problem"];
23286
+ 403: components["responses"]["Problem"];
23287
+ 404: components["responses"]["Problem"];
23288
+ };
23289
+ };
23290
+ deleteAnalyticsExport: {
23291
+ parameters: {
23292
+ query?: never;
23293
+ header?: {
23294
+ /** @description The workspace to act on; see "Workspace selection". */
23295
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23296
+ };
23297
+ path: {
23298
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
23299
+ exportId: components["parameters"]["AnalyticsExportId"];
23300
+ };
23301
+ cookie?: never;
23302
+ };
23303
+ requestBody?: never;
23304
+ responses: {
23305
+ /** @description Deleted. */
23306
+ 204: {
23307
+ headers: {
23308
+ [name: string]: unknown;
23309
+ };
23310
+ content?: never;
23311
+ };
23312
+ 401: components["responses"]["Problem"];
23313
+ 403: components["responses"]["Problem"];
23314
+ 404: components["responses"]["Problem"];
23315
+ };
23316
+ };
23317
+ downloadAnalyticsExport: {
23318
+ parameters: {
23319
+ query?: {
23320
+ /** @description The workspace to act on, for links that cannot send `Yuva-Workspace`. */
23321
+ workspace_id?: string;
23322
+ };
23323
+ header?: {
23324
+ /** @description The workspace to act on; see "Workspace selection". */
23325
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23326
+ };
23327
+ path: {
23328
+ propertyId: components["parameters"]["AnalyticsPropertyId"];
23329
+ exportId: components["parameters"]["AnalyticsExportId"];
23330
+ };
23331
+ cookie?: never;
23332
+ };
23333
+ requestBody?: never;
23334
+ responses: {
23335
+ /** @description The file. NDJSON has one JSON object per line, `AnalyticsRawEvent` for `raw`. */
23336
+ 200: {
23337
+ headers: {
23338
+ "Content-Disposition"?: string;
23339
+ [name: string]: unknown;
23340
+ };
23341
+ content: {
23342
+ "text/csv": string;
23343
+ "application/x-ndjson": components["schemas"]["AnalyticsRawEvent"];
23344
+ };
23345
+ };
23346
+ 400: components["responses"]["Problem"];
23347
+ 401: components["responses"]["Problem"];
23348
+ 403: components["responses"]["Problem"];
23349
+ 404: components["responses"]["Problem"];
23350
+ 409: components["responses"]["Problem"];
23351
+ };
23352
+ };
23353
+ realtime: {
23354
+ parameters: {
23355
+ query?: {
23356
+ /** @description The workspace to act on, for clients that cannot send `Yuva-Workspace`. */
23357
+ workspace_id?: string;
23358
+ /** @description Replay the events after this one before streaming live ones. */
23359
+ last_event_id?: number;
23360
+ };
23361
+ header?: {
23362
+ /** @description The workspace to act on; see "Workspace selection". */
23363
+ "Yuva-Workspace"?: components["parameters"]["WorkspaceHeader"];
23364
+ };
23365
+ path?: never;
23366
+ cookie?: never;
23367
+ };
23368
+ requestBody?: never;
23369
+ responses: {
23370
+ /**
23371
+ * @description Switching to the WebSocket protocol. Each text frame is one `RealtimeMessage`; the
23372
+ * content below describes a frame, not an HTTP body.
23373
+ */
23374
+ 101: {
23375
+ headers: {
23376
+ [name: string]: unknown;
23377
+ };
23378
+ content: {
23379
+ "application/json": components["schemas"]["RealtimeMessage"];
23380
+ };
23381
+ };
23382
+ 400: components["responses"]["Problem"];
23383
+ 401: components["responses"]["Problem"];
23384
+ 403: components["responses"]["Problem"];
23385
+ 503: components["responses"]["Problem"];
23386
+ };
23387
+ };
23388
+ getClientSession: {
23389
+ parameters: {
23390
+ query?: never;
23391
+ header?: never;
23392
+ path?: never;
23393
+ cookie?: never;
23394
+ };
23395
+ requestBody?: never;
23396
+ responses: {
23397
+ /** @description The session. */
23398
+ 200: {
23399
+ headers: {
23400
+ [name: string]: unknown;
23401
+ };
23402
+ content: {
23403
+ "application/json": components["schemas"]["ClientSessionInfo"];
23404
+ };
23405
+ };
23406
+ 401: components["responses"]["Problem"];
23407
+ 403: components["responses"]["Problem"];
23408
+ };
23409
+ };
23410
+ createClientSession: {
23411
+ parameters: {
23412
+ query?: never;
23413
+ header?: never;
23414
+ path?: never;
23415
+ cookie?: never;
23416
+ };
23417
+ requestBody: {
23418
+ content: {
23419
+ "application/json": components["schemas"]["ClientSessionCreate"];
23420
+ };
23421
+ };
23422
+ responses: {
23423
+ /** @description The session, the contact and the inbox's public settings. */
23424
+ 201: {
23425
+ headers: {
23426
+ [name: string]: unknown;
23427
+ };
23428
+ content: {
23429
+ "application/json": components["schemas"]["ClientSession"];
23430
+ };
23431
+ };
23432
+ 400: components["responses"]["Problem"];
23433
+ 401: components["responses"]["Problem"];
23434
+ 403: components["responses"]["Problem"];
23435
+ 404: components["responses"]["Problem"];
23436
+ 429: components["responses"]["Problem"];
23437
+ };
23438
+ };
23439
+ deleteClientSession: {
23440
+ parameters: {
23441
+ query?: never;
23442
+ header?: never;
23443
+ path?: never;
23444
+ cookie?: never;
23445
+ };
23446
+ requestBody?: never;
23447
+ responses: {
23448
+ /** @description Ended. */
23449
+ 204: {
23450
+ headers: {
23451
+ [name: string]: unknown;
23452
+ };
23453
+ content?: never;
23454
+ };
23455
+ 401: components["responses"]["Problem"];
23456
+ 403: components["responses"]["Problem"];
23457
+ };
23458
+ };
23459
+ getClientChannel: {
23460
+ parameters: {
23461
+ query?: never;
23462
+ header?: never;
23463
+ path: {
23464
+ /** @description The chat or app channel's public key. */
23465
+ channel_key: string;
23466
+ };
23467
+ cookie?: never;
23468
+ };
23469
+ requestBody?: never;
23470
+ responses: {
23471
+ /** @description The inbox's public settings. */
23472
+ 200: {
23473
+ headers: {
23474
+ [name: string]: unknown;
23475
+ };
23476
+ content: {
23477
+ "application/json": components["schemas"]["ClientInbox"];
23478
+ };
23479
+ };
23480
+ 403: components["responses"]["Problem"];
23481
+ 404: components["responses"]["Problem"];
23482
+ 429: components["responses"]["Problem"];
23483
+ };
23484
+ };
23485
+ createPageRating: {
23486
+ parameters: {
23487
+ query?: never;
23488
+ header?: never;
23489
+ path: {
23490
+ /** @description The chat channel's public key. */
23491
+ channel_key: components["parameters"]["ChannelKey"];
23492
+ };
23493
+ cookie?: never;
23494
+ };
23495
+ requestBody: {
23496
+ content: {
23497
+ "application/json": components["schemas"]["PageRatingCreate"];
23498
+ };
23499
+ };
23500
+ responses: {
23501
+ /** @description Counted. */
23502
+ 204: {
23503
+ headers: {
23504
+ [name: string]: unknown;
23505
+ };
23506
+ content?: never;
23507
+ };
23508
+ 400: components["responses"]["Problem"];
23509
+ 403: components["responses"]["Problem"];
23510
+ 404: components["responses"]["Problem"];
23511
+ 429: components["responses"]["Problem"];
23512
+ };
23513
+ };
23514
+ listClientDiscussions: {
23515
+ parameters: {
23516
+ query: {
23517
+ /** @description The page's URL. */
23518
+ page: string;
23519
+ sort?: components["schemas"]["DiscussionSort"];
23520
+ /** @description The `next_cursor` of the previous page. */
23521
+ cursor?: components["parameters"]["Cursor"];
23522
+ /** @description Page size, 1 to 100; 25 by default. */
23523
+ limit?: components["parameters"]["Limit"];
23524
+ };
23525
+ header?: never;
23526
+ path: {
23527
+ /** @description The chat channel's public key. */
23528
+ channel_key: components["parameters"]["ChannelKey"];
21672
23529
  };
21673
23530
  cookie?: never;
21674
23531
  };
@@ -22530,6 +24387,132 @@ export interface operations {
22530
24387
  503: components["responses"]["Problem"];
22531
24388
  };
22532
24389
  };
24390
+ getSharedAnalytics: {
24391
+ parameters: {
24392
+ query?: never;
24393
+ header?: never;
24394
+ path: {
24395
+ /** @description The share link's token, `yuva_sh_…`. */
24396
+ token: components["parameters"]["AnalyticsShareToken"];
24397
+ };
24398
+ cookie?: never;
24399
+ };
24400
+ requestBody?: never;
24401
+ responses: {
24402
+ /** @description The link's page settings. */
24403
+ 200: {
24404
+ headers: {
24405
+ [name: string]: unknown;
24406
+ };
24407
+ content: {
24408
+ "application/json": components["schemas"]["AnalyticsSharedPage"];
24409
+ };
24410
+ };
24411
+ 401: components["responses"]["Problem"];
24412
+ 404: components["responses"]["Problem"];
24413
+ 429: components["responses"]["Problem"];
24414
+ };
24415
+ };
24416
+ unlockSharedAnalytics: {
24417
+ parameters: {
24418
+ query?: never;
24419
+ header?: never;
24420
+ path: {
24421
+ /** @description The share link's token, `yuva_sh_…`. */
24422
+ token: components["parameters"]["AnalyticsShareToken"];
24423
+ };
24424
+ cookie?: never;
24425
+ };
24426
+ requestBody: {
24427
+ content: {
24428
+ "application/json": components["schemas"]["AnalyticsShareUnlock"];
24429
+ };
24430
+ };
24431
+ responses: {
24432
+ /** @description The access token. */
24433
+ 200: {
24434
+ headers: {
24435
+ [name: string]: unknown;
24436
+ };
24437
+ content: {
24438
+ "application/json": components["schemas"]["AnalyticsShareAccess"];
24439
+ };
24440
+ };
24441
+ 400: components["responses"]["Problem"];
24442
+ 401: components["responses"]["Problem"];
24443
+ 404: components["responses"]["Problem"];
24444
+ 409: components["responses"]["Problem"];
24445
+ 429: components["responses"]["Problem"];
24446
+ };
24447
+ };
24448
+ querySharedAnalytics: {
24449
+ parameters: {
24450
+ query?: never;
24451
+ header?: never;
24452
+ path: {
24453
+ /** @description The share link's token, `yuva_sh_…`. */
24454
+ token: components["parameters"]["AnalyticsShareToken"];
24455
+ };
24456
+ cookie?: never;
24457
+ };
24458
+ requestBody: {
24459
+ content: {
24460
+ "application/json": components["schemas"]["AnalyticsQuery"];
24461
+ };
24462
+ };
24463
+ responses: {
24464
+ /** @description The numbers. */
24465
+ 200: {
24466
+ headers: {
24467
+ [name: string]: unknown;
24468
+ };
24469
+ content: {
24470
+ "application/json": components["schemas"]["AnalyticsResult"];
24471
+ };
24472
+ };
24473
+ 400: components["responses"]["Problem"];
24474
+ 401: components["responses"]["Problem"];
24475
+ 403: components["responses"]["Problem"];
24476
+ 404: components["responses"]["Problem"];
24477
+ /** @description `needs_raw_window` or `range_too_large`, as on `queryAnalytics`. */
24478
+ 422: {
24479
+ headers: {
24480
+ [name: string]: unknown;
24481
+ };
24482
+ content: {
24483
+ "application/problem+json": components["schemas"]["AnalyticsRangeProblem"];
24484
+ };
24485
+ };
24486
+ 429: components["responses"]["Problem"];
24487
+ };
24488
+ };
24489
+ getSharedAnalyticsRealtime: {
24490
+ parameters: {
24491
+ query?: never;
24492
+ header?: never;
24493
+ path: {
24494
+ /** @description The share link's token, `yuva_sh_…`. */
24495
+ token: components["parameters"]["AnalyticsShareToken"];
24496
+ };
24497
+ cookie?: never;
24498
+ };
24499
+ requestBody?: never;
24500
+ responses: {
24501
+ /** @description The last 30 minutes. */
24502
+ 200: {
24503
+ headers: {
24504
+ [name: string]: unknown;
24505
+ };
24506
+ content: {
24507
+ "application/json": components["schemas"]["AnalyticsRealtime"];
24508
+ };
24509
+ };
24510
+ 401: components["responses"]["Problem"];
24511
+ 403: components["responses"]["Problem"];
24512
+ 404: components["responses"]["Problem"];
24513
+ 429: components["responses"]["Problem"];
24514
+ };
24515
+ };
22533
24516
  clientRealtime: {
22534
24517
  parameters: {
22535
24518
  query?: {
@@ -23404,4 +25387,37 @@ export interface operations {
23404
25387
  };
23405
25388
  };
23406
25389
  };
25390
+ webhookAnalyticsAlert: {
25391
+ parameters: {
25392
+ query?: never;
25393
+ header: {
25394
+ /** @description The delivery's id, the same on every retry; use it to ignore duplicates. */
25395
+ "webhook-id": components["parameters"]["WebhookIdHeader"];
25396
+ /** @description Unix seconds of this attempt. Refuse values far from your clock. */
25397
+ "webhook-timestamp": components["parameters"]["WebhookTimestampHeader"];
25398
+ /**
25399
+ * @description Space-separated `v1,<base64>` signatures: HMAC-SHA256 over
25400
+ * `<webhook-id>.<webhook-timestamp>.<body>` with the base64-decoded part of the
25401
+ * `whsec_` secret (Standard Webhooks). Two during a secret rotation.
25402
+ */
25403
+ "webhook-signature": components["parameters"]["WebhookSignatureHeader"];
25404
+ };
25405
+ path?: never;
25406
+ cookie?: never;
25407
+ };
25408
+ requestBody: {
25409
+ content: {
25410
+ "application/json": components["schemas"]["WebhookAnalyticsAlertPayload"];
25411
+ };
25412
+ };
25413
+ responses: {
25414
+ /** @description Any 2xx answer counts as delivered. */
25415
+ 200: {
25416
+ headers: {
25417
+ [name: string]: unknown;
25418
+ };
25419
+ content?: never;
25420
+ };
25421
+ };
25422
+ };
23407
25423
  }