@automate.ax/integration-contracts 0.99.1 → 0.99.4

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.
@@ -40,11 +40,24 @@ export declare const RESEND_EVENT_MUTATION_RESPONSE_SCHEMA: z.ZodObject<{
40
40
  id: z.ZodString;
41
41
  object: z.ZodLiteral<"event">;
42
42
  }, z.core.$strip>;
43
- export declare const RESEND_CONTACT_DELETE_RESPONSE_SCHEMA: z.ZodObject<{
44
- id: z.ZodString;
45
- object: z.ZodLiteral<"contact">;
43
+ export declare const RESEND_CONTACT_DELETE_WIRE_SCHEMA: z.ZodObject<{
44
+ contact: z.ZodString;
46
45
  deleted: z.ZodBoolean;
46
+ object: z.ZodLiteral<"contact">;
47
47
  }, z.core.$strip>;
48
+ export declare const RESEND_CONTACT_DELETE_RESPONSE_SCHEMA: z.ZodPipe<z.ZodObject<{
49
+ contact: z.ZodString;
50
+ deleted: z.ZodBoolean;
51
+ object: z.ZodLiteral<"contact">;
52
+ }, z.core.$strip>, z.ZodTransform<{
53
+ id: string;
54
+ deleted: boolean;
55
+ object: "contact";
56
+ }, {
57
+ contact: string;
58
+ deleted: boolean;
59
+ object: "contact";
60
+ }>>;
48
61
  export declare const RESEND_EVENT_DELETE_RESPONSE_SCHEMA: z.ZodObject<{
49
62
  id: z.ZodString;
50
63
  object: z.ZodLiteral<"event">;
@@ -662,58 +675,44 @@ export declare const RESEND_CONTACT_TOPIC_SCHEMA: z.ZodObject<{
662
675
  }>;
663
676
  }, z.core.$strip>;
664
677
  export declare const RESEND_CONTACT_SEGMENT_DELETE_WIRE_SCHEMA: z.ZodObject<{
665
- contact_id: z.ZodString;
678
+ audienceId: z.ZodString;
666
679
  deleted: z.ZodBoolean;
667
- object: z.ZodLiteral<"contact_segment">;
668
- segment_id: z.ZodString;
680
+ id: z.ZodString;
669
681
  }, z.core.$strip>;
670
682
  export declare const RESEND_CONTACT_SEGMENT_MUTATION_WIRE_SCHEMA: z.ZodObject<{
671
- contact_id: z.ZodString;
672
- object: z.ZodLiteral<"contact_segment">;
673
- segment_id: z.ZodString;
683
+ audienceId: z.ZodString;
684
+ id: z.ZodString;
674
685
  }, z.core.$strip>;
675
686
  export declare const RESEND_CONTACT_SEGMENT_MUTATION_SCHEMA: z.ZodPipe<z.ZodObject<{
676
- contact_id: z.ZodString;
677
- object: z.ZodLiteral<"contact_segment">;
678
- segment_id: z.ZodString;
687
+ audienceId: z.ZodString;
688
+ id: z.ZodString;
679
689
  }, z.core.$strip>, z.ZodTransform<{
680
690
  contactId: string;
681
- segmentId: string;
682
691
  object: "contact_segment";
692
+ segmentId: string;
683
693
  }, {
684
- contact_id: string;
685
- object: "contact_segment";
686
- segment_id: string;
694
+ audienceId: string;
695
+ id: string;
687
696
  }>>;
688
697
  export declare const RESEND_CONTACT_SEGMENT_DELETE_SCHEMA: z.ZodPipe<z.ZodObject<{
689
- contact_id: z.ZodString;
698
+ audienceId: z.ZodString;
690
699
  deleted: z.ZodBoolean;
691
- object: z.ZodLiteral<"contact_segment">;
692
- segment_id: z.ZodString;
700
+ id: z.ZodString;
693
701
  }, z.core.$strip>, z.ZodTransform<{
694
702
  contactId: string;
703
+ object: "contact_segment";
695
704
  segmentId: string;
696
705
  deleted: boolean;
697
- object: "contact_segment";
698
706
  }, {
699
- contact_id: string;
707
+ audienceId: string;
700
708
  deleted: boolean;
701
- object: "contact_segment";
702
- segment_id: string;
709
+ id: string;
703
710
  }>>;
704
711
  export declare const RESEND_CONTACT_TOPICS_UPDATE_WIRE_SCHEMA: z.ZodObject<{
705
- contact_id: z.ZodString;
706
- object: z.ZodLiteral<"contact_topics">;
707
- topics: z.ZodArray<z.ZodObject<{
708
- id: z.ZodString;
709
- subscription: z.ZodEnum<{
710
- opt_in: "opt_in";
711
- opt_out: "opt_out";
712
- }>;
713
- }, z.core.$strip>>;
712
+ id: z.ZodString;
714
713
  }, z.core.$strip>;
715
- export declare const RESEND_CONTACT_TOPICS_UPDATE_SCHEMA: z.ZodPipe<z.ZodObject<{
716
- contact_id: z.ZodString;
714
+ export declare const RESEND_CONTACT_TOPICS_UPDATE_SCHEMA: z.ZodObject<{
715
+ contactId: z.ZodString;
717
716
  object: z.ZodLiteral<"contact_topics">;
718
717
  topics: z.ZodArray<z.ZodObject<{
719
718
  id: z.ZodString;
@@ -722,21 +721,7 @@ export declare const RESEND_CONTACT_TOPICS_UPDATE_SCHEMA: z.ZodPipe<z.ZodObject<
722
721
  opt_out: "opt_out";
723
722
  }>;
724
723
  }, z.core.$strip>>;
725
- }, z.core.$strip>, z.ZodTransform<{
726
- contactId: string;
727
- object: "contact_topics";
728
- topics: {
729
- id: string;
730
- subscription: "opt_in" | "opt_out";
731
- }[];
732
- }, {
733
- contact_id: string;
734
- object: "contact_topics";
735
- topics: {
736
- id: string;
737
- subscription: "opt_in" | "opt_out";
738
- }[];
739
- }>>;
724
+ }, z.core.$strip>;
740
725
  export declare const RESEND_EVENT_SEND_RESPONSE_SCHEMA: z.ZodObject<{
741
726
  event: z.ZodString;
742
727
  object: z.ZodLiteral<"event">;
@@ -38,7 +38,15 @@ export const RESEND_EVENT_MUTATION_RESPONSE_SCHEMA = z.object({
38
38
  id: z.string().min(1),
39
39
  object: z.literal("event"),
40
40
  });
41
- export const RESEND_CONTACT_DELETE_RESPONSE_SCHEMA = RESEND_CONTACT_MUTATION_RESPONSE_SCHEMA.extend({ deleted: z.boolean() });
41
+ export const RESEND_CONTACT_DELETE_WIRE_SCHEMA = z.object({
42
+ contact: z.string().min(1),
43
+ deleted: z.boolean(),
44
+ object: z.literal("contact"),
45
+ });
46
+ export const RESEND_CONTACT_DELETE_RESPONSE_SCHEMA = RESEND_CONTACT_DELETE_WIRE_SCHEMA.transform(({ contact: id, ...result }) => ({
47
+ ...result,
48
+ id,
49
+ }));
42
50
  export const RESEND_EVENT_DELETE_RESPONSE_SCHEMA = RESEND_EVENT_MUTATION_RESPONSE_SCHEMA.extend({ deleted: z.boolean() });
43
51
  export const RESEND_DELETE_RESPONSE_SCHEMA = RESEND_MUTATION_RESPONSE_SCHEMA.extend({ deleted: z.boolean() });
44
52
  export const RESEND_EMAIL_SUMMARY_WIRE_SCHEMA = z.object({
@@ -197,28 +205,30 @@ export const RESEND_CONTACT_TOPIC_SCHEMA = z.object({
197
205
  subscription: z.enum(["opt_in", "opt_out"]),
198
206
  });
199
207
  export const RESEND_CONTACT_SEGMENT_DELETE_WIRE_SCHEMA = z.object({
200
- contact_id: z.string(),
208
+ audienceId: z.string(),
201
209
  deleted: z.boolean(),
202
- object: z.literal("contact_segment"),
203
- segment_id: z.string(),
210
+ id: z.string(),
204
211
  });
205
212
  export const RESEND_CONTACT_SEGMENT_MUTATION_WIRE_SCHEMA = z.object({
206
- contact_id: z.string(),
207
- object: z.literal("contact_segment"),
208
- segment_id: z.string(),
213
+ audienceId: z.string(),
214
+ id: z.string(),
209
215
  });
210
- export const RESEND_CONTACT_SEGMENT_MUTATION_SCHEMA = RESEND_CONTACT_SEGMENT_MUTATION_WIRE_SCHEMA.transform(({ contact_id: contactId, segment_id: segmentId, ...result }) => ({
211
- ...result,
216
+ export const RESEND_CONTACT_SEGMENT_MUTATION_SCHEMA = RESEND_CONTACT_SEGMENT_MUTATION_WIRE_SCHEMA.transform(({ audienceId: segmentId, id: contactId }) => ({
212
217
  contactId,
218
+ object: "contact_segment",
213
219
  segmentId,
214
220
  }));
215
- export const RESEND_CONTACT_SEGMENT_DELETE_SCHEMA = RESEND_CONTACT_SEGMENT_DELETE_WIRE_SCHEMA.transform(({ contact_id: contactId, segment_id: segmentId, ...result }) => ({
221
+ export const RESEND_CONTACT_SEGMENT_DELETE_SCHEMA = RESEND_CONTACT_SEGMENT_DELETE_WIRE_SCHEMA.transform(({ audienceId: segmentId, id: contactId, ...result }) => ({
216
222
  ...result,
217
223
  contactId,
224
+ object: "contact_segment",
218
225
  segmentId,
219
226
  }));
220
227
  export const RESEND_CONTACT_TOPICS_UPDATE_WIRE_SCHEMA = z.object({
221
- contact_id: z.string(),
228
+ id: z.string(),
229
+ });
230
+ export const RESEND_CONTACT_TOPICS_UPDATE_SCHEMA = z.object({
231
+ contactId: z.string(),
222
232
  object: z.literal("contact_topics"),
223
233
  topics: z
224
234
  .object({
@@ -227,7 +237,6 @@ export const RESEND_CONTACT_TOPICS_UPDATE_WIRE_SCHEMA = z.object({
227
237
  })
228
238
  .array(),
229
239
  });
230
- export const RESEND_CONTACT_TOPICS_UPDATE_SCHEMA = RESEND_CONTACT_TOPICS_UPDATE_WIRE_SCHEMA.transform(({ contact_id: contactId, ...result }) => ({ ...result, contactId }));
231
240
  export const RESEND_EVENT_SEND_RESPONSE_SCHEMA = z.object({
232
241
  event: z.string(),
233
242
  object: z.literal("event"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/integration-contracts",
3
- "version": "0.99.1",
3
+ "version": "0.99.4",
4
4
  "description": "Shared integration payload contracts and provider primitives for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -48,7 +48,7 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@automate.ax/codec": "0.99.1",
51
+ "@automate.ax/codec": "0.99.4",
52
52
  "@cfworker/json-schema": "^4.1.1",
53
53
  "@googleapis/calendar": "^15.0.0",
54
54
  "@googleapis/forms": "^6.0.1",
@@ -47,8 +47,17 @@ export const RESEND_EVENT_MUTATION_RESPONSE_SCHEMA = z.object({
47
47
  object: z.literal("event"),
48
48
  })
49
49
 
50
+ export const RESEND_CONTACT_DELETE_WIRE_SCHEMA = z.object({
51
+ contact: z.string().min(1),
52
+ deleted: z.boolean(),
53
+ object: z.literal("contact"),
54
+ })
55
+
50
56
  export const RESEND_CONTACT_DELETE_RESPONSE_SCHEMA =
51
- RESEND_CONTACT_MUTATION_RESPONSE_SCHEMA.extend({ deleted: z.boolean() })
57
+ RESEND_CONTACT_DELETE_WIRE_SCHEMA.transform(({ contact: id, ...result }) => ({
58
+ ...result,
59
+ id,
60
+ }))
52
61
 
53
62
  export const RESEND_EVENT_DELETE_RESPONSE_SCHEMA =
54
63
  RESEND_EVENT_MUTATION_RESPONSE_SCHEMA.extend({ deleted: z.boolean() })
@@ -329,38 +338,41 @@ export const RESEND_CONTACT_TOPIC_SCHEMA = z.object({
329
338
  })
330
339
 
331
340
  export const RESEND_CONTACT_SEGMENT_DELETE_WIRE_SCHEMA = z.object({
332
- contact_id: z.string(),
341
+ audienceId: z.string(),
333
342
  deleted: z.boolean(),
334
- object: z.literal("contact_segment"),
335
- segment_id: z.string(),
343
+ id: z.string(),
336
344
  })
337
345
 
338
346
  export const RESEND_CONTACT_SEGMENT_MUTATION_WIRE_SCHEMA = z.object({
339
- contact_id: z.string(),
340
- object: z.literal("contact_segment"),
341
- segment_id: z.string(),
347
+ audienceId: z.string(),
348
+ id: z.string(),
342
349
  })
343
350
 
344
351
  export const RESEND_CONTACT_SEGMENT_MUTATION_SCHEMA =
345
352
  RESEND_CONTACT_SEGMENT_MUTATION_WIRE_SCHEMA.transform(
346
- ({ contact_id: contactId, segment_id: segmentId, ...result }) => ({
347
- ...result,
353
+ ({ audienceId: segmentId, id: contactId }) => ({
348
354
  contactId,
355
+ object: "contact_segment" as const,
349
356
  segmentId,
350
357
  }),
351
358
  )
352
359
 
353
360
  export const RESEND_CONTACT_SEGMENT_DELETE_SCHEMA =
354
361
  RESEND_CONTACT_SEGMENT_DELETE_WIRE_SCHEMA.transform(
355
- ({ contact_id: contactId, segment_id: segmentId, ...result }) => ({
362
+ ({ audienceId: segmentId, id: contactId, ...result }) => ({
356
363
  ...result,
357
364
  contactId,
365
+ object: "contact_segment" as const,
358
366
  segmentId,
359
367
  }),
360
368
  )
361
369
 
362
370
  export const RESEND_CONTACT_TOPICS_UPDATE_WIRE_SCHEMA = z.object({
363
- contact_id: z.string(),
371
+ id: z.string(),
372
+ })
373
+
374
+ export const RESEND_CONTACT_TOPICS_UPDATE_SCHEMA = z.object({
375
+ contactId: z.string(),
364
376
  object: z.literal("contact_topics"),
365
377
  topics: z
366
378
  .object({
@@ -370,11 +382,6 @@ export const RESEND_CONTACT_TOPICS_UPDATE_WIRE_SCHEMA = z.object({
370
382
  .array(),
371
383
  })
372
384
 
373
- export const RESEND_CONTACT_TOPICS_UPDATE_SCHEMA =
374
- RESEND_CONTACT_TOPICS_UPDATE_WIRE_SCHEMA.transform(
375
- ({ contact_id: contactId, ...result }) => ({ ...result, contactId }),
376
- )
377
-
378
385
  export const RESEND_EVENT_SEND_RESPONSE_SCHEMA = z.object({
379
386
  event: z.string(),
380
387
  object: z.literal("event"),