@automate.ax/integration-contracts 0.110.0 → 0.111.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.
@@ -1024,8 +1024,8 @@ export declare const RESEND_DOMAIN_CREATED_EVENT_SCHEMA: z.ZodObject<{
1024
1024
  status: z.ZodEnum<{
1025
1025
  failed: "failed";
1026
1026
  pending: "pending";
1027
- verified: "verified";
1028
1027
  not_started: "not_started";
1028
+ verified: "verified";
1029
1029
  temporary_failure: "temporary_failure";
1030
1030
  }>;
1031
1031
  ttl: z.ZodString;
@@ -1046,10 +1046,10 @@ export declare const RESEND_DOMAIN_CREATED_EVENT_SCHEMA: z.ZodObject<{
1046
1046
  status: z.ZodEnum<{
1047
1047
  failed: "failed";
1048
1048
  pending: "pending";
1049
+ not_started: "not_started";
1049
1050
  verified: "verified";
1050
1051
  partially_verified: "partially_verified";
1051
1052
  partially_failed: "partially_failed";
1052
- not_started: "not_started";
1053
1053
  }>;
1054
1054
  event: z.ZodObject<{
1055
1055
  created_at: z.ZodISODateTime;
@@ -1080,8 +1080,8 @@ export declare const RESEND_DOMAIN_CREATED_EVENT_SCHEMA: z.ZodObject<{
1080
1080
  status: z.ZodEnum<{
1081
1081
  failed: "failed";
1082
1082
  pending: "pending";
1083
- verified: "verified";
1084
1083
  not_started: "not_started";
1084
+ verified: "verified";
1085
1085
  temporary_failure: "temporary_failure";
1086
1086
  }>;
1087
1087
  ttl: z.ZodString;
@@ -1102,10 +1102,10 @@ export declare const RESEND_DOMAIN_CREATED_EVENT_SCHEMA: z.ZodObject<{
1102
1102
  status: z.ZodEnum<{
1103
1103
  failed: "failed";
1104
1104
  pending: "pending";
1105
+ not_started: "not_started";
1105
1106
  verified: "verified";
1106
1107
  partially_verified: "partially_verified";
1107
1108
  partially_failed: "partially_failed";
1108
- not_started: "not_started";
1109
1109
  }>;
1110
1110
  }, z.core.$catchall<z.ZodJSONSchema>>;
1111
1111
  type: z.ZodLiteral<"domain.created">;
@@ -1138,8 +1138,8 @@ export declare const RESEND_DOMAIN_UPDATED_EVENT_SCHEMA: z.ZodObject<{
1138
1138
  status: z.ZodEnum<{
1139
1139
  failed: "failed";
1140
1140
  pending: "pending";
1141
- verified: "verified";
1142
1141
  not_started: "not_started";
1142
+ verified: "verified";
1143
1143
  temporary_failure: "temporary_failure";
1144
1144
  }>;
1145
1145
  ttl: z.ZodString;
@@ -1160,10 +1160,10 @@ export declare const RESEND_DOMAIN_UPDATED_EVENT_SCHEMA: z.ZodObject<{
1160
1160
  status: z.ZodEnum<{
1161
1161
  failed: "failed";
1162
1162
  pending: "pending";
1163
+ not_started: "not_started";
1163
1164
  verified: "verified";
1164
1165
  partially_verified: "partially_verified";
1165
1166
  partially_failed: "partially_failed";
1166
- not_started: "not_started";
1167
1167
  }>;
1168
1168
  event: z.ZodObject<{
1169
1169
  created_at: z.ZodISODateTime;
@@ -1194,8 +1194,8 @@ export declare const RESEND_DOMAIN_UPDATED_EVENT_SCHEMA: z.ZodObject<{
1194
1194
  status: z.ZodEnum<{
1195
1195
  failed: "failed";
1196
1196
  pending: "pending";
1197
- verified: "verified";
1198
1197
  not_started: "not_started";
1198
+ verified: "verified";
1199
1199
  temporary_failure: "temporary_failure";
1200
1200
  }>;
1201
1201
  ttl: z.ZodString;
@@ -1216,10 +1216,10 @@ export declare const RESEND_DOMAIN_UPDATED_EVENT_SCHEMA: z.ZodObject<{
1216
1216
  status: z.ZodEnum<{
1217
1217
  failed: "failed";
1218
1218
  pending: "pending";
1219
+ not_started: "not_started";
1219
1220
  verified: "verified";
1220
1221
  partially_verified: "partially_verified";
1221
1222
  partially_failed: "partially_failed";
1222
- not_started: "not_started";
1223
1223
  }>;
1224
1224
  }, z.core.$catchall<z.ZodJSONSchema>>;
1225
1225
  type: z.ZodLiteral<"domain.updated">;
@@ -1252,8 +1252,8 @@ export declare const RESEND_DOMAIN_DELETED_EVENT_SCHEMA: z.ZodObject<{
1252
1252
  status: z.ZodEnum<{
1253
1253
  failed: "failed";
1254
1254
  pending: "pending";
1255
- verified: "verified";
1256
1255
  not_started: "not_started";
1256
+ verified: "verified";
1257
1257
  temporary_failure: "temporary_failure";
1258
1258
  }>;
1259
1259
  ttl: z.ZodString;
@@ -1274,10 +1274,10 @@ export declare const RESEND_DOMAIN_DELETED_EVENT_SCHEMA: z.ZodObject<{
1274
1274
  status: z.ZodEnum<{
1275
1275
  failed: "failed";
1276
1276
  pending: "pending";
1277
+ not_started: "not_started";
1277
1278
  verified: "verified";
1278
1279
  partially_verified: "partially_verified";
1279
1280
  partially_failed: "partially_failed";
1280
- not_started: "not_started";
1281
1281
  }>;
1282
1282
  event: z.ZodObject<{
1283
1283
  created_at: z.ZodISODateTime;
@@ -1308,8 +1308,8 @@ export declare const RESEND_DOMAIN_DELETED_EVENT_SCHEMA: z.ZodObject<{
1308
1308
  status: z.ZodEnum<{
1309
1309
  failed: "failed";
1310
1310
  pending: "pending";
1311
- verified: "verified";
1312
1311
  not_started: "not_started";
1312
+ verified: "verified";
1313
1313
  temporary_failure: "temporary_failure";
1314
1314
  }>;
1315
1315
  ttl: z.ZodString;
@@ -1330,10 +1330,10 @@ export declare const RESEND_DOMAIN_DELETED_EVENT_SCHEMA: z.ZodObject<{
1330
1330
  status: z.ZodEnum<{
1331
1331
  failed: "failed";
1332
1332
  pending: "pending";
1333
+ not_started: "not_started";
1333
1334
  verified: "verified";
1334
1335
  partially_verified: "partially_verified";
1335
1336
  partially_failed: "partially_failed";
1336
- not_started: "not_started";
1337
1337
  }>;
1338
1338
  }, z.core.$catchall<z.ZodJSONSchema>>;
1339
1339
  type: z.ZodLiteral<"domain.deleted">;
@@ -1366,8 +1366,8 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1366
1366
  status: z.ZodEnum<{
1367
1367
  failed: "failed";
1368
1368
  pending: "pending";
1369
- verified: "verified";
1370
1369
  not_started: "not_started";
1370
+ verified: "verified";
1371
1371
  temporary_failure: "temporary_failure";
1372
1372
  }>;
1373
1373
  ttl: z.ZodString;
@@ -1388,10 +1388,10 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1388
1388
  status: z.ZodEnum<{
1389
1389
  failed: "failed";
1390
1390
  pending: "pending";
1391
+ not_started: "not_started";
1391
1392
  verified: "verified";
1392
1393
  partially_verified: "partially_verified";
1393
1394
  partially_failed: "partially_failed";
1394
- not_started: "not_started";
1395
1395
  }>;
1396
1396
  event: z.ZodObject<{
1397
1397
  created_at: z.ZodISODateTime;
@@ -1422,8 +1422,8 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1422
1422
  status: z.ZodEnum<{
1423
1423
  failed: "failed";
1424
1424
  pending: "pending";
1425
- verified: "verified";
1426
1425
  not_started: "not_started";
1426
+ verified: "verified";
1427
1427
  temporary_failure: "temporary_failure";
1428
1428
  }>;
1429
1429
  ttl: z.ZodString;
@@ -1444,10 +1444,10 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1444
1444
  status: z.ZodEnum<{
1445
1445
  failed: "failed";
1446
1446
  pending: "pending";
1447
+ not_started: "not_started";
1447
1448
  verified: "verified";
1448
1449
  partially_verified: "partially_verified";
1449
1450
  partially_failed: "partially_failed";
1450
- not_started: "not_started";
1451
1451
  }>;
1452
1452
  }, z.core.$catchall<z.ZodJSONSchema>>;
1453
1453
  type: z.ZodLiteral<"domain.created">;
@@ -1479,8 +1479,8 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1479
1479
  status: z.ZodEnum<{
1480
1480
  failed: "failed";
1481
1481
  pending: "pending";
1482
- verified: "verified";
1483
1482
  not_started: "not_started";
1483
+ verified: "verified";
1484
1484
  temporary_failure: "temporary_failure";
1485
1485
  }>;
1486
1486
  ttl: z.ZodString;
@@ -1501,10 +1501,10 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1501
1501
  status: z.ZodEnum<{
1502
1502
  failed: "failed";
1503
1503
  pending: "pending";
1504
+ not_started: "not_started";
1504
1505
  verified: "verified";
1505
1506
  partially_verified: "partially_verified";
1506
1507
  partially_failed: "partially_failed";
1507
- not_started: "not_started";
1508
1508
  }>;
1509
1509
  event: z.ZodObject<{
1510
1510
  created_at: z.ZodISODateTime;
@@ -1535,8 +1535,8 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1535
1535
  status: z.ZodEnum<{
1536
1536
  failed: "failed";
1537
1537
  pending: "pending";
1538
- verified: "verified";
1539
1538
  not_started: "not_started";
1539
+ verified: "verified";
1540
1540
  temporary_failure: "temporary_failure";
1541
1541
  }>;
1542
1542
  ttl: z.ZodString;
@@ -1557,10 +1557,10 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1557
1557
  status: z.ZodEnum<{
1558
1558
  failed: "failed";
1559
1559
  pending: "pending";
1560
+ not_started: "not_started";
1560
1561
  verified: "verified";
1561
1562
  partially_verified: "partially_verified";
1562
1563
  partially_failed: "partially_failed";
1563
- not_started: "not_started";
1564
1564
  }>;
1565
1565
  }, z.core.$catchall<z.ZodJSONSchema>>;
1566
1566
  type: z.ZodLiteral<"domain.updated">;
@@ -1592,8 +1592,8 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1592
1592
  status: z.ZodEnum<{
1593
1593
  failed: "failed";
1594
1594
  pending: "pending";
1595
- verified: "verified";
1596
1595
  not_started: "not_started";
1596
+ verified: "verified";
1597
1597
  temporary_failure: "temporary_failure";
1598
1598
  }>;
1599
1599
  ttl: z.ZodString;
@@ -1614,10 +1614,10 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1614
1614
  status: z.ZodEnum<{
1615
1615
  failed: "failed";
1616
1616
  pending: "pending";
1617
+ not_started: "not_started";
1617
1618
  verified: "verified";
1618
1619
  partially_verified: "partially_verified";
1619
1620
  partially_failed: "partially_failed";
1620
- not_started: "not_started";
1621
1621
  }>;
1622
1622
  event: z.ZodObject<{
1623
1623
  created_at: z.ZodISODateTime;
@@ -1648,8 +1648,8 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1648
1648
  status: z.ZodEnum<{
1649
1649
  failed: "failed";
1650
1650
  pending: "pending";
1651
- verified: "verified";
1652
1651
  not_started: "not_started";
1652
+ verified: "verified";
1653
1653
  temporary_failure: "temporary_failure";
1654
1654
  }>;
1655
1655
  ttl: z.ZodString;
@@ -1670,10 +1670,10 @@ export declare const RESEND_DOMAIN_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObjec
1670
1670
  status: z.ZodEnum<{
1671
1671
  failed: "failed";
1672
1672
  pending: "pending";
1673
+ not_started: "not_started";
1673
1674
  verified: "verified";
1674
1675
  partially_verified: "partially_verified";
1675
1676
  partially_failed: "partially_failed";
1676
- not_started: "not_started";
1677
1677
  }>;
1678
1678
  }, z.core.$catchall<z.ZodJSONSchema>>;
1679
1679
  type: z.ZodLiteral<"domain.deleted">;
@@ -2295,8 +2295,8 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2295
2295
  status: z.ZodEnum<{
2296
2296
  failed: "failed";
2297
2297
  pending: "pending";
2298
- verified: "verified";
2299
2298
  not_started: "not_started";
2299
+ verified: "verified";
2300
2300
  temporary_failure: "temporary_failure";
2301
2301
  }>;
2302
2302
  ttl: z.ZodString;
@@ -2317,10 +2317,10 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2317
2317
  status: z.ZodEnum<{
2318
2318
  failed: "failed";
2319
2319
  pending: "pending";
2320
+ not_started: "not_started";
2320
2321
  verified: "verified";
2321
2322
  partially_verified: "partially_verified";
2322
2323
  partially_failed: "partially_failed";
2323
- not_started: "not_started";
2324
2324
  }>;
2325
2325
  event: z.ZodObject<{
2326
2326
  created_at: z.ZodISODateTime;
@@ -2351,8 +2351,8 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2351
2351
  status: z.ZodEnum<{
2352
2352
  failed: "failed";
2353
2353
  pending: "pending";
2354
- verified: "verified";
2355
2354
  not_started: "not_started";
2355
+ verified: "verified";
2356
2356
  temporary_failure: "temporary_failure";
2357
2357
  }>;
2358
2358
  ttl: z.ZodString;
@@ -2373,10 +2373,10 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2373
2373
  status: z.ZodEnum<{
2374
2374
  failed: "failed";
2375
2375
  pending: "pending";
2376
+ not_started: "not_started";
2376
2377
  verified: "verified";
2377
2378
  partially_verified: "partially_verified";
2378
2379
  partially_failed: "partially_failed";
2379
- not_started: "not_started";
2380
2380
  }>;
2381
2381
  }, z.core.$catchall<z.ZodJSONSchema>>;
2382
2382
  type: z.ZodLiteral<"domain.created">;
@@ -2408,8 +2408,8 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2408
2408
  status: z.ZodEnum<{
2409
2409
  failed: "failed";
2410
2410
  pending: "pending";
2411
- verified: "verified";
2412
2411
  not_started: "not_started";
2412
+ verified: "verified";
2413
2413
  temporary_failure: "temporary_failure";
2414
2414
  }>;
2415
2415
  ttl: z.ZodString;
@@ -2430,10 +2430,10 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2430
2430
  status: z.ZodEnum<{
2431
2431
  failed: "failed";
2432
2432
  pending: "pending";
2433
+ not_started: "not_started";
2433
2434
  verified: "verified";
2434
2435
  partially_verified: "partially_verified";
2435
2436
  partially_failed: "partially_failed";
2436
- not_started: "not_started";
2437
2437
  }>;
2438
2438
  event: z.ZodObject<{
2439
2439
  created_at: z.ZodISODateTime;
@@ -2464,8 +2464,8 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2464
2464
  status: z.ZodEnum<{
2465
2465
  failed: "failed";
2466
2466
  pending: "pending";
2467
- verified: "verified";
2468
2467
  not_started: "not_started";
2468
+ verified: "verified";
2469
2469
  temporary_failure: "temporary_failure";
2470
2470
  }>;
2471
2471
  ttl: z.ZodString;
@@ -2486,10 +2486,10 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2486
2486
  status: z.ZodEnum<{
2487
2487
  failed: "failed";
2488
2488
  pending: "pending";
2489
+ not_started: "not_started";
2489
2490
  verified: "verified";
2490
2491
  partially_verified: "partially_verified";
2491
2492
  partially_failed: "partially_failed";
2492
- not_started: "not_started";
2493
2493
  }>;
2494
2494
  }, z.core.$catchall<z.ZodJSONSchema>>;
2495
2495
  type: z.ZodLiteral<"domain.updated">;
@@ -2521,8 +2521,8 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2521
2521
  status: z.ZodEnum<{
2522
2522
  failed: "failed";
2523
2523
  pending: "pending";
2524
- verified: "verified";
2525
2524
  not_started: "not_started";
2525
+ verified: "verified";
2526
2526
  temporary_failure: "temporary_failure";
2527
2527
  }>;
2528
2528
  ttl: z.ZodString;
@@ -2543,10 +2543,10 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2543
2543
  status: z.ZodEnum<{
2544
2544
  failed: "failed";
2545
2545
  pending: "pending";
2546
+ not_started: "not_started";
2546
2547
  verified: "verified";
2547
2548
  partially_verified: "partially_verified";
2548
2549
  partially_failed: "partially_failed";
2549
- not_started: "not_started";
2550
2550
  }>;
2551
2551
  event: z.ZodObject<{
2552
2552
  created_at: z.ZodISODateTime;
@@ -2577,8 +2577,8 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2577
2577
  status: z.ZodEnum<{
2578
2578
  failed: "failed";
2579
2579
  pending: "pending";
2580
- verified: "verified";
2581
2580
  not_started: "not_started";
2581
+ verified: "verified";
2582
2582
  temporary_failure: "temporary_failure";
2583
2583
  }>;
2584
2584
  ttl: z.ZodString;
@@ -2599,10 +2599,10 @@ export declare const RESEND_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodUnion<readon
2599
2599
  status: z.ZodEnum<{
2600
2600
  failed: "failed";
2601
2601
  pending: "pending";
2602
+ not_started: "not_started";
2602
2603
  verified: "verified";
2603
2604
  partially_verified: "partially_verified";
2604
2605
  partially_failed: "partially_failed";
2605
- not_started: "not_started";
2606
2606
  }>;
2607
2607
  }, z.core.$catchall<z.ZodJSONSchema>>;
2608
2608
  type: z.ZodLiteral<"domain.deleted">;
@@ -3102,14 +3102,14 @@ export declare function normalizeResendEvent(value: unknown): {
3102
3102
  records: {
3103
3103
  name: string;
3104
3104
  record: "SPF" | "DKIM" | "Receiving MX" | "Tracking" | "TrackingCAA";
3105
- status: "failed" | "pending" | "verified" | "not_started" | "temporary_failure";
3105
+ status: "failed" | "pending" | "not_started" | "verified" | "temporary_failure";
3106
3106
  ttl: string;
3107
3107
  type: "CAA" | "CNAME" | "MX" | "TXT";
3108
3108
  value: string;
3109
3109
  priority?: number | undefined;
3110
3110
  }[];
3111
3111
  region: "us-east-1" | "eu-west-1" | "sa-east-1" | "ap-northeast-1";
3112
- status: "failed" | "pending" | "verified" | "partially_verified" | "partially_failed" | "not_started";
3112
+ status: "failed" | "pending" | "not_started" | "verified" | "partially_verified" | "partially_failed";
3113
3113
  capabilities?: {
3114
3114
  receiving?: "enabled" | "disabled" | undefined;
3115
3115
  sending?: "enabled" | "disabled" | undefined;
@@ -3127,14 +3127,14 @@ export declare function normalizeResendEvent(value: unknown): {
3127
3127
  records: {
3128
3128
  name: string;
3129
3129
  record: "SPF" | "DKIM" | "Receiving MX" | "Tracking" | "TrackingCAA";
3130
- status: "failed" | "pending" | "verified" | "not_started" | "temporary_failure";
3130
+ status: "failed" | "pending" | "not_started" | "verified" | "temporary_failure";
3131
3131
  ttl: string;
3132
3132
  type: "CAA" | "CNAME" | "MX" | "TXT";
3133
3133
  value: string;
3134
3134
  priority?: number | undefined;
3135
3135
  }[];
3136
3136
  region: "us-east-1" | "eu-west-1" | "sa-east-1" | "ap-northeast-1";
3137
- status: "failed" | "pending" | "verified" | "partially_verified" | "partially_failed" | "not_started";
3137
+ status: "failed" | "pending" | "not_started" | "verified" | "partially_verified" | "partially_failed";
3138
3138
  capabilities?: {
3139
3139
  receiving?: "enabled" | "disabled" | undefined;
3140
3140
  sending?: "enabled" | "disabled" | undefined;
@@ -3152,14 +3152,14 @@ export declare function normalizeResendEvent(value: unknown): {
3152
3152
  records: {
3153
3153
  name: string;
3154
3154
  record: "SPF" | "DKIM" | "Receiving MX" | "Tracking" | "TrackingCAA";
3155
- status: "failed" | "pending" | "verified" | "not_started" | "temporary_failure";
3155
+ status: "failed" | "pending" | "not_started" | "verified" | "temporary_failure";
3156
3156
  ttl: string;
3157
3157
  type: "CAA" | "CNAME" | "MX" | "TXT";
3158
3158
  value: string;
3159
3159
  priority?: number | undefined;
3160
3160
  }[];
3161
3161
  region: "us-east-1" | "eu-west-1" | "sa-east-1" | "ap-northeast-1";
3162
- status: "failed" | "pending" | "verified" | "partially_verified" | "partially_failed" | "not_started";
3162
+ status: "failed" | "pending" | "not_started" | "verified" | "partially_verified" | "partially_failed";
3163
3163
  capabilities?: {
3164
3164
  receiving?: "enabled" | "disabled" | undefined;
3165
3165
  sending?: "enabled" | "disabled" | undefined;
@@ -3173,14 +3173,14 @@ export declare function normalizeResendEvent(value: unknown): {
3173
3173
  records: {
3174
3174
  name: string;
3175
3175
  record: "SPF" | "DKIM" | "Receiving MX" | "Tracking" | "TrackingCAA";
3176
- status: "failed" | "pending" | "verified" | "not_started" | "temporary_failure";
3176
+ status: "failed" | "pending" | "not_started" | "verified" | "temporary_failure";
3177
3177
  ttl: string;
3178
3178
  type: "CAA" | "CNAME" | "MX" | "TXT";
3179
3179
  value: string;
3180
3180
  priority?: number | undefined;
3181
3181
  }[];
3182
3182
  region: "us-east-1" | "eu-west-1" | "sa-east-1" | "ap-northeast-1";
3183
- status: "failed" | "pending" | "verified" | "partially_verified" | "partially_failed" | "not_started";
3183
+ status: "failed" | "pending" | "not_started" | "verified" | "partially_verified" | "partially_failed";
3184
3184
  capabilities?: {
3185
3185
  receiving?: "enabled" | "disabled" | undefined;
3186
3186
  sending?: "enabled" | "disabled" | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/integration-contracts",
3
- "version": "0.110.0",
3
+ "version": "0.111.0",
4
4
  "description": "Shared integration payload contracts and provider primitives for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -50,7 +50,7 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@automate.ax/codec": "0.110.0",
53
+ "@automate.ax/codec": "0.111.0",
54
54
  "@cfworker/json-schema": "^4.1.1",
55
55
  "@googleapis/calendar": "^15.0.0",
56
56
  "@googleapis/forms": "^6.0.1",
package/src/asana/api.ts CHANGED
@@ -27,6 +27,9 @@ export interface AsanaApiCallOptions<TSchema extends z.ZodType> {
27
27
  */
28
28
  body?: JsonObject
29
29
 
30
+ /** Provider-native multipart body for attachment uploads. */
31
+ formData?: FormData
32
+
30
33
  /** HTTP method. Defaults to `POST` with a body and `GET` otherwise. */
31
34
  httpMethod?: "DELETE" | "GET" | "POST" | "PUT"
32
35
 
@@ -110,30 +113,60 @@ export function getAsanaApi(secret: Record<string, unknown>): AsanaApi {
110
113
 
111
114
  return {
112
115
  call: async (path, options) => {
116
+ if (options.body && options.formData) {
117
+ throw new Error(
118
+ "Asana requests cannot include JSON and multipart bodies.",
119
+ )
120
+ }
113
121
  const normalizedPath = path.startsWith("/") ? path : `/${path}`
114
- const url = new URL(`${ASANA_API_BASE_URL}${normalizedPath}`)
122
+ const url = new URL(path.replace(/^\/+/, ""), `${ASANA_API_BASE_URL}/`)
123
+ if (
124
+ url.origin !== new URL(ASANA_API_BASE_URL).origin ||
125
+ !url.pathname.startsWith("/api/1.0/")
126
+ ) {
127
+ throw new Error("Asana API paths must remain under /api/1.0.")
128
+ }
115
129
  for (const [name, value] of Object.entries(options.query ?? {})) {
116
130
  if (value !== undefined) url.searchParams.set(name, String(value))
117
131
  }
118
132
 
119
133
  const response = await fetch(url, {
120
- body: options.body ? JSON.stringify({ data: options.body }) : undefined,
134
+ body: options.formData
135
+ ? options.formData
136
+ : options.body
137
+ ? JSON.stringify({ data: options.body })
138
+ : undefined,
121
139
  headers: {
122
140
  Accept: "application/json",
123
141
  Authorization: `Bearer ${accessToken}`,
124
142
  ...(options.body && { "Content-Type": "application/json" }),
125
143
  },
126
144
  method:
127
- options.httpMethod ?? (options.body === undefined ? "GET" : "POST"),
145
+ options.httpMethod ??
146
+ (options.body === undefined && options.formData === undefined
147
+ ? "GET"
148
+ : "POST"),
128
149
  })
129
150
  const responseBody = await response.text()
130
151
  let payload: unknown
131
- try {
132
- payload = JSON.parse(responseBody)
133
- } catch (cause) {
134
- if (response.ok) throw cause
152
+ if (responseBody === "") {
153
+ payload = undefined
154
+ } else {
155
+ try {
156
+ payload = JSON.parse(responseBody)
157
+ } catch (cause) {
158
+ if (response.ok) throw cause
159
+ throw new AsanaApiError({
160
+ message: responseBody.trim() || `HTTP ${response.status}`,
161
+ path: normalizedPath,
162
+ retryAfter: parseRetryAfter(response.headers.get("Retry-After")),
163
+ status: response.status,
164
+ })
165
+ }
166
+ }
167
+ if (!response.ok && responseBody === "") {
135
168
  throw new AsanaApiError({
136
- message: responseBody.trim() || `HTTP ${response.status}`,
169
+ message: `HTTP ${response.status}`,
137
170
  path: normalizedPath,
138
171
  retryAfter: parseRetryAfter(response.headers.get("Retry-After")),
139
172
  status: response.status,
@@ -0,0 +1,54 @@
1
+ import * as z from "zod"
2
+
3
+ export const ASANA_RESOURCE_SCHEMA = z.object({
4
+ /** Stable Asana globally unique identifier. */
5
+ id: z.string(),
6
+
7
+ /** Human-readable resource name, when available. */
8
+ name: z.string().optional(),
9
+
10
+ /** Provider resource type. */
11
+ type: z.string().optional(),
12
+ })
13
+
14
+ export const ASANA_PAGE_INFO_SCHEMA = z.object({
15
+ /** Opaque token for the next page, when more results are available. */
16
+ nextOffset: z.string().optional(),
17
+ })
18
+
19
+ export const ASANA_PROVIDER_RESOURCE_SCHEMA = z.looseObject({
20
+ gid: z.string(),
21
+ name: z.string().optional(),
22
+ resource_subtype: z.string().optional(),
23
+ resource_type: z.string().optional(),
24
+ })
25
+
26
+ export const ASANA_PROVIDER_PAGE_SCHEMA = z.looseObject({
27
+ next_page: z.looseObject({ offset: z.string() }).nullable().optional(),
28
+ })
29
+
30
+ /**
31
+ * Converts a provider resource identity to the public shape.
32
+ *
33
+ * @param value - Provider resource identity.
34
+ */
35
+ export function toAsanaResource(
36
+ value: z.output<typeof ASANA_PROVIDER_RESOURCE_SCHEMA>,
37
+ ) {
38
+ return {
39
+ id: value.gid,
40
+ name: value.name,
41
+ type: value.resource_type,
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Converts provider pagination metadata to the public shape.
47
+ *
48
+ * @param value - Provider page envelope.
49
+ */
50
+ export function toAsanaPageInfo(
51
+ value: z.output<typeof ASANA_PROVIDER_PAGE_SCHEMA>,
52
+ ) {
53
+ return { nextOffset: value.next_page?.offset }
54
+ }