@zapier/zapier-sdk 0.16.3 → 0.17.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 79b47f7: Renaming user_id to profile_id in authentications.
8
+
3
9
  ## 0.16.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1458,7 +1458,7 @@ function normalizeAuthenticationItem(auth, options = {}) {
1458
1458
  }
1459
1459
  const {
1460
1460
  selected_api: selectedApi,
1461
- customuser_id: userId,
1461
+ customuser_id: profileId,
1462
1462
  ...restOfAuth
1463
1463
  } = auth;
1464
1464
  return {
@@ -1476,8 +1476,8 @@ function normalizeAuthenticationItem(auth, options = {}) {
1476
1476
  // App key from implementations endpoint or parsed from selected_api
1477
1477
  app_version: appVersion,
1478
1478
  // Version from selected_api or provided
1479
- user_id: userId
1480
- // Map customuser_id to user_id
1479
+ profile_id: profileId
1480
+ // Map customuser_id to profile_id
1481
1481
  };
1482
1482
  }
1483
1483
  function normalizeActionItem(action) {
@@ -2249,7 +2249,8 @@ var AuthenticationItemSchema = withFormatter(
2249
2249
  // App key from implementations endpoint
2250
2250
  app_version: zod.z.string().optional(),
2251
2251
  // Version extracted from implementation_id
2252
- user_id: zod.z.number().optional()
2252
+ profile_id: zod.z.number().optional()
2253
+ // Mapped from customuser_id
2253
2254
  }
2254
2255
  ),
2255
2256
  {
@@ -2500,7 +2501,7 @@ var AuthenticationItemSchema2 = AuthenticationSchema2.omit({
2500
2501
  }).extend({
2501
2502
  // Renamed fields
2502
2503
  implementation_id: zod.z.string().optional(),
2503
- user_id: zod.z.number().optional(),
2504
+ profile_id: zod.z.number().optional(),
2504
2505
  // Mapped fields (originals preserved in ...restOfAuth)
2505
2506
  is_expired: zod.z.string().optional(),
2506
2507
  expired_at: zod.z.string().nullable().optional(),
@@ -3861,7 +3862,7 @@ function normalizeAuthenticationItem2(auth, options = {}) {
3861
3862
  }
3862
3863
  const {
3863
3864
  selected_api: selectedApi,
3864
- customuser_id: userId,
3865
+ customuser_id: profileId,
3865
3866
  ...restOfAuth
3866
3867
  } = auth;
3867
3868
  return {
@@ -3879,8 +3880,8 @@ function normalizeAuthenticationItem2(auth, options = {}) {
3879
3880
  // App key from implementations endpoint or parsed from selected_api
3880
3881
  app_version: appVersion,
3881
3882
  // Version from selected_api or provided
3882
- user_id: userId
3883
- // Map customuser_id to user_id
3883
+ profile_id: profileId
3884
+ // Map customuser_id to profile_id
3884
3885
  };
3885
3886
  }
3886
3887
 
@@ -5032,7 +5033,7 @@ function getCpuTime() {
5032
5033
 
5033
5034
  // package.json
5034
5035
  var package_default = {
5035
- version: "0.16.3"};
5036
+ version: "0.17.0"};
5036
5037
 
5037
5038
  // src/plugins/eventEmission/builders.ts
5038
5039
  function createBaseEvent(context = {}) {
package/dist/index.d.mts CHANGED
@@ -1180,7 +1180,7 @@ declare const GetAuthenticationResponseSchema: z.ZodObject<{
1180
1180
  members: z.ZodOptional<z.ZodString>;
1181
1181
  permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
1182
1182
  implementation_id: z.ZodOptional<z.ZodString>;
1183
- user_id: z.ZodOptional<z.ZodNumber>;
1183
+ profile_id: z.ZodOptional<z.ZodNumber>;
1184
1184
  is_expired: z.ZodOptional<z.ZodString>;
1185
1185
  expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1186
1186
  app_key: z.ZodOptional<z.ZodString>;
@@ -1990,7 +1990,7 @@ declare const AuthenticationItemSchema: z.ZodObject<{
1990
1990
  expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1991
1991
  app_key: z.ZodOptional<z.ZodString>;
1992
1992
  app_version: z.ZodOptional<z.ZodString>;
1993
- user_id: z.ZodOptional<z.ZodNumber>;
1993
+ profile_id: z.ZodOptional<z.ZodNumber>;
1994
1994
  }, z.core.$strip>;
1995
1995
  declare const AuthItemSchema: z.ZodObject<{
1996
1996
  url: z.ZodOptional<z.ZodString>;
@@ -2016,7 +2016,7 @@ declare const AuthItemSchema: z.ZodObject<{
2016
2016
  expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2017
2017
  app_key: z.ZodOptional<z.ZodString>;
2018
2018
  app_version: z.ZodOptional<z.ZodString>;
2019
- user_id: z.ZodOptional<z.ZodNumber>;
2019
+ profile_id: z.ZodOptional<z.ZodNumber>;
2020
2020
  }, z.core.$strip>;
2021
2021
  type AuthItem = z.infer<typeof AuthItemSchema>;
2022
2022
 
package/dist/index.mjs CHANGED
@@ -1436,7 +1436,7 @@ function normalizeAuthenticationItem(auth, options = {}) {
1436
1436
  }
1437
1437
  const {
1438
1438
  selected_api: selectedApi,
1439
- customuser_id: userId,
1439
+ customuser_id: profileId,
1440
1440
  ...restOfAuth
1441
1441
  } = auth;
1442
1442
  return {
@@ -1454,8 +1454,8 @@ function normalizeAuthenticationItem(auth, options = {}) {
1454
1454
  // App key from implementations endpoint or parsed from selected_api
1455
1455
  app_version: appVersion,
1456
1456
  // Version from selected_api or provided
1457
- user_id: userId
1458
- // Map customuser_id to user_id
1457
+ profile_id: profileId
1458
+ // Map customuser_id to profile_id
1459
1459
  };
1460
1460
  }
1461
1461
  function normalizeActionItem(action) {
@@ -2227,7 +2227,8 @@ var AuthenticationItemSchema = withFormatter(
2227
2227
  // App key from implementations endpoint
2228
2228
  app_version: z.string().optional(),
2229
2229
  // Version extracted from implementation_id
2230
- user_id: z.number().optional()
2230
+ profile_id: z.number().optional()
2231
+ // Mapped from customuser_id
2231
2232
  }
2232
2233
  ),
2233
2234
  {
@@ -2478,7 +2479,7 @@ var AuthenticationItemSchema2 = AuthenticationSchema2.omit({
2478
2479
  }).extend({
2479
2480
  // Renamed fields
2480
2481
  implementation_id: z.string().optional(),
2481
- user_id: z.number().optional(),
2482
+ profile_id: z.number().optional(),
2482
2483
  // Mapped fields (originals preserved in ...restOfAuth)
2483
2484
  is_expired: z.string().optional(),
2484
2485
  expired_at: z.string().nullable().optional(),
@@ -3839,7 +3840,7 @@ function normalizeAuthenticationItem2(auth, options = {}) {
3839
3840
  }
3840
3841
  const {
3841
3842
  selected_api: selectedApi,
3842
- customuser_id: userId,
3843
+ customuser_id: profileId,
3843
3844
  ...restOfAuth
3844
3845
  } = auth;
3845
3846
  return {
@@ -3857,8 +3858,8 @@ function normalizeAuthenticationItem2(auth, options = {}) {
3857
3858
  // App key from implementations endpoint or parsed from selected_api
3858
3859
  app_version: appVersion,
3859
3860
  // Version from selected_api or provided
3860
- user_id: userId
3861
- // Map customuser_id to user_id
3861
+ profile_id: profileId
3862
+ // Map customuser_id to profile_id
3862
3863
  };
3863
3864
  }
3864
3865
 
@@ -5010,7 +5011,7 @@ function getCpuTime() {
5010
5011
 
5011
5012
  // package.json
5012
5013
  var package_default = {
5013
- version: "0.16.3"};
5014
+ version: "0.17.0"};
5014
5015
 
5015
5016
  // src/plugins/eventEmission/builders.ts
5016
5017
  function createBaseEvent(context = {}) {
@@ -582,7 +582,7 @@ describe("listAuthentications plugin", () => {
582
582
  expect(auth.date).toBe("2021-01-01");
583
583
  expect(auth.lastchanged).toBe("2021-01-02");
584
584
  expect(auth.account_id).toBe(456);
585
- expect(auth.user_id).toBe(789);
585
+ expect(auth.profile_id).toBe(789);
586
586
  expect(auth.implementation_id).toBe("SlackCLIAPI@1.21.1");
587
587
  expect(auth.destination_selected_api).toBe("SlackDestAPI@1.0.0");
588
588
  expect(auth.is_invite_only).toBe(true);
@@ -23,7 +23,7 @@ export declare const AuthenticationItemSchema: z.ZodObject<{
23
23
  expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
24
  app_key: z.ZodOptional<z.ZodString>;
25
25
  app_version: z.ZodOptional<z.ZodString>;
26
- user_id: z.ZodOptional<z.ZodNumber>;
26
+ profile_id: z.ZodOptional<z.ZodNumber>;
27
27
  }, z.core.$strip>;
28
28
  export declare const AuthItemSchema: z.ZodObject<{
29
29
  url: z.ZodOptional<z.ZodString>;
@@ -49,7 +49,7 @@ export declare const AuthItemSchema: z.ZodObject<{
49
49
  expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
50
  app_key: z.ZodOptional<z.ZodString>;
51
51
  app_version: z.ZodOptional<z.ZodString>;
52
- user_id: z.ZodOptional<z.ZodNumber>;
52
+ profile_id: z.ZodOptional<z.ZodNumber>;
53
53
  }, z.core.$strip>;
54
54
  export type AuthItem = z.infer<typeof AuthItemSchema>;
55
55
  //# sourceMappingURL=Auth.d.ts.map
@@ -10,7 +10,7 @@ export const AuthenticationItemSchema = withFormatter(AuthenticationSchema.omit(
10
10
  expired_at: z.string().nullable().optional(), // Mapped from marked_stale_at
11
11
  app_key: z.string().optional(), // App key from implementations endpoint
12
12
  app_version: z.string().optional(), // Version extracted from implementation_id
13
- user_id: z.number().optional(),
13
+ profile_id: z.number().optional(), // Mapped from customuser_id
14
14
  }), {
15
15
  format: (item) => {
16
16
  const details = [];
@@ -100,7 +100,7 @@ describe("handleGetAuthentication", () => {
100
100
  title: "My Slack Workspace",
101
101
  app_key: "SlackCLIAPI",
102
102
  app_version: "1.21.1",
103
- user_id: undefined, // customuser_id wasn't in mock data
103
+ profile_id: undefined, // customuser_id wasn't in mock data
104
104
  is_stale: "false", // Original field preserved
105
105
  marked_stale_at: null, // Original field preserved
106
106
  });
@@ -226,7 +226,7 @@ describe("handleGetAuthentication", () => {
226
226
  expect(auth.date).toBe("2021-01-01");
227
227
  expect(auth.lastchanged).toBe("2021-01-02");
228
228
  expect(auth.account_id).toBe(456);
229
- expect(auth.user_id).toBe(789);
229
+ expect(auth.profile_id).toBe(789);
230
230
  expect(auth.implementation_id).toBe("SlackCLIAPI@1.21.1");
231
231
  expect(auth.destination_selected_api).toBe("SlackDestAPI@1.0.0");
232
232
  expect(auth.is_invite_only).toBe(true);
@@ -57,7 +57,7 @@ export type Authentication = z.infer<typeof AuthenticationSchema>;
57
57
  *
58
58
  * Transforms API response fields:
59
59
  * - selected_api → implementation_id
60
- * - customuser_id → user_id
60
+ * - customuser_id → profile_id
61
61
  * - is_stale → is_expired (preserved as is_stale too)
62
62
  * - marked_stale_at → expired_at (preserved as marked_stale_at too)
63
63
  *
@@ -85,7 +85,7 @@ export declare const AuthenticationItemSchema: z.ZodObject<{
85
85
  groups: z.ZodOptional<z.ZodString>;
86
86
  permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
87
87
  implementation_id: z.ZodOptional<z.ZodString>;
88
- user_id: z.ZodOptional<z.ZodNumber>;
88
+ profile_id: z.ZodOptional<z.ZodNumber>;
89
89
  is_expired: z.ZodOptional<z.ZodString>;
90
90
  expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
91
  app_key: z.ZodOptional<z.ZodString>;
@@ -139,7 +139,7 @@ export declare const GetAuthenticationResponseSchema: z.ZodObject<{
139
139
  groups: z.ZodOptional<z.ZodString>;
140
140
  permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
141
141
  implementation_id: z.ZodOptional<z.ZodString>;
142
- user_id: z.ZodOptional<z.ZodNumber>;
142
+ profile_id: z.ZodOptional<z.ZodNumber>;
143
143
  is_expired: z.ZodOptional<z.ZodString>;
144
144
  expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
145
145
  app_key: z.ZodOptional<z.ZodString>;
@@ -35,7 +35,7 @@ export const AuthenticationsResponseSchema = z.object({
35
35
  *
36
36
  * Transforms API response fields:
37
37
  * - selected_api → implementation_id
38
- * - customuser_id → user_id
38
+ * - customuser_id → profile_id
39
39
  * - is_stale → is_expired (preserved as is_stale too)
40
40
  * - marked_stale_at → expired_at (preserved as marked_stale_at too)
41
41
  *
@@ -49,7 +49,7 @@ export const AuthenticationItemSchema = AuthenticationSchema.omit({
49
49
  }).extend({
50
50
  // Renamed fields
51
51
  implementation_id: z.string().optional(),
52
- user_id: z.number().optional(),
52
+ profile_id: z.number().optional(),
53
53
  // Mapped fields (originals preserved in ...restOfAuth)
54
54
  is_expired: z.string().optional(),
55
55
  expired_at: z.string().nullable().optional(),
@@ -58,7 +58,7 @@ export function normalizeAuthenticationItem(auth, options = {}) {
58
58
  appVersion = extractedVersion;
59
59
  }
60
60
  }
61
- const { selected_api: selectedApi, customuser_id: userId, ...restOfAuth } = auth;
61
+ const { selected_api: selectedApi, customuser_id: profileId, ...restOfAuth } = auth;
62
62
  return {
63
63
  ...restOfAuth, // Pass through all other API response fields except selected_api
64
64
  implementation_id: selectedApi, // Rename selected_api to implementation_id
@@ -67,6 +67,6 @@ export function normalizeAuthenticationItem(auth, options = {}) {
67
67
  expired_at: auth.marked_stale_at, // Map marked_stale_at to expired_at
68
68
  app_key: appKey, // App key from implementations endpoint or parsed from selected_api
69
69
  app_version: appVersion, // Version from selected_api or provided
70
- user_id: userId, // Map customuser_id to user_id
70
+ profile_id: profileId, // Map customuser_id to profile_id
71
71
  };
72
72
  }
@@ -61,7 +61,7 @@ export function normalizeAuthenticationItem(auth, options = {}) {
61
61
  appVersion = extractedVersion;
62
62
  }
63
63
  }
64
- const { selected_api: selectedApi, customuser_id: userId, ...restOfAuth } = auth;
64
+ const { selected_api: selectedApi, customuser_id: profileId, ...restOfAuth } = auth;
65
65
  return {
66
66
  ...restOfAuth, // Pass through all other API response fields except selected_api
67
67
  implementation_id: selectedApi, // Rename selected_api to implementation_id
@@ -70,7 +70,7 @@ export function normalizeAuthenticationItem(auth, options = {}) {
70
70
  expired_at: auth.marked_stale_at, // Map marked_stale_at to expired_at
71
71
  app_key: appKey, // App key from implementations endpoint or parsed from selected_api
72
72
  app_version: appVersion, // Version from selected_api or provided
73
- user_id: userId, // Map customuser_id to user_id
73
+ profile_id: profileId, // Map customuser_id to profile_id
74
74
  };
75
75
  }
76
76
  export function normalizeActionItem(action) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk",
3
- "version": "0.16.3",
3
+ "version": "0.17.0",
4
4
  "description": "Complete Zapier SDK - combines all Zapier SDK packages",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",