@automate.ax/integration-contracts 0.143.5 → 0.143.9

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.
@@ -212,14 +212,14 @@ export declare const CLICKUP_TIME_ENTRY_SCHEMA: z.ZodObject<{
212
212
  }, z.core.$strip>>>;
213
213
  source: z.ZodOptional<z.ZodString>;
214
214
  tags: z.ZodPrefault<z.ZodArray<z.ZodJSONSchema>>;
215
- taskLocation: z.ZodOptional<z.ZodObject<{
215
+ taskLocation: z.ZodPreprocess<z.ZodOptional<z.ZodObject<{
216
216
  folderId: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<string, string | number>>;
217
217
  folderName: z.ZodOptional<z.ZodString>;
218
218
  listId: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<string, string | number>>;
219
219
  listName: z.ZodOptional<z.ZodString>;
220
220
  spaceId: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<string, string | number>>;
221
221
  spaceName: z.ZodOptional<z.ZodString>;
222
- }, z.core.$strip>>;
222
+ }, z.core.$strip>>>;
223
223
  taskTags: z.ZodPrefault<z.ZodArray<z.ZodObject<{
224
224
  creator: z.ZodOptional<z.ZodNumber>;
225
225
  name: z.ZodString;
@@ -141,7 +141,12 @@ export const CLICKUP_TIME_ENTRY_SCHEMA = z.object({
141
141
  .optional(),
142
142
  source: z.string().optional(),
143
143
  tags: z.json().array().prefault([]),
144
- taskLocation: z
144
+ taskLocation: z.preprocess((value) => value !== null &&
145
+ typeof value === "object" &&
146
+ !Array.isArray(value) &&
147
+ Object.keys(value).length === 0
148
+ ? undefined
149
+ : value, z
145
150
  .object({
146
151
  folderId: z.union([z.number(), z.string()]).transform(String),
147
152
  folderName: z.string().optional(),
@@ -150,7 +155,7 @@ export const CLICKUP_TIME_ENTRY_SCHEMA = z.object({
150
155
  spaceId: z.union([z.number(), z.string()]).transform(String),
151
156
  spaceName: z.string().optional(),
152
157
  })
153
- .optional(),
158
+ .optional()),
154
159
  taskTags: z
155
160
  .object({
156
161
  creator: z.number().int().optional(),
@@ -59,7 +59,7 @@ export function getGoogleAdsApi(secret) {
59
59
  }
60
60
  const headers = new Headers({
61
61
  Accept: "application/json",
62
- Authorization: `${credentials.tokenType} ${credentials.accessToken}`,
62
+ Authorization: `Bearer ${credentials.accessToken}`,
63
63
  "developer-token": credentials.developerToken,
64
64
  });
65
65
  if (options.loginCustomerId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/integration-contracts",
3
- "version": "0.143.5",
3
+ "version": "0.143.9",
4
4
  "description": "Shared integration payload contracts and provider primitives for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "@anthropic-ai/sdk": "0.123.0",
68
- "@automate.ax/codec": "0.143.5",
68
+ "@automate.ax/codec": "0.143.9",
69
69
  "@cfworker/json-schema": "^4.1.1",
70
70
  "@googleapis/calendar": "^16.0.0",
71
71
  "@googleapis/forms": "^6.0.1",
@@ -169,16 +169,25 @@ export const CLICKUP_TIME_ENTRY_SCHEMA = z.object({
169
169
  .optional(),
170
170
  source: z.string().optional(),
171
171
  tags: z.json().array().prefault([]),
172
- taskLocation: z
173
- .object({
174
- folderId: z.union([z.number(), z.string()]).transform(String),
175
- folderName: z.string().optional(),
176
- listId: z.union([z.number(), z.string()]).transform(String),
177
- listName: z.string().optional(),
178
- spaceId: z.union([z.number(), z.string()]).transform(String),
179
- spaceName: z.string().optional(),
180
- })
181
- .optional(),
172
+ taskLocation: z.preprocess(
173
+ (value) =>
174
+ value !== null &&
175
+ typeof value === "object" &&
176
+ !Array.isArray(value) &&
177
+ Object.keys(value).length === 0
178
+ ? undefined
179
+ : value,
180
+ z
181
+ .object({
182
+ folderId: z.union([z.number(), z.string()]).transform(String),
183
+ folderName: z.string().optional(),
184
+ listId: z.union([z.number(), z.string()]).transform(String),
185
+ listName: z.string().optional(),
186
+ spaceId: z.union([z.number(), z.string()]).transform(String),
187
+ spaceName: z.string().optional(),
188
+ })
189
+ .optional(),
190
+ ),
182
191
  taskTags: z
183
192
  .object({
184
193
  creator: z.number().int().optional(),
@@ -96,7 +96,7 @@ export function getGoogleAdsApi(secret: unknown) {
96
96
 
97
97
  const headers = new Headers({
98
98
  Accept: "application/json",
99
- Authorization: `${credentials.tokenType} ${credentials.accessToken}`,
99
+ Authorization: `Bearer ${credentials.accessToken}`,
100
100
  "developer-token": credentials.developerToken,
101
101
  })
102
102
  if (options.loginCustomerId) {