samva 0.26.0 → 0.27.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.
@@ -443,38 +443,31 @@ export type MailboxSendError = {
443
443
  readonly id: string;
444
444
  readonly message: string;
445
445
  };
446
- export declare const MailboxSendError: Schema.Union<readonly [Schema.Struct<{
447
- readonly _tag: Schema.Literal<"SenderNotReadyError">;
446
+ export declare const MailboxSendError: Schema.Union<readonly [Schema.TaggedStruct<"SenderNotReadyError", {
448
447
  readonly message: Schema.String;
449
448
  readonly sender: Schema.String;
450
449
  readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
451
- }>, Schema.Struct<{
452
- readonly _tag: Schema.Literal<"RateLimitedError">;
450
+ }>, Schema.TaggedStruct<"RateLimitedError", {
453
451
  readonly message: Schema.String;
454
452
  readonly retryAfterSeconds: Schema.Finite;
455
- }>, Schema.Struct<{
456
- readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
453
+ }>, Schema.TaggedStruct<"OnboardingReviewRequiredError", {
457
454
  readonly message: Schema.String;
458
455
  readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
459
456
  readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
460
457
  readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
461
458
  readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
462
459
  readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
463
- }>, Schema.Struct<{
464
- readonly _tag: Schema.Literal<"PaymentRequiredError">;
460
+ }>, Schema.TaggedStruct<"PaymentRequiredError", {
465
461
  readonly message: Schema.String;
466
462
  readonly resource: Schema.String;
467
463
  readonly currentUsage: Schema.Finite;
468
464
  readonly limit: Schema.Finite;
469
- }>, Schema.Struct<{
470
- readonly _tag: Schema.Literal<"ValidationError">;
465
+ }>, Schema.TaggedStruct<"ValidationError", {
471
466
  readonly message: Schema.String;
472
467
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
473
- }>, Schema.Struct<{
474
- readonly _tag: Schema.Literal<"ForbiddenError">;
468
+ }>, Schema.TaggedStruct<"ForbiddenError", {
475
469
  readonly message: Schema.String;
476
- }>, Schema.Struct<{
477
- readonly _tag: Schema.Literal<"ResourceNotFoundError">;
470
+ }>, Schema.TaggedStruct<"ResourceNotFoundError", {
478
471
  readonly resource: Schema.String;
479
472
  readonly id: Schema.String;
480
473
  readonly message: Schema.String;
@@ -1228,38 +1221,31 @@ export type MailboxSendOutcome = {
1228
1221
  export declare const MailboxSendOutcome: Schema.Struct<{
1229
1222
  readonly code: Schema.String;
1230
1223
  readonly message: Schema.String;
1231
- readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
1232
- readonly _tag: Schema.Literal<"SenderNotReadyError">;
1224
+ readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"SenderNotReadyError", {
1233
1225
  readonly message: Schema.String;
1234
1226
  readonly sender: Schema.String;
1235
1227
  readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1236
- }>, Schema.Struct<{
1237
- readonly _tag: Schema.Literal<"RateLimitedError">;
1228
+ }>, Schema.TaggedStruct<"RateLimitedError", {
1238
1229
  readonly message: Schema.String;
1239
1230
  readonly retryAfterSeconds: Schema.Finite;
1240
- }>, Schema.Struct<{
1241
- readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
1231
+ }>, Schema.TaggedStruct<"OnboardingReviewRequiredError", {
1242
1232
  readonly message: Schema.String;
1243
1233
  readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
1244
1234
  readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
1245
1235
  readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
1246
1236
  readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
1247
1237
  readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1248
- }>, Schema.Struct<{
1249
- readonly _tag: Schema.Literal<"PaymentRequiredError">;
1238
+ }>, Schema.TaggedStruct<"PaymentRequiredError", {
1250
1239
  readonly message: Schema.String;
1251
1240
  readonly resource: Schema.String;
1252
1241
  readonly currentUsage: Schema.Finite;
1253
1242
  readonly limit: Schema.Finite;
1254
- }>, Schema.Struct<{
1255
- readonly _tag: Schema.Literal<"ValidationError">;
1243
+ }>, Schema.TaggedStruct<"ValidationError", {
1256
1244
  readonly message: Schema.String;
1257
1245
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1258
- }>, Schema.Struct<{
1259
- readonly _tag: Schema.Literal<"ForbiddenError">;
1246
+ }>, Schema.TaggedStruct<"ForbiddenError", {
1260
1247
  readonly message: Schema.String;
1261
- }>, Schema.Struct<{
1262
- readonly _tag: Schema.Literal<"ResourceNotFoundError">;
1248
+ }>, Schema.TaggedStruct<"ResourceNotFoundError", {
1263
1249
  readonly resource: Schema.String;
1264
1250
  readonly id: Schema.String;
1265
1251
  readonly message: Schema.String;
@@ -1957,38 +1943,31 @@ export declare const MailboxSendReceipt: Schema.Struct<{
1957
1943
  readonly problem: Schema.Union<readonly [Schema.Struct<{
1958
1944
  readonly code: Schema.String;
1959
1945
  readonly message: Schema.String;
1960
- readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
1961
- readonly _tag: Schema.Literal<"SenderNotReadyError">;
1946
+ readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"SenderNotReadyError", {
1962
1947
  readonly message: Schema.String;
1963
1948
  readonly sender: Schema.String;
1964
1949
  readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
1965
- }>, Schema.Struct<{
1966
- readonly _tag: Schema.Literal<"RateLimitedError">;
1950
+ }>, Schema.TaggedStruct<"RateLimitedError", {
1967
1951
  readonly message: Schema.String;
1968
1952
  readonly retryAfterSeconds: Schema.Finite;
1969
- }>, Schema.Struct<{
1970
- readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
1953
+ }>, Schema.TaggedStruct<"OnboardingReviewRequiredError", {
1971
1954
  readonly message: Schema.String;
1972
1955
  readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
1973
1956
  readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
1974
1957
  readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
1975
1958
  readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
1976
1959
  readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1977
- }>, Schema.Struct<{
1978
- readonly _tag: Schema.Literal<"PaymentRequiredError">;
1960
+ }>, Schema.TaggedStruct<"PaymentRequiredError", {
1979
1961
  readonly message: Schema.String;
1980
1962
  readonly resource: Schema.String;
1981
1963
  readonly currentUsage: Schema.Finite;
1982
1964
  readonly limit: Schema.Finite;
1983
- }>, Schema.Struct<{
1984
- readonly _tag: Schema.Literal<"ValidationError">;
1965
+ }>, Schema.TaggedStruct<"ValidationError", {
1985
1966
  readonly message: Schema.String;
1986
1967
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1987
- }>, Schema.Struct<{
1988
- readonly _tag: Schema.Literal<"ForbiddenError">;
1968
+ }>, Schema.TaggedStruct<"ForbiddenError", {
1989
1969
  readonly message: Schema.String;
1990
- }>, Schema.Struct<{
1991
- readonly _tag: Schema.Literal<"ResourceNotFoundError">;
1970
+ }>, Schema.TaggedStruct<"ResourceNotFoundError", {
1992
1971
  readonly resource: Schema.String;
1993
1972
  readonly id: Schema.String;
1994
1973
  readonly message: Schema.String;
@@ -2320,38 +2299,31 @@ declare const MailboxSendRefusedError_base: Schema.Class<MailboxSendRefusedError
2320
2299
  readonly problem: Schema.Union<readonly [Schema.Struct<{
2321
2300
  readonly code: Schema.String;
2322
2301
  readonly message: Schema.String;
2323
- readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
2324
- readonly _tag: Schema.Literal<"SenderNotReadyError">;
2302
+ readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"SenderNotReadyError", {
2325
2303
  readonly message: Schema.String;
2326
2304
  readonly sender: Schema.String;
2327
2305
  readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2328
- }>, Schema.Struct<{
2329
- readonly _tag: Schema.Literal<"RateLimitedError">;
2306
+ }>, Schema.TaggedStruct<"RateLimitedError", {
2330
2307
  readonly message: Schema.String;
2331
2308
  readonly retryAfterSeconds: Schema.Finite;
2332
- }>, Schema.Struct<{
2333
- readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
2309
+ }>, Schema.TaggedStruct<"OnboardingReviewRequiredError", {
2334
2310
  readonly message: Schema.String;
2335
2311
  readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
2336
2312
  readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
2337
2313
  readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
2338
2314
  readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
2339
2315
  readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2340
- }>, Schema.Struct<{
2341
- readonly _tag: Schema.Literal<"PaymentRequiredError">;
2316
+ }>, Schema.TaggedStruct<"PaymentRequiredError", {
2342
2317
  readonly message: Schema.String;
2343
2318
  readonly resource: Schema.String;
2344
2319
  readonly currentUsage: Schema.Finite;
2345
2320
  readonly limit: Schema.Finite;
2346
- }>, Schema.Struct<{
2347
- readonly _tag: Schema.Literal<"ValidationError">;
2321
+ }>, Schema.TaggedStruct<"ValidationError", {
2348
2322
  readonly message: Schema.String;
2349
2323
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
2350
- }>, Schema.Struct<{
2351
- readonly _tag: Schema.Literal<"ForbiddenError">;
2324
+ }>, Schema.TaggedStruct<"ForbiddenError", {
2352
2325
  readonly message: Schema.String;
2353
- }>, Schema.Struct<{
2354
- readonly _tag: Schema.Literal<"ResourceNotFoundError">;
2326
+ }>, Schema.TaggedStruct<"ResourceNotFoundError", {
2355
2327
  readonly resource: Schema.String;
2356
2328
  readonly id: Schema.String;
2357
2329
  readonly message: Schema.String;
@@ -2395,38 +2367,31 @@ declare const MailboxSendConflictError_base: Schema.Class<MailboxSendConflictErr
2395
2367
  readonly problem: Schema.Union<readonly [Schema.Struct<{
2396
2368
  readonly code: Schema.String;
2397
2369
  readonly message: Schema.String;
2398
- readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
2399
- readonly _tag: Schema.Literal<"SenderNotReadyError">;
2370
+ readonly error: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"SenderNotReadyError", {
2400
2371
  readonly message: Schema.String;
2401
2372
  readonly sender: Schema.String;
2402
2373
  readonly retryAfterSeconds: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
2403
- }>, Schema.Struct<{
2404
- readonly _tag: Schema.Literal<"RateLimitedError">;
2374
+ }>, Schema.TaggedStruct<"RateLimitedError", {
2405
2375
  readonly message: Schema.String;
2406
2376
  readonly retryAfterSeconds: Schema.Finite;
2407
- }>, Schema.Struct<{
2408
- readonly _tag: Schema.Literal<"OnboardingReviewRequiredError">;
2377
+ }>, Schema.TaggedStruct<"OnboardingReviewRequiredError", {
2409
2378
  readonly message: Schema.String;
2410
2379
  readonly code: Schema.Union<readonly [Schema.Literal<"review_required">, Schema.Literal<"review_in_progress">, Schema.Literal<"information_required">, Schema.Literal<"review_rejected">, Schema.Literal<"identity_review_required">, Schema.Literal<"identity_review_rejected">, Schema.Literal<"identity_changed">]>;
2411
2380
  readonly decision: Schema.Union<readonly [Schema.Literal<"undecided">, Schema.Literal<"approved">, Schema.Literal<"rejected">]>;
2412
2381
  readonly stage: Schema.Union<readonly [Schema.Literal<"collecting">, Schema.Literal<"automated_review">, Schema.Literal<"manual_review">, Schema.Literal<"information_requested">, Schema.Literal<"complete">]>;
2413
2382
  readonly nextAction: Schema.Union<readonly [Schema.Literal<"wait_for_review">, Schema.Literal<"provide_information">, Schema.Literal<"verify_sending_identity">, Schema.Literal<"reapply">, Schema.Literal<"contact_support">]>;
2414
2383
  readonly identityId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2415
- }>, Schema.Struct<{
2416
- readonly _tag: Schema.Literal<"PaymentRequiredError">;
2384
+ }>, Schema.TaggedStruct<"PaymentRequiredError", {
2417
2385
  readonly message: Schema.String;
2418
2386
  readonly resource: Schema.String;
2419
2387
  readonly currentUsage: Schema.Finite;
2420
2388
  readonly limit: Schema.Finite;
2421
- }>, Schema.Struct<{
2422
- readonly _tag: Schema.Literal<"ValidationError">;
2389
+ }>, Schema.TaggedStruct<"ValidationError", {
2423
2390
  readonly message: Schema.String;
2424
2391
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
2425
- }>, Schema.Struct<{
2426
- readonly _tag: Schema.Literal<"ForbiddenError">;
2392
+ }>, Schema.TaggedStruct<"ForbiddenError", {
2427
2393
  readonly message: Schema.String;
2428
- }>, Schema.Struct<{
2429
- readonly _tag: Schema.Literal<"ResourceNotFoundError">;
2394
+ }>, Schema.TaggedStruct<"ResourceNotFoundError", {
2430
2395
  readonly resource: Schema.String;
2431
2396
  readonly id: Schema.String;
2432
2397
  readonly message: Schema.String;
@@ -19,19 +19,35 @@ var GatewayTimeoutError = class extends Schema.TaggedError()("GatewayTimeoutErro
19
19
  message: Schema.String,
20
20
  retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
21
21
  })) {};
22
- Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" });
22
+ const AgentName = /* @__PURE__ */ Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
23
+ expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$",
24
+ identifier: "AgentName"
25
+ })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" }));
23
26
  const MailboxEndpointId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
24
27
  expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$",
25
28
  identifier: "MailboxEndpointId"
26
29
  })).pipe(Schema.brand("MailboxEndpointId"));
27
- Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z]{2,8}_[0-9a-z]{16}$", "u")).annotate({
30
+ const AgentIntegrationReference = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z]{2,8}_[0-9a-z]{16}$", "u")).annotate({
28
31
  expected: "a string matching the RegExp ^[a-z]{2,8}_[0-9a-z]{16}$",
29
32
  identifier: "AgentIntegrationReference"
30
- });
31
- Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[01]\\d|2[0-3]):[0-5]\\d$", "u")).annotate({
33
+ }));
34
+ const AgentMode = /* @__PURE__ */ Schema.Union([Schema.Literal("live"), Schema.Literal("supervised")]).annotate({ identifier: "AgentMode" });
35
+ const AgentModel = /* @__PURE__ */ Schema.Union([Schema.Literal("standard"), Schema.Literal("max")]).annotate({ identifier: "AgentModel" });
36
+ const AgentApprovalPolicy = /* @__PURE__ */ Schema.Union([Schema.Literal("toolActions"), Schema.Literal("none")]).annotate({ identifier: "AgentApprovalPolicy" });
37
+ const TimeZone = /* @__PURE__ */ Schema.String.annotate({ identifier: "TimeZone" });
38
+ const Weekday = /* @__PURE__ */ Schema.Union([
39
+ Schema.Literal("monday"),
40
+ Schema.Literal("tuesday"),
41
+ Schema.Literal("wednesday"),
42
+ Schema.Literal("thursday"),
43
+ Schema.Literal("friday"),
44
+ Schema.Literal("saturday"),
45
+ Schema.Literal("sunday")
46
+ ]).annotate({ identifier: "Weekday" });
47
+ const ClockTime = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[01]\\d|2[0-3]):[0-5]\\d$", "u")).annotate({
32
48
  expected: "a string matching the RegExp ^(?:[01]\\d|2[0-3]):[0-5]\\d$",
33
49
  identifier: "ClockTime"
34
- });
50
+ }));
35
51
  var ResourceNotFoundError = class extends Schema.TaggedError()("ResourceNotFoundError", Schema.Struct({
36
52
  resource: Schema.String,
37
53
  id: Schema.String,
@@ -335,19 +351,16 @@ const MailboxPolicyId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/*
335
351
  identifier: "MailboxPolicyId"
336
352
  })).pipe(Schema.brand("MailboxPolicyId"));
337
353
  const MailboxSendError = /* @__PURE__ */ Schema.Union([
338
- Schema.Struct({
339
- _tag: Schema.Literal("SenderNotReadyError"),
354
+ Schema.TaggedStruct("SenderNotReadyError", {
340
355
  message: Schema.String,
341
356
  sender: Schema.String,
342
357
  retryAfterSeconds: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]))
343
358
  }),
344
- Schema.Struct({
345
- _tag: Schema.Literal("RateLimitedError"),
359
+ Schema.TaggedStruct("RateLimitedError", {
346
360
  message: Schema.String,
347
361
  retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
348
362
  }),
349
- Schema.Struct({
350
- _tag: Schema.Literal("OnboardingReviewRequiredError"),
363
+ Schema.TaggedStruct("OnboardingReviewRequiredError", {
351
364
  message: Schema.String,
352
365
  code: Schema.Union([
353
366
  Schema.Literal("review_required"),
@@ -379,24 +392,18 @@ const MailboxSendError = /* @__PURE__ */ Schema.Union([
379
392
  ]),
380
393
  identityId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
381
394
  }),
382
- Schema.Struct({
383
- _tag: Schema.Literal("PaymentRequiredError"),
395
+ Schema.TaggedStruct("PaymentRequiredError", {
384
396
  message: Schema.String,
385
397
  resource: Schema.String,
386
398
  currentUsage: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
387
399
  limit: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
388
400
  }),
389
- Schema.Struct({
390
- _tag: Schema.Literal("ValidationError"),
401
+ Schema.TaggedStruct("ValidationError", {
391
402
  message: Schema.String,
392
403
  fields: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Array(Schema.String)), Schema.Null]))
393
404
  }),
394
- Schema.Struct({
395
- _tag: Schema.Literal("ForbiddenError"),
396
- message: Schema.String
397
- }),
398
- Schema.Struct({
399
- _tag: Schema.Literal("ResourceNotFoundError"),
405
+ Schema.TaggedStruct("ForbiddenError", { message: Schema.String }),
406
+ Schema.TaggedStruct("ResourceNotFoundError", {
400
407
  resource: Schema.String,
401
408
  id: Schema.String,
402
409
  message: Schema.String
@@ -512,6 +519,11 @@ const CreateTemplatePayload = /* @__PURE__ */ Schema.Struct({
512
519
  shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the new organization-level project with every namespace: namespace-scoped keys read and send its entries but cannot change them. Defaults to false. Not with `namespaceId`, and not from a namespace-scoped key." })),
513
520
  idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
514
521
  }).annotate({ identifier: "CreateTemplatePayload" });
522
+ const WorkingHoursRange = /* @__PURE__ */ Schema.Struct({
523
+ day: Weekday,
524
+ opens: ClockTime,
525
+ closes: ClockTime
526
+ }).annotate({ identifier: "WorkingHoursRange" });
515
527
  const CreateWebhookPayload = /* @__PURE__ */ Schema.Struct({
516
528
  name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(100).annotate({ expected: "a string with at most 100 code points" })).check(Schema.isMaxLength(100).annotate({ expected: "a value with a length of at most 100" })),
517
529
  url: Schema.String,
@@ -864,6 +876,10 @@ const UpdateTemplatePayload = /* @__PURE__ */ Schema.Struct({ data: Schema.Struc
864
876
  isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
865
877
  shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the template's project with every namespace, or stop sharing it. Applies to every entry in the project. Only an organization-level project is shared." }))
866
878
  }) }).annotate({ identifier: "UpdateTemplatePayload" });
879
+ const WorkingHours = /* @__PURE__ */ Schema.Struct({
880
+ timeZone: TimeZone,
881
+ ranges: Schema.Array(WorkingHoursRange).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(28).annotate({ expected: "a value with a length of at most 28" }))
882
+ }).annotate({ identifier: "WorkingHours" });
867
883
  const ApiKeyAccess = /* @__PURE__ */ Schema.Union([Schema.Struct({ mode: Schema.Literal("full") }), Schema.Struct({
868
884
  mode: Schema.Literal("restricted"),
869
885
  resources: ApiKeyResourceAccess,
@@ -1002,6 +1018,17 @@ const OperationAccepted = /* @__PURE__ */ Schema.Struct({
1002
1018
  resource: OperationResourceLink
1003
1019
  })
1004
1020
  }).annotate({ identifier: "OperationAccepted" });
1021
+ const AgentDefinition = /* @__PURE__ */ Schema.Struct({
1022
+ instructions: Schema.String.check(Schema.isMaxCodePoints(2e4).annotate({ expected: "a string with at most 20000 code points" })).check(Schema.isMaxLength(2e4).annotate({ expected: "a value with a length of at most 20000" })),
1023
+ knowledge: Schema.String.check(Schema.isMaxCodePoints(1e5).annotate({ expected: "a string with at most 100000 code points" })).check(Schema.isMaxLength(1e5).annotate({ expected: "a value with a length of at most 100000" })),
1024
+ endpointIds: Schema.Array(MailboxEndpointId).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
1025
+ integrationIds: Schema.Array(AgentIntegrationReference).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
1026
+ mode: AgentMode,
1027
+ model: AgentModel,
1028
+ approvalPolicy: AgentApprovalPolicy,
1029
+ workingHours: Schema.Union([WorkingHours, Schema.Null]),
1030
+ takeoverTimeoutMinutes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(10080).annotate({ expected: "a value less than or equal to 10080" }))
1031
+ }).annotate({ identifier: "AgentDefinition" });
1005
1032
  const EmailContent = /* @__PURE__ */ Schema.Struct({
1006
1033
  subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1007
1034
  html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -1111,6 +1138,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
1111
1138
  });
1112
1139
  var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
1113
1140
  //#endregion
1114
- export { AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignFooterRequiredError, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDispatchContent, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, NamespaceResourceType, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, TemplateTrackingDefault, TestWebhookPayload, UnauthorizedError, UnsubscribeId, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, VersionCursor, WebhookEndpointId, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
1141
+ export { AgentApprovalPolicy, AgentDefinition, AgentIntegrationReference, AgentMode, AgentModel, AgentName, AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignFooterRequiredError, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDispatchContent, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, NamespaceResourceType, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, TemplateTrackingDefault, TestWebhookPayload, TimeZone, UnauthorizedError, UnsubscribeId, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, VersionCursor, WebhookEndpointId, Weekday, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
1115
1142
 
1116
1143
  //# sourceMappingURL=shared.js.map
@@ -16,6 +16,7 @@
16
16
  * }).pipe(Effect.provide(Client.layerFetch({ apiKey: "<samva-api-key>" })));
17
17
  * ```
18
18
  */
19
+ export * as Agents from "./agents";
19
20
  export * as Analytics from "./analytics";
20
21
  export * as ApiKeys from "./api-keys";
21
22
  export * as Attachments from "./attachments";
@@ -2,6 +2,7 @@ import { MediaUploadError } from "../inline-attachments.js";
2
2
  import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError } from "./generated/shared.js";
3
3
  import { catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError } from "./categories.js";
4
4
  import { retry_exports } from "./retry.js";
5
+ import { agents_exports } from "./agents.js";
5
6
  import { analytics_exports } from "./analytics.js";
6
7
  import { api_keys_exports } from "./api-keys.js";
7
8
  import { attachments_exports } from "./attachments.js";
@@ -30,4 +31,4 @@ import { templates_exports } from "./templates.js";
30
31
  import { unsubscribe_groups_exports } from "./unsubscribe-groups.js";
31
32
  import { webhooks_exports } from "./webhooks.js";
32
33
  import { whoami_exports } from "./whoami.js";
33
- export { analytics_exports as Analytics, AnalyticsQueryError, api_keys_exports as ApiKeys, attachments_exports as Attachments, BillingProviderError, BrandAddressRequiredError, brands_exports as Brands, CampaignFooterRequiredError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contact_groups_exports as ContactGroups, contacts_exports as Contacts, conversations_exports as Conversations, custom_fields_exports as CustomFields, DeliveryUnavailableError, email_exports as Email, EmailChannelError, events_exports as Events, extension_installations_exports as ExtensionInstallations, extensions_exports as Extensions, ExternalServiceError, feedback_exports as Feedback, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, journeys_exports as Journeys, MailboxSendConflictError, MailboxSendRefusedError, mailboxes_exports as Mailboxes, media_exports as Media, MediaUploadError, messages_exports as Messages, namespaces_exports as Namespaces, OnboardingReviewRequiredError, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, SenderNotReadyError, subscriptions_exports as Subscriptions, templates_exports as Templates, UnauthorizedError, unsubscribe_groups_exports as UnsubscribeGroups, ValidationError, webhooks_exports as Webhooks, whoami_exports as Whoami, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
34
+ export { agents_exports as Agents, analytics_exports as Analytics, AnalyticsQueryError, api_keys_exports as ApiKeys, attachments_exports as Attachments, BillingProviderError, BrandAddressRequiredError, brands_exports as Brands, CampaignFooterRequiredError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contact_groups_exports as ContactGroups, contacts_exports as Contacts, conversations_exports as Conversations, custom_fields_exports as CustomFields, DeliveryUnavailableError, email_exports as Email, EmailChannelError, events_exports as Events, extension_installations_exports as ExtensionInstallations, extensions_exports as Extensions, ExternalServiceError, feedback_exports as Feedback, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, journeys_exports as Journeys, MailboxSendConflictError, MailboxSendRefusedError, mailboxes_exports as Mailboxes, media_exports as Media, MediaUploadError, messages_exports as Messages, namespaces_exports as Namespaces, OnboardingReviewRequiredError, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, SenderNotReadyError, subscriptions_exports as Subscriptions, templates_exports as Templates, UnauthorizedError, unsubscribe_groups_exports as UnsubscribeGroups, ValidationError, webhooks_exports as Webhooks, whoami_exports as Whoami, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
@@ -7,6 +7,7 @@ import { Effect, Predicate } from "effect";
7
7
  //#region src/effect/internal/operation.ts
8
8
  const READ_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD"]);
9
9
  const MODULE_NAMES = {
10
+ agents: "Agents",
10
11
  analytics: "Analytics",
11
12
  apiKeys: "ApiKeys",
12
13
  attachments: "Attachments",