samva 0.51.0 → 0.53.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 (89) hide show
  1. package/AGENTS.md +5 -2
  2. package/README.md +1 -0
  3. package/dist/client/sdk.gen.d.ts +82 -36
  4. package/dist/client/sdk.gen.js +192 -57
  5. package/dist/client/types.gen.d.ts +607 -291
  6. package/dist/effect/campaigns.d.ts +56 -56
  7. package/dist/effect/descriptors/integrations-catalog.d.ts +1 -1
  8. package/dist/effect/descriptors/integrations-catalog.js +1 -1
  9. package/dist/effect/descriptors/integrations.d.ts +1 -1
  10. package/dist/effect/descriptors/integrations.js +1 -1
  11. package/dist/effect/descriptors/logs.d.ts +21 -0
  12. package/dist/effect/descriptors/logs.js +23 -0
  13. package/dist/effect/descriptors/whats-app.d.ts +1 -1
  14. package/dist/effect/descriptors/whats-app.js +1 -1
  15. package/dist/effect/events.d.ts +16 -0
  16. package/dist/effect/generated/agents.js +4 -4
  17. package/dist/effect/generated/campaigns.d.ts +18 -6
  18. package/dist/effect/generated/campaigns.js +2 -6
  19. package/dist/effect/generated/email.js +3 -3
  20. package/dist/effect/generated/events.d.ts +48 -0
  21. package/dist/effect/generated/events.js +1 -1
  22. package/dist/effect/generated/index.d.ts +3 -1
  23. package/dist/effect/generated/integrations-catalog.d.ts +93 -49
  24. package/dist/effect/generated/integrations-catalog.js +17 -28
  25. package/dist/effect/generated/integrations.d.ts +20 -40
  26. package/dist/effect/generated/integrations.js +9 -13
  27. package/dist/effect/generated/journeys.d.ts +1113 -67
  28. package/dist/effect/generated/journeys.js +14 -8
  29. package/dist/effect/generated/logs.d.ts +2323 -0
  30. package/dist/effect/generated/logs.js +312 -0
  31. package/dist/effect/generated/mailboxes.d.ts +38 -24
  32. package/dist/effect/generated/mailboxes.js +22 -21
  33. package/dist/effect/generated/messages.d.ts +11 -882
  34. package/dist/effect/generated/messages.js +4 -243
  35. package/dist/effect/generated/newsletter-domains.d.ts +61 -13
  36. package/dist/effect/generated/newsletter-domains.js +5 -5
  37. package/dist/effect/generated/newsletter-issues.d.ts +166 -34
  38. package/dist/effect/generated/newsletter-issues.js +12 -12
  39. package/dist/effect/generated/newsletters.d.ts +76 -16
  40. package/dist/effect/generated/newsletters.js +6 -6
  41. package/dist/effect/generated/organizations.js +1 -1
  42. package/dist/effect/generated/scheduled-messages.d.ts +36 -0
  43. package/dist/effect/generated/scheduled-messages.js +1 -1
  44. package/dist/effect/generated/shared.d.ts +1706 -442
  45. package/dist/effect/generated/shared.js +370 -93
  46. package/dist/effect/generated/subscriptions.d.ts +4 -4
  47. package/dist/effect/generated/subscriptions.js +2 -6
  48. package/dist/effect/generated/template-registrations.d.ts +46 -10
  49. package/dist/effect/generated/template-registrations.js +4 -4
  50. package/dist/effect/generated/templates.js +2 -2
  51. package/dist/effect/generated/whats-app-flows.d.ts +173 -35
  52. package/dist/effect/generated/whats-app-flows.js +19 -17
  53. package/dist/effect/generated/whats-app-setup-links.d.ts +61 -13
  54. package/dist/effect/generated/whats-app-setup-links.js +5 -5
  55. package/dist/effect/generated/whats-app.d.ts +187 -65
  56. package/dist/effect/generated/whats-app.js +18 -24
  57. package/dist/effect/generated-metadata.d.ts +15 -3
  58. package/dist/effect/generated-metadata.js +375 -349
  59. package/dist/effect/index.d.ts +1 -0
  60. package/dist/effect/index.js +2 -1
  61. package/dist/effect/integrations-catalog.d.ts +92 -4
  62. package/dist/effect/integrations.d.ts +40 -8
  63. package/dist/effect/internal/client.js +25 -3
  64. package/dist/effect/internal/log-events.d.ts +19 -0
  65. package/dist/effect/internal/log-events.js +53 -0
  66. package/dist/effect/internal/mailbox-events.d.ts +6 -2
  67. package/dist/effect/internal/mailbox-events.js +4 -3
  68. package/dist/effect/journeys.d.ts +212 -146
  69. package/dist/effect/logs.d.ts +149 -0
  70. package/dist/effect/logs.js +18 -0
  71. package/dist/effect/mailboxes.d.ts +158 -150
  72. package/dist/effect/mailboxes.js +1 -1
  73. package/dist/effect/newsletter-domains.d.ts +2 -2
  74. package/dist/effect/scheduled-messages.d.ts +66 -0
  75. package/dist/effect/whatsapp-flows.d.ts +30 -0
  76. package/dist/effect/whatsapp-setup-links.d.ts +2 -2
  77. package/dist/effect/whatsapp.d.ts +73 -3
  78. package/dist/mailbox-events.d.ts +50 -3
  79. package/dist/mailbox-events.js +38 -19
  80. package/dist/package.js +1 -1
  81. package/dist/promises/client.d.ts +3 -1
  82. package/dist/promises/client.js +3 -1
  83. package/dist/promises/errors.gen.d.ts +2 -0
  84. package/dist/promises/errors.gen.js +137 -34
  85. package/dist/promises/types.gen.d.ts +1 -1
  86. package/dist/request-id.d.ts +3 -0
  87. package/dist/request-id.js +7 -0
  88. package/dist/service-map.d.ts +14 -3
  89. package/package.json +6 -2
@@ -734,6 +734,20 @@ export declare const list: ((input?: {
734
734
  readonly name: string;
735
735
  readonly channel: "email" | "sms" | "whatsapp";
736
736
  readonly content: {
737
+ readonly channel: "sms";
738
+ readonly sms: {
739
+ readonly text?: string | null;
740
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
741
+ readonly templateSlug?: string | null;
742
+ readonly templateData?: {
743
+ readonly [x: string]: import("./generated/index.js").JsonValue;
744
+ } | null;
745
+ };
746
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
747
+ readonly metadata?: {
748
+ readonly [x: string]: import("./generated/index.js").JsonValue;
749
+ } | null;
750
+ } | {
737
751
  readonly channel: "email";
738
752
  readonly email: {
739
753
  readonly subject?: string | null;
@@ -783,20 +797,6 @@ export declare const list: ((input?: {
783
797
  readonly metadata?: {
784
798
  readonly [x: string]: import("./generated/index.js").JsonValue;
785
799
  } | null;
786
- } | {
787
- readonly channel: "sms";
788
- readonly sms: {
789
- readonly text?: string | null;
790
- readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
791
- readonly templateSlug?: string | null;
792
- readonly templateData?: {
793
- readonly [x: string]: import("./generated/index.js").JsonValue;
794
- } | null;
795
- };
796
- readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
797
- readonly metadata?: {
798
- readonly [x: string]: import("./generated/index.js").JsonValue;
799
- } | null;
800
800
  } | {
801
801
  readonly channel: "whatsapp";
802
802
  readonly whatsapp: {
@@ -860,6 +860,20 @@ export declare const list: ((input?: {
860
860
  readonly name: string;
861
861
  readonly channel: "email" | "sms" | "whatsapp";
862
862
  readonly content: {
863
+ readonly channel: "sms";
864
+ readonly sms: {
865
+ readonly text?: string | null;
866
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
867
+ readonly templateSlug?: string | null;
868
+ readonly templateData?: {
869
+ readonly [x: string]: import("./generated/index.js").JsonValue;
870
+ } | null;
871
+ };
872
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
873
+ readonly metadata?: {
874
+ readonly [x: string]: import("./generated/index.js").JsonValue;
875
+ } | null;
876
+ } | {
863
877
  readonly channel: "email";
864
878
  readonly email: {
865
879
  readonly subject?: string | null;
@@ -909,20 +923,6 @@ export declare const list: ((input?: {
909
923
  readonly metadata?: {
910
924
  readonly [x: string]: import("./generated/index.js").JsonValue;
911
925
  } | null;
912
- } | {
913
- readonly channel: "sms";
914
- readonly sms: {
915
- readonly text?: string | null;
916
- readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
917
- readonly templateSlug?: string | null;
918
- readonly templateData?: {
919
- readonly [x: string]: import("./generated/index.js").JsonValue;
920
- } | null;
921
- };
922
- readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
923
- readonly metadata?: {
924
- readonly [x: string]: import("./generated/index.js").JsonValue;
925
- } | null;
926
926
  } | {
927
927
  readonly channel: "whatsapp";
928
928
  readonly whatsapp: {
@@ -1250,6 +1250,20 @@ export declare const listRuns: ((input: {
1250
1250
  readonly startedAt: string | null;
1251
1251
  readonly completedAt: string | null;
1252
1252
  readonly contentSnapshot: {
1253
+ readonly channel: "sms";
1254
+ readonly sms: {
1255
+ readonly text?: string | null;
1256
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
1257
+ readonly templateSlug?: string | null;
1258
+ readonly templateData?: {
1259
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1260
+ } | null;
1261
+ };
1262
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1263
+ readonly metadata?: {
1264
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1265
+ } | null;
1266
+ } | {
1253
1267
  readonly channel: "email";
1254
1268
  readonly email: {
1255
1269
  readonly subject?: string | null;
@@ -1299,20 +1313,6 @@ export declare const listRuns: ((input: {
1299
1313
  readonly metadata?: {
1300
1314
  readonly [x: string]: import("./generated/index.js").JsonValue;
1301
1315
  } | null;
1302
- } | {
1303
- readonly channel: "sms";
1304
- readonly sms: {
1305
- readonly text?: string | null;
1306
- readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
1307
- readonly templateSlug?: string | null;
1308
- readonly templateData?: {
1309
- readonly [x: string]: import("./generated/index.js").JsonValue;
1310
- } | null;
1311
- };
1312
- readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1313
- readonly metadata?: {
1314
- readonly [x: string]: import("./generated/index.js").JsonValue;
1315
- } | null;
1316
1316
  } | {
1317
1317
  readonly channel: "whatsapp";
1318
1318
  readonly whatsapp: {
@@ -1380,6 +1380,20 @@ export declare const listRuns: ((input: {
1380
1380
  readonly startedAt: string | null;
1381
1381
  readonly completedAt: string | null;
1382
1382
  readonly contentSnapshot: {
1383
+ readonly channel: "sms";
1384
+ readonly sms: {
1385
+ readonly text?: string | null;
1386
+ readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
1387
+ readonly templateSlug?: string | null;
1388
+ readonly templateData?: {
1389
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1390
+ } | null;
1391
+ };
1392
+ readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1393
+ readonly metadata?: {
1394
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1395
+ } | null;
1396
+ } | {
1383
1397
  readonly channel: "email";
1384
1398
  readonly email: {
1385
1399
  readonly subject?: string | null;
@@ -1429,20 +1443,6 @@ export declare const listRuns: ((input: {
1429
1443
  readonly metadata?: {
1430
1444
  readonly [x: string]: import("./generated/index.js").JsonValue;
1431
1445
  } | null;
1432
- } | {
1433
- readonly channel: "sms";
1434
- readonly sms: {
1435
- readonly text?: string | null;
1436
- readonly templateId?: (string & import("effect/Brand").Brand<"TemplateId">) | null;
1437
- readonly templateSlug?: string | null;
1438
- readonly templateData?: {
1439
- readonly [x: string]: import("./generated/index.js").JsonValue;
1440
- } | null;
1441
- };
1442
- readonly conversationId?: (string & import("effect/Brand").Brand<"ConversationId">) | null;
1443
- readonly metadata?: {
1444
- readonly [x: string]: import("./generated/index.js").JsonValue;
1445
- } | null;
1446
1446
  } | {
1447
1447
  readonly channel: "whatsapp";
1448
1448
  readonly whatsapp: {
@@ -146,7 +146,7 @@ export declare const integrationCatalogOperations: {
146
146
  readonly group: "Integrations catalog";
147
147
  readonly method: "GET";
148
148
  readonly idempotent: false;
149
- readonly paginated: false;
149
+ readonly paginated: true;
150
150
  readonly call: {
151
151
  readonly kind: "params";
152
152
  };
@@ -133,7 +133,7 @@ const integrationCatalogOperations = {
133
133
  group: "Integrations catalog",
134
134
  method: "GET",
135
135
  idempotent: false,
136
- paginated: false,
136
+ paginated: true,
137
137
  call: { kind: "params" }
138
138
  },
139
139
  integrationCatalogList: {
@@ -21,7 +21,7 @@ export declare const integrationsOperations: {
21
21
  readonly group: "Integrations";
22
22
  readonly method: "GET";
23
23
  readonly idempotent: false;
24
- readonly paginated: false;
24
+ readonly paginated: true;
25
25
  readonly call: {
26
26
  readonly kind: "pathParams";
27
27
  readonly paths: readonly ["integrationId"];
@@ -18,7 +18,7 @@ const integrationsOperations = {
18
18
  group: "Integrations",
19
19
  method: "GET",
20
20
  idempotent: false,
21
- paginated: false,
21
+ paginated: true,
22
22
  call: {
23
23
  kind: "pathParams",
24
24
  paths: ["integrationId"]
@@ -0,0 +1,21 @@
1
+ export declare const logsOperations: {
2
+ readonly logsList: {
3
+ readonly group: "Logs";
4
+ readonly method: "GET";
5
+ readonly idempotent: false;
6
+ readonly paginated: true;
7
+ readonly call: {
8
+ readonly kind: "params";
9
+ };
10
+ };
11
+ readonly logsGet: {
12
+ readonly group: "Logs";
13
+ readonly method: "GET";
14
+ readonly idempotent: false;
15
+ readonly paginated: false;
16
+ readonly call: {
17
+ readonly kind: "path";
18
+ readonly paths: readonly ["id"];
19
+ };
20
+ };
21
+ };
@@ -0,0 +1,23 @@
1
+ // src/effect/descriptors/logs.ts
2
+ const logsOperations = {
3
+ logsList: {
4
+ group: "Logs",
5
+ method: "GET",
6
+ idempotent: false,
7
+ paginated: true,
8
+ call: { kind: "params" }
9
+ },
10
+ logsGet: {
11
+ group: "Logs",
12
+ method: "GET",
13
+ idempotent: false,
14
+ paginated: false,
15
+ call: {
16
+ kind: "path",
17
+ paths: ["id"]
18
+ }
19
+ }
20
+ };
21
+ export { logsOperations };
22
+
23
+ //# sourceMappingURL=logs.js.map
@@ -49,7 +49,7 @@ export declare const whatsappOperations: {
49
49
  readonly group: "WhatsApp";
50
50
  readonly method: "GET";
51
51
  readonly idempotent: false;
52
- readonly paginated: false;
52
+ readonly paginated: true;
53
53
  readonly call: {
54
54
  readonly kind: "params";
55
55
  };
@@ -42,7 +42,7 @@ const whatsappOperations = {
42
42
  group: "WhatsApp",
43
43
  method: "GET",
44
44
  idempotent: false,
45
- paginated: false,
45
+ paginated: true,
46
46
  call: { kind: "params" }
47
47
  },
48
48
  whatsappConnectBusinessAccount: {
@@ -4,14 +4,22 @@ export declare const create: (input: {
4
4
  readonly id: string;
5
5
  readonly externalId?: undefined;
6
6
  readonly email?: undefined;
7
+ readonly phone?: undefined;
7
8
  } | {
8
9
  readonly externalId: string;
9
10
  readonly id?: undefined;
10
11
  readonly email?: undefined;
12
+ readonly phone?: undefined;
11
13
  } | {
12
14
  readonly email: string;
13
15
  readonly id?: undefined;
14
16
  readonly externalId?: undefined;
17
+ readonly phone?: undefined;
18
+ } | {
19
+ readonly phone: string;
20
+ readonly id?: undefined;
21
+ readonly externalId?: undefined;
22
+ readonly email?: undefined;
15
23
  };
16
24
  readonly name: string;
17
25
  readonly properties?: {
@@ -49,14 +57,22 @@ export declare const batch: (input: {
49
57
  readonly id: string;
50
58
  readonly externalId?: undefined;
51
59
  readonly email?: undefined;
60
+ readonly phone?: undefined;
52
61
  } | {
53
62
  readonly externalId: string;
54
63
  readonly id?: undefined;
55
64
  readonly email?: undefined;
65
+ readonly phone?: undefined;
56
66
  } | {
57
67
  readonly email: string;
58
68
  readonly id?: undefined;
59
69
  readonly externalId?: undefined;
70
+ readonly phone?: undefined;
71
+ } | {
72
+ readonly phone: string;
73
+ readonly id?: undefined;
74
+ readonly externalId?: undefined;
75
+ readonly email?: undefined;
60
76
  };
61
77
  readonly name: string;
62
78
  readonly properties?: {
@@ -353,7 +353,7 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
353
353
  AgentsCreate500,
354
354
  AgentsCreate504.pipe(HttpApiSchema.status(504))
355
355
  ]
356
- }).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. The default policy requires a person to approve replies and final actions. The namespace is set at creation and cannot change."), HttpApiEndpoint.get("agentsGet", "/v1/agents/:id", {
356
+ }).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. The default policy requires a person to approve replies and final actions. API keys need organization-wide reach to create with a custom policy. The namespace is set at creation and cannot change."), HttpApiEndpoint.get("agentsGet", "/v1/agents/:id", {
357
357
  params: AgentsGetPathParams,
358
358
  success: AgentsGet200,
359
359
  error: [
@@ -418,7 +418,7 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
418
418
  AgentsReplaceDraft500,
419
419
  AgentsReplaceDraft504.pipe(HttpApiSchema.status(504))
420
420
  ]
421
- }).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. A draft that pins a catalog model returns 402 unless your plan is Growth or Scale, and 422 when the model is not available or does not support the reasoning level."), HttpApiEndpoint.post("agentsPublish", "/v1/agents/:id/publish", {
421
+ }).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. API keys need organization-wide reach to change the draft policy. 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. A draft that pins a catalog model returns 402 unless your plan is Growth or Scale, and 422 when the model is not available or does not support the reasoning level."), HttpApiEndpoint.post("agentsPublish", "/v1/agents/:id/publish", {
422
422
  params: AgentsPublishPathParams,
423
423
  payload: AgentsPublishRequestJson,
424
424
  success: AgentsPublish200,
@@ -433,7 +433,7 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
433
433
  AgentsPublish500,
434
434
  AgentsPublish504.pipe(HttpApiSchema.status(504))
435
435
  ]
436
- }).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. The published policy governs review of each proposed action."), HttpApiEndpoint.post("agentsRerunTests", "/v1/agents/:id/tests/rerun", {
436
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.publish").annotate(OpenApi.Summary, "Publish an agent").annotate(OpenApi.Description, "Publishes the draft as the next immutable version. API keys need organization-wide reach to publish a policy change. 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. The published policy governs review of each proposed action."), HttpApiEndpoint.post("agentsRerunTests", "/v1/agents/:id/tests/rerun", {
437
437
  params: AgentsRerunTestsPathParams,
438
438
  payload: AgentsRerunTestsRequestJson,
439
439
  success: AgentsRerunTests200,
@@ -474,7 +474,7 @@ var AgentsGroup = class extends HttpApiGroup.make("Agents").add(HttpApiEndpoint.
474
474
  AgentsPublishVersion500,
475
475
  AgentsPublishVersion504.pipe(HttpApiSchema.status(504))
476
476
  ]
477
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.publishVersion").annotate(OpenApi.Summary, "Publish an agent module").annotate(OpenApi.Description, "Publishes a self-contained JavaScript module and its manifest as the next immutable version. Source is stored by its SHA-256 digest without execution. The revision protects the draft read by the publisher; a stale revision returns 409. Publishing the same manifest, source, and definition again returns published false. The manifest controls the model, endpoints, integration grants, and action policy. Draft instructions and knowledge remain editable builder data; the hosted runtime reads instructions and tools from the published module."), HttpApiEndpoint.get("agentsGetVersion", "/v1/agents/:id/versions/:version", {
477
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "agents.publishVersion").annotate(OpenApi.Summary, "Publish an agent module").annotate(OpenApi.Description, "Publishes a self-contained JavaScript module and its manifest as the next immutable version. API keys need organization-wide reach to publish a policy change. Source is stored by its SHA-256 digest without execution. The revision protects the draft read by the publisher; a stale revision returns 409. Publishing the same manifest, source, and definition again returns published false. The manifest controls the model, endpoints, integration grants, and action policy. Draft instructions and knowledge remain editable builder data; the hosted runtime reads instructions and tools from the published module."), HttpApiEndpoint.get("agentsGetVersion", "/v1/agents/:id/versions/:version", {
478
478
  params: AgentsGetVersionPathParams,
479
479
  success: AgentsGetVersion200,
480
480
  error: [
@@ -2901,8 +2901,8 @@ export type CampaignsPreview400 = MalformedRequestError;
2901
2901
  export declare const CampaignsPreview400: typeof MalformedRequestError;
2902
2902
  export type CampaignsPreview401 = UnauthorizedError;
2903
2903
  export declare const CampaignsPreview401: typeof UnauthorizedError;
2904
- export type CampaignsPreview403 = FlagDisabledError | ForbiddenError;
2905
- export declare const CampaignsPreview403: Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]>;
2904
+ export type CampaignsPreview403 = ForbiddenError;
2905
+ export declare const CampaignsPreview403: typeof ForbiddenError;
2906
2906
  export type CampaignsPreview404 = ResourceNotFoundError;
2907
2907
  export declare const CampaignsPreview404: typeof ResourceNotFoundError;
2908
2908
  export type CampaignsPreview409 = ConflictError;
@@ -3009,8 +3009,8 @@ export type CampaignsSendTest401 = UnauthorizedError;
3009
3009
  export declare const CampaignsSendTest401: typeof UnauthorizedError;
3010
3010
  export type CampaignsSendTest402 = PaymentRequiredError;
3011
3011
  export declare const CampaignsSendTest402: typeof PaymentRequiredError;
3012
- export type CampaignsSendTest403 = ForbiddenError | OnboardingReviewRequiredError | FlagDisabledError;
3013
- export declare const CampaignsSendTest403: Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError, typeof FlagDisabledError]>;
3012
+ export type CampaignsSendTest403 = ForbiddenError | OnboardingReviewRequiredError;
3013
+ export declare const CampaignsSendTest403: Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError]>;
3014
3014
  export type CampaignsSendTest404 = ResourceNotFoundError;
3015
3015
  export declare const CampaignsSendTest404: typeof ResourceNotFoundError;
3016
3016
  export type CampaignsSendTest409 = ConflictError;
@@ -5196,7 +5196,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
5196
5196
  readonly preheader: Schema.optionalKey<Schema.String>;
5197
5197
  readonly html: Schema.String;
5198
5198
  readonly text: Schema.String;
5199
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
5199
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
5200
5200
  readonly _tag: "ConflictError";
5201
5201
  readonly message: string;
5202
5202
  readonly resource: string;
@@ -5216,6 +5216,18 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
5216
5216
  readonly message: Schema.String;
5217
5217
  readonly resource: Schema.String;
5218
5218
  readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5219
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
5220
+ readonly _tag: "ForbiddenError";
5221
+ readonly message: string;
5222
+ }, readonly [Schema.Struct<{
5223
+ readonly _tag: Schema.tag<"ForbiddenError">;
5224
+ readonly message: Schema.String;
5225
+ }>], {
5226
+ readonly _tag: "ForbiddenError";
5227
+ readonly message: string;
5228
+ }>, Schema.Struct<{
5229
+ readonly _tag: Schema.tag<"ForbiddenError">;
5230
+ readonly message: Schema.String;
5219
5231
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
5220
5232
  readonly _tag: "GatewayTimeoutError";
5221
5233
  readonly message: string;
@@ -5860,7 +5872,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
5860
5872
  readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
5861
5873
  }>>, never, Schema.toCodecJson<Schema.Struct<{
5862
5874
  readonly id: Schema.brand<Schema.String, "MessageId">;
5863
- }>>, Schema.toCodecJson<Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]> | Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError, typeof FlagDisabledError]> | Schema.Union<readonly [typeof ServiceUnavailableError, typeof SenderNotReadyError, typeof DeliveryUnavailableError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError, typeof FromAddressRequiredError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
5875
+ }>>, Schema.toCodecJson<Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError]> | Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]> | Schema.Union<readonly [typeof ServiceUnavailableError, typeof SenderNotReadyError, typeof DeliveryUnavailableError]> | Schema.Union<readonly [typeof TemplateSourceError, typeof ValidationError, typeof FromAddressRequiredError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
5864
5876
  readonly _tag: "ConflictError";
5865
5877
  readonly message: string;
5866
5878
  readonly resource: string;
@@ -460,7 +460,7 @@ const CampaignsPreviewRequestJson = /* @__PURE__ */ (() => Schema.Struct({
460
460
  const CampaignsPreview200 = CampaignPreview;
461
461
  const CampaignsPreview400 = MalformedRequestError;
462
462
  const CampaignsPreview401 = UnauthorizedError;
463
- const CampaignsPreview403 = /* @__PURE__ */ (() => Schema.Union([FlagDisabledError, ForbiddenError]))();
463
+ const CampaignsPreview403 = ForbiddenError;
464
464
  const CampaignsPreview404 = ResourceNotFoundError;
465
465
  const CampaignsPreview409 = ConflictError;
466
466
  const CampaignsPreview422 = /* @__PURE__ */ (() => Schema.Union([TemplateSourceError, ValidationError]))();
@@ -476,11 +476,7 @@ const CampaignsSendTest200 = CampaignTestSend;
476
476
  const CampaignsSendTest400 = MalformedRequestError;
477
477
  const CampaignsSendTest401 = UnauthorizedError;
478
478
  const CampaignsSendTest402 = PaymentRequiredError;
479
- const CampaignsSendTest403 = /* @__PURE__ */ (() => Schema.Union([
480
- ForbiddenError,
481
- OnboardingReviewRequiredError,
482
- FlagDisabledError
483
- ]))();
479
+ const CampaignsSendTest403 = /* @__PURE__ */ (() => Schema.Union([ForbiddenError, OnboardingReviewRequiredError]))();
484
480
  const CampaignsSendTest404 = ResourceNotFoundError;
485
481
  const CampaignsSendTest409 = ConflictError;
486
482
  const CampaignsSendTest422 = /* @__PURE__ */ (() => Schema.Union([
@@ -2325,7 +2325,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
2325
2325
  EmailGetOnboardingReview500,
2326
2326
  EmailGetOnboardingReview504.pipe(HttpApiSchema.status(504))
2327
2327
  ]
2328
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.getOnboardingReview").annotate(OpenApi.Summary, "Get email onboarding review status").annotate(OpenApi.Description, "Returns the customer-safe organization review decision, workflow stage, next action, and current sending-identity clearances. An organization that has not been reviewed yet is returned in the blocked initial state."), HttpApiEndpoint.post("emailReapplyOnboardingReview", "/v1/email/onboarding-review/reapply", {
2328
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.getOnboardingReview").annotate(OpenApi.Summary, "Get email review status").annotate(OpenApi.Description, "Returns whether the organization's email can send and where Samva's review of it stands: the decision, stage, stable block reason, next action, and current sending-identity clearances. Samva reviews some new organizations before their first email; while it does, `canSend` is false and `nextAction` is `wait_for_review`. Mailbox sends wait as `queued` with wait reason `onboarding-review` and go out once the review approves the organization; other sends are refused with `OnboardingReviewRequiredError`."), HttpApiEndpoint.post("emailReapplyOnboardingReview", "/v1/email/onboarding-review/reapply", {
2329
2329
  payload: EmailReapplyOnboardingReviewRequestJson,
2330
2330
  success: EmailReapplyOnboardingReview200,
2331
2331
  error: [
@@ -2337,7 +2337,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
2337
2337
  EmailReapplyOnboardingReview500,
2338
2338
  EmailReapplyOnboardingReview504.pipe(HttpApiSchema.status(504))
2339
2339
  ]
2340
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.reapplyOnboardingReview").annotate(OpenApi.Summary, "Reapply for email onboarding review").annotate(OpenApi.Description, "Allows an organization owner or admin to submit a rejected organization for review again. The expected generation prevents acting on stale status."), HttpApiEndpoint.post("emailRespondToOnboardingInformationRequest", "/v1/email/onboarding-review/respond", {
2340
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.reapplyOnboardingReview").annotate(OpenApi.Summary, "Reapply for email review").annotate(OpenApi.Description, "Allows an organization owner or admin to submit a rejected organization for review again. The expected generation prevents acting on stale status."), HttpApiEndpoint.post("emailRespondToOnboardingInformationRequest", "/v1/email/onboarding-review/respond", {
2341
2341
  payload: EmailRespondToOnboardingInformationRequestRequestJson,
2342
2342
  success: EmailRespondToOnboardingInformationRequest200,
2343
2343
  error: [
@@ -2349,7 +2349,7 @@ var EmailGroup = class extends HttpApiGroup.make("Email").add(HttpApiEndpoint.ge
2349
2349
  EmailRespondToOnboardingInformationRequest500,
2350
2350
  EmailRespondToOnboardingInformationRequest504.pipe(HttpApiSchema.status(504))
2351
2351
  ]
2352
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.respondToOnboardingInformationRequest").annotate(OpenApi.Summary, "Respond to an email onboarding information request").annotate(OpenApi.Description, "Allows organization owners and admins to submit a text response and up to three evidence uploads for the current information request."), HttpApiEndpoint.get("emailListSenders", "/v1/email/senders", {
2352
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "email.respondToOnboardingInformationRequest").annotate(OpenApi.Summary, "Respond to an email review information request").annotate(OpenApi.Description, "Allows organization owners and admins to submit a text response and up to three evidence uploads for the current information request."), HttpApiEndpoint.get("emailListSenders", "/v1/email/senders", {
2353
2353
  query: EmailListSendersQuery,
2354
2354
  success: EmailListSenders200,
2355
2355
  error: [
@@ -48,14 +48,22 @@ export declare const EventsCreateRequestJson: Schema.Struct<{
48
48
  readonly id: Schema.brand<Schema.String, "ContactId">;
49
49
  readonly externalId: Schema.optionalKey<Schema.Never>;
50
50
  readonly email: Schema.optionalKey<Schema.Never>;
51
+ readonly phone: Schema.optionalKey<Schema.Never>;
51
52
  }>, Schema.Struct<{
52
53
  readonly externalId: Schema.String;
53
54
  readonly id: Schema.optionalKey<Schema.Never>;
54
55
  readonly email: Schema.optionalKey<Schema.Never>;
56
+ readonly phone: Schema.optionalKey<Schema.Never>;
55
57
  }>, Schema.Struct<{
56
58
  readonly email: Schema.String;
57
59
  readonly id: Schema.optionalKey<Schema.Never>;
58
60
  readonly externalId: Schema.optionalKey<Schema.Never>;
61
+ readonly phone: Schema.optionalKey<Schema.Never>;
62
+ }>, Schema.Struct<{
63
+ readonly phone: Schema.String;
64
+ readonly id: Schema.optionalKey<Schema.Never>;
65
+ readonly externalId: Schema.optionalKey<Schema.Never>;
66
+ readonly email: Schema.optionalKey<Schema.Never>;
59
67
  }>]>;
60
68
  readonly name: Schema.String;
61
69
  readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
@@ -106,14 +114,22 @@ export declare const EventsBatchRequestJson: Schema.Struct<{
106
114
  readonly id: Schema.brand<Schema.String, "ContactId">;
107
115
  readonly externalId: Schema.optionalKey<Schema.Never>;
108
116
  readonly email: Schema.optionalKey<Schema.Never>;
117
+ readonly phone: Schema.optionalKey<Schema.Never>;
109
118
  }>, Schema.Struct<{
110
119
  readonly externalId: Schema.String;
111
120
  readonly id: Schema.optionalKey<Schema.Never>;
112
121
  readonly email: Schema.optionalKey<Schema.Never>;
122
+ readonly phone: Schema.optionalKey<Schema.Never>;
113
123
  }>, Schema.Struct<{
114
124
  readonly email: Schema.String;
115
125
  readonly id: Schema.optionalKey<Schema.Never>;
116
126
  readonly externalId: Schema.optionalKey<Schema.Never>;
127
+ readonly phone: Schema.optionalKey<Schema.Never>;
128
+ }>, Schema.Struct<{
129
+ readonly phone: Schema.String;
130
+ readonly id: Schema.optionalKey<Schema.Never>;
131
+ readonly externalId: Schema.optionalKey<Schema.Never>;
132
+ readonly email: Schema.optionalKey<Schema.Never>;
117
133
  }>]>;
118
134
  readonly name: Schema.String;
119
135
  readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
@@ -123,14 +139,22 @@ export declare const EventsBatchRequestJson: Schema.Struct<{
123
139
  readonly id: Schema.brand<Schema.String, "ContactId">;
124
140
  readonly externalId: Schema.optionalKey<Schema.Never>;
125
141
  readonly email: Schema.optionalKey<Schema.Never>;
142
+ readonly phone: Schema.optionalKey<Schema.Never>;
126
143
  }>, Schema.Struct<{
127
144
  readonly externalId: Schema.String;
128
145
  readonly id: Schema.optionalKey<Schema.Never>;
129
146
  readonly email: Schema.optionalKey<Schema.Never>;
147
+ readonly phone: Schema.optionalKey<Schema.Never>;
130
148
  }>, Schema.Struct<{
131
149
  readonly email: Schema.String;
132
150
  readonly id: Schema.optionalKey<Schema.Never>;
133
151
  readonly externalId: Schema.optionalKey<Schema.Never>;
152
+ readonly phone: Schema.optionalKey<Schema.Never>;
153
+ }>, Schema.Struct<{
154
+ readonly phone: Schema.String;
155
+ readonly id: Schema.optionalKey<Schema.Never>;
156
+ readonly externalId: Schema.optionalKey<Schema.Never>;
157
+ readonly email: Schema.optionalKey<Schema.Never>;
134
158
  }>]>;
135
159
  readonly name: Schema.String;
136
160
  readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
@@ -177,14 +201,22 @@ declare const EventsGroup_base: HttpApiGroup.HttpApiGroup<"Events", HttpApiEndpo
177
201
  readonly id: Schema.brand<Schema.String, "ContactId">;
178
202
  readonly externalId: Schema.optionalKey<Schema.Never>;
179
203
  readonly email: Schema.optionalKey<Schema.Never>;
204
+ readonly phone: Schema.optionalKey<Schema.Never>;
180
205
  }>, Schema.Struct<{
181
206
  readonly externalId: Schema.String;
182
207
  readonly id: Schema.optionalKey<Schema.Never>;
183
208
  readonly email: Schema.optionalKey<Schema.Never>;
209
+ readonly phone: Schema.optionalKey<Schema.Never>;
184
210
  }>, Schema.Struct<{
185
211
  readonly email: Schema.String;
186
212
  readonly id: Schema.optionalKey<Schema.Never>;
187
213
  readonly externalId: Schema.optionalKey<Schema.Never>;
214
+ readonly phone: Schema.optionalKey<Schema.Never>;
215
+ }>, Schema.Struct<{
216
+ readonly phone: Schema.String;
217
+ readonly id: Schema.optionalKey<Schema.Never>;
218
+ readonly externalId: Schema.optionalKey<Schema.Never>;
219
+ readonly email: Schema.optionalKey<Schema.Never>;
188
220
  }>]>;
189
221
  readonly name: Schema.String;
190
222
  readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
@@ -194,14 +226,22 @@ declare const EventsGroup_base: HttpApiGroup.HttpApiGroup<"Events", HttpApiEndpo
194
226
  readonly id: Schema.brand<Schema.String, "ContactId">;
195
227
  readonly externalId: Schema.optionalKey<Schema.Never>;
196
228
  readonly email: Schema.optionalKey<Schema.Never>;
229
+ readonly phone: Schema.optionalKey<Schema.Never>;
197
230
  }>, Schema.Struct<{
198
231
  readonly externalId: Schema.String;
199
232
  readonly id: Schema.optionalKey<Schema.Never>;
200
233
  readonly email: Schema.optionalKey<Schema.Never>;
234
+ readonly phone: Schema.optionalKey<Schema.Never>;
201
235
  }>, Schema.Struct<{
202
236
  readonly email: Schema.String;
203
237
  readonly id: Schema.optionalKey<Schema.Never>;
204
238
  readonly externalId: Schema.optionalKey<Schema.Never>;
239
+ readonly phone: Schema.optionalKey<Schema.Never>;
240
+ }>, Schema.Struct<{
241
+ readonly phone: Schema.String;
242
+ readonly id: Schema.optionalKey<Schema.Never>;
243
+ readonly externalId: Schema.optionalKey<Schema.Never>;
244
+ readonly email: Schema.optionalKey<Schema.Never>;
205
245
  }>]>;
206
246
  readonly name: Schema.String;
207
247
  readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
@@ -332,14 +372,22 @@ declare const EventsGroup_base: HttpApiGroup.HttpApiGroup<"Events", HttpApiEndpo
332
372
  readonly id: Schema.brand<Schema.String, "ContactId">;
333
373
  readonly externalId: Schema.optionalKey<Schema.Never>;
334
374
  readonly email: Schema.optionalKey<Schema.Never>;
375
+ readonly phone: Schema.optionalKey<Schema.Never>;
335
376
  }>, Schema.Struct<{
336
377
  readonly externalId: Schema.String;
337
378
  readonly id: Schema.optionalKey<Schema.Never>;
338
379
  readonly email: Schema.optionalKey<Schema.Never>;
380
+ readonly phone: Schema.optionalKey<Schema.Never>;
339
381
  }>, Schema.Struct<{
340
382
  readonly email: Schema.String;
341
383
  readonly id: Schema.optionalKey<Schema.Never>;
342
384
  readonly externalId: Schema.optionalKey<Schema.Never>;
385
+ readonly phone: Schema.optionalKey<Schema.Never>;
386
+ }>, Schema.Struct<{
387
+ readonly phone: Schema.String;
388
+ readonly id: Schema.optionalKey<Schema.Never>;
389
+ readonly externalId: Schema.optionalKey<Schema.Never>;
390
+ readonly email: Schema.optionalKey<Schema.Never>;
343
391
  }>]>;
344
392
  readonly name: Schema.String;
345
393
  readonly properties: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>, Schema.Null]>>;
@@ -57,7 +57,7 @@ var EventsGroup = class extends HttpApiGroup.make("Events").add(HttpApiEndpoint.
57
57
  EventsCreate502.pipe(HttpApiSchema.status(502)),
58
58
  EventsCreate504.pipe(HttpApiSchema.status(504))
59
59
  ]
60
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "events.create").annotate(OpenApi.Summary, "Record a contact event").annotate(OpenApi.Description, "Records a custom contact event. Identify the contact by exactly one ID, external ID, or email. A missing email or external ID creates a contact; an unknown contact ID returns 404. An organization-scoped idempotency key replays the original event. Event names use letters, digits, underscores, hyphens, and dots, up to 255 characters; contact. and samva. prefixes are reserved. Properties allow at most 50 keys and 32 KiB of UTF-8 JSON. Events are retained for 90 days."), HttpApiEndpoint.post("eventsBatch", "/v1/events/batch", {
60
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "events.create").annotate(OpenApi.Summary, "Record a contact event").annotate(OpenApi.Description, "Records a custom contact event. Identify the contact by exactly one ID, external ID, email, or E.164 phone number. An unmatched external ID, email, or phone number creates a contact; an unknown contact ID returns 404. An idempotency key replays the original event in the credential’s scope. Event names use letters, digits, underscores, hyphens, and dots, up to 255 characters; contact. and samva. prefixes are reserved. Properties allow at most 50 keys and 32 KiB of UTF-8 JSON. Events are retained for 90 days."), HttpApiEndpoint.post("eventsBatch", "/v1/events/batch", {
61
61
  headers: EventsBatchHeaders,
62
62
  payload: EventsBatchRequestJson,
63
63
  success: EventsBatch200,