@veroxm/sdk 1.8.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ export interface paths {
10
10
  put?: never;
11
11
  /**
12
12
  * Sign in with a username (or email) and password
13
- * @description With two-step sign-in on for the person, answers 401 with code `two_step_required` and a `ticket` for /auth/two-step; when the project requires it and they have nothing set up, `two_step_setup_required` and a ticket for /auth/two-step/setup/...
13
+ * @description With two-step sign-in on for the person, answers 401 with code `two_step_required` and a `ticket` for /auth/two-step; when the project requires it and they have nothing set up, `two_step_setup_required` and a ticket for /auth/two-step/setup/... When the project's bot protection covers this form (GET /auth/config): send the captcha's `botToken`, the empty `website` honeypot, and `formElapsedMs`. No token is a 400 `bot_check_required`, a token the provider refuses a 403 `bot_check_failed`, and a 503 `bot_check_unavailable` when the provider cannot be reached (try again). A filled honeypot or a form sent too fast gets the usual answer (for sign-in, the wrong-password one), but nothing happens. It applies to signing in with an email address; usernames (API credentials, device accounts) are not asked.
14
14
  */
15
15
  post: operations["signIn"];
16
16
  delete?: never;
@@ -64,7 +64,7 @@ export interface paths {
64
64
  put?: never;
65
65
  /**
66
66
  * Create a built-in account
67
- * @description Signs the person in, or answers `{status: "verification_sent"}` when the project asks for a confirmed email first (or the address is already taken: the answer does not say which).
67
+ * @description Signs the person in, or answers `{status: "verification_sent"}` when the project asks for a confirmed email first (or the address is already taken: the answer does not say which). When the project's bot protection covers this form (GET /auth/config): send the captcha's `botToken`, the empty `website` honeypot, and `formElapsedMs`. No token is a 400 `bot_check_required`, a token the provider refuses a 403 `bot_check_failed`, and a 503 `bot_check_unavailable` when the provider cannot be reached (try again). A filled honeypot or a form sent too fast gets the usual answer (for sign-in, the wrong-password one), but nothing happens. The project limits sign-ups per IP address an hour (`too_many_attempts`, 429).
68
68
  */
69
69
  post: operations["signUp"];
70
70
  delete?: never;
@@ -116,7 +116,10 @@ export interface paths {
116
116
  };
117
117
  get?: never;
118
118
  put?: never;
119
- /** Email a password reset code */
119
+ /**
120
+ * Email a password reset code
121
+ * @description When the project's bot protection covers this form (GET /auth/config): send the captcha's `botToken`, the empty `website` honeypot, and `formElapsedMs`. No token is a 400 `bot_check_required`, a token the provider refuses a 403 `bot_check_failed`, and a 503 `bot_check_unavailable` when the provider cannot be reached (try again). A filled honeypot or a form sent too fast gets the usual answer (for sign-in, the wrong-password one), but nothing happens.
122
+ */
120
123
  post: operations["requestPasswordReset"];
121
124
  delete?: never;
122
125
  options?: never;
@@ -194,6 +197,26 @@ export interface paths {
194
197
  patch?: never;
195
198
  trace?: never;
196
199
  };
200
+ "/projects/{uuid}/auth/config": {
201
+ parameters: {
202
+ query?: never;
203
+ header?: never;
204
+ path?: never;
205
+ cookie?: never;
206
+ };
207
+ /**
208
+ * What a sign-in page should show
209
+ * @description Whether people can sign up, the social sign-in buttons, passkeys, and the bot check to render: the provider and its public site key, never the secret.
210
+ */
211
+ get: operations["getAuthConfig"];
212
+ put?: never;
213
+ post?: never;
214
+ delete?: never;
215
+ options?: never;
216
+ head?: never;
217
+ patch?: never;
218
+ trace?: never;
219
+ };
197
220
  "/projects/{uuid}/auth/social": {
198
221
  parameters: {
199
222
  query?: never;
@@ -540,7 +563,7 @@ export interface paths {
540
563
  };
541
564
  /**
542
565
  * A collection's entries
543
- * @description Flags are on when present (`?count`, `?timestamps`). With `count` the answer is a number. The slug can also name a database content model (entries read from a connected database): the key then also needs database:<db>:read, `filter.<field>[.<op>]=` filters, `userId=` or `ctx.<name>=` say whose rows for a model limited to the caller’s, and `state`, `locale` and `timestamps` don’t apply.
566
+ * @description Flags are on when present (`?count`, `?timestamps`). With `count` the answer is a number. The slug can also name a database content model (entries read from a connected database): the key then also needs database:<db>:read, `filter.<field>[.<op>]=` filters, `userId=` or `ctx.<name>=` say whose rows for a model limited to the caller’s, and `state`, `locale` and `timestamps` don’t apply. `unmask=true` returns masked fields in full and needs database:<db>:unmask (403 `forbidden` without it); each such read is marked in the database access log.
544
567
  */
545
568
  get: operations["listEntries"];
546
569
  put?: never;
@@ -778,7 +801,7 @@ export interface paths {
778
801
  };
779
802
  /**
780
803
  * A page of rows from an exposed table of a connected database
781
- * @description Needs database:<db>:read. Filters are filter.<column>=value or filter.<column>.<op>=value (eq, ne, gt, gte, lt, lte, in (comma-separated), contains, null (true/false)), on columns the table lets you filter. A table limited to the caller’s rows takes userId= or ctx.<name>= from a project key; an end user’s login is always themselves.
804
+ * @description Needs database:<db>:read. Filters are filter.<column>=value or filter.<column>.<op>=value (eq, ne, gt, gte, lt, lte, in (comma-separated), contains, null (true/false)), on columns the table lets you filter. A table limited to the caller’s rows takes userId= or ctx.<name>= from a project key; an end user’s login is always themselves. `unmask=true` returns masked columns in full and needs database:<db>:unmask; each such read is marked in the access log.
782
805
  */
783
806
  get: operations["listDatabaseRows"];
784
807
  put?: never;
@@ -877,6 +900,97 @@ export interface paths {
877
900
  patch?: never;
878
901
  trace?: never;
879
902
  };
903
+ "/projects/{uuid}/setup/environment": {
904
+ parameters: {
905
+ query?: never;
906
+ header?: never;
907
+ path?: never;
908
+ cookie?: never;
909
+ };
910
+ /** The project's environment, and whether it counts as production (any project key) */
911
+ get: operations["getProjectEnvironment"];
912
+ put?: never;
913
+ post?: never;
914
+ delete?: never;
915
+ options?: never;
916
+ head?: never;
917
+ patch?: never;
918
+ trace?: never;
919
+ };
920
+ "/projects/{uuid}/setup/functions/{name}/calls": {
921
+ parameters: {
922
+ query?: never;
923
+ header?: never;
924
+ path?: never;
925
+ cookie?: never;
926
+ };
927
+ /**
928
+ * A function's call log, oldest first (setup keys)
929
+ * @description Without `after`: the latest `limit` calls. With it: the calls after that id, to follow new ones. The latest 200 calls of each function are kept.
930
+ */
931
+ get: operations["listFunctionCallLog"];
932
+ put?: never;
933
+ post?: never;
934
+ delete?: never;
935
+ options?: never;
936
+ head?: never;
937
+ patch?: never;
938
+ trace?: never;
939
+ };
940
+ "/projects/{uuid}/setup/functions/{name}/versions": {
941
+ parameters: {
942
+ query?: never;
943
+ header?: never;
944
+ path?: never;
945
+ cookie?: never;
946
+ };
947
+ /** A function's kept versions, newest first, without their code (setup keys) */
948
+ get: operations["listFunctionVersions"];
949
+ put?: never;
950
+ post?: never;
951
+ delete?: never;
952
+ options?: never;
953
+ head?: never;
954
+ patch?: never;
955
+ trace?: never;
956
+ };
957
+ "/projects/{uuid}/setup/functions/{name}/versions/{version}": {
958
+ parameters: {
959
+ query?: never;
960
+ header?: never;
961
+ path?: never;
962
+ cookie?: never;
963
+ };
964
+ /** One version of a function, with its code (setup keys) */
965
+ get: operations["getFunctionVersion"];
966
+ put?: never;
967
+ post?: never;
968
+ delete?: never;
969
+ options?: never;
970
+ head?: never;
971
+ patch?: never;
972
+ trace?: never;
973
+ };
974
+ "/projects/{uuid}/setup/functions/{name}/rollback": {
975
+ parameters: {
976
+ query?: never;
977
+ header?: never;
978
+ path?: never;
979
+ cookie?: never;
980
+ };
981
+ get?: never;
982
+ put?: never;
983
+ /**
984
+ * Make an earlier version of a function current again, as a new version (setup keys)
985
+ * @description Restores its code and settings (not whether it's on). A function managed in Git answers 409 (`code: "managed_in_git"`) unless `force` is true.
986
+ */
987
+ post: operations["rollbackFunction"];
988
+ delete?: never;
989
+ options?: never;
990
+ head?: never;
991
+ patch?: never;
992
+ trace?: never;
993
+ };
880
994
  "/projects/{uuid}/setup/apply": {
881
995
  parameters: {
882
996
  query?: never;
@@ -1198,11 +1312,51 @@ export interface components {
1198
1312
  kind: "google" | "microsoft" | "apple" | "oidc";
1199
1313
  name: string;
1200
1314
  };
1315
+ BotProtectionConfig: {
1316
+ /**
1317
+ * @description The captcha to show: Cloudflare Turnstile, hCaptcha or Google reCAPTCHA v3.
1318
+ * @enum {string}
1319
+ */
1320
+ provider: "off" | "turnstile" | "hcaptcha" | "recaptcha";
1321
+ /** @description The provider's public site key, for the widget. */
1322
+ siteKey: string | null;
1323
+ /** @description The forms that need the check (and the honeypot and timing, when on). */
1324
+ actions: ("signup" | "signin" | "passwordReset")[];
1325
+ /** @description reCAPTCHA v3 only: the action name to pass to grecaptcha.execute for each form. */
1326
+ recaptchaActions: {
1327
+ signup: string;
1328
+ signin: string;
1329
+ passwordReset: string;
1330
+ } | null;
1331
+ /** @description Add a hidden `website` field to the forms and send it (empty). */
1332
+ honeypot: boolean;
1333
+ /** @description Send `formElapsedMs` with sign-up and password reset. */
1334
+ formTiming: boolean;
1335
+ };
1336
+ AuthConfig: {
1337
+ /**
1338
+ * @description Who can sign up: nobody by themselves (invitations), anyone, or people at some email domains.
1339
+ * @enum {string}
1340
+ */
1341
+ signup: "closed" | "open" | "domains";
1342
+ /** @description Whether people can sign in with a passkey. */
1343
+ passkeys: boolean;
1344
+ socialProviders: components["schemas"]["SocialProvider"][];
1345
+ botProtection: components["schemas"]["BotProtectionConfig"];
1346
+ };
1347
+ BotFields: {
1348
+ /** @description The captcha widget's token, when the project has a bot check for this form (or send it as `X-VeroXM-Bot-Token`). Each token works once. */
1349
+ botToken?: string;
1350
+ /** @description The honeypot: a field hidden from people. Leave it empty. */
1351
+ website?: string;
1352
+ /** @description How long the form was on screen before it was sent, in milliseconds (Date.now() minus when it was shown). */
1353
+ formElapsedMs?: number;
1354
+ };
1201
1355
  SignInRequest: {
1202
1356
  username?: string;
1203
1357
  email?: string;
1204
1358
  password?: string;
1205
- };
1359
+ } & components["schemas"]["BotFields"];
1206
1360
  RefreshRequest: {
1207
1361
  refreshToken?: string;
1208
1362
  };
@@ -1210,7 +1364,7 @@ export interface components {
1210
1364
  email?: string;
1211
1365
  password?: string;
1212
1366
  name?: string;
1213
- };
1367
+ } & components["schemas"]["BotFields"];
1214
1368
  CodeRequest: {
1215
1369
  email?: string;
1216
1370
  /** @description The 6-digit code from the email. */
@@ -1221,6 +1375,7 @@ export interface components {
1221
1375
  EmailRequest: {
1222
1376
  email?: string;
1223
1377
  };
1378
+ ForgotPasswordRequest: components["schemas"]["EmailRequest"] & components["schemas"]["BotFields"];
1224
1379
  ResetPasswordRequest: components["schemas"]["CodeRequest"] & {
1225
1380
  password?: string;
1226
1381
  };
@@ -1622,15 +1777,47 @@ export interface components {
1622
1777
  */
1623
1778
  eventId?: string;
1624
1779
  visitorId: string;
1625
- /** @enum {string} */
1626
- type: "page" | "track";
1780
+ /** @description The tracker's session id (Insights). */
1781
+ sessionId?: string;
1782
+ /**
1783
+ * @description page or track; the others are Insights interactions, sent by the tracker with `interaction`.
1784
+ * @enum {string}
1785
+ */
1786
+ type: "page" | "track" | "page_end" | "click" | "rage" | "submit" | "scroll" | "vitals";
1627
1787
  name?: string;
1628
1788
  properties?: {
1629
1789
  [key: string]: unknown;
1630
1790
  };
1791
+ interaction?: components["schemas"]["InteractionInput"];
1631
1792
  /** Format: date-time */
1632
1793
  occurredAt?: string;
1633
1794
  };
1795
+ InteractionInput: {
1796
+ /** @description The page path, no query string. */
1797
+ path: string;
1798
+ selector?: string;
1799
+ /** @description Link or button text; empty when masked. */
1800
+ label?: string;
1801
+ href?: string;
1802
+ /** @description Click position as a fraction of the element (0-1). */
1803
+ x?: number;
1804
+ y?: number;
1805
+ /** @description Click position as a fraction of the page height (0-1). */
1806
+ pageY?: number;
1807
+ /** @description Scroll: the deepest 25/50/75/100 % bucket seen. */
1808
+ depth?: number;
1809
+ viewportW?: number;
1810
+ experienceId?: number;
1811
+ variantId?: number;
1812
+ /** @description Page end: visible time on the page. */
1813
+ engagedMs?: number;
1814
+ metrics?: {
1815
+ lcp?: number;
1816
+ inp?: number;
1817
+ cls?: number;
1818
+ ttfb?: number;
1819
+ };
1820
+ };
1634
1821
  EventBatch: {
1635
1822
  events: components["schemas"]["EventInput"][];
1636
1823
  };
@@ -1686,6 +1873,13 @@ export interface components {
1686
1873
  content: unknown;
1687
1874
  /** @description The variant's config (copy, flags); null when it has none. */
1688
1875
  config: unknown;
1876
+ /** @description When the project sends test exposures to PostHog (Insights): what the page sends to its own PostHog as `$feature_flag_called`. Only on a test's answer. */
1877
+ posthog?: {
1878
+ /** @description `$feature_flag`: veroxm-<experience id>. */
1879
+ flag: string;
1880
+ /** @description `$feature_flag_response`: "control", or the variant's label as a key. */
1881
+ variant: string;
1882
+ };
1689
1883
  };
1690
1884
  Recommendations: {
1691
1885
  /** @enum {string} */
@@ -1722,6 +1916,8 @@ export interface components {
1722
1916
  config: components["schemas"]["SetupFile"];
1723
1917
  /** @description Also list (and, for webhooks, functions and sign-in providers, remove) what the project has and the file doesn't. */
1724
1918
  prune?: boolean;
1919
+ /** @description The file's functions are deployed from a repository (veroxm push): they become managed in Git, read-only in the dashboard until taken over there. */
1920
+ codeManaged?: boolean;
1725
1921
  };
1726
1922
  SetupApplyRequest: {
1727
1923
  config: components["schemas"]["SetupFile"];
@@ -1729,6 +1925,91 @@ export interface components {
1729
1925
  baseHash: string;
1730
1926
  /** @description As in the preview. */
1731
1927
  prune?: boolean;
1928
+ /** @description As in the preview. */
1929
+ codeManaged?: boolean;
1930
+ };
1931
+ ProjectEnvironment: {
1932
+ /** @description The project's name. */
1933
+ project: string;
1934
+ uuid: string;
1935
+ environment: {
1936
+ name: string;
1937
+ /** @description Its place among the linked environments (production is usually 60). */
1938
+ position: number;
1939
+ /** @description Whether no environment comes after it. */
1940
+ last: boolean;
1941
+ } | null;
1942
+ /** @description True unless it is a linked environment that isn't production: tools that must stay away from production (the CLI's --remote) refuse it. */
1943
+ production: boolean;
1944
+ };
1945
+ FunctionCallRecord: {
1946
+ /** @description Increasing: send the last one seen as `after` to get newer calls. */
1947
+ id: number;
1948
+ /** @description The function version that ran. */
1949
+ version: number;
1950
+ /** @description http, test, before_save, event, process or schedule. */
1951
+ trigger: string;
1952
+ /** @enum {string} */
1953
+ status: "ok" | "error" | "timeout" | "limited";
1954
+ durationMs: number;
1955
+ /** @description The error, secret values blanked out. */
1956
+ error: string | null;
1957
+ /** @description Its log lines, secret values blanked out. */
1958
+ logs: string | null;
1959
+ caller: string | null;
1960
+ /** Format: date-time */
1961
+ createdAt: string;
1962
+ };
1963
+ FunctionCalls: {
1964
+ function: string;
1965
+ /** @description The current version. */
1966
+ version: number;
1967
+ /** @enum {string} */
1968
+ managedBy: "dashboard" | "code";
1969
+ /** @description Oldest first. */
1970
+ calls: components["schemas"]["FunctionCallRecord"][];
1971
+ };
1972
+ FunctionVersionSettings: {
1973
+ access: string;
1974
+ timeLimitMs: number;
1975
+ triggers: Record<string, never>[];
1976
+ description: string | null;
1977
+ enabled: boolean;
1978
+ };
1979
+ FunctionVersionInfo: {
1980
+ version: number;
1981
+ /** @enum {string} */
1982
+ source: "dashboard" | "code" | "rollback";
1983
+ createdBy: number | null;
1984
+ /** Format: date-time */
1985
+ createdAt: string;
1986
+ settings: components["schemas"]["FunctionVersionSettings"] | null;
1987
+ /** @description Size of its code (in the list). */
1988
+ bytes?: number;
1989
+ /** @description Its code (one version only). */
1990
+ code?: string;
1991
+ };
1992
+ FunctionVersions: {
1993
+ function: string;
1994
+ /** @description The current version. */
1995
+ version: number;
1996
+ /** @enum {string} */
1997
+ managedBy: "dashboard" | "code";
1998
+ /** @description Newest first (the newest 20 are kept). */
1999
+ versions: components["schemas"]["FunctionVersionInfo"][];
2000
+ };
2001
+ FunctionRollbackRequest: {
2002
+ /** @description The version to make current again. */
2003
+ version: number;
2004
+ /** @description Needed for a function managed in Git: the repository is behind afterwards. */
2005
+ force?: boolean;
2006
+ };
2007
+ FunctionRolledBack: {
2008
+ function: string;
2009
+ /** @description The new current version. */
2010
+ version: number;
2011
+ managedBy: string;
2012
+ rolledBackTo: number;
1732
2013
  };
1733
2014
  SetupApplied: {
1734
2015
  /** @description How many changes were made. */
@@ -2119,6 +2400,7 @@ export interface operations {
2119
2400
  403: components["responses"]["E403"];
2120
2401
  404: components["responses"]["E404"];
2121
2402
  429: components["responses"]["E429"];
2403
+ 503: components["responses"]["E503"];
2122
2404
  };
2123
2405
  };
2124
2406
  refreshSession: {
@@ -2209,6 +2491,7 @@ export interface operations {
2209
2491
  404: components["responses"]["E404"];
2210
2492
  409: components["responses"]["E409"];
2211
2493
  429: components["responses"]["E429"];
2494
+ 503: components["responses"]["E503"];
2212
2495
  };
2213
2496
  };
2214
2497
  verifyEmail: {
@@ -2285,7 +2568,7 @@ export interface operations {
2285
2568
  };
2286
2569
  requestBody: {
2287
2570
  content: {
2288
- "application/json": components["schemas"]["EmailRequest"];
2571
+ "application/json": components["schemas"]["ForgotPasswordRequest"];
2289
2572
  };
2290
2573
  };
2291
2574
  responses: {
@@ -2299,8 +2582,10 @@ export interface operations {
2299
2582
  };
2300
2583
  };
2301
2584
  400: components["responses"]["E400"];
2585
+ 403: components["responses"]["E403"];
2302
2586
  404: components["responses"]["E404"];
2303
2587
  429: components["responses"]["E429"];
2588
+ 503: components["responses"]["E503"];
2304
2589
  };
2305
2590
  };
2306
2591
  resetPassword: {
@@ -2489,6 +2774,30 @@ export interface operations {
2489
2774
  429: components["responses"]["E429"];
2490
2775
  };
2491
2776
  };
2777
+ getAuthConfig: {
2778
+ parameters: {
2779
+ query?: never;
2780
+ header?: never;
2781
+ path: {
2782
+ /** @description The project's UUID. */
2783
+ uuid: string;
2784
+ };
2785
+ cookie?: never;
2786
+ };
2787
+ requestBody?: never;
2788
+ responses: {
2789
+ /** @description OK */
2790
+ 200: {
2791
+ headers: {
2792
+ [name: string]: unknown;
2793
+ };
2794
+ content: {
2795
+ "application/json": components["schemas"]["AuthConfig"];
2796
+ };
2797
+ };
2798
+ 404: components["responses"]["E404"];
2799
+ };
2800
+ };
2492
2801
  listSocialProviders: {
2493
2802
  parameters: {
2494
2803
  query?: never;
@@ -4001,6 +4310,160 @@ export interface operations {
4001
4310
  429: components["responses"]["E429"];
4002
4311
  };
4003
4312
  };
4313
+ getProjectEnvironment: {
4314
+ parameters: {
4315
+ query?: never;
4316
+ header?: never;
4317
+ path: {
4318
+ /** @description The project's UUID. */
4319
+ uuid: string;
4320
+ };
4321
+ cookie?: never;
4322
+ };
4323
+ requestBody?: never;
4324
+ responses: {
4325
+ /** @description OK */
4326
+ 200: {
4327
+ headers: {
4328
+ [name: string]: unknown;
4329
+ };
4330
+ content: {
4331
+ "application/json": components["schemas"]["ProjectEnvironment"];
4332
+ };
4333
+ };
4334
+ 401: components["responses"]["E401"];
4335
+ 403: components["responses"]["E403"];
4336
+ 404: components["responses"]["E404"];
4337
+ 429: components["responses"]["E429"];
4338
+ };
4339
+ };
4340
+ listFunctionCallLog: {
4341
+ parameters: {
4342
+ query?: {
4343
+ /** @description The last call id seen. */
4344
+ after?: number;
4345
+ /** @description Only calls from this time. */
4346
+ since?: string;
4347
+ /** @description At most this many (100 by default). */
4348
+ limit?: number;
4349
+ };
4350
+ header?: never;
4351
+ path: {
4352
+ /** @description The project's UUID. */
4353
+ uuid: string;
4354
+ name: string;
4355
+ };
4356
+ cookie?: never;
4357
+ };
4358
+ requestBody?: never;
4359
+ responses: {
4360
+ /** @description OK */
4361
+ 200: {
4362
+ headers: {
4363
+ [name: string]: unknown;
4364
+ };
4365
+ content: {
4366
+ "application/json": components["schemas"]["FunctionCalls"];
4367
+ };
4368
+ };
4369
+ 400: components["responses"]["E400"];
4370
+ 401: components["responses"]["E401"];
4371
+ 403: components["responses"]["E403"];
4372
+ 404: components["responses"]["E404"];
4373
+ 429: components["responses"]["E429"];
4374
+ };
4375
+ };
4376
+ listFunctionVersions: {
4377
+ parameters: {
4378
+ query?: never;
4379
+ header?: never;
4380
+ path: {
4381
+ /** @description The project's UUID. */
4382
+ uuid: string;
4383
+ name: string;
4384
+ };
4385
+ cookie?: never;
4386
+ };
4387
+ requestBody?: never;
4388
+ responses: {
4389
+ /** @description OK */
4390
+ 200: {
4391
+ headers: {
4392
+ [name: string]: unknown;
4393
+ };
4394
+ content: {
4395
+ "application/json": components["schemas"]["FunctionVersions"];
4396
+ };
4397
+ };
4398
+ 401: components["responses"]["E401"];
4399
+ 403: components["responses"]["E403"];
4400
+ 404: components["responses"]["E404"];
4401
+ 429: components["responses"]["E429"];
4402
+ };
4403
+ };
4404
+ getFunctionVersion: {
4405
+ parameters: {
4406
+ query?: never;
4407
+ header?: never;
4408
+ path: {
4409
+ /** @description The project's UUID. */
4410
+ uuid: string;
4411
+ name: string;
4412
+ version: number;
4413
+ };
4414
+ cookie?: never;
4415
+ };
4416
+ requestBody?: never;
4417
+ responses: {
4418
+ /** @description OK */
4419
+ 200: {
4420
+ headers: {
4421
+ [name: string]: unknown;
4422
+ };
4423
+ content: {
4424
+ "application/json": components["schemas"]["FunctionVersionInfo"];
4425
+ };
4426
+ };
4427
+ 401: components["responses"]["E401"];
4428
+ 403: components["responses"]["E403"];
4429
+ 404: components["responses"]["E404"];
4430
+ 429: components["responses"]["E429"];
4431
+ };
4432
+ };
4433
+ rollbackFunction: {
4434
+ parameters: {
4435
+ query?: never;
4436
+ header?: never;
4437
+ path: {
4438
+ /** @description The project's UUID. */
4439
+ uuid: string;
4440
+ name: string;
4441
+ };
4442
+ cookie?: never;
4443
+ };
4444
+ requestBody: {
4445
+ content: {
4446
+ "application/json": components["schemas"]["FunctionRollbackRequest"];
4447
+ };
4448
+ };
4449
+ responses: {
4450
+ /** @description OK */
4451
+ 200: {
4452
+ headers: {
4453
+ [name: string]: unknown;
4454
+ };
4455
+ content: {
4456
+ "application/json": components["schemas"]["FunctionRolledBack"];
4457
+ };
4458
+ };
4459
+ 400: components["responses"]["E400"];
4460
+ 401: components["responses"]["E401"];
4461
+ 403: components["responses"]["E403"];
4462
+ 404: components["responses"]["E404"];
4463
+ 409: components["responses"]["E409"];
4464
+ 429: components["responses"]["E429"];
4465
+ };
4466
+ };
4004
4467
  applySetup: {
4005
4468
  parameters: {
4006
4469
  query?: never;
@@ -4141,6 +4604,8 @@ export interface operations {
4141
4604
  url?: string;
4142
4605
  /** @description The page that linked to it. */
4143
4606
  referrer?: string;
4607
+ /** @description The page sends test exposures to PostHog itself (the SDK sends it when the page has PostHog), so VeroXM's server doesn't. */
4608
+ posthog?: "browser";
4144
4609
  };
4145
4610
  header?: never;
4146
4611
  path: {
package/dist/http.d.ts CHANGED
@@ -1,4 +1,14 @@
1
- export interface RawRequestOptions {
1
+ /**
2
+ * Per-call control over one request: cancel it, or give up after a time. Accepted by `content(slug).list()`,
3
+ * `search()`, `count()`, `get()` and `functions.call()` / `functions.get()`.
4
+ */
5
+ export interface RequestControl {
6
+ /** Cancels the request when it aborts: the call rejects with the signal's reason (an `AbortError` by default). */
7
+ signal?: AbortSignal;
8
+ /** Gives up after this many milliseconds with `VeroXMTimeoutError`. Overrides the app's `timeoutMs` for this call. */
9
+ timeoutMs?: number;
10
+ }
11
+ export interface RawRequestOptions extends RequestControl {
2
12
  method?: string;
3
13
  /** Path relative to the client's api base, e.g. "/auth/token" or "/collections/posts/content". */
4
14
  path: string;
@@ -8,12 +18,20 @@ export interface RawRequestOptions {
8
18
  /** Sent as a `multipart/form-data` body (file uploads) -- fetch sets the boundary Content-Type itself, so never set one manually alongside this. */
9
19
  form?: FormData;
10
20
  headers?: Record<string, string>;
21
+ /** Extra attempts for a GET or HEAD that fails in a way worth retrying (see `isRetryable`). Ignored for other methods. */
22
+ retries?: number;
11
23
  }
24
+ /** Throws a RangeError for a `retries` that isn't a whole number from 0 to 5. */
25
+ export declare function checkRetries(value: number | undefined): void;
26
+ /** Throws a RangeError for a `timeoutMs` that isn't a positive number. */
27
+ export declare function checkTimeout(value: number | undefined): void;
12
28
  /**
13
29
  * The one place an HTTP request actually goes out. Deliberately built on
14
30
  * the platform's own global `fetch`/`FormData` -- available in every
15
31
  * environment this SDK targets (browsers, Node 18+, React Native 0.71+)
16
32
  * without adding a runtime dependency the way `axios` or `dio`-equivalent
17
33
  * libraries would.
34
+ *
35
+ * Without `timeoutMs`, `signal` or `retries` this is a single plain fetch, exactly as before those options existed.
18
36
  */
19
37
  export declare function rawRequest(apiBase: string, opts: RawRequestOptions): Promise<unknown>;