@naturali/sdk 0.157.0 → 0.158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -402,16 +402,25 @@ type ActorRecord = {
402
402
  };
403
403
  type ErrorResponse = {
404
404
  /**
405
- * Structured error. Every error response uses this shape — 401, 403 and the 500 catch-all included — so `code` can be read without first checking the type of `error`.
405
+ * Structured error. Every error response uses this shape, so `code` can be read without first checking the type of `error`.
406
406
  */
407
407
  error: {
408
408
  /**
409
- * A key from the server's ERROR_CODES registry.
409
+ * Machine-readable error code: lower_snake for an error naturali raises (`access_denied`), UPPER_SNAKE for one the runtime reports (`RESOURCE_NOT_FOUND`).
410
410
  */
411
411
  code: string;
412
+ /**
413
+ * Human-readable explanation.
414
+ */
412
415
  message: string;
413
416
  /**
414
- * Optional structured context for the error.
417
+ * Structured context for an error naturali raises, such as the `resource` and `limit` of a `plan_limit_reached`.
418
+ */
419
+ details?: {
420
+ [key: string]: unknown;
421
+ };
422
+ /**
423
+ * Structured context for an error the runtime reports.
415
424
  */
416
425
  meta?: {
417
426
  [key: string]: unknown;
@@ -521,7 +530,7 @@ type User = {
521
530
  name?: string | null;
522
531
  email_verified: boolean;
523
532
  /**
524
- * Roles on naturali itself, not on a project. Empty for almost every account; `admin` marks a naturali operator.
533
+ * Roles on naturali itself, not on a project. Empty for almost every account; `admin` marks a naturali operator. Changed only through `PUT /v1/admin/users/{user_id}/roles`, by a caller holding the role that grants each one.
525
534
  */
526
535
  roles: Array<'admin'>;
527
536
  /**
@@ -532,9 +541,13 @@ type User = {
532
541
  };
533
542
  type AdminUser = User & {
534
543
  /**
535
- * The rung of the infra ladder the account is on. `free` for an account with no subscription. It gates the feature lines and the resource counts of the pricing table.
544
+ * The rung in effect: the highest the account held this month. `free` for an account with no subscription. It gates the feature lines and the resource counts of the pricing table.
536
545
  */
537
546
  plan: 'free' | 'pro' | 'business' | 'enterprise';
547
+ /**
548
+ * The rung the account moves to when the month turns; differs from `plan` only while a downgrade is pending.
549
+ */
550
+ next_plan: 'free' | 'pro' | 'business' | 'enterprise';
538
551
  /**
539
552
  * The longest content-retention window this account's projects may keep content for, in days. On a plan whose window a contract sets, this is the figure recorded with the grant; `null` means nothing bounds it. Resolved the same way the refusal is — the widest window held during the current billing cycle.
540
553
  */
@@ -607,9 +620,13 @@ type PlanEvent = {
607
620
  type PlanEventPage = {
608
621
  data: Array<PlanEvent>;
609
622
  /**
610
- * The rung the account is on now — its newest line, or `free` when it has no history.
623
+ * The rung in effect: the highest held this month, or `free` when the account has no history.
611
624
  */
612
625
  plan: 'free' | 'pro' | 'business' | 'enterprise';
626
+ /**
627
+ * The newest line: the rung the account moves to when the month turns.
628
+ */
629
+ next_plan: 'free' | 'pro' | 'business' | 'enterprise';
613
630
  /**
614
631
  * Pass as `cursor` for the next page; null on the last page.
615
632
  */
@@ -7762,9 +7779,13 @@ type UserUpdate = {
7762
7779
  };
7763
7780
  type UserBilling = {
7764
7781
  /**
7765
- * The rung of the infra subscription this account is on. `free` for an account with no subscription, which is also the least-privileged rung. It gates the feature lines and the resource counts of the pricing table.
7782
+ * The rung of the infra subscription in effect for this account: the highest it held this month. `free` for an account with no subscription, which is also the least-privileged rung. It gates the feature lines and the resource counts of the pricing table.
7766
7783
  */
7767
7784
  plan: 'free' | 'pro' | 'business' | 'enterprise';
7785
+ /**
7786
+ * The rung the account moves to when the month turns. It differs from `plan` only while a downgrade is pending: a downgrade takes effect at the end of the month, an upgrade at once.
7787
+ */
7788
+ next_plan: 'free' | 'pro' | 'business' | 'enterprise';
7768
7789
  /**
7769
7790
  * The longest window a project of this account may keep trace and generation content for, in days. A `PATCH` asking for a wider one — `null` included, which keeps content indefinitely — is refused with `403 plan_limit_reached`; anything shorter is always allowed. On a plan whose window a contract sets, this is that contract's figure, and `null` means nothing bounds it. A plan change that shortens the window applies at the end of the billing cycle, so this reads as the widest window held during the current one.
7770
7791
  */
@@ -8914,8 +8935,7 @@ type ListAddressesErrors = {
8914
8935
  */
8915
8936
  401: ErrorResponse;
8916
8937
  /**
8917
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
8918
- *
8938
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
8919
8939
  */
8920
8940
  403: ErrorResponse;
8921
8941
  /**
@@ -8953,8 +8973,7 @@ type DeleteAddressErrors = {
8953
8973
  */
8954
8974
  401: ErrorResponse;
8955
8975
  /**
8956
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
8957
- *
8976
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
8958
8977
  */
8959
8978
  403: ErrorResponse;
8960
8979
  /**
@@ -8992,8 +9011,7 @@ type GetAddressErrors = {
8992
9011
  */
8993
9012
  401: ErrorResponse;
8994
9013
  /**
8995
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
8996
- *
9014
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
8997
9015
  */
8998
9016
  403: ErrorResponse;
8999
9017
  /**
@@ -9035,8 +9053,7 @@ type SetAddressActionErrors = {
9035
9053
  */
9036
9054
  401: ErrorResponse;
9037
9055
  /**
9038
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9039
- *
9056
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
9040
9057
  */
9041
9058
  403: ErrorResponse;
9042
9059
  /**
@@ -9087,8 +9104,7 @@ type ListAddressConversationsErrors = {
9087
9104
  */
9088
9105
  401: ErrorResponse;
9089
9106
  /**
9090
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9091
- *
9107
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
9092
9108
  */
9093
9109
  403: ErrorResponse;
9094
9110
  /**
@@ -9138,8 +9154,7 @@ type ListUsersErrors = {
9138
9154
  */
9139
9155
  401: ErrorResponse;
9140
9156
  /**
9141
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9142
- *
9157
+ * The caller does not hold the `admin` role.
9143
9158
  */
9144
9159
  403: ErrorResponse;
9145
9160
  };
@@ -9169,12 +9184,11 @@ type UpdateUserRolesErrors = {
9169
9184
  */
9170
9185
  401: ErrorResponse;
9171
9186
  /**
9172
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9173
- *
9187
+ * The caller does not hold the `admin` role.
9174
9188
  */
9175
9189
  403: ErrorResponse;
9176
9190
  /**
9177
- * The resource does not exist (existence is not leaked).
9191
+ * No such user.
9178
9192
  */
9179
9193
  404: ErrorResponse;
9180
9194
  };
@@ -9213,12 +9227,11 @@ type ListUserPlanHistoryErrors = {
9213
9227
  */
9214
9228
  401: ErrorResponse;
9215
9229
  /**
9216
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9217
- *
9230
+ * The caller does not hold the `admin` role.
9218
9231
  */
9219
9232
  403: ErrorResponse;
9220
9233
  /**
9221
- * The resource does not exist (existence is not leaked).
9234
+ * No such user.
9222
9235
  */
9223
9236
  404: ErrorResponse;
9224
9237
  };
@@ -9248,12 +9261,11 @@ type GrantUserPlanErrors = {
9248
9261
  */
9249
9262
  401: ErrorResponse;
9250
9263
  /**
9251
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9252
- *
9264
+ * The caller does not hold the `admin` role.
9253
9265
  */
9254
9266
  403: ErrorResponse;
9255
9267
  /**
9256
- * The resource does not exist (existence is not leaked).
9268
+ * No such user.
9257
9269
  */
9258
9270
  404: ErrorResponse;
9259
9271
  };
@@ -9292,12 +9304,11 @@ type ListUserCreditsErrors = {
9292
9304
  */
9293
9305
  401: ErrorResponse;
9294
9306
  /**
9295
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9296
- *
9307
+ * The caller does not hold the `admin` role.
9297
9308
  */
9298
9309
  403: ErrorResponse;
9299
9310
  /**
9300
- * The resource does not exist (existence is not leaked).
9311
+ * No such user.
9301
9312
  */
9302
9313
  404: ErrorResponse;
9303
9314
  };
@@ -9327,12 +9338,11 @@ type GrantUserCreditErrors = {
9327
9338
  */
9328
9339
  401: ErrorResponse;
9329
9340
  /**
9330
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9331
- *
9341
+ * The caller does not hold the `admin` role.
9332
9342
  */
9333
9343
  403: ErrorResponse;
9334
9344
  /**
9335
- * The resource does not exist (existence is not leaked).
9345
+ * No such user.
9336
9346
  */
9337
9347
  404: ErrorResponse;
9338
9348
  };
@@ -9356,8 +9366,7 @@ type GetAdminPriceBookErrors = {
9356
9366
  */
9357
9367
  401: ErrorResponse;
9358
9368
  /**
9359
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9360
- *
9369
+ * The caller does not hold the `admin` role.
9361
9370
  */
9362
9371
  403: ErrorResponse;
9363
9372
  };
@@ -9396,12 +9405,11 @@ type ListUserStatementsErrors = {
9396
9405
  */
9397
9406
  401: ErrorResponse;
9398
9407
  /**
9399
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
9400
- *
9408
+ * The caller does not hold the `admin` role.
9401
9409
  */
9402
9410
  403: ErrorResponse;
9403
9411
  /**
9404
- * The resource does not exist (existence is not leaked).
9412
+ * No such user.
9405
9413
  */
9406
9414
  404: ErrorResponse;
9407
9415
  };
@@ -10456,8 +10464,7 @@ type CreateApiKeyErrors = {
10456
10464
  */
10457
10465
  401: ErrorResponse;
10458
10466
  /**
10459
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
10460
- *
10467
+ * Authenticated, but not permitted to act on this key.
10461
10468
  */
10462
10469
  403: ErrorResponse;
10463
10470
  };
@@ -10486,8 +10493,7 @@ type DeleteApiKeyErrors = {
10486
10493
  */
10487
10494
  401: ErrorResponse;
10488
10495
  /**
10489
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
10490
- *
10496
+ * Authenticated, but not permitted to act on this key.
10491
10497
  */
10492
10498
  403: ErrorResponse;
10493
10499
  /**
@@ -10520,8 +10526,7 @@ type GetApiKeyErrors = {
10520
10526
  */
10521
10527
  401: ErrorResponse;
10522
10528
  /**
10523
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
10524
- *
10529
+ * Authenticated, but not permitted to act on this key.
10525
10530
  */
10526
10531
  403: ErrorResponse;
10527
10532
  /**
@@ -10558,8 +10563,7 @@ type UpdateApiKeyErrors = {
10558
10563
  */
10559
10564
  401: ErrorResponse;
10560
10565
  /**
10561
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
10562
- *
10566
+ * Authenticated, but not permitted to act on this key.
10563
10567
  */
10564
10568
  403: ErrorResponse;
10565
10569
  /**
@@ -10592,8 +10596,7 @@ type RotateApiKeyErrors = {
10592
10596
  */
10593
10597
  401: ErrorResponse;
10594
10598
  /**
10595
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
10596
- *
10599
+ * Authenticated, but not permitted to act on this key.
10597
10600
  */
10598
10601
  403: ErrorResponse;
10599
10602
  /**
@@ -11380,8 +11383,7 @@ type ListChannelRoutesErrors = {
11380
11383
  */
11381
11384
  401: ErrorResponse;
11382
11385
  /**
11383
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11384
- *
11386
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11385
11387
  */
11386
11388
  403: ErrorResponse;
11387
11389
  /**
@@ -11422,8 +11424,7 @@ type CreateChannelRouteErrors = {
11422
11424
  */
11423
11425
  401: ErrorResponse;
11424
11426
  /**
11425
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11426
- *
11427
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11427
11428
  */
11428
11429
  403: ErrorResponse;
11429
11430
  /**
@@ -11468,8 +11469,7 @@ type DeleteChannelRouteErrors = {
11468
11469
  */
11469
11470
  401: ErrorResponse;
11470
11471
  /**
11471
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11472
- *
11472
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11473
11473
  */
11474
11474
  403: ErrorResponse;
11475
11475
  /**
@@ -11510,8 +11510,7 @@ type GetChannelRouteErrors = {
11510
11510
  */
11511
11511
  401: ErrorResponse;
11512
11512
  /**
11513
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11514
- *
11513
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11515
11514
  */
11516
11515
  403: ErrorResponse;
11517
11516
  /**
@@ -11556,8 +11555,7 @@ type UpdateChannelRouteErrors = {
11556
11555
  */
11557
11556
  401: ErrorResponse;
11558
11557
  /**
11559
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11560
- *
11558
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11561
11559
  */
11562
11560
  403: ErrorResponse;
11563
11561
  /**
@@ -11594,8 +11592,7 @@ type ListProjectChannelRoutesErrors = {
11594
11592
  */
11595
11593
  401: ErrorResponse;
11596
11594
  /**
11597
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11598
- *
11595
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11599
11596
  */
11600
11597
  403: ErrorResponse;
11601
11598
  /**
@@ -11639,8 +11636,7 @@ type ListChannelsErrors = {
11639
11636
  */
11640
11637
  401: ErrorResponse;
11641
11638
  /**
11642
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11643
- *
11639
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11644
11640
  */
11645
11641
  403: ErrorResponse;
11646
11642
  /**
@@ -11677,8 +11673,7 @@ type CreateChannelErrors = {
11677
11673
  */
11678
11674
  401: ErrorResponse;
11679
11675
  /**
11680
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11681
- *
11676
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11682
11677
  */
11683
11678
  403: ErrorResponse;
11684
11679
  /**
@@ -11729,8 +11724,7 @@ type DeleteChannelErrors = {
11729
11724
  */
11730
11725
  401: ErrorResponse;
11731
11726
  /**
11732
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11733
- *
11727
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11734
11728
  */
11735
11729
  403: ErrorResponse;
11736
11730
  /**
@@ -11772,8 +11766,7 @@ type GetChannelErrors = {
11772
11766
  */
11773
11767
  401: ErrorResponse;
11774
11768
  /**
11775
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11776
- *
11769
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11777
11770
  */
11778
11771
  403: ErrorResponse;
11779
11772
  /**
@@ -11814,8 +11807,7 @@ type UpdateChannelErrors = {
11814
11807
  */
11815
11808
  401: ErrorResponse;
11816
11809
  /**
11817
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11818
- *
11810
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11819
11811
  */
11820
11812
  403: ErrorResponse;
11821
11813
  /**
@@ -11875,8 +11867,7 @@ type ListChannelConversationsErrors = {
11875
11867
  */
11876
11868
  401: ErrorResponse;
11877
11869
  /**
11878
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11879
- *
11870
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11880
11871
  */
11881
11872
  403: ErrorResponse;
11882
11873
  /**
@@ -11922,8 +11913,7 @@ type OpenChannelConversationErrors = {
11922
11913
  */
11923
11914
  401: ErrorResponse;
11924
11915
  /**
11925
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11926
- *
11916
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11927
11917
  */
11928
11918
  403: ErrorResponse;
11929
11919
  /**
@@ -11973,8 +11963,7 @@ type DeleteChannelConversationErrors = {
11973
11963
  */
11974
11964
  401: ErrorResponse;
11975
11965
  /**
11976
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
11977
- *
11966
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
11978
11967
  */
11979
11968
  403: ErrorResponse;
11980
11969
  /**
@@ -12015,8 +12004,7 @@ type GetChannelConversationErrors = {
12015
12004
  */
12016
12005
  401: ErrorResponse;
12017
12006
  /**
12018
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
12019
- *
12007
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
12020
12008
  */
12021
12009
  403: ErrorResponse;
12022
12010
  /**
@@ -12070,8 +12058,7 @@ type ListChannelConversationMessagesErrors = {
12070
12058
  */
12071
12059
  401: ErrorResponse;
12072
12060
  /**
12073
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
12074
- *
12061
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
12075
12062
  */
12076
12063
  403: ErrorResponse;
12077
12064
  /**
@@ -15342,8 +15329,7 @@ type UploadFileErrors = {
15342
15329
  */
15343
15330
  401: ErrorResponse;
15344
15331
  /**
15345
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
15346
- *
15332
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
15347
15333
  */
15348
15334
  403: ErrorResponse;
15349
15335
  /**
@@ -15384,8 +15370,7 @@ type UploadFileBase64Errors = {
15384
15370
  */
15385
15371
  401: ErrorResponse;
15386
15372
  /**
15387
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
15388
- *
15373
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
15389
15374
  */
15390
15375
  403: ErrorResponse;
15391
15376
  /**
@@ -15493,8 +15478,7 @@ type DownloadFileErrors = {
15493
15478
  */
15494
15479
  401: ErrorResponse;
15495
15480
  /**
15496
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
15497
- *
15481
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
15498
15482
  */
15499
15483
  403: ErrorResponse;
15500
15484
  /**
@@ -15544,8 +15528,7 @@ type UpdateFileMetadataErrors = {
15544
15528
  */
15545
15529
  401: ErrorResponse;
15546
15530
  /**
15547
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
15548
- *
15531
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
15549
15532
  */
15550
15533
  403: ErrorResponse;
15551
15534
  /**
@@ -15591,8 +15574,7 @@ type DownloadFileBase64Errors = {
15591
15574
  */
15592
15575
  401: ErrorResponse;
15593
15576
  /**
15594
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
15595
- *
15577
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
15596
15578
  */
15597
15579
  403: ErrorResponse;
15598
15580
  /**
@@ -15646,8 +15628,7 @@ type GetFileTagsErrors = {
15646
15628
  */
15647
15629
  401: ErrorResponse;
15648
15630
  /**
15649
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
15650
- *
15631
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
15651
15632
  */
15652
15633
  403: ErrorResponse;
15653
15634
  /**
@@ -15684,8 +15665,7 @@ type MergeFileTagsErrors = {
15684
15665
  */
15685
15666
  401: ErrorResponse;
15686
15667
  /**
15687
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
15688
- *
15668
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
15689
15669
  */
15690
15670
  403: ErrorResponse;
15691
15671
  /**
@@ -15722,8 +15702,7 @@ type ReplaceFileTagsErrors = {
15722
15702
  */
15723
15703
  401: ErrorResponse;
15724
15704
  /**
15725
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
15726
- *
15705
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
15727
15706
  */
15728
15707
  403: ErrorResponse;
15729
15708
  /**
@@ -19620,8 +19599,7 @@ type CreateProjectErrors = {
19620
19599
  */
19621
19600
  401: ErrorResponse;
19622
19601
  /**
19623
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
19624
- *
19602
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
19625
19603
  */
19626
19604
  403: ErrorResponse;
19627
19605
  /**
@@ -19660,8 +19638,7 @@ type DeleteProjectErrors = {
19660
19638
  */
19661
19639
  401: ErrorResponse;
19662
19640
  /**
19663
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
19664
- *
19641
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
19665
19642
  */
19666
19643
  403: ErrorResponse;
19667
19644
  /**
@@ -19698,8 +19675,7 @@ type GetProjectErrors = {
19698
19675
  */
19699
19676
  401: ErrorResponse;
19700
19677
  /**
19701
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
19702
- *
19678
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
19703
19679
  */
19704
19680
  403: ErrorResponse;
19705
19681
  /**
@@ -19736,8 +19712,7 @@ type UpdateProjectErrors = {
19736
19712
  */
19737
19713
  401: ErrorResponse;
19738
19714
  /**
19739
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
19740
- *
19715
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
19741
19716
  */
19742
19717
  403: ErrorResponse;
19743
19718
  /**
@@ -19774,8 +19749,7 @@ type PauseProjectErrors = {
19774
19749
  */
19775
19750
  401: ErrorResponse;
19776
19751
  /**
19777
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
19778
- *
19752
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
19779
19753
  */
19780
19754
  403: ErrorResponse;
19781
19755
  /**
@@ -19808,8 +19782,7 @@ type ResumeProjectErrors = {
19808
19782
  */
19809
19783
  401: ErrorResponse;
19810
19784
  /**
19811
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
19812
- *
19785
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
19813
19786
  */
19814
19787
  403: ErrorResponse;
19815
19788
  /**
@@ -19846,8 +19819,7 @@ type ListProjectMembersErrors = {
19846
19819
  */
19847
19820
  401: ErrorResponse;
19848
19821
  /**
19849
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
19850
- *
19822
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
19851
19823
  */
19852
19824
  403: ErrorResponse;
19853
19825
  /**
@@ -19934,8 +19906,7 @@ type RemoveProjectMemberErrors = {
19934
19906
  */
19935
19907
  401: ErrorResponse;
19936
19908
  /**
19937
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
19938
- *
19909
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
19939
19910
  */
19940
19911
  403: ErrorResponse;
19941
19912
  /**
@@ -19976,8 +19947,7 @@ type UpdateProjectMemberErrors = {
19976
19947
  */
19977
19948
  401: ErrorResponse;
19978
19949
  /**
19979
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
19980
- *
19950
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
19981
19951
  */
19982
19952
  403: ErrorResponse;
19983
19953
  /**
@@ -20888,8 +20858,7 @@ type ListSessionsErrors = {
20888
20858
  */
20889
20859
  401: ErrorResponse;
20890
20860
  /**
20891
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
20892
- *
20861
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
20893
20862
  */
20894
20863
  403: ErrorResponse;
20895
20864
  /**
@@ -20927,8 +20896,7 @@ type CreateSessionErrors = {
20927
20896
  */
20928
20897
  401: ErrorResponse;
20929
20898
  /**
20930
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
20931
- *
20899
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
20932
20900
  */
20933
20901
  403: ErrorResponse;
20934
20902
  /**
@@ -20969,8 +20937,7 @@ type DeleteSessionErrors = {
20969
20937
  */
20970
20938
  401: ErrorResponse;
20971
20939
  /**
20972
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
20973
- *
20940
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
20974
20941
  */
20975
20942
  403: ErrorResponse;
20976
20943
  /**
@@ -21007,8 +20974,7 @@ type GetSessionErrors = {
21007
20974
  */
21008
20975
  401: ErrorResponse;
21009
20976
  /**
21010
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21011
- *
20977
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21012
20978
  */
21013
20979
  403: ErrorResponse;
21014
20980
  /**
@@ -21045,8 +21011,7 @@ type UpdateSessionErrors = {
21045
21011
  */
21046
21012
  401: ErrorResponse;
21047
21013
  /**
21048
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21049
- *
21014
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21050
21015
  */
21051
21016
  403: ErrorResponse;
21052
21017
  /**
@@ -21083,8 +21048,7 @@ type AddSessionMessageErrors = {
21083
21048
  */
21084
21049
  401: ErrorResponse;
21085
21050
  /**
21086
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21087
- *
21051
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21088
21052
  */
21089
21053
  403: ErrorResponse;
21090
21054
  /**
@@ -21130,8 +21094,7 @@ type GenerateSessionResponseErrors = {
21130
21094
  */
21131
21095
  401: ErrorResponse;
21132
21096
  /**
21133
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21134
- *
21097
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21135
21098
  */
21136
21099
  403: ErrorResponse;
21137
21100
  /**
@@ -21188,8 +21151,7 @@ type SubmitSessionToolOutputsErrors = {
21188
21151
  */
21189
21152
  401: ErrorResponse;
21190
21153
  /**
21191
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21192
- *
21154
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21193
21155
  */
21194
21156
  403: ErrorResponse;
21195
21157
  /**
@@ -21230,8 +21192,7 @@ type ForkSessionErrors = {
21230
21192
  */
21231
21193
  401: ErrorResponse;
21232
21194
  /**
21233
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21234
- *
21195
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21235
21196
  */
21236
21197
  403: ErrorResponse;
21237
21198
  /**
@@ -21271,8 +21232,7 @@ type ListSessionForksErrors = {
21271
21232
  */
21272
21233
  401: ErrorResponse;
21273
21234
  /**
21274
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21275
- *
21235
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21276
21236
  */
21277
21237
  403: ErrorResponse;
21278
21238
  /**
@@ -21314,8 +21274,7 @@ type GetSessionTagsErrors = {
21314
21274
  */
21315
21275
  401: ErrorResponse;
21316
21276
  /**
21317
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21318
- *
21277
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21319
21278
  */
21320
21279
  403: ErrorResponse;
21321
21280
  /**
@@ -21352,8 +21311,7 @@ type MergeSessionTagsErrors = {
21352
21311
  */
21353
21312
  401: ErrorResponse;
21354
21313
  /**
21355
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21356
- *
21314
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21357
21315
  */
21358
21316
  403: ErrorResponse;
21359
21317
  /**
@@ -21390,8 +21348,7 @@ type ReplaceSessionTagsErrors = {
21390
21348
  */
21391
21349
  401: ErrorResponse;
21392
21350
  /**
21393
- * The caller's role in the project does not carry this action, or the credential is scoped to a different project.
21394
- *
21351
+ * The credential is scoped to a different project, or the caller's role in the project does not carry this action.
21395
21352
  */
21396
21353
  403: ErrorResponse;
21397
21354
  /**
@@ -22635,16 +22592,15 @@ type RestoreCurrentUserStopErrors = {
22635
22592
  */
22636
22593
  401: ErrorResponse;
22637
22594
  /**
22638
- * The resource does not exist (existence is not leaked).
22595
+ * No such stop on this account, or it was already restored or dismissed.
22639
22596
  */
22640
22597
  404: ErrorResponse;
22641
22598
  /**
22642
- * The request conflicts with the resource's current state.
22599
+ * The stop cannot be restored now.
22643
22600
  */
22644
22601
  409: ErrorResponse;
22645
22602
  /**
22646
- * The upstream runtime, or Meta, could not complete the operation.
22647
- *
22603
+ * The runtime could not turn the item back on; the stop stays listed.
22648
22604
  */
22649
22605
  502: ErrorResponse;
22650
22606
  };
@@ -22673,7 +22629,7 @@ type DismissCurrentUserStopErrors = {
22673
22629
  */
22674
22630
  401: ErrorResponse;
22675
22631
  /**
22676
- * The resource does not exist (existence is not leaked).
22632
+ * No such stop on this account, or it was already restored or dismissed.
22677
22633
  */
22678
22634
  404: ErrorResponse;
22679
22635
  };
@@ -22819,7 +22775,7 @@ type CreateWebhookErrors = {
22819
22775
  */
22820
22776
  409: ErrorResponse;
22821
22777
  /**
22822
- * The requested path is not enabled on this deployment (e.g. embedded signup before Meta App credentials are configured, or a Discord channel before `CHANNEL_TOKEN_KEY` is set).
22778
+ * The requested path is not enabled on this deployment — a webhook secret cannot be stored where no credential-sealing key is configured.
22823
22779
  *
22824
22780
  */
22825
22781
  501: ErrorResponse;
@@ -22960,7 +22916,7 @@ type RotateWebhookSecretErrors = {
22960
22916
  */
22961
22917
  404: ErrorResponse;
22962
22918
  /**
22963
- * The requested path is not enabled on this deployment (e.g. embedded signup before Meta App credentials are configured, or a Discord channel before `CHANNEL_TOKEN_KEY` is set).
22919
+ * The requested path is not enabled on this deployment — a webhook secret cannot be stored where no credential-sealing key is configured.
22964
22920
  *
22965
22921
  */
22966
22922
  501: ErrorResponse;
@@ -23701,7 +23657,7 @@ export declare class Admin {
23701
23657
  *
23702
23658
  * Puts the account on a rung of the infra ladder. Needs the `admin` role.
23703
23659
  * `PUT` because an account is on exactly one rung at a time, but the change is **recorded rather than overwritten**: the plan history is append-only and the newest line is the account's plan. Setting the rung it already holds still writes a line — a re-confirmation is an act worth a record, and the `reason` given with it would otherwise have nowhere to go. Read the history back with `GET` on this path.
23704
- * The rung is what the feature gate and the resource caps resolve against. Downgrading is the same call with a lower rung; what becomes of resources a lower plan would not hold is a separate mechanism that is not built.
23660
+ * An upgrade takes effect at once. A downgrade is the same call with a lower rung and takes effect when the month turns: until then `plan` stays the rung held and `next_plan` names the new one. At the turn, active channels past the new rung's allowance are disabled, oldest first; an upgrade re-enables them.
23705
23661
  * A rung whose content-retention window a contract sets — `enterprise` — **requires `retention_days`**, since nothing else can answer what that window is and an unanswered one bounds nothing. Every other rung sets its own and refuses the field.
23706
23662
  *
23707
23663
  */