@zapier/zapier-sdk 0.88.0 → 0.89.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 +105 -0
- package/dist/{chunk-IXLMFSFV.mjs → chunk-NOPKQ333.mjs} +366 -144
- package/dist/{chunk-AVB4LBN5.cjs → chunk-UBI5FOL5.cjs} +367 -143
- package/dist/experimental.cjs +492 -342
- package/dist/experimental.d.mts +119 -3
- package/dist/experimental.d.ts +119 -3
- package/dist/experimental.mjs +144 -2
- package/dist/{index-CGfO1ZB1.d.mts → index-BBBkZ80x.d.mts} +155 -20
- package/dist/{index-CGfO1ZB1.d.ts → index-BBBkZ80x.d.ts} +155 -20
- package/dist/index.cjs +278 -270
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -171,12 +171,19 @@ function composeVoid(existing, added) {
|
|
|
171
171
|
isolated.add(composed);
|
|
172
172
|
return composed;
|
|
173
173
|
}
|
|
174
|
+
function composeAnnotators(existing, added) {
|
|
175
|
+
if (!existing) return added;
|
|
176
|
+
if (!added) return existing;
|
|
177
|
+
return (ctx) => ({ ...existing(ctx), ...added(ctx) });
|
|
178
|
+
}
|
|
174
179
|
function buildHooks(existing, added) {
|
|
175
180
|
const result = {};
|
|
176
181
|
const start2 = composeVoid(existing.onMethodStart, added.onMethodStart);
|
|
177
182
|
if (start2) result.onMethodStart = start2;
|
|
178
183
|
const end = composeVoid(existing.onMethodEnd, added.onMethodEnd);
|
|
179
184
|
if (end) result.onMethodEnd = end;
|
|
185
|
+
const annotator = composeAnnotators(existing.annotator, added.annotator);
|
|
186
|
+
if (annotator) result.annotator = annotator;
|
|
180
187
|
return result;
|
|
181
188
|
}
|
|
182
189
|
function createDeprecationLogger(tag) {
|
|
@@ -578,11 +585,14 @@ function generateCallId() {
|
|
|
578
585
|
}
|
|
579
586
|
return null;
|
|
580
587
|
}
|
|
581
|
-
function rootCallContext(
|
|
588
|
+
function rootCallContext({
|
|
589
|
+
callOrigin = "surface"
|
|
590
|
+
} = {}) {
|
|
582
591
|
return {
|
|
583
592
|
callId: generateCallId(),
|
|
584
593
|
depth: 0,
|
|
585
594
|
annotations: {},
|
|
595
|
+
callOrigin,
|
|
586
596
|
[CALL_CONTEXT_BRAND]: true
|
|
587
597
|
};
|
|
588
598
|
}
|
|
@@ -591,6 +601,7 @@ function childCallContext(parent) {
|
|
|
591
601
|
callId: parent.callId,
|
|
592
602
|
depth: parent.depth + 1,
|
|
593
603
|
annotations: {},
|
|
604
|
+
callOrigin: parent.callOrigin,
|
|
594
605
|
[CALL_CONTEXT_BRAND]: true
|
|
595
606
|
};
|
|
596
607
|
}
|
|
@@ -612,6 +623,28 @@ var INTERNAL_CALL = Symbol("kitcore.internalCall");
|
|
|
612
623
|
function resolveCallContext(secondArg) {
|
|
613
624
|
return isCallContext(secondArg) ? secondArg : rootCallContext();
|
|
614
625
|
}
|
|
626
|
+
var hookAnnotatorReentrancy = 0;
|
|
627
|
+
function applyAnnotations({
|
|
628
|
+
context,
|
|
629
|
+
methodName,
|
|
630
|
+
input,
|
|
631
|
+
hookAnnotator,
|
|
632
|
+
methodAnnotator
|
|
633
|
+
}) {
|
|
634
|
+
if (hookAnnotator && !isInsideObserver() && context.depth === 0 && context.callOrigin !== "internal" && hookAnnotatorReentrancy === 0) {
|
|
635
|
+
hookAnnotatorReentrancy++;
|
|
636
|
+
try {
|
|
637
|
+
Object.assign(context.annotations, hookAnnotator({ methodName, input }));
|
|
638
|
+
} catch {
|
|
639
|
+
} finally {
|
|
640
|
+
hookAnnotatorReentrancy--;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
try {
|
|
644
|
+
Object.assign(context.annotations, methodAnnotator?.(input));
|
|
645
|
+
} catch {
|
|
646
|
+
}
|
|
647
|
+
}
|
|
615
648
|
function signalDeprecation(context, methodName, getDeprecation) {
|
|
616
649
|
if (isInsideObserver()) return;
|
|
617
650
|
const deprecation = getDeprecation?.();
|
|
@@ -637,7 +670,7 @@ function normalizeError(error, adaptError) {
|
|
|
637
670
|
);
|
|
638
671
|
}
|
|
639
672
|
function createFunction(coreFn, options) {
|
|
640
|
-
const { sdk, schema, name, getDeprecation } = options;
|
|
673
|
+
const { sdk, schema, name, annotator, getDeprecation } = options;
|
|
641
674
|
const functionName = name || coreFn.name;
|
|
642
675
|
const namedFunctions = {
|
|
643
676
|
[functionName]: async function(callOptions) {
|
|
@@ -651,14 +684,26 @@ function createFunction(coreFn, options) {
|
|
|
651
684
|
const normalizedOptions = callOptions ?? {};
|
|
652
685
|
const args = [normalizedOptions];
|
|
653
686
|
const depth = Math.max(context.depth, getCurrentDepth());
|
|
654
|
-
const
|
|
687
|
+
const insideObserver = isInsideObserver();
|
|
688
|
+
const hooks = insideObserver ? void 0 : sdk.context.hooks;
|
|
655
689
|
const adaptError = resolveCoreOptions(sdk.context)?.adaptError;
|
|
656
|
-
|
|
690
|
+
applyAnnotations({
|
|
691
|
+
context,
|
|
692
|
+
methodName: functionName,
|
|
693
|
+
input: normalizedOptions,
|
|
694
|
+
hookAnnotator: hooks?.annotator,
|
|
695
|
+
methodAnnotator: annotator
|
|
696
|
+
});
|
|
697
|
+
const hookBase = {
|
|
657
698
|
methodName: functionName,
|
|
658
699
|
args,
|
|
659
700
|
isPaginated: false,
|
|
660
|
-
depth
|
|
661
|
-
|
|
701
|
+
depth,
|
|
702
|
+
callId: context.callId,
|
|
703
|
+
callOrigin: context.callOrigin,
|
|
704
|
+
annotations: context.annotations
|
|
705
|
+
};
|
|
706
|
+
hooks?.onMethodStart?.({ ...hookBase });
|
|
662
707
|
try {
|
|
663
708
|
let result;
|
|
664
709
|
if (schema) {
|
|
@@ -680,20 +725,14 @@ function createFunction(coreFn, options) {
|
|
|
680
725
|
result = await coreFn(normalizedOptions, context);
|
|
681
726
|
}
|
|
682
727
|
hooks?.onMethodEnd?.({
|
|
683
|
-
|
|
684
|
-
args,
|
|
685
|
-
isPaginated: false,
|
|
686
|
-
depth,
|
|
728
|
+
...hookBase,
|
|
687
729
|
durationMs: Date.now() - startTime
|
|
688
730
|
});
|
|
689
731
|
return result;
|
|
690
732
|
} catch (error) {
|
|
691
733
|
const normalizedError = normalizeError(error, adaptError);
|
|
692
734
|
hooks?.onMethodEnd?.({
|
|
693
|
-
|
|
694
|
-
args,
|
|
695
|
-
isPaginated: false,
|
|
696
|
-
depth,
|
|
735
|
+
...hookBase,
|
|
697
736
|
durationMs: Date.now() - startTime,
|
|
698
737
|
error: normalizedError
|
|
699
738
|
});
|
|
@@ -705,7 +744,7 @@ function createFunction(coreFn, options) {
|
|
|
705
744
|
return namedFunctions[functionName];
|
|
706
745
|
}
|
|
707
746
|
function createRawFunction(coreFn, options) {
|
|
708
|
-
const { sdk, name, schema, positional, getDeprecation } = options;
|
|
747
|
+
const { sdk, name, schema, positional, annotator, getDeprecation } = options;
|
|
709
748
|
return function(rawInput) {
|
|
710
749
|
const internal = arguments[1];
|
|
711
750
|
const context = resolveCallContext(internal);
|
|
@@ -715,23 +754,32 @@ function createRawFunction(coreFn, options) {
|
|
|
715
754
|
return runInMethodScope(() => {
|
|
716
755
|
const startTime = Date.now();
|
|
717
756
|
const depth = Math.max(context.depth, getCurrentDepth());
|
|
718
|
-
const
|
|
757
|
+
const insideObserver = isInsideObserver();
|
|
758
|
+
const hooks = insideObserver ? void 0 : sdk.context.hooks;
|
|
719
759
|
const adaptError = resolveCoreOptions(sdk.context)?.adaptError;
|
|
720
760
|
const input = schema ? rawInput ?? {} : rawInput;
|
|
761
|
+
applyAnnotations({
|
|
762
|
+
context,
|
|
763
|
+
methodName: name,
|
|
764
|
+
input,
|
|
765
|
+
hookAnnotator: hooks?.annotator,
|
|
766
|
+
methodAnnotator: annotator
|
|
767
|
+
});
|
|
721
768
|
const record = input;
|
|
722
769
|
const args = positional ? positional.filter((key) => record?.[key] !== void 0).map((key) => record?.[key]) : [input];
|
|
723
|
-
|
|
770
|
+
const hookBase = {
|
|
724
771
|
methodName: name,
|
|
725
772
|
args,
|
|
726
773
|
isPaginated: false,
|
|
727
|
-
depth
|
|
728
|
-
|
|
774
|
+
depth,
|
|
775
|
+
callId: context.callId,
|
|
776
|
+
callOrigin: context.callOrigin,
|
|
777
|
+
annotations: context.annotations
|
|
778
|
+
};
|
|
779
|
+
hooks?.onMethodStart?.({ ...hookBase });
|
|
729
780
|
const fireEnd = (error) => {
|
|
730
781
|
hooks?.onMethodEnd?.({
|
|
731
|
-
|
|
732
|
-
args,
|
|
733
|
-
isPaginated: false,
|
|
734
|
-
depth,
|
|
782
|
+
...hookBase,
|
|
735
783
|
durationMs: Date.now() - startTime,
|
|
736
784
|
...error ? { error } : {}
|
|
737
785
|
});
|
|
@@ -798,7 +846,15 @@ function createPageFunction(coreFn, {
|
|
|
798
846
|
return namedFunctions[functionName];
|
|
799
847
|
}
|
|
800
848
|
function createPaginatedFunction(coreFn, options) {
|
|
801
|
-
const {
|
|
849
|
+
const {
|
|
850
|
+
sdk,
|
|
851
|
+
schema,
|
|
852
|
+
name,
|
|
853
|
+
defaultPageSize,
|
|
854
|
+
adaptPage,
|
|
855
|
+
annotator,
|
|
856
|
+
getDeprecation
|
|
857
|
+
} = options;
|
|
802
858
|
const pageFunction = createPageFunction(coreFn, { sdk, adaptPage });
|
|
803
859
|
const functionName = name || coreFn.name;
|
|
804
860
|
const namedFunctions = {
|
|
@@ -813,14 +869,26 @@ function createPaginatedFunction(coreFn, options) {
|
|
|
813
869
|
const normalizedOptions = callOptions ?? {};
|
|
814
870
|
const args = [normalizedOptions];
|
|
815
871
|
const depth = Math.max(context.depth, getCurrentDepth());
|
|
816
|
-
const
|
|
872
|
+
const insideObserver = isInsideObserver();
|
|
873
|
+
const hooks = insideObserver ? void 0 : sdk.context.hooks;
|
|
817
874
|
const adaptError = resolveCoreOptions(sdk.context)?.adaptError;
|
|
818
|
-
|
|
875
|
+
applyAnnotations({
|
|
876
|
+
context,
|
|
877
|
+
methodName: functionName,
|
|
878
|
+
input: normalizedOptions,
|
|
879
|
+
hookAnnotator: hooks?.annotator,
|
|
880
|
+
methodAnnotator: annotator
|
|
881
|
+
});
|
|
882
|
+
const hookBase = {
|
|
819
883
|
methodName: functionName,
|
|
820
884
|
args,
|
|
821
885
|
isPaginated: true,
|
|
822
|
-
depth
|
|
823
|
-
|
|
886
|
+
depth,
|
|
887
|
+
callId: context.callId,
|
|
888
|
+
callOrigin: context.callOrigin,
|
|
889
|
+
annotations: context.annotations
|
|
890
|
+
};
|
|
891
|
+
hooks?.onMethodStart?.({ ...hookBase });
|
|
824
892
|
try {
|
|
825
893
|
const validatedOptions = {
|
|
826
894
|
...normalizedOptions,
|
|
@@ -846,19 +914,13 @@ function createPaginatedFunction(coreFn, options) {
|
|
|
846
914
|
firstPagePromise.then(
|
|
847
915
|
() => {
|
|
848
916
|
hooks.onMethodEnd({
|
|
849
|
-
|
|
850
|
-
args,
|
|
851
|
-
isPaginated: true,
|
|
852
|
-
depth,
|
|
917
|
+
...hookBase,
|
|
853
918
|
durationMs: Date.now() - startTime
|
|
854
919
|
});
|
|
855
920
|
},
|
|
856
921
|
(error) => {
|
|
857
922
|
hooks.onMethodEnd({
|
|
858
|
-
|
|
859
|
-
args,
|
|
860
|
-
isPaginated: true,
|
|
861
|
-
depth,
|
|
923
|
+
...hookBase,
|
|
862
924
|
durationMs: Date.now() - startTime,
|
|
863
925
|
error: error instanceof Error ? error : new Error(String(error))
|
|
864
926
|
});
|
|
@@ -897,10 +959,7 @@ function createPaginatedFunction(coreFn, options) {
|
|
|
897
959
|
} catch (error) {
|
|
898
960
|
const normalizedError = normalizeError(error, adaptError);
|
|
899
961
|
hooks?.onMethodEnd?.({
|
|
900
|
-
|
|
901
|
-
args,
|
|
902
|
-
isPaginated: true,
|
|
903
|
-
depth,
|
|
962
|
+
...hookBase,
|
|
904
963
|
durationMs: Date.now() - startTime,
|
|
905
964
|
error: normalizedError
|
|
906
965
|
});
|
|
@@ -1316,6 +1375,7 @@ function defineMethod(config) {
|
|
|
1316
1375
|
meta: collectLeafMeta(config),
|
|
1317
1376
|
resolvers: config.resolvers,
|
|
1318
1377
|
formatter: config.formatter,
|
|
1378
|
+
annotator: config.annotator,
|
|
1319
1379
|
output: config.output,
|
|
1320
1380
|
positional: config.positional,
|
|
1321
1381
|
setup: config.setup,
|
|
@@ -1475,7 +1535,8 @@ function defineHook(config) {
|
|
|
1475
1535
|
setup: config.setup,
|
|
1476
1536
|
dispose: config.dispose,
|
|
1477
1537
|
wrap: config.wrap,
|
|
1478
|
-
observe: config.observe
|
|
1538
|
+
observe: config.observe,
|
|
1539
|
+
annotator: config.annotator
|
|
1479
1540
|
};
|
|
1480
1541
|
}
|
|
1481
1542
|
function declarePlugin(config) {
|
|
@@ -1901,7 +1962,14 @@ function collectPlugins(root, materialized = /* @__PURE__ */ new Set(), configur
|
|
|
1901
1962
|
}
|
|
1902
1963
|
return byId;
|
|
1903
1964
|
}
|
|
1904
|
-
function bindValue(
|
|
1965
|
+
function bindValue({
|
|
1966
|
+
target,
|
|
1967
|
+
key,
|
|
1968
|
+
entry,
|
|
1969
|
+
bindMode = "surface",
|
|
1970
|
+
ctx,
|
|
1971
|
+
frameworkOrigin = false
|
|
1972
|
+
}) {
|
|
1905
1973
|
if (entry.pluginType === "property" && entry.getValue) {
|
|
1906
1974
|
Object.defineProperty(target, key, {
|
|
1907
1975
|
get: entry.getValue,
|
|
@@ -1909,7 +1977,7 @@ function bindValue(target, key, entry, callType = "surface", ctx) {
|
|
|
1909
1977
|
configurable: true
|
|
1910
1978
|
});
|
|
1911
1979
|
} else {
|
|
1912
|
-
const value =
|
|
1980
|
+
const value = bindMode === "internal" && entry.pluginType === "method" ? entry.bindInternal?.({ ctx, frameworkOrigin }) ?? entry.internalValue ?? entry.value : entry.value;
|
|
1913
1981
|
Object.defineProperty(target, key, {
|
|
1914
1982
|
value,
|
|
1915
1983
|
writable: true,
|
|
@@ -1927,7 +1995,12 @@ function buildSurface(context, ...maps) {
|
|
|
1927
1995
|
sdk[CONTEXT] = context;
|
|
1928
1996
|
return sdk;
|
|
1929
1997
|
}
|
|
1930
|
-
function buildImports(
|
|
1998
|
+
function buildImports({
|
|
1999
|
+
plugins,
|
|
2000
|
+
importBindings,
|
|
2001
|
+
ctx,
|
|
2002
|
+
frameworkOrigin = false
|
|
2003
|
+
}) {
|
|
1931
2004
|
const imports = {};
|
|
1932
2005
|
for (const { binding, id, optional } of importBindings) {
|
|
1933
2006
|
const entry = plugins[id];
|
|
@@ -1940,10 +2013,31 @@ function buildImports(plugins, importBindings, ctx) {
|
|
|
1940
2013
|
});
|
|
1941
2014
|
continue;
|
|
1942
2015
|
}
|
|
1943
|
-
bindValue(
|
|
2016
|
+
bindValue({
|
|
2017
|
+
target: imports,
|
|
2018
|
+
key: binding,
|
|
2019
|
+
entry,
|
|
2020
|
+
bindMode: "internal",
|
|
2021
|
+
ctx,
|
|
2022
|
+
frameworkOrigin
|
|
2023
|
+
});
|
|
1944
2024
|
}
|
|
1945
2025
|
return imports;
|
|
1946
2026
|
}
|
|
2027
|
+
function bindInternalTwin({
|
|
2028
|
+
ctx,
|
|
2029
|
+
frameworkOrigin,
|
|
2030
|
+
withContext,
|
|
2031
|
+
internalValue
|
|
2032
|
+
}) {
|
|
2033
|
+
if (ctx) {
|
|
2034
|
+
return (...args) => withContext(childCallContext(ctx))(...args);
|
|
2035
|
+
}
|
|
2036
|
+
if (frameworkOrigin) {
|
|
2037
|
+
return (...args) => withContext(rootCallContext({ callOrigin: "internal" }))(...args);
|
|
2038
|
+
}
|
|
2039
|
+
return internalValue;
|
|
2040
|
+
}
|
|
1947
2041
|
function mirrorLegacyRootKeys(context, rootKeys, meta) {
|
|
1948
2042
|
const exports = {};
|
|
1949
2043
|
for (const [name, value] of Object.entries(rootKeys)) {
|
|
@@ -2007,7 +2101,11 @@ function bindResolver(resolver, plugins) {
|
|
|
2007
2101
|
case "info":
|
|
2008
2102
|
return { type: "info", text: resolver.text };
|
|
2009
2103
|
case "object": {
|
|
2010
|
-
const imports = buildImports(
|
|
2104
|
+
const imports = buildImports({
|
|
2105
|
+
plugins,
|
|
2106
|
+
importBindings: resolver.importBindings,
|
|
2107
|
+
frameworkOrigin: true
|
|
2108
|
+
});
|
|
2011
2109
|
const bound = {
|
|
2012
2110
|
type: "object",
|
|
2013
2111
|
requireParameters: resolver.requireParameters
|
|
@@ -2048,7 +2146,11 @@ function bindResolver(resolver, plugins) {
|
|
|
2048
2146
|
return bound;
|
|
2049
2147
|
}
|
|
2050
2148
|
case "dynamic": {
|
|
2051
|
-
const imports = buildImports(
|
|
2149
|
+
const imports = buildImports({
|
|
2150
|
+
plugins,
|
|
2151
|
+
importBindings: resolver.importBindings,
|
|
2152
|
+
frameworkOrigin: true
|
|
2153
|
+
});
|
|
2052
2154
|
const {
|
|
2053
2155
|
getContext: getContext2,
|
|
2054
2156
|
listItems,
|
|
@@ -2103,7 +2205,11 @@ function bindDefinitions(definitions, plugins) {
|
|
|
2103
2205
|
return out;
|
|
2104
2206
|
}
|
|
2105
2207
|
function bindFormatter(formatter, plugins) {
|
|
2106
|
-
const imports = buildImports(
|
|
2208
|
+
const imports = buildImports({
|
|
2209
|
+
plugins,
|
|
2210
|
+
importBindings: formatter.importBindings,
|
|
2211
|
+
frameworkOrigin: true
|
|
2212
|
+
});
|
|
2107
2213
|
const bound = { format: formatter.format };
|
|
2108
2214
|
const { getContext: getContext2 } = formatter;
|
|
2109
2215
|
if (getContext2)
|
|
@@ -2190,17 +2296,32 @@ function buildMethodEntries(descriptors, context, states) {
|
|
|
2190
2296
|
// Replaced below; never called.
|
|
2191
2297
|
value: () => void 0
|
|
2192
2298
|
};
|
|
2193
|
-
const callRun = (input, ctx) =>
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2299
|
+
const callRun = (input, ctx) => {
|
|
2300
|
+
const callContext = ctx ?? rootCallContext();
|
|
2301
|
+
return descriptor.run({
|
|
2302
|
+
imports: buildImports({
|
|
2303
|
+
plugins,
|
|
2304
|
+
importBindings: descriptor.importBindings,
|
|
2305
|
+
ctx: callContext
|
|
2306
|
+
}),
|
|
2307
|
+
state: states.get(id),
|
|
2308
|
+
input,
|
|
2309
|
+
callContext,
|
|
2310
|
+
annotate: (metadata) => {
|
|
2311
|
+
Object.assign(callContext.annotations, metadata);
|
|
2312
|
+
}
|
|
2313
|
+
});
|
|
2314
|
+
};
|
|
2198
2315
|
const fold = (coreFn) => (input, ctx) => {
|
|
2199
2316
|
let next = (i) => coreFn(i, ctx);
|
|
2200
2317
|
for (const wrap of entry.chain) {
|
|
2201
2318
|
const inner = next;
|
|
2202
2319
|
next = (i) => wrap.run({
|
|
2203
|
-
imports: buildImports(
|
|
2320
|
+
imports: buildImports({
|
|
2321
|
+
plugins,
|
|
2322
|
+
importBindings: wrap.owner.importBindings,
|
|
2323
|
+
ctx
|
|
2324
|
+
}),
|
|
2204
2325
|
next: inner,
|
|
2205
2326
|
input: i,
|
|
2206
2327
|
// Overwritten by the chain item's own closure with the owning
|
|
@@ -2211,6 +2332,8 @@ function buildMethodEntries(descriptors, context, states) {
|
|
|
2211
2332
|
return next(input);
|
|
2212
2333
|
};
|
|
2213
2334
|
const sdk = { context };
|
|
2335
|
+
const methodAnnotator = descriptor.annotator;
|
|
2336
|
+
const boundAnnotator = methodAnnotator ? (input) => methodAnnotator({ input }) : void 0;
|
|
2214
2337
|
if (out.type === "list") {
|
|
2215
2338
|
entry.value = createPaginatedFunction(
|
|
2216
2339
|
fold(callRun),
|
|
@@ -2220,6 +2343,7 @@ function buildMethodEntries(descriptors, context, states) {
|
|
|
2220
2343
|
name: descriptor.name,
|
|
2221
2344
|
defaultPageSize: out.defaultPageSize,
|
|
2222
2345
|
adaptPage: out.adaptPage,
|
|
2346
|
+
annotator: boundAnnotator,
|
|
2223
2347
|
getDeprecation: () => entry.meta?.deprecation
|
|
2224
2348
|
}
|
|
2225
2349
|
);
|
|
@@ -2231,6 +2355,7 @@ function buildMethodEntries(descriptors, context, states) {
|
|
|
2231
2355
|
sdk,
|
|
2232
2356
|
schema: descriptor.inputSchema,
|
|
2233
2357
|
name: descriptor.name,
|
|
2358
|
+
annotator: boundAnnotator,
|
|
2234
2359
|
getDeprecation: () => entry.meta?.deprecation
|
|
2235
2360
|
}
|
|
2236
2361
|
);
|
|
@@ -2242,6 +2367,7 @@ function buildMethodEntries(descriptors, context, states) {
|
|
|
2242
2367
|
name: descriptor.name,
|
|
2243
2368
|
schema: descriptor.skipInputValidation ? void 0 : descriptor.inputSchema,
|
|
2244
2369
|
positional: descriptor.positional,
|
|
2370
|
+
annotator: boundAnnotator,
|
|
2245
2371
|
// The boundary reads the deprecation LIVE off the entry, so a
|
|
2246
2372
|
// deprecation merged after build (defineMethodOverride, addPlugin)
|
|
2247
2373
|
// fires too.
|
|
@@ -2262,12 +2388,22 @@ function buildMethodEntries(descriptors, context, states) {
|
|
|
2262
2388
|
const internalValue = (...args) => canonicalValue(pack(args), INTERNAL_CALL);
|
|
2263
2389
|
entry.value = (...args) => canonicalValue(pack(args));
|
|
2264
2390
|
entry.internalValue = internalValue;
|
|
2265
|
-
entry.bindInternal = (
|
|
2391
|
+
entry.bindInternal = (opts) => bindInternalTwin({
|
|
2392
|
+
...opts,
|
|
2393
|
+
withContext: (context2) => {
|
|
2394
|
+
return (...args) => canonicalValue(pack(args), context2);
|
|
2395
|
+
},
|
|
2396
|
+
internalValue
|
|
2397
|
+
});
|
|
2266
2398
|
entry.positional = names;
|
|
2267
2399
|
} else {
|
|
2268
2400
|
const internalValue = (input) => canonicalValue(input, INTERNAL_CALL);
|
|
2269
2401
|
entry.internalValue = internalValue;
|
|
2270
|
-
entry.bindInternal = (
|
|
2402
|
+
entry.bindInternal = (opts) => bindInternalTwin({
|
|
2403
|
+
...opts,
|
|
2404
|
+
withContext: (context2) => (input) => canonicalValue(input, context2),
|
|
2405
|
+
internalValue
|
|
2406
|
+
});
|
|
2271
2407
|
}
|
|
2272
2408
|
plugins[id] = entry;
|
|
2273
2409
|
}
|
|
@@ -2293,8 +2429,14 @@ function buildEagerArtifacts(descriptors, context, states) {
|
|
|
2293
2429
|
if (!dispose) return;
|
|
2294
2430
|
context.disposers?.push({
|
|
2295
2431
|
id,
|
|
2432
|
+
// Teardown is framework-internal: an SDK method a `dispose` calls runs
|
|
2433
|
+
// on an internal-origin root (dropped from telemetry).
|
|
2296
2434
|
dispose: (input) => dispose({
|
|
2297
|
-
imports: buildImports(
|
|
2435
|
+
imports: buildImports({
|
|
2436
|
+
plugins,
|
|
2437
|
+
importBindings: descriptor.importBindings,
|
|
2438
|
+
frameworkOrigin: true
|
|
2439
|
+
}),
|
|
2298
2440
|
state: states.get(id),
|
|
2299
2441
|
input
|
|
2300
2442
|
})
|
|
@@ -2304,7 +2446,10 @@ function buildEagerArtifacts(descriptors, context, states) {
|
|
|
2304
2446
|
states.set(
|
|
2305
2447
|
id,
|
|
2306
2448
|
descriptor.setup ? descriptor.setup({
|
|
2307
|
-
imports: buildImports(
|
|
2449
|
+
imports: buildImports({
|
|
2450
|
+
plugins,
|
|
2451
|
+
importBindings: descriptor.importBindings
|
|
2452
|
+
})
|
|
2308
2453
|
}) : void 0
|
|
2309
2454
|
);
|
|
2310
2455
|
recordDisposer();
|
|
@@ -2316,14 +2461,20 @@ function buildEagerArtifacts(descriptors, context, states) {
|
|
|
2316
2461
|
states.set(
|
|
2317
2462
|
id,
|
|
2318
2463
|
descriptor.setup ? descriptor.setup({
|
|
2319
|
-
imports: buildImports(
|
|
2464
|
+
imports: buildImports({
|
|
2465
|
+
plugins,
|
|
2466
|
+
importBindings: descriptor.importBindings
|
|
2467
|
+
})
|
|
2320
2468
|
}) : void 0
|
|
2321
2469
|
);
|
|
2322
2470
|
} else {
|
|
2323
2471
|
states.set(
|
|
2324
2472
|
id,
|
|
2325
2473
|
descriptor.setup ? descriptor.setup({
|
|
2326
|
-
imports: buildImports(
|
|
2474
|
+
imports: buildImports({
|
|
2475
|
+
plugins,
|
|
2476
|
+
importBindings: descriptor.importBindings
|
|
2477
|
+
})
|
|
2327
2478
|
}) : void 0
|
|
2328
2479
|
);
|
|
2329
2480
|
if (descriptor.privileged) {
|
|
@@ -2341,7 +2492,7 @@ function buildEagerArtifacts(descriptors, context, states) {
|
|
|
2341
2492
|
pluginType: "property",
|
|
2342
2493
|
name: descriptor.name,
|
|
2343
2494
|
getValue: () => get({
|
|
2344
|
-
imports: buildImports(plugins, importBindings),
|
|
2495
|
+
imports: buildImports({ plugins, importBindings }),
|
|
2345
2496
|
state: states.get(id)
|
|
2346
2497
|
}),
|
|
2347
2498
|
meta: descriptor.meta,
|
|
@@ -2377,7 +2528,7 @@ function resolvePlugin(sdk, ref) {
|
|
|
2377
2528
|
return entry.getValue();
|
|
2378
2529
|
}
|
|
2379
2530
|
if (entry.pluginType === "method" && entry.internalValue) {
|
|
2380
|
-
return entry.internalValue;
|
|
2531
|
+
return entry.bindInternal?.({ frameworkOrigin: true }) ?? entry.internalValue;
|
|
2381
2532
|
}
|
|
2382
2533
|
return entry.value;
|
|
2383
2534
|
}
|
|
@@ -2412,7 +2563,7 @@ function resolveAggregates(descriptors, context) {
|
|
|
2412
2563
|
if (descriptor.pluginType !== "aggregate") continue;
|
|
2413
2564
|
const exports = {};
|
|
2414
2565
|
for (const [binding, child] of Object.entries(descriptor.exports)) {
|
|
2415
|
-
bindValue(exports, binding, plugins[child.id]);
|
|
2566
|
+
bindValue({ target: exports, key: binding, entry: plugins[child.id] });
|
|
2416
2567
|
}
|
|
2417
2568
|
plugins[id] = { pluginType: "aggregate", name: descriptor.name, exports };
|
|
2418
2569
|
}
|
|
@@ -2455,23 +2606,39 @@ function assembleHooks(descriptors, context, states) {
|
|
|
2455
2606
|
const plugins = context.plugins;
|
|
2456
2607
|
for (const id of topoOrder(descriptors)) {
|
|
2457
2608
|
const descriptor = descriptors.get(id);
|
|
2458
|
-
if (!descriptor || descriptor.pluginType !== "hook" || !descriptor.observe) {
|
|
2609
|
+
if (!descriptor || descriptor.pluginType !== "hook" || !descriptor.observe && !descriptor.annotator) {
|
|
2459
2610
|
continue;
|
|
2460
2611
|
}
|
|
2461
|
-
const { observe } = descriptor;
|
|
2462
|
-
const imports = buildImports(plugins, descriptor.importBindings);
|
|
2612
|
+
const { observe, annotator } = descriptor;
|
|
2463
2613
|
const state = states.get(id);
|
|
2464
2614
|
const contributed = {};
|
|
2465
|
-
if (observe
|
|
2466
|
-
const
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2615
|
+
if (observe?.onMethodStart || observe?.onMethodEnd) {
|
|
2616
|
+
const imports = buildImports({
|
|
2617
|
+
plugins,
|
|
2618
|
+
importBindings: descriptor.importBindings,
|
|
2619
|
+
frameworkOrigin: true
|
|
2620
|
+
});
|
|
2621
|
+
if (observe.onMethodStart) {
|
|
2622
|
+
const onStart = observe.onMethodStart;
|
|
2623
|
+
contributed.onMethodStart = (input) => {
|
|
2624
|
+
runIsolatedObserver(() => onStart({ imports, input, state }));
|
|
2625
|
+
};
|
|
2626
|
+
}
|
|
2627
|
+
if (observe.onMethodEnd) {
|
|
2628
|
+
const onEnd = observe.onMethodEnd;
|
|
2629
|
+
contributed.onMethodEnd = (input) => {
|
|
2630
|
+
runIsolatedObserver(() => onEnd({ imports, input, state }));
|
|
2631
|
+
};
|
|
2632
|
+
}
|
|
2470
2633
|
}
|
|
2471
|
-
if (
|
|
2472
|
-
const
|
|
2473
|
-
contributed.
|
|
2474
|
-
|
|
2634
|
+
if (annotator) {
|
|
2635
|
+
const annotatorFn = annotator;
|
|
2636
|
+
contributed.annotator = ({ methodName, input }) => {
|
|
2637
|
+
try {
|
|
2638
|
+
return annotatorFn({ methodName, input, state });
|
|
2639
|
+
} catch {
|
|
2640
|
+
return {};
|
|
2641
|
+
}
|
|
2475
2642
|
};
|
|
2476
2643
|
}
|
|
2477
2644
|
context.hooks = buildHooks(context.hooks, contributed);
|
|
@@ -2505,7 +2672,11 @@ function createSdk(root, options) {
|
|
|
2505
2672
|
pluginSurface = plugins2[plugin.id].exports;
|
|
2506
2673
|
} else {
|
|
2507
2674
|
pluginSurface = {};
|
|
2508
|
-
bindValue(
|
|
2675
|
+
bindValue({
|
|
2676
|
+
target: pluginSurface,
|
|
2677
|
+
key: plugin.name,
|
|
2678
|
+
entry: plugins2[plugin.id]
|
|
2679
|
+
});
|
|
2509
2680
|
}
|
|
2510
2681
|
for (const key of Object.keys(legacyExports)) context.surface[key] = key;
|
|
2511
2682
|
if (plugin.pluginType === "aggregate") {
|
|
@@ -2522,7 +2693,7 @@ function createSdk(root, options) {
|
|
|
2522
2693
|
if (root.pluginType === "method" || root.pluginType === "property") {
|
|
2523
2694
|
context.surface[root.name] = root.id;
|
|
2524
2695
|
const sdk = buildSurface(context);
|
|
2525
|
-
bindValue(sdk, root.name, plugins[root.id]);
|
|
2696
|
+
bindValue({ target: sdk, key: root.name, entry: plugins[root.id] });
|
|
2526
2697
|
return sdk;
|
|
2527
2698
|
}
|
|
2528
2699
|
if (root.pluginType === "aggregate")
|
|
@@ -2554,7 +2725,7 @@ function addModelPlugin(sdk, plugin, options = {}) {
|
|
|
2554
2725
|
context.surface[binding] = child.id;
|
|
2555
2726
|
}
|
|
2556
2727
|
} else {
|
|
2557
|
-
bindValue(sdk, plugin.name, entry);
|
|
2728
|
+
bindValue({ target: sdk, key: plugin.name, entry });
|
|
2558
2729
|
context.surface[plugin.name] = plugin.id;
|
|
2559
2730
|
}
|
|
2560
2731
|
}
|
|
@@ -5826,7 +5997,7 @@ function parseDeprecationDate(value) {
|
|
|
5826
5997
|
}
|
|
5827
5998
|
|
|
5828
5999
|
// src/sdk-version.ts
|
|
5829
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
6000
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.89.0" : void 0) || "unknown";
|
|
5830
6001
|
|
|
5831
6002
|
// src/utils/open-url.ts
|
|
5832
6003
|
var nodePrefix = "node:";
|
|
@@ -9084,6 +9255,29 @@ var workflowVersionIdResolver = defineResolver({
|
|
|
9084
9255
|
})
|
|
9085
9256
|
});
|
|
9086
9257
|
|
|
9258
|
+
// src/resolvers/workflowDraftId.ts
|
|
9259
|
+
var listWorkflowDraftsRef = declareMethod({ id: "listWorkflowDrafts" });
|
|
9260
|
+
var workflowDraftIdResolver = defineResolver({
|
|
9261
|
+
imports: [listWorkflowDraftsRef],
|
|
9262
|
+
requireParameters: ["workflow"],
|
|
9263
|
+
listItems: ({
|
|
9264
|
+
imports,
|
|
9265
|
+
input,
|
|
9266
|
+
cursor
|
|
9267
|
+
}) => imports.listWorkflowDrafts({
|
|
9268
|
+
workflow: input.workflow,
|
|
9269
|
+
cursor
|
|
9270
|
+
}),
|
|
9271
|
+
prompt: ({ items }) => ({
|
|
9272
|
+
type: "list",
|
|
9273
|
+
message: "Select a workflow draft:",
|
|
9274
|
+
choices: items.map((d) => ({
|
|
9275
|
+
label: `${d.slug} \u2014 last edited ${d.last_edited_at ?? "never"}`,
|
|
9276
|
+
value: d.id
|
|
9277
|
+
}))
|
|
9278
|
+
})
|
|
9279
|
+
});
|
|
9280
|
+
|
|
9087
9281
|
// src/resolvers/workflowRunId.ts
|
|
9088
9282
|
var listWorkflowRunsRef = declareMethod({ id: "listWorkflowRuns" });
|
|
9089
9283
|
var workflowRunIdResolver = defineResolver({
|
|
@@ -9756,18 +9950,6 @@ var tableSortResolver = defineResolver({
|
|
|
9756
9950
|
}
|
|
9757
9951
|
});
|
|
9758
9952
|
|
|
9759
|
-
// src/plugins/eventEmission/method-metadata.ts
|
|
9760
|
-
var SCOPE_KEY = "methodMetadata";
|
|
9761
|
-
function setMethodMetadata(metadata) {
|
|
9762
|
-
const scope2 = getCurrentScope();
|
|
9763
|
-
if (!scope2) return;
|
|
9764
|
-
const existing = scope2[SCOPE_KEY];
|
|
9765
|
-
scope2[SCOPE_KEY] = { ...existing, ...metadata };
|
|
9766
|
-
}
|
|
9767
|
-
function getMethodMetadata() {
|
|
9768
|
-
return getCurrentScope()?.[SCOPE_KEY];
|
|
9769
|
-
}
|
|
9770
|
-
|
|
9771
9953
|
// src/plugins/listActions/index.ts
|
|
9772
9954
|
var listActionsPlugin = defineMethod({
|
|
9773
9955
|
name: "listActions",
|
|
@@ -9785,7 +9967,7 @@ var listActionsPlugin = defineMethod({
|
|
|
9785
9967
|
// of listing every action. `getAction` (where `actionType` is required) keeps
|
|
9786
9968
|
// the resolver.
|
|
9787
9969
|
resolvers: { app: appKeyResolver },
|
|
9788
|
-
run: async ({ imports, input }) => {
|
|
9970
|
+
run: async ({ imports, input, annotate }) => {
|
|
9789
9971
|
const api = imports.api;
|
|
9790
9972
|
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
9791
9973
|
const appKey = "app" in input ? input.app : input.appKey;
|
|
@@ -9796,10 +9978,7 @@ var listActionsPlugin = defineMethod({
|
|
|
9796
9978
|
{ configType: "current_implementation_id" }
|
|
9797
9979
|
);
|
|
9798
9980
|
}
|
|
9799
|
-
|
|
9800
|
-
selectedApi,
|
|
9801
|
-
operationType: input.actionType ?? null
|
|
9802
|
-
});
|
|
9981
|
+
annotate({ selectedApi });
|
|
9803
9982
|
const data = await api.get(
|
|
9804
9983
|
"/zapier/api/v4/implementations/",
|
|
9805
9984
|
{
|
|
@@ -9854,10 +10033,6 @@ var getActionPlugin = defineMethod({
|
|
|
9854
10033
|
const appKey = "app" in input ? input.app : input.appKey;
|
|
9855
10034
|
const actionKey = "action" in input ? input.action : input.actionKey;
|
|
9856
10035
|
const { actionType } = input;
|
|
9857
|
-
setMethodMetadata({
|
|
9858
|
-
operationType: actionType,
|
|
9859
|
-
operationKey: actionKey
|
|
9860
|
-
});
|
|
9861
10036
|
for await (const action of imports.listActions({ app: appKey }).items()) {
|
|
9862
10037
|
if ((action.key === actionKey || action.id === actionKey) && action.action_type === actionType) {
|
|
9863
10038
|
return { data: action };
|
|
@@ -9950,9 +10125,10 @@ var runActionPlugin = defineMethod({
|
|
|
9950
10125
|
inputs: inputsResolver
|
|
9951
10126
|
},
|
|
9952
10127
|
// A per-SDK-instance TTL cache of resolved (selectedApi, actionId), built once
|
|
9953
|
-
// in setup so it persists across calls.
|
|
9954
|
-
// (`
|
|
9955
|
-
|
|
10128
|
+
// in setup so it persists across calls. The imports it resolves through
|
|
10129
|
+
// (`manifest.getVersionedImplementationId`, `getAction`) are threaded in per
|
|
10130
|
+
// call from `run`, not captured here.
|
|
10131
|
+
setup: () => {
|
|
9956
10132
|
const cache = /* @__PURE__ */ new Map();
|
|
9957
10133
|
function evictIfNeeded() {
|
|
9958
10134
|
if (cache.size < CONTEXT_CACHE_MAX_SIZE) return;
|
|
@@ -9972,7 +10148,7 @@ var runActionPlugin = defineMethod({
|
|
|
9972
10148
|
if (!evictedAny && oldestKey) cache.delete(oldestKey);
|
|
9973
10149
|
}
|
|
9974
10150
|
async function resolveRunActionContext(options) {
|
|
9975
|
-
const { appKey, actionKey, actionType } = options;
|
|
10151
|
+
const { imports, appKey, actionKey, actionType } = options;
|
|
9976
10152
|
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
9977
10153
|
const selectedApi = await getVersionedImplementationId(appKey);
|
|
9978
10154
|
if (!selectedApi) {
|
|
@@ -10011,7 +10187,7 @@ var runActionPlugin = defineMethod({
|
|
|
10011
10187
|
}
|
|
10012
10188
|
return { getRunActionContext };
|
|
10013
10189
|
},
|
|
10014
|
-
run: async ({ imports, input, state }) => {
|
|
10190
|
+
run: async ({ imports, input, state, annotate }) => {
|
|
10015
10191
|
const api = imports.api;
|
|
10016
10192
|
const resolveConnection = imports.connections.resolveConnection;
|
|
10017
10193
|
const appKey = "app" in input ? input.app : input.appKey;
|
|
@@ -10032,15 +10208,12 @@ var runActionPlugin = defineMethod({
|
|
|
10032
10208
|
resolveConnection
|
|
10033
10209
|
});
|
|
10034
10210
|
const { selectedApi, actionId } = await state.getRunActionContext({
|
|
10211
|
+
imports,
|
|
10035
10212
|
appKey,
|
|
10036
10213
|
actionKey,
|
|
10037
10214
|
actionType
|
|
10038
10215
|
});
|
|
10039
|
-
|
|
10040
|
-
selectedApi,
|
|
10041
|
-
operationType: actionType,
|
|
10042
|
-
operationKey: actionKey
|
|
10043
|
-
});
|
|
10216
|
+
annotate({ selectedApi });
|
|
10044
10217
|
const result = await executeAction({
|
|
10045
10218
|
api,
|
|
10046
10219
|
selectedApi,
|
|
@@ -10676,7 +10849,11 @@ var listActionInputFieldsPlugin = defineMethod({
|
|
|
10676
10849
|
// metadata; the engine permits a resolver importing its host.
|
|
10677
10850
|
inputs: inputsAllOptionalResolver
|
|
10678
10851
|
},
|
|
10679
|
-
run: async ({
|
|
10852
|
+
run: async ({
|
|
10853
|
+
imports,
|
|
10854
|
+
input,
|
|
10855
|
+
annotate
|
|
10856
|
+
}) => {
|
|
10680
10857
|
const api = imports.api;
|
|
10681
10858
|
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
10682
10859
|
const resolveConnection = imports.connections.resolveConnection;
|
|
@@ -10696,11 +10873,7 @@ var listActionInputFieldsPlugin = defineMethod({
|
|
|
10696
10873
|
{ configType: "current_implementation_id" }
|
|
10697
10874
|
);
|
|
10698
10875
|
}
|
|
10699
|
-
|
|
10700
|
-
selectedApi,
|
|
10701
|
-
operationType: actionType,
|
|
10702
|
-
operationKey: actionKey
|
|
10703
|
-
});
|
|
10876
|
+
annotate({ selectedApi });
|
|
10704
10877
|
const { data: action } = await imports.getAction({
|
|
10705
10878
|
app: appKey,
|
|
10706
10879
|
actionType,
|
|
@@ -10811,7 +10984,11 @@ var listActionInputFieldChoicesPlugin = defineMethod({
|
|
|
10811
10984
|
inputField: inputFieldKeyResolver,
|
|
10812
10985
|
inputs: inputsAllOptionalResolver
|
|
10813
10986
|
},
|
|
10814
|
-
run: async ({
|
|
10987
|
+
run: async ({
|
|
10988
|
+
imports,
|
|
10989
|
+
input,
|
|
10990
|
+
annotate
|
|
10991
|
+
}) => {
|
|
10815
10992
|
const api = imports.api;
|
|
10816
10993
|
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
10817
10994
|
const resolveConnection = imports.connections.resolveConnection;
|
|
@@ -10840,11 +11017,7 @@ var listActionInputFieldChoicesPlugin = defineMethod({
|
|
|
10840
11017
|
{ configType: "current_implementation_id" }
|
|
10841
11018
|
);
|
|
10842
11019
|
}
|
|
10843
|
-
|
|
10844
|
-
selectedApi,
|
|
10845
|
-
operationType: actionType,
|
|
10846
|
-
operationKey: actionKey
|
|
10847
|
-
});
|
|
11020
|
+
annotate({ selectedApi });
|
|
10848
11021
|
const { data: action } = await imports.getAction({
|
|
10849
11022
|
app: appKey,
|
|
10850
11023
|
actionType,
|
|
@@ -10973,7 +11146,8 @@ var getActionInputFieldsSchemaPlugin = defineMethod({
|
|
|
10973
11146
|
},
|
|
10974
11147
|
run: async ({
|
|
10975
11148
|
imports,
|
|
10976
|
-
input
|
|
11149
|
+
input,
|
|
11150
|
+
annotate
|
|
10977
11151
|
}) => {
|
|
10978
11152
|
const api = imports.api;
|
|
10979
11153
|
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
@@ -10994,11 +11168,7 @@ var getActionInputFieldsSchemaPlugin = defineMethod({
|
|
|
10994
11168
|
{ configType: "current_implementation_id" }
|
|
10995
11169
|
);
|
|
10996
11170
|
}
|
|
10997
|
-
|
|
10998
|
-
selectedApi,
|
|
10999
|
-
operationType: actionType,
|
|
11000
|
-
operationKey: actionKey
|
|
11001
|
-
});
|
|
11171
|
+
annotate({ selectedApi });
|
|
11002
11172
|
const { data: action } = await imports.getAction({
|
|
11003
11173
|
app: appKey,
|
|
11004
11174
|
actionType,
|
|
@@ -11121,7 +11291,11 @@ var listConnectionsPlugin = defineMethod({
|
|
|
11121
11291
|
adaptPage: adaptZapierPage,
|
|
11122
11292
|
defaultPageSize: DEFAULT_PAGE_SIZE
|
|
11123
11293
|
},
|
|
11124
|
-
run: async ({
|
|
11294
|
+
run: async ({
|
|
11295
|
+
imports,
|
|
11296
|
+
input,
|
|
11297
|
+
annotate
|
|
11298
|
+
}) => {
|
|
11125
11299
|
const resolveConnection = imports.connections.resolveConnection;
|
|
11126
11300
|
const api = imports.api;
|
|
11127
11301
|
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
@@ -11136,7 +11310,7 @@ var listConnectionsPlugin = defineMethod({
|
|
|
11136
11310
|
if (appKey) {
|
|
11137
11311
|
const implementationId = await getVersionedImplementationId(appKey);
|
|
11138
11312
|
if (implementationId) {
|
|
11139
|
-
|
|
11313
|
+
annotate({ selectedApi: implementationId });
|
|
11140
11314
|
const [versionlessSelectedApi] = splitVersionedKey(implementationId);
|
|
11141
11315
|
searchParams.app_key = versionlessSelectedApi;
|
|
11142
11316
|
} else {
|
|
@@ -11652,12 +11826,12 @@ var getConnectionStartUrlPlugin = defineMethod({
|
|
|
11652
11826
|
outputSchema: GetConnectionStartUrlItemSchema,
|
|
11653
11827
|
output: "item",
|
|
11654
11828
|
resolvers: { app: appKeyResolver },
|
|
11655
|
-
run: async ({ imports, input }) => {
|
|
11829
|
+
run: async ({ imports, input, annotate }) => {
|
|
11656
11830
|
const api = imports.api;
|
|
11657
11831
|
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
11658
11832
|
const versionedKey = await getVersionedImplementationId(input.app);
|
|
11659
11833
|
const selectedApi = versionedKey ? versionedKey.split("@")[0] : input.app;
|
|
11660
|
-
|
|
11834
|
+
annotate({ selectedApi });
|
|
11661
11835
|
const response = await api.post(
|
|
11662
11836
|
START_PATH,
|
|
11663
11837
|
{ selected_api: selectedApi },
|
|
@@ -11716,12 +11890,12 @@ var waitForNewConnectionPlugin = defineMethod({
|
|
|
11716
11890
|
outputSchema: WaitForNewConnectionItemSchema,
|
|
11717
11891
|
output: "item",
|
|
11718
11892
|
resolvers: { app: appKeyResolver },
|
|
11719
|
-
run: async ({ imports, input }) => {
|
|
11893
|
+
run: async ({ imports, input, annotate }) => {
|
|
11720
11894
|
const api = imports.api;
|
|
11721
11895
|
const getVersionedImplementationId = imports.manifest.getVersionedImplementationId;
|
|
11722
11896
|
const versionedKey = await getVersionedImplementationId(input.app);
|
|
11723
11897
|
const appKey = versionedKey ? versionedKey.split("@")[0] : input.app;
|
|
11724
|
-
|
|
11898
|
+
annotate({ selectedApi: appKey });
|
|
11725
11899
|
try {
|
|
11726
11900
|
const top = await api.poll(CONNECTIONS_PATH, {
|
|
11727
11901
|
searchParams: {
|
|
@@ -11839,11 +12013,11 @@ var createConnectionPlugin = defineMethod({
|
|
|
11839
12013
|
]
|
|
11840
12014
|
})
|
|
11841
12015
|
}),
|
|
11842
|
-
run: async ({ imports, input }) => {
|
|
12016
|
+
run: async ({ imports, input, annotate }) => {
|
|
11843
12017
|
const { data: start2 } = await imports.getConnectionStartUrl({
|
|
11844
12018
|
app: input.app
|
|
11845
12019
|
});
|
|
11846
|
-
|
|
12020
|
+
annotate({ selectedApi: start2.app });
|
|
11847
12021
|
console.error(
|
|
11848
12022
|
`
|
|
11849
12023
|
Open this URL to complete the connection:
|
|
@@ -12098,6 +12272,10 @@ var triggerInboxItemFormatter = defineFormatter({
|
|
|
12098
12272
|
|
|
12099
12273
|
// src/plugins/triggers/shared.ts
|
|
12100
12274
|
var triggerCategories = ["trigger"];
|
|
12275
|
+
function deriveReadOperation() {
|
|
12276
|
+
const annotations = { operationType: "read" };
|
|
12277
|
+
return { ...annotations };
|
|
12278
|
+
}
|
|
12101
12279
|
|
|
12102
12280
|
// src/plugins/triggers/utils.ts
|
|
12103
12281
|
var UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -12143,6 +12321,7 @@ var createTriggerInboxPlugin = defineMethod({
|
|
|
12143
12321
|
outputSchema: TriggerInboxItemSchema,
|
|
12144
12322
|
output: "item",
|
|
12145
12323
|
formatter: triggerInboxItemFormatter,
|
|
12324
|
+
annotator: deriveReadOperation,
|
|
12146
12325
|
// actionKeyResolver and inputsResolver depend on actionType, which is always
|
|
12147
12326
|
// "read" for triggers. Pin it as a constant resolver so it's seeded into
|
|
12148
12327
|
// resolvedParams without polluting the user-facing schema (where it would
|
|
@@ -12247,6 +12426,7 @@ var ensureTriggerInboxPlugin = defineMethod({
|
|
|
12247
12426
|
outputSchema: TriggerInboxItemSchema,
|
|
12248
12427
|
output: "item",
|
|
12249
12428
|
formatter: triggerInboxItemFormatter,
|
|
12429
|
+
annotator: deriveReadOperation,
|
|
12250
12430
|
// actionKeyResolver and inputsResolver depend on actionType, which is always
|
|
12251
12431
|
// "read" for triggers. Pin it as a constant resolver so it's seeded into
|
|
12252
12432
|
// resolvedParams without polluting the user-facing schema.
|
|
@@ -13551,6 +13731,7 @@ var listTriggerInputFieldsPlugin = defineMethod({
|
|
|
13551
13731
|
outputSchema: RootFieldItemSchema,
|
|
13552
13732
|
output: { type: "list", defaultPageSize: DEFAULT_PAGE_SIZE },
|
|
13553
13733
|
formatter: rootFieldItemFormatter,
|
|
13734
|
+
annotator: deriveReadOperation,
|
|
13554
13735
|
// actionKeyResolver and inputsAllOptionalResolver depend on actionType. Pin it
|
|
13555
13736
|
// to "read" so they resolve correctly without the user setting it.
|
|
13556
13737
|
resolvers: {
|
|
@@ -13597,6 +13778,7 @@ var listTriggerInputFieldChoicesPlugin = defineMethod({
|
|
|
13597
13778
|
outputSchema: InputFieldChoiceItemSchema,
|
|
13598
13779
|
output: { type: "list", defaultPageSize: DEFAULT_PAGE_SIZE },
|
|
13599
13780
|
formatter: inputFieldChoiceItemFormatter,
|
|
13781
|
+
annotator: deriveReadOperation,
|
|
13600
13782
|
resolvers: {
|
|
13601
13783
|
app: appKeyResolver,
|
|
13602
13784
|
action: actionKeyResolver,
|
|
@@ -13640,6 +13822,7 @@ var getTriggerInputFieldsSchemaPlugin = defineMethod({
|
|
|
13640
13822
|
// Passthrough: getActionInputFieldsSchema already returns `{ data }`, so
|
|
13641
13823
|
// `output: "raw"` surfaces that envelope unchanged.
|
|
13642
13824
|
output: "raw",
|
|
13825
|
+
annotator: deriveReadOperation,
|
|
13643
13826
|
resolvers: {
|
|
13644
13827
|
app: appKeyResolver,
|
|
13645
13828
|
action: actionKeyResolver,
|
|
@@ -14757,6 +14940,14 @@ function buildMethodCalledEvent(data, context = {}) {
|
|
|
14757
14940
|
}
|
|
14758
14941
|
|
|
14759
14942
|
// src/plugins/eventEmission/event-emission-hook.ts
|
|
14943
|
+
function readMethodMetadata(annotations) {
|
|
14944
|
+
const readString = (value) => typeof value === "string" ? value : null;
|
|
14945
|
+
return {
|
|
14946
|
+
selectedApi: readString(annotations.selectedApi),
|
|
14947
|
+
operationType: readString(annotations.operationType),
|
|
14948
|
+
operationKey: readString(annotations.operationKey)
|
|
14949
|
+
};
|
|
14950
|
+
}
|
|
14760
14951
|
function computeArgumentCount(args) {
|
|
14761
14952
|
if (args.length === 1) {
|
|
14762
14953
|
const arg0 = args[0];
|
|
@@ -14767,9 +14958,18 @@ function computeArgumentCount(args) {
|
|
|
14767
14958
|
return args.filter((a) => a !== void 0).length;
|
|
14768
14959
|
}
|
|
14769
14960
|
function makeMethodEndHook(emitMethodCalled) {
|
|
14770
|
-
return ({
|
|
14771
|
-
|
|
14772
|
-
|
|
14961
|
+
return ({
|
|
14962
|
+
methodName,
|
|
14963
|
+
args,
|
|
14964
|
+
isPaginated,
|
|
14965
|
+
depth,
|
|
14966
|
+
callOrigin,
|
|
14967
|
+
annotations,
|
|
14968
|
+
durationMs,
|
|
14969
|
+
error
|
|
14970
|
+
}) => {
|
|
14971
|
+
if (callOrigin === "internal" || depth > 0) return;
|
|
14972
|
+
const metadata = readMethodMetadata(annotations);
|
|
14773
14973
|
emitMethodCalled({
|
|
14774
14974
|
method_name: methodName,
|
|
14775
14975
|
execution_duration_ms: durationMs,
|
|
@@ -14778,13 +14978,34 @@ function makeMethodEndHook(emitMethodCalled) {
|
|
|
14778
14978
|
error_type: error?.constructor.name ?? null,
|
|
14779
14979
|
argument_count: computeArgumentCount(args),
|
|
14780
14980
|
is_paginated: isPaginated,
|
|
14781
|
-
selected_api: metadata
|
|
14782
|
-
operation_type: metadata
|
|
14783
|
-
operation_key: metadata
|
|
14981
|
+
selected_api: metadata.selectedApi ?? null,
|
|
14982
|
+
operation_type: metadata.operationType ?? null,
|
|
14983
|
+
operation_key: metadata.operationKey ?? null
|
|
14784
14984
|
});
|
|
14785
14985
|
};
|
|
14786
14986
|
}
|
|
14787
14987
|
|
|
14988
|
+
// src/plugins/eventEmission/annotator.ts
|
|
14989
|
+
function zapierAnnotate({ input }) {
|
|
14990
|
+
const annotations = {};
|
|
14991
|
+
if (typeof input === "object" && input !== null) {
|
|
14992
|
+
const record = input;
|
|
14993
|
+
if (typeof record.actionType === "string") {
|
|
14994
|
+
annotations.operationType = record.actionType;
|
|
14995
|
+
}
|
|
14996
|
+
const operationKey = record.action ?? record.actionKey;
|
|
14997
|
+
if (typeof operationKey === "string") {
|
|
14998
|
+
annotations.operationKey = operationKey;
|
|
14999
|
+
}
|
|
15000
|
+
}
|
|
15001
|
+
return { ...annotations };
|
|
15002
|
+
}
|
|
15003
|
+
var operationAnnotatorPlugin = defineHook({
|
|
15004
|
+
namespace: "zapier",
|
|
15005
|
+
name: "operationAnnotator",
|
|
15006
|
+
annotator: ({ input }) => zapierAnnotate({ input })
|
|
15007
|
+
});
|
|
15008
|
+
|
|
14788
15009
|
// src/plugins/eventEmission/index.ts
|
|
14789
15010
|
var TELEMETRY_EMIT_TIMEOUT_MILLISECONDS = 300;
|
|
14790
15011
|
var registeredListeners = {};
|
|
@@ -15185,7 +15406,8 @@ var zapierSdkPlugin = definePlugin({
|
|
|
15185
15406
|
connectionsPlugin,
|
|
15186
15407
|
capabilitiesPlugin,
|
|
15187
15408
|
eventEmissionPlugin,
|
|
15188
|
-
eventEmissionHookPlugin
|
|
15409
|
+
eventEmissionHookPlugin,
|
|
15410
|
+
operationAnnotatorPlugin
|
|
15189
15411
|
],
|
|
15190
15412
|
exports: [
|
|
15191
15413
|
// The registry reporter: previously synthesized by the legacy merge,
|
|
@@ -15434,4 +15656,4 @@ var registryPlugin = (_sdk) => {
|
|
|
15434
15656
|
return {};
|
|
15435
15657
|
};
|
|
15436
15658
|
|
|
15437
|
-
export { API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, apiPluginRef, appKeyResolver, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createBaseEvent, createClientCredentialsPlugin, createController, createCorePlugin, createFunction, createMemoryCache, createPaginatedFunction, createPaginatedPluginMethod, createPluginMethod, createPluginStack, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineLegacyMerge, defineMethod, defineMethodOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, fromFunctionPlugin, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreCancelledSignal, isCoreError, isCoreSignal, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation2 as logDeprecation, manifestPlugin, manifestPluginRef, omitExports, openEnum, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings2 as resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, resolvePlugin, runActionPlugin, runInMethodScope, runWithCallerContext, runWithTelemetryContext, sdkOptionsPluginRef, selectExports, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin };
|
|
15659
|
+
export { API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, apiPluginRef, appKeyResolver, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createBaseEvent, createClientCredentialsPlugin, createController, createCorePlugin, createFunction, createMemoryCache, createPaginatedFunction, createPaginatedPluginMethod, createPluginMethod, createPluginStack, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineLegacyMerge, defineMethod, defineMethodOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, fromFunctionPlugin, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreCancelledSignal, isCoreError, isCoreSignal, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation2 as logDeprecation, manifestPlugin, manifestPluginRef, omitExports, openEnum, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings2 as resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, resolvePlugin, runActionPlugin, runInMethodScope, runWithCallerContext, runWithTelemetryContext, sdkOptionsPluginRef, selectExports, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowDraftIdResolver, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin };
|