@automate.ax/integration-contracts 0.90.0 → 0.91.1

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.
@@ -330,11 +330,11 @@ export declare const whatsappTriggerContracts: {
330
330
  video: "video";
331
331
  location: "location";
332
332
  system: "system";
333
+ order: "order";
333
334
  reaction: "reaction";
334
335
  button: "button";
335
336
  contacts: "contacts";
336
337
  interactive: "interactive";
337
- order: "order";
338
338
  sticker: "sticker";
339
339
  unsupported: "unsupported";
340
340
  }>;
@@ -425,11 +425,11 @@ export declare const whatsappTriggerContracts: {
425
425
  video: "video";
426
426
  location: "location";
427
427
  system: "system";
428
+ order: "order";
428
429
  reaction: "reaction";
429
430
  button: "button";
430
431
  contacts: "contacts";
431
432
  interactive: "interactive";
432
- order: "order";
433
433
  sticker: "sticker";
434
434
  unsupported: "unsupported";
435
435
  }>;
@@ -96,11 +96,11 @@ export declare const WHATSAPP_WEBHOOK_SCHEMA: z.ZodObject<{
96
96
  video: "video";
97
97
  location: "location";
98
98
  system: "system";
99
+ order: "order";
99
100
  reaction: "reaction";
100
101
  button: "button";
101
102
  contacts: "contacts";
102
103
  interactive: "interactive";
103
- order: "order";
104
104
  sticker: "sticker";
105
105
  unsupported: "unsupported";
106
106
  }>;
@@ -189,11 +189,11 @@ export declare const WHATSAPP_MESSAGE_RECEIVED_EVENT_SCHEMA: z.ZodObject<{
189
189
  video: "video";
190
190
  location: "location";
191
191
  system: "system";
192
+ order: "order";
192
193
  reaction: "reaction";
193
194
  button: "button";
194
195
  contacts: "contacts";
195
196
  interactive: "interactive";
196
- order: "order";
197
197
  sticker: "sticker";
198
198
  unsupported: "unsupported";
199
199
  }>;
@@ -284,11 +284,11 @@ export declare const WHATSAPP_MESSAGE_RECEIVED_EVENT_SCHEMA: z.ZodObject<{
284
284
  video: "video";
285
285
  location: "location";
286
286
  system: "system";
287
+ order: "order";
287
288
  reaction: "reaction";
288
289
  button: "button";
289
290
  contacts: "contacts";
290
291
  interactive: "interactive";
291
- order: "order";
292
292
  sticker: "sticker";
293
293
  unsupported: "unsupported";
294
294
  }>;
@@ -768,7 +768,7 @@ export declare function normalizeWhatsAppWebhook(input: unknown): {
768
768
  message: {
769
769
  id: string;
770
770
  timestamp: string;
771
- type: "unknown" | "text" | "document" | "audio" | "image" | "video" | "location" | "system" | "reaction" | "button" | "contacts" | "interactive" | "order" | "sticker" | "unsupported";
771
+ type: "unknown" | "text" | "document" | "audio" | "image" | "video" | "location" | "system" | "order" | "reaction" | "button" | "contacts" | "interactive" | "sticker" | "unsupported";
772
772
  content?: z.core.util.JSONType | undefined;
773
773
  context?: {
774
774
  messageId: string;
@@ -781,7 +781,7 @@ export declare function normalizeWhatsAppWebhook(input: unknown): {
781
781
  from: string;
782
782
  id: string;
783
783
  timestamp: string;
784
- type: "unknown" | "text" | "document" | "audio" | "image" | "video" | "location" | "system" | "reaction" | "button" | "contacts" | "interactive" | "order" | "sticker" | "unsupported";
784
+ type: "unknown" | "text" | "document" | "audio" | "image" | "video" | "location" | "system" | "order" | "reaction" | "button" | "contacts" | "interactive" | "sticker" | "unsupported";
785
785
  audio?: {
786
786
  id: string;
787
787
  mime_type?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/integration-contracts",
3
- "version": "0.90.0",
3
+ "version": "0.91.1",
4
4
  "description": "Shared integration payload contracts and provider primitives for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,6 +28,7 @@
28
28
  "./google-forms": "./src/google-forms/index.ts",
29
29
  "./google-meet": "./src/google-meet/index.ts",
30
30
  "./github": "./src/github/index.ts",
31
+ "./jobnimbus": "./src/jobnimbus/index.ts",
31
32
  "./linear": "./src/linear/index.ts",
32
33
  "./notion": "./src/notion/index.ts",
33
34
  "./outlook": "./src/outlook/index.ts",
@@ -47,7 +48,7 @@
47
48
  }
48
49
  },
49
50
  "dependencies": {
50
- "@automate.ax/codec": "0.90.0",
51
+ "@automate.ax/codec": "0.91.1",
51
52
  "@cfworker/json-schema": "^4.1.1",
52
53
  "@googleapis/calendar": "^15.0.0",
53
54
  "@googleapis/forms": "^6.0.1",
@@ -148,6 +149,11 @@
148
149
  "types": "./dist/github/index.d.ts",
149
150
  "default": "./dist/github/index.js"
150
151
  },
152
+ "./jobnimbus": {
153
+ "bun": "./src/jobnimbus/index.ts",
154
+ "types": "./dist/jobnimbus/index.d.ts",
155
+ "default": "./dist/jobnimbus/index.js"
156
+ },
151
157
  "./linear": {
152
158
  "bun": "./src/linear/index.ts",
153
159
  "types": "./dist/linear/index.d.ts",
package/src/close/api.ts CHANGED
@@ -29,6 +29,7 @@ interface CloseRequestOptions<TSchema extends z.ZodType> {
29
29
  string,
30
30
  boolean | number | string | readonly string[] | null | undefined
31
31
  >
32
+ responseKeyFormat?: "camelCase" | "provider"
32
33
  responseSchema: TSchema
33
34
  }
34
35
 
@@ -65,7 +66,8 @@ export function getCloseApi(secret: unknown) {
65
66
  *
66
67
  * Query keys are provider-native so callers can use Close's
67
68
  * double-underscore filters. Request bodies and responses use public
68
- * camelCase keys.
69
+ * camelCase keys unless an opaque provider response must retain exact
70
+ * keys.
69
71
  *
70
72
  * @param path - Relative path below Close's API root.
71
73
  * @param options - Request method, query, body, and response schema.
@@ -118,8 +120,9 @@ export function getCloseApi(secret: unknown) {
118
120
  method: options.method ?? "GET",
119
121
  })
120
122
  const text = await response.text()
123
+ const parsed = text ? parseJson(text) : null
121
124
  const result = CLOSE_RESPONSE_SCHEMA.safeParse(
122
- fromClose(text ? parseJson(text) : null),
125
+ options.responseKeyFormat === "provider" ? parsed : fromClose(parsed),
123
126
  )
124
127
  if (!response.ok || !result.success) {
125
128
  throw new CloseApiError(
@@ -161,11 +161,19 @@ export type GitHubCheckRunNeutralEvent = GitHubCheckRunCompletedEvent & {
161
161
  conclusion: "neutral"
162
162
  }
163
163
  }
164
- export type GitHubCheckRunPendingEvent = GitHubCheckRunCompletedEvent & {
165
- check_run: GitHubCheckRunCompletedEvent["check_run"] & {
166
- conclusion: "pending"
167
- }
168
- }
164
+ export type GitHubCheckRunPendingEvent =
165
+ | (GitHubCheckRunCreatedEvent & {
166
+ check_run: GitHubCheckRunCreatedEvent["check_run"] & {
167
+ conclusion: null
168
+ status: "pending"
169
+ }
170
+ })
171
+ | (GitHubCheckRunCompletedEvent & {
172
+ check_run: GitHubCheckRunCompletedEvent["check_run"] & {
173
+ conclusion: "pending"
174
+ status: "completed"
175
+ }
176
+ })
169
177
  export type GitHubCheckRunSkippedEvent = GitHubCheckRunCompletedEvent & {
170
178
  check_run: GitHubCheckRunCompletedEvent["check_run"] & {
171
179
  conclusion: "skipped"
@@ -176,11 +184,19 @@ export type GitHubCheckRunStaleEvent = GitHubCheckRunCompletedEvent & {
176
184
  conclusion: "stale"
177
185
  }
178
186
  }
179
- export type GitHubCheckRunWaitingEvent = GitHubCheckRunCompletedEvent & {
180
- check_run: GitHubCheckRunCompletedEvent["check_run"] & {
181
- conclusion: "waiting"
182
- }
183
- }
187
+ export type GitHubCheckRunWaitingEvent =
188
+ | (GitHubCheckRunCreatedEvent & {
189
+ check_run: GitHubCheckRunCreatedEvent["check_run"] & {
190
+ conclusion: null
191
+ status: "waiting"
192
+ }
193
+ })
194
+ | (GitHubCheckRunCompletedEvent & {
195
+ check_run: GitHubCheckRunCompletedEvent["check_run"] & {
196
+ conclusion: "waiting"
197
+ status: "completed"
198
+ }
199
+ })
184
200
 
185
201
  /** Official GitHub check-suite webhook payload union. */
186
202
  export type GitHubCheckSuiteEvent = GitHubWebhookPayload<
@@ -671,7 +687,12 @@ export const GITHUB_CHECK_RUN_PENDING_EVENT_SCHEMA: GitHubWebhookSchema<GitHubCh
671
687
  githubSemanticEventSchema<GitHubCheckRunEvent, GitHubCheckRunPendingEvent>(
672
688
  GITHUB_CHECK_RUN_EVENT_SCHEMA,
673
689
  (event) =>
674
- event.action === "completed" && event.check_run.conclusion === "pending",
690
+ (event.action === "created" &&
691
+ event.check_run.status === "pending" &&
692
+ event.check_run.conclusion === null) ||
693
+ (event.action === "completed" &&
694
+ event.check_run.status === "completed" &&
695
+ event.check_run.conclusion === "pending"),
675
696
  )
676
697
  export const GITHUB_CHECK_RUN_SKIPPED_EVENT_SCHEMA: GitHubWebhookSchema<GitHubCheckRunSkippedEvent> =
677
698
  githubSemanticEventSchema<GitHubCheckRunEvent, GitHubCheckRunSkippedEvent>(
@@ -689,7 +710,12 @@ export const GITHUB_CHECK_RUN_WAITING_EVENT_SCHEMA: GitHubWebhookSchema<GitHubCh
689
710
  githubSemanticEventSchema<GitHubCheckRunEvent, GitHubCheckRunWaitingEvent>(
690
711
  GITHUB_CHECK_RUN_EVENT_SCHEMA,
691
712
  (event) =>
692
- event.action === "completed" && event.check_run.conclusion === "waiting",
713
+ (event.action === "created" &&
714
+ event.check_run.status === "waiting" &&
715
+ event.check_run.conclusion === null) ||
716
+ (event.action === "completed" &&
717
+ event.check_run.status === "completed" &&
718
+ event.check_run.conclusion === "waiting"),
693
719
  )
694
720
 
695
721
  export const GITHUB_CHECK_SUITE_EVENT_SCHEMA: GitHubWebhookSchema<GitHubCheckSuiteEvent> =
@@ -611,7 +611,7 @@ export type components = {
611
611
  * @example queued
612
612
  * @enum {string}
613
613
  */
614
- status: "queued" | "in_progress" | "completed" | "pending";
614
+ status: "queued" | "in_progress" | "completed" | "pending" | "requested" | "waiting";
615
615
  /** @example https://api.github.com/repos/github/hello-world/check-runs/4 */
616
616
  url: string;
617
617
  };