samva 0.46.1 → 0.47.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 (73) hide show
  1. package/AGENTS.md +13 -7
  2. package/README.md +106 -8
  3. package/dist/agent/index.d.ts +56 -0
  4. package/dist/agent/index.js +52 -0
  5. package/dist/agent/runtime.d.ts +3 -0
  6. package/dist/agent/runtime.js +74 -0
  7. package/dist/agent/test.d.ts +31 -0
  8. package/dist/agent/test.js +66 -0
  9. package/dist/agent/types.d.ts +123 -0
  10. package/dist/client/sdk.gen.d.ts +40 -160
  11. package/dist/client/sdk.gen.js +1302 -1598
  12. package/dist/client/types.gen.d.ts +377 -966
  13. package/dist/effect/agents.d.ts +340 -8
  14. package/dist/effect/agents.js +4 -2
  15. package/dist/effect/campaigns.d.ts +160 -160
  16. package/dist/effect/contacts.d.ts +8 -0
  17. package/dist/effect/contacts.js +5 -1
  18. package/dist/effect/descriptors/agents.d.ts +12 -2
  19. package/dist/effect/descriptors/agents.js +12 -2
  20. package/dist/effect/descriptors/contacts.d.ts +20 -0
  21. package/dist/effect/descriptors/contacts.js +20 -0
  22. package/dist/effect/generated/accounts.d.ts +10 -0
  23. package/dist/effect/generated/accounts.js +1 -0
  24. package/dist/effect/generated/agents.d.ts +2967 -690
  25. package/dist/effect/generated/agents.js +54 -13
  26. package/dist/effect/generated/contacts.d.ts +859 -1
  27. package/dist/effect/generated/contacts.js +62 -3
  28. package/dist/effect/generated/index.d.ts +1 -5
  29. package/dist/effect/generated/journeys.d.ts +255 -15
  30. package/dist/effect/generated/journeys.js +3 -1
  31. package/dist/effect/generated/mailboxes.d.ts +93 -95
  32. package/dist/effect/generated/mailboxes.js +21 -25
  33. package/dist/effect/generated/shared.d.ts +407 -101
  34. package/dist/effect/generated/shared.js +80 -36
  35. package/dist/effect/generated/template-registrations.d.ts +1 -4
  36. package/dist/effect/generated/template-registrations.js +2 -6
  37. package/dist/effect/generated-metadata.d.ts +18 -84
  38. package/dist/effect/generated-metadata.js +362 -415
  39. package/dist/effect/index.d.ts +0 -2
  40. package/dist/effect/index.js +1 -3
  41. package/dist/effect/internal/client.js +1 -1
  42. package/dist/effect/internal/operation.js +4 -1
  43. package/dist/effect/journeys.d.ts +26 -2
  44. package/dist/effect/mailboxes.d.ts +41 -41
  45. package/dist/effect/scheduled-messages.d.ts +350 -350
  46. package/dist/effect/topics.d.ts +2 -2
  47. package/dist/package.js +1 -1
  48. package/dist/promises/client.d.ts +1 -5
  49. package/dist/promises/client.js +3 -7
  50. package/dist/promises/types.gen.d.ts +1 -1
  51. package/dist/service-map.d.ts +18 -75
  52. package/package.json +10 -22
  53. package/dist/effect/descriptors/extension-installations.d.ts +0 -90
  54. package/dist/effect/descriptors/extension-installations.js +0 -90
  55. package/dist/effect/descriptors/extensions.d.ts +0 -50
  56. package/dist/effect/descriptors/extensions.js +0 -50
  57. package/dist/effect/extension-installations.d.ts +0 -132
  58. package/dist/effect/extension-installations.js +0 -29
  59. package/dist/effect/extensions.d.ts +0 -102
  60. package/dist/effect/extensions.js +0 -21
  61. package/dist/effect/generated/extension-installations.d.ts +0 -2761
  62. package/dist/effect/generated/extension-installations.js +0 -405
  63. package/dist/effect/generated/extensions.d.ts +0 -1037
  64. package/dist/effect/generated/extensions.js +0 -214
  65. package/dist/mailbox/dispatch.d.ts +0 -10
  66. package/dist/mailbox/dispatch.js +0 -66
  67. package/dist/mailbox/index.d.ts +0 -17
  68. package/dist/mailbox/index.js +0 -30
  69. package/dist/mailbox/test.d.ts +0 -25
  70. package/dist/mailbox/test.js +0 -181
  71. package/dist/mailbox/types.d.ts +0 -221
  72. package/dist/mailbox/webhook.d.ts +0 -10
  73. package/dist/mailbox/webhook.js +0 -41
@@ -309,221 +309,6 @@ export type WhatsAppTemplateStatsSource = {
309
309
  };
310
310
  export type JourneyId = string;
311
311
  export type CampaignId = string;
312
- export type ExtensionRun = {
313
- id: string;
314
- eventId: string;
315
- eventType: "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded";
316
- attempt: number;
317
- startedAt: string;
318
- durationMs: number;
319
- outcome: "succeeded" | "failed" | "timed_out" | "budget_exhausted" | "revoked";
320
- error: string | null;
321
- logs: Array<string>;
322
- };
323
- export type ExtensionInstallationId = string;
324
- export type ExtensionRunList = {
325
- items: Array<ExtensionRunSummary>;
326
- };
327
- export type ExtensionRunSummary = {
328
- id: string;
329
- eventId: string;
330
- eventType: "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded";
331
- attempt: number;
332
- startedAt: string;
333
- durationMs: number;
334
- outcome: "succeeded" | "failed" | "timed_out" | "budget_exhausted" | "revoked";
335
- error: string | null;
336
- };
337
- export type ExtensionInstallation = {
338
- id: ExtensionInstallationId;
339
- extensionId: ExtensionId;
340
- name: string;
341
- displayName: string;
342
- version: ExtensionVersionRef;
343
- runtime: "hosted" | "webhook";
344
- status: "active" | "disabled";
345
- createdAt: string;
346
- events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
347
- permissions: Array<"read" | "update" | "send" | "quarantine.read">;
348
- policy: PolicyConfiguration;
349
- scope: {
350
- mailboxIds: Array<MailboxId> | null;
351
- namespaceId: NamespaceId | null;
352
- };
353
- webhook: {
354
- endpointId: WebhookEndpointId;
355
- url: string;
356
- } | null;
357
- updatedAt: string;
358
- disabledAt: string | null;
359
- };
360
- export type WebhookEndpointId = string;
361
- export type MailboxId = string;
362
- export type PolicyRule = {
363
- match: PolicyRuleMatch;
364
- note?: string | null | undefined;
365
- decide: PolicyRequirement;
366
- atLeast?: never | null | undefined;
367
- } | {
368
- match: PolicyRuleMatch;
369
- note?: string | null | undefined;
370
- decide?: never | null | undefined;
371
- atLeast: PolicyRequirement;
372
- };
373
- export type PolicyRequirement = "run" | "model" | "person" | "never";
374
- export type PolicyRuleMatch = {
375
- kind?: "send" | "reply" | "toolCall" | "handoff" | null | undefined;
376
- effect?: PolicyEffect | null | undefined;
377
- channel?: "sms" | "whatsapp" | "email" | null | undefined;
378
- integration?: string | null | undefined;
379
- tool?: string | null | undefined;
380
- subject?: "agent" | "apiKey" | "member" | "extension" | PolicySubject | null | undefined;
381
- };
382
- export type PolicySubject = {
383
- kind: "agent";
384
- id: AgentId;
385
- } | {
386
- kind: "apiKey";
387
- id: ApiKeyId;
388
- } | {
389
- kind: "member";
390
- userId: UserId;
391
- } | {
392
- kind: "extension";
393
- id: ExtensionInstallationId;
394
- };
395
- export type UserId = string;
396
- export type ApiKeyId = string;
397
- export type AgentId = string;
398
- export type PolicyEffect = "read" | "write" | "final";
399
- export type ExtensionVersionRef = {
400
- id: ExtensionVersionId;
401
- version: string;
402
- };
403
- export type ExtensionVersionId = string;
404
- export type ExtensionId = string;
405
- export type UpgradeExtensionResponse = {
406
- installation: ExtensionInstallation;
407
- fromVersion: ExtensionVersionRef;
408
- toVersion: ExtensionVersionRef;
409
- permissionDiff: ExtensionPermissionDiff;
410
- dryRun: boolean;
411
- versionChange: ExtensionVersionChange | null;
412
- };
413
- export type ExtensionVersionChange = {
414
- id: string;
415
- organizationId: OrganizationId;
416
- installationId: ExtensionInstallationId;
417
- extensionId: ExtensionId;
418
- fromVersion: ExtensionVersionRef;
419
- toVersion: ExtensionVersionRef;
420
- permissionDiff: ExtensionPermissionDiff;
421
- changedBy: UserId;
422
- changedAt: string;
423
- };
424
- export type ExtensionPermissionDiff = {
425
- added: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded">;
426
- removed: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded">;
427
- };
428
- export type UpgradeExtensionPayload = {
429
- version?: string | ExtensionVersionId | null | undefined;
430
- acceptPermissions?: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded"> | null | undefined;
431
- dryRun?: boolean | null | undefined;
432
- };
433
- export type SuccessResponse = {
434
- success: boolean;
435
- };
436
- export type InstallExtensionResponse = {
437
- installation: ExtensionInstallation;
438
- credentials: {
439
- apiKey: string;
440
- webhookSecret: string;
441
- } | null;
442
- };
443
- export type InstallExtensionPayload = {
444
- extension: string;
445
- version?: string | null | undefined;
446
- mailboxIds?: Array<MailboxId> | null | undefined;
447
- namespaceId?: NamespaceId | null | undefined;
448
- permissions?: Array<"read" | "update" | "send" | "quarantine.read"> | null | undefined;
449
- policy?: PolicyConfiguration | null | undefined;
450
- webhookUrl?: string | null | undefined;
451
- };
452
- export type ExtensionInstallationPage = {
453
- items: Array<ExtensionInstallationSummary>;
454
- nextCursor: string | null;
455
- };
456
- export type ExtensionInstallationSummary = {
457
- id: ExtensionInstallationId;
458
- extensionId: ExtensionId;
459
- name: string;
460
- displayName: string;
461
- version: ExtensionVersionRef;
462
- runtime: "hosted" | "webhook";
463
- status: "active" | "disabled";
464
- createdAt: string;
465
- };
466
- export type ExtensionVersion = {
467
- id: ExtensionVersionId;
468
- version: string;
469
- runtime: "hosted" | "webhook";
470
- bundle: ExtensionBundle | null;
471
- publishedAt: string;
472
- manifest: {
473
- name: string;
474
- displayName: string;
475
- description?: string | null | undefined;
476
- version: string;
477
- runtime: "hosted" | "webhook";
478
- events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
479
- permissions: Array<"read" | "update" | "send" | "quarantine.read">;
480
- };
481
- };
482
- export type ExtensionBundle = {
483
- sha256: string;
484
- sizeBytes: number;
485
- };
486
- export type ExtensionVersionPage = {
487
- items: Array<ExtensionVersionSummary>;
488
- nextCursor: string | null;
489
- };
490
- export type ExtensionVersionSummary = {
491
- id: ExtensionVersionId;
492
- version: string;
493
- runtime: "hosted" | "webhook";
494
- bundle: ExtensionBundle | null;
495
- publishedAt: string;
496
- };
497
- export type Extension = {
498
- id: ExtensionId;
499
- name: string;
500
- displayName: string;
501
- description: string | null;
502
- runtime: "hosted" | "webhook";
503
- latestVersion: ExtensionVersionRef;
504
- createdAt: string;
505
- updatedAt: string;
506
- };
507
- export type PublishExtensionVersionResponse = {
508
- extension: Extension;
509
- version: ExtensionVersion;
510
- };
511
- export type PublishExtensionVersionPayload = {
512
- manifest: {
513
- name: string;
514
- displayName: string;
515
- description?: string | null | undefined;
516
- version: string;
517
- runtime: "hosted" | "webhook";
518
- events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
519
- permissions: Array<"read" | "update" | "send" | "quarantine.read">;
520
- };
521
- bundle?: string | null | undefined;
522
- };
523
- export type ExtensionPage = {
524
- items: Array<Extension>;
525
- nextCursor: string | null;
526
- };
527
312
  export type NamespaceUsage = {
528
313
  namespaceId: NamespaceId;
529
314
  periodStart: string;
@@ -550,6 +335,7 @@ export type NamespacePortalLinkMetadata = {
550
335
  export type NamespacePortalLinkMetadataWritable = {
551
336
  [key: string]: string | undefined;
552
337
  };
338
+ export type UserId = string;
553
339
  export type NamespacePortalLinkId = string;
554
340
  export type NamespacePortalLinkPage = {
555
341
  items: Array<NamespacePortalLink>;
@@ -585,6 +371,9 @@ export type AssignNamespaceResourcePayload = {
585
371
  */
586
372
  resourceId: string;
587
373
  };
374
+ export type SuccessResponse = {
375
+ success: boolean;
376
+ };
588
377
  export type Namespace = {
589
378
  id: NamespaceId;
590
379
  name: string;
@@ -630,12 +419,50 @@ export type PolicySnapshot = {
630
419
  version: PolicyVersion;
631
420
  };
632
421
  export type PolicyVersion = number;
422
+ export type PolicyRule = {
423
+ match: PolicyRuleMatch;
424
+ note?: string | null | undefined;
425
+ decide: PolicyRequirement;
426
+ atLeast?: never | null | undefined;
427
+ } | {
428
+ match: PolicyRuleMatch;
429
+ note?: string | null | undefined;
430
+ decide?: never | null | undefined;
431
+ atLeast: PolicyRequirement;
432
+ };
433
+ export type PolicyRequirement = "run" | "model" | "person" | "never";
434
+ export type PolicyRuleMatch = {
435
+ kind?: "send" | "reply" | "toolCall" | "handoff" | null | undefined;
436
+ effect?: PolicyEffect | null | undefined;
437
+ channel?: "sms" | "whatsapp" | "email" | null | undefined;
438
+ integration?: string | null | undefined;
439
+ tool?: string | null | undefined;
440
+ subject?: "agent" | "apiKey" | "member" | "extension" | PolicySubject | null | undefined;
441
+ };
442
+ export type PolicySubject = {
443
+ kind: "agent";
444
+ id: AgentId;
445
+ } | {
446
+ kind: "apiKey";
447
+ id: ApiKeyId;
448
+ } | {
449
+ kind: "member";
450
+ userId: UserId;
451
+ } | {
452
+ kind: "extension";
453
+ id: ExtensionInstallationId;
454
+ };
455
+ export type ExtensionInstallationId = string;
456
+ export type ApiKeyId = string;
457
+ export type AgentId = string;
458
+ export type PolicyEffect = "read" | "write" | "final";
633
459
  export type PolicyReplacement = {
634
460
  presets: Array<string>;
635
461
  rules: Array<PolicyRule>;
636
462
  instructions?: string | null | undefined;
637
463
  ifVersion: PolicyVersion;
638
464
  };
465
+ export type MailboxId = string;
639
466
  export type MailboxEventPage = {
640
467
  items: Array<MailboxEvent>;
641
468
  nextCursor: string | null;
@@ -2062,6 +1889,7 @@ export type WebhookSigningSecret = {
2062
1889
  createdAt: string;
2063
1890
  previousExpiresAt: string | null;
2064
1891
  };
1892
+ export type WebhookEndpointId = string;
2065
1893
  export type WebhookAttemptId = string;
2066
1894
  export type WebhookDeliveryId = string;
2067
1895
  export type WebhookStatsResponse = {
@@ -3249,6 +3077,7 @@ export type AccountInfo = {
3249
3077
  externalId?: string | undefined;
3250
3078
  displayName?: string | undefined;
3251
3079
  email?: string | undefined;
3080
+ verifiedEmail?: string | undefined;
3252
3081
  timeZone?: string | undefined;
3253
3082
  };
3254
3083
  export type AccountStatus = "pending" | "connected" | "needsReconnect";
@@ -3259,6 +3088,8 @@ export type AgentVersion = {
3259
3088
  agentId: AgentId;
3260
3089
  version: number;
3261
3090
  definition: AgentDefinition;
3091
+ bundle: AgentBundle;
3092
+ authoring: "builder" | "code";
3262
3093
  publishedAt: string;
3263
3094
  modelFallback: AgentModelFallback | null;
3264
3095
  };
@@ -3271,12 +3102,70 @@ export type AgentModelFallback = {
3271
3102
  export type ModelFallbackReason = "candidate" | "failed" | "retired" | "blocked" | "missing";
3272
3103
  export type AgentModel = "standard" | "max";
3273
3104
  export type CatalogModelId = string;
3105
+ export type AgentBundle = {
3106
+ sha256: string;
3107
+ sizeBytes: number;
3108
+ manifest: AgentModuleManifest;
3109
+ };
3110
+ export type AgentModuleManifest = {
3111
+ name: AgentName;
3112
+ version: string;
3113
+ knowledgeSourceIds?: Array<KnowledgeSourceId> | undefined;
3114
+ endpointIds: Array<MailboxEndpointId>;
3115
+ integrations: Array<AgentIntegrationGrant>;
3116
+ policy: PolicyConfiguration;
3117
+ model: AgentModelChoice;
3118
+ reasoning: AgentReasoning;
3119
+ workingHours: WorkingHours | null;
3120
+ takeoverTimeoutMinutes: number;
3121
+ eventTriggers?: Array<string> | undefined;
3122
+ followUpTemplate?: TemplateId | string | undefined;
3123
+ tools: {
3124
+ [key: string]: AgentModuleTool;
3125
+ };
3126
+ skills: Array<string>;
3127
+ events: Array<string>;
3128
+ schedules: Array<string>;
3129
+ };
3130
+ export type AgentModuleManifestWritable = {
3131
+ name: AgentName;
3132
+ version: string;
3133
+ knowledgeSourceIds?: Array<KnowledgeSourceId> | undefined;
3134
+ endpointIds: Array<MailboxEndpointId>;
3135
+ integrations: Array<AgentIntegrationGrant>;
3136
+ policy: PolicyConfiguration;
3137
+ model: AgentModelChoice;
3138
+ reasoning: AgentReasoning;
3139
+ workingHours: WorkingHours | null;
3140
+ takeoverTimeoutMinutes: number;
3141
+ eventTriggers?: Array<string> | undefined;
3142
+ followUpTemplate?: TemplateId | string | undefined;
3143
+ tools: {
3144
+ [key: string]: AgentModuleToolWritable | undefined;
3145
+ };
3146
+ skills: Array<string>;
3147
+ events: Array<string>;
3148
+ schedules: Array<string>;
3149
+ };
3150
+ export type AgentModuleTool = {
3151
+ description: string;
3152
+ input: JsonObject;
3153
+ approval?: PolicyRequirement | undefined;
3154
+ replay: "safe" | "unsafe";
3155
+ };
3156
+ export type AgentModuleToolWritable = {
3157
+ description: string;
3158
+ input: JsonObjectWritable;
3159
+ approval?: PolicyRequirement | undefined;
3160
+ replay: "safe" | "unsafe";
3161
+ };
3274
3162
  export type ClockTime = string;
3275
3163
  export type Weekday = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
3276
3164
  export type TimeZone = string;
3277
3165
  export type AgentReasoning = "auto" | "low" | "medium" | "high";
3278
3166
  export type AgentModelChoice = AgentModel | CatalogModelId;
3279
3167
  export type KnowledgeSourceId = string;
3168
+ export type AgentName = string;
3280
3169
  export type AgentVersionPage = {
3281
3170
  items: Array<AgentVersionSummary>;
3282
3171
  nextCursor: string | null;
@@ -3284,6 +3173,8 @@ export type AgentVersionPage = {
3284
3173
  export type AgentVersionSummary = {
3285
3174
  agentId: AgentId;
3286
3175
  version: number;
3176
+ bundle: AgentBundle;
3177
+ authoring: "builder" | "code";
3287
3178
  publishedAt: string;
3288
3179
  };
3289
3180
  export type PublishAgentResponse = {
@@ -3313,26 +3204,13 @@ export type AgentSpend = {
3313
3204
  capReachedAt: string | null;
3314
3205
  };
3315
3206
  export type AgentSetupJob = "support" | "store" | "booking";
3316
- export type PublishAgentPayload = {
3207
+ export type PublishAgentVersionPayload = {
3317
3208
  revision: string;
3209
+ bundle: AgentModuleBundle;
3318
3210
  };
3319
- export type ReplaceAgentDraftPayload = {
3320
- revision: string;
3321
- definition: AgentDefinition;
3322
- };
3323
- export type AgentDefinition = {
3324
- instructions: string;
3325
- knowledge: string;
3326
- knowledgeSourceIds?: Array<KnowledgeSourceId> | undefined;
3327
- endpointIds: Array<MailboxEndpointId>;
3328
- integrations: Array<AgentIntegrationGrant>;
3329
- eventTriggers?: Array<string> | undefined;
3330
- followUpTemplate?: TemplateId | string | undefined;
3331
- policy: PolicyConfiguration;
3332
- model: AgentModelChoice;
3333
- reasoning: AgentReasoning;
3334
- workingHours: WorkingHours | null;
3335
- takeoverTimeoutMinutes: number;
3211
+ export type AgentModuleBundle = {
3212
+ source: string;
3213
+ manifest: AgentModuleManifestWritable;
3336
3214
  };
3337
3215
  export type WorkingHours = {
3338
3216
  timeZone: TimeZone;
@@ -3361,6 +3239,27 @@ export type AgentToolScope = {
3361
3239
  kind: "selected";
3362
3240
  names: Array<string>;
3363
3241
  };
3242
+ export type PublishAgentPayload = {
3243
+ revision: string;
3244
+ };
3245
+ export type ReplaceAgentDraftPayload = {
3246
+ revision: string;
3247
+ definition: AgentDefinition;
3248
+ };
3249
+ export type AgentDefinition = {
3250
+ instructions: string;
3251
+ knowledge: string;
3252
+ knowledgeSourceIds?: Array<KnowledgeSourceId> | undefined;
3253
+ endpointIds: Array<MailboxEndpointId>;
3254
+ integrations: Array<AgentIntegrationGrant>;
3255
+ policy: PolicyConfiguration;
3256
+ model: AgentModelChoice;
3257
+ reasoning: AgentReasoning;
3258
+ workingHours: WorkingHours | null;
3259
+ takeoverTimeoutMinutes: number;
3260
+ eventTriggers?: Array<string> | undefined;
3261
+ followUpTemplate?: TemplateId | string | undefined;
3262
+ };
3364
3263
  export type DeleteAgentResponse = {
3365
3264
  id: AgentId;
3366
3265
  deleted: true;
@@ -3373,7 +3272,6 @@ export type UpdateAgentPayload = {
3373
3272
  monthlySpendCapDollars?: MonthlySpendCapDollars | null | undefined;
3374
3273
  };
3375
3274
  export type MonthlySpendCapDollars = number;
3376
- export type AgentName = string;
3377
3275
  export type CreateAgentPayload = {
3378
3276
  name: AgentName;
3379
3277
  /**
@@ -3482,13 +3380,13 @@ export type JourneyRunStep = {
3482
3380
  error: string | null;
3483
3381
  };
3484
3382
  export type JourneyNodeId = string;
3485
- export type JourneyRunStepOutcome = "completed" | "matched" | "timed_out" | "goal" | "archived" | "failed";
3383
+ export type JourneyRunStepOutcome = "completed" | "matched" | "timed_out" | "goal" | "archived" | "merged" | "failed";
3486
3384
  export type JourneyRunTrigger = {
3487
3385
  eventId: string;
3488
3386
  eventName: string;
3489
3387
  properties: JsonObject;
3490
3388
  };
3491
- export type JourneyRunExitReason = "completed" | "goal" | "archived";
3389
+ export type JourneyRunExitReason = "completed" | "goal" | "archived" | "merged";
3492
3390
  export type JourneyRunStatus = "active" | "paused" | "exited" | "failed";
3493
3391
  export type JourneyRunId = string;
3494
3392
  export type JourneyRunPage = {
@@ -3541,6 +3439,10 @@ export type JourneyDefinition = {
3541
3439
  };
3542
3440
  goal?: JourneyGoal | undefined;
3543
3441
  reentry?: boolean | undefined;
3442
+ enrollment?: {
3443
+ type: "shopify_order";
3444
+ shop: ShopifyShop;
3445
+ } | undefined;
3544
3446
  };
3545
3447
  export type JourneyDefinitionWritable = {
3546
3448
  trigger: JourneyTrigger;
@@ -3550,7 +3452,12 @@ export type JourneyDefinitionWritable = {
3550
3452
  };
3551
3453
  goal?: JourneyGoal | undefined;
3552
3454
  reentry?: boolean | undefined;
3455
+ enrollment?: {
3456
+ type: "shopify_order";
3457
+ shop: ShopifyShop;
3458
+ } | undefined;
3553
3459
  };
3460
+ export type ShopifyShop = string;
3554
3461
  export type JourneyGoal = {
3555
3462
  eventName: JourneyEventName;
3556
3463
  };
@@ -3668,14 +3575,40 @@ export type JourneyWaitConfig = {
3668
3575
  };
3669
3576
  export type WhatsAppJourneySendNode = {
3670
3577
  type: "send_whatsapp";
3671
- config: WhatsAppTemplateDispatch;
3578
+ config: JourneySendWhatsAppConfig;
3672
3579
  next: [JourneyNextEdge];
3673
3580
  };
3674
3581
  export type WhatsAppJourneySendNodeWritable = {
3675
3582
  type: "send_whatsapp";
3676
- config: WhatsAppTemplateDispatchWritable;
3583
+ config: JourneySendWhatsAppConfigWritable;
3677
3584
  next: [JourneyNextEdge];
3678
3585
  };
3586
+ export type JourneySendWhatsAppConfig = {
3587
+ template: TemplateId | string;
3588
+ templateData?: WhatsAppTemplateDispatchData | undefined;
3589
+ bindings?: WhatsAppTemplateBindings | undefined;
3590
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
3591
+ pinnedRegistration?: {
3592
+ registrationId: TemplateRegistrationId;
3593
+ templateChannelVariantId: TemplateChannelVariantId;
3594
+ } | undefined;
3595
+ eventBindings?: {
3596
+ [key: string]: string;
3597
+ } | undefined;
3598
+ };
3599
+ export type JourneySendWhatsAppConfigWritable = {
3600
+ template: TemplateId | string;
3601
+ templateData?: WhatsAppTemplateDispatchDataWritable | undefined;
3602
+ bindings?: WhatsAppTemplateBindingsWritable | undefined;
3603
+ businessAccountId?: WhatsAppBusinessAccountId | undefined;
3604
+ pinnedRegistration?: {
3605
+ registrationId: TemplateRegistrationId;
3606
+ templateChannelVariantId: TemplateChannelVariantId;
3607
+ } | undefined;
3608
+ eventBindings?: {
3609
+ [key: string]: string | undefined;
3610
+ } | undefined;
3611
+ };
3679
3612
  export type WhatsAppTemplateDispatchData = {
3680
3613
  [key: string]: JsonValue;
3681
3614
  };
@@ -3694,11 +3627,13 @@ export type JourneySendEmailNodeWritable = {
3694
3627
  };
3695
3628
  export type JourneySendEmailConfig = {
3696
3629
  template: TemplateId | string;
3630
+ publicationId?: TemplatePublicationId | undefined;
3697
3631
  senderId?: EmailSenderId | undefined;
3698
3632
  templateData?: JsonObject | undefined;
3699
3633
  };
3700
3634
  export type JourneySendEmailConfigWritable = {
3701
3635
  template: TemplateId | string;
3636
+ publicationId?: TemplatePublicationId | undefined;
3702
3637
  senderId?: EmailSenderId | undefined;
3703
3638
  templateData?: JsonObjectWritable | undefined;
3704
3639
  };
@@ -3839,6 +3774,7 @@ export type BulkUpdateResult = {
3839
3774
  export type ContactImportJobId = string;
3840
3775
  export type Contact = {
3841
3776
  id: ContactId;
3777
+ mergedInto?: ContactId | null | undefined;
3842
3778
  namespaceId: NamespaceId | null;
3843
3779
  name: string;
3844
3780
  displayName: string | null;
@@ -3978,6 +3914,12 @@ export type ContactIdentityInput = {
3978
3914
  identifier: string;
3979
3915
  verified?: boolean | null | undefined;
3980
3916
  };
3917
+ export type MergeContactByConnectionPayload = {
3918
+ connection: IntegrationAccountId;
3919
+ };
3920
+ export type MergeContactPayload = {
3921
+ from: ContactId;
3922
+ };
3981
3923
  export type ContactProfileUpdate = {
3982
3924
  firstName?: string | null | undefined;
3983
3925
  lastName?: string | null | undefined;
@@ -12740,6 +12682,124 @@ export type ContactsUpdateResponses = {
12740
12682
  200: Contact;
12741
12683
  };
12742
12684
  export type ContactsUpdateResponse = ContactsUpdateResponses[keyof ContactsUpdateResponses];
12685
+ export type ContactsMergeData = {
12686
+ body: {
12687
+ from: ContactId;
12688
+ };
12689
+ headers?: {
12690
+ "x-samva-conversation-agent-admission"?: string | undefined;
12691
+ };
12692
+ path: {
12693
+ id: ContactId;
12694
+ };
12695
+ query?: never;
12696
+ url: "/v1/contacts/{id}/merge";
12697
+ };
12698
+ export type ContactsMergeErrors = {
12699
+ /**
12700
+ * MalformedRequestError
12701
+ */
12702
+ 400: MalformedRequestError;
12703
+ /**
12704
+ * UnauthorizedError
12705
+ */
12706
+ 401: UnauthorizedError;
12707
+ /**
12708
+ * ForbiddenError
12709
+ */
12710
+ 403: ForbiddenError;
12711
+ /**
12712
+ * ResourceNotFoundError
12713
+ */
12714
+ 404: ResourceNotFoundError;
12715
+ /**
12716
+ * ConflictError
12717
+ */
12718
+ 409: ConflictError;
12719
+ /**
12720
+ * ValidationError
12721
+ */
12722
+ 422: ValidationError;
12723
+ /**
12724
+ * InternalError
12725
+ */
12726
+ 500: InternalError;
12727
+ /**
12728
+ * BillingProviderError
12729
+ */
12730
+ 502: BillingProviderError;
12731
+ /**
12732
+ * GatewayTimeoutError
12733
+ */
12734
+ 504: GatewayTimeoutError;
12735
+ };
12736
+ export type ContactsMergeError = ContactsMergeErrors[keyof ContactsMergeErrors];
12737
+ export type ContactsMergeResponses = {
12738
+ /**
12739
+ * Contact
12740
+ */
12741
+ 200: Contact;
12742
+ };
12743
+ export type ContactsMergeResponse = ContactsMergeResponses[keyof ContactsMergeResponses];
12744
+ export type ContactsMergeByConnectionData = {
12745
+ body: {
12746
+ connection: IntegrationAccountId;
12747
+ };
12748
+ headers?: {
12749
+ "x-samva-conversation-agent-admission"?: string | undefined;
12750
+ };
12751
+ path: {
12752
+ id: ContactId;
12753
+ };
12754
+ query?: never;
12755
+ url: "/v1/contacts/{id}/merge-by-connection";
12756
+ };
12757
+ export type ContactsMergeByConnectionErrors = {
12758
+ /**
12759
+ * MalformedRequestError
12760
+ */
12761
+ 400: MalformedRequestError;
12762
+ /**
12763
+ * UnauthorizedError
12764
+ */
12765
+ 401: UnauthorizedError;
12766
+ /**
12767
+ * ForbiddenError
12768
+ */
12769
+ 403: ForbiddenError;
12770
+ /**
12771
+ * ResourceNotFoundError
12772
+ */
12773
+ 404: ResourceNotFoundError;
12774
+ /**
12775
+ * ConflictError
12776
+ */
12777
+ 409: ConflictError;
12778
+ /**
12779
+ * ValidationError
12780
+ */
12781
+ 422: ValidationError;
12782
+ /**
12783
+ * InternalError
12784
+ */
12785
+ 500: InternalError;
12786
+ /**
12787
+ * BillingProviderError
12788
+ */
12789
+ 502: BillingProviderError;
12790
+ /**
12791
+ * GatewayTimeoutError
12792
+ */
12793
+ 504: GatewayTimeoutError;
12794
+ };
12795
+ export type ContactsMergeByConnectionError = ContactsMergeByConnectionErrors[keyof ContactsMergeByConnectionErrors];
12796
+ export type ContactsMergeByConnectionResponses = {
12797
+ /**
12798
+ * Contact
12799
+ */
12800
+ 200: Contact;
12801
+ };
12802
+ export type ContactsMergeByConnectionResponse = ContactsMergeByConnectionResponses[keyof ContactsMergeByConnectionResponses];
12743
12803
  export type ContactsAddIdentityData = {
12744
12804
  body: {
12745
12805
  type: "email" | "phone";
@@ -14933,6 +14993,10 @@ export type AgentsPublishErrors = {
14933
14993
  * UnauthorizedError
14934
14994
  */
14935
14995
  401: UnauthorizedError;
14996
+ /**
14997
+ * PaymentRequiredError
14998
+ */
14999
+ 402: PaymentRequiredError;
14936
15000
  /**
14937
15001
  * ForbiddenError
14938
15002
  */
@@ -14966,15 +15030,67 @@ export type AgentsPublishResponses = {
14966
15030
  200: PublishAgentResponse;
14967
15031
  };
14968
15032
  export type AgentsPublishResponse = AgentsPublishResponses[keyof AgentsPublishResponses];
14969
- export type AgentsContinueOnStandardData = {
15033
+ export type AgentsListVersionsData = {
14970
15034
  body?: never;
14971
15035
  path: {
14972
15036
  id: AgentId;
14973
15037
  };
15038
+ query?: {
15039
+ limit?: number | null | undefined;
15040
+ cursor?: string | undefined;
15041
+ };
15042
+ url: "/v1/agents/{id}/versions";
15043
+ };
15044
+ export type AgentsListVersionsErrors = {
15045
+ /**
15046
+ * MalformedRequestError
15047
+ */
15048
+ 400: MalformedRequestError;
15049
+ /**
15050
+ * UnauthorizedError
15051
+ */
15052
+ 401: UnauthorizedError;
15053
+ /**
15054
+ * ForbiddenError
15055
+ */
15056
+ 403: ForbiddenError;
15057
+ /**
15058
+ * ResourceNotFoundError
15059
+ */
15060
+ 404: ResourceNotFoundError;
15061
+ /**
15062
+ * ValidationError
15063
+ */
15064
+ 422: ValidationError;
15065
+ /**
15066
+ * InternalError
15067
+ */
15068
+ 500: InternalError;
15069
+ /**
15070
+ * GatewayTimeoutError
15071
+ */
15072
+ 504: GatewayTimeoutError;
15073
+ };
15074
+ export type AgentsListVersionsError = AgentsListVersionsErrors[keyof AgentsListVersionsErrors];
15075
+ export type AgentsListVersionsResponses = {
15076
+ /**
15077
+ * AgentVersionPage
15078
+ */
15079
+ 200: AgentVersionPage;
15080
+ };
15081
+ export type AgentsListVersionsResponse = AgentsListVersionsResponses[keyof AgentsListVersionsResponses];
15082
+ export type AgentsPublishVersionData = {
15083
+ body: {
15084
+ revision: string;
15085
+ bundle: AgentModuleBundle;
15086
+ };
15087
+ path: {
15088
+ id: AgentId;
15089
+ };
14974
15090
  query?: never;
14975
- url: "/v1/agents/{id}/continue-on-standard";
15091
+ url: "/v1/agents/{id}/versions";
14976
15092
  };
14977
- export type AgentsContinueOnStandardErrors = {
15093
+ export type AgentsPublishVersionErrors = {
14978
15094
  /**
14979
15095
  * MalformedRequestError
14980
15096
  */
@@ -14983,6 +15099,10 @@ export type AgentsContinueOnStandardErrors = {
14983
15099
  * UnauthorizedError
14984
15100
  */
14985
15101
  401: UnauthorizedError;
15102
+ /**
15103
+ * PaymentRequiredError
15104
+ */
15105
+ 402: PaymentRequiredError;
14986
15106
  /**
14987
15107
  * ForbiddenError
14988
15108
  */
@@ -15008,26 +15128,23 @@ export type AgentsContinueOnStandardErrors = {
15008
15128
  */
15009
15129
  504: GatewayTimeoutError;
15010
15130
  };
15011
- export type AgentsContinueOnStandardError = AgentsContinueOnStandardErrors[keyof AgentsContinueOnStandardErrors];
15012
- export type AgentsContinueOnStandardResponses = {
15131
+ export type AgentsPublishVersionError = AgentsPublishVersionErrors[keyof AgentsPublishVersionErrors];
15132
+ export type AgentsPublishVersionResponses = {
15013
15133
  /**
15014
15134
  * PublishAgentResponse
15015
15135
  */
15016
15136
  200: PublishAgentResponse;
15017
15137
  };
15018
- export type AgentsContinueOnStandardResponse = AgentsContinueOnStandardResponses[keyof AgentsContinueOnStandardResponses];
15019
- export type AgentsListVersionsData = {
15138
+ export type AgentsPublishVersionResponse = AgentsPublishVersionResponses[keyof AgentsPublishVersionResponses];
15139
+ export type AgentsContinueOnStandardData = {
15020
15140
  body?: never;
15021
15141
  path: {
15022
15142
  id: AgentId;
15023
15143
  };
15024
- query?: {
15025
- limit?: number | null | undefined;
15026
- cursor?: string | undefined;
15027
- };
15028
- url: "/v1/agents/{id}/versions";
15144
+ query?: never;
15145
+ url: "/v1/agents/{id}/continue-on-standard";
15029
15146
  };
15030
- export type AgentsListVersionsErrors = {
15147
+ export type AgentsContinueOnStandardErrors = {
15031
15148
  /**
15032
15149
  * MalformedRequestError
15033
15150
  */
@@ -15044,6 +15161,10 @@ export type AgentsListVersionsErrors = {
15044
15161
  * ResourceNotFoundError
15045
15162
  */
15046
15163
  404: ResourceNotFoundError;
15164
+ /**
15165
+ * ConflictError
15166
+ */
15167
+ 409: ConflictError;
15047
15168
  /**
15048
15169
  * ValidationError
15049
15170
  */
@@ -15057,14 +15178,14 @@ export type AgentsListVersionsErrors = {
15057
15178
  */
15058
15179
  504: GatewayTimeoutError;
15059
15180
  };
15060
- export type AgentsListVersionsError = AgentsListVersionsErrors[keyof AgentsListVersionsErrors];
15061
- export type AgentsListVersionsResponses = {
15181
+ export type AgentsContinueOnStandardError = AgentsContinueOnStandardErrors[keyof AgentsContinueOnStandardErrors];
15182
+ export type AgentsContinueOnStandardResponses = {
15062
15183
  /**
15063
- * AgentVersionPage
15184
+ * PublishAgentResponse
15064
15185
  */
15065
- 200: AgentVersionPage;
15186
+ 200: PublishAgentResponse;
15066
15187
  };
15067
- export type AgentsListVersionsResponse = AgentsListVersionsResponses[keyof AgentsListVersionsResponses];
15188
+ export type AgentsContinueOnStandardResponse = AgentsContinueOnStandardResponses[keyof AgentsContinueOnStandardResponses];
15068
15189
  export type AgentsGetVersionData = {
15069
15190
  body?: never;
15070
15191
  path: {
@@ -30006,716 +30127,6 @@ export type NamespacesGetUsageResponses = {
30006
30127
  200: NamespaceUsage;
30007
30128
  };
30008
30129
  export type NamespacesGetUsageResponse = NamespacesGetUsageResponses[keyof NamespacesGetUsageResponses];
30009
- export type ExtensionsListData = {
30010
- body?: never;
30011
- path?: never;
30012
- query?: {
30013
- limit?: number | null | undefined;
30014
- cursor?: string | undefined;
30015
- after?: string | undefined;
30016
- before?: string | undefined;
30017
- };
30018
- url: "/v1/extensions";
30019
- };
30020
- export type ExtensionsListErrors = {
30021
- /**
30022
- * MalformedRequestError
30023
- */
30024
- 400: MalformedRequestError;
30025
- /**
30026
- * UnauthorizedError
30027
- */
30028
- 401: UnauthorizedError;
30029
- /**
30030
- * ForbiddenError
30031
- */
30032
- 403: ForbiddenError;
30033
- /**
30034
- * ResourceNotFoundError
30035
- */
30036
- 404: ResourceNotFoundError;
30037
- /**
30038
- * ValidationError
30039
- */
30040
- 422: ValidationError;
30041
- /**
30042
- * InternalError
30043
- */
30044
- 500: InternalError;
30045
- /**
30046
- * GatewayTimeoutError
30047
- */
30048
- 504: GatewayTimeoutError;
30049
- };
30050
- export type ExtensionsListError = ExtensionsListErrors[keyof ExtensionsListErrors];
30051
- export type ExtensionsListResponses = {
30052
- /**
30053
- * ExtensionPage
30054
- */
30055
- 200: ExtensionPage;
30056
- };
30057
- export type ExtensionsListResponse = ExtensionsListResponses[keyof ExtensionsListResponses];
30058
- export type ExtensionsPublishData = {
30059
- body: {
30060
- manifest: {
30061
- name: string;
30062
- displayName: string;
30063
- description?: string | null | undefined;
30064
- version: string;
30065
- runtime: "hosted" | "webhook";
30066
- events: Array<"mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded">;
30067
- permissions: Array<"read" | "update" | "send" | "quarantine.read">;
30068
- };
30069
- bundle?: string | null | undefined;
30070
- };
30071
- path?: never;
30072
- query?: never;
30073
- url: "/v1/extensions";
30074
- };
30075
- export type ExtensionsPublishErrors = {
30076
- /**
30077
- * MalformedRequestError
30078
- */
30079
- 400: MalformedRequestError;
30080
- /**
30081
- * UnauthorizedError
30082
- */
30083
- 401: UnauthorizedError;
30084
- /**
30085
- * ForbiddenError
30086
- */
30087
- 403: ForbiddenError;
30088
- /**
30089
- * ResourceNotFoundError
30090
- */
30091
- 404: ResourceNotFoundError;
30092
- /**
30093
- * ConflictError
30094
- */
30095
- 409: ConflictError;
30096
- /**
30097
- * ValidationError
30098
- */
30099
- 422: ValidationError;
30100
- /**
30101
- * InternalError
30102
- */
30103
- 500: InternalError;
30104
- /**
30105
- * GatewayTimeoutError
30106
- */
30107
- 504: GatewayTimeoutError;
30108
- };
30109
- export type ExtensionsPublishError = ExtensionsPublishErrors[keyof ExtensionsPublishErrors];
30110
- export type ExtensionsPublishResponses = {
30111
- /**
30112
- * PublishExtensionVersionResponse
30113
- */
30114
- 201: PublishExtensionVersionResponse;
30115
- };
30116
- export type ExtensionsPublishResponse = ExtensionsPublishResponses[keyof ExtensionsPublishResponses];
30117
- export type ExtensionsGetData = {
30118
- body?: never;
30119
- path: {
30120
- /**
30121
- * The extension's id (`ext_…`) or its name.
30122
- */
30123
- id: string;
30124
- };
30125
- query?: never;
30126
- url: "/v1/extensions/{id}";
30127
- };
30128
- export type ExtensionsGetErrors = {
30129
- /**
30130
- * MalformedRequestError
30131
- */
30132
- 400: MalformedRequestError;
30133
- /**
30134
- * UnauthorizedError
30135
- */
30136
- 401: UnauthorizedError;
30137
- /**
30138
- * ForbiddenError
30139
- */
30140
- 403: ForbiddenError;
30141
- /**
30142
- * ResourceNotFoundError
30143
- */
30144
- 404: ResourceNotFoundError;
30145
- /**
30146
- * ValidationError
30147
- */
30148
- 422: ValidationError;
30149
- /**
30150
- * InternalError
30151
- */
30152
- 500: InternalError;
30153
- /**
30154
- * GatewayTimeoutError
30155
- */
30156
- 504: GatewayTimeoutError;
30157
- };
30158
- export type ExtensionsGetError = ExtensionsGetErrors[keyof ExtensionsGetErrors];
30159
- export type ExtensionsGetResponses = {
30160
- /**
30161
- * Extension
30162
- */
30163
- 200: Extension;
30164
- };
30165
- export type ExtensionsGetResponse = ExtensionsGetResponses[keyof ExtensionsGetResponses];
30166
- export type ExtensionsListVersionsData = {
30167
- body?: never;
30168
- path: {
30169
- /**
30170
- * The extension's id (`ext_…`) or its name.
30171
- */
30172
- id: string;
30173
- };
30174
- query?: {
30175
- limit?: number | null | undefined;
30176
- cursor?: string | undefined;
30177
- };
30178
- url: "/v1/extensions/{id}/versions";
30179
- };
30180
- export type ExtensionsListVersionsErrors = {
30181
- /**
30182
- * MalformedRequestError
30183
- */
30184
- 400: MalformedRequestError;
30185
- /**
30186
- * UnauthorizedError
30187
- */
30188
- 401: UnauthorizedError;
30189
- /**
30190
- * ForbiddenError
30191
- */
30192
- 403: ForbiddenError;
30193
- /**
30194
- * ResourceNotFoundError
30195
- */
30196
- 404: ResourceNotFoundError;
30197
- /**
30198
- * ValidationError
30199
- */
30200
- 422: ValidationError;
30201
- /**
30202
- * InternalError
30203
- */
30204
- 500: InternalError;
30205
- /**
30206
- * GatewayTimeoutError
30207
- */
30208
- 504: GatewayTimeoutError;
30209
- };
30210
- export type ExtensionsListVersionsError = ExtensionsListVersionsErrors[keyof ExtensionsListVersionsErrors];
30211
- export type ExtensionsListVersionsResponses = {
30212
- /**
30213
- * ExtensionVersionPage
30214
- */
30215
- 200: ExtensionVersionPage;
30216
- };
30217
- export type ExtensionsListVersionsResponse = ExtensionsListVersionsResponses[keyof ExtensionsListVersionsResponses];
30218
- export type ExtensionsGetVersionData = {
30219
- body?: never;
30220
- path: {
30221
- /**
30222
- * The extension's id (`ext_…`) or its name.
30223
- */
30224
- id: string;
30225
- /**
30226
- * The version's id (`extver_…`) or its version string, such as `1.0.0`.
30227
- */
30228
- versionId: string;
30229
- };
30230
- query?: never;
30231
- url: "/v1/extensions/{id}/versions/{versionId}";
30232
- };
30233
- export type ExtensionsGetVersionErrors = {
30234
- /**
30235
- * MalformedRequestError
30236
- */
30237
- 400: MalformedRequestError;
30238
- /**
30239
- * UnauthorizedError
30240
- */
30241
- 401: UnauthorizedError;
30242
- /**
30243
- * ForbiddenError
30244
- */
30245
- 403: ForbiddenError;
30246
- /**
30247
- * ResourceNotFoundError
30248
- */
30249
- 404: ResourceNotFoundError;
30250
- /**
30251
- * ValidationError
30252
- */
30253
- 422: ValidationError;
30254
- /**
30255
- * InternalError
30256
- */
30257
- 500: InternalError;
30258
- /**
30259
- * GatewayTimeoutError
30260
- */
30261
- 504: GatewayTimeoutError;
30262
- };
30263
- export type ExtensionsGetVersionError = ExtensionsGetVersionErrors[keyof ExtensionsGetVersionErrors];
30264
- export type ExtensionsGetVersionResponses = {
30265
- /**
30266
- * ExtensionVersion
30267
- */
30268
- 200: ExtensionVersion;
30269
- };
30270
- export type ExtensionsGetVersionResponse = ExtensionsGetVersionResponses[keyof ExtensionsGetVersionResponses];
30271
- export type ExtensionInstallationsListData = {
30272
- body?: never;
30273
- path?: never;
30274
- query?: {
30275
- limit?: number | null | undefined;
30276
- cursor?: string | undefined;
30277
- after?: string | undefined;
30278
- before?: string | undefined;
30279
- };
30280
- url: "/v1/extension-installations";
30281
- };
30282
- export type ExtensionInstallationsListErrors = {
30283
- /**
30284
- * MalformedRequestError
30285
- */
30286
- 400: MalformedRequestError;
30287
- /**
30288
- * UnauthorizedError
30289
- */
30290
- 401: UnauthorizedError;
30291
- /**
30292
- * ForbiddenError
30293
- */
30294
- 403: ForbiddenError;
30295
- /**
30296
- * ResourceNotFoundError
30297
- */
30298
- 404: ResourceNotFoundError;
30299
- /**
30300
- * ValidationError
30301
- */
30302
- 422: ValidationError;
30303
- /**
30304
- * InternalError
30305
- */
30306
- 500: InternalError;
30307
- /**
30308
- * GatewayTimeoutError
30309
- */
30310
- 504: GatewayTimeoutError;
30311
- };
30312
- export type ExtensionInstallationsListError = ExtensionInstallationsListErrors[keyof ExtensionInstallationsListErrors];
30313
- export type ExtensionInstallationsListResponses = {
30314
- /**
30315
- * ExtensionInstallationPage
30316
- */
30317
- 200: ExtensionInstallationPage;
30318
- };
30319
- export type ExtensionInstallationsListResponse = ExtensionInstallationsListResponses[keyof ExtensionInstallationsListResponses];
30320
- export type ExtensionInstallationsInstallData = {
30321
- body: {
30322
- extension: string;
30323
- version?: string | null | undefined;
30324
- mailboxIds?: Array<MailboxId> | null | undefined;
30325
- namespaceId?: NamespaceId | null | undefined;
30326
- permissions?: Array<"read" | "update" | "send" | "quarantine.read"> | null | undefined;
30327
- policy?: PolicyConfiguration | null | undefined;
30328
- webhookUrl?: string | null | undefined;
30329
- };
30330
- path?: never;
30331
- query?: never;
30332
- url: "/v1/extension-installations";
30333
- };
30334
- export type ExtensionInstallationsInstallErrors = {
30335
- /**
30336
- * MalformedRequestError
30337
- */
30338
- 400: MalformedRequestError;
30339
- /**
30340
- * UnauthorizedError
30341
- */
30342
- 401: UnauthorizedError;
30343
- /**
30344
- * ForbiddenError
30345
- */
30346
- 403: ForbiddenError;
30347
- /**
30348
- * ResourceNotFoundError
30349
- */
30350
- 404: ResourceNotFoundError;
30351
- /**
30352
- * ConflictError
30353
- */
30354
- 409: ConflictError;
30355
- /**
30356
- * ValidationError
30357
- */
30358
- 422: ValidationError;
30359
- /**
30360
- * InternalError
30361
- */
30362
- 500: InternalError;
30363
- /**
30364
- * GatewayTimeoutError
30365
- */
30366
- 504: GatewayTimeoutError;
30367
- };
30368
- export type ExtensionInstallationsInstallError = ExtensionInstallationsInstallErrors[keyof ExtensionInstallationsInstallErrors];
30369
- export type ExtensionInstallationsInstallResponses = {
30370
- /**
30371
- * InstallExtensionResponse
30372
- */
30373
- 201: InstallExtensionResponse;
30374
- };
30375
- export type ExtensionInstallationsInstallResponse = ExtensionInstallationsInstallResponses[keyof ExtensionInstallationsInstallResponses];
30376
- export type ExtensionInstallationsUninstallData = {
30377
- body?: never;
30378
- path: {
30379
- id: ExtensionInstallationId;
30380
- };
30381
- query?: never;
30382
- url: "/v1/extension-installations/{id}";
30383
- };
30384
- export type ExtensionInstallationsUninstallErrors = {
30385
- /**
30386
- * MalformedRequestError
30387
- */
30388
- 400: MalformedRequestError;
30389
- /**
30390
- * UnauthorizedError
30391
- */
30392
- 401: UnauthorizedError;
30393
- /**
30394
- * ForbiddenError
30395
- */
30396
- 403: ForbiddenError;
30397
- /**
30398
- * ResourceNotFoundError
30399
- */
30400
- 404: ResourceNotFoundError;
30401
- /**
30402
- * ConflictError
30403
- */
30404
- 409: ConflictError;
30405
- /**
30406
- * ValidationError
30407
- */
30408
- 422: ValidationError;
30409
- /**
30410
- * InternalError
30411
- */
30412
- 500: InternalError;
30413
- /**
30414
- * GatewayTimeoutError
30415
- */
30416
- 504: GatewayTimeoutError;
30417
- };
30418
- export type ExtensionInstallationsUninstallError = ExtensionInstallationsUninstallErrors[keyof ExtensionInstallationsUninstallErrors];
30419
- export type ExtensionInstallationsUninstallResponses = {
30420
- /**
30421
- * SuccessResponse
30422
- */
30423
- 200: SuccessResponse;
30424
- };
30425
- export type ExtensionInstallationsUninstallResponse = ExtensionInstallationsUninstallResponses[keyof ExtensionInstallationsUninstallResponses];
30426
- export type ExtensionInstallationsGetData = {
30427
- body?: never;
30428
- path: {
30429
- id: ExtensionInstallationId;
30430
- };
30431
- query?: never;
30432
- url: "/v1/extension-installations/{id}";
30433
- };
30434
- export type ExtensionInstallationsGetErrors = {
30435
- /**
30436
- * MalformedRequestError
30437
- */
30438
- 400: MalformedRequestError;
30439
- /**
30440
- * UnauthorizedError
30441
- */
30442
- 401: UnauthorizedError;
30443
- /**
30444
- * ForbiddenError
30445
- */
30446
- 403: ForbiddenError;
30447
- /**
30448
- * ResourceNotFoundError
30449
- */
30450
- 404: ResourceNotFoundError;
30451
- /**
30452
- * ValidationError
30453
- */
30454
- 422: ValidationError;
30455
- /**
30456
- * InternalError
30457
- */
30458
- 500: InternalError;
30459
- /**
30460
- * GatewayTimeoutError
30461
- */
30462
- 504: GatewayTimeoutError;
30463
- };
30464
- export type ExtensionInstallationsGetError = ExtensionInstallationsGetErrors[keyof ExtensionInstallationsGetErrors];
30465
- export type ExtensionInstallationsGetResponses = {
30466
- /**
30467
- * ExtensionInstallation
30468
- */
30469
- 200: ExtensionInstallation;
30470
- };
30471
- export type ExtensionInstallationsGetResponse = ExtensionInstallationsGetResponses[keyof ExtensionInstallationsGetResponses];
30472
- export type ExtensionInstallationsUpgradeData = {
30473
- body: {
30474
- version?: string | ExtensionVersionId | null | undefined;
30475
- acceptPermissions?: Array<"permission:read" | "permission:update" | "permission:send" | "permission:quarantine.read" | "event:mailbox.message.received" | "event:mailbox.message.sent" | "event:mailbox.action.pending_approval" | "event:mailbox.action.resolved" | "event:mailbox.message.quarantined" | "event:mailbox.message.released" | "event:mailbox.message.discarded"> | null | undefined;
30476
- dryRun?: boolean | null | undefined;
30477
- };
30478
- path: {
30479
- id: ExtensionInstallationId;
30480
- };
30481
- query?: never;
30482
- url: "/v1/extension-installations/{id}/upgrade";
30483
- };
30484
- export type ExtensionInstallationsUpgradeErrors = {
30485
- /**
30486
- * MalformedRequestError
30487
- */
30488
- 400: MalformedRequestError;
30489
- /**
30490
- * UnauthorizedError
30491
- */
30492
- 401: UnauthorizedError;
30493
- /**
30494
- * ForbiddenError
30495
- */
30496
- 403: ForbiddenError;
30497
- /**
30498
- * ResourceNotFoundError
30499
- */
30500
- 404: ResourceNotFoundError;
30501
- /**
30502
- * ConflictError
30503
- */
30504
- 409: ConflictError;
30505
- /**
30506
- * ValidationError
30507
- */
30508
- 422: ValidationError;
30509
- /**
30510
- * InternalError
30511
- */
30512
- 500: InternalError;
30513
- /**
30514
- * GatewayTimeoutError
30515
- */
30516
- 504: GatewayTimeoutError;
30517
- };
30518
- export type ExtensionInstallationsUpgradeError = ExtensionInstallationsUpgradeErrors[keyof ExtensionInstallationsUpgradeErrors];
30519
- export type ExtensionInstallationsUpgradeResponses = {
30520
- /**
30521
- * UpgradeExtensionResponse
30522
- */
30523
- 200: UpgradeExtensionResponse;
30524
- };
30525
- export type ExtensionInstallationsUpgradeResponse = ExtensionInstallationsUpgradeResponses[keyof ExtensionInstallationsUpgradeResponses];
30526
- export type ExtensionInstallationsDisableData = {
30527
- body?: never;
30528
- path: {
30529
- id: ExtensionInstallationId;
30530
- };
30531
- query?: never;
30532
- url: "/v1/extension-installations/{id}/disable";
30533
- };
30534
- export type ExtensionInstallationsDisableErrors = {
30535
- /**
30536
- * MalformedRequestError
30537
- */
30538
- 400: MalformedRequestError;
30539
- /**
30540
- * UnauthorizedError
30541
- */
30542
- 401: UnauthorizedError;
30543
- /**
30544
- * ForbiddenError
30545
- */
30546
- 403: ForbiddenError;
30547
- /**
30548
- * ResourceNotFoundError
30549
- */
30550
- 404: ResourceNotFoundError;
30551
- /**
30552
- * ConflictError
30553
- */
30554
- 409: ConflictError;
30555
- /**
30556
- * ValidationError
30557
- */
30558
- 422: ValidationError;
30559
- /**
30560
- * InternalError
30561
- */
30562
- 500: InternalError;
30563
- /**
30564
- * GatewayTimeoutError
30565
- */
30566
- 504: GatewayTimeoutError;
30567
- };
30568
- export type ExtensionInstallationsDisableError = ExtensionInstallationsDisableErrors[keyof ExtensionInstallationsDisableErrors];
30569
- export type ExtensionInstallationsDisableResponses = {
30570
- /**
30571
- * ExtensionInstallation
30572
- */
30573
- 200: ExtensionInstallation;
30574
- };
30575
- export type ExtensionInstallationsDisableResponse = ExtensionInstallationsDisableResponses[keyof ExtensionInstallationsDisableResponses];
30576
- export type ExtensionInstallationsEnableData = {
30577
- body?: never;
30578
- path: {
30579
- id: ExtensionInstallationId;
30580
- };
30581
- query?: never;
30582
- url: "/v1/extension-installations/{id}/enable";
30583
- };
30584
- export type ExtensionInstallationsEnableErrors = {
30585
- /**
30586
- * MalformedRequestError
30587
- */
30588
- 400: MalformedRequestError;
30589
- /**
30590
- * UnauthorizedError
30591
- */
30592
- 401: UnauthorizedError;
30593
- /**
30594
- * ForbiddenError
30595
- */
30596
- 403: ForbiddenError;
30597
- /**
30598
- * ResourceNotFoundError
30599
- */
30600
- 404: ResourceNotFoundError;
30601
- /**
30602
- * ConflictError
30603
- */
30604
- 409: ConflictError;
30605
- /**
30606
- * ValidationError
30607
- */
30608
- 422: ValidationError;
30609
- /**
30610
- * InternalError
30611
- */
30612
- 500: InternalError;
30613
- /**
30614
- * GatewayTimeoutError
30615
- */
30616
- 504: GatewayTimeoutError;
30617
- };
30618
- export type ExtensionInstallationsEnableError = ExtensionInstallationsEnableErrors[keyof ExtensionInstallationsEnableErrors];
30619
- export type ExtensionInstallationsEnableResponses = {
30620
- /**
30621
- * ExtensionInstallation
30622
- */
30623
- 200: ExtensionInstallation;
30624
- };
30625
- export type ExtensionInstallationsEnableResponse = ExtensionInstallationsEnableResponses[keyof ExtensionInstallationsEnableResponses];
30626
- export type ExtensionInstallationsListRunsData = {
30627
- body?: never;
30628
- path: {
30629
- id: ExtensionInstallationId;
30630
- };
30631
- query?: never;
30632
- url: "/v1/extension-installations/{id}/runs";
30633
- };
30634
- export type ExtensionInstallationsListRunsErrors = {
30635
- /**
30636
- * MalformedRequestError
30637
- */
30638
- 400: MalformedRequestError;
30639
- /**
30640
- * UnauthorizedError
30641
- */
30642
- 401: UnauthorizedError;
30643
- /**
30644
- * ForbiddenError
30645
- */
30646
- 403: ForbiddenError;
30647
- /**
30648
- * ResourceNotFoundError
30649
- */
30650
- 404: ResourceNotFoundError;
30651
- /**
30652
- * ValidationError
30653
- */
30654
- 422: ValidationError;
30655
- /**
30656
- * InternalError
30657
- */
30658
- 500: InternalError;
30659
- /**
30660
- * GatewayTimeoutError
30661
- */
30662
- 504: GatewayTimeoutError;
30663
- };
30664
- export type ExtensionInstallationsListRunsError = ExtensionInstallationsListRunsErrors[keyof ExtensionInstallationsListRunsErrors];
30665
- export type ExtensionInstallationsListRunsResponses = {
30666
- /**
30667
- * ExtensionRunList
30668
- */
30669
- 200: ExtensionRunList;
30670
- };
30671
- export type ExtensionInstallationsListRunsResponse = ExtensionInstallationsListRunsResponses[keyof ExtensionInstallationsListRunsResponses];
30672
- export type ExtensionInstallationsGetRunData = {
30673
- body?: never;
30674
- path: {
30675
- id: ExtensionInstallationId;
30676
- runId: string;
30677
- };
30678
- query?: never;
30679
- url: "/v1/extension-installations/{id}/runs/{runId}";
30680
- };
30681
- export type ExtensionInstallationsGetRunErrors = {
30682
- /**
30683
- * MalformedRequestError
30684
- */
30685
- 400: MalformedRequestError;
30686
- /**
30687
- * UnauthorizedError
30688
- */
30689
- 401: UnauthorizedError;
30690
- /**
30691
- * ForbiddenError
30692
- */
30693
- 403: ForbiddenError;
30694
- /**
30695
- * ResourceNotFoundError
30696
- */
30697
- 404: ResourceNotFoundError;
30698
- /**
30699
- * ValidationError
30700
- */
30701
- 422: ValidationError;
30702
- /**
30703
- * InternalError
30704
- */
30705
- 500: InternalError;
30706
- /**
30707
- * GatewayTimeoutError
30708
- */
30709
- 504: GatewayTimeoutError;
30710
- };
30711
- export type ExtensionInstallationsGetRunError = ExtensionInstallationsGetRunErrors[keyof ExtensionInstallationsGetRunErrors];
30712
- export type ExtensionInstallationsGetRunResponses = {
30713
- /**
30714
- * ExtensionRun
30715
- */
30716
- 200: ExtensionRun;
30717
- };
30718
- export type ExtensionInstallationsGetRunResponse = ExtensionInstallationsGetRunResponses[keyof ExtensionInstallationsGetRunResponses];
30719
30130
  export type WhatsappGetStatsData = {
30720
30131
  body?: never;
30721
30132
  path?: never;