palbase 0.18.6 → 0.19.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.
Files changed (53) hide show
  1. package/README.md +14 -0
  2. package/dist/ai/index.js +2 -2
  3. package/dist/backend/engine.js +2 -2
  4. package/dist/backend/env.js +1 -1
  5. package/dist/backend/index.js +3 -3
  6. package/dist/backend/stack.js +1 -1
  7. package/dist/backend/test.js +2 -2
  8. package/dist/chunks/{L4SDE4IC.js → 26R7KNH7.js} +2 -2
  9. package/dist/chunks/{S76H65KW.js → 2XM3DQXS.js} +2 -2
  10. package/dist/chunks/{E4CPOSFA.js → 424IEUQX.js} +2 -2
  11. package/dist/chunks/{NIDBDL7O.js → 43RXGTTL.js} +1 -1
  12. package/dist/chunks/{OL33SRTB.js → B6OLQP6W.js} +2 -2
  13. package/dist/chunks/{U6UXSVEZ.js → EDIQ4SAO.js} +2 -2
  14. package/dist/chunks/{6HESVOSN.js → F5CWCOSS.js} +1 -1
  15. package/dist/chunks/{6IHNI2FC.js → HM7G4WGJ.js} +2 -2
  16. package/dist/chunks/{7HE22VDH.js → KE4DEYSH.js} +1 -1
  17. package/dist/chunks/{Y76SPW2M.js → LCBMI6UP.js} +1 -1
  18. package/dist/chunks/{OGP5DLL6.js → LRWWDIJZ.js} +2 -2
  19. package/dist/chunks/{C53PUTQR.js → MI3PAKT3.js} +2 -2
  20. package/dist/chunks/{BDD3FVHP.js → PRIISRPI.js} +2 -2
  21. package/dist/chunks/{Q2O72MGS.js → QOUBSZM4.js} +1 -1
  22. package/dist/chunks/{U4R3KQT6.js → RIQJUVZK.js} +1 -1
  23. package/dist/chunks/{RUE6N2T6.js → SGASB5G4.js} +2 -2
  24. package/dist/chunks/{6JA355QW.js → TOPRHPT6.js} +1 -1
  25. package/dist/chunks/{ARDQJVIP.js → V2GWROU3.js} +2 -2
  26. package/dist/chunks/{RHLHSALC.js → V6TFL4HC.js} +2 -2
  27. package/dist/chunks/{5N36M3Y3.js → WHKAPZX7.js} +2 -2
  28. package/dist/chunks/{4HYASQT5.js → Y4THIE6E.js} +2 -2
  29. package/dist/chunks/Z4YKS2EK.js +2 -0
  30. package/dist/chunks/{IO3G5VIC.js → ZW57VOIW.js} +2 -2
  31. package/dist/cli.js +3 -3
  32. package/dist/cloud/index.js +2 -0
  33. package/dist/refuse/ai.js +1 -1
  34. package/dist/refuse/backend.js +1 -1
  35. package/dist/refuse/cloud.js +2 -0
  36. package/dist/refuse/server.js +1 -1
  37. package/dist/server/index.js +2 -2
  38. package/dist/server/testing.js +2 -2
  39. package/dist/web/index.js +2 -2
  40. package/dist/web/message.js +2 -2
  41. package/dist/web/palbe.js +2 -2
  42. package/dist/web/paywall.js +2 -2
  43. package/dist/web/push-sw.js +1 -1
  44. package/dist/web/ssr.js +2 -2
  45. package/dist/web/vite.js +2 -2
  46. package/package.json +18 -4
  47. package/types/cloud/src/cloud.d.ts +23 -0
  48. package/types/cloud/src/generated/project.d.ts +19 -0
  49. package/types/cloud/src/generated/studio.d.ts +1765 -0
  50. package/types/cloud/src/index.d.ts +7 -0
  51. package/types/cloud/src/token.d.ts +6 -0
  52. package/types/internal/src/transport.d.ts +10 -1
  53. package/dist/chunks/RGZZCQMZ.js +0 -2
@@ -0,0 +1,1765 @@
1
+ import { type Reply, type Transport } from '../../../internal/src/transport.js';
2
+ /**
3
+ * Every refusal: the framework's, a handler's HttpError, the database's.
4
+ */
5
+ export type PalbaseErrorEnvelope = {
6
+ /**
7
+ * A stable code, like bad_request
8
+ */
9
+ error: string;
10
+ /**
11
+ * What went wrong, for a person
12
+ */
13
+ error_description: string;
14
+ /**
15
+ * The HTTP status
16
+ */
17
+ status: number;
18
+ /**
19
+ * The request's id, as the app's log has it
20
+ */
21
+ request_id: string;
22
+ /**
23
+ * Details, when the refusal has them: a validation's fields, a token's reason, a limit's retryAfter
24
+ */
25
+ data?: unknown;
26
+ };
27
+ /** Studio's API as an access token calls it: organizations, projects, environments, billing — by namespace. */
28
+ export declare function client(t: Transport): {
29
+ orgs: {
30
+ list(input?: {
31
+ signal?: AbortSignal;
32
+ }): Promise<Reply<200, {
33
+ organizations: ({
34
+ id: string;
35
+ name: string;
36
+ role: "owner" | "admin" | "member";
37
+ created_by: string | null;
38
+ created_at: string;
39
+ })[];
40
+ }>>;
41
+ get(input: {
42
+ path: {
43
+ id: string;
44
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
45
+ signal?: AbortSignal;
46
+ }): Promise<Reply<200, {
47
+ id: string;
48
+ name: string;
49
+ role: "owner" | "admin" | "member";
50
+ created_by: string | null;
51
+ created_at: string;
52
+ }>>;
53
+ members(input: {
54
+ path: {
55
+ id: string;
56
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
57
+ signal?: AbortSignal;
58
+ }): Promise<Reply<200, {
59
+ members: ({
60
+ email: string | null;
61
+ user_id: string;
62
+ role: "owner" | "admin" | "member";
63
+ created_at: string;
64
+ })[];
65
+ invitations: ({
66
+ id: string;
67
+ email: string;
68
+ role: "admin" | "member";
69
+ created_at: string;
70
+ })[];
71
+ }>>;
72
+ auditLog(input: {
73
+ path: {
74
+ id: string;
75
+ };
76
+ query?: {
77
+ before?: string;
78
+ limit?: number;
79
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
80
+ signal?: AbortSignal;
81
+ }): Promise<Reply<200, {
82
+ entries: ({
83
+ id: string;
84
+ at: string;
85
+ environment_ref: string;
86
+ actor: string;
87
+ actor_name: string | null;
88
+ on_behalf_of?: string;
89
+ method: string;
90
+ path: string;
91
+ status: number;
92
+ })[];
93
+ next_before: string | null;
94
+ }>>;
95
+ };
96
+ invitations: {
97
+ mine(input?: {
98
+ signal?: AbortSignal;
99
+ }): Promise<Reply<200, {
100
+ invitations: ({
101
+ id: string;
102
+ organization_id: string;
103
+ organization_name: string;
104
+ role: string;
105
+ created_at: string;
106
+ })[];
107
+ }>>;
108
+ accept(input: {
109
+ path: {
110
+ id: string;
111
+ };
112
+ headers?: {
113
+ "Idempotency-Key"?: string;
114
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
115
+ signal?: AbortSignal;
116
+ }): Promise<Reply<200, {
117
+ organization_id: string;
118
+ role: string;
119
+ }>>;
120
+ };
121
+ orgWebhooks: {
122
+ list(input: {
123
+ path: {
124
+ id: string;
125
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
126
+ signal?: AbortSignal;
127
+ }): Promise<Reply<200, {
128
+ endpoints: ({
129
+ id: string;
130
+ url: string;
131
+ events: string[];
132
+ created_at: string;
133
+ created_by?: {
134
+ id: string;
135
+ name: string;
136
+ };
137
+ })[];
138
+ }>>;
139
+ add(input: {
140
+ path: {
141
+ id: string;
142
+ };
143
+ headers?: {
144
+ "Idempotency-Key"?: string;
145
+ };
146
+ body: {
147
+ url: string;
148
+ events?: string[];
149
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
150
+ signal?: AbortSignal;
151
+ }): Promise<Reply<200, {
152
+ id: string;
153
+ url: string;
154
+ events: string[];
155
+ created_at: string;
156
+ created_by?: {
157
+ id: string;
158
+ name: string;
159
+ };
160
+ secret: string;
161
+ }>>;
162
+ remove(input: {
163
+ path: {
164
+ id: string;
165
+ endpoint: string;
166
+ };
167
+ headers?: {
168
+ "Idempotency-Key"?: string;
169
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
170
+ signal?: AbortSignal;
171
+ }): Promise<Reply<204, undefined>>;
172
+ };
173
+ projects: {
174
+ mine(input?: {
175
+ signal?: AbortSignal;
176
+ }): Promise<Reply<200, {
177
+ projects: ({
178
+ id: string;
179
+ organization_id: string;
180
+ name: string;
181
+ created_by: string | null;
182
+ created_at: string;
183
+ environments: ({
184
+ ref: string;
185
+ name: string;
186
+ slug: string;
187
+ platform_id: string;
188
+ created_at: string;
189
+ })[];
190
+ })[];
191
+ }>>;
192
+ environmentsMine(input?: {
193
+ signal?: AbortSignal;
194
+ }): Promise<Reply<200, {
195
+ environments: (({
196
+ project_id: string;
197
+ project_name: string;
198
+ organization_id: string;
199
+ role: "owner" | "admin" | "member";
200
+ ref: string;
201
+ name: string;
202
+ slug: string;
203
+ platform_id: string;
204
+ created_at: string;
205
+ })[]) | (({
206
+ project_id: string;
207
+ project_name: string;
208
+ organization_id: string;
209
+ role: "owner" | "admin" | "member";
210
+ scopes: string[] | null;
211
+ token_id: string;
212
+ ref: string;
213
+ name: string;
214
+ slug: string;
215
+ platform_id: string;
216
+ created_at: string;
217
+ })[]);
218
+ }>>;
219
+ list(input: {
220
+ path: {
221
+ id: string;
222
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
223
+ signal?: AbortSignal;
224
+ }): Promise<Reply<200, {
225
+ projects: ({
226
+ id: string;
227
+ organization_id: string;
228
+ name: string;
229
+ created_by: string | null;
230
+ created_at: string;
231
+ environments: ({
232
+ ref: string;
233
+ name: string;
234
+ slug: string;
235
+ platform_id: string;
236
+ created_at: string;
237
+ })[];
238
+ })[];
239
+ }>>;
240
+ create(input: {
241
+ path: {
242
+ id: string;
243
+ };
244
+ headers?: {
245
+ "Idempotency-Key"?: string;
246
+ };
247
+ body: {
248
+ name: string;
249
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
250
+ signal?: AbortSignal;
251
+ }): Promise<Reply<200, {
252
+ project: {
253
+ id: string;
254
+ organization_id: string;
255
+ name: string;
256
+ created_by: string | null;
257
+ created_at: string;
258
+ environments: ({
259
+ ref: string;
260
+ name: string;
261
+ slug: string;
262
+ platform_id: string;
263
+ created_at: string;
264
+ })[];
265
+ };
266
+ }>>;
267
+ get(input: {
268
+ path: {
269
+ id: string;
270
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
271
+ signal?: AbortSignal;
272
+ }): Promise<Reply<200, ({
273
+ id: string;
274
+ organization_id: string;
275
+ name: string;
276
+ created_by: string | null;
277
+ created_at: string;
278
+ environments: ({
279
+ ref: string;
280
+ name: string;
281
+ slug: string;
282
+ platform_id: string;
283
+ created_at: string;
284
+ })[];
285
+ }) | null>>;
286
+ remove(input: {
287
+ path: {
288
+ id: string;
289
+ };
290
+ query?: {
291
+ move_credit_to?: string;
292
+ };
293
+ headers?: {
294
+ "Idempotency-Key"?: string;
295
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
296
+ signal?: AbortSignal;
297
+ }): Promise<Reply<204, undefined>>;
298
+ rename(input: {
299
+ path: {
300
+ id: string;
301
+ };
302
+ headers?: {
303
+ "Idempotency-Key"?: string;
304
+ };
305
+ body: {
306
+ name: string;
307
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
308
+ signal?: AbortSignal;
309
+ }): Promise<Reply<200, ({
310
+ id: string;
311
+ organization_id: string;
312
+ name: string;
313
+ created_by: string | null;
314
+ created_at: string;
315
+ }) | null>>;
316
+ addEnvironment(input: {
317
+ path: {
318
+ id: string;
319
+ };
320
+ headers?: {
321
+ "Idempotency-Key"?: string;
322
+ };
323
+ body: {
324
+ name: string;
325
+ slug?: string;
326
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
327
+ signal?: AbortSignal;
328
+ }): Promise<Reply<200, {
329
+ environment: {
330
+ ref: string;
331
+ name: string;
332
+ slug: string;
333
+ platform_id: string;
334
+ created_at: string;
335
+ };
336
+ keys: ({
337
+ publishable: {
338
+ id: string;
339
+ kind: "publishable" | "secret";
340
+ label: string;
341
+ key: string;
342
+ expires_at?: string;
343
+ };
344
+ secret: {
345
+ id: string;
346
+ kind: "publishable" | "secret";
347
+ label: string;
348
+ key: string;
349
+ expires_at?: string;
350
+ };
351
+ }) | null;
352
+ }>>;
353
+ environment(input: {
354
+ path: {
355
+ ref: string;
356
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
357
+ signal?: AbortSignal;
358
+ }): Promise<Reply<200, {
359
+ project_id: string;
360
+ role: "owner" | "admin" | "member";
361
+ }>>;
362
+ removeEnvironment(input: {
363
+ path: {
364
+ ref: string;
365
+ };
366
+ query?: {
367
+ move_credit_to?: string;
368
+ };
369
+ headers?: {
370
+ "Idempotency-Key"?: string;
371
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
372
+ signal?: AbortSignal;
373
+ }): Promise<Reply<204, undefined>>;
374
+ renameEnvironment(input: {
375
+ path: {
376
+ ref: string;
377
+ };
378
+ headers?: {
379
+ "Idempotency-Key"?: string;
380
+ };
381
+ body: {
382
+ name: string;
383
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
384
+ signal?: AbortSignal;
385
+ }): Promise<Reply<200, ({
386
+ ref: string;
387
+ name: string;
388
+ slug: string;
389
+ platform_id: string;
390
+ created_at: string;
391
+ }) | null>>;
392
+ keys(input: {
393
+ path: {
394
+ ref: string;
395
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
396
+ signal?: AbortSignal;
397
+ }): Promise<Reply<200, {
398
+ keys: ({
399
+ id: string;
400
+ kind: "publishable" | "secret";
401
+ label: string;
402
+ hint: string;
403
+ created_at: string;
404
+ expires_at?: string;
405
+ revoked_at?: string;
406
+ })[];
407
+ }>>;
408
+ usage(input: {
409
+ path: {
410
+ ref: string;
411
+ };
412
+ query?: {
413
+ months?: number;
414
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
415
+ signal?: AbortSignal;
416
+ }): Promise<Reply<200, {
417
+ months: ({
418
+ period: string;
419
+ usage: {
420
+ [key: string]: number;
421
+ };
422
+ })[];
423
+ quotas: ({
424
+ metric: string;
425
+ limit: number;
426
+ mode: string;
427
+ used: number;
428
+ blocked: boolean;
429
+ })[];
430
+ }>>;
431
+ personalKey(input: {
432
+ path: {
433
+ ref: string;
434
+ };
435
+ headers?: {
436
+ "Idempotency-Key"?: string;
437
+ };
438
+ body: {
439
+ host: string;
440
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
441
+ signal?: AbortSignal;
442
+ }): Promise<Reply<200, {
443
+ id: string;
444
+ key: string;
445
+ label: string;
446
+ expires_at: string;
447
+ }>>;
448
+ revokePersonalKey(input: {
449
+ path: {
450
+ ref: string;
451
+ key: string;
452
+ };
453
+ headers?: {
454
+ "Idempotency-Key"?: string;
455
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
456
+ signal?: AbortSignal;
457
+ }): Promise<Reply<204, undefined>>;
458
+ shareInstallation(input: {
459
+ path: {
460
+ ref: string;
461
+ };
462
+ headers?: {
463
+ "Idempotency-Key"?: string;
464
+ };
465
+ body: {
466
+ installation_id: number;
467
+ from: string;
468
+ repositories?: string[];
469
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
470
+ signal?: AbortSignal;
471
+ }): Promise<Reply<number, Response>>;
472
+ };
473
+ apps: {
474
+ list(input: {
475
+ path: {
476
+ id: string;
477
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
478
+ signal?: AbortSignal;
479
+ }): Promise<Reply<200, {
480
+ apps: ({
481
+ id: string;
482
+ platform: "ios" | "android" | "web";
483
+ name: string;
484
+ slug: string;
485
+ team_id: string | null;
486
+ app_id_prefix: string | null;
487
+ created_at: string;
488
+ deleted_at: string | null;
489
+ purge_after: string | null;
490
+ environments: ({
491
+ ref: string;
492
+ slug: string;
493
+ name: string;
494
+ ios?: {
495
+ team_id: string;
496
+ app_id_prefix?: string;
497
+ bundle: string;
498
+ app_clip?: string;
499
+ watch?: string;
500
+ };
501
+ android?: {
502
+ package: string;
503
+ fingerprints: ({
504
+ label: string;
505
+ sha256: string;
506
+ })[];
507
+ };
508
+ web?: {
509
+ origins: string[];
510
+ redirects?: string[];
511
+ };
512
+ suspended: boolean;
513
+ key?: {
514
+ id: string;
515
+ key: string;
516
+ };
517
+ updated_at: string;
518
+ })[];
519
+ })[];
520
+ }>>;
521
+ create(input: {
522
+ path: {
523
+ id: string;
524
+ };
525
+ headers?: {
526
+ "Idempotency-Key"?: string;
527
+ };
528
+ body: {
529
+ platform: "ios" | "android" | "web";
530
+ name: string;
531
+ slug?: string;
532
+ team_id?: string;
533
+ app_id_prefix?: string;
534
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
535
+ signal?: AbortSignal;
536
+ }): Promise<Reply<200, {
537
+ id: string;
538
+ platform: "ios" | "android" | "web";
539
+ name: string;
540
+ slug: string;
541
+ team_id: string | null;
542
+ app_id_prefix: string | null;
543
+ created_at: string;
544
+ deleted_at: string | null;
545
+ purge_after: string | null;
546
+ environments: ({
547
+ ref: string;
548
+ slug: string;
549
+ name: string;
550
+ ios?: {
551
+ team_id: string;
552
+ app_id_prefix?: string;
553
+ bundle: string;
554
+ app_clip?: string;
555
+ watch?: string;
556
+ };
557
+ android?: {
558
+ package: string;
559
+ fingerprints: ({
560
+ label: string;
561
+ sha256: string;
562
+ })[];
563
+ };
564
+ web?: {
565
+ origins: string[];
566
+ redirects?: string[];
567
+ };
568
+ suspended: boolean;
569
+ key?: {
570
+ id: string;
571
+ key: string;
572
+ };
573
+ updated_at: string;
574
+ })[];
575
+ }>>;
576
+ get(input: {
577
+ path: {
578
+ id: string;
579
+ app: string;
580
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
581
+ signal?: AbortSignal;
582
+ }): Promise<Reply<200, {
583
+ id: string;
584
+ platform: "ios" | "android" | "web";
585
+ name: string;
586
+ slug: string;
587
+ team_id: string | null;
588
+ app_id_prefix: string | null;
589
+ created_at: string;
590
+ deleted_at: string | null;
591
+ purge_after: string | null;
592
+ environments: ({
593
+ ref: string;
594
+ slug: string;
595
+ name: string;
596
+ ios?: {
597
+ team_id: string;
598
+ app_id_prefix?: string;
599
+ bundle: string;
600
+ app_clip?: string;
601
+ watch?: string;
602
+ };
603
+ android?: {
604
+ package: string;
605
+ fingerprints: ({
606
+ label: string;
607
+ sha256: string;
608
+ })[];
609
+ };
610
+ web?: {
611
+ origins: string[];
612
+ redirects?: string[];
613
+ };
614
+ suspended: boolean;
615
+ key?: {
616
+ id: string;
617
+ key: string;
618
+ };
619
+ updated_at: string;
620
+ })[];
621
+ }>>;
622
+ remove(input: {
623
+ path: {
624
+ id: string;
625
+ app: string;
626
+ };
627
+ headers?: {
628
+ "Idempotency-Key"?: string;
629
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
630
+ signal?: AbortSignal;
631
+ }): Promise<Reply<200, {
632
+ id: string;
633
+ platform: "ios" | "android" | "web";
634
+ name: string;
635
+ slug: string;
636
+ team_id: string | null;
637
+ app_id_prefix: string | null;
638
+ created_at: string;
639
+ deleted_at: string | null;
640
+ purge_after: string | null;
641
+ environments: ({
642
+ ref: string;
643
+ slug: string;
644
+ name: string;
645
+ ios?: {
646
+ team_id: string;
647
+ app_id_prefix?: string;
648
+ bundle: string;
649
+ app_clip?: string;
650
+ watch?: string;
651
+ };
652
+ android?: {
653
+ package: string;
654
+ fingerprints: ({
655
+ label: string;
656
+ sha256: string;
657
+ })[];
658
+ };
659
+ web?: {
660
+ origins: string[];
661
+ redirects?: string[];
662
+ };
663
+ suspended: boolean;
664
+ key?: {
665
+ id: string;
666
+ key: string;
667
+ };
668
+ updated_at: string;
669
+ })[];
670
+ }>>;
671
+ update(input: {
672
+ path: {
673
+ id: string;
674
+ app: string;
675
+ };
676
+ headers?: {
677
+ "Idempotency-Key"?: string;
678
+ };
679
+ body?: {
680
+ name?: string;
681
+ team_id?: string;
682
+ app_id_prefix?: string | null;
683
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
684
+ signal?: AbortSignal;
685
+ }): Promise<Reply<200, {
686
+ id: string;
687
+ platform: "ios" | "android" | "web";
688
+ name: string;
689
+ slug: string;
690
+ team_id: string | null;
691
+ app_id_prefix: string | null;
692
+ created_at: string;
693
+ deleted_at: string | null;
694
+ purge_after: string | null;
695
+ environments: ({
696
+ ref: string;
697
+ slug: string;
698
+ name: string;
699
+ ios?: {
700
+ team_id: string;
701
+ app_id_prefix?: string;
702
+ bundle: string;
703
+ app_clip?: string;
704
+ watch?: string;
705
+ };
706
+ android?: {
707
+ package: string;
708
+ fingerprints: ({
709
+ label: string;
710
+ sha256: string;
711
+ })[];
712
+ };
713
+ web?: {
714
+ origins: string[];
715
+ redirects?: string[];
716
+ };
717
+ suspended: boolean;
718
+ key?: {
719
+ id: string;
720
+ key: string;
721
+ };
722
+ updated_at: string;
723
+ })[];
724
+ }>>;
725
+ restore(input: {
726
+ path: {
727
+ id: string;
728
+ app: string;
729
+ };
730
+ headers?: {
731
+ "Idempotency-Key"?: string;
732
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
733
+ signal?: AbortSignal;
734
+ }): Promise<Reply<200, {
735
+ id: string;
736
+ platform: "ios" | "android" | "web";
737
+ name: string;
738
+ slug: string;
739
+ team_id: string | null;
740
+ app_id_prefix: string | null;
741
+ created_at: string;
742
+ deleted_at: string | null;
743
+ purge_after: string | null;
744
+ environments: ({
745
+ ref: string;
746
+ slug: string;
747
+ name: string;
748
+ ios?: {
749
+ team_id: string;
750
+ app_id_prefix?: string;
751
+ bundle: string;
752
+ app_clip?: string;
753
+ watch?: string;
754
+ };
755
+ android?: {
756
+ package: string;
757
+ fingerprints: ({
758
+ label: string;
759
+ sha256: string;
760
+ })[];
761
+ };
762
+ web?: {
763
+ origins: string[];
764
+ redirects?: string[];
765
+ };
766
+ suspended: boolean;
767
+ key?: {
768
+ id: string;
769
+ key: string;
770
+ };
771
+ updated_at: string;
772
+ })[];
773
+ }>>;
774
+ setIn(input: {
775
+ path: {
776
+ ref: string;
777
+ app: string;
778
+ };
779
+ headers?: {
780
+ "Idempotency-Key"?: string;
781
+ };
782
+ body?: {
783
+ ios?: {
784
+ bundle: string;
785
+ app_clip?: string;
786
+ watch?: string;
787
+ };
788
+ android?: {
789
+ package: string;
790
+ fingerprints?: ({
791
+ label: string;
792
+ sha256: string;
793
+ })[];
794
+ };
795
+ web?: {
796
+ origins: string[];
797
+ redirects?: string[];
798
+ };
799
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
800
+ signal?: AbortSignal;
801
+ }): Promise<Reply<200, {
802
+ warnings: string[];
803
+ ref: string;
804
+ slug: string;
805
+ name: string;
806
+ ios?: {
807
+ team_id: string;
808
+ app_id_prefix?: string;
809
+ bundle: string;
810
+ app_clip?: string;
811
+ watch?: string;
812
+ };
813
+ android?: {
814
+ package: string;
815
+ fingerprints: ({
816
+ label: string;
817
+ sha256: string;
818
+ })[];
819
+ };
820
+ web?: {
821
+ origins: string[];
822
+ redirects?: string[];
823
+ };
824
+ suspended: boolean;
825
+ key?: {
826
+ id: string;
827
+ key: string;
828
+ };
829
+ updated_at: string;
830
+ }>>;
831
+ removeFrom(input: {
832
+ path: {
833
+ ref: string;
834
+ app: string;
835
+ };
836
+ headers?: {
837
+ "Idempotency-Key"?: string;
838
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
839
+ signal?: AbortSignal;
840
+ }): Promise<Reply<204, undefined>>;
841
+ config(input: {
842
+ path: {
843
+ ref: string;
844
+ app: string;
845
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
846
+ signal?: AbortSignal;
847
+ }): Promise<Reply<200, {
848
+ schema: 1;
849
+ project: {
850
+ id: string;
851
+ name: string;
852
+ };
853
+ environment: {
854
+ ref: string;
855
+ slug: string;
856
+ name: string;
857
+ production: boolean;
858
+ };
859
+ app: {
860
+ id: string;
861
+ name: string;
862
+ slug: string;
863
+ platform: "ios" | "android" | "web";
864
+ ios?: {
865
+ team_id: string;
866
+ app_id_prefix?: string;
867
+ bundle: string;
868
+ app_clip?: string;
869
+ watch?: string;
870
+ };
871
+ android?: {
872
+ package: string;
873
+ fingerprints: ({
874
+ label: string;
875
+ sha256: string;
876
+ })[];
877
+ };
878
+ web?: {
879
+ origins: string[];
880
+ redirects?: string[];
881
+ };
882
+ };
883
+ url: string;
884
+ publishable_key: string;
885
+ keychain_group?: string;
886
+ auth: {
887
+ rp_id: string;
888
+ associated_domains: string[];
889
+ };
890
+ realtime: {
891
+ url: string;
892
+ };
893
+ backends: ({
894
+ machine: string;
895
+ url: string;
896
+ contract_digest?: string;
897
+ })[];
898
+ digest: string;
899
+ }>>;
900
+ };
901
+ snippets: {
902
+ list(input: {
903
+ path: {
904
+ ref: string;
905
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
906
+ signal?: AbortSignal;
907
+ }): Promise<Reply<200, {
908
+ snippets: ({
909
+ id: string;
910
+ name: string;
911
+ sql: string;
912
+ folder: string | null;
913
+ createdBy: string | null;
914
+ createdAt: string;
915
+ })[];
916
+ }>>;
917
+ create(input: {
918
+ path: {
919
+ ref: string;
920
+ };
921
+ headers?: {
922
+ "Idempotency-Key"?: string;
923
+ };
924
+ body: {
925
+ name: string;
926
+ sql: string;
927
+ folder?: string | null;
928
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
929
+ signal?: AbortSignal;
930
+ }): Promise<Reply<200, {
931
+ id: string;
932
+ name: string;
933
+ sql: string;
934
+ folder: string | null;
935
+ createdBy: string | null;
936
+ createdAt: string;
937
+ }>>;
938
+ remove(input: {
939
+ path: {
940
+ ref: string;
941
+ id: string;
942
+ };
943
+ headers?: {
944
+ "Idempotency-Key"?: string;
945
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
946
+ signal?: AbortSignal;
947
+ }): Promise<Reply<204, undefined>>;
948
+ change(input: {
949
+ path: {
950
+ ref: string;
951
+ id: string;
952
+ };
953
+ headers?: {
954
+ "Idempotency-Key"?: string;
955
+ };
956
+ body?: {
957
+ name?: string;
958
+ folder?: string | null;
959
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
960
+ signal?: AbortSignal;
961
+ }): Promise<Reply<200, {
962
+ id: string;
963
+ name: string;
964
+ sql: string;
965
+ folder: string | null;
966
+ createdBy: string | null;
967
+ createdAt: string;
968
+ }>>;
969
+ };
970
+ chartViews: {
971
+ list(input: {
972
+ path: {
973
+ ref: string;
974
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
975
+ signal?: AbortSignal;
976
+ }): Promise<Reply<200, {
977
+ views: ({
978
+ id: string;
979
+ name: string;
980
+ chart: string;
981
+ query: {
982
+ range: "custom" | "last_7_days" | "last_28_days" | "last_90_days" | "last_12_months" | "all_time";
983
+ from?: string;
984
+ to?: string;
985
+ resolution: "month" | "day" | "week";
986
+ segment?: string;
987
+ filters: ({
988
+ dimension: string;
989
+ value: string;
990
+ })[];
991
+ sandbox: boolean;
992
+ revenue_type?: "gross" | "net_of_taxes" | "proceeds";
993
+ window_days?: number;
994
+ cohort?: "new_customers" | "new_paying_customers";
995
+ };
996
+ createdBy: string | null;
997
+ createdAt: string;
998
+ })[];
999
+ }>>;
1000
+ create(input: {
1001
+ path: {
1002
+ ref: string;
1003
+ };
1004
+ headers?: {
1005
+ "Idempotency-Key"?: string;
1006
+ };
1007
+ body: {
1008
+ name: string;
1009
+ chart: string;
1010
+ query: {
1011
+ range: "last_7_days" | "last_28_days" | "last_90_days" | "last_12_months" | "all_time" | "custom";
1012
+ from?: string;
1013
+ to?: string;
1014
+ resolution: "day" | "week" | "month";
1015
+ segment?: string;
1016
+ filters: ({
1017
+ dimension: string;
1018
+ value: string;
1019
+ })[];
1020
+ sandbox: boolean;
1021
+ revenue_type?: "gross" | "net_of_taxes" | "proceeds";
1022
+ window_days?: number;
1023
+ cohort?: "new_customers" | "new_paying_customers";
1024
+ };
1025
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1026
+ signal?: AbortSignal;
1027
+ }): Promise<Reply<200, {
1028
+ id: string;
1029
+ name: string;
1030
+ chart: string;
1031
+ query: {
1032
+ range: "custom" | "last_7_days" | "last_28_days" | "last_90_days" | "last_12_months" | "all_time";
1033
+ from?: string;
1034
+ to?: string;
1035
+ resolution: "month" | "day" | "week";
1036
+ segment?: string;
1037
+ filters: ({
1038
+ dimension: string;
1039
+ value: string;
1040
+ })[];
1041
+ sandbox: boolean;
1042
+ revenue_type?: "gross" | "net_of_taxes" | "proceeds";
1043
+ window_days?: number;
1044
+ cohort?: "new_customers" | "new_paying_customers";
1045
+ };
1046
+ createdBy: string | null;
1047
+ createdAt: string;
1048
+ }>>;
1049
+ remove(input: {
1050
+ path: {
1051
+ ref: string;
1052
+ id: string;
1053
+ };
1054
+ headers?: {
1055
+ "Idempotency-Key"?: string;
1056
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1057
+ signal?: AbortSignal;
1058
+ }): Promise<Reply<204, undefined>>;
1059
+ change(input: {
1060
+ path: {
1061
+ ref: string;
1062
+ id: string;
1063
+ };
1064
+ headers?: {
1065
+ "Idempotency-Key"?: string;
1066
+ };
1067
+ body?: {
1068
+ name?: string;
1069
+ query?: {
1070
+ range: "last_7_days" | "last_28_days" | "last_90_days" | "last_12_months" | "all_time" | "custom";
1071
+ from?: string;
1072
+ to?: string;
1073
+ resolution: "day" | "week" | "month";
1074
+ segment?: string;
1075
+ filters: ({
1076
+ dimension: string;
1077
+ value: string;
1078
+ })[];
1079
+ sandbox: boolean;
1080
+ revenue_type?: "gross" | "net_of_taxes" | "proceeds";
1081
+ window_days?: number;
1082
+ cohort?: "new_customers" | "new_paying_customers";
1083
+ };
1084
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1085
+ signal?: AbortSignal;
1086
+ }): Promise<Reply<200, {
1087
+ id: string;
1088
+ name: string;
1089
+ chart: string;
1090
+ query: {
1091
+ range: "custom" | "last_7_days" | "last_28_days" | "last_90_days" | "last_12_months" | "all_time";
1092
+ from?: string;
1093
+ to?: string;
1094
+ resolution: "month" | "day" | "week";
1095
+ segment?: string;
1096
+ filters: ({
1097
+ dimension: string;
1098
+ value: string;
1099
+ })[];
1100
+ sandbox: boolean;
1101
+ revenue_type?: "gross" | "net_of_taxes" | "proceeds";
1102
+ window_days?: number;
1103
+ cohort?: "new_customers" | "new_paying_customers";
1104
+ };
1105
+ createdBy: string | null;
1106
+ createdAt: string;
1107
+ }>>;
1108
+ };
1109
+ webhooks: {
1110
+ list(input: {
1111
+ path: {
1112
+ ref: string;
1113
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1114
+ signal?: AbortSignal;
1115
+ }): Promise<Reply<200, {
1116
+ endpoints: ({
1117
+ id: string;
1118
+ url: string;
1119
+ events: string[];
1120
+ created_at: string;
1121
+ machine?: string;
1122
+ created_by?: {
1123
+ id: string;
1124
+ name: string;
1125
+ };
1126
+ })[];
1127
+ }>>;
1128
+ add(input: {
1129
+ path: {
1130
+ ref: string;
1131
+ };
1132
+ headers?: {
1133
+ "Idempotency-Key"?: string;
1134
+ };
1135
+ body: {
1136
+ url: string;
1137
+ events?: string[];
1138
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1139
+ signal?: AbortSignal;
1140
+ }): Promise<Reply<200, {
1141
+ id: string;
1142
+ url: string;
1143
+ events: string[];
1144
+ created_at: string;
1145
+ machine?: string;
1146
+ created_by?: {
1147
+ id: string;
1148
+ name: string;
1149
+ };
1150
+ secret: string;
1151
+ }>>;
1152
+ deliveries(input: {
1153
+ path: {
1154
+ ref: string;
1155
+ };
1156
+ query?: {
1157
+ failed?: "1" | "true";
1158
+ all?: "1" | "true";
1159
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1160
+ signal?: AbortSignal;
1161
+ }): Promise<Reply<200, {
1162
+ deliveries: ({
1163
+ id: string;
1164
+ endpoint_id: string;
1165
+ event_id: string;
1166
+ event_type: string;
1167
+ attempts: number;
1168
+ last_error: string;
1169
+ failed_at: string;
1170
+ redeliver_asked_at: string | null;
1171
+ redelivered_at: string | null;
1172
+ redelivery_error: string | null;
1173
+ })[];
1174
+ }>>;
1175
+ redeliver(input: {
1176
+ path: {
1177
+ ref: string;
1178
+ delivery: string;
1179
+ };
1180
+ headers?: {
1181
+ "Idempotency-Key"?: string;
1182
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1183
+ signal?: AbortSignal;
1184
+ }): Promise<Reply<200, {
1185
+ id: string;
1186
+ endpoint_id: string;
1187
+ event_id: string;
1188
+ event_type: string;
1189
+ attempts: number;
1190
+ last_error: string;
1191
+ failed_at: string;
1192
+ redeliver_asked_at: string | null;
1193
+ redelivered_at: string | null;
1194
+ redelivery_error: string | null;
1195
+ }>>;
1196
+ change(input: {
1197
+ path: {
1198
+ ref: string;
1199
+ endpoint: string;
1200
+ };
1201
+ headers?: {
1202
+ "Idempotency-Key"?: string;
1203
+ };
1204
+ body: {
1205
+ url: string;
1206
+ events?: string[];
1207
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1208
+ signal?: AbortSignal;
1209
+ }): Promise<Reply<200, {
1210
+ id: string;
1211
+ url: string;
1212
+ events: string[];
1213
+ created_at: string;
1214
+ machine?: string;
1215
+ created_by?: {
1216
+ id: string;
1217
+ name: string;
1218
+ };
1219
+ }>>;
1220
+ remove(input: {
1221
+ path: {
1222
+ ref: string;
1223
+ endpoint: string;
1224
+ };
1225
+ headers?: {
1226
+ "Idempotency-Key"?: string;
1227
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1228
+ signal?: AbortSignal;
1229
+ }): Promise<Reply<204, undefined>>;
1230
+ };
1231
+ environmentTokens: {
1232
+ list(input: {
1233
+ path: {
1234
+ ref: string;
1235
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1236
+ signal?: AbortSignal;
1237
+ }): Promise<Reply<200, {
1238
+ tokens: ({
1239
+ id: string;
1240
+ environment_ref: string;
1241
+ name: string;
1242
+ scopes: ((("machines:read") | ("machines:logs") | ("apps:sync") | ("auth:test-users") | "support")[]) | null;
1243
+ role: ("admin" | "member") | null;
1244
+ on_behalf_of: string | null;
1245
+ hint: string;
1246
+ minted_by: string;
1247
+ created_at: string;
1248
+ expires_at: string;
1249
+ last_used_at: string | null;
1250
+ })[];
1251
+ }>>;
1252
+ mint(input: {
1253
+ path: {
1254
+ ref: string;
1255
+ };
1256
+ headers?: {
1257
+ "Idempotency-Key"?: string;
1258
+ };
1259
+ body?: {
1260
+ name?: string;
1261
+ scopes?: ("machines:read" | "machines:logs" | "apps:sync" | "auth:test-users" | "support")[];
1262
+ expires_in_minutes?: number;
1263
+ role?: "member" | "admin";
1264
+ on_behalf_of?: string;
1265
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1266
+ signal?: AbortSignal;
1267
+ }): Promise<Reply<200, {
1268
+ id: string;
1269
+ environment_ref: string;
1270
+ name: string;
1271
+ scopes: ((("machines:read") | ("machines:logs") | ("apps:sync") | ("auth:test-users") | "support")[]) | null;
1272
+ role: ("admin" | "member") | null;
1273
+ on_behalf_of: string | null;
1274
+ hint: string;
1275
+ minted_by: string;
1276
+ created_at: string;
1277
+ expires_at: string;
1278
+ last_used_at: string | null;
1279
+ token: string;
1280
+ }>>;
1281
+ revoke(input: {
1282
+ path: {
1283
+ ref: string;
1284
+ id: string;
1285
+ };
1286
+ headers?: {
1287
+ "Idempotency-Key"?: string;
1288
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1289
+ signal?: AbortSignal;
1290
+ }): Promise<Reply<204, undefined>>;
1291
+ };
1292
+ billing: {
1293
+ bill(input: {
1294
+ path: {
1295
+ id: string;
1296
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1297
+ signal?: AbortSignal;
1298
+ }): Promise<Reply<200, {
1299
+ environments: ({
1300
+ platform_id: string;
1301
+ ref: string;
1302
+ name: string;
1303
+ project_id: string;
1304
+ project_name: string;
1305
+ })[];
1306
+ organization_id: string;
1307
+ exempt: boolean;
1308
+ has_account: boolean;
1309
+ paying: boolean;
1310
+ enforced: boolean;
1311
+ account: ({
1312
+ stripe_mode: "live" | "test";
1313
+ payment_method: string | null;
1314
+ terms_version: string | null;
1315
+ terms_accepted_at: string | null;
1316
+ }) | null;
1317
+ period: string;
1318
+ charged_micros?: number;
1319
+ gross_micros?: number;
1320
+ taken_micros?: number;
1321
+ projects: ({
1322
+ project_id: string;
1323
+ ref: string;
1324
+ name: string;
1325
+ plan: "free" | "pay_as_you_go";
1326
+ paid: boolean;
1327
+ frozen: boolean;
1328
+ at_limit: boolean;
1329
+ gone: boolean;
1330
+ deleted: boolean;
1331
+ wallet?: {
1332
+ balance_micros: number;
1333
+ auto_topup: boolean;
1334
+ auto_threshold_micros: number;
1335
+ auto_amount_micros: number;
1336
+ monthly_limit_micros: number | null;
1337
+ low_balance_days: number;
1338
+ exhausted: boolean;
1339
+ topup_failures: number;
1340
+ };
1341
+ charged_micros?: number;
1342
+ gross_micros?: number;
1343
+ taken_micros?: number;
1344
+ items: ({
1345
+ item: string;
1346
+ units: number;
1347
+ gross_micros?: number;
1348
+ micros?: number;
1349
+ })[];
1350
+ })[];
1351
+ }>>;
1352
+ confirm(input: {
1353
+ path: {
1354
+ id: string;
1355
+ session: string;
1356
+ };
1357
+ headers?: {
1358
+ "Idempotency-Key"?: string;
1359
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1360
+ signal?: AbortSignal;
1361
+ }): Promise<Reply<200, {
1362
+ paid: boolean;
1363
+ saved: boolean;
1364
+ }>>;
1365
+ cards(input: {
1366
+ path: {
1367
+ id: string;
1368
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1369
+ signal?: AbortSignal;
1370
+ }): Promise<Reply<200, {
1371
+ cards: ({
1372
+ id: string;
1373
+ brand: string;
1374
+ last4: string;
1375
+ exp_month: number;
1376
+ exp_year: number;
1377
+ default: boolean;
1378
+ })[];
1379
+ }>>;
1380
+ defaultCard(input: {
1381
+ path: {
1382
+ id: string;
1383
+ card: string;
1384
+ };
1385
+ headers?: {
1386
+ "Idempotency-Key"?: string;
1387
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1388
+ signal?: AbortSignal;
1389
+ }): Promise<Reply<200, {
1390
+ cards: ({
1391
+ id: string;
1392
+ brand: string;
1393
+ last4: string;
1394
+ exp_month: number;
1395
+ exp_year: number;
1396
+ default: boolean;
1397
+ })[];
1398
+ }>>;
1399
+ removeCard(input: {
1400
+ path: {
1401
+ id: string;
1402
+ card: string;
1403
+ };
1404
+ headers?: {
1405
+ "Idempotency-Key"?: string;
1406
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1407
+ signal?: AbortSignal;
1408
+ }): Promise<Reply<200, {
1409
+ cards: ({
1410
+ id: string;
1411
+ brand: string;
1412
+ last4: string;
1413
+ exp_month: number;
1414
+ exp_year: number;
1415
+ default: boolean;
1416
+ })[];
1417
+ }>>;
1418
+ customer(input: {
1419
+ path: {
1420
+ id: string;
1421
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1422
+ signal?: AbortSignal;
1423
+ }): Promise<Reply<200, {
1424
+ name: string;
1425
+ email: string;
1426
+ address: ({
1427
+ line1: string;
1428
+ line2: string;
1429
+ city: string;
1430
+ postal_code: string;
1431
+ state: string;
1432
+ country: string;
1433
+ }) | null;
1434
+ tax_ids: ({
1435
+ id?: string;
1436
+ type: string;
1437
+ value: string;
1438
+ status?: string;
1439
+ })[];
1440
+ }>>;
1441
+ setCustomer(input: {
1442
+ path: {
1443
+ id: string;
1444
+ };
1445
+ headers?: {
1446
+ "Idempotency-Key"?: string;
1447
+ };
1448
+ body: {
1449
+ name: string;
1450
+ address: {
1451
+ line1: string;
1452
+ line2?: string;
1453
+ city?: string;
1454
+ postal_code?: string;
1455
+ state?: string;
1456
+ country: string;
1457
+ };
1458
+ tax_id: ({
1459
+ type: string;
1460
+ value: string;
1461
+ }) | null;
1462
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1463
+ signal?: AbortSignal;
1464
+ }): Promise<Reply<200, {
1465
+ name: string;
1466
+ email: string;
1467
+ address: ({
1468
+ line1: string;
1469
+ line2: string;
1470
+ city: string;
1471
+ postal_code: string;
1472
+ state: string;
1473
+ country: string;
1474
+ }) | null;
1475
+ tax_ids: ({
1476
+ id?: string;
1477
+ type: string;
1478
+ value: string;
1479
+ status?: string;
1480
+ })[];
1481
+ }>>;
1482
+ charges(input: {
1483
+ path: {
1484
+ id: string;
1485
+ };
1486
+ query?: {
1487
+ period?: string;
1488
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1489
+ signal?: AbortSignal;
1490
+ }): Promise<Reply<200, {
1491
+ period: string;
1492
+ charges: ({
1493
+ project_id: string;
1494
+ item: string;
1495
+ units: number;
1496
+ gross_micros: number;
1497
+ micros: number;
1498
+ environment: ({
1499
+ platform_id: string;
1500
+ ref: string;
1501
+ name: string;
1502
+ project_id: string;
1503
+ project_name: string;
1504
+ }) | null;
1505
+ })[];
1506
+ taken_micros: {
1507
+ [key: string]: number;
1508
+ };
1509
+ }>>;
1510
+ csv(input: {
1511
+ path: {
1512
+ id: string;
1513
+ };
1514
+ query?: {
1515
+ period?: string;
1516
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1517
+ signal?: AbortSignal;
1518
+ }): Promise<Reply<number, Response>>;
1519
+ invoices(input: {
1520
+ path: {
1521
+ id: string;
1522
+ };
1523
+ query?: {
1524
+ environment?: string;
1525
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1526
+ signal?: AbortSignal;
1527
+ }): Promise<Reply<200, {
1528
+ invoices: ({
1529
+ id: string;
1530
+ kind: "checkout" | "auto" | "card" | "bank_transfer";
1531
+ project_id: string | null;
1532
+ project_ref: string | null;
1533
+ project_name: string | null;
1534
+ status: string;
1535
+ amount_micros: number;
1536
+ tax_micros: number;
1537
+ refunded_micros: number;
1538
+ hosted_url: string | null;
1539
+ pdf_url: string | null;
1540
+ created_at: string;
1541
+ number: string | null;
1542
+ environment: ({
1543
+ platform_id: string;
1544
+ ref: string;
1545
+ name: string;
1546
+ project_id: string;
1547
+ project_name: string;
1548
+ }) | null;
1549
+ })[];
1550
+ }>>;
1551
+ transfer(input: {
1552
+ path: {
1553
+ id: string;
1554
+ };
1555
+ headers?: {
1556
+ "Idempotency-Key"?: string;
1557
+ };
1558
+ body: {
1559
+ from: string;
1560
+ to: string;
1561
+ amount_micros?: number;
1562
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1563
+ signal?: AbortSignal;
1564
+ }): Promise<Reply<200, {
1565
+ moved_micros: number;
1566
+ from: string;
1567
+ to: string;
1568
+ }>>;
1569
+ environment(input: {
1570
+ path: {
1571
+ id: string;
1572
+ ref: string;
1573
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1574
+ signal?: AbortSignal;
1575
+ }): Promise<Reply<200, {
1576
+ project_id: string;
1577
+ ref: string;
1578
+ name: string;
1579
+ plan: "free" | "pay_as_you_go";
1580
+ paid: boolean;
1581
+ frozen: boolean;
1582
+ at_limit: boolean;
1583
+ gone: boolean;
1584
+ deleted: boolean;
1585
+ wallet?: {
1586
+ balance_micros: number;
1587
+ auto_topup: boolean;
1588
+ auto_threshold_micros: number;
1589
+ auto_amount_micros: number;
1590
+ monthly_limit_micros: number | null;
1591
+ low_balance_days: number;
1592
+ exhausted: boolean;
1593
+ topup_failures: number;
1594
+ };
1595
+ charged_micros?: number;
1596
+ gross_micros?: number;
1597
+ taken_micros?: number;
1598
+ items: ({
1599
+ item: string;
1600
+ units: number;
1601
+ gross_micros?: number;
1602
+ micros?: number;
1603
+ })[];
1604
+ environment: {
1605
+ platform_id: string;
1606
+ ref: string;
1607
+ name: string;
1608
+ project_id: string;
1609
+ project_name: string;
1610
+ };
1611
+ }>>;
1612
+ steer(input: {
1613
+ path: {
1614
+ id: string;
1615
+ ref: string;
1616
+ };
1617
+ headers?: {
1618
+ "Idempotency-Key"?: string;
1619
+ };
1620
+ body?: {
1621
+ plan?: "free" | "pay_as_you_go";
1622
+ frozen?: boolean;
1623
+ monthly_limit_micros?: number | null;
1624
+ auto_topup?: boolean;
1625
+ auto_threshold_micros?: number;
1626
+ auto_amount_micros?: number;
1627
+ low_balance_days?: number;
1628
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1629
+ signal?: AbortSignal;
1630
+ }): Promise<Reply<200, {
1631
+ project_id: string;
1632
+ ref: string;
1633
+ name: string;
1634
+ plan: "free" | "pay_as_you_go";
1635
+ paid: boolean;
1636
+ frozen: boolean;
1637
+ at_limit: boolean;
1638
+ gone: boolean;
1639
+ deleted: boolean;
1640
+ wallet?: {
1641
+ balance_micros: number;
1642
+ auto_topup: boolean;
1643
+ auto_threshold_micros: number;
1644
+ auto_amount_micros: number;
1645
+ monthly_limit_micros: number | null;
1646
+ low_balance_days: number;
1647
+ exhausted: boolean;
1648
+ topup_failures: number;
1649
+ };
1650
+ charged_micros?: number;
1651
+ gross_micros?: number;
1652
+ taken_micros?: number;
1653
+ items: ({
1654
+ item: string;
1655
+ units: number;
1656
+ gross_micros?: number;
1657
+ micros?: number;
1658
+ })[];
1659
+ environment: {
1660
+ platform_id: string;
1661
+ ref: string;
1662
+ name: string;
1663
+ project_id: string;
1664
+ project_name: string;
1665
+ };
1666
+ }>>;
1667
+ topUp(input: {
1668
+ path: {
1669
+ id: string;
1670
+ ref: string;
1671
+ };
1672
+ headers?: {
1673
+ "Idempotency-Key"?: string;
1674
+ };
1675
+ body: {
1676
+ amount_micros: number;
1677
+ payment_method?: string;
1678
+ plan?: "pay_as_you_go";
1679
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1680
+ signal?: AbortSignal;
1681
+ }): Promise<Reply<200, {
1682
+ invoice_id: string;
1683
+ status: string;
1684
+ hosted_url?: string;
1685
+ }>>;
1686
+ bankTransfer(input: {
1687
+ path: {
1688
+ id: string;
1689
+ ref: string;
1690
+ };
1691
+ headers?: {
1692
+ "Idempotency-Key"?: string;
1693
+ };
1694
+ body: {
1695
+ amount_micros: number;
1696
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1697
+ signal?: AbortSignal;
1698
+ }): Promise<Reply<200, {
1699
+ invoice_id: string;
1700
+ status: string;
1701
+ hosted_url?: string;
1702
+ }>>;
1703
+ ledger(input: {
1704
+ path: {
1705
+ id: string;
1706
+ ref: string;
1707
+ };
1708
+ query?: {
1709
+ before?: number;
1710
+ kind?: string;
1711
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1712
+ signal?: AbortSignal;
1713
+ }): Promise<Reply<200, {
1714
+ lines: ({
1715
+ from_environment?: string | null;
1716
+ to_environment?: string | null;
1717
+ id: number;
1718
+ kind: "topup" | "bonus" | "usage" | "expiry" | "refund" | "adjustment" | "transfer" | "forfeit";
1719
+ amount_micros: number;
1720
+ ref: string;
1721
+ remaining_micros: number | null;
1722
+ expires_at: string | null;
1723
+ created_at: string;
1724
+ via: string | null;
1725
+ invoice: string | null;
1726
+ from_project?: string;
1727
+ to_project?: string;
1728
+ })[];
1729
+ }>>;
1730
+ };
1731
+ accessRequests: {
1732
+ request(input: {
1733
+ headers?: {
1734
+ "Idempotency-Key"?: string;
1735
+ };
1736
+ body: {
1737
+ email: string;
1738
+ name?: string;
1739
+ building?: string;
1740
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1741
+ signal?: AbortSignal;
1742
+ }): Promise<Reply<200, {
1743
+ status: "received";
1744
+ }>>;
1745
+ };
1746
+ docs: {
1747
+ search(input: {
1748
+ query: {
1749
+ q: string;
1750
+ limit?: number;
1751
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1752
+ signal?: AbortSignal;
1753
+ }): Promise<Reply<200, {
1754
+ results: ({
1755
+ title: string;
1756
+ heading: string;
1757
+ url: string;
1758
+ text: string;
1759
+ cut: boolean;
1760
+ score: number;
1761
+ })[];
1762
+ }>>;
1763
+ };
1764
+ };
1765
+ export type Client = ReturnType<typeof client>;