@automate.ax/integration-contracts 0.163.2 → 0.164.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.
@@ -36,6 +36,24 @@ export declare const AUTOMATE_EXECUTION_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{
36
36
  export declare const AUTOMATE_ACTION_ATTEMPT_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{
37
37
  automation: z.ZodString;
38
38
  }, z.core.$strip>;
39
+ export declare const AUTOMATE_ORGANIZATION_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{}, z.core.$strip>;
40
+ export declare const AUTOMATE_ACCOUNT_UNHEALTHY_EVENT_SCHEMA: z.ZodObject<{
41
+ account: z.ZodObject<{
42
+ connectionMethodId: z.ZodString;
43
+ id: z.ZodString;
44
+ label: z.ZodString;
45
+ serviceId: z.ZodString;
46
+ }, z.core.$strip>;
47
+ error: z.ZodObject<{
48
+ code: z.ZodString;
49
+ message: z.ZodString;
50
+ }, z.core.$strip>;
51
+ organization: z.ZodObject<{
52
+ id: z.ZodString;
53
+ name: z.ZodString;
54
+ }, z.core.$strip>;
55
+ transitionedAt: z.ZodDate;
56
+ }, z.core.$strip>;
39
57
  export declare const AUTOMATE_AUTOMATION_STATE_EVENT_SCHEMA: z.ZodObject<{
40
58
  automation: z.ZodObject<{
41
59
  description: z.ZodString;
@@ -626,6 +644,26 @@ export declare const AUTOMATE_ACTION_INDETERMINATE_EVENT_SCHEMA: z.ZodObject<{
626
644
  }, z.core.$strip>;
627
645
  }, z.core.$strip>;
628
646
  export declare const automateTriggerContracts: {
647
+ readonly "automate.account.unhealthy": {
648
+ readonly configSchema: z.ZodObject<{}, z.core.$strip>;
649
+ readonly eventSchema: z.ZodObject<{
650
+ account: z.ZodObject<{
651
+ connectionMethodId: z.ZodString;
652
+ id: z.ZodString;
653
+ label: z.ZodString;
654
+ serviceId: z.ZodString;
655
+ }, z.core.$strip>;
656
+ error: z.ZodObject<{
657
+ code: z.ZodString;
658
+ message: z.ZodString;
659
+ }, z.core.$strip>;
660
+ organization: z.ZodObject<{
661
+ id: z.ZodString;
662
+ name: z.ZodString;
663
+ }, z.core.$strip>;
664
+ transitionedAt: z.ZodDate;
665
+ }, z.core.$strip>;
666
+ };
629
667
  readonly "automate.action.failed": {
630
668
  readonly configSchema: z.ZodObject<{
631
669
  automation: z.ZodString;
@@ -38,6 +38,18 @@ export const AUTOMATE_DEPLOYMENT_TRIGGER_CONFIG_SCHEMA = z.object({
38
38
  });
39
39
  export const AUTOMATE_EXECUTION_TRIGGER_CONFIG_SCHEMA = AUTOMATE_AUTOMATION_TRIGGER_CONFIG_SCHEMA;
40
40
  export const AUTOMATE_ACTION_ATTEMPT_TRIGGER_CONFIG_SCHEMA = AUTOMATE_AUTOMATION_TRIGGER_CONFIG_SCHEMA;
41
+ export const AUTOMATE_ORGANIZATION_TRIGGER_CONFIG_SCHEMA = z.object({});
42
+ export const AUTOMATE_ACCOUNT_UNHEALTHY_EVENT_SCHEMA = z.object({
43
+ account: z.object({
44
+ connectionMethodId: z.string().min(1),
45
+ id: z.string().min(1),
46
+ label: z.string(),
47
+ serviceId: z.string().min(1),
48
+ }),
49
+ error: z.object({ code: z.string(), message: z.string() }),
50
+ organization: RESOURCE_REFERENCE_SCHEMA,
51
+ transitionedAt: z.date(),
52
+ });
41
53
  export const AUTOMATE_AUTOMATION_STATE_EVENT_SCHEMA = z.object({
42
54
  automation: z.object({
43
55
  description: z.string(),
@@ -192,6 +204,10 @@ export const AUTOMATE_ACTION_INDETERMINATE_EVENT_SCHEMA = AUTOMATE_ACTION_ATTEMP
192
204
  failure: AUTOMATE_ERROR_SCHEMA,
193
205
  });
194
206
  export const automateTriggerContracts = {
207
+ "automate.account.unhealthy": {
208
+ configSchema: AUTOMATE_ORGANIZATION_TRIGGER_CONFIG_SCHEMA,
209
+ eventSchema: AUTOMATE_ACCOUNT_UNHEALTHY_EVENT_SCHEMA,
210
+ },
195
211
  "automate.action.failed": {
196
212
  configSchema: AUTOMATE_ACTION_ATTEMPT_TRIGGER_CONFIG_SCHEMA,
197
213
  eventSchema: AUTOMATE_ACTION_FAILED_EVENT_SCHEMA,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/integration-contracts",
3
- "version": "0.163.2",
3
+ "version": "0.164.0",
4
4
  "description": "Shared integration payload contracts and provider primitives for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.automate.ax",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "@anthropic-ai/sdk": "0.123.0",
68
- "@automate.ax/codec": "0.163.2",
68
+ "@automate.ax/codec": "0.164.0",
69
69
  "@cfworker/json-schema": "^4.1.1",
70
70
  "@googleapis/calendar": "^16.0.0",
71
71
  "@googleapis/forms": "^6.0.1",
@@ -47,6 +47,20 @@ export const AUTOMATE_EXECUTION_TRIGGER_CONFIG_SCHEMA =
47
47
  export const AUTOMATE_ACTION_ATTEMPT_TRIGGER_CONFIG_SCHEMA =
48
48
  AUTOMATE_AUTOMATION_TRIGGER_CONFIG_SCHEMA
49
49
 
50
+ export const AUTOMATE_ORGANIZATION_TRIGGER_CONFIG_SCHEMA = z.object({})
51
+
52
+ export const AUTOMATE_ACCOUNT_UNHEALTHY_EVENT_SCHEMA = z.object({
53
+ account: z.object({
54
+ connectionMethodId: z.string().min(1),
55
+ id: z.string().min(1),
56
+ label: z.string(),
57
+ serviceId: z.string().min(1),
58
+ }),
59
+ error: z.object({ code: z.string(), message: z.string() }),
60
+ organization: RESOURCE_REFERENCE_SCHEMA,
61
+ transitionedAt: z.date(),
62
+ })
63
+
50
64
  export const AUTOMATE_AUTOMATION_STATE_EVENT_SCHEMA = z.object({
51
65
  automation: z.object({
52
66
  description: z.string(),
@@ -231,6 +245,10 @@ export const AUTOMATE_ACTION_INDETERMINATE_EVENT_SCHEMA =
231
245
  })
232
246
 
233
247
  export const automateTriggerContracts = {
248
+ "automate.account.unhealthy": {
249
+ configSchema: AUTOMATE_ORGANIZATION_TRIGGER_CONFIG_SCHEMA,
250
+ eventSchema: AUTOMATE_ACCOUNT_UNHEALTHY_EVENT_SCHEMA,
251
+ },
234
252
  "automate.action.failed": {
235
253
  configSchema: AUTOMATE_ACTION_ATTEMPT_TRIGGER_CONFIG_SCHEMA,
236
254
  eventSchema: AUTOMATE_ACTION_FAILED_EVENT_SCHEMA,