@diagonal-hq/cli 0.0.0-stage → 0.2.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.
@@ -0,0 +1,2158 @@
1
+ import type { ResourceKeyWith } from '../data';
2
+ import type { ContentDocument } from '../input';
3
+ export declare const SDK_VERSION = 55;
4
+ export interface AiDecideInput {
5
+ state: unknown;
6
+ questions: Array<{
7
+ key?: string;
8
+ type?: "choice" | "noul" | "score";
9
+ instructions?: unknown;
10
+ criteria?: Array<{
11
+ name?: string;
12
+ description?: string;
13
+ [key: string]: unknown;
14
+ }>;
15
+ [key: string]: unknown;
16
+ }>;
17
+ }
18
+ export type AiDecideOutput = Record<string, unknown>;
19
+ export interface AiRunPromptInput {
20
+ prompt: unknown;
21
+ attachments?: Array<string> | null;
22
+ modelPreset?: "auto" | "fast" | "balanced" | "smart" | null;
23
+ outputSchema?: unknown;
24
+ strict?: boolean | null;
25
+ }
26
+ export type AiRunPromptOutput = string;
27
+ export interface AuthImpersonateInput {
28
+ resource: ResourceKeyWith<"authenticatable">;
29
+ record: string;
30
+ }
31
+ export type AuthImpersonateOutput = {
32
+ success?: boolean;
33
+ redirect_url?: unknown;
34
+ error?: unknown;
35
+ [key: string]: unknown;
36
+ };
37
+ export interface AuthLoginInput {
38
+ resource: ResourceKeyWith<"authenticatable">;
39
+ record: string;
40
+ }
41
+ export type AuthLoginOutput = boolean;
42
+ export interface CalendarGenerateLinkInput {
43
+ type: "apple" | "google" | "outlook";
44
+ resource: ResourceKeyWith<"eventable">;
45
+ record: string;
46
+ }
47
+ export type CalendarGenerateLinkOutput = unknown;
48
+ export interface CalendarSearchEventsInput {
49
+ resource: ResourceKeyWith<"eventable">;
50
+ from: string;
51
+ to: string;
52
+ filters?: unknown;
53
+ relations?: Array<string>;
54
+ }
55
+ export type CalendarSearchEventsOutput = {
56
+ data?: Array<Record<string, unknown>>;
57
+ [key: string]: unknown;
58
+ };
59
+ export interface CallbackGetInput {
60
+ key: string;
61
+ default?: unknown;
62
+ }
63
+ export type CallbackGetOutput = string;
64
+ export interface CallbackRemoveInput {
65
+ key: string;
66
+ }
67
+ export type CallbackRemoveOutput = string;
68
+ export interface CallbackSetInput {
69
+ key?: string;
70
+ value?: unknown;
71
+ }
72
+ export type CallbackSetOutput = string;
73
+ export interface ChartDistributionInput {
74
+ resource: string;
75
+ categoryField: string;
76
+ valueField?: string | null;
77
+ filters?: unknown;
78
+ limit?: number | null;
79
+ }
80
+ export type ChartDistributionOutput = Array<{
81
+ category?: string;
82
+ count?: number;
83
+ total?: number;
84
+ [key: string]: unknown;
85
+ }>;
86
+ export interface ChartKpiInput {
87
+ resource: string;
88
+ metrics?: Array<{
89
+ name?: string;
90
+ operation?: "count" | "sum" | "avg" | "min" | "max" | "distinct";
91
+ field?: string;
92
+ [key: string]: unknown;
93
+ }>;
94
+ filters?: unknown;
95
+ }
96
+ export type ChartKpiOutput = Record<string, unknown>;
97
+ export interface ChartLeaderboardInput {
98
+ resource: string;
99
+ entityField: string;
100
+ operation: "count" | "sum" | "avg";
101
+ valueField?: string | null;
102
+ metricName: string;
103
+ filters?: unknown;
104
+ limit: number;
105
+ }
106
+ export type ChartLeaderboardOutput = Array<{
107
+ entity?: string;
108
+ value?: number;
109
+ count?: number;
110
+ [key: string]: unknown;
111
+ }>;
112
+ export interface ChartTimeSeriesInput {
113
+ resource: string;
114
+ dateField: string;
115
+ granularity: "hour" | "day" | "week" | "month" | "quarter" | "year";
116
+ metrics?: Array<{
117
+ name?: string;
118
+ operation?: "count" | "sum" | "avg" | "min" | "max";
119
+ field?: string;
120
+ [key: string]: unknown;
121
+ }>;
122
+ filters?: unknown;
123
+ limit?: number | null;
124
+ }
125
+ export type ChartTimeSeriesOutput = Array<Record<string, unknown>>;
126
+ export interface DataAggregateMetricsInput {
127
+ resource: string;
128
+ groupBy?: Array<string>;
129
+ dateGranularity?: "hour" | "day" | "week" | "month" | "quarter" | "year" | null;
130
+ metrics?: Array<{
131
+ name?: string;
132
+ operation?: "count" | "sum" | "avg" | "min" | "max" | "distinct";
133
+ field?: string;
134
+ [key: string]: unknown;
135
+ }>;
136
+ filters?: unknown;
137
+ sort?: Array<{
138
+ field?: string;
139
+ direction?: "asc" | "desc";
140
+ [key: string]: unknown;
141
+ }>;
142
+ limit?: number | null;
143
+ }
144
+ export type DataAggregateMetricsOutput = Array<Record<string, unknown>>;
145
+ export interface DataCountInput {
146
+ resource: string;
147
+ search?: string | null;
148
+ filters?: unknown;
149
+ sort?: Array<{
150
+ field?: string;
151
+ direction?: "asc" | "desc";
152
+ [key: string]: unknown;
153
+ }>;
154
+ relations?: Array<string>;
155
+ recordScope?: "active" | "archived" | "activeOrArchived" | null;
156
+ page?: number | null;
157
+ pageSize?: number | null;
158
+ }
159
+ export type DataCountOutput = number;
160
+ export interface DataCreateInput {
161
+ resource: string;
162
+ data: Record<string, unknown>;
163
+ operation?: Record<string, unknown> | null;
164
+ }
165
+ export type DataCreateOutput = Record<string, unknown>;
166
+ export interface DataCreateManyInput {
167
+ resource: string;
168
+ records: Array<Record<string, unknown>>;
169
+ }
170
+ export type DataCreateManyOutput = Array<Record<string, unknown>>;
171
+ export interface DataDeleteInput {
172
+ resource: string;
173
+ record: string;
174
+ confirmSideEffects?: boolean | null;
175
+ operation?: Record<string, unknown> | null;
176
+ }
177
+ export type DataDeleteOutput = Record<string, unknown>;
178
+ export interface DataDeleteManyInput {
179
+ resource: string;
180
+ filters: unknown;
181
+ }
182
+ export type DataDeleteManyOutput = {
183
+ deleted_count?: number;
184
+ deleted_ids?: Array<string>;
185
+ [key: string]: unknown;
186
+ };
187
+ export interface DataFindInput {
188
+ resource: string;
189
+ mode?: "filters" | "record" | null;
190
+ record?: string | null;
191
+ filters?: unknown;
192
+ requiredFilters?: unknown;
193
+ recordScope?: "active" | "archived" | "activeOrArchived" | null;
194
+ relations?: Array<string>;
195
+ }
196
+ export type DataFindOutput = Record<string, unknown>;
197
+ export interface DataFindOrCreateInput {
198
+ resource: string;
199
+ attributes: Record<string, unknown>;
200
+ data: Record<string, unknown>;
201
+ operation?: Record<string, unknown> | null;
202
+ }
203
+ export type DataFindOrCreateOutput = Record<string, unknown>;
204
+ export interface DataRelationAttachInput {
205
+ resource: string;
206
+ record: string;
207
+ relation: string;
208
+ related: string;
209
+ }
210
+ export type DataRelationAttachOutput = Record<string, unknown>;
211
+ export interface DataRelationAttachManyInput {
212
+ resource: string;
213
+ record: string;
214
+ relation: string;
215
+ relatedIds?: Array<string> | null;
216
+ }
217
+ export type DataRelationAttachManyOutput = Record<string, unknown>;
218
+ export interface DataRelationDetachInput {
219
+ resource: string;
220
+ record: string;
221
+ relation: string;
222
+ related: string;
223
+ }
224
+ export type DataRelationDetachOutput = Record<string, unknown>;
225
+ export interface DataRelationDetachManyInput {
226
+ resource: string;
227
+ record: string;
228
+ relation: string;
229
+ relatedIds?: Array<string>;
230
+ }
231
+ export type DataRelationDetachManyOutput = Record<string, unknown>;
232
+ export interface DataRelationSyncInput {
233
+ resource: string;
234
+ record: string;
235
+ relation: string;
236
+ relatedIds?: Array<string>;
237
+ }
238
+ export type DataRelationSyncOutput = Record<string, unknown>;
239
+ export interface DataRestoreInput {
240
+ resource: string;
241
+ record: string;
242
+ }
243
+ export type DataRestoreOutput = Record<string, unknown>;
244
+ export interface DataSearchInput {
245
+ resource: string;
246
+ search?: string | null;
247
+ filters?: unknown;
248
+ requiredFilters?: unknown;
249
+ sort?: Array<{
250
+ field?: string;
251
+ direction?: "asc" | "desc";
252
+ [key: string]: unknown;
253
+ }>;
254
+ relations?: Array<string>;
255
+ recordScope?: "active" | "archived" | "activeOrArchived" | null;
256
+ page?: number | null;
257
+ pageSize?: number | null;
258
+ paging?: "cursor" | "page" | null;
259
+ after?: string | null;
260
+ }
261
+ export type DataSearchOutput = {
262
+ data?: Array<Record<string, unknown>>;
263
+ pagination?: {
264
+ total?: unknown;
265
+ per_page?: unknown;
266
+ current_page?: unknown;
267
+ last_page?: unknown;
268
+ [key: string]: unknown;
269
+ };
270
+ [key: string]: unknown;
271
+ };
272
+ export interface DataSemanticSearchInput {
273
+ resource: string;
274
+ query: string;
275
+ filters?: unknown;
276
+ topK?: number | null;
277
+ recordScope?: "active" | "archived" | "activeOrArchived" | null;
278
+ }
279
+ export type DataSemanticSearchOutput = {
280
+ data?: Array<Record<string, unknown>>;
281
+ scores?: Record<string, unknown>;
282
+ [key: string]: unknown;
283
+ };
284
+ export interface DataSumInput {
285
+ resource: string;
286
+ search?: string | null;
287
+ filters?: unknown;
288
+ sort?: Array<{
289
+ field?: string;
290
+ direction?: "asc" | "desc";
291
+ [key: string]: unknown;
292
+ }>;
293
+ relations?: Array<string>;
294
+ recordScope?: "active" | "archived" | "activeOrArchived" | null;
295
+ page?: number | null;
296
+ pageSize?: number | null;
297
+ field: string;
298
+ }
299
+ export type DataSumOutput = number;
300
+ export interface DataUpdateInput {
301
+ resource: string;
302
+ mode?: "filters" | "record" | null;
303
+ record?: string | null;
304
+ filters?: unknown;
305
+ data: Record<string, unknown>;
306
+ operation?: Record<string, unknown> | null;
307
+ }
308
+ export type DataUpdateOutput = Record<string, unknown>;
309
+ export interface DataUpdateOrCreateInput {
310
+ resource: string;
311
+ attributes: Record<string, unknown>;
312
+ data: Record<string, unknown>;
313
+ operation?: Record<string, unknown> | null;
314
+ }
315
+ export type DataUpdateOrCreateOutput = Record<string, unknown>;
316
+ export interface DataValidateInput {
317
+ resource: string;
318
+ data: Record<string, unknown>;
319
+ }
320
+ export type DataValidateOutput = string;
321
+ export interface DateAddInput {
322
+ date: string;
323
+ value: number;
324
+ unit: "days" | "months" | "weeks" | "years";
325
+ }
326
+ export type DateAddOutput = string;
327
+ export interface DateDiffInput {
328
+ start: string;
329
+ end: string;
330
+ unit: "days" | "months" | "weeks" | "years";
331
+ }
332
+ export type DateDiffOutput = number;
333
+ export interface DateEndOfInput {
334
+ date: string;
335
+ unit: "month" | "quarter" | "week" | "year";
336
+ }
337
+ export type DateEndOfOutput = string;
338
+ export interface DateFormatInput {
339
+ date: string;
340
+ format: string;
341
+ }
342
+ export type DateFormatOutput = string;
343
+ export interface DateStartOfInput {
344
+ date: string;
345
+ unit: "month" | "quarter" | "week" | "year";
346
+ }
347
+ export type DateStartOfOutput = string;
348
+ export interface DateSubtractInput {
349
+ date: string;
350
+ value: number;
351
+ unit: "days" | "months" | "weeks" | "years";
352
+ }
353
+ export type DateSubtractOutput = string;
354
+ export interface FileChangeVisibilityInput {
355
+ file: string;
356
+ visibility: "private" | "public";
357
+ }
358
+ export type FileChangeVisibilityOutput = {
359
+ id?: string;
360
+ url?: string;
361
+ is_public?: boolean;
362
+ mime_type?: string;
363
+ original_filename?: string;
364
+ bytes?: unknown;
365
+ width?: unknown;
366
+ height?: unknown;
367
+ sizes?: Array<number>;
368
+ keywords?: unknown;
369
+ created_at?: unknown;
370
+ [key: string]: unknown;
371
+ };
372
+ export interface FileCreateFromUrlInput {
373
+ url: string;
374
+ }
375
+ export type FileCreateFromUrlOutput = {
376
+ id?: string;
377
+ url?: string;
378
+ is_public?: boolean;
379
+ mime_type?: string;
380
+ original_filename?: string;
381
+ bytes?: unknown;
382
+ width?: unknown;
383
+ height?: unknown;
384
+ sizes?: Array<number>;
385
+ keywords?: unknown;
386
+ created_at?: unknown;
387
+ [key: string]: unknown;
388
+ };
389
+ export interface FileCreateMediaLibraryItemInput {
390
+ file: string;
391
+ folderId?: string | null;
392
+ displayName?: string | null;
393
+ }
394
+ export type FileCreateMediaLibraryItemOutput = {
395
+ id?: string;
396
+ workspace_id?: string;
397
+ file_id?: string;
398
+ folder_id?: unknown;
399
+ display_name?: string;
400
+ file?: {
401
+ id?: string;
402
+ url?: string;
403
+ is_public?: boolean;
404
+ mime_type?: string;
405
+ original_filename?: string;
406
+ bytes?: unknown;
407
+ width?: unknown;
408
+ height?: unknown;
409
+ sizes?: Array<number>;
410
+ keywords?: unknown;
411
+ created_at?: unknown;
412
+ [key: string]: unknown;
413
+ };
414
+ created_at?: unknown;
415
+ updated_at?: unknown;
416
+ [key: string]: unknown;
417
+ };
418
+ export interface FileCreateQrCodeInput {
419
+ value: string;
420
+ size?: number | null;
421
+ errorCorrection?: "L" | "M" | "Q" | "H" | null;
422
+ }
423
+ export type FileCreateQrCodeOutput = {
424
+ id?: string;
425
+ url?: string;
426
+ is_public?: boolean;
427
+ mime_type?: string;
428
+ original_filename?: string;
429
+ bytes?: unknown;
430
+ width?: unknown;
431
+ height?: unknown;
432
+ sizes?: Array<number>;
433
+ keywords?: unknown;
434
+ created_at?: unknown;
435
+ [key: string]: unknown;
436
+ };
437
+ export interface GuardValidateInput {
438
+ value?: unknown;
439
+ guard?: Array<string> | Record<string, unknown> | null;
440
+ haltOnFailure?: boolean;
441
+ }
442
+ export type GuardValidateOutput = boolean;
443
+ export interface HttpRequestInput {
444
+ url: string;
445
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS" | "HEAD";
446
+ headers?: Array<{
447
+ key?: string;
448
+ value?: string;
449
+ [key: string]: unknown;
450
+ }> | null;
451
+ body?: Record<string, unknown> | null;
452
+ query?: Array<{
453
+ key?: string;
454
+ value?: string;
455
+ [key: string]: unknown;
456
+ }> | null;
457
+ }
458
+ export type HttpRequestOutput = {
459
+ status?: unknown;
460
+ headers?: Record<string, unknown>;
461
+ response?: string;
462
+ [key: string]: unknown;
463
+ };
464
+ export interface LifecycleOutputInput {
465
+ record?: unknown;
466
+ }
467
+ export type LifecycleOutputOutput = Record<string, unknown>;
468
+ export interface MailSearchInput {
469
+ emails?: Array<string> | null;
470
+ resource?: string | null;
471
+ record?: string | null;
472
+ includeCurrentAddresses?: boolean | null;
473
+ emailField?: string | null;
474
+ subjectContains?: string | null;
475
+ fromAddress?: string | null;
476
+ statuses?: Array<"bounced" | "deferred" | "delivered" | "dropped" | "failed" | "sending" | "sent" | "spam_reported" | "suppressed"> | null;
477
+ dateFrom?: string | null;
478
+ dateBefore?: string | null;
479
+ limit?: number | null;
480
+ }
481
+ export type MailSearchOutput = {
482
+ total?: number;
483
+ messages?: Array<{
484
+ id?: string;
485
+ subject?: unknown;
486
+ status?: "bounced" | "deferred" | "delivered" | "dropped" | "failed" | "sending" | "sent" | "spam_reported" | "suppressed";
487
+ recorded_at?: unknown;
488
+ recipients?: Array<{
489
+ address?: string;
490
+ status?: "bounced" | "deferred" | "delivered" | "dropped" | "failed" | "sending" | "sent" | "spam_reported" | "suppressed";
491
+ bounce_type?: "hard" | "soft";
492
+ reason?: unknown;
493
+ last_event_at?: unknown;
494
+ [key: string]: unknown;
495
+ }>;
496
+ [key: string]: unknown;
497
+ }>;
498
+ [key: string]: unknown;
499
+ };
500
+ export interface MailSendInput {
501
+ to: Array<string>;
502
+ cc?: Array<string> | null;
503
+ bcc?: Array<string> | null;
504
+ replyTo?: Array<string> | null;
505
+ subject: string;
506
+ emailLayout?: string | null;
507
+ layoutData?: {
508
+ content?: unknown;
509
+ [key: string]: unknown;
510
+ };
511
+ records?: Array<{
512
+ resource_id?: string;
513
+ id?: string;
514
+ [key: string]: unknown;
515
+ }> | null;
516
+ attachments?: Array<string> | null;
517
+ calendarEvents?: Array<{
518
+ resource_id?: string;
519
+ record_id?: string;
520
+ [key: string]: unknown;
521
+ }> | null;
522
+ }
523
+ export type MailSendOutput = {
524
+ success?: boolean;
525
+ status_message?: string;
526
+ recipients?: {
527
+ to?: Array<string>;
528
+ cc?: Array<string>;
529
+ bcc?: Array<string>;
530
+ reply_to?: Array<string>;
531
+ [key: string]: unknown;
532
+ };
533
+ subject?: string;
534
+ content?: string;
535
+ attachments?: Array<{
536
+ id?: string;
537
+ name?: string;
538
+ mime?: string;
539
+ [key: string]: unknown;
540
+ }>;
541
+ [key: string]: unknown;
542
+ };
543
+ export interface MailSendNotificationInput {
544
+ notificationType: string;
545
+ notificationTemplate?: string | null;
546
+ variables?: Record<string, unknown>;
547
+ to: Array<string>;
548
+ cc?: Array<string> | null;
549
+ bcc?: Array<string> | null;
550
+ replyTo?: Array<string> | null;
551
+ records?: Array<{
552
+ resource_id?: string;
553
+ id?: string;
554
+ [key: string]: unknown;
555
+ }> | null;
556
+ attachments?: Array<string> | null;
557
+ calendarEvents?: Array<{
558
+ resource_id?: string;
559
+ record_id?: string;
560
+ [key: string]: unknown;
561
+ }> | null;
562
+ }
563
+ export type MailSendNotificationOutput = {
564
+ success?: boolean;
565
+ status_message?: string;
566
+ recipients?: {
567
+ to?: Array<string>;
568
+ cc?: Array<string>;
569
+ bcc?: Array<string>;
570
+ reply_to?: Array<string>;
571
+ [key: string]: unknown;
572
+ };
573
+ subject?: string;
574
+ content?: string;
575
+ attachments?: Array<{
576
+ id?: string;
577
+ name?: string;
578
+ mime?: string;
579
+ [key: string]: unknown;
580
+ }>;
581
+ [key: string]: unknown;
582
+ };
583
+ export interface MarkdownFromContentInput {
584
+ value?: unknown;
585
+ }
586
+ export type MarkdownFromContentOutput = string;
587
+ export interface MarkdownToContentInput {
588
+ value: string;
589
+ }
590
+ export type MarkdownToContentOutput = ContentDocument;
591
+ export interface MediaLibraryCreateFolderInput {
592
+ name: string;
593
+ parentId?: string | null;
594
+ }
595
+ export type MediaLibraryCreateFolderOutput = string;
596
+ export interface MediaLibraryDeleteItemInput {
597
+ itemId: string;
598
+ }
599
+ export type MediaLibraryDeleteItemOutput = string;
600
+ export interface MediaLibraryMoveItemsInput {
601
+ itemIds: Array<string>;
602
+ folderId?: string | null;
603
+ }
604
+ export type MediaLibraryMoveItemsOutput = Array<string>;
605
+ export interface MediaLibraryUpdateItemInput {
606
+ mediaLibraryItemId: string;
607
+ displayName?: string | null;
608
+ folderId?: string | null;
609
+ }
610
+ export type MediaLibraryUpdateItemOutput = {
611
+ id?: string;
612
+ workspace_id?: string;
613
+ file_id?: string;
614
+ folder_id?: unknown;
615
+ display_name?: string;
616
+ file?: {
617
+ id?: string;
618
+ url?: string;
619
+ is_public?: boolean;
620
+ mime_type?: string;
621
+ original_filename?: string;
622
+ bytes?: unknown;
623
+ width?: unknown;
624
+ height?: unknown;
625
+ sizes?: Array<number>;
626
+ keywords?: unknown;
627
+ created_at?: unknown;
628
+ [key: string]: unknown;
629
+ };
630
+ created_at?: unknown;
631
+ updated_at?: unknown;
632
+ [key: string]: unknown;
633
+ };
634
+ export interface MoneyFormatInput {
635
+ value?: {
636
+ amount: number;
637
+ currency: string;
638
+ [key: string]: unknown;
639
+ } | null;
640
+ }
641
+ export type MoneyFormatOutput = string;
642
+ export interface NotificationSendInput {
643
+ resource: ResourceKeyWith<"notifiable">;
644
+ relations?: Array<string>;
645
+ record: string;
646
+ subject: string;
647
+ emailLayout?: string | null;
648
+ layoutData?: {
649
+ content?: unknown;
650
+ [key: string]: unknown;
651
+ };
652
+ attachments?: Array<string> | null;
653
+ calendarEvents?: Array<{
654
+ resource_id?: string;
655
+ record_id?: string;
656
+ [key: string]: unknown;
657
+ }> | null;
658
+ }
659
+ export type NotificationSendOutput = boolean;
660
+ export interface NotificationSendBulkNotificationsInput {
661
+ notificationType: string;
662
+ notificationTemplate?: string | null;
663
+ variables?: Record<string, unknown>;
664
+ resource: string;
665
+ filters?: unknown;
666
+ recipient: unknown;
667
+ attachments?: Array<string> | null;
668
+ idempotencyKey?: string | null;
669
+ }
670
+ export type NotificationSendBulkNotificationsOutput = {
671
+ processed_count: number;
672
+ queued_count: number;
673
+ failed_count: number;
674
+ duplicate_count: number;
675
+ failures?: Array<{
676
+ record_id: string;
677
+ errors?: Record<string, unknown>;
678
+ [key: string]: unknown;
679
+ }>;
680
+ failures_truncated: boolean;
681
+ [key: string]: unknown;
682
+ };
683
+ export interface NotificationSendNotificationInput {
684
+ deliveryChannel?: "email" | "sms" | "email_and_sms";
685
+ notificationType: string;
686
+ notificationTemplate?: string | null;
687
+ variables?: Record<string, unknown>;
688
+ idempotencyKey?: string | null;
689
+ recipient: unknown;
690
+ records?: Array<{
691
+ resource_id?: string;
692
+ id?: string;
693
+ [key: string]: unknown;
694
+ }> | null;
695
+ attachments?: Array<string> | null;
696
+ calendarEvents?: Array<{
697
+ resource_id?: string;
698
+ record_id?: string;
699
+ [key: string]: unknown;
700
+ }> | null;
701
+ }
702
+ export type NotificationSendNotificationOutput = boolean;
703
+ export interface NotificationSetConsentInput {
704
+ resource: ResourceKeyWith<"notifiable">;
705
+ record: string;
706
+ sms?: boolean | null;
707
+ email?: boolean | null;
708
+ }
709
+ export type NotificationSetConsentOutput = {
710
+ email?: boolean;
711
+ sms?: boolean;
712
+ changed_at?: string;
713
+ [key: string]: unknown;
714
+ };
715
+ export interface NumberFormatInput {
716
+ value?: number | null;
717
+ decimals?: number;
718
+ }
719
+ export type NumberFormatOutput = string;
720
+ export interface PackageInstallInputInput {
721
+ }
722
+ export type PackageInstallInputOutput = string;
723
+ export interface PageUrlInput {
724
+ page: {
725
+ id: string;
726
+ params?: Record<string, unknown>;
727
+ [key: string]: unknown;
728
+ };
729
+ }
730
+ export type PageUrlOutput = unknown;
731
+ export interface PayablesVoidInput {
732
+ reason?: string | null;
733
+ effectiveDate?: string | null;
734
+ payableResource: ResourceKeyWith<"payable">;
735
+ payableRecord: string;
736
+ }
737
+ export type PayablesVoidOutput = {
738
+ status?: string;
739
+ [key: string]: unknown;
740
+ };
741
+ export interface PayablesWriteOffInput {
742
+ lineAllocations?: unknown[] | null;
743
+ payableResource: ResourceKeyWith<"payable">;
744
+ payableRecord: string;
745
+ adjustmentResource: ResourceKeyWith<"payable_adjustment">;
746
+ amount?: {
747
+ amount: number;
748
+ currency: string;
749
+ [key: string]: unknown;
750
+ } | null;
751
+ effectiveAt?: string | null;
752
+ description?: string | null;
753
+ }
754
+ export type PayablesWriteOffOutput = Record<string, unknown>;
755
+ export interface PaymentCreateManualInput {
756
+ resource: ResourceKeyWith<"payment">;
757
+ payableRecord: string;
758
+ amount: {
759
+ amount: number;
760
+ currency: string;
761
+ [key: string]: unknown;
762
+ };
763
+ paidAt?: string | null;
764
+ payerRecord?: string | null;
765
+ notes?: string | null;
766
+ }
767
+ export type PaymentCreateManualOutput = Record<string, unknown>;
768
+ export interface PaymentsChargeInput {
769
+ payableResource: ResourceKeyWith<"payable">;
770
+ payableRecord: string;
771
+ amount?: {
772
+ amount: number;
773
+ currency: string;
774
+ [key: string]: unknown;
775
+ } | null;
776
+ description?: string | null;
777
+ payerRecord?: string | null;
778
+ paymentMethodId?: string | null;
779
+ }
780
+ export type PaymentsChargeOutput = Record<string, unknown>;
781
+ export interface PaymentsCheckoutInput {
782
+ payableResource: ResourceKeyWith<"payable">;
783
+ payableRecord: string;
784
+ successUrl: string;
785
+ cancelUrl?: string | null;
786
+ description?: string | null;
787
+ }
788
+ export type PaymentsCheckoutOutput = {
789
+ checkout_url?: string;
790
+ session_id?: string;
791
+ [key: string]: unknown;
792
+ };
793
+ export interface PaymentsConfirmInput {
794
+ payableResource: ResourceKeyWith<"payable">;
795
+ payableRecord: string;
796
+ confirmationTokenId?: string | null;
797
+ paymentMethodId?: string | null;
798
+ paymentAttemptId?: string | null;
799
+ expectedTotal: {
800
+ amount: number;
801
+ currency: string;
802
+ [key: string]: unknown;
803
+ };
804
+ amount?: {
805
+ amount: number;
806
+ currency: string;
807
+ [key: string]: unknown;
808
+ } | null;
809
+ savePaymentMethod?: boolean | null;
810
+ setPaymentMethodAsDefault?: boolean | null;
811
+ }
812
+ export type PaymentsConfirmOutput = {
813
+ payment_intent_id: string;
814
+ payment_record_id: string;
815
+ status: string;
816
+ client_secret?: unknown;
817
+ [key: string]: unknown;
818
+ };
819
+ export interface PaymentsRefundInput {
820
+ resource: ResourceKeyWith<"payment">;
821
+ record: string;
822
+ amount?: {
823
+ amount: number;
824
+ currency: string;
825
+ [key: string]: unknown;
826
+ } | null;
827
+ invoiceBalance?: "credit" | "reopen" | null;
828
+ reason?: string | null;
829
+ }
830
+ export type PaymentsRefundOutput = Record<string, unknown>;
831
+ export interface PhoneFormatInput {
832
+ phone?: string | null;
833
+ format?: "e164" | "international" | "national" | "rfc3966" | null;
834
+ }
835
+ export type PhoneFormatOutput = string;
836
+ export interface SchedulingBookSlotInput {
837
+ bookingResource: string;
838
+ start: string;
839
+ search: {
840
+ bookingResource: string;
841
+ groups: Array<{
842
+ mode?: "all" | "any";
843
+ strategy?: "first_available" | "least_booked" | "round_robin";
844
+ records?: Array<{
845
+ resource_id?: string;
846
+ id?: string;
847
+ [key: string]: unknown;
848
+ }>;
849
+ [key: string]: unknown;
850
+ }>;
851
+ from: string;
852
+ to: string;
853
+ durationMinutes: number;
854
+ stepMinutes?: number | null;
855
+ noticeMinutes?: number | null;
856
+ maxAdvanceDays?: number | null;
857
+ quantity?: number | null;
858
+ maxSlots?: number | null;
859
+ timezone?: string | null;
860
+ seed?: string | null;
861
+ } | Record<string, unknown>;
862
+ relations: Array<string>;
863
+ data?: Record<string, unknown> | null;
864
+ }
865
+ export type SchedulingBookSlotOutput = Record<string, unknown>;
866
+ export interface SchedulingFindSlotsInput {
867
+ bookingResource: string;
868
+ groups: Array<{
869
+ mode?: "all" | "any";
870
+ strategy?: "first_available" | "least_booked" | "round_robin";
871
+ records?: Array<{
872
+ resource_id?: string;
873
+ id?: string;
874
+ [key: string]: unknown;
875
+ }>;
876
+ [key: string]: unknown;
877
+ }>;
878
+ from: string;
879
+ to: string;
880
+ durationMinutes: number;
881
+ stepMinutes?: number | null;
882
+ noticeMinutes?: number | null;
883
+ maxAdvanceDays?: number | null;
884
+ quantity?: number | null;
885
+ maxSlots?: number | null;
886
+ timezone?: string | null;
887
+ seed?: string | null;
888
+ }
889
+ export type SchedulingFindSlotsOutput = Record<string, unknown>;
890
+ export interface SchemaToJsonSchemaInput {
891
+ schema: unknown;
892
+ }
893
+ export type SchemaToJsonSchemaOutput = Record<string, unknown>;
894
+ export interface SecurityRandomPasswordInput {
895
+ passwordLength?: number | null;
896
+ }
897
+ export type SecurityRandomPasswordOutput = string;
898
+ export interface SmsSendNotificationInput {
899
+ notificationType: string;
900
+ notificationTemplate?: string | null;
901
+ variables?: Record<string, unknown>;
902
+ recipient: unknown;
903
+ }
904
+ export type SmsSendNotificationOutput = Record<string, unknown>;
905
+ export interface SubscriptionsActivateInput {
906
+ subscriptionResource: ResourceKeyWith<"subscription">;
907
+ subscriptionRecord: string;
908
+ }
909
+ export type SubscriptionsActivateOutput = {
910
+ status?: string;
911
+ [key: string]: unknown;
912
+ };
913
+ export interface SubscriptionsCancelInput {
914
+ subscriptionResource: ResourceKeyWith<"subscription">;
915
+ subscriptionRecord: string;
916
+ atPeriodEnd?: boolean | null;
917
+ }
918
+ export type SubscriptionsCancelOutput = {
919
+ status?: string;
920
+ [key: string]: unknown;
921
+ };
922
+ export interface SubscriptionsChangeItemsInput {
923
+ subscriptionResource: ResourceKeyWith<"subscription">;
924
+ subscriptionRecord: string;
925
+ items: Array<{
926
+ price_record_id?: string;
927
+ quantity?: number;
928
+ pricing?: {
929
+ mode?: "catalog" | "custom";
930
+ unit_price?: {
931
+ amount?: number;
932
+ currency?: string;
933
+ [key: string]: unknown;
934
+ };
935
+ [key: string]: unknown;
936
+ };
937
+ [key: string]: unknown;
938
+ }>;
939
+ effective?: "now" | "next_renewal" | "period" | null;
940
+ periodStart?: string | null;
941
+ prorationBehavior?: "prorate" | "none" | null;
942
+ revisionScope?: "this_renewal" | "this_and_following" | null;
943
+ confirmedQuote?: string | null;
944
+ reason?: string | null;
945
+ }
946
+ export type SubscriptionsChangeItemsOutput = {
947
+ changed?: boolean;
948
+ invoice?: unknown;
949
+ preview?: {
950
+ mode?: string;
951
+ effective?: string;
952
+ proration_behavior?: string;
953
+ changed?: boolean;
954
+ currency?: string;
955
+ timezone?: string;
956
+ effective_date?: string;
957
+ period_start?: unknown;
958
+ period_end?: unknown;
959
+ days_in_period?: unknown;
960
+ days_remaining?: unknown;
961
+ items?: Array<{
962
+ price_record_id?: string;
963
+ quantity?: number;
964
+ pricing?: string;
965
+ catalog_unit_price?: {
966
+ amount: number;
967
+ currency: string;
968
+ [key: string]: unknown;
969
+ };
970
+ current_unit_price?: unknown;
971
+ effective_unit_price?: {
972
+ amount: number;
973
+ currency: string;
974
+ [key: string]: unknown;
975
+ };
976
+ [key: string]: unknown;
977
+ }>;
978
+ charges?: Array<{
979
+ price_record_id?: string;
980
+ description?: string;
981
+ quantity?: number;
982
+ is_one_time?: boolean;
983
+ full_unit_price?: {
984
+ amount: number;
985
+ currency: string;
986
+ [key: string]: unknown;
987
+ };
988
+ unit_price?: {
989
+ amount: number;
990
+ currency: string;
991
+ [key: string]: unknown;
992
+ };
993
+ line_total?: {
994
+ amount: number;
995
+ currency: string;
996
+ [key: string]: unknown;
997
+ };
998
+ [key: string]: unknown;
999
+ }>;
1000
+ discounts?: Array<{
1001
+ description?: string;
1002
+ duration?: string;
1003
+ amount?: {
1004
+ amount: number;
1005
+ currency: string;
1006
+ [key: string]: unknown;
1007
+ };
1008
+ period_start?: unknown;
1009
+ [key: string]: unknown;
1010
+ }>;
1011
+ credits?: Array<{
1012
+ description?: string;
1013
+ quantity?: number;
1014
+ full_unit_price?: {
1015
+ amount: number;
1016
+ currency: string;
1017
+ [key: string]: unknown;
1018
+ };
1019
+ unit_price?: {
1020
+ amount: number;
1021
+ currency: string;
1022
+ [key: string]: unknown;
1023
+ };
1024
+ amount?: {
1025
+ amount: number;
1026
+ currency: string;
1027
+ [key: string]: unknown;
1028
+ };
1029
+ gross_amount?: {
1030
+ amount: number;
1031
+ currency: string;
1032
+ [key: string]: unknown;
1033
+ };
1034
+ source_invoice_record_id?: string;
1035
+ source_line_record_id?: string;
1036
+ covered_start?: string;
1037
+ covered_end?: string;
1038
+ [key: string]: unknown;
1039
+ }>;
1040
+ applied_to_invoices?: Array<{
1041
+ invoice_record_id?: string;
1042
+ amount?: {
1043
+ amount: number;
1044
+ currency: string;
1045
+ [key: string]: unknown;
1046
+ };
1047
+ [key: string]: unknown;
1048
+ }>;
1049
+ renewal?: unknown;
1050
+ revision?: unknown;
1051
+ schedule?: unknown;
1052
+ replaces_upcoming_items?: boolean;
1053
+ quote?: string;
1054
+ charge_total?: {
1055
+ amount: number;
1056
+ currency: string;
1057
+ [key: string]: unknown;
1058
+ };
1059
+ discount_total?: {
1060
+ amount: number;
1061
+ currency: string;
1062
+ [key: string]: unknown;
1063
+ };
1064
+ credit_total?: {
1065
+ amount: number;
1066
+ currency: string;
1067
+ [key: string]: unknown;
1068
+ };
1069
+ amount_due?: {
1070
+ amount: number;
1071
+ currency: string;
1072
+ [key: string]: unknown;
1073
+ };
1074
+ net_credit?: {
1075
+ amount: number;
1076
+ currency: string;
1077
+ [key: string]: unknown;
1078
+ };
1079
+ applied_to_invoices_total?: {
1080
+ amount: number;
1081
+ currency: string;
1082
+ [key: string]: unknown;
1083
+ };
1084
+ credit_to_balance?: {
1085
+ amount: number;
1086
+ currency: string;
1087
+ [key: string]: unknown;
1088
+ };
1089
+ outstanding_before?: {
1090
+ amount: number;
1091
+ currency: string;
1092
+ [key: string]: unknown;
1093
+ };
1094
+ outstanding_after?: {
1095
+ amount: number;
1096
+ currency: string;
1097
+ [key: string]: unknown;
1098
+ };
1099
+ [key: string]: unknown;
1100
+ };
1101
+ [key: string]: unknown;
1102
+ };
1103
+ export interface SubscriptionsCreateInput {
1104
+ subscriptionResource: ResourceKeyWith<"subscription">;
1105
+ accountingEntity?: string | null;
1106
+ payerRecord: string;
1107
+ priceRecordIds?: Array<string> | null;
1108
+ items?: Array<{
1109
+ price_record_id?: string;
1110
+ quantity?: number;
1111
+ [key: string]: unknown;
1112
+ }> | null;
1113
+ discounts?: Array<{
1114
+ calculation_type?: "fixed_amount" | "percentage";
1115
+ duration?: "every_invoice" | "first_invoice" | "specific_period";
1116
+ percent?: number;
1117
+ fixed_amount?: {
1118
+ amount: number;
1119
+ currency: string;
1120
+ [key: string]: unknown;
1121
+ };
1122
+ period_start?: string;
1123
+ description?: string;
1124
+ [key: string]: unknown;
1125
+ }> | null;
1126
+ confirmedQuote?: string | null;
1127
+ requireConfirmedQuote?: boolean | null;
1128
+ collectionMethod?: "charge_automatically" | "send_invoice" | null;
1129
+ gracePeriodDays?: number | null;
1130
+ billingCycleMode?: "anniversary" | "calendar_aligned" | null;
1131
+ billingAnchorMonth?: number | null;
1132
+ billingAnchorDay?: number | null;
1133
+ activationPolicy?: "after_first_payment" | "immediate" | null;
1134
+ initialTermAnchor?: "first_payment_at" | "subscription_created_at" | null;
1135
+ initialPaymentWindowDays?: number | null;
1136
+ startedAt?: string | null;
1137
+ trialDays?: number | null;
1138
+ trialEndsAt?: string | null;
1139
+ trialPaymentMethodPolicy?: "optional" | "required" | null;
1140
+ lapseBillingBehavior?: "continue_billing" | "suspend_renewals" | "cancel" | null;
1141
+ generateInvoice?: boolean | null;
1142
+ }
1143
+ export type SubscriptionsCreateOutput = {
1144
+ record?: Record<string, unknown>;
1145
+ invoice?: unknown;
1146
+ invoices?: Array<Record<string, unknown>>;
1147
+ [key: string]: unknown;
1148
+ };
1149
+ export interface SubscriptionsGenerateInvoiceInput {
1150
+ subscriptionResource: ResourceKeyWith<"subscription">;
1151
+ subscriptionRecord: string;
1152
+ }
1153
+ export type SubscriptionsGenerateInvoiceOutput = {
1154
+ record?: unknown;
1155
+ created?: boolean;
1156
+ period_start?: string;
1157
+ period_end?: string;
1158
+ renewal_outcome?: "canceled" | "not_due" | "processed" | "suspended";
1159
+ [key: string]: unknown;
1160
+ };
1161
+ export interface SubscriptionsPauseInput {
1162
+ subscriptionResource: ResourceKeyWith<"subscription">;
1163
+ subscriptionRecord: string;
1164
+ }
1165
+ export type SubscriptionsPauseOutput = {
1166
+ status?: string;
1167
+ [key: string]: unknown;
1168
+ };
1169
+ export interface SubscriptionsPreviewInput {
1170
+ subscriptionResource: ResourceKeyWith<"subscription">;
1171
+ priceRecordIds?: Array<string> | null;
1172
+ items?: Array<{
1173
+ price_record_id?: string;
1174
+ quantity?: number;
1175
+ [key: string]: unknown;
1176
+ }> | null;
1177
+ discounts?: Array<{
1178
+ calculation_type?: "fixed_amount" | "percentage";
1179
+ duration?: "every_invoice" | "first_invoice" | "specific_period";
1180
+ percent?: number;
1181
+ fixed_amount?: {
1182
+ amount: number;
1183
+ currency: string;
1184
+ [key: string]: unknown;
1185
+ };
1186
+ period_start?: string;
1187
+ description?: string;
1188
+ [key: string]: unknown;
1189
+ }> | null;
1190
+ collectionMethod?: "charge_automatically" | "send_invoice" | null;
1191
+ gracePeriodDays?: number | null;
1192
+ billingCycleMode?: "anniversary" | "calendar_aligned" | null;
1193
+ billingAnchorMonth?: number | null;
1194
+ billingAnchorDay?: number | null;
1195
+ activationPolicy?: "after_first_payment" | "immediate" | null;
1196
+ initialTermAnchor?: "first_payment_at" | "subscription_created_at" | null;
1197
+ initialPaymentWindowDays?: number | null;
1198
+ startedAt?: string | null;
1199
+ trialDays?: number | null;
1200
+ trialEndsAt?: string | null;
1201
+ trialPaymentMethodPolicy?: "optional" | "required" | null;
1202
+ lapseBillingBehavior?: "continue_billing" | "suspend_renewals" | "cancel" | null;
1203
+ }
1204
+ export type SubscriptionsPreviewOutput = {
1205
+ currency?: string;
1206
+ billing_cycle_mode?: string;
1207
+ interval?: string;
1208
+ timezone?: string;
1209
+ discounts?: unknown;
1210
+ initial?: {
1211
+ lines?: Array<{
1212
+ price_record_id?: string;
1213
+ description?: string;
1214
+ quantity?: number;
1215
+ is_one_time?: boolean;
1216
+ full_unit_price?: {
1217
+ amount: number;
1218
+ currency: string;
1219
+ [key: string]: unknown;
1220
+ };
1221
+ unit_price?: {
1222
+ amount: number;
1223
+ currency: string;
1224
+ [key: string]: unknown;
1225
+ };
1226
+ line_total?: {
1227
+ amount: number;
1228
+ currency: string;
1229
+ [key: string]: unknown;
1230
+ };
1231
+ [key: string]: unknown;
1232
+ }>;
1233
+ subtotal?: {
1234
+ amount: number;
1235
+ currency: string;
1236
+ [key: string]: unknown;
1237
+ };
1238
+ discount_total?: {
1239
+ amount: number;
1240
+ currency: string;
1241
+ [key: string]: unknown;
1242
+ };
1243
+ discounts?: Array<{
1244
+ description?: string;
1245
+ duration?: string;
1246
+ amount?: {
1247
+ amount: number;
1248
+ currency: string;
1249
+ [key: string]: unknown;
1250
+ };
1251
+ period_start?: unknown;
1252
+ [key: string]: unknown;
1253
+ }>;
1254
+ total?: {
1255
+ amount: number;
1256
+ currency: string;
1257
+ [key: string]: unknown;
1258
+ };
1259
+ covered_start?: string;
1260
+ covered_end?: string;
1261
+ reference_start?: string;
1262
+ reference_end?: string;
1263
+ days_charged?: number;
1264
+ days_in_period?: number;
1265
+ is_prorated?: boolean;
1266
+ [key: string]: unknown;
1267
+ };
1268
+ additional_invoices?: Array<{
1269
+ lines?: Array<{
1270
+ price_record_id?: string;
1271
+ description?: string;
1272
+ quantity?: number;
1273
+ is_one_time?: boolean;
1274
+ full_unit_price?: {
1275
+ amount: number;
1276
+ currency: string;
1277
+ [key: string]: unknown;
1278
+ };
1279
+ unit_price?: {
1280
+ amount: number;
1281
+ currency: string;
1282
+ [key: string]: unknown;
1283
+ };
1284
+ line_total?: {
1285
+ amount: number;
1286
+ currency: string;
1287
+ [key: string]: unknown;
1288
+ };
1289
+ [key: string]: unknown;
1290
+ }>;
1291
+ subtotal?: {
1292
+ amount: number;
1293
+ currency: string;
1294
+ [key: string]: unknown;
1295
+ };
1296
+ discount_total?: {
1297
+ amount: number;
1298
+ currency: string;
1299
+ [key: string]: unknown;
1300
+ };
1301
+ discounts?: Array<{
1302
+ description?: string;
1303
+ duration?: string;
1304
+ amount?: {
1305
+ amount: number;
1306
+ currency: string;
1307
+ [key: string]: unknown;
1308
+ };
1309
+ period_start?: unknown;
1310
+ [key: string]: unknown;
1311
+ }>;
1312
+ total?: {
1313
+ amount: number;
1314
+ currency: string;
1315
+ [key: string]: unknown;
1316
+ };
1317
+ covered_start?: string;
1318
+ covered_end?: string;
1319
+ reference_start?: string;
1320
+ reference_end?: string;
1321
+ days_charged?: number;
1322
+ days_in_period?: number;
1323
+ is_prorated?: boolean;
1324
+ [key: string]: unknown;
1325
+ }>;
1326
+ renewal?: {
1327
+ next_renewal_date?: string;
1328
+ amount?: {
1329
+ amount: number;
1330
+ currency: string;
1331
+ [key: string]: unknown;
1332
+ };
1333
+ subtotal?: {
1334
+ amount: number;
1335
+ currency: string;
1336
+ [key: string]: unknown;
1337
+ };
1338
+ discount_total?: {
1339
+ amount: number;
1340
+ currency: string;
1341
+ [key: string]: unknown;
1342
+ };
1343
+ [key: string]: unknown;
1344
+ };
1345
+ trial_ends_at?: unknown;
1346
+ first_paid_invoice?: unknown;
1347
+ quote?: string;
1348
+ [key: string]: unknown;
1349
+ };
1350
+ export interface SubscriptionsPreviewChangeInput {
1351
+ subscriptionResource: ResourceKeyWith<"subscription">;
1352
+ subscriptionRecord: string;
1353
+ items: Array<{
1354
+ price_record_id?: string;
1355
+ quantity?: number;
1356
+ pricing?: {
1357
+ mode?: "catalog" | "custom";
1358
+ unit_price?: {
1359
+ amount?: number;
1360
+ currency?: string;
1361
+ [key: string]: unknown;
1362
+ };
1363
+ [key: string]: unknown;
1364
+ };
1365
+ [key: string]: unknown;
1366
+ }>;
1367
+ effective?: "now" | "next_renewal" | "period" | null;
1368
+ periodStart?: string | null;
1369
+ prorationBehavior?: "prorate" | "none" | null;
1370
+ revisionScope?: "this_renewal" | "this_and_following" | null;
1371
+ }
1372
+ export type SubscriptionsPreviewChangeOutput = {
1373
+ mode?: string;
1374
+ effective?: string;
1375
+ proration_behavior?: string;
1376
+ changed?: boolean;
1377
+ currency?: string;
1378
+ timezone?: string;
1379
+ effective_date?: string;
1380
+ period_start?: unknown;
1381
+ period_end?: unknown;
1382
+ days_in_period?: unknown;
1383
+ days_remaining?: unknown;
1384
+ items?: Array<{
1385
+ price_record_id?: string;
1386
+ quantity?: number;
1387
+ pricing?: string;
1388
+ catalog_unit_price?: {
1389
+ amount: number;
1390
+ currency: string;
1391
+ [key: string]: unknown;
1392
+ };
1393
+ current_unit_price?: unknown;
1394
+ effective_unit_price?: {
1395
+ amount: number;
1396
+ currency: string;
1397
+ [key: string]: unknown;
1398
+ };
1399
+ [key: string]: unknown;
1400
+ }>;
1401
+ charges?: Array<{
1402
+ price_record_id?: string;
1403
+ description?: string;
1404
+ quantity?: number;
1405
+ is_one_time?: boolean;
1406
+ full_unit_price?: {
1407
+ amount: number;
1408
+ currency: string;
1409
+ [key: string]: unknown;
1410
+ };
1411
+ unit_price?: {
1412
+ amount: number;
1413
+ currency: string;
1414
+ [key: string]: unknown;
1415
+ };
1416
+ line_total?: {
1417
+ amount: number;
1418
+ currency: string;
1419
+ [key: string]: unknown;
1420
+ };
1421
+ [key: string]: unknown;
1422
+ }>;
1423
+ discounts?: Array<{
1424
+ description?: string;
1425
+ duration?: string;
1426
+ amount?: {
1427
+ amount: number;
1428
+ currency: string;
1429
+ [key: string]: unknown;
1430
+ };
1431
+ period_start?: unknown;
1432
+ [key: string]: unknown;
1433
+ }>;
1434
+ credits?: Array<{
1435
+ description?: string;
1436
+ quantity?: number;
1437
+ full_unit_price?: {
1438
+ amount: number;
1439
+ currency: string;
1440
+ [key: string]: unknown;
1441
+ };
1442
+ unit_price?: {
1443
+ amount: number;
1444
+ currency: string;
1445
+ [key: string]: unknown;
1446
+ };
1447
+ amount?: {
1448
+ amount: number;
1449
+ currency: string;
1450
+ [key: string]: unknown;
1451
+ };
1452
+ gross_amount?: {
1453
+ amount: number;
1454
+ currency: string;
1455
+ [key: string]: unknown;
1456
+ };
1457
+ source_invoice_record_id?: string;
1458
+ source_line_record_id?: string;
1459
+ covered_start?: string;
1460
+ covered_end?: string;
1461
+ [key: string]: unknown;
1462
+ }>;
1463
+ applied_to_invoices?: Array<{
1464
+ invoice_record_id?: string;
1465
+ amount?: {
1466
+ amount: number;
1467
+ currency: string;
1468
+ [key: string]: unknown;
1469
+ };
1470
+ [key: string]: unknown;
1471
+ }>;
1472
+ renewal?: unknown;
1473
+ revision?: unknown;
1474
+ schedule?: unknown;
1475
+ replaces_upcoming_items?: boolean;
1476
+ quote?: string;
1477
+ charge_total?: {
1478
+ amount: number;
1479
+ currency: string;
1480
+ [key: string]: unknown;
1481
+ };
1482
+ discount_total?: {
1483
+ amount: number;
1484
+ currency: string;
1485
+ [key: string]: unknown;
1486
+ };
1487
+ credit_total?: {
1488
+ amount: number;
1489
+ currency: string;
1490
+ [key: string]: unknown;
1491
+ };
1492
+ amount_due?: {
1493
+ amount: number;
1494
+ currency: string;
1495
+ [key: string]: unknown;
1496
+ };
1497
+ net_credit?: {
1498
+ amount: number;
1499
+ currency: string;
1500
+ [key: string]: unknown;
1501
+ };
1502
+ applied_to_invoices_total?: {
1503
+ amount: number;
1504
+ currency: string;
1505
+ [key: string]: unknown;
1506
+ };
1507
+ credit_to_balance?: {
1508
+ amount: number;
1509
+ currency: string;
1510
+ [key: string]: unknown;
1511
+ };
1512
+ outstanding_before?: {
1513
+ amount: number;
1514
+ currency: string;
1515
+ [key: string]: unknown;
1516
+ };
1517
+ outstanding_after?: {
1518
+ amount: number;
1519
+ currency: string;
1520
+ [key: string]: unknown;
1521
+ };
1522
+ [key: string]: unknown;
1523
+ };
1524
+ export interface SubscriptionsResumeInput {
1525
+ subscriptionResource: ResourceKeyWith<"subscription">;
1526
+ subscriptionRecord: string;
1527
+ }
1528
+ export type SubscriptionsResumeOutput = {
1529
+ status?: string;
1530
+ [key: string]: unknown;
1531
+ };
1532
+ export interface SubscriptionsSetUpcomingItemsInput {
1533
+ subscriptionResource: ResourceKeyWith<"subscription">;
1534
+ subscriptionRecord: string;
1535
+ desiredPriceRecordIds?: Array<string> | null;
1536
+ items?: Array<{
1537
+ price_record_id?: string;
1538
+ quantity?: number;
1539
+ pricing?: {
1540
+ mode?: "catalog" | "custom";
1541
+ unit_price?: {
1542
+ amount?: number;
1543
+ currency?: string;
1544
+ [key: string]: unknown;
1545
+ };
1546
+ [key: string]: unknown;
1547
+ };
1548
+ [key: string]: unknown;
1549
+ }> | null;
1550
+ }
1551
+ export type SubscriptionsSetUpcomingItemsOutput = {
1552
+ period_start?: string;
1553
+ items_added?: number;
1554
+ items_ended?: number;
1555
+ selection_locked?: boolean;
1556
+ [key: string]: unknown;
1557
+ };
1558
+ export interface TextGenerateInput {
1559
+ length: number;
1560
+ includeNumbers?: boolean | null;
1561
+ includeSpecial?: boolean | null;
1562
+ }
1563
+ export type TextGenerateOutput = string;
1564
+ export interface TextHashInput {
1565
+ value: string;
1566
+ }
1567
+ export type TextHashOutput = string;
1568
+ export interface TextRandomUuidInput {
1569
+ }
1570
+ export type TextRandomUuidOutput = string;
1571
+ export interface TextToContentInput {
1572
+ value: string;
1573
+ }
1574
+ export type TextToContentOutput = ContentDocument;
1575
+ export interface TimeAddInput {
1576
+ date: string;
1577
+ value: number;
1578
+ unit: "days" | "hours" | "minutes" | "months" | "seconds" | "weeks" | "years";
1579
+ }
1580
+ export type TimeAddOutput = string;
1581
+ export interface TimeDiffInput {
1582
+ start: string;
1583
+ end: string;
1584
+ unit: "days" | "hours" | "minutes" | "months" | "seconds" | "weeks" | "years";
1585
+ }
1586
+ export type TimeDiffOutput = number;
1587
+ export interface TimeEndOfInput {
1588
+ date: string;
1589
+ unit: "day" | "hour" | "month" | "quarter" | "week" | "year";
1590
+ }
1591
+ export type TimeEndOfOutput = string;
1592
+ export interface TimeFormatInput {
1593
+ date: string;
1594
+ format: string;
1595
+ timezone?: string | null;
1596
+ }
1597
+ export type TimeFormatOutput = string;
1598
+ export interface TimeStartOfInput {
1599
+ date: string;
1600
+ unit: "day" | "hour" | "month" | "quarter" | "week" | "year";
1601
+ }
1602
+ export type TimeStartOfOutput = string;
1603
+ export interface TimeSubtractInput {
1604
+ date: string;
1605
+ value: number;
1606
+ unit: "days" | "hours" | "minutes" | "months" | "seconds" | "weeks" | "years";
1607
+ }
1608
+ export type TimeSubtractOutput = string;
1609
+ export interface TimezoneFormatInput {
1610
+ timezone: string;
1611
+ format: "abbreviation" | "city" | "full" | "offset";
1612
+ }
1613
+ export type TimezoneFormatOutput = string;
1614
+ export interface TimezoneInterpretInput {
1615
+ value: string;
1616
+ timezone: string;
1617
+ boundary: "exact" | "start_of_day" | "end_of_day";
1618
+ }
1619
+ export type TimezoneInterpretOutput = string;
1620
+ export interface TiptapParseInput {
1621
+ content?: unknown;
1622
+ html?: boolean;
1623
+ oneLine?: boolean;
1624
+ placeholder?: string;
1625
+ }
1626
+ export type TiptapParseOutput = string;
1627
+ export interface TransactionBeginInput {
1628
+ }
1629
+ export type TransactionBeginOutput = null;
1630
+ export interface TransactionCommitInput {
1631
+ }
1632
+ export type TransactionCommitOutput = null;
1633
+ export interface TransactionRollbackInput {
1634
+ }
1635
+ export type TransactionRollbackOutput = null;
1636
+ export interface UserAuthorizeInput {
1637
+ permission: string;
1638
+ user?: Record<string, unknown>;
1639
+ }
1640
+ export type UserAuthorizeOutput = boolean;
1641
+ export interface WebAgentInput {
1642
+ url: string;
1643
+ prompt: unknown;
1644
+ schema: unknown;
1645
+ strict: boolean;
1646
+ }
1647
+ export type WebAgentOutput = {
1648
+ url?: string;
1649
+ data?: unknown;
1650
+ [key: string]: unknown;
1651
+ };
1652
+ export interface WebBatchScrapeInput {
1653
+ urls: Array<string>;
1654
+ }
1655
+ export type WebBatchScrapeOutput = Array<{
1656
+ url?: string;
1657
+ markdown?: unknown;
1658
+ html?: unknown;
1659
+ metadata?: {
1660
+ title?: unknown;
1661
+ description?: unknown;
1662
+ language?: unknown;
1663
+ status_code?: unknown;
1664
+ source_url?: unknown;
1665
+ content_type?: unknown;
1666
+ raw?: unknown;
1667
+ [key: string]: unknown;
1668
+ };
1669
+ images?: unknown;
1670
+ branding?: unknown;
1671
+ [key: string]: unknown;
1672
+ }>;
1673
+ export interface WebCrawlInput {
1674
+ url: string;
1675
+ limit?: number | null;
1676
+ maxDepth?: number | null;
1677
+ formats?: unknown[] | null;
1678
+ includePaths?: Array<string> | null;
1679
+ excludePaths?: Array<string> | null;
1680
+ allowSubdomains?: boolean | null;
1681
+ }
1682
+ export type WebCrawlOutput = {
1683
+ url?: string;
1684
+ job_id?: string;
1685
+ status?: string;
1686
+ total?: unknown;
1687
+ pages?: unknown;
1688
+ [key: string]: unknown;
1689
+ };
1690
+ export interface WebExtractInput {
1691
+ urls: Array<string>;
1692
+ prompt: unknown;
1693
+ schema: unknown;
1694
+ strict: boolean;
1695
+ }
1696
+ export type WebExtractOutput = {
1697
+ urls?: Array<string>;
1698
+ data?: unknown;
1699
+ [key: string]: unknown;
1700
+ };
1701
+ export interface WebGoogleSearchInput {
1702
+ query: unknown;
1703
+ limit?: number | null;
1704
+ }
1705
+ export type WebGoogleSearchOutput = {
1706
+ query?: string;
1707
+ results?: unknown;
1708
+ [key: string]: unknown;
1709
+ };
1710
+ export interface WebMapInput {
1711
+ url: string;
1712
+ search?: unknown;
1713
+ limit?: number | null;
1714
+ }
1715
+ export type WebMapOutput = {
1716
+ url?: string;
1717
+ links?: unknown;
1718
+ [key: string]: unknown;
1719
+ };
1720
+ export interface WebPdfInput {
1721
+ url: string;
1722
+ format?: "a3" | "a4" | "a5" | "legal" | "letter" | "tabloid" | null;
1723
+ landscape?: boolean | null;
1724
+ printBackground?: boolean | null;
1725
+ scale?: number | null;
1726
+ waitMs?: number | null;
1727
+ }
1728
+ export type WebPdfOutput = {
1729
+ id?: string;
1730
+ url?: string;
1731
+ is_public?: boolean;
1732
+ mime_type?: string;
1733
+ original_filename?: string;
1734
+ bytes?: unknown;
1735
+ width?: unknown;
1736
+ height?: unknown;
1737
+ sizes?: Array<number>;
1738
+ keywords?: unknown;
1739
+ created_at?: unknown;
1740
+ [key: string]: unknown;
1741
+ };
1742
+ export interface WebScrapeInput {
1743
+ url: string;
1744
+ mode?: "content" | "json" | null;
1745
+ formats?: unknown[] | null;
1746
+ onlyMainContent?: boolean | null;
1747
+ prompt?: unknown;
1748
+ schema?: unknown;
1749
+ strict?: boolean | null;
1750
+ maxAgeMs?: number | null;
1751
+ }
1752
+ export type WebScrapeOutput = {
1753
+ url?: string;
1754
+ markdown?: unknown;
1755
+ html?: unknown;
1756
+ metadata?: {
1757
+ title?: unknown;
1758
+ description?: unknown;
1759
+ language?: unknown;
1760
+ status_code?: unknown;
1761
+ source_url?: unknown;
1762
+ content_type?: unknown;
1763
+ raw?: unknown;
1764
+ [key: string]: unknown;
1765
+ };
1766
+ images?: unknown;
1767
+ branding?: unknown;
1768
+ [key: string]: unknown;
1769
+ };
1770
+ export interface WebScreenshotInput {
1771
+ url: string;
1772
+ fullPage?: boolean | null;
1773
+ width?: number | null;
1774
+ height?: number | null;
1775
+ waitMs?: number | null;
1776
+ imageType?: "jpeg" | "png" | "webp" | null;
1777
+ }
1778
+ export type WebScreenshotOutput = {
1779
+ id?: string;
1780
+ url?: string;
1781
+ is_public?: boolean;
1782
+ mime_type?: string;
1783
+ original_filename?: string;
1784
+ bytes?: unknown;
1785
+ width?: unknown;
1786
+ height?: unknown;
1787
+ sizes?: Array<number>;
1788
+ keywords?: unknown;
1789
+ created_at?: unknown;
1790
+ [key: string]: unknown;
1791
+ };
1792
+ export interface WebSearchRankedInput {
1793
+ query: unknown;
1794
+ limit?: number | null;
1795
+ }
1796
+ export type WebSearchRankedOutput = {
1797
+ query?: string;
1798
+ results?: unknown;
1799
+ [key: string]: unknown;
1800
+ };
1801
+ export interface WorkflowRunInput {
1802
+ workflow: string | {
1803
+ id: string;
1804
+ params?: Record<string, unknown>;
1805
+ [key: string]: unknown;
1806
+ };
1807
+ input?: Record<string, unknown> | null;
1808
+ runAsResource?: ResourceKeyWith<"authenticatable"> | null;
1809
+ runAsRecord?: string | null;
1810
+ executionMode?: "async" | "sync" | null;
1811
+ }
1812
+ export type WorkflowRunOutput = string;
1813
+ export interface WorkflowUrlInput {
1814
+ workflow: {
1815
+ id: string;
1816
+ params?: Record<string, unknown>;
1817
+ [key: string]: unknown;
1818
+ };
1819
+ }
1820
+ export type WorkflowUrlOutput = unknown;
1821
+ export interface WorkspaceLoginUrlInput {
1822
+ resource: string;
1823
+ }
1824
+ export type WorkspaceLoginUrlOutput = string;
1825
+ export interface WorkspaceSetValueInput {
1826
+ key: string;
1827
+ value?: unknown;
1828
+ }
1829
+ export type WorkspaceSetValueOutput = string;
1830
+ export interface WorkspaceSetValuesInput {
1831
+ values?: Record<string, unknown>;
1832
+ }
1833
+ export type WorkspaceSetValuesOutput = Record<string, unknown>;
1834
+ export interface WorkspaceValueInput {
1835
+ key: string;
1836
+ defaultValue?: unknown;
1837
+ }
1838
+ export type WorkspaceValueOutput = string;
1839
+ export interface WorkspaceValuesInput {
1840
+ }
1841
+ export type WorkspaceValuesOutput = Record<string, unknown>;
1842
+ export declare const ai: {
1843
+ /** Ask a decisions model typed questions about some content and get labelled answers with their probabilities */
1844
+ decide: (input: AiDecideInput) => Promise<AiDecideOutput>;
1845
+ /** Hand a prompt to the AI assistant, which can look up data and take action in your workspace */
1846
+ runPrompt: (input: AiRunPromptInput) => Promise<AiRunPromptOutput>;
1847
+ };
1848
+ export declare const auth: {
1849
+ /** Impersonate an authenticatable user, switching the current session to act as that user */
1850
+ impersonate: (input: AuthImpersonateInput) => Promise<AuthImpersonateOutput>;
1851
+ /** Login an authenticatable record */
1852
+ login: (input: AuthLoginInput) => Promise<AuthLoginOutput>;
1853
+ };
1854
+ export declare const calendar: {
1855
+ /** Generate a shareable calendar link (Google, Apple, Outlook) for an eventable record */
1856
+ generateLink: (input: CalendarGenerateLinkInput) => Promise<CalendarGenerateLinkOutput>;
1857
+ /** Find eventable records occurring in a date window no wider than 3 months, expanding recurring events into one row per occurrence and per calendar the record appears on. Returns every match, so narrow the window or filters on a busy resource */
1858
+ searchEvents: (input: CalendarSearchEventsInput) => Promise<CalendarSearchEventsOutput>;
1859
+ };
1860
+ export declare const callback: {
1861
+ /** Get a callback value */
1862
+ get: (input: CallbackGetInput) => Promise<CallbackGetOutput>;
1863
+ /** Remove a callback value */
1864
+ remove: (input: CallbackRemoveInput) => Promise<CallbackRemoveOutput>;
1865
+ /** Set a callback value */
1866
+ set: (input: CallbackSetInput) => Promise<CallbackSetOutput>;
1867
+ };
1868
+ export declare const chart: {
1869
+ /** Group data by category for pie or donut charts */
1870
+ distribution: (input: ChartDistributionInput) => Promise<ChartDistributionOutput>;
1871
+ /** Calculate a single metric value (total revenue, order count, etc.) */
1872
+ kpi: (input: ChartKpiInput) => Promise<ChartKpiOutput>;
1873
+ /** Rank entities by a metric (top customers, best sellers, etc.) */
1874
+ leaderboard: (input: ChartLeaderboardInput) => Promise<ChartLeaderboardOutput>;
1875
+ /** Aggregate data over time for line or area charts */
1876
+ timeSeries: (input: ChartTimeSeriesInput) => Promise<ChartTimeSeriesOutput>;
1877
+ };
1878
+ export declare const data: {
1879
+ /** Compute grouped metrics (count, sum, avg, etc.) over records */
1880
+ aggregateMetrics: (input: DataAggregateMetricsInput) => Promise<DataAggregateMetricsOutput>;
1881
+ /** Count the number of records matching the filters */
1882
+ count: (input: DataCountInput) => Promise<DataCountOutput>;
1883
+ /** Create a new record */
1884
+ create: (input: DataCreateInput) => Promise<DataCreateOutput>;
1885
+ /** Create many records at once */
1886
+ createMany: (input: DataCreateManyInput) => Promise<DataCreateManyOutput>;
1887
+ /** Delete a record */
1888
+ delete: (input: DataDeleteInput) => Promise<DataDeleteOutput>;
1889
+ /** Delete all records matching filter conditions */
1890
+ deleteMany: (input: DataDeleteManyInput) => Promise<DataDeleteManyOutput>;
1891
+ /** Find a single record by ID or by filters */
1892
+ find: (input: DataFindInput) => Promise<DataFindOutput>;
1893
+ /** Find a record by attributes, or create a new one when no match exists */
1894
+ findOrCreate: (input: DataFindOrCreateInput) => Promise<DataFindOrCreateOutput>;
1895
+ relation: {
1896
+ /** Attach a related record to a singular relation (BelongsTo, HasOne) */
1897
+ attach: (input: DataRelationAttachInput) => Promise<DataRelationAttachOutput>;
1898
+ /** Attach related records to a plural relation (BelongsToMany, HasMany) */
1899
+ attachMany: (input: DataRelationAttachManyInput) => Promise<DataRelationAttachManyOutput>;
1900
+ /** Detach a related record. */
1901
+ detach: (input: DataRelationDetachInput) => Promise<DataRelationDetachOutput>;
1902
+ /** Detach related records from a plural relation (BelongsToMany, HasMany) */
1903
+ detachMany: (input: DataRelationDetachManyInput) => Promise<DataRelationDetachManyOutput>;
1904
+ /** Sync related records for a relation (replaces all existing) */
1905
+ sync: (input: DataRelationSyncInput) => Promise<DataRelationSyncOutput>;
1906
+ };
1907
+ /** Restore an archived record */
1908
+ restore: (input: DataRestoreInput) => Promise<DataRestoreOutput>;
1909
+ /** Search for records */
1910
+ search: (input: DataSearchInput) => Promise<DataSearchOutput>;
1911
+ /** Search for records by semantic similarity */
1912
+ semanticSearch: (input: DataSemanticSearchInput) => Promise<DataSemanticSearchOutput>;
1913
+ /** Sum a numeric field across records matching the filters */
1914
+ sum: (input: DataSumInput) => Promise<DataSumOutput>;
1915
+ /** Update an existing record found by ID or by filters */
1916
+ update: (input: DataUpdateInput) => Promise<DataUpdateOutput>;
1917
+ /** Find a record by attributes and update it, or create a new one */
1918
+ updateOrCreate: (input: DataUpdateOrCreateInput) => Promise<DataUpdateOrCreateOutput>;
1919
+ /** Validate a record */
1920
+ validate: (input: DataValidateInput) => Promise<DataValidateOutput>;
1921
+ };
1922
+ export declare const date: {
1923
+ /** Add N days/weeks/months/years to a date */
1924
+ add: (input: DateAddInput) => Promise<DateAddOutput>;
1925
+ /** Difference between two dates in a specified unit */
1926
+ diff: (input: DateDiffInput) => Promise<DateDiffOutput>;
1927
+ /** Snap a date to the end of a period (week, month, quarter, year) */
1928
+ endOf: (input: DateEndOfInput) => Promise<DateEndOfOutput>;
1929
+ /** Format a date string using ICU date format syntax (e.g., "yyyy-MM-dd", "MMM d, yyyy"). */
1930
+ format: (input: DateFormatInput) => Promise<DateFormatOutput>;
1931
+ /** Snap a date to the start of a period (week, month, quarter, year) */
1932
+ startOf: (input: DateStartOfInput) => Promise<DateStartOfOutput>;
1933
+ /** Subtract N days/weeks/months/years from a date */
1934
+ subtract: (input: DateSubtractInput) => Promise<DateSubtractOutput>;
1935
+ };
1936
+ export declare const file: {
1937
+ /** Change a file's visibility by moving it between private and public storage */
1938
+ changeVisibility: (input: FileChangeVisibilityInput) => Promise<FileChangeVisibilityOutput>;
1939
+ /** Download a file from a public http(s) URL and save it privately in the workspace */
1940
+ createFromUrl: (input: FileCreateFromUrlInput) => Promise<FileCreateFromUrlOutput>;
1941
+ /** Create a public library master from an accessible workspace file, preserving external sources. Returns the library File ID */
1942
+ createMediaLibraryItem: (input: FileCreateMediaLibraryItemInput) => Promise<FileCreateMediaLibraryItemOutput>;
1943
+ /** Generate a QR code PNG image that encodes a value and save it privately in the workspace */
1944
+ createQrCode: (input: FileCreateQrCodeInput) => Promise<FileCreateQrCodeOutput>;
1945
+ };
1946
+ export declare const guard: {
1947
+ /** Perform a validation check */
1948
+ validate: (input: GuardValidateInput) => Promise<GuardValidateOutput>;
1949
+ };
1950
+ export declare const http: {
1951
+ /** Send an HTTP request */
1952
+ request: (input: HttpRequestInput) => Promise<HttpRequestOutput>;
1953
+ };
1954
+ export declare const lifecycle: {
1955
+ /** Return modified record fields from a record lifecycle workflow */
1956
+ output: (input: LifecycleOutputInput) => Promise<LifecycleOutputOutput>;
1957
+ };
1958
+ export declare const mail: {
1959
+ /** Find tracked emails by recipient, linked record, subject, sender, status, or date, newest first, with the delivery status of each recipient, including hard and soft bounces. Searches without a record, or that include the record's current addresses, require a Run As identity with the Manage Notifications permission */
1960
+ search: (input: MailSearchInput) => Promise<MailSearchOutput>;
1961
+ /** Send an email */
1962
+ send: (input: MailSendInput) => Promise<MailSendOutput>;
1963
+ /** Send an email using a notification type and template */
1964
+ sendNotification: (input: MailSendNotificationInput) => Promise<MailSendNotificationOutput>;
1965
+ };
1966
+ export declare const markdown: {
1967
+ /** Convert rich Content into a markdown string */
1968
+ fromContent: (input: MarkdownFromContentInput) => Promise<MarkdownFromContentOutput>;
1969
+ /** Convert a markdown string into rich Content. Nodes a destination Content field disallows may be rejected by that field. */
1970
+ toContent: (input: MarkdownToContentInput) => Promise<MarkdownToContentOutput>;
1971
+ };
1972
+ export declare const mediaLibrary: {
1973
+ /** Create a media library folder */
1974
+ createFolder: (input: MediaLibraryCreateFolderInput) => Promise<MediaLibraryCreateFolderOutput>;
1975
+ /** Detach a file from the media library */
1976
+ deleteItem: (input: MediaLibraryDeleteItemInput) => Promise<MediaLibraryDeleteItemOutput>;
1977
+ /** Move media library items into a target folder */
1978
+ moveItems: (input: MediaLibraryMoveItemsInput) => Promise<MediaLibraryMoveItemsOutput>;
1979
+ /** Rename a media library item and/or move it into a folder */
1980
+ updateItem: (input: MediaLibraryUpdateItemInput) => Promise<MediaLibraryUpdateItemOutput>;
1981
+ };
1982
+ export declare const money: {
1983
+ /** Format a money value as a currency string */
1984
+ format: (input: MoneyFormatInput) => Promise<MoneyFormatOutput>;
1985
+ };
1986
+ export declare const notification: {
1987
+ /** Send a notification email to a notifiable record */
1988
+ send: (input: NotificationSendInput) => Promise<NotificationSendOutput>;
1989
+ /** Find records with filters and send each record’s notification to the type’s configured recipient resource */
1990
+ sendBulkNotifications: (input: NotificationSendBulkNotificationsInput) => Promise<NotificationSendBulkNotificationsOutput>;
1991
+ /** Send a notification template to a full record of the type’s recipient resource */
1992
+ sendNotification: (input: NotificationSendNotificationInput) => Promise<NotificationSendNotificationOutput>;
1993
+ /** Record whether a notifiable record agreed to receive email or SMS */
1994
+ setConsent: (input: NotificationSetConsentInput) => Promise<NotificationSetConsentOutput>;
1995
+ };
1996
+ export declare const number: {
1997
+ /** Format a number with configurable decimal places */
1998
+ format: (input: NumberFormatInput) => Promise<NumberFormatOutput>;
1999
+ };
2000
+ declare const package_: {
2001
+ /** Read an input value collected when this package was installed */
2002
+ installInput: (input: PackageInstallInputInput) => Promise<PackageInstallInputOutput>;
2003
+ };
2004
+ export { package_ as package };
2005
+ export declare const page: {
2006
+ /** Get the URL for a page with route parameters */
2007
+ url: (input: PageUrlInput) => Promise<PageUrlOutput>;
2008
+ };
2009
+ export declare const payables: {
2010
+ /** Void an unpaid draft or open invoice. Rejects collected payments and payments in progress. Does not refund payments or cancel subscriptions. */
2011
+ void: (input: PayablesVoidInput) => Promise<PayablesVoidOutput>;
2012
+ /** Write off all or part of an open invoice while preserving its original total. */
2013
+ writeOff: (input: PayablesWriteOffInput) => Promise<PayablesWriteOffOutput>;
2014
+ };
2015
+ export declare const payment: {
2016
+ /** Record a manual payment against a payable record */
2017
+ createManual: (input: PaymentCreateManualInput) => Promise<PaymentCreateManualOutput>;
2018
+ };
2019
+ export declare const payments: {
2020
+ /** Charge a payable record using the payer default Stripe payment method */
2021
+ charge: (input: PaymentsChargeInput) => Promise<PaymentsChargeOutput>;
2022
+ /** Create a Stripe Checkout session to collect payment against a payable record */
2023
+ checkout: (input: PaymentsCheckoutInput) => Promise<PaymentsCheckoutOutput>;
2024
+ /** Confirm new or saved payment details collected by PaymentForm. Return this output to the form for authentication. Run after committing checkout choices; Stripe charges cannot be rolled back. */
2025
+ confirm: (input: PaymentsConfirmInput) => Promise<PaymentsConfirmOutput>;
2026
+ /** Process a full or partial refund against a payment record */
2027
+ refund: (input: PaymentsRefundInput) => Promise<PaymentsRefundOutput>;
2028
+ };
2029
+ export declare const phone: {
2030
+ /** Format a phone number into a human-readable string */
2031
+ format: (input: PhoneFormatInput) => Promise<PhoneFormatOutput>;
2032
+ };
2033
+ export declare const scheduling: {
2034
+ /** Book a slot that Find Slots returned, as the run identity. Check the slot and return the booking with the caller's view. Return only the booking id if the caller cannot read the booking. Search accepts the Find Slots input with camelCase or snake_case keys. A pool tries its next free member when admission refuses the pick; a slot that is gone fails with the $capacity error */
2035
+ bookSlot: (input: SchedulingBookSlotInput) => Promise<SchedulingBookSlotOutput>;
2036
+ /** Find the times a booking can start across groups of Schedulable records, inside their open hours and outside the time bookings take, without changing records. A Request workflow that runs as another identity searches with the view of the person who called it */
2037
+ findSlots: (input: SchedulingFindSlotsInput) => Promise<SchedulingFindSlotsOutput>;
2038
+ };
2039
+ export declare const schema: {
2040
+ /** Convert a schema definition into its JSON Schema document — the shape used to constrain AI and extraction output */
2041
+ toJsonSchema: (input: SchemaToJsonSchemaInput) => Promise<SchemaToJsonSchemaOutput>;
2042
+ };
2043
+ export declare const security: {
2044
+ /** Generate a secure random password */
2045
+ randomPassword: (input: SecurityRandomPasswordInput) => Promise<SecurityRandomPasswordOutput>;
2046
+ };
2047
+ export declare const sms: {
2048
+ /** Send a notification template by SMS to a full record of the type’s recipient resource */
2049
+ sendNotification: (input: SmsSendNotificationInput) => Promise<SmsSendNotificationOutput>;
2050
+ };
2051
+ export declare const subscriptions: {
2052
+ /** Start a draft subscription using its snapshotted activation and trial policies */
2053
+ activate: (input: SubscriptionsActivateInput) => Promise<SubscriptionsActivateOutput>;
2054
+ /** Cancel a subscription immediately, or at the end of the current billing period */
2055
+ cancel: (input: SubscriptionsCancelInput) => Promise<SubscriptionsCancelOutput>;
2056
+ /** Change subscription items now with optional proration, schedule the selection for the next renewal or a later billing period, or revise an eligible unpaid current or upcoming renewal invoice. An incomplete subscription can change now without a revision scope; this revises its first invoice in place. Renewal revisions use full-period prices without proration. Net prorated credits first reduce open current-period invoices of the subscription, then go to the payer balance. */
2057
+ changeItems: (input: SubscriptionsChangeItemsInput) => Promise<SubscriptionsChangeItemsOutput>;
2058
+ /** Create and activate a subscription for a payer in one step: the record, an item per price, and optionally the first invoice */
2059
+ create: (input: SubscriptionsCreateInput) => Promise<SubscriptionsCreateOutput>;
2060
+ /** Generate the payable invoice for the saved subscription schedule; partial calendar periods prorate recurring lines and full periods use the original prices */
2061
+ generateInvoice: (input: SubscriptionsGenerateInvoiceInput) => Promise<SubscriptionsGenerateInvoiceOutput>;
2062
+ /** Pause a billing subscription so no further invoices generate until it is resumed */
2063
+ pause: (input: SubscriptionsPauseInput) => Promise<SubscriptionsPauseOutput>;
2064
+ /** Preview initial subscription charges, covered dates, and renewal amounts without creating records or collecting payment */
2065
+ preview: (input: SubscriptionsPreviewInput) => Promise<SubscriptionsPreviewOutput>;
2066
+ /** Preview a complete subscription item selection effective now, at the next renewal, or at a later billing period, without changing records */
2067
+ previewChange: (input: SubscriptionsPreviewChangeInput) => Promise<SubscriptionsPreviewChangeOutput>;
2068
+ /** Resume a paused subscription; its status re-derives from the latest invoice */
2069
+ resume: (input: SubscriptionsResumeInput) => Promise<SubscriptionsResumeOutput>;
2070
+ /** Safely replace the complete price selection that takes effect in the next billing period */
2071
+ setUpcomingItems: (input: SubscriptionsSetUpcomingItemsInput) => Promise<SubscriptionsSetUpcomingItemsOutput>;
2072
+ };
2073
+ export declare const text: {
2074
+ /** Generate a random string with configurable character sets */
2075
+ generate: (input: TextGenerateInput) => Promise<TextGenerateOutput>;
2076
+ /** Hash a text value */
2077
+ hash: (input: TextHashInput) => Promise<TextHashOutput>;
2078
+ /** Generate a random UUID v7 */
2079
+ randomUuid: (input: TextRandomUuidInput) => Promise<TextRandomUuidOutput>;
2080
+ /** Convert a plain text string into rich Content */
2081
+ toContent: (input: TextToContentInput) => Promise<TextToContentOutput>;
2082
+ };
2083
+ export declare const time: {
2084
+ /** Add N seconds/minutes/hours/days/weeks/months/years to a datetime */
2085
+ add: (input: TimeAddInput) => Promise<TimeAddOutput>;
2086
+ /** Difference between two datetimes in a specified unit */
2087
+ diff: (input: TimeDiffInput) => Promise<TimeDiffOutput>;
2088
+ /** Snap a datetime to the end of a period (hour, day, week, month, quarter, year) */
2089
+ endOf: (input: TimeEndOfInput) => Promise<TimeEndOfOutput>;
2090
+ /** Format a datetime string using ICU date format syntax (e.g., "yyyy-MM-dd HH:mm:ss", "MMM d, yyyy h:mm a"). */
2091
+ format: (input: TimeFormatInput) => Promise<TimeFormatOutput>;
2092
+ /** Snap a datetime to the start of a period (hour, day, week, month, quarter, year) */
2093
+ startOf: (input: TimeStartOfInput) => Promise<TimeStartOfOutput>;
2094
+ /** Subtract N seconds/minutes/hours/days/weeks/months/years from a datetime */
2095
+ subtract: (input: TimeSubtractInput) => Promise<TimeSubtractOutput>;
2096
+ };
2097
+ export declare const timezone: {
2098
+ /** Format a timezone identifier into a human-readable string. Supports formats: full (region/city with offset), offset (UTC offset), abbreviation (timezone abbreviation), and city (city name only). */
2099
+ format: (input: TimezoneFormatInput) => Promise<TimezoneFormatOutput>;
2100
+ /** Interpret a local date or datetime in a timezone and return the canonical UTC datetime string. */
2101
+ interpret: (input: TimezoneInterpretInput) => Promise<TimezoneInterpretOutput>;
2102
+ };
2103
+ export declare const tiptap: {
2104
+ /** Parse Tiptap content to HTML or text */
2105
+ parse: (input: TiptapParseInput) => Promise<TiptapParseOutput>;
2106
+ };
2107
+ export declare const transaction: {
2108
+ /** Transaction control for transaction(). */
2109
+ begin: (input: TransactionBeginInput) => Promise<TransactionBeginOutput>;
2110
+ /** Transaction control for transaction(). */
2111
+ commit: (input: TransactionCommitInput) => Promise<TransactionCommitOutput>;
2112
+ /** Transaction control for transaction(). */
2113
+ rollback: (input: TransactionRollbackInput) => Promise<TransactionRollbackOutput>;
2114
+ };
2115
+ export declare const user: {
2116
+ /** Check user permissions for authorization */
2117
+ authorize: (input: UserAuthorizeInput) => Promise<UserAuthorizeOutput>;
2118
+ };
2119
+ export declare const web: {
2120
+ /** Extract structured data from a web page, guided by a natural-language prompt and a required shape */
2121
+ agent: (input: WebAgentInput) => Promise<WebAgentOutput>;
2122
+ /** Scrape multiple web pages in one batch and poll until every page is finished */
2123
+ batchScrape: (input: WebBatchScrapeInput) => Promise<WebBatchScrapeOutput>;
2124
+ /** Crawl a site and return multi-page content (polls to completion) */
2125
+ crawl: (input: WebCrawlInput) => Promise<WebCrawlOutput>;
2126
+ /** Extract structured data from one or more web pages, guided by a required shape and a supporting prompt */
2127
+ extract: (input: WebExtractInput) => Promise<WebExtractOutput>;
2128
+ /** Search Google and return the organic results */
2129
+ googleSearch: (input: WebGoogleSearchInput) => Promise<WebGoogleSearchOutput>;
2130
+ /** Map a site and return all of its discoverable URLs */
2131
+ map: (input: WebMapInput) => Promise<WebMapOutput>;
2132
+ /** Render a web page to a PDF document */
2133
+ pdf: (input: WebPdfInput) => Promise<WebPdfOutput>;
2134
+ /** Scrape a web page in content mode (markdown/HTML plus metadata) or JSON mode (structured data extracted against a schema) */
2135
+ scrape: (input: WebScrapeInput) => Promise<WebScrapeOutput>;
2136
+ /** Render a web page to a screenshot (PNG, JPEG, or WebP) */
2137
+ screenshot: (input: WebScreenshotInput) => Promise<WebScreenshotOutput>;
2138
+ /** Search the web for a query and return ranked results */
2139
+ searchRanked: (input: WebSearchRankedInput) => Promise<WebSearchRankedOutput>;
2140
+ };
2141
+ export declare const workflow: {
2142
+ /** Runs a workflow using its published version */
2143
+ run: (input: WorkflowRunInput) => Promise<WorkflowRunOutput>;
2144
+ /** Get the URL for a workflow with route parameters */
2145
+ url: (input: WorkflowUrlInput) => Promise<WorkflowUrlOutput>;
2146
+ };
2147
+ export declare const workspace: {
2148
+ /** Get the login URL for an authenticatable resource */
2149
+ loginUrl: (input: WorkspaceLoginUrlInput) => Promise<WorkspaceLoginUrlOutput>;
2150
+ /** Set the value of a field in a workspace */
2151
+ setValue: (input: WorkspaceSetValueInput) => Promise<WorkspaceSetValueOutput>;
2152
+ /** Set multiple workspace field values at once from a key => value map */
2153
+ setValues: (input: WorkspaceSetValuesInput) => Promise<WorkspaceSetValuesOutput>;
2154
+ /** Get the value of a field in a workspace */
2155
+ value: (input: WorkspaceValueInput) => Promise<WorkspaceValueOutput>;
2156
+ /** Get all workspace field values as a dictionary */
2157
+ values: (input: WorkspaceValuesInput) => Promise<WorkspaceValuesOutput>;
2158
+ };