@zapier/zapier-sdk 1.0.2 → 1.1.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 +12 -0
- package/README.md +31 -28
- package/dist/index.cjs +20 -17
- package/dist/index.d.mts +7 -4
- package/dist/index.mjs +20 -17
- package/dist/plugins/findFirstAuthentication/schemas.d.ts +4 -3
- package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +1 -1
- package/dist/plugins/findFirstAuthentication/schemas.js +8 -18
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts +4 -3
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +1 -1
- package/dist/plugins/findUniqueAuthentication/schemas.js +8 -18
- package/dist/plugins/listAuthentications/index.d.ts.map +1 -1
- package/dist/plugins/listAuthentications/index.js +3 -0
- package/dist/plugins/listAuthentications/index.test.js +48 -0
- package/dist/plugins/listAuthentications/schemas.d.ts +1 -0
- package/dist/plugins/listAuthentications/schemas.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4dd27eb: Add isExpired parameter to listAuthentications for filtering authentications by expiration status.
|
|
8
|
+
|
|
9
|
+
## 1.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- e393401: Adds CLAUDE.md documentation files to the zapier-sdk and zapier-sdk-cli packages to help users get up to speed faster when using AI assistants like Claude, Cursor, etc.
|
|
14
|
+
|
|
3
15
|
## 1.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -615,14 +615,15 @@ Find the first authentication matching the criteria
|
|
|
615
615
|
|
|
616
616
|
**Parameters:**
|
|
617
617
|
|
|
618
|
-
| Name | Type
|
|
619
|
-
| ------------- |
|
|
620
|
-
| `options` | `object`
|
|
621
|
-
| ↳ `appKey` | `string`
|
|
622
|
-
| ↳ `search` | `string`
|
|
623
|
-
| ↳ `title` | `string`
|
|
624
|
-
| ↳ `accountId` | `string`
|
|
625
|
-
| ↳ `owner` | `string`
|
|
618
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
619
|
+
| ------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
|
|
620
|
+
| `options` | `object` | ✅ | — | — | |
|
|
621
|
+
| ↳ `appKey` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
622
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter authentications by title |
|
|
623
|
+
| ↳ `title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
|
|
624
|
+
| ↳ `accountId` | `string` | ❌ | — | — | Filter authentications by account ID |
|
|
625
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
|
|
626
|
+
| ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status (true = expired only, false = non-expired only) |
|
|
626
627
|
|
|
627
628
|
**Returns:** `Promise<AuthenticationItem>`
|
|
628
629
|
|
|
@@ -638,14 +639,15 @@ Find a unique authentication matching the criteria
|
|
|
638
639
|
|
|
639
640
|
**Parameters:**
|
|
640
641
|
|
|
641
|
-
| Name | Type
|
|
642
|
-
| ------------- |
|
|
643
|
-
| `options` | `object`
|
|
644
|
-
| ↳ `appKey` | `string`
|
|
645
|
-
| ↳ `search` | `string`
|
|
646
|
-
| ↳ `title` | `string`
|
|
647
|
-
| ↳ `accountId` | `string`
|
|
648
|
-
| ↳ `owner` | `string`
|
|
642
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
643
|
+
| ------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
|
|
644
|
+
| `options` | `object` | ✅ | — | — | |
|
|
645
|
+
| ↳ `appKey` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
646
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter authentications by title |
|
|
647
|
+
| ↳ `title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
|
|
648
|
+
| ↳ `accountId` | `string` | ❌ | — | — | Filter authentications by account ID |
|
|
649
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
|
|
650
|
+
| ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status (true = expired only, false = non-expired only) |
|
|
649
651
|
|
|
650
652
|
**Returns:** `Promise<AuthenticationItem>`
|
|
651
653
|
|
|
@@ -682,18 +684,19 @@ List available authentications with optional filtering
|
|
|
682
684
|
|
|
683
685
|
**Parameters:**
|
|
684
686
|
|
|
685
|
-
| Name | Type
|
|
686
|
-
| --------------------- |
|
|
687
|
-
| `options` | `object`
|
|
688
|
-
| ↳ `appKey` | `string`
|
|
689
|
-
| ↳ `authenticationIds` | `array`
|
|
690
|
-
| ↳ `search` | `string`
|
|
691
|
-
| ↳ `title` | `string`
|
|
692
|
-
| ↳ `accountId` | `string`
|
|
693
|
-
| ↳ `owner` | `string`
|
|
694
|
-
| ↳ `
|
|
695
|
-
| ↳ `
|
|
696
|
-
| ↳ `
|
|
687
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
688
|
+
| --------------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
|
|
689
|
+
| `options` | `object` | ✅ | — | — | |
|
|
690
|
+
| ↳ `appKey` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
691
|
+
| ↳ `authenticationIds` | `array` | ❌ | — | — | List of authentication IDs to filter by |
|
|
692
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter authentications by title |
|
|
693
|
+
| ↳ `title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
|
|
694
|
+
| ↳ `accountId` | `string` | ❌ | — | — | Filter authentications by account ID |
|
|
695
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
|
|
696
|
+
| ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status (true = expired only, false = non-expired only) |
|
|
697
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of authentications per page |
|
|
698
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
699
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
697
700
|
|
|
698
701
|
**Returns:** `Promise<PaginatedResult<AuthenticationItem>>`
|
|
699
702
|
|
package/dist/index.cjs
CHANGED
|
@@ -2117,6 +2117,9 @@ var listAuthenticationsPlugin = ({ context }) => {
|
|
|
2117
2117
|
if (options.owner) {
|
|
2118
2118
|
searchParams.owner = options.owner;
|
|
2119
2119
|
}
|
|
2120
|
+
if (options.isExpired !== void 0) {
|
|
2121
|
+
searchParams.isExpired = options.isExpired.toString();
|
|
2122
|
+
}
|
|
2120
2123
|
if (options.cursor) {
|
|
2121
2124
|
searchParams.offset = options.cursor;
|
|
2122
2125
|
}
|
|
@@ -2298,14 +2301,14 @@ var getAuthenticationPlugin = ({ context }) => {
|
|
|
2298
2301
|
}
|
|
2299
2302
|
};
|
|
2300
2303
|
};
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2304
|
+
|
|
2305
|
+
// src/plugins/findFirstAuthentication/schemas.ts
|
|
2306
|
+
var FindFirstAuthenticationSchema = ListAuthenticationsQuerySchema.omit({
|
|
2307
|
+
authenticationIds: true,
|
|
2308
|
+
pageSize: true,
|
|
2309
|
+
maxItems: true,
|
|
2310
|
+
cursor: true,
|
|
2311
|
+
_telemetry: true
|
|
2309
2312
|
}).describe("Find the first authentication matching the criteria");
|
|
2310
2313
|
|
|
2311
2314
|
// src/plugins/findFirstAuthentication/index.ts
|
|
@@ -2349,14 +2352,14 @@ var findFirstAuthenticationPlugin = ({ sdk, context }) => {
|
|
|
2349
2352
|
}
|
|
2350
2353
|
};
|
|
2351
2354
|
};
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2355
|
+
|
|
2356
|
+
// src/plugins/findUniqueAuthentication/schemas.ts
|
|
2357
|
+
var FindUniqueAuthenticationSchema = ListAuthenticationsQuerySchema.omit({
|
|
2358
|
+
authenticationIds: true,
|
|
2359
|
+
pageSize: true,
|
|
2360
|
+
maxItems: true,
|
|
2361
|
+
cursor: true,
|
|
2362
|
+
_telemetry: true
|
|
2360
2363
|
}).describe("Find a unique authentication matching the criteria");
|
|
2361
2364
|
|
|
2362
2365
|
// src/plugins/findUniqueAuthentication/index.ts
|
|
@@ -4754,7 +4757,7 @@ function getCpuTime() {
|
|
|
4754
4757
|
|
|
4755
4758
|
// package.json
|
|
4756
4759
|
var package_default = {
|
|
4757
|
-
version: "1.0
|
|
4760
|
+
version: "1.1.0"};
|
|
4758
4761
|
|
|
4759
4762
|
// src/plugins/eventEmission/builders.ts
|
|
4760
4763
|
function createBaseEvent(context = {}) {
|
package/dist/index.d.mts
CHANGED
|
@@ -1078,24 +1078,26 @@ declare const ListInputFieldsSchema: z.ZodObject<{
|
|
|
1078
1078
|
type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema>;
|
|
1079
1079
|
|
|
1080
1080
|
declare const FindFirstAuthenticationSchema: z.ZodObject<{
|
|
1081
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1081
1083
|
appKey: z.ZodOptional<z.ZodString & {
|
|
1082
1084
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1083
1085
|
}>;
|
|
1084
|
-
search: z.ZodOptional<z.ZodString>;
|
|
1085
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1086
1086
|
accountId: z.ZodOptional<z.ZodString>;
|
|
1087
1087
|
owner: z.ZodOptional<z.ZodString>;
|
|
1088
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
1088
1089
|
}, z.core.$strip>;
|
|
1089
1090
|
type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema>;
|
|
1090
1091
|
|
|
1091
1092
|
declare const FindUniqueAuthenticationSchema: z.ZodObject<{
|
|
1093
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1094
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1092
1095
|
appKey: z.ZodOptional<z.ZodString & {
|
|
1093
1096
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1094
1097
|
}>;
|
|
1095
|
-
search: z.ZodOptional<z.ZodString>;
|
|
1096
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1097
1098
|
accountId: z.ZodOptional<z.ZodString>;
|
|
1098
1099
|
owner: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
1099
1101
|
}, z.core.$strip>;
|
|
1100
1102
|
type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema>;
|
|
1101
1103
|
|
|
@@ -1534,6 +1536,7 @@ declare const ListAuthenticationsQuerySchema: z.ZodObject<{
|
|
|
1534
1536
|
title: z.ZodOptional<z.ZodString>;
|
|
1535
1537
|
accountId: z.ZodOptional<z.ZodString>;
|
|
1536
1538
|
owner: z.ZodOptional<z.ZodString>;
|
|
1539
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
1537
1540
|
appKey: z.ZodOptional<z.ZodString & {
|
|
1538
1541
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1539
1542
|
}>;
|
package/dist/index.mjs
CHANGED
|
@@ -2095,6 +2095,9 @@ var listAuthenticationsPlugin = ({ context }) => {
|
|
|
2095
2095
|
if (options.owner) {
|
|
2096
2096
|
searchParams.owner = options.owner;
|
|
2097
2097
|
}
|
|
2098
|
+
if (options.isExpired !== void 0) {
|
|
2099
|
+
searchParams.isExpired = options.isExpired.toString();
|
|
2100
|
+
}
|
|
2098
2101
|
if (options.cursor) {
|
|
2099
2102
|
searchParams.offset = options.cursor;
|
|
2100
2103
|
}
|
|
@@ -2276,14 +2279,14 @@ var getAuthenticationPlugin = ({ context }) => {
|
|
|
2276
2279
|
}
|
|
2277
2280
|
};
|
|
2278
2281
|
};
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2282
|
+
|
|
2283
|
+
// src/plugins/findFirstAuthentication/schemas.ts
|
|
2284
|
+
var FindFirstAuthenticationSchema = ListAuthenticationsQuerySchema.omit({
|
|
2285
|
+
authenticationIds: true,
|
|
2286
|
+
pageSize: true,
|
|
2287
|
+
maxItems: true,
|
|
2288
|
+
cursor: true,
|
|
2289
|
+
_telemetry: true
|
|
2287
2290
|
}).describe("Find the first authentication matching the criteria");
|
|
2288
2291
|
|
|
2289
2292
|
// src/plugins/findFirstAuthentication/index.ts
|
|
@@ -2327,14 +2330,14 @@ var findFirstAuthenticationPlugin = ({ sdk, context }) => {
|
|
|
2327
2330
|
}
|
|
2328
2331
|
};
|
|
2329
2332
|
};
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2333
|
+
|
|
2334
|
+
// src/plugins/findUniqueAuthentication/schemas.ts
|
|
2335
|
+
var FindUniqueAuthenticationSchema = ListAuthenticationsQuerySchema.omit({
|
|
2336
|
+
authenticationIds: true,
|
|
2337
|
+
pageSize: true,
|
|
2338
|
+
maxItems: true,
|
|
2339
|
+
cursor: true,
|
|
2340
|
+
_telemetry: true
|
|
2338
2341
|
}).describe("Find a unique authentication matching the criteria");
|
|
2339
2342
|
|
|
2340
2343
|
// src/plugins/findUniqueAuthentication/index.ts
|
|
@@ -4732,7 +4735,7 @@ function getCpuTime() {
|
|
|
4732
4735
|
|
|
4733
4736
|
// package.json
|
|
4734
4737
|
var package_default = {
|
|
4735
|
-
version: "1.0
|
|
4738
|
+
version: "1.1.0"};
|
|
4736
4739
|
|
|
4737
4740
|
// src/plugins/eventEmission/builders.ts
|
|
4738
4741
|
function createBaseEvent(context = {}) {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import type { z } from "zod";
|
|
2
2
|
import type { AuthenticationItem } from "../../types/domain";
|
|
3
3
|
import type { ZapierAuthenticationError, ZapierApiError, ZapierValidationError, ZapierUnknownError } from "../../types/errors";
|
|
4
4
|
export declare const FindFirstAuthenticationSchema: z.ZodObject<{
|
|
5
|
+
search: z.ZodOptional<z.ZodString>;
|
|
6
|
+
title: z.ZodOptional<z.ZodString>;
|
|
5
7
|
appKey: z.ZodOptional<z.ZodString & {
|
|
6
8
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
7
9
|
}>;
|
|
8
|
-
search: z.ZodOptional<z.ZodString>;
|
|
9
|
-
title: z.ZodOptional<z.ZodString>;
|
|
10
10
|
accountId: z.ZodOptional<z.ZodString>;
|
|
11
11
|
owner: z.ZodOptional<z.ZodString>;
|
|
12
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
12
13
|
}, z.core.$strip>;
|
|
13
14
|
export type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema>;
|
|
14
15
|
export type FindFirstAuthenticationError = ZapierAuthenticationError | ZapierApiError | ZapierValidationError | ZapierUnknownError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstAuthentication/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstAuthentication/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,6BAA6B;;;;;;;;;iBAO0B,CAAC;AAGrE,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,6BAA6B,CACrC,CAAC;AAGF,MAAM,MAAM,4BAA4B,GACpC,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,kCAAkC;IACjD,uBAAuB,EAAE,CACvB,OAAO,CAAC,EAAE,8BAA8B,KACrC,OAAO,CAAC;QAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CACnD"}
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.optional()
|
|
10
|
-
.describe("Search term to filter authentications by title"),
|
|
11
|
-
title: z
|
|
12
|
-
.string()
|
|
13
|
-
.optional()
|
|
14
|
-
.describe("Filter authentications by exact title match"),
|
|
15
|
-
accountId: z.string().optional().describe("Filter by account ID"),
|
|
16
|
-
owner: z.string().optional().describe("Filter by owner"),
|
|
17
|
-
})
|
|
18
|
-
.describe("Find the first authentication matching the criteria");
|
|
1
|
+
import { ListAuthenticationsQuerySchema } from "../listAuthentications/schemas";
|
|
2
|
+
export const FindFirstAuthenticationSchema = ListAuthenticationsQuerySchema.omit({
|
|
3
|
+
authenticationIds: true,
|
|
4
|
+
pageSize: true,
|
|
5
|
+
maxItems: true,
|
|
6
|
+
cursor: true,
|
|
7
|
+
_telemetry: true,
|
|
8
|
+
}).describe("Find the first authentication matching the criteria");
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import type { z } from "zod";
|
|
2
2
|
import type { AuthenticationItem } from "../../types/domain";
|
|
3
3
|
import type { ZapierAuthenticationError, ZapierApiError, ZapierResourceNotFoundError, ZapierValidationError, ZapierUnknownError } from "../../types/errors";
|
|
4
4
|
export declare const FindUniqueAuthenticationSchema: z.ZodObject<{
|
|
5
|
+
search: z.ZodOptional<z.ZodString>;
|
|
6
|
+
title: z.ZodOptional<z.ZodString>;
|
|
5
7
|
appKey: z.ZodOptional<z.ZodString & {
|
|
6
8
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
7
9
|
}>;
|
|
8
|
-
search: z.ZodOptional<z.ZodString>;
|
|
9
|
-
title: z.ZodOptional<z.ZodString>;
|
|
10
10
|
accountId: z.ZodOptional<z.ZodString>;
|
|
11
11
|
owner: z.ZodOptional<z.ZodString>;
|
|
12
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
12
13
|
}, z.core.$strip>;
|
|
13
14
|
export type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema>;
|
|
14
15
|
export type FindUniqueAuthenticationError = ZapierAuthenticationError | ZapierApiError | ZapierResourceNotFoundError | ZapierValidationError | ZapierUnknownError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueAuthentication/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueAuthentication/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,2BAA2B,EAC3B,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,8BAA8B;;;;;;;;;iBAOwB,CAAC;AAGpE,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,8BAA8B,CACtC,CAAC;AAGF,MAAM,MAAM,6BAA6B,GACrC,yBAAyB,GACzB,cAAc,GACd,2BAA2B,GAC3B,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,mCAAmC;IAClD,wBAAwB,EAAE,CACxB,OAAO,CAAC,EAAE,+BAA+B,KACtC,OAAO,CAAC;QAAE,IAAI,EAAE,kBAAkB,CAAA;KAAE,CAAC,CAAC;CAC5C"}
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.optional()
|
|
10
|
-
.describe("Search term to filter authentications by title"),
|
|
11
|
-
title: z
|
|
12
|
-
.string()
|
|
13
|
-
.optional()
|
|
14
|
-
.describe("Filter authentications by exact title match"),
|
|
15
|
-
accountId: z.string().optional().describe("Filter by account ID"),
|
|
16
|
-
owner: z.string().optional().describe("Filter by owner"),
|
|
17
|
-
})
|
|
18
|
-
.describe("Find a unique authentication matching the criteria");
|
|
1
|
+
import { ListAuthenticationsQuerySchema } from "../listAuthentications/schemas";
|
|
2
|
+
export const FindUniqueAuthenticationSchema = ListAuthenticationsQuerySchema.omit({
|
|
3
|
+
authenticationIds: true,
|
|
4
|
+
pageSize: true,
|
|
5
|
+
maxItems: true,
|
|
6
|
+
cursor: true,
|
|
7
|
+
_telemetry: true,
|
|
8
|
+
}).describe("Find a unique authentication matching the criteria");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listAuthentications/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,EACL,8BAA8B,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC7B,MAAM,WAAW,CAAC;AAInB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAK7D,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,CACnB,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC,uBAAuB,CAAC,GACnC,aAAa,CAAC,uBAAuB,CAAC,GAAG;QACvC,KAAK,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAAC;KAC5C,CAAC;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,mBAAmB,EAAE;gBACnB,WAAW,EAAE,OAAO,8BAA8B,CAAC;aACpD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,UAAU,CAAC,sBAAsB,CAAC,EAClC;IACE,GAAG,EAAE,SAAS,CAAC;IACf,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,GAAG,oBAAoB,EACxB,iCAAiC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listAuthentications/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,EACL,8BAA8B,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC7B,MAAM,WAAW,CAAC;AAInB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAK7D,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,CACnB,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC,uBAAuB,CAAC,GACnC,aAAa,CAAC,uBAAuB,CAAC,GAAG;QACvC,KAAK,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAAC;KAC5C,CAAC;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,mBAAmB,EAAE;gBACnB,WAAW,EAAE,OAAO,8BAA8B,CAAC;aACpD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,UAAU,CAAC,sBAAsB,CAAC,EAClC;IACE,GAAG,EAAE,SAAS,CAAC;IACf,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,GAAG,oBAAoB,EACxB,iCAAiC,CAoGlC,CAAC"}
|
|
@@ -37,6 +37,9 @@ export const listAuthenticationsPlugin = ({ context }) => {
|
|
|
37
37
|
if (options.owner) {
|
|
38
38
|
searchParams.owner = options.owner;
|
|
39
39
|
}
|
|
40
|
+
if (options.isExpired !== undefined) {
|
|
41
|
+
searchParams.isExpired = options.isExpired.toString();
|
|
42
|
+
}
|
|
40
43
|
if (options.cursor) {
|
|
41
44
|
searchParams.offset = options.cursor;
|
|
42
45
|
}
|
|
@@ -161,6 +161,28 @@ describe("listAuthentications plugin", () => {
|
|
|
161
161
|
});
|
|
162
162
|
}).toThrow(ZapierValidationError);
|
|
163
163
|
});
|
|
164
|
+
it("should throw validation error for invalid isExpired type", () => {
|
|
165
|
+
const sdk = createTestSdk();
|
|
166
|
+
expect(() => {
|
|
167
|
+
sdk.listAuthentications({
|
|
168
|
+
isExpired: "true", // Should be boolean, not string
|
|
169
|
+
});
|
|
170
|
+
}).toThrow(ZapierValidationError);
|
|
171
|
+
expect(() => {
|
|
172
|
+
sdk.listAuthentications({
|
|
173
|
+
isExpired: 1, // Should be boolean, not number
|
|
174
|
+
});
|
|
175
|
+
}).toThrow(ZapierValidationError);
|
|
176
|
+
});
|
|
177
|
+
it("should pass validation with isExpired boolean values", async () => {
|
|
178
|
+
const sdk = createTestSdk();
|
|
179
|
+
// Test with true
|
|
180
|
+
const resultTrue = await sdk.listAuthentications({ isExpired: true });
|
|
181
|
+
expect(resultTrue.data).toBeDefined();
|
|
182
|
+
// Test with false
|
|
183
|
+
const resultFalse = await sdk.listAuthentications({ isExpired: false });
|
|
184
|
+
expect(resultFalse.data).toBeDefined();
|
|
185
|
+
});
|
|
164
186
|
it("should throw validation error for invalid authenticationIds type", () => {
|
|
165
187
|
const sdk = createTestSdk();
|
|
166
188
|
expect(() => {
|
|
@@ -209,6 +231,7 @@ describe("listAuthentications plugin", () => {
|
|
|
209
231
|
title: "My Slack Workspace",
|
|
210
232
|
accountId: "acc_123",
|
|
211
233
|
owner: "me",
|
|
234
|
+
isExpired: false,
|
|
212
235
|
pageSize: 10,
|
|
213
236
|
maxItems: 50,
|
|
214
237
|
});
|
|
@@ -314,6 +337,31 @@ describe("listAuthentications plugin", () => {
|
|
|
314
337
|
}),
|
|
315
338
|
}));
|
|
316
339
|
});
|
|
340
|
+
it("should pass isExpired=true filter to API", async () => {
|
|
341
|
+
const sdk = createTestSdk();
|
|
342
|
+
await sdk.listAuthentications({ isExpired: true });
|
|
343
|
+
expect(mockApiClient.get).toHaveBeenCalledWith("/api/v0/authentications", expect.objectContaining({
|
|
344
|
+
searchParams: expect.objectContaining({
|
|
345
|
+
isExpired: "true",
|
|
346
|
+
}),
|
|
347
|
+
}));
|
|
348
|
+
});
|
|
349
|
+
it("should pass isExpired=false filter to API", async () => {
|
|
350
|
+
const sdk = createTestSdk();
|
|
351
|
+
await sdk.listAuthentications({ isExpired: false });
|
|
352
|
+
expect(mockApiClient.get).toHaveBeenCalledWith("/api/v0/authentications", expect.objectContaining({
|
|
353
|
+
searchParams: expect.objectContaining({
|
|
354
|
+
isExpired: "false",
|
|
355
|
+
}),
|
|
356
|
+
}));
|
|
357
|
+
});
|
|
358
|
+
it("should not include isExpired parameter when not provided", async () => {
|
|
359
|
+
const sdk = createTestSdk();
|
|
360
|
+
await sdk.listAuthentications({});
|
|
361
|
+
const callArgs = mockApiClient.get.mock.calls[0];
|
|
362
|
+
const searchParams = callArgs[1].searchParams;
|
|
363
|
+
expect(searchParams).not.toHaveProperty("isExpired");
|
|
364
|
+
});
|
|
317
365
|
it("should pass authenticationIds as comma-separated string to API", async () => {
|
|
318
366
|
const sdk = createTestSdk();
|
|
319
367
|
await sdk.listAuthentications({
|
|
@@ -7,6 +7,7 @@ export declare const ListAuthenticationsQuerySchema: z.ZodObject<{
|
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
8
|
accountId: z.ZodOptional<z.ZodString>;
|
|
9
9
|
owner: z.ZodOptional<z.ZodString>;
|
|
10
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
10
11
|
appKey: z.ZodOptional<z.ZodString & {
|
|
11
12
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
12
13
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listAuthentications/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAE7F,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listAuthentications/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAE7F,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;iBA+B0B,CAAC;AAGtE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,8BAA8B,CACtC,CAAC;AAGF,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,wBAAwB,GAChC,yBAAyB,GACzB,cAAc,GACd,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,8BAA8B;IAC7C,mBAAmB,EAAE,oBAAoB,CACvC,0BAA0B,EAC1B,kBAAkB,CACnB,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/zapier-sdk",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Complete Zapier SDK - combines all Zapier SDK packages",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@zapier/zapier-sdk-core": "^0.
|
|
39
|
+
"@zapier/zapier-sdk-core": "^0.6.0",
|
|
40
40
|
"zod": "4.2.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|