samva 0.26.0 → 0.28.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 (107) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +14 -7
  3. package/dist/client/sdk.gen.d.ts +322 -143
  4. package/dist/client/sdk.gen.js +1085 -332
  5. package/dist/client/types.gen.d.ts +1342 -479
  6. package/dist/effect/agents.d.ts +119 -0
  7. package/dist/effect/agents.js +29 -0
  8. package/dist/effect/analytics.d.ts +1 -1
  9. package/dist/effect/analytics.js +1 -1
  10. package/dist/effect/api-keys.d.ts +6 -6
  11. package/dist/effect/attachments.d.ts +1 -1
  12. package/dist/effect/brands.d.ts +2 -0
  13. package/dist/effect/campaigns.d.ts +275 -25
  14. package/dist/effect/campaigns.js +7 -1
  15. package/dist/effect/contact-groups.d.ts +9 -9
  16. package/dist/effect/contacts.d.ts +74 -81
  17. package/dist/effect/contacts.js +7 -3
  18. package/dist/effect/conversations.d.ts +14 -6
  19. package/dist/effect/email.d.ts +34 -34
  20. package/dist/effect/errors.d.ts +1 -1
  21. package/dist/effect/errors.js +2 -2
  22. package/dist/effect/extension-installations.d.ts +3 -3
  23. package/dist/effect/extensions.d.ts +6 -6
  24. package/dist/effect/generated/agents.d.ts +6 -28
  25. package/dist/effect/generated/agents.js +270 -0
  26. package/dist/effect/generated/analytics.d.ts +3 -3
  27. package/dist/effect/generated/analytics.js +1 -1
  28. package/dist/effect/generated/api-keys.d.ts +6 -6
  29. package/dist/effect/generated/api-keys.js +2 -2
  30. package/dist/effect/generated/attachments.d.ts +3 -3
  31. package/dist/effect/generated/attachments.js +1 -1
  32. package/dist/effect/generated/brands.d.ts +16 -0
  33. package/dist/effect/generated/campaigns.d.ts +1181 -302
  34. package/dist/effect/generated/campaigns.js +169 -36
  35. package/dist/effect/generated/contact-events.d.ts +3 -3
  36. package/dist/effect/generated/contact-events.js +1 -1
  37. package/dist/effect/generated/contact-groups.d.ts +9 -9
  38. package/dist/effect/generated/contact-groups.js +7 -7
  39. package/dist/effect/generated/contacts.d.ts +2063 -290
  40. package/dist/effect/generated/contacts.js +343 -75
  41. package/dist/effect/generated/conversations.d.ts +14 -6
  42. package/dist/effect/generated/conversations.js +6 -6
  43. package/dist/effect/generated/email.d.ts +55 -70
  44. package/dist/effect/generated/email.js +18 -21
  45. package/dist/effect/generated/extension-installations.d.ts +3 -3
  46. package/dist/effect/generated/extension-installations.js +1 -1
  47. package/dist/effect/generated/extensions.d.ts +6 -6
  48. package/dist/effect/generated/extensions.js +2 -2
  49. package/dist/effect/generated/index.d.ts +5 -3
  50. package/dist/effect/generated/journeys.d.ts +9 -9
  51. package/dist/effect/generated/journeys.js +3 -3
  52. package/dist/effect/generated/mailboxes.d.ts +466 -712
  53. package/dist/effect/generated/mailboxes.js +22 -14
  54. package/dist/effect/generated/messages.d.ts +53 -29
  55. package/dist/effect/generated/messages.js +9 -5
  56. package/dist/effect/generated/namespaces.d.ts +3 -3
  57. package/dist/effect/generated/namespaces.js +1 -1
  58. package/dist/effect/generated/operations.d.ts +3 -3
  59. package/dist/effect/generated/operations.js +1 -1
  60. package/dist/effect/generated/organizations.d.ts +0 -9
  61. package/dist/effect/generated/organizations.js +1 -4
  62. package/dist/effect/generated/scheduled-messages.d.ts +69 -20
  63. package/dist/effect/generated/scheduled-messages.js +22 -3
  64. package/dist/effect/generated/shared.d.ts +431 -177
  65. package/dist/effect/generated/shared.js +216 -108
  66. package/dist/effect/generated/subscriptions.d.ts +4 -7
  67. package/dist/effect/generated/subscriptions.js +3 -4
  68. package/dist/effect/generated/templates.d.ts +71 -407
  69. package/dist/effect/generated/templates.js +23 -23
  70. package/dist/effect/generated/topic-forms.d.ts +656 -0
  71. package/dist/effect/generated/topic-forms.js +145 -0
  72. package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
  73. package/dist/effect/generated/topics.js +267 -0
  74. package/dist/effect/generated/webhooks.d.ts +6 -6
  75. package/dist/effect/generated/webhooks.js +2 -2
  76. package/dist/effect/generated-metadata.d.ts +78 -24
  77. package/dist/effect/generated-metadata.js +61 -27
  78. package/dist/effect/index.d.ts +3 -1
  79. package/dist/effect/index.js +5 -3
  80. package/dist/effect/internal/operation.js +4 -3
  81. package/dist/effect/internal/send.d.ts +4 -4
  82. package/dist/effect/journeys.d.ts +119 -119
  83. package/dist/effect/mailboxes.d.ts +137 -121
  84. package/dist/effect/messages.d.ts +19 -11
  85. package/dist/effect/namespaces.d.ts +3 -3
  86. package/dist/effect/operations.d.ts +3 -3
  87. package/dist/effect/scheduled-messages.d.ts +6 -6
  88. package/dist/effect/subscriptions.d.ts +1 -2
  89. package/dist/effect/templates.d.ts +13 -13
  90. package/dist/effect/topic-forms.d.ts +30 -0
  91. package/dist/effect/topic-forms.js +21 -0
  92. package/dist/effect/topics.d.ts +94 -0
  93. package/dist/effect/topics.js +29 -0
  94. package/dist/effect/webhooks.d.ts +6 -6
  95. package/dist/index.js +2 -2
  96. package/dist/package.js +1 -1
  97. package/dist/promises/errors.gen.d.ts +65 -8
  98. package/dist/promises/errors.gen.js +139 -7
  99. package/dist/promises/index.d.ts +7 -3
  100. package/dist/promises/index.js +9 -5
  101. package/dist/promises/types.gen.d.ts +1 -1
  102. package/dist/service-map.d.ts +117 -23
  103. package/dist/service-map.js +71 -10
  104. package/package.json +17 -9
  105. package/dist/effect/generated/unsubscribe-groups.js +0 -284
  106. package/dist/effect/unsubscribe-groups.d.ts +0 -74
  107. package/dist/effect/unsubscribe-groups.js +0 -29
@@ -1,11 +1,11 @@
1
1
  export declare const list: ((input?: {
2
- readonly limit?: string | null | undefined;
2
+ readonly limit?: number | null | undefined;
3
3
  readonly cursor?: string | null | undefined;
4
4
  readonly after?: string | null | undefined;
5
5
  readonly before?: string | null | undefined;
6
6
  } | undefined) => import("./internal/operation").OperationResult<"extensionsList">) & {
7
7
  readonly pages: (input?: {
8
- readonly limit?: string | null | undefined;
8
+ readonly limit?: number | null | undefined;
9
9
  readonly cursor?: string | null | undefined;
10
10
  readonly after?: string | null | undefined;
11
11
  readonly before?: string | null | undefined;
@@ -26,7 +26,7 @@ export declare const list: ((input?: {
26
26
  readonly nextCursor: string | null;
27
27
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
28
28
  readonly items: (input?: {
29
- readonly limit?: string | null | undefined;
29
+ readonly limit?: number | null | undefined;
30
30
  readonly cursor?: string | null | undefined;
31
31
  readonly after?: string | null | undefined;
32
32
  readonly before?: string | null | undefined;
@@ -61,12 +61,12 @@ export declare const get: (input: {
61
61
  }) => import("./internal/operation").OperationResult<"extensionsGet">;
62
62
  export declare const listVersions: ((input: {
63
63
  readonly id: string;
64
- readonly limit?: string | null | undefined;
64
+ readonly limit?: number | null | undefined;
65
65
  readonly cursor?: string | null | undefined;
66
66
  }) => import("./internal/operation").OperationResult<"extensionsListVersions">) & {
67
67
  readonly pages: (input: {
68
68
  readonly id: string;
69
- readonly limit?: string | null | undefined;
69
+ readonly limit?: number | null | undefined;
70
70
  readonly cursor?: string | null | undefined;
71
71
  }) => import("effect/Stream").Stream<{
72
72
  readonly items: readonly {
@@ -83,7 +83,7 @@ export declare const listVersions: ((input: {
83
83
  }, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
84
84
  readonly items: (input: {
85
85
  readonly id: string;
86
- readonly limit?: string | null | undefined;
86
+ readonly limit?: number | null | undefined;
87
87
  readonly cursor?: string | null | undefined;
88
88
  }) => import("effect/Stream").Stream<{
89
89
  readonly id: string & import("effect/Brand").Brand<"ExtensionVersionId">;
@@ -91,7 +91,6 @@ export declare const Agent: Schema.Struct<{
91
91
  readonly integrationIds: Schema.$Array<Schema.String>;
92
92
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
93
93
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
94
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
95
94
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
96
95
  readonly timeZone: Schema.String;
97
96
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -123,7 +122,6 @@ export declare const AgentVersion: Schema.Struct<{
123
122
  readonly integrationIds: Schema.$Array<Schema.String>;
124
123
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
125
124
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
126
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
127
125
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
128
126
  readonly timeZone: Schema.String;
129
127
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -154,7 +152,6 @@ export declare const PublishAgentResponse: Schema.Struct<{
154
152
  readonly integrationIds: Schema.$Array<Schema.String>;
155
153
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
156
154
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
157
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
158
155
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
159
156
  readonly timeZone: Schema.String;
160
157
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -180,7 +177,6 @@ export declare const PublishAgentResponse: Schema.Struct<{
180
177
  readonly integrationIds: Schema.$Array<Schema.String>;
181
178
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
182
179
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
183
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
184
180
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
185
181
  readonly timeZone: Schema.String;
186
182
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -196,11 +192,11 @@ export declare const PublishAgentResponse: Schema.Struct<{
196
192
  readonly published: Schema.Boolean;
197
193
  }>;
198
194
  export type AgentsListQuery = {
199
- readonly limit?: string | null;
195
+ readonly limit?: number | null;
200
196
  readonly cursor?: Cursor | null;
201
197
  };
202
198
  export declare const AgentsListQuery: Schema.Struct<{
203
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
199
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
204
200
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
205
201
  }>;
206
202
  export type AgentsList200 = AgentPage;
@@ -241,7 +237,6 @@ export declare const AgentsCreateRequestJson: Schema.Struct<{
241
237
  readonly integrationIds: Schema.$Array<Schema.String>;
242
238
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
243
239
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
244
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
245
240
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
246
241
  readonly timeZone: Schema.String;
247
242
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -266,7 +261,6 @@ export declare const AgentsCreate201: Schema.Struct<{
266
261
  readonly integrationIds: Schema.$Array<Schema.String>;
267
262
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
268
263
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
269
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
270
264
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
271
265
  readonly timeZone: Schema.String;
272
266
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -313,7 +307,6 @@ export declare const AgentsGet200: Schema.Struct<{
313
307
  readonly integrationIds: Schema.$Array<Schema.String>;
314
308
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
315
309
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
316
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
317
310
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
318
311
  readonly timeZone: Schema.String;
319
312
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -389,7 +382,6 @@ export declare const AgentsUpdate200: Schema.Struct<{
389
382
  readonly integrationIds: Schema.$Array<Schema.String>;
390
383
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
391
384
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
392
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
393
385
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
394
386
  readonly timeZone: Schema.String;
395
387
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -436,7 +428,6 @@ export declare const AgentsReplaceDraftRequestJson: Schema.Struct<{
436
428
  readonly integrationIds: Schema.$Array<Schema.String>;
437
429
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
438
430
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
439
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
440
431
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
441
432
  readonly timeZone: Schema.String;
442
433
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -461,7 +452,6 @@ export declare const AgentsReplaceDraft200: Schema.Struct<{
461
452
  readonly integrationIds: Schema.$Array<Schema.String>;
462
453
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
463
454
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
464
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
465
455
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
466
456
  readonly timeZone: Schema.String;
467
457
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -517,7 +507,6 @@ export declare const AgentsPublish200: Schema.Struct<{
517
507
  readonly integrationIds: Schema.$Array<Schema.String>;
518
508
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
519
509
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
520
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
521
510
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
522
511
  readonly timeZone: Schema.String;
523
512
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -543,7 +532,6 @@ export declare const AgentsPublish200: Schema.Struct<{
543
532
  readonly integrationIds: Schema.$Array<Schema.String>;
544
533
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
545
534
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
546
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
547
535
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
548
536
  readonly timeZone: Schema.String;
549
537
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -579,11 +567,11 @@ export declare const AgentsListVersionsPathParams: Schema.Struct<{
579
567
  readonly id: Schema.brand<Schema.String, "AgentId">;
580
568
  }>;
581
569
  export type AgentsListVersionsQuery = {
582
- readonly limit?: string | null;
570
+ readonly limit?: number | null;
583
571
  readonly cursor?: VersionCursor | null;
584
572
  };
585
573
  export declare const AgentsListVersionsQuery: Schema.Struct<{
586
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
574
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
587
575
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
588
576
  }>;
589
577
  export type AgentsListVersions200 = AgentVersionPage;
@@ -626,7 +614,6 @@ export declare const AgentsGetVersion200: Schema.Struct<{
626
614
  readonly integrationIds: Schema.$Array<Schema.String>;
627
615
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
628
616
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
629
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
630
617
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
631
618
  readonly timeZone: Schema.String;
632
619
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -661,7 +648,6 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
661
648
  readonly integrationIds: Schema.$Array<Schema.String>;
662
649
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
663
650
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
664
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
665
651
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
666
652
  readonly timeZone: Schema.String;
667
653
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -684,7 +670,6 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
684
670
  readonly integrationIds: Schema.$Array<Schema.String>;
685
671
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
686
672
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
687
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
688
673
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
689
674
  readonly timeZone: Schema.String;
690
675
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -793,7 +778,6 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
793
778
  readonly integrationIds: Schema.$Array<Schema.String>;
794
779
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
795
780
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
796
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
797
781
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
798
782
  readonly timeZone: Schema.String;
799
783
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -901,7 +885,6 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
901
885
  readonly integrationIds: Schema.$Array<Schema.String>;
902
886
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
903
887
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
904
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
905
888
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
906
889
  readonly timeZone: Schema.String;
907
890
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -994,7 +977,7 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
994
977
  readonly message: Schema.String;
995
978
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
996
979
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"agentsList", "GET", "/v1/agents", never, Schema.toCodecStringTree<Schema.Struct<{
997
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
980
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
998
981
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
999
982
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1000
983
  readonly items: Schema.$Array<Schema.Struct<{
@@ -1070,7 +1053,7 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
1070
1053
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"agentsListVersions", "GET", "/v1/agents/:id/versions", Schema.toCodecStringTree<Schema.Struct<{
1071
1054
  readonly id: Schema.brand<Schema.String, "AgentId">;
1072
1055
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1073
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1056
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1074
1057
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1075
1058
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1076
1059
  readonly items: Schema.$Array<Schema.Struct<{
@@ -1176,7 +1159,6 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
1176
1159
  readonly integrationIds: Schema.$Array<Schema.String>;
1177
1160
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
1178
1161
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
1179
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
1180
1162
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
1181
1163
  readonly timeZone: Schema.String;
1182
1164
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -1202,7 +1184,6 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
1202
1184
  readonly integrationIds: Schema.$Array<Schema.String>;
1203
1185
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
1204
1186
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
1205
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
1206
1187
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
1207
1188
  readonly timeZone: Schema.String;
1208
1189
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -1412,7 +1393,6 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
1412
1393
  readonly integrationIds: Schema.$Array<Schema.String>;
1413
1394
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
1414
1395
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
1415
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
1416
1396
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
1417
1397
  readonly timeZone: Schema.String;
1418
1398
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -1435,7 +1415,6 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
1435
1415
  readonly integrationIds: Schema.$Array<Schema.String>;
1436
1416
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
1437
1417
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
1438
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
1439
1418
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
1440
1419
  readonly timeZone: Schema.String;
1441
1420
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -1566,7 +1545,6 @@ declare const AgentsGroup_base: HttpApiGroup.HttpApiGroup<"Agents", HttpApiEndpo
1566
1545
  readonly integrationIds: Schema.$Array<Schema.String>;
1567
1546
  readonly mode: Schema.Union<readonly [Schema.Literal<"live">, Schema.Literal<"supervised">]>;
1568
1547
  readonly model: Schema.Union<readonly [Schema.Literal<"standard">, Schema.Literal<"max">]>;
1569
- readonly approvalPolicy: Schema.Union<readonly [Schema.Literal<"toolActions">, Schema.Literal<"none">]>;
1570
1548
  readonly workingHours: Schema.Union<readonly [Schema.Struct<{
1571
1549
  readonly timeZone: Schema.String;
1572
1550
  readonly ranges: Schema.$Array<Schema.Struct<{
@@ -0,0 +1,270 @@
1
+ import { AgentDefinition, AgentName, ApiKeySecurityMiddleware, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, NamespaceId, ResourceNotFoundError, UnauthorizedError, ValidationError, VersionCursor } from "./shared.js";
2
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
+ import * as Schema from "effect/Schema";
4
+ //#region src/effect/generated/agents.ts
5
+ const AgentId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^agt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
6
+ expected: "a string matching the RegExp ^agt_[0-9a-hjkmnp-tv-z]{16,24}$",
7
+ identifier: "AgentId"
8
+ })).pipe(Schema.brand("AgentId"));
9
+ const DeleteAgentResponse = /* @__PURE__ */ Schema.Struct({
10
+ id: AgentId,
11
+ deleted: Schema.Literal(true)
12
+ }).annotate({ identifier: "DeleteAgentResponse" });
13
+ const AgentVersionSummary = /* @__PURE__ */ Schema.Struct({
14
+ agentId: AgentId,
15
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
16
+ publishedAt: Schema.String
17
+ }).annotate({ identifier: "AgentVersionSummary" });
18
+ const AgentListItem = /* @__PURE__ */ Schema.Struct({
19
+ id: AgentId,
20
+ name: Schema.String,
21
+ namespaceId: Schema.Union([NamespaceId, Schema.Null]),
22
+ publishedVersion: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
23
+ publishedAt: Schema.Union([Schema.String, Schema.Null]),
24
+ createdAt: Schema.String,
25
+ updatedAt: Schema.String
26
+ }).annotate({ identifier: "AgentListItem" });
27
+ const AgentVersionPage = /* @__PURE__ */ Schema.Struct({
28
+ items: Schema.Array(AgentVersionSummary),
29
+ nextCursor: Schema.Union([Schema.String, Schema.Null])
30
+ }).annotate({ identifier: "AgentVersionPage" });
31
+ const AgentPage = /* @__PURE__ */ Schema.Struct({
32
+ items: Schema.Array(AgentListItem),
33
+ nextCursor: Schema.Union([Schema.String, Schema.Null])
34
+ }).annotate({ identifier: "AgentPage" });
35
+ const Agent = /* @__PURE__ */ Schema.Struct({
36
+ id: AgentId,
37
+ name: Schema.String,
38
+ namespaceId: Schema.Union([NamespaceId, Schema.Null]),
39
+ revision: Schema.String,
40
+ draft: AgentDefinition,
41
+ publishedVersion: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
42
+ publishedAt: Schema.Union([Schema.String, Schema.Null]),
43
+ createdAt: Schema.String,
44
+ updatedAt: Schema.String
45
+ }).annotate({ identifier: "Agent" });
46
+ const AgentVersion = /* @__PURE__ */ Schema.Struct({
47
+ agentId: AgentId,
48
+ version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
49
+ definition: AgentDefinition,
50
+ publishedAt: Schema.String
51
+ }).annotate({ identifier: "AgentVersion" });
52
+ const PublishAgentResponse = /* @__PURE__ */ Schema.Struct({
53
+ agent: Agent,
54
+ version: AgentVersion,
55
+ published: Schema.Boolean
56
+ }).annotate({ identifier: "PublishAgentResponse" });
57
+ const AgentsListQuery = /* @__PURE__ */ Schema.Struct({
58
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
59
+ cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
60
+ });
61
+ const AgentsList200 = AgentPage;
62
+ const AgentsList401 = UnauthorizedError;
63
+ const AgentsList403 = ForbiddenError;
64
+ const AgentsList422 = ValidationError;
65
+ const AgentsList500 = InternalError;
66
+ const AgentsList504 = GatewayTimeoutError;
67
+ const AgentsCreateRequestJson = /* @__PURE__ */ Schema.Struct({
68
+ name: AgentName,
69
+ namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the agent belongs to; it cannot move later. Omit for an organization-level agent. A namespace-scoped key always creates in its own namespace." })),
70
+ definition: Schema.optionalKey(Schema.Union([AgentDefinition, Schema.Null]).annotate({
71
+ description: "The first draft. Defaults to an agent with no instructions, knowledge, or endpoints, in supervised mode on the standard model.",
72
+ default: {
73
+ instructions: "",
74
+ knowledge: "",
75
+ endpointIds: [],
76
+ integrationIds: [],
77
+ mode: "supervised",
78
+ model: "standard",
79
+ workingHours: null,
80
+ takeoverTimeoutMinutes: 30
81
+ }
82
+ }))
83
+ });
84
+ const AgentsCreate201 = Agent;
85
+ const AgentsCreate401 = UnauthorizedError;
86
+ const AgentsCreate403 = ForbiddenError;
87
+ const AgentsCreate404 = ResourceNotFoundError;
88
+ const AgentsCreate422 = ValidationError;
89
+ const AgentsCreate500 = InternalError;
90
+ const AgentsCreate504 = GatewayTimeoutError;
91
+ const AgentsGetPathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
92
+ const AgentsGet200 = Agent;
93
+ const AgentsGet401 = UnauthorizedError;
94
+ const AgentsGet403 = ForbiddenError;
95
+ const AgentsGet404 = ResourceNotFoundError;
96
+ const AgentsGet422 = ValidationError;
97
+ const AgentsGet500 = InternalError;
98
+ const AgentsGet504 = GatewayTimeoutError;
99
+ const AgentsRemovePathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
100
+ const AgentsRemove200 = DeleteAgentResponse;
101
+ const AgentsRemove401 = UnauthorizedError;
102
+ const AgentsRemove403 = ForbiddenError;
103
+ const AgentsRemove404 = ResourceNotFoundError;
104
+ const AgentsRemove422 = ValidationError;
105
+ const AgentsRemove500 = InternalError;
106
+ const AgentsRemove504 = GatewayTimeoutError;
107
+ const AgentsUpdatePathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
108
+ const AgentsUpdateRequestJson = /* @__PURE__ */ Schema.Struct({ name: AgentName });
109
+ const AgentsUpdate200 = Agent;
110
+ const AgentsUpdate401 = UnauthorizedError;
111
+ const AgentsUpdate403 = ForbiddenError;
112
+ const AgentsUpdate404 = ResourceNotFoundError;
113
+ const AgentsUpdate422 = ValidationError;
114
+ const AgentsUpdate500 = InternalError;
115
+ const AgentsUpdate504 = GatewayTimeoutError;
116
+ const AgentsReplaceDraftPathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
117
+ const AgentsReplaceDraftRequestJson = /* @__PURE__ */ Schema.Struct({
118
+ revision: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
119
+ definition: AgentDefinition
120
+ });
121
+ const AgentsReplaceDraft200 = Agent;
122
+ const AgentsReplaceDraft401 = UnauthorizedError;
123
+ const AgentsReplaceDraft403 = ForbiddenError;
124
+ const AgentsReplaceDraft404 = ResourceNotFoundError;
125
+ const AgentsReplaceDraft409 = ConflictError;
126
+ const AgentsReplaceDraft422 = ValidationError;
127
+ const AgentsReplaceDraft500 = InternalError;
128
+ const AgentsReplaceDraft504 = GatewayTimeoutError;
129
+ const AgentsPublishPathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
130
+ const AgentsPublishRequestJson = /* @__PURE__ */ Schema.Struct({ revision: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) });
131
+ const AgentsPublish200 = PublishAgentResponse;
132
+ const AgentsPublish401 = UnauthorizedError;
133
+ const AgentsPublish403 = ForbiddenError;
134
+ const AgentsPublish404 = ResourceNotFoundError;
135
+ const AgentsPublish409 = ConflictError;
136
+ const AgentsPublish422 = ValidationError;
137
+ const AgentsPublish500 = InternalError;
138
+ const AgentsPublish504 = GatewayTimeoutError;
139
+ const AgentsListVersionsPathParams = /* @__PURE__ */ Schema.Struct({ id: AgentId });
140
+ const AgentsListVersionsQuery = /* @__PURE__ */ Schema.Struct({
141
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
142
+ cursor: Schema.optionalKey(Schema.Union([VersionCursor, Schema.Null]))
143
+ });
144
+ const AgentsListVersions200 = AgentVersionPage;
145
+ const AgentsListVersions401 = UnauthorizedError;
146
+ const AgentsListVersions403 = ForbiddenError;
147
+ const AgentsListVersions404 = ResourceNotFoundError;
148
+ const AgentsListVersions422 = ValidationError;
149
+ const AgentsListVersions500 = InternalError;
150
+ const AgentsListVersions504 = GatewayTimeoutError;
151
+ const AgentsGetVersionPathParams = /* @__PURE__ */ Schema.Struct({
152
+ id: AgentId,
153
+ version: Schema.String
154
+ });
155
+ const AgentsGetVersion200 = AgentVersion;
156
+ const AgentsGetVersion401 = UnauthorizedError;
157
+ const AgentsGetVersion403 = ForbiddenError;
158
+ const AgentsGetVersion404 = ResourceNotFoundError;
159
+ const AgentsGetVersion422 = ValidationError;
160
+ const AgentsGetVersion500 = InternalError;
161
+ const AgentsGetVersion504 = GatewayTimeoutError;
162
+ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.get("agentsList", "/v1/agents", {
163
+ query: AgentsListQuery,
164
+ success: AgentsList200,
165
+ error: [
166
+ AgentsList401.pipe(HttpApiSchema.status(401)),
167
+ AgentsList403.pipe(HttpApiSchema.status(403)),
168
+ AgentsList422.pipe(HttpApiSchema.status(422)),
169
+ AgentsList500,
170
+ AgentsList504.pipe(HttpApiSchema.status(504))
171
+ ]
172
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.list").annotate(OpenApi.Summary, "List agents").annotate(OpenApi.Description, "Returns the agents the caller can reach, newest first, without their drafts. Pass nextCursor back as cursor for the next page."), HttpApiEndpoint.post("agentsCreate", "/v1/agents", {
173
+ payload: AgentsCreateRequestJson,
174
+ success: AgentsCreate201.pipe(HttpApiSchema.status(201)),
175
+ error: [
176
+ AgentsCreate401.pipe(HttpApiSchema.status(401)),
177
+ AgentsCreate403.pipe(HttpApiSchema.status(403)),
178
+ AgentsCreate404.pipe(HttpApiSchema.status(404)),
179
+ AgentsCreate422.pipe(HttpApiSchema.status(422)),
180
+ AgentsCreate500,
181
+ AgentsCreate504.pipe(HttpApiSchema.status(504))
182
+ ]
183
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.create").annotate(OpenApi.Summary, "Create an agent").annotate(OpenApi.Description, "Creates an agent with a draft and returns it with status 201. The agent answers nothing until its draft is published. A new agent starts in supervised mode, so each reply waits for a person to approve it. The namespace is set at creation and cannot change."), HttpApiEndpoint.get("agentsGet", "/v1/agents/:id", {
184
+ params: AgentsGetPathParams,
185
+ success: AgentsGet200,
186
+ error: [
187
+ AgentsGet401.pipe(HttpApiSchema.status(401)),
188
+ AgentsGet403.pipe(HttpApiSchema.status(403)),
189
+ AgentsGet404.pipe(HttpApiSchema.status(404)),
190
+ AgentsGet422.pipe(HttpApiSchema.status(422)),
191
+ AgentsGet500,
192
+ AgentsGet504.pipe(HttpApiSchema.status(504))
193
+ ]
194
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.get").annotate(OpenApi.Summary, "Get an agent").annotate(OpenApi.Description, "Returns an agent with its draft, its current revision, and its newest published version number."), HttpApiEndpoint.delete("agentsRemove", "/v1/agents/:id", {
195
+ params: AgentsRemovePathParams,
196
+ success: AgentsRemove200,
197
+ error: [
198
+ AgentsRemove401.pipe(HttpApiSchema.status(401)),
199
+ AgentsRemove403.pipe(HttpApiSchema.status(403)),
200
+ AgentsRemove404.pipe(HttpApiSchema.status(404)),
201
+ AgentsRemove422.pipe(HttpApiSchema.status(422)),
202
+ AgentsRemove500,
203
+ AgentsRemove504.pipe(HttpApiSchema.status(504))
204
+ ]
205
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.remove").annotate(OpenApi.Summary, "Delete an agent").annotate(OpenApi.Description, "Deletes an agent with its draft and published versions. The endpoints it answered on stop being answered by an agent. A reply already running finishes on the version it started on."), HttpApiEndpoint.patch("agentsUpdate", "/v1/agents/:id", {
206
+ params: AgentsUpdatePathParams,
207
+ payload: AgentsUpdateRequestJson,
208
+ success: AgentsUpdate200,
209
+ error: [
210
+ AgentsUpdate401.pipe(HttpApiSchema.status(401)),
211
+ AgentsUpdate403.pipe(HttpApiSchema.status(403)),
212
+ AgentsUpdate404.pipe(HttpApiSchema.status(404)),
213
+ AgentsUpdate422.pipe(HttpApiSchema.status(422)),
214
+ AgentsUpdate500,
215
+ AgentsUpdate504.pipe(HttpApiSchema.status(504))
216
+ ]
217
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.update").annotate(OpenApi.Summary, "Rename an agent").annotate(OpenApi.Description, "Renames an agent."), HttpApiEndpoint.put("agentsReplaceDraft", "/v1/agents/:id/draft", {
218
+ params: AgentsReplaceDraftPathParams,
219
+ payload: AgentsReplaceDraftRequestJson,
220
+ success: AgentsReplaceDraft200,
221
+ error: [
222
+ AgentsReplaceDraft401.pipe(HttpApiSchema.status(401)),
223
+ AgentsReplaceDraft403.pipe(HttpApiSchema.status(403)),
224
+ AgentsReplaceDraft404.pipe(HttpApiSchema.status(404)),
225
+ AgentsReplaceDraft409.pipe(HttpApiSchema.status(409)),
226
+ AgentsReplaceDraft422.pipe(HttpApiSchema.status(422)),
227
+ AgentsReplaceDraft500,
228
+ AgentsReplaceDraft504.pipe(HttpApiSchema.status(504))
229
+ ]
230
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.replaceDraft").annotate(OpenApi.Summary, "Replace an agent draft").annotate(OpenApi.Description, "Replaces the whole draft and returns the agent with a new revision. The request names the revision it read; a stale revision returns 409. Published versions, and the conversations answered on them, do not change. An endpoint answers for one agent at a time: a draft that names an endpoint another agent answers on returns 409."), HttpApiEndpoint.post("agentsPublish", "/v1/agents/:id/publish", {
231
+ params: AgentsPublishPathParams,
232
+ payload: AgentsPublishRequestJson,
233
+ success: AgentsPublish200,
234
+ error: [
235
+ AgentsPublish401.pipe(HttpApiSchema.status(401)),
236
+ AgentsPublish403.pipe(HttpApiSchema.status(403)),
237
+ AgentsPublish404.pipe(HttpApiSchema.status(404)),
238
+ AgentsPublish409.pipe(HttpApiSchema.status(409)),
239
+ AgentsPublish422.pipe(HttpApiSchema.status(422)),
240
+ AgentsPublish500,
241
+ AgentsPublish504.pipe(HttpApiSchema.status(504))
242
+ ]
243
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.publish").annotate(OpenApi.Summary, "Publish an agent").annotate(OpenApi.Description, "Publishes the draft as the next immutable version. Each conversation moves to it from its next agent reply; a reply already running finishes on the version it started on. The request names the revision it read; a stale revision returns 409. Publishing a draft identical to the newest version changes nothing and answers published false. An endpoint answers for one agent at a time: publishing a draft whose endpoint another agent answers on returns 409. In supervised mode each reply waits for a person to approve it."), HttpApiEndpoint.get("agentsListVersions", "/v1/agents/:id/versions", {
244
+ params: AgentsListVersionsPathParams,
245
+ query: AgentsListVersionsQuery,
246
+ success: AgentsListVersions200,
247
+ error: [
248
+ AgentsListVersions401.pipe(HttpApiSchema.status(401)),
249
+ AgentsListVersions403.pipe(HttpApiSchema.status(403)),
250
+ AgentsListVersions404.pipe(HttpApiSchema.status(404)),
251
+ AgentsListVersions422.pipe(HttpApiSchema.status(422)),
252
+ AgentsListVersions500,
253
+ AgentsListVersions504.pipe(HttpApiSchema.status(504))
254
+ ]
255
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.listVersions").annotate(OpenApi.Summary, "List published agent versions").annotate(OpenApi.Description, "Returns an agent's published versions, newest first, without their definitions. Pass nextCursor back as cursor for the next page."), HttpApiEndpoint.get("agentsGetVersion", "/v1/agents/:id/versions/:version", {
256
+ params: AgentsGetVersionPathParams,
257
+ success: AgentsGetVersion200,
258
+ error: [
259
+ AgentsGetVersion401.pipe(HttpApiSchema.status(401)),
260
+ AgentsGetVersion403.pipe(HttpApiSchema.status(403)),
261
+ AgentsGetVersion404.pipe(HttpApiSchema.status(404)),
262
+ AgentsGetVersion422.pipe(HttpApiSchema.status(422)),
263
+ AgentsGetVersion500,
264
+ AgentsGetVersion504.pipe(HttpApiSchema.status(504))
265
+ ]
266
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.getVersion").annotate(OpenApi.Summary, "Get a published agent version").annotate(OpenApi.Description, "Returns the immutable definition of one published version.")).annotate(OpenApi.Description, "Agents that answer conversations on your mailbox endpoints, with a draft, published versions, and rules for supervision, hours, and staff takeover") {};
267
+ //#endregion
268
+ export { Agent, AgentId, AgentListItem, AgentPage, AgentVersion, AgentVersionPage, AgentVersionSummary, AgentsCreate201, AgentsCreate401, AgentsCreate403, AgentsCreate404, AgentsCreate422, AgentsCreate500, AgentsCreate504, AgentsCreateRequestJson, AgentsGet200, AgentsGet401, AgentsGet403, AgentsGet404, AgentsGet422, AgentsGet500, AgentsGet504, AgentsGetPathParams, AgentsGetVersion200, AgentsGetVersion401, AgentsGetVersion403, AgentsGetVersion404, AgentsGetVersion422, AgentsGetVersion500, AgentsGetVersion504, AgentsGetVersionPathParams, AgentsGroup, AgentsList200, AgentsList401, AgentsList403, AgentsList422, AgentsList500, AgentsList504, AgentsListQuery, AgentsListVersions200, AgentsListVersions401, AgentsListVersions403, AgentsListVersions404, AgentsListVersions422, AgentsListVersions500, AgentsListVersions504, AgentsListVersionsPathParams, AgentsListVersionsQuery, AgentsPublish200, AgentsPublish401, AgentsPublish403, AgentsPublish404, AgentsPublish409, AgentsPublish422, AgentsPublish500, AgentsPublish504, AgentsPublishPathParams, AgentsPublishRequestJson, AgentsRemove200, AgentsRemove401, AgentsRemove403, AgentsRemove404, AgentsRemove422, AgentsRemove500, AgentsRemove504, AgentsRemovePathParams, AgentsReplaceDraft200, AgentsReplaceDraft401, AgentsReplaceDraft403, AgentsReplaceDraft404, AgentsReplaceDraft409, AgentsReplaceDraft422, AgentsReplaceDraft500, AgentsReplaceDraft504, AgentsReplaceDraftPathParams, AgentsReplaceDraftRequestJson, AgentsUpdate200, AgentsUpdate401, AgentsUpdate403, AgentsUpdate404, AgentsUpdate422, AgentsUpdate500, AgentsUpdate504, AgentsUpdatePathParams, AgentsUpdateRequestJson, DeleteAgentResponse, PublishAgentResponse };
269
+
270
+ //# sourceMappingURL=agents.js.map
@@ -182,13 +182,13 @@ export declare const AnalyticsGetStats504: typeof GatewayTimeoutError;
182
182
  export type AnalyticsGetTopContactsQuery = {
183
183
  readonly after?: __SamvaRuntimeAbsoluteInstant | null;
184
184
  readonly before?: __SamvaRuntimeAbsoluteInstant | null;
185
- readonly limit?: string | null;
185
+ readonly limit?: number | null;
186
186
  readonly sortBy?: "sent" | "received" | "total" | null;
187
187
  };
188
188
  export declare const AnalyticsGetTopContactsQuery: Schema.Struct<{
189
189
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.decodeTo<Schema.Date, Schema.String, never, never>, Schema.Null]>>;
190
190
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.decodeTo<Schema.Date, Schema.String, never, never>, Schema.Null]>>;
191
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
191
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
192
192
  readonly sortBy: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sent">, Schema.Literal<"received">, Schema.Literal<"total">]>, Schema.Null]>>;
193
193
  }>;
194
194
  export type AnalyticsGetTopContacts200 = ReadonlyArray<{
@@ -629,7 +629,7 @@ declare const AnalyticsGroup_base: HttpApiGroup.HttpApiGroup<"Analytics", HttpAp
629
629
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"analyticsGetTopContacts", "GET", "/v1/analytics/top-contacts", never, Schema.toCodecStringTree<Schema.Struct<{
630
630
  readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.decodeTo<Schema.Date, Schema.String, never, never>, Schema.Null]>>;
631
631
  readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.decodeTo<Schema.Date, Schema.String, never, never>, Schema.Null]>>;
632
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
632
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
633
633
  readonly sortBy: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"sent">, Schema.Literal<"received">, Schema.Literal<"total">]>, Schema.Null]>>;
634
634
  }>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
635
635
  readonly id: Schema.String;
@@ -95,7 +95,7 @@ const AnalyticsGetStats504 = GatewayTimeoutError;
95
95
  const AnalyticsGetTopContactsQuery = /* @__PURE__ */ Schema.Struct({
96
96
  after: Schema.optionalKey(Schema.Union([AbsoluteInstant, Schema.Null])),
97
97
  before: Schema.optionalKey(Schema.Union([AbsoluteInstant, Schema.Null])),
98
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
98
+ limit: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
99
99
  sortBy: Schema.optionalKey(Schema.Union([Schema.Union([
100
100
  Schema.Literal("sent"),
101
101
  Schema.Literal("received"),
@@ -204,13 +204,13 @@ export declare const ApiKeyPage: Schema.Struct<{
204
204
  readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
205
205
  }>;
206
206
  export type ApiKeysListQuery = {
207
- readonly limit?: string | null;
207
+ readonly limit?: number | null;
208
208
  readonly cursor?: Cursor | null;
209
209
  readonly status?: "active" | "revoked" | null;
210
210
  readonly search?: string | null;
211
211
  };
212
212
  export declare const ApiKeysListQuery: Schema.Struct<{
213
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
213
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
214
214
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
215
215
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"revoked">]>, Schema.Null]>>;
216
216
  readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -514,11 +514,11 @@ export declare const ApiKeysGetActivityPathParams: Schema.Struct<{
514
514
  readonly id: Schema.brand<Schema.String, "ApiKeyId">;
515
515
  }>;
516
516
  export type ApiKeysGetActivityQuery = {
517
- readonly limit?: string | null;
517
+ readonly limit?: number | null;
518
518
  readonly cursor?: Cursor | null;
519
519
  };
520
520
  export declare const ApiKeysGetActivityQuery: Schema.Struct<{
521
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
521
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
522
522
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
523
523
  }>;
524
524
  export type ApiKeysGetActivity200 = ApiKeyActivityPage;
@@ -1006,7 +1006,7 @@ declare const APIKeysGroup_base: HttpApiGroup.HttpApiGroup<"API Keys", HttpApiEn
1006
1006
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"apiKeysGetActivity", "GET", "/v1/api-keys/:id/activity", Schema.toCodecStringTree<Schema.Struct<{
1007
1007
  readonly id: Schema.brand<Schema.String, "ApiKeyId">;
1008
1008
  }>>, Schema.toCodecStringTree<Schema.Struct<{
1009
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1009
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1010
1010
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1011
1011
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
1012
1012
  readonly items: Schema.$Array<Schema.Struct<{
@@ -1192,7 +1192,7 @@ declare const APIKeysGroup_base: HttpApiGroup.HttpApiGroup<"API Keys", HttpApiEn
1192
1192
  readonly message: Schema.String;
1193
1193
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1194
1194
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"apiKeysList", "GET", "/v1/api-keys", never, Schema.toCodecStringTree<Schema.Struct<{
1195
- readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1195
+ readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1196
1196
  readonly cursor: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1197
1197
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"revoked">]>, Schema.Null]>>;
1198
1198
  readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;