@zapier/zapier-sdk 0.45.1 → 0.46.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 +5 -5
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +7 -1
- package/dist/api/schemas.d.ts +5 -5
- package/dist/api/types.d.ts +6 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/auth.d.ts +27 -6
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +130 -92
- package/dist/cache.d.ts +50 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +47 -0
- package/dist/index.cjs +116 -61
- package/dist/index.d.mts +108 -35
- package/dist/index.mjs +116 -62
- package/dist/plugins/getAction/schemas.d.ts +4 -4
- package/dist/plugins/getApp/index.js +1 -1
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts +4 -4
- package/dist/plugins/listActions/schemas.d.ts +4 -4
- package/dist/plugins/listApps/index.js +2 -2
- package/dist/plugins/listApps/schemas.d.ts.map +1 -1
- package/dist/plugins/listApps/schemas.js +2 -0
- package/dist/plugins/listClientCredentials/index.js +1 -1
- package/dist/plugins/listClientCredentials/schemas.d.ts.map +1 -1
- package/dist/plugins/listClientCredentials/schemas.js +1 -0
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +4 -4
- package/dist/plugins/listInputFields/schemas.d.ts +4 -4
- package/dist/plugins/runAction/schemas.d.ts +4 -4
- package/dist/plugins/tables/createTableFields/schemas.d.ts +21 -21
- package/dist/plugins/tables/listTableFields/schemas.d.ts +12 -12
- package/dist/plugins/tables/listTableRecords/schemas.d.ts +6 -6
- package/dist/schemas/Action.d.ts +1 -1
- package/dist/schemas/Connection.d.ts +3 -0
- package/dist/schemas/Connection.d.ts.map +1 -1
- package/dist/types/credentials.d.ts +2 -1
- package/dist/types/credentials.d.ts.map +1 -1
- package/dist/types/credentials.js +2 -1
- package/dist/types/properties.d.ts +1 -1
- package/dist/types/sdk.d.ts +2 -0
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/sdk.js +1 -0
- package/package.json +4 -6
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { ConnectionSchema, ConnectionsResponseSchema, ConnectionItem as Connecti
|
|
|
3
3
|
import { RequestContext } from '@zapier/policy-context';
|
|
4
4
|
import { AppItem as AppItem$1 } from '@zapier/zapier-sdk-core/v0/schemas/apps';
|
|
5
5
|
import { ClientCredentialsItem as ClientCredentialsItem$1, ClientCredentialsCreatedItem } from '@zapier/zapier-sdk-core/v0/schemas/client-credentials';
|
|
6
|
-
import * as _zapier_zapier_sdk_cli_login from '@zapier/zapier-sdk-cli
|
|
6
|
+
import * as _zapier_zapier_sdk_cli_login from '@zapier/zapier-sdk-cli/login';
|
|
7
7
|
|
|
8
8
|
interface FunctionRegistryEntry {
|
|
9
9
|
name: string;
|
|
@@ -186,7 +186,8 @@ declare const ClientCredentialsObjectSchema: z.ZodObject<{
|
|
|
186
186
|
type ClientCredentialsObject = z.infer<typeof ClientCredentialsObjectSchema>;
|
|
187
187
|
/**
|
|
188
188
|
* PKCE credentials for interactive OAuth flow.
|
|
189
|
-
* Only works when @zapier/zapier-sdk-cli
|
|
189
|
+
* Only works when @zapier/zapier-sdk-cli is installed (the SDK dynamically
|
|
190
|
+
* imports its `./login` entry point).
|
|
190
191
|
*/
|
|
191
192
|
declare const PkceCredentialsObjectSchema: z.ZodObject<{
|
|
192
193
|
type: z.ZodOptional<z.ZodEnum<{
|
|
@@ -344,6 +345,56 @@ declare function isCredentialsObject(credentials: ResolvedCredentials): credenti
|
|
|
344
345
|
*/
|
|
345
346
|
declare function isCredentialsFunction(credentials: Credentials): credentials is CredentialsFunction;
|
|
346
347
|
|
|
348
|
+
/**
|
|
349
|
+
* Best-effort cache for the SDK.
|
|
350
|
+
*
|
|
351
|
+
* The SDK uses this to avoid re-fetching values it can recreate, primarily
|
|
352
|
+
* client_credentials access tokens. Cache entries may disappear at any time:
|
|
353
|
+
* a miss is normal and callers must be able to rebuild the value.
|
|
354
|
+
*
|
|
355
|
+
* The default cache is in-memory. When the CLI package is installed, the SDK
|
|
356
|
+
* can opportunistically use its filesystem + keychain cache. Browser and
|
|
357
|
+
* minimal server deployments fall back to memory unless a caller injects a
|
|
358
|
+
* Redis, database, or environment-specific cache.
|
|
359
|
+
*
|
|
360
|
+
* Secrets: adapters receive a `secret: true` flag on `set` and decide
|
|
361
|
+
* what to do with it (keychain for the filesystem adapter; ignored for
|
|
362
|
+
* the in-memory adapter; user adapters can throw, plaintext, encrypt —
|
|
363
|
+
* their call). The value returned by `get` is always the plain secret.
|
|
364
|
+
*/
|
|
365
|
+
interface ZapierCacheEntry {
|
|
366
|
+
value: string;
|
|
367
|
+
/** Millisecond epoch. Undefined means "no expiration recorded." */
|
|
368
|
+
expiresAt?: number;
|
|
369
|
+
}
|
|
370
|
+
interface ZapierCacheSetOptions {
|
|
371
|
+
/**
|
|
372
|
+
* Hint that this value is sensitive. Adapters may use a more secure
|
|
373
|
+
* backend (e.g. the OS keychain for the filesystem adapter); adapters
|
|
374
|
+
* without a secure backend may throw, warn, or accept — their call.
|
|
375
|
+
*/
|
|
376
|
+
secret?: boolean;
|
|
377
|
+
/** Time-to-live in seconds from now. */
|
|
378
|
+
ttl?: number;
|
|
379
|
+
}
|
|
380
|
+
interface ZapierCache {
|
|
381
|
+
get(key: string): Promise<ZapierCacheEntry | undefined>;
|
|
382
|
+
set(key: string, value: string, options?: ZapierCacheSetOptions): Promise<void>;
|
|
383
|
+
delete(key: string): Promise<void>;
|
|
384
|
+
/**
|
|
385
|
+
* Optional mutex for caches that can coordinate beyond one JavaScript
|
|
386
|
+
* process. The SDK re-checks the cache inside the lock before rebuilding.
|
|
387
|
+
*/
|
|
388
|
+
withLock?<T>(key: string, fn: () => Promise<T>): Promise<T>;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Simplest possible adapter: a Map. No persistence, no locking (single
|
|
392
|
+
* process only), no differentiation between secrets and non-secrets.
|
|
393
|
+
* This is the default when cli-login isn't installed and no custom
|
|
394
|
+
* cache is provided.
|
|
395
|
+
*/
|
|
396
|
+
declare function createMemoryCache(): ZapierCache;
|
|
397
|
+
|
|
347
398
|
declare const NeedSchema: z.ZodObject<{
|
|
348
399
|
key: z.ZodString;
|
|
349
400
|
alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -378,7 +429,6 @@ declare const NeedSchema: z.ZodObject<{
|
|
|
378
429
|
boolean: "boolean";
|
|
379
430
|
file: "file";
|
|
380
431
|
integer: "integer";
|
|
381
|
-
filter: "filter";
|
|
382
432
|
text: "text";
|
|
383
433
|
datetime: "datetime";
|
|
384
434
|
decimal: "decimal";
|
|
@@ -386,6 +436,7 @@ declare const NeedSchema: z.ZodObject<{
|
|
|
386
436
|
password: "password";
|
|
387
437
|
dict: "dict";
|
|
388
438
|
code: "code";
|
|
439
|
+
filter: "filter";
|
|
389
440
|
json: "json";
|
|
390
441
|
}>>;
|
|
391
442
|
list: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -393,11 +444,11 @@ declare const NeedSchema: z.ZodObject<{
|
|
|
393
444
|
declare const ActionSchema: z.ZodObject<{
|
|
394
445
|
id: z.ZodOptional<z.ZodString>;
|
|
395
446
|
type: z.ZodEnum<{
|
|
396
|
-
search: "search";
|
|
397
447
|
filter: "filter";
|
|
398
448
|
read: "read";
|
|
399
449
|
read_bulk: "read_bulk";
|
|
400
450
|
run: "run";
|
|
451
|
+
search: "search";
|
|
401
452
|
search_and_write: "search_and_write";
|
|
402
453
|
search_or_write: "search_or_write";
|
|
403
454
|
write: "write";
|
|
@@ -585,7 +636,6 @@ declare const NeedsResponseSchema: z.ZodObject<{
|
|
|
585
636
|
boolean: "boolean";
|
|
586
637
|
file: "file";
|
|
587
638
|
integer: "integer";
|
|
588
|
-
filter: "filter";
|
|
589
639
|
text: "text";
|
|
590
640
|
datetime: "datetime";
|
|
591
641
|
decimal: "decimal";
|
|
@@ -593,6 +643,7 @@ declare const NeedsResponseSchema: z.ZodObject<{
|
|
|
593
643
|
password: "password";
|
|
594
644
|
dict: "dict";
|
|
595
645
|
code: "code";
|
|
646
|
+
filter: "filter";
|
|
596
647
|
json: "json";
|
|
597
648
|
}>>;
|
|
598
649
|
list: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -935,11 +986,11 @@ declare const ListInputFieldChoicesSchema: z.ZodObject<{
|
|
|
935
986
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
936
987
|
};
|
|
937
988
|
actionType: z.ZodEnum<{
|
|
938
|
-
search: "search";
|
|
939
989
|
filter: "filter";
|
|
940
990
|
read: "read";
|
|
941
991
|
read_bulk: "read_bulk";
|
|
942
992
|
run: "run";
|
|
993
|
+
search: "search";
|
|
943
994
|
search_and_write: "search_and_write";
|
|
944
995
|
search_or_write: "search_or_write";
|
|
945
996
|
write: "write";
|
|
@@ -964,11 +1015,11 @@ declare const ListInputFieldChoicesSchemaDeprecated: z.ZodObject<{
|
|
|
964
1015
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
965
1016
|
};
|
|
966
1017
|
actionType: z.ZodEnum<{
|
|
967
|
-
search: "search";
|
|
968
1018
|
filter: "filter";
|
|
969
1019
|
read: "read";
|
|
970
1020
|
read_bulk: "read_bulk";
|
|
971
1021
|
run: "run";
|
|
1022
|
+
search: "search";
|
|
972
1023
|
search_and_write: "search_and_write";
|
|
973
1024
|
search_or_write: "search_or_write";
|
|
974
1025
|
write: "write";
|
|
@@ -998,11 +1049,11 @@ declare const GetActionSchema: z.ZodObject<{
|
|
|
998
1049
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
999
1050
|
};
|
|
1000
1051
|
actionType: z.ZodEnum<{
|
|
1001
|
-
search: "search";
|
|
1002
1052
|
filter: "filter";
|
|
1003
1053
|
read: "read";
|
|
1004
1054
|
read_bulk: "read_bulk";
|
|
1005
1055
|
run: "run";
|
|
1056
|
+
search: "search";
|
|
1006
1057
|
search_and_write: "search_and_write";
|
|
1007
1058
|
search_or_write: "search_or_write";
|
|
1008
1059
|
write: "write";
|
|
@@ -1016,11 +1067,11 @@ declare const GetActionSchemaDeprecated: z.ZodObject<{
|
|
|
1016
1067
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1017
1068
|
};
|
|
1018
1069
|
actionType: z.ZodEnum<{
|
|
1019
|
-
search: "search";
|
|
1020
1070
|
filter: "filter";
|
|
1021
1071
|
read: "read";
|
|
1022
1072
|
read_bulk: "read_bulk";
|
|
1023
1073
|
run: "run";
|
|
1074
|
+
search: "search";
|
|
1024
1075
|
search_and_write: "search_and_write";
|
|
1025
1076
|
search_or_write: "search_or_write";
|
|
1026
1077
|
write: "write";
|
|
@@ -1039,11 +1090,11 @@ declare const ListActionsSchema: z.ZodObject<{
|
|
|
1039
1090
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1040
1091
|
};
|
|
1041
1092
|
actionType: z.ZodOptional<z.ZodEnum<{
|
|
1042
|
-
search: "search";
|
|
1043
1093
|
filter: "filter";
|
|
1044
1094
|
read: "read";
|
|
1045
1095
|
read_bulk: "read_bulk";
|
|
1046
1096
|
run: "run";
|
|
1097
|
+
search: "search";
|
|
1047
1098
|
search_and_write: "search_and_write";
|
|
1048
1099
|
search_or_write: "search_or_write";
|
|
1049
1100
|
write: "write";
|
|
@@ -1057,11 +1108,11 @@ declare const ListActionsSchemaDeprecated: z.ZodObject<{
|
|
|
1057
1108
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1058
1109
|
};
|
|
1059
1110
|
actionType: z.ZodOptional<z.ZodEnum<{
|
|
1060
|
-
search: "search";
|
|
1061
1111
|
filter: "filter";
|
|
1062
1112
|
read: "read";
|
|
1063
1113
|
read_bulk: "read_bulk";
|
|
1064
1114
|
run: "run";
|
|
1115
|
+
search: "search";
|
|
1065
1116
|
search_and_write: "search_and_write";
|
|
1066
1117
|
search_or_write: "search_or_write";
|
|
1067
1118
|
write: "write";
|
|
@@ -1257,11 +1308,11 @@ declare const ListInputFieldsSchema: z.ZodObject<{
|
|
|
1257
1308
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1258
1309
|
};
|
|
1259
1310
|
actionType: z.ZodEnum<{
|
|
1260
|
-
search: "search";
|
|
1261
1311
|
filter: "filter";
|
|
1262
1312
|
read: "read";
|
|
1263
1313
|
read_bulk: "read_bulk";
|
|
1264
1314
|
run: "run";
|
|
1315
|
+
search: "search";
|
|
1265
1316
|
search_and_write: "search_and_write";
|
|
1266
1317
|
search_or_write: "search_or_write";
|
|
1267
1318
|
write: "write";
|
|
@@ -1282,11 +1333,11 @@ declare const ListInputFieldsSchemaDeprecated: z.ZodObject<{
|
|
|
1282
1333
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1283
1334
|
};
|
|
1284
1335
|
actionType: z.ZodEnum<{
|
|
1285
|
-
search: "search";
|
|
1286
1336
|
filter: "filter";
|
|
1287
1337
|
read: "read";
|
|
1288
1338
|
read_bulk: "read_bulk";
|
|
1289
1339
|
run: "run";
|
|
1340
|
+
search: "search";
|
|
1290
1341
|
search_and_write: "search_and_write";
|
|
1291
1342
|
search_or_write: "search_or_write";
|
|
1292
1343
|
write: "write";
|
|
@@ -1463,6 +1514,7 @@ declare const BaseSdkOptionsSchema: z.ZodObject<{
|
|
|
1463
1514
|
name: string;
|
|
1464
1515
|
version: string;
|
|
1465
1516
|
}>>;
|
|
1517
|
+
cache: z.ZodOptional<z.ZodCustom<ZapierCache, ZapierCache>>;
|
|
1466
1518
|
canIncludeSharedConnections: z.ZodOptional<z.ZodBoolean>;
|
|
1467
1519
|
canIncludeSharedTables: z.ZodOptional<z.ZodBoolean>;
|
|
1468
1520
|
canDeleteTables: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1819,11 +1871,11 @@ declare const GetInputFieldsSchemaSchema: z.ZodObject<{
|
|
|
1819
1871
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1820
1872
|
};
|
|
1821
1873
|
actionType: z.ZodEnum<{
|
|
1822
|
-
search: "search";
|
|
1823
1874
|
filter: "filter";
|
|
1824
1875
|
read: "read";
|
|
1825
1876
|
read_bulk: "read_bulk";
|
|
1826
1877
|
run: "run";
|
|
1878
|
+
search: "search";
|
|
1827
1879
|
search_and_write: "search_and_write";
|
|
1828
1880
|
search_or_write: "search_or_write";
|
|
1829
1881
|
write: "write";
|
|
@@ -1841,11 +1893,11 @@ declare const GetInputFieldsSchemaSchemaDeprecated: z.ZodObject<{
|
|
|
1841
1893
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
1842
1894
|
};
|
|
1843
1895
|
actionType: z.ZodEnum<{
|
|
1844
|
-
search: "search";
|
|
1845
1896
|
filter: "filter";
|
|
1846
1897
|
read: "read";
|
|
1847
1898
|
read_bulk: "read_bulk";
|
|
1848
1899
|
run: "run";
|
|
1900
|
+
search: "search";
|
|
1849
1901
|
search_and_write: "search_and_write";
|
|
1850
1902
|
search_or_write: "search_or_write";
|
|
1851
1903
|
write: "write";
|
|
@@ -2106,6 +2158,9 @@ declare const ConnectionItemSchema: z.ZodObject<{
|
|
|
2106
2158
|
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
2107
2159
|
members: z.ZodOptional<z.ZodString>;
|
|
2108
2160
|
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
2161
|
+
public_id: z.ZodOptional<z.ZodString>;
|
|
2162
|
+
account_public_id: z.ZodOptional<z.ZodString>;
|
|
2163
|
+
customuser_public_id: z.ZodOptional<z.ZodString>;
|
|
2109
2164
|
id: z.ZodString;
|
|
2110
2165
|
account_id: z.ZodString;
|
|
2111
2166
|
implementation_id: z.ZodOptional<z.ZodString>;
|
|
@@ -2126,11 +2181,11 @@ declare const ActionItemSchema: z.ZodObject<{
|
|
|
2126
2181
|
app_key: z.ZodString;
|
|
2127
2182
|
app_version: z.ZodOptional<z.ZodString>;
|
|
2128
2183
|
action_type: z.ZodEnum<{
|
|
2129
|
-
search: "search";
|
|
2130
2184
|
filter: "filter";
|
|
2131
2185
|
read: "read";
|
|
2132
2186
|
read_bulk: "read_bulk";
|
|
2133
2187
|
run: "run";
|
|
2188
|
+
search: "search";
|
|
2134
2189
|
search_and_write: "search_and_write";
|
|
2135
2190
|
search_or_write: "search_or_write";
|
|
2136
2191
|
write: "write";
|
|
@@ -2245,11 +2300,11 @@ declare const AppPropertySchema: z.ZodString & {
|
|
|
2245
2300
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
2246
2301
|
};
|
|
2247
2302
|
declare const ActionTypePropertySchema: z.ZodEnum<{
|
|
2248
|
-
search: "search";
|
|
2249
2303
|
filter: "filter";
|
|
2250
2304
|
read: "read";
|
|
2251
2305
|
read_bulk: "read_bulk";
|
|
2252
2306
|
run: "run";
|
|
2307
|
+
search: "search";
|
|
2253
2308
|
search_and_write: "search_and_write";
|
|
2254
2309
|
search_or_write: "search_or_write";
|
|
2255
2310
|
write: "write";
|
|
@@ -2398,11 +2453,11 @@ declare const RunActionSchema: z.ZodObject<{
|
|
|
2398
2453
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
2399
2454
|
};
|
|
2400
2455
|
actionType: z.ZodEnum<{
|
|
2401
|
-
search: "search";
|
|
2402
2456
|
filter: "filter";
|
|
2403
2457
|
read: "read";
|
|
2404
2458
|
read_bulk: "read_bulk";
|
|
2405
2459
|
run: "run";
|
|
2460
|
+
search: "search";
|
|
2406
2461
|
search_and_write: "search_and_write";
|
|
2407
2462
|
search_or_write: "search_or_write";
|
|
2408
2463
|
write: "write";
|
|
@@ -2424,11 +2479,11 @@ declare const RunActionSchemaDeprecated: z.ZodObject<{
|
|
|
2424
2479
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
2425
2480
|
};
|
|
2426
2481
|
actionType: z.ZodEnum<{
|
|
2427
|
-
search: "search";
|
|
2428
2482
|
filter: "filter";
|
|
2429
2483
|
read: "read";
|
|
2430
2484
|
read_bulk: "read_bulk";
|
|
2431
2485
|
run: "run";
|
|
2486
|
+
search: "search";
|
|
2432
2487
|
search_and_write: "search_and_write";
|
|
2433
2488
|
search_or_write: "search_or_write";
|
|
2434
2489
|
write: "write";
|
|
@@ -3150,13 +3205,12 @@ declare const FieldItemSchema: z.ZodObject<{
|
|
|
3150
3205
|
string: "string";
|
|
3151
3206
|
number: "number";
|
|
3152
3207
|
boolean: "boolean";
|
|
3153
|
-
link: "link";
|
|
3154
|
-
email: "email";
|
|
3155
|
-
uuid: "uuid";
|
|
3156
3208
|
text: "text";
|
|
3157
3209
|
datetime: "datetime";
|
|
3158
3210
|
decimal: "decimal";
|
|
3159
3211
|
json: "json";
|
|
3212
|
+
email: "email";
|
|
3213
|
+
link: "link";
|
|
3160
3214
|
multiple_string: "multiple_string";
|
|
3161
3215
|
labeled_string: "labeled_string";
|
|
3162
3216
|
multiple_labeled_string: "multiple_labeled_string";
|
|
@@ -3165,6 +3219,7 @@ declare const FieldItemSchema: z.ZodObject<{
|
|
|
3165
3219
|
multiple_number: "multiple_number";
|
|
3166
3220
|
multiple_decimal: "multiple_decimal";
|
|
3167
3221
|
multiple_datetime: "multiple_datetime";
|
|
3222
|
+
uuid: "uuid";
|
|
3168
3223
|
multiple_uuid: "multiple_uuid";
|
|
3169
3224
|
multiple_json: "multiple_json";
|
|
3170
3225
|
formula: "formula";
|
|
@@ -3248,16 +3303,32 @@ interface ResolveAuthTokenOptions {
|
|
|
3248
3303
|
requiredScopes?: string[];
|
|
3249
3304
|
/** Enable debug logging for auth operations. */
|
|
3250
3305
|
debug?: boolean;
|
|
3306
|
+
/**
|
|
3307
|
+
* Pluggable key-value cache used to cache access tokens across
|
|
3308
|
+
* process boundaries. When omitted, the SDK tries to load a default
|
|
3309
|
+
* adapter from the cli-login package (file system + keychain) and
|
|
3310
|
+
* falls back to in-memory cache if none is available.
|
|
3311
|
+
*/
|
|
3312
|
+
cache?: ZapierCache;
|
|
3251
3313
|
}
|
|
3252
3314
|
/**
|
|
3253
|
-
* Clear
|
|
3315
|
+
* Clear in-process caches. Useful for testing or to force the next
|
|
3316
|
+
* resolve to re-import the default cache adapter. Does not touch
|
|
3317
|
+
* persistent cache — use `invalidateCachedToken` for that.
|
|
3254
3318
|
*/
|
|
3255
3319
|
declare function clearTokenCache(): void;
|
|
3256
3320
|
/**
|
|
3257
|
-
* Invalidate
|
|
3258
|
-
* Called
|
|
3321
|
+
* Invalidate the cached token for a given client_credentials identity.
|
|
3322
|
+
* Called on 401 so the next request re-exchanges. Clears both the
|
|
3323
|
+
* in-process pending-exchange map and the persistent layer via the
|
|
3324
|
+
* resolved cache adapter.
|
|
3259
3325
|
*/
|
|
3260
|
-
declare function invalidateCachedToken(
|
|
3326
|
+
declare function invalidateCachedToken(options: {
|
|
3327
|
+
clientId: string;
|
|
3328
|
+
scopes: string[];
|
|
3329
|
+
baseUrl: string;
|
|
3330
|
+
cache?: ZapierCache;
|
|
3331
|
+
}): Promise<void>;
|
|
3261
3332
|
/**
|
|
3262
3333
|
* Options for getTokenFromCliLogin.
|
|
3263
3334
|
*/
|
|
@@ -3314,7 +3385,9 @@ declare function resolveAuthToken(options?: ResolveAuthTokenOptions): Promise<st
|
|
|
3314
3385
|
declare function invalidateCredentialsToken(options: {
|
|
3315
3386
|
credentials?: Credentials;
|
|
3316
3387
|
token?: string;
|
|
3388
|
+
baseUrl?: string;
|
|
3317
3389
|
requiredScopes?: string[];
|
|
3390
|
+
cache?: ZapierCache;
|
|
3318
3391
|
}): Promise<void>;
|
|
3319
3392
|
|
|
3320
3393
|
/**
|
|
@@ -3566,13 +3639,12 @@ declare const CreateTableFieldsOptionsSchema: z.ZodObject<{
|
|
|
3566
3639
|
string: "string";
|
|
3567
3640
|
number: "number";
|
|
3568
3641
|
boolean: "boolean";
|
|
3569
|
-
link: "link";
|
|
3570
|
-
email: "email";
|
|
3571
|
-
uuid: "uuid";
|
|
3572
3642
|
text: "text";
|
|
3573
3643
|
datetime: "datetime";
|
|
3574
3644
|
decimal: "decimal";
|
|
3575
3645
|
json: "json";
|
|
3646
|
+
email: "email";
|
|
3647
|
+
link: "link";
|
|
3576
3648
|
multiple_string: "multiple_string";
|
|
3577
3649
|
labeled_string: "labeled_string";
|
|
3578
3650
|
multiple_labeled_string: "multiple_labeled_string";
|
|
@@ -3581,6 +3653,7 @@ declare const CreateTableFieldsOptionsSchema: z.ZodObject<{
|
|
|
3581
3653
|
multiple_number: "multiple_number";
|
|
3582
3654
|
multiple_decimal: "multiple_decimal";
|
|
3583
3655
|
multiple_datetime: "multiple_datetime";
|
|
3656
|
+
uuid: "uuid";
|
|
3584
3657
|
multiple_uuid: "multiple_uuid";
|
|
3585
3658
|
multiple_json: "multiple_json";
|
|
3586
3659
|
formula: "formula";
|
|
@@ -3606,13 +3679,12 @@ declare const CreateTableFieldsOptionsSchemaDeprecated: z.ZodObject<{
|
|
|
3606
3679
|
string: "string";
|
|
3607
3680
|
number: "number";
|
|
3608
3681
|
boolean: "boolean";
|
|
3609
|
-
link: "link";
|
|
3610
|
-
email: "email";
|
|
3611
|
-
uuid: "uuid";
|
|
3612
3682
|
text: "text";
|
|
3613
3683
|
datetime: "datetime";
|
|
3614
3684
|
decimal: "decimal";
|
|
3615
3685
|
json: "json";
|
|
3686
|
+
email: "email";
|
|
3687
|
+
link: "link";
|
|
3616
3688
|
multiple_string: "multiple_string";
|
|
3617
3689
|
labeled_string: "labeled_string";
|
|
3618
3690
|
multiple_labeled_string: "multiple_labeled_string";
|
|
@@ -3621,6 +3693,7 @@ declare const CreateTableFieldsOptionsSchemaDeprecated: z.ZodObject<{
|
|
|
3621
3693
|
multiple_number: "multiple_number";
|
|
3622
3694
|
multiple_decimal: "multiple_decimal";
|
|
3623
3695
|
multiple_datetime: "multiple_datetime";
|
|
3696
|
+
uuid: "uuid";
|
|
3624
3697
|
multiple_uuid: "multiple_uuid";
|
|
3625
3698
|
multiple_json: "multiple_json";
|
|
3626
3699
|
formula: "formula";
|
|
@@ -3712,9 +3785,9 @@ declare const ListTableRecordsOptionsSchema: z.ZodObject<{
|
|
|
3712
3785
|
operator: z.ZodEnum<{
|
|
3713
3786
|
in: "in";
|
|
3714
3787
|
search: "search";
|
|
3715
|
-
contains: "contains";
|
|
3716
3788
|
exact: "exact";
|
|
3717
3789
|
different: "different";
|
|
3790
|
+
contains: "contains";
|
|
3718
3791
|
icontains: "icontains";
|
|
3719
3792
|
gte: "gte";
|
|
3720
3793
|
gt: "gt";
|
|
@@ -3749,9 +3822,9 @@ declare const ListTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
|
|
|
3749
3822
|
operator: z.ZodEnum<{
|
|
3750
3823
|
in: "in";
|
|
3751
3824
|
search: "search";
|
|
3752
|
-
contains: "contains";
|
|
3753
3825
|
exact: "exact";
|
|
3754
3826
|
different: "different";
|
|
3827
|
+
contains: "contains";
|
|
3755
3828
|
icontains: "icontains";
|
|
3756
3829
|
gte: "gte";
|
|
3757
3830
|
gt: "gt";
|
|
@@ -3929,4 +4002,4 @@ declare const updateTableRecordsPlugin: Plugin<ApiPluginProvides & EventEmission
|
|
|
3929
4002
|
*/
|
|
3930
4003
|
declare const registryPlugin: Plugin<{}, {}>;
|
|
3931
4004
|
|
|
3932
|
-
export { type Action, type ActionEntry, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionProperty, ActionPropertySchema, type ActionTimeoutMsProperty, ActionTimeoutMsPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type AddActionEntryOptions, type AddActionEntryResult, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppFactoryInput, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppProperty, AppPropertySchema, type ApplicationLifecycleEventData, type ApprovalStatus, type AppsPluginProvides, type AppsProperty, AppsPropertySchema, type ArrayResolver, type AuthEvent, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type BaseEvent, BaseSdkOptionsSchema, type BatchOptions, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, type Choice, type ClientCredentialsObject, ClientCredentialsObjectSchema, type Connection, type ConnectionEntry, ConnectionEntrySchema, type ConnectionIdProperty, ConnectionIdPropertySchema, type ConnectionItem, type ConnectionProperty, ConnectionPropertySchema, type ConnectionsMap, ConnectionsMapSchema, type ConnectionsPluginProvides, type ConnectionsProperty, ConnectionsPropertySchema, type ConnectionsResponse, type CreateClientCredentialsPluginProvides, type CreateTableFieldsPluginProvides, type CreateTablePluginProvides, type CreateTableRecordsPluginProvides, type Credentials, type CredentialsFunction, CredentialsFunctionSchema, type CredentialsObject, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, type DebugProperty, DebugPropertySchema, type DeleteClientCredentialsPluginProvides, type DeleteTableFieldsPluginProvides, type DeleteTablePluginProvides, type DeleteTableRecordsPluginProvides, type DynamicResolver, type EnhancedErrorEventData, type ErrorOptions, type EventCallback, type EventContext, type EventEmissionContext, type EventEmissionProvides, type FetchPluginProvides, type Field, type FieldsProperty, FieldsPropertySchema, type FieldsResolver, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindFirstConnectionPluginProvides, type FindUniqueAuthenticationPluginProvides, type FindUniqueConnectionPluginProvides, type FormatMetadata, type FormattedItem, type FunctionDeprecation, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetConnectionPluginProvides, type GetProfilePluginProvides, type GetTablePluginProvides, type GetTableRecordPluginProvides, type InfoFieldItem, type InputFieldItem, type InputFieldProperty, InputFieldPropertySchema, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListClientCredentialsPluginProvides, type ListConnectionsPluginProvides, type ListInputFieldsPluginProvides, type ListTableFieldsPluginProvides, type ListTableRecordsPluginProvides, type ListTablesPluginProvides, type LoadingEvent, MAX_PAGE_LIMIT, type Manifest, type ManifestEntry, type ManifestPluginOptions, type ManifestPluginProvides, type MethodCalledEvent, type MethodCalledEventData, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputFormatter, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type PkceCredentialsObject, PkceCredentialsObjectSchema, type Plugin, type PluginProvides, type PositionalMetadata, type RateLimitInfo, type RecordProperty, RecordPropertySchema, type RecordsProperty, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type ResolveAuthTokenOptions, type ResolveCredentialsOptions, type ResolvedCredentials, ResolvedCredentialsSchema, type Resolver, type ResolverMetadata, type RootFieldItem, type RunActionPluginProvides, type SdkEvent, type SdkPage, type StaticResolver, type TableProperty, TablePropertySchema, type TablesProperty, TablesPropertySchema, type UpdateManifestEntryOptions, type UpdateManifestEntryResult, type UpdateTableRecordsPluginProvides, type UserProfile, type UserProfileItem, type WithAddPlugin, ZAPIER_BASE_URL, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createOptionsPlugin, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierSdk, createZapierSdkWithoutRegistry, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierIsInteractive, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listInputFieldsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, updateTableRecordsPlugin };
|
|
4005
|
+
export { type Action, type ActionEntry, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionProperty, ActionPropertySchema, type ActionTimeoutMsProperty, ActionTimeoutMsPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type AddActionEntryOptions, type AddActionEntryResult, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppFactoryInput, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppProperty, AppPropertySchema, type ApplicationLifecycleEventData, type ApprovalStatus, type AppsPluginProvides, type AppsProperty, AppsPropertySchema, type ArrayResolver, type AuthEvent, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type BaseEvent, BaseSdkOptionsSchema, type BatchOptions, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, type Choice, type ClientCredentialsObject, ClientCredentialsObjectSchema, type Connection, type ConnectionEntry, ConnectionEntrySchema, type ConnectionIdProperty, ConnectionIdPropertySchema, type ConnectionItem, type ConnectionProperty, ConnectionPropertySchema, type ConnectionsMap, ConnectionsMapSchema, type ConnectionsPluginProvides, type ConnectionsProperty, ConnectionsPropertySchema, type ConnectionsResponse, type CreateClientCredentialsPluginProvides, type CreateTableFieldsPluginProvides, type CreateTablePluginProvides, type CreateTableRecordsPluginProvides, type Credentials, type CredentialsFunction, CredentialsFunctionSchema, type CredentialsObject, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, type DebugProperty, DebugPropertySchema, type DeleteClientCredentialsPluginProvides, type DeleteTableFieldsPluginProvides, type DeleteTablePluginProvides, type DeleteTableRecordsPluginProvides, type DynamicResolver, type EnhancedErrorEventData, type ErrorOptions, type EventCallback, type EventContext, type EventEmissionContext, type EventEmissionProvides, type FetchPluginProvides, type Field, type FieldsProperty, FieldsPropertySchema, type FieldsResolver, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindFirstConnectionPluginProvides, type FindUniqueAuthenticationPluginProvides, type FindUniqueConnectionPluginProvides, type FormatMetadata, type FormattedItem, type FunctionDeprecation, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetConnectionPluginProvides, type GetProfilePluginProvides, type GetTablePluginProvides, type GetTableRecordPluginProvides, type InfoFieldItem, type InputFieldItem, type InputFieldProperty, InputFieldPropertySchema, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListClientCredentialsPluginProvides, type ListConnectionsPluginProvides, type ListInputFieldsPluginProvides, type ListTableFieldsPluginProvides, type ListTableRecordsPluginProvides, type ListTablesPluginProvides, type LoadingEvent, MAX_PAGE_LIMIT, type Manifest, type ManifestEntry, type ManifestPluginOptions, type ManifestPluginProvides, type MethodCalledEvent, type MethodCalledEventData, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputFormatter, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type PkceCredentialsObject, PkceCredentialsObjectSchema, type Plugin, type PluginProvides, type PositionalMetadata, type RateLimitInfo, type RecordProperty, RecordPropertySchema, type RecordsProperty, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type ResolveAuthTokenOptions, type ResolveCredentialsOptions, type ResolvedCredentials, ResolvedCredentialsSchema, type Resolver, type ResolverMetadata, type RootFieldItem, type RunActionPluginProvides, type SdkEvent, type SdkPage, type StaticResolver, type TableProperty, TablePropertySchema, type TablesProperty, TablesPropertySchema, type UpdateManifestEntryOptions, type UpdateManifestEntryResult, type UpdateTableRecordsPluginProvides, type UserProfile, type UserProfileItem, type WithAddPlugin, ZAPIER_BASE_URL, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, type ZapierCache, type ZapierCacheEntry, type ZapierCacheSetOptions, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createMemoryCache, createOptionsPlugin, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierSdk, createZapierSdkWithoutRegistry, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierIsInteractive, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listInputFieldsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, updateTableRecordsPlugin };
|