@zapier/zapier-sdk 0.13.4 → 0.13.6

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/dist/index.mjs CHANGED
@@ -2825,8 +2825,15 @@ var manifestPlugin = (params) => {
2825
2825
  if (!resolvedApp) return null;
2826
2826
  return `${resolvedApp.implementationName}@${resolvedApp.version || "latest"}`;
2827
2827
  };
2828
- const updateManifestEntry = async (appKey, entry, configPath = DEFAULT_CONFIG_PATH) => {
2829
- const manifest2 = await readManifestFromFile(configPath) || { apps: {} };
2828
+ const updateManifestEntry = async (options2) => {
2829
+ const {
2830
+ appKey,
2831
+ entry,
2832
+ configPath = DEFAULT_CONFIG_PATH,
2833
+ skipWrite = false,
2834
+ manifest: inputManifest
2835
+ } = options2;
2836
+ const manifest2 = inputManifest || await readManifestFromFile(configPath) || { apps: {} };
2830
2837
  let existingEntry = findManifestEntry({
2831
2838
  appKey,
2832
2839
  manifest: manifest2
@@ -2857,10 +2864,18 @@ var manifestPlugin = (params) => {
2857
2864
  api
2858
2865
  });
2859
2866
  }
2860
- manifest2.apps[manifestKey] = entry;
2861
- await writeManifestToFile(manifest2, configPath);
2862
- resolvedManifest = void 0;
2863
- return [manifestKey, entry];
2867
+ const updatedManifest = {
2868
+ ...manifest2,
2869
+ apps: {
2870
+ ...manifest2.apps,
2871
+ [manifestKey]: entry
2872
+ }
2873
+ };
2874
+ if (!skipWrite) {
2875
+ await writeManifestToFile(updatedManifest, configPath);
2876
+ resolvedManifest = void 0;
2877
+ }
2878
+ return [manifestKey, entry, updatedManifest];
2864
2879
  };
2865
2880
  return {
2866
2881
  context: {
@@ -3963,7 +3978,7 @@ function getCpuTime() {
3963
3978
 
3964
3979
  // package.json
3965
3980
  var package_default = {
3966
- version: "0.13.4"};
3981
+ version: "0.13.6"};
3967
3982
 
3968
3983
  // src/plugins/eventEmission/builders.ts
3969
3984
  function createBaseEvent(context = {}) {
@@ -9,17 +9,17 @@ export declare const FetchInitSchema: z.ZodOptional<z.ZodObject<{
9
9
  authenticationTemplate: z.ZodOptional<z.ZodString>;
10
10
  }, "strip", z.ZodTypeAny, {
11
11
  method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
12
- authenticationId?: number | undefined;
12
+ headers?: Record<string, string> | undefined;
13
13
  body?: string | FormData | URLSearchParams | undefined;
14
+ authenticationId?: number | undefined;
14
15
  callbackUrl?: string | undefined;
15
16
  authenticationTemplate?: string | undefined;
16
- headers?: Record<string, string> | undefined;
17
17
  }, {
18
18
  method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
19
- authenticationId?: number | undefined;
19
+ headers?: Record<string, string> | undefined;
20
20
  body?: string | FormData | URLSearchParams | undefined;
21
+ authenticationId?: number | undefined;
21
22
  callbackUrl?: string | undefined;
22
23
  authenticationTemplate?: string | undefined;
23
- headers?: Record<string, string> | undefined;
24
24
  }>>;
25
25
  //# sourceMappingURL=schemas.d.ts.map
@@ -9,11 +9,11 @@ export declare const GetActionSchema: z.ZodObject<{
9
9
  actionKey: z.ZodString;
10
10
  }, "strip", z.ZodTypeAny, {
11
11
  appKey: string;
12
- actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
12
+ actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
13
13
  actionKey: string;
14
14
  }, {
15
15
  appKey: string;
16
- actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
16
+ actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
17
17
  actionKey: string;
18
18
  }>;
19
19
  export type GetActionOptions = z.infer<typeof GetActionSchema>;
@@ -70,7 +70,9 @@ describe("listActions plugin", () => {
70
70
  manifest: null,
71
71
  getVersionedImplementationId: mockGetVersionedImplementationId,
72
72
  resolveAppKeys: mockResolveAppKeys,
73
- updateManifestEntry: vi.fn().mockResolvedValue(["test-key", {}]),
73
+ updateManifestEntry: vi
74
+ .fn()
75
+ .mockResolvedValue(["test-key", {}, { apps: {} }]),
74
76
  },
75
77
  }))
76
78
  .addPlugin(listAppsPlugin)
@@ -12,16 +12,16 @@ export declare const ListActionsSchema: z.ZodObject<{
12
12
  cursor: z.ZodOptional<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  appKey: string;
15
- actionType?: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write" | undefined;
16
- pageSize?: number | undefined;
17
- maxItems?: number | undefined;
18
15
  cursor?: string | undefined;
16
+ maxItems?: number | undefined;
17
+ pageSize?: number | undefined;
18
+ actionType?: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write" | undefined;
19
19
  }, {
20
20
  appKey: string;
21
- actionType?: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write" | undefined;
22
- pageSize?: number | undefined;
23
- maxItems?: number | undefined;
24
21
  cursor?: string | undefined;
22
+ maxItems?: number | undefined;
23
+ pageSize?: number | undefined;
24
+ actionType?: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write" | undefined;
25
25
  }>;
26
26
  export type ListActionsOptions = z.infer<typeof ListActionsSchema>;
27
27
  export interface ListActionsPage {
@@ -15,16 +15,16 @@ export declare const ListAppsSchema: z.ZodObject<{
15
15
  cursor: z.ZodOptional<z.ZodString>;
16
16
  }, "strip", z.ZodTypeAny, {
17
17
  search?: string | undefined;
18
- pageSize?: number | undefined;
19
- maxItems?: number | undefined;
20
- cursor?: string | undefined;
21
18
  appKeys?: string[] | undefined;
19
+ cursor?: string | undefined;
20
+ maxItems?: number | undefined;
21
+ pageSize?: number | undefined;
22
22
  }, {
23
23
  search?: string | undefined;
24
- pageSize?: number | undefined;
25
- maxItems?: number | undefined;
26
- cursor?: string | undefined;
27
24
  appKeys?: string[] | undefined;
25
+ cursor?: string | undefined;
26
+ maxItems?: number | undefined;
27
+ pageSize?: number | undefined;
28
28
  }>;
29
29
  export type ListAppsOptions = z.infer<typeof ListAppsSchema>;
30
30
  export interface ListAppsSdkFunction {
@@ -58,7 +58,9 @@ describe("listAuthentications plugin", () => {
58
58
  manifest: null,
59
59
  getVersionedImplementationId: mockGetVersionedImplementationId,
60
60
  resolveAppKeys: mockResolveAppKeys,
61
- updateManifestEntry: vi.fn().mockResolvedValue(["test-key", {}]),
61
+ updateManifestEntry: vi
62
+ .fn()
63
+ .mockResolvedValue(["test-key", {}, { apps: {} }]),
62
64
  },
63
65
  });
64
66
  function createTestSdk() {
@@ -18,9 +18,9 @@ export declare const ListAuthenticationsSchema: z.ZodObject<{
18
18
  search?: string | undefined;
19
19
  title?: string | undefined;
20
20
  appKey?: string | undefined;
21
- pageSize?: number | undefined;
22
- maxItems?: number | undefined;
23
21
  cursor?: string | undefined;
22
+ maxItems?: number | undefined;
23
+ pageSize?: number | undefined;
24
24
  accountId?: string | undefined;
25
25
  owner?: string | undefined;
26
26
  authenticationIds?: string[] | undefined;
@@ -28,9 +28,9 @@ export declare const ListAuthenticationsSchema: z.ZodObject<{
28
28
  search?: string | undefined;
29
29
  title?: string | undefined;
30
30
  appKey?: string | undefined;
31
- pageSize?: number | undefined;
32
- maxItems?: number | undefined;
33
31
  cursor?: string | undefined;
32
+ maxItems?: number | undefined;
33
+ pageSize?: number | undefined;
34
34
  accountId?: string | undefined;
35
35
  owner?: string | undefined;
36
36
  authenticationIds?: string[] | undefined;
@@ -33,26 +33,26 @@ export declare const ListInputFieldChoicesSchema: z.ZodObject<{
33
33
  cursor: z.ZodOptional<z.ZodString>;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  appKey: string;
36
- actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
36
+ actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
37
37
  actionKey: string;
38
38
  inputFieldKey: string;
39
39
  page?: number | undefined;
40
+ cursor?: string | undefined;
41
+ maxItems?: number | undefined;
42
+ pageSize?: number | undefined;
40
43
  authenticationId?: number | null | undefined;
41
44
  inputs?: Record<string, unknown> | undefined;
42
- pageSize?: number | undefined;
43
- maxItems?: number | undefined;
44
- cursor?: string | undefined;
45
45
  }, {
46
46
  appKey: string;
47
- actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
47
+ actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
48
48
  actionKey: string;
49
49
  inputFieldKey: string;
50
50
  page?: number | undefined;
51
+ cursor?: string | undefined;
52
+ maxItems?: number | undefined;
53
+ pageSize?: number | undefined;
51
54
  authenticationId?: number | null | undefined;
52
55
  inputs?: Record<string, unknown> | undefined;
53
- pageSize?: number | undefined;
54
- maxItems?: number | undefined;
55
- cursor?: string | undefined;
56
56
  }>;
57
57
  export type ListInputFieldChoicesOptions = z.infer<typeof ListInputFieldChoicesSchema>;
58
58
  export type ListInputFieldChoicesError = ZapierConfigurationError | ZapierApiError | ZapierAuthenticationError | ZapierAppNotFoundError | ZapierValidationError | ZapierUnknownError;
@@ -15,22 +15,22 @@ export declare const ListInputFieldsSchema: z.ZodObject<{
15
15
  cursor: z.ZodOptional<z.ZodString>;
16
16
  }, "strip", z.ZodTypeAny, {
17
17
  appKey: string;
18
- actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
18
+ actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
19
19
  actionKey: string;
20
+ cursor?: string | undefined;
21
+ maxItems?: number | undefined;
22
+ pageSize?: number | undefined;
20
23
  authenticationId?: number | null | undefined;
21
24
  inputs?: Record<string, unknown> | undefined;
22
- pageSize?: number | undefined;
23
- maxItems?: number | undefined;
24
- cursor?: string | undefined;
25
25
  }, {
26
26
  appKey: string;
27
- actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
27
+ actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
28
28
  actionKey: string;
29
+ cursor?: string | undefined;
30
+ maxItems?: number | undefined;
31
+ pageSize?: number | undefined;
29
32
  authenticationId?: number | null | undefined;
30
33
  inputs?: Record<string, unknown> | undefined;
31
- pageSize?: number | undefined;
32
- maxItems?: number | undefined;
33
- cursor?: string | undefined;
34
34
  }>;
35
35
  export type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema>;
36
36
  export type ListInputFieldsError = ZapierConfigurationError | ZapierApiError | ZapierAuthenticationError | ZapierAppNotFoundError | ZapierValidationError | ZapierUnknownError;
@@ -3,11 +3,18 @@ import type { Plugin } from "../../types/plugin";
3
3
  import type { z } from "zod";
4
4
  import type { ApiClient } from "../../api";
5
5
  export type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;
6
+ export interface UpdateManifestEntryOptions {
7
+ appKey: string;
8
+ entry: ManifestEntry;
9
+ configPath?: string;
10
+ skipWrite?: boolean;
11
+ manifest?: Manifest;
12
+ }
6
13
  export interface ManifestPluginProvides {
7
14
  context: {
8
15
  getVersionedImplementationId: GetVersionedImplementationId;
9
16
  resolveAppKeys: ResolveAppKeys;
10
- updateManifestEntry: (appKey: string, entry: ManifestEntry, configPath?: string) => Promise<[string, ManifestEntry]>;
17
+ updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<[string, ManifestEntry, Manifest]>;
11
18
  };
12
19
  }
13
20
  /**
@@ -31,6 +38,7 @@ export declare function findManifestEntry({ appKey, manifest, }: {
31
38
  manifest: Manifest;
32
39
  }): [string, ManifestEntry] | null;
33
40
  export { DEFAULT_CONFIG_PATH } from "./schemas";
41
+ export type { ManifestEntry, Manifest } from "./schemas";
34
42
  export declare const manifestPlugin: Plugin<{}, // no SDK dependencies
35
43
  {
36
44
  api: ApiClient;
@@ -1 +1 @@
1
- {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AE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,SAAS,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAkClB;AAoCD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;CACpB,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,IAAI,CAyBjC;AA8GD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEzD,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,EAAE,EAAE,sBAAsB;AAC1B;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,EAClB,sBAAsB,CAgIvB,CAAC"}
@@ -237,8 +237,11 @@ export const manifestPlugin = (params) => {
237
237
  return null;
238
238
  return `${resolvedApp.implementationName}@${resolvedApp.version || "latest"}`;
239
239
  };
240
- const updateManifestEntry = async (appKey, entry, configPath = DEFAULT_CONFIG_PATH) => {
241
- const manifest = (await readManifestFromFile(configPath)) || { apps: {} };
240
+ const updateManifestEntry = async (options) => {
241
+ const { appKey, entry, configPath = DEFAULT_CONFIG_PATH, skipWrite = false, manifest: inputManifest, } = options;
242
+ // Use provided manifest or read from file
243
+ const manifest = inputManifest ||
244
+ (await readManifestFromFile(configPath)) || { apps: {} };
242
245
  // Try to find existing entry by direct key first
243
246
  let existingEntry = findManifestEntry({
244
247
  appKey,
@@ -277,11 +280,20 @@ export const manifestPlugin = (params) => {
277
280
  api,
278
281
  });
279
282
  }
280
- manifest.apps[manifestKey] = entry;
281
- await writeManifestToFile(manifest, configPath);
282
- // Clear the cached manifest so it gets reloaded with the new data
283
- resolvedManifest = undefined;
284
- return [manifestKey, entry];
283
+ const updatedManifest = {
284
+ ...manifest,
285
+ apps: {
286
+ ...manifest.apps,
287
+ [manifestKey]: entry,
288
+ },
289
+ };
290
+ // Conditionally write to file
291
+ if (!skipWrite) {
292
+ await writeManifestToFile(updatedManifest, configPath);
293
+ // Clear the cached manifest so it gets reloaded with the new data
294
+ resolvedManifest = undefined;
295
+ }
296
+ return [manifestKey, entry, updatedManifest];
285
297
  };
286
298
  return {
287
299
  context: {
@@ -379,8 +379,10 @@ describe("manifestPlugin", () => {
379
379
  const sdk = createTestSdk();
380
380
  const context = sdk.getContext();
381
381
  // This should now find the existing "SlackCLIAPI" entry
382
- const [manifestKey] = await context.updateManifestEntry("slack", // Input is slug
383
- { implementationName: "SlackCLIAPI", version: "1.30.0" });
382
+ const [manifestKey] = await context.updateManifestEntry({
383
+ appKey: "slack", // Input is slug
384
+ entry: { implementationName: "SlackCLIAPI", version: "1.30.0" },
385
+ });
384
386
  // Should return the existing key, not create a new one
385
387
  expect(manifestKey).toBe("SlackCLIAPI");
386
388
  });
@@ -13,20 +13,20 @@ export declare const RelayRequestSchema: z.ZodObject<{
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  url: string;
15
15
  method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
16
- authenticationId?: number | undefined;
16
+ headers?: Record<string, string> | [string, string][] | Headers | undefined;
17
17
  body?: any;
18
+ authenticationId?: number | undefined;
18
19
  callbackUrl?: string | undefined;
19
20
  authenticationTemplate?: string | undefined;
20
- headers?: Record<string, string> | [string, string][] | Headers | undefined;
21
21
  relayBaseUrl?: string | undefined;
22
22
  }, {
23
23
  url: string;
24
24
  method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
25
- authenticationId?: number | undefined;
25
+ headers?: Record<string, string> | [string, string][] | Headers | undefined;
26
26
  body?: any;
27
+ authenticationId?: number | undefined;
27
28
  callbackUrl?: string | undefined;
28
29
  authenticationTemplate?: string | undefined;
29
- headers?: Record<string, string> | [string, string][] | Headers | undefined;
30
30
  relayBaseUrl?: string | undefined;
31
31
  }>;
32
32
  export type RelayRequestOptions = z.infer<typeof RelayRequestSchema>;
@@ -47,20 +47,20 @@ export declare const RelayFetchSchema: z.ZodObject<{
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  url: string;
49
49
  method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
50
- authenticationId?: number | undefined;
50
+ headers?: Record<string, string> | [string, string][] | Headers | undefined;
51
51
  body?: any;
52
+ authenticationId?: number | undefined;
52
53
  callbackUrl?: string | undefined;
53
54
  authenticationTemplate?: string | undefined;
54
- headers?: Record<string, string> | [string, string][] | Headers | undefined;
55
55
  relayBaseUrl?: string | undefined;
56
56
  }, {
57
57
  url: string;
58
58
  method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
59
- authenticationId?: number | undefined;
59
+ headers?: Record<string, string> | [string, string][] | Headers | undefined;
60
60
  body?: any;
61
+ authenticationId?: number | undefined;
61
62
  callbackUrl?: string | undefined;
62
63
  authenticationTemplate?: string | undefined;
63
- headers?: Record<string, string> | [string, string][] | Headers | undefined;
64
64
  relayBaseUrl?: string | undefined;
65
65
  }>;
66
66
  export type RelayFetchOptions = RelayRequestOptions;
@@ -14,22 +14,22 @@ export declare const RunActionSchema: z.ZodObject<{
14
14
  cursor: z.ZodOptional<z.ZodString>;
15
15
  }, "strip", z.ZodTypeAny, {
16
16
  appKey: string;
17
- actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
17
+ actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
18
18
  actionKey: string;
19
+ cursor?: string | undefined;
20
+ maxItems?: number | undefined;
21
+ pageSize?: number | undefined;
19
22
  authenticationId?: number | null | undefined;
20
23
  inputs?: Record<string, unknown> | undefined;
21
- pageSize?: number | undefined;
22
- maxItems?: number | undefined;
23
- cursor?: string | undefined;
24
24
  }, {
25
25
  appKey: string;
26
- actionType: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
26
+ actionType: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
27
27
  actionKey: string;
28
+ cursor?: string | undefined;
29
+ maxItems?: number | undefined;
30
+ pageSize?: number | undefined;
28
31
  authenticationId?: number | null | undefined;
29
32
  inputs?: Record<string, unknown> | undefined;
30
- pageSize?: number | undefined;
31
- maxItems?: number | undefined;
32
- cursor?: string | undefined;
33
33
  }>;
34
34
  export type RunActionOptions = z.infer<typeof RunActionSchema>;
35
35
  export interface RunActionPage {
@@ -20,7 +20,7 @@ export declare const ActionItemSchema: z.ZodObject<Omit<{
20
20
  description: string;
21
21
  title: string;
22
22
  app_key: string;
23
- action_type: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
23
+ action_type: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
24
24
  id?: string | undefined;
25
25
  is_important?: boolean | undefined;
26
26
  is_hidden?: boolean | undefined;
@@ -31,7 +31,7 @@ export declare const ActionItemSchema: z.ZodObject<Omit<{
31
31
  description: string;
32
32
  title: string;
33
33
  app_key: string;
34
- action_type: "search" | "filter" | "read" | "read_bulk" | "write" | "run" | "search_or_write" | "search_and_write";
34
+ action_type: "search" | "filter" | "read" | "read_bulk" | "run" | "search_and_write" | "search_or_write" | "write";
35
35
  id?: string | undefined;
36
36
  is_important?: boolean | undefined;
37
37
  is_hidden?: boolean | undefined;
@@ -67,17 +67,17 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
67
67
  filter?: number | undefined;
68
68
  read?: number | undefined;
69
69
  read_bulk?: number | undefined;
70
- write?: number | undefined;
71
- search_or_write?: number | undefined;
72
70
  search_and_write?: number | undefined;
71
+ search_or_write?: number | undefined;
72
+ write?: number | undefined;
73
73
  }, {
74
74
  search?: number | undefined;
75
75
  filter?: number | undefined;
76
76
  read?: number | undefined;
77
77
  read_bulk?: number | undefined;
78
- write?: number | undefined;
79
- search_or_write?: number | undefined;
80
78
  search_and_write?: number | undefined;
79
+ search_or_write?: number | undefined;
80
+ write?: number | undefined;
81
81
  }>>;
82
82
  description: z.ZodOptional<z.ZodString>;
83
83
  primary_color: z.ZodOptional<z.ZodString>;
@@ -104,9 +104,9 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
104
104
  filter?: number | undefined;
105
105
  read?: number | undefined;
106
106
  read_bulk?: number | undefined;
107
- write?: number | undefined;
108
- search_or_write?: number | undefined;
109
107
  search_and_write?: number | undefined;
108
+ search_or_write?: number | undefined;
109
+ write?: number | undefined;
110
110
  } | undefined;
111
111
  description?: string | undefined;
112
112
  is_hidden?: boolean | undefined;
@@ -156,9 +156,9 @@ export declare const AppItemSchema: z.ZodObject<Omit<{
156
156
  filter?: number | undefined;
157
157
  read?: number | undefined;
158
158
  read_bulk?: number | undefined;
159
- write?: number | undefined;
160
- search_or_write?: number | undefined;
161
159
  search_and_write?: number | undefined;
160
+ search_or_write?: number | undefined;
161
+ write?: number | undefined;
162
162
  } | undefined;
163
163
  description?: string | undefined;
164
164
  is_hidden?: boolean | undefined;
package/dist/sdk.d.ts CHANGED
@@ -20,7 +20,7 @@ export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOption
20
20
  } & {
21
21
  getVersionedImplementationId: import("./plugins/manifest/schemas").GetVersionedImplementationId;
22
22
  resolveAppKeys: import("./plugins/manifest/schemas").ResolveAppKeys;
23
- updateManifestEntry: (appKey: string, entry: import("./plugins/manifest/schemas").ManifestEntry, configPath?: string) => Promise<[string, import("./plugins/manifest/schemas").ManifestEntry]>;
23
+ updateManifestEntry: (options: import(".").UpdateManifestEntryOptions) => Promise<[string, import(".").ManifestEntry, import(".").Manifest]>;
24
24
  } & {
25
25
  meta: {
26
26
  listApps: {
package/dist/sdk.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sd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./events";
5
5
  import type { EventEmissionConfig } from "../plugins/eventEmission";
6
+ import type { Manifest } from "../plugins/manifest";
6
7
  export interface BaseSdkOptions {
7
8
  token?: string;
8
9
  getToken?: () => Promise<string | undefined>;
@@ -11,14 +12,7 @@ export interface BaseSdkOptions {
11
12
  baseUrl?: string;
12
13
  debug?: boolean;
13
14
  manifestPath?: string;
14
- manifest?: {
15
- apps: {
16
- [appKey: string]: {
17
- implementationName: string;
18
- version?: string;
19
- };
20
- };
21
- };
15
+ manifest?: Manifest;
22
16
  eventEmission?: EventEmissionConfig;
23
17
  }
24
18
  import type { ListInputFieldsSdkFunction } from "../plugins/listInputFields/schemas";
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/types/sdk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE;YACJ,CAAC,MAAM,EAAE,MAAM,GAAG;gBAChB,kBAAkB,EAAE,MAAM,CAAC;gBAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;aAClB,CAAC;SACH,CAAC;KACH,CAAC;IACF,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC;AAGD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;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MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAA;KAAE,CAAC,CAAC;IAC/D,YAAY,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAGD,MAAM,WAAW,kBACf,SAAQ,0BAA0B,EAChC,4BAA4B,EAC5B,kCAAkC,EAClC,mCAAmC,EACnC,uBAAuB;CAE1B;AAUD,MAAM,WAAW,SACf,SAAQ,UAAU,CAChB,sBAAsB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,sBAAsB,GACtB,sBAAsB,GACtB,oBAAoB,GACpB,yBAAyB,GACzB,uBAAuB,GACvB,uBAAuB,GACvB,iCAAiC,GACjC,+BAA+B,GAC/B,qCAAqC,GACrC,sCAAsC,GACtC,6BAA6B,GAC7B,mCAAmC,GACnC,qBAAqB,GACrB,wBAAwB,GACxB,qBAAqB,GACrB,iBAAiB,CACpB;IAED,IAAI,EAAE,WAAW,GAAG,aAAa,CAAC;CACnC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk",
3
- "version": "0.13.4",
3
+ "version": "0.13.6",
4
4
  "description": "Complete Zapier SDK - combines all Zapier SDK packages",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -46,7 +46,7 @@
46
46
  "tsup": "^8.5.0",
47
47
  "typescript": "^5.8.3",
48
48
  "vitest": "^3.2.3",
49
- "@zapier/zapier-sdk-cli-login": "0.3.2"
49
+ "@zapier/zapier-sdk-cli-login": "0.3.3"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup",
@@ -85,7 +85,9 @@ describe("listActions plugin", () => {
85
85
  manifest: null,
86
86
  getVersionedImplementationId: mockGetVersionedImplementationId,
87
87
  resolveAppKeys: mockResolveAppKeys,
88
- updateManifestEntry: vi.fn().mockResolvedValue(["test-key", {}]),
88
+ updateManifestEntry: vi
89
+ .fn()
90
+ .mockResolvedValue(["test-key", {}, { apps: {} }]),
89
91
  },
90
92
  }))
91
93
  .addPlugin(listAppsPlugin)
@@ -69,7 +69,9 @@ describe("listAuthentications plugin", () => {
69
69
  manifest: null,
70
70
  getVersionedImplementationId: mockGetVersionedImplementationId,
71
71
  resolveAppKeys: mockResolveAppKeys,
72
- updateManifestEntry: vi.fn().mockResolvedValue(["test-key", {}]),
72
+ updateManifestEntry: vi
73
+ .fn()
74
+ .mockResolvedValue(["test-key", {}, { apps: {} }]),
73
75
  },
74
76
  });
75
77
 
@@ -491,10 +491,10 @@ describe("manifestPlugin", () => {
491
491
  const context = sdk.getContext();
492
492
 
493
493
  // This should now find the existing "SlackCLIAPI" entry
494
- const [manifestKey] = await context.updateManifestEntry(
495
- "slack", // Input is slug
496
- { implementationName: "SlackCLIAPI", version: "1.30.0" },
497
- );
494
+ const [manifestKey] = await context.updateManifestEntry({
495
+ appKey: "slack", // Input is slug
496
+ entry: { implementationName: "SlackCLIAPI", version: "1.30.0" },
497
+ });
498
498
 
499
499
  // Should return the existing key, not create a new one
500
500
  expect(manifestKey).toBe("SlackCLIAPI");