@zapier/zapier-sdk 0.79.0 → 0.80.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 +6 -0
- package/dist/experimental.cjs +1011 -165
- package/dist/experimental.d.mts +2 -2
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.mjs +1006 -166
- package/dist/{index-DgX1b0Sv.d.mts → index-Dpl8IaV9.d.mts} +603 -62
- package/dist/{index-DgX1b0Sv.d.ts → index-Dpl8IaV9.d.ts} +603 -62
- package/dist/index.cjs +1005 -159
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1000 -160
- package/package.json +2 -2
|
@@ -321,6 +321,10 @@ interface PromptConfig {
|
|
|
321
321
|
message: string;
|
|
322
322
|
choices?: Array<PromptConfigChoice | DeprecatedPromptConfigChoice>;
|
|
323
323
|
default?: unknown;
|
|
324
|
+
/** Informational, non-selectable lines shown with the prompt (e.g. "enable X
|
|
325
|
+
* to see more"). A host renders them dimmed, after the choices. The framework
|
|
326
|
+
* stays agnostic about their content; the resolver composes the text. */
|
|
327
|
+
notes?: string[];
|
|
324
328
|
filter?: (value: unknown) => unknown;
|
|
325
329
|
/**
|
|
326
330
|
* Return `true` for valid; a string for a custom invalid message; or
|
|
@@ -333,6 +337,17 @@ interface PromptConfig {
|
|
|
333
337
|
type ListPromptConfig = PromptConfig & {
|
|
334
338
|
type: "list";
|
|
335
339
|
};
|
|
340
|
+
/**
|
|
341
|
+
* The prompt config the NEW-model resolvers (`defineResolver`) return. It omits
|
|
342
|
+
* three fields the resolution controller does not honor, so authors can't
|
|
343
|
+
* supply a silent no-op:
|
|
344
|
+
* - `name` — the framework supplies the answer key (always was overwritten).
|
|
345
|
+
* - `default`— no resolver uses it; the controller has no preselect concept.
|
|
346
|
+
* - `filter` — no resolver uses it; transform values in `listItems` instead.
|
|
347
|
+
* (The legacy `SchemaParameterResolver` still honors `default`/`filter`, so the
|
|
348
|
+
* full `PromptConfig` stays for that path.)
|
|
349
|
+
*/
|
|
350
|
+
type ResolverPromptConfig = Omit<PromptConfig, "name" | "default" | "filter">;
|
|
336
351
|
interface Resolver$1 {
|
|
337
352
|
type: string;
|
|
338
353
|
depends?: readonly string[] | string[];
|
|
@@ -645,7 +660,7 @@ interface MethodRunBag<TImports, TInput, TState = unknown> {
|
|
|
645
660
|
}
|
|
646
661
|
/** Shared plumbing for the method attachments: each declares its own
|
|
647
662
|
* dependencies. Resolvers and formatters are otherwise separate concepts. */
|
|
648
|
-
interface
|
|
663
|
+
interface MethodAttachment {
|
|
649
664
|
imports: readonly AnyPlugin[];
|
|
650
665
|
/** Binding-name to plugin-id edges, normalized from `imports`; what the
|
|
651
666
|
* narrowed bag captured at materialization is built from. */
|
|
@@ -661,14 +676,14 @@ interface Attachment {
|
|
|
661
676
|
type ResolverType = "dynamic" | "static" | "constant" | "info" | "object" | "array";
|
|
662
677
|
/**
|
|
663
678
|
* A reference from a field (or array `items`) to a reusable resolver in the
|
|
664
|
-
* nearest `definitions` block. `
|
|
665
|
-
* resolver's `
|
|
679
|
+
* nearest `definitions` block. `input` are merged into the referenced
|
|
680
|
+
* resolver's `input` (e.g. the field key a shared choices-fetcher needs).
|
|
666
681
|
* Used when a fetch-built field needs an import-bearing resolver, which can't
|
|
667
682
|
* be inlined at fetch time (its imports bind at materialization).
|
|
668
683
|
*/
|
|
669
684
|
interface ResolverRef {
|
|
670
685
|
ref: string;
|
|
671
|
-
|
|
686
|
+
input?: Record<string, unknown>;
|
|
672
687
|
}
|
|
673
688
|
/**
|
|
674
689
|
* One member of an object resolver's `properties` (literal or fetch-built): the
|
|
@@ -684,34 +699,68 @@ interface Field$1 {
|
|
|
684
699
|
valueType?: string;
|
|
685
700
|
}
|
|
686
701
|
/** Shared gates for resolvers that resolve a value: the attachment plumbing
|
|
687
|
-
* plus the param-dataflow
|
|
688
|
-
interface ResolverBase extends
|
|
702
|
+
* plus the param-dataflow prerequisite. (`info` skips these.) */
|
|
703
|
+
interface ResolverBase extends MethodAttachment {
|
|
689
704
|
/** Sibling parameters that must resolve before this resolver runs (it reads
|
|
690
|
-
* their values from `
|
|
691
|
-
* `
|
|
692
|
-
|
|
693
|
-
requireCapabilities?: readonly string[];
|
|
705
|
+
* their values from `input`). The param-dataflow prerequisite, distinct from
|
|
706
|
+
* `imports`' SDK-capability graph. */
|
|
707
|
+
requireParameters?: readonly string[];
|
|
694
708
|
}
|
|
695
|
-
/**
|
|
709
|
+
/** List candidate items and prompt the user to pick one. */
|
|
696
710
|
interface DynamicResolver extends ResolverBase {
|
|
697
711
|
type: "dynamic";
|
|
698
712
|
inputType?: "text" | "password" | "email" | "search";
|
|
699
713
|
placeholder?: string;
|
|
700
|
-
|
|
714
|
+
/** Compute side-context once, before `listItems`, with the narrowed `imports`
|
|
715
|
+
* bag (no items yet — it runs pre-fetch so it can shape the fetch). The result
|
|
716
|
+
* flows into `listItems` and `prompt` as `context`. Use it to resolve, in one
|
|
717
|
+
* place, anything both the fetch and the render need (e.g. a capability gate:
|
|
718
|
+
* compute `includeShared` here, gate the fetch in `listItems`, surface a
|
|
719
|
+
* `notes` hint in `prompt`). May run more than once across re-asks, so keep it
|
|
720
|
+
* cheap/idempotent. */
|
|
721
|
+
getContext?: (bag: {
|
|
722
|
+
imports: Record<string, unknown>;
|
|
723
|
+
input: Record<string, unknown>;
|
|
724
|
+
}) => PromiseLike<unknown>;
|
|
725
|
+
/** Produce the candidate list. Behaves like an SDK list method: returns a
|
|
726
|
+
* paginated result (await for the first page + `nextCursor`, or iterate pages),
|
|
727
|
+
* never a bare array. `cursor` is the stateless re-entry hook for "load more":
|
|
728
|
+
* an in-process host iterates the result; a distributed host awaits one page,
|
|
729
|
+
* carries `nextCursor`, and calls again with `cursor`. */
|
|
730
|
+
listItems?: (bag: {
|
|
701
731
|
imports: Record<string, unknown>;
|
|
702
|
-
|
|
732
|
+
input: Record<string, unknown>;
|
|
733
|
+
/** The value `getContext` returned, if any. */
|
|
734
|
+
context?: unknown;
|
|
703
735
|
/** Free-text term injected by the CLI for search-mode resolvers. A separate
|
|
704
|
-
* key, not part of `
|
|
736
|
+
* key, not part of `input`, so it never collides with a method parameter
|
|
705
737
|
* also named `search`. */
|
|
706
738
|
search?: string;
|
|
707
|
-
|
|
739
|
+
cursor?: string;
|
|
740
|
+
}) => ListItemsResult<unknown>;
|
|
708
741
|
prompt?: (bag: {
|
|
709
742
|
items: unknown[];
|
|
710
|
-
|
|
711
|
-
|
|
743
|
+
input: Record<string, unknown>;
|
|
744
|
+
/** The value `getContext` returned, if any. */
|
|
745
|
+
context?: unknown;
|
|
746
|
+
}) => ResolverPromptConfig;
|
|
747
|
+
/** Resolve with no user input at all (e.g. a configured default), skipping the
|
|
748
|
+
* prompt. Runs before prompting; used always in non-interactive mode and as a
|
|
749
|
+
* "can we skip asking?" check otherwise. Returns null to fall through to a prompt. */
|
|
712
750
|
tryResolveWithoutPrompt?: (bag: {
|
|
713
751
|
imports: Record<string, unknown>;
|
|
714
|
-
|
|
752
|
+
input: Record<string, unknown>;
|
|
753
|
+
}) => Promise<{
|
|
754
|
+
resolvedValue: unknown;
|
|
755
|
+
} | null>;
|
|
756
|
+
/** Search-mode exact match: the user typed `search`; if it already names a
|
|
757
|
+
* valid value (e.g. validated via the API), return it to skip the picker.
|
|
758
|
+
* Distinct from `tryResolveWithoutPrompt` (no input) — this is interactive,
|
|
759
|
+
* mid-prompt, with the typed term. Returns null to fall through to `listItems`. */
|
|
760
|
+
tryResolveFromSearch?: (bag: {
|
|
761
|
+
imports: Record<string, unknown>;
|
|
762
|
+
input: Record<string, unknown>;
|
|
763
|
+
search?: string;
|
|
715
764
|
}) => Promise<{
|
|
716
765
|
resolvedValue: unknown;
|
|
717
766
|
} | null>;
|
|
@@ -728,20 +777,21 @@ interface ConstantResolver extends ResolverBase {
|
|
|
728
777
|
value: unknown;
|
|
729
778
|
}
|
|
730
779
|
/** Display-only text; resolves no value (its key is skipped in the result). */
|
|
731
|
-
interface InfoResolver extends
|
|
780
|
+
interface InfoResolver extends MethodAttachment {
|
|
732
781
|
type: "info";
|
|
733
782
|
text: string;
|
|
734
783
|
}
|
|
735
|
-
/** A keyed object. `properties` are known up front; `
|
|
736
|
-
* the key set is dynamic (re-invoked as `
|
|
737
|
-
*
|
|
738
|
-
*
|
|
784
|
+
/** A keyed object. `properties` are known up front; `getProperties` builds them
|
|
785
|
+
* when the key set is dynamic (re-invoked as `input` grow, for depends-on
|
|
786
|
+
* fields). Returns the property map raw (no envelope: nothing to paginate).
|
|
787
|
+
* `definitions` holds reusable resolvers reached by `{ ref }` from built fields
|
|
788
|
+
* that need an import. */
|
|
739
789
|
interface ObjectResolver extends ResolverBase {
|
|
740
790
|
type: "object";
|
|
741
791
|
properties?: Record<string, Field$1>;
|
|
742
|
-
|
|
792
|
+
getProperties?: (bag: {
|
|
743
793
|
imports: Record<string, unknown>;
|
|
744
|
-
|
|
794
|
+
input: Record<string, unknown>;
|
|
745
795
|
}) => PromiseLike<Record<string, Field$1>>;
|
|
746
796
|
definitions?: Record<string, Resolver>;
|
|
747
797
|
}
|
|
@@ -751,6 +801,11 @@ interface ArrayResolver extends ResolverBase {
|
|
|
751
801
|
items: Resolver | ResolverRef;
|
|
752
802
|
minItems?: number;
|
|
753
803
|
maxItems?: number;
|
|
804
|
+
/** Coarse value type of each element, so a free-text item answer coerces
|
|
805
|
+
* (e.g. `"5"` → `5` for `z.array(z.number())`) the way object fields do via
|
|
806
|
+
* `Field.valueType`. `items` is a bare resolver with no `valueType` slot of
|
|
807
|
+
* its own, so the element type rides here. */
|
|
808
|
+
itemValueType?: string;
|
|
754
809
|
definitions?: Record<string, Resolver>;
|
|
755
810
|
}
|
|
756
811
|
/**
|
|
@@ -764,14 +819,14 @@ interface ArrayResolver extends ResolverBase {
|
|
|
764
819
|
type Resolver = DynamicResolver | StaticResolver | ConstantResolver | InfoResolver | ObjectResolver | ArrayResolver;
|
|
765
820
|
/**
|
|
766
821
|
* An output formatter descriptor (produced by `defineFormatter`, attached to a
|
|
767
|
-
* method's output). `
|
|
822
|
+
* method's output). `getContext` reaches the narrowed `imports` bag; the
|
|
768
823
|
* materializer captures it and produces a {@link BoundFormatter}. Stored
|
|
769
824
|
* loosely, like {@link Resolver}. Both callbacks receive the method's `input`
|
|
770
825
|
* (the formatter runs post-execution, so the input is complete, unlike a
|
|
771
|
-
* resolver's partial `
|
|
826
|
+
* resolver's partial `input`).
|
|
772
827
|
*/
|
|
773
|
-
interface Formatter extends
|
|
774
|
-
|
|
828
|
+
interface Formatter extends MethodAttachment {
|
|
829
|
+
getContext?: (bag: {
|
|
775
830
|
imports: Record<string, unknown>;
|
|
776
831
|
items: unknown[];
|
|
777
832
|
input: Record<string, unknown>;
|
|
@@ -783,15 +838,11 @@ interface Formatter extends Attachment {
|
|
|
783
838
|
context?: unknown;
|
|
784
839
|
}) => FormattedItem;
|
|
785
840
|
}
|
|
786
|
-
/** What a dynamic resolver's `
|
|
787
|
-
*
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
} | AsyncIterable<{
|
|
792
|
-
data: TItem[];
|
|
793
|
-
nextCursor?: string;
|
|
794
|
-
}> | string | number;
|
|
841
|
+
/** What a dynamic resolver's `listItems` yields: an SDK list-method result
|
|
842
|
+
* (`await` for the first page + `nextCursor`, or iterate pages in-process), or a
|
|
843
|
+
* plain page / promise of one. No bare array and no scalar: it behaves like any
|
|
844
|
+
* other list method, and exact-match short-circuits live on `tryResolveFromSearch`. */
|
|
845
|
+
type ListItemsResult<TItem> = PaginatedSdkResult<TItem> | SdkPage<TItem> | Promise<SdkPage<TItem>>;
|
|
795
846
|
/** A bound object resolver's literal property: its resolver is already bound
|
|
796
847
|
* (or a `{ ref }` the CLI resolves against `definitions` at runtime). */
|
|
797
848
|
interface BoundField {
|
|
@@ -802,22 +853,21 @@ interface BoundField {
|
|
|
802
853
|
}
|
|
803
854
|
/**
|
|
804
855
|
* The runtime resolver `defineResolver` binds to: its imports are already
|
|
805
|
-
* captured, so the CLI calls these with
|
|
856
|
+
* captured, so the CLI calls these with input (and `search`) only, no sdk.
|
|
806
857
|
* `prompt` stays pure (no SDK reach).
|
|
807
858
|
*
|
|
808
859
|
* Carries every kind's fields on one loose interface, discriminated by `type`.
|
|
809
860
|
* The CLI rewrite (the consumer) narrows this into per-kind shapes; until then
|
|
810
|
-
* a single shape keeps the binder simple. `
|
|
811
|
-
* `dynamic
|
|
812
|
-
*
|
|
861
|
+
* a single shape keeps the binder simple. `listItems` produces the candidate
|
|
862
|
+
* list for `dynamic`; `getProperties` builds the (unbound) property map for
|
|
863
|
+
* `object`. `properties` / `definitions` are bound; `items` is bound (or a ref).
|
|
813
864
|
*/
|
|
814
865
|
interface BoundResolver {
|
|
815
866
|
type: ResolverType;
|
|
816
867
|
/** Sibling parameters that must resolve before this resolver runs (it reads
|
|
817
|
-
* their values from `
|
|
818
|
-
* `
|
|
819
|
-
|
|
820
|
-
requireCapabilities?: readonly string[];
|
|
868
|
+
* their values from `input`). The param-dataflow prerequisite, distinct from
|
|
869
|
+
* `imports`' SDK-capability graph. */
|
|
870
|
+
requireParameters?: readonly string[];
|
|
821
871
|
inputType?: "text" | "password" | "email" | "search";
|
|
822
872
|
placeholder?: string;
|
|
823
873
|
value?: unknown;
|
|
@@ -827,27 +877,45 @@ interface BoundResolver {
|
|
|
827
877
|
items?: BoundResolver | ResolverRef;
|
|
828
878
|
minItems?: number;
|
|
829
879
|
maxItems?: number;
|
|
830
|
-
|
|
831
|
-
|
|
880
|
+
/** For an array: the element's coarse value type, used to coerce a free-text
|
|
881
|
+
* item answer before validation (see {@link ArrayResolver.itemValueType}). */
|
|
882
|
+
itemValueType?: string;
|
|
883
|
+
getContext?: (bag: {
|
|
884
|
+
input: Record<string, unknown>;
|
|
885
|
+
}) => PromiseLike<unknown>;
|
|
886
|
+
listItems?: (bag: {
|
|
887
|
+
input: Record<string, unknown>;
|
|
888
|
+
context?: unknown;
|
|
832
889
|
search?: string;
|
|
833
|
-
|
|
890
|
+
cursor?: string;
|
|
891
|
+
}) => ListItemsResult<unknown>;
|
|
892
|
+
getProperties?: (bag: {
|
|
893
|
+
input: Record<string, unknown>;
|
|
894
|
+
}) => PromiseLike<Record<string, Field$1>>;
|
|
834
895
|
prompt?: (bag: {
|
|
835
896
|
items: unknown[];
|
|
836
|
-
|
|
837
|
-
|
|
897
|
+
input: Record<string, unknown>;
|
|
898
|
+
context?: unknown;
|
|
899
|
+
}) => ResolverPromptConfig;
|
|
838
900
|
tryResolveWithoutPrompt?: (bag: {
|
|
839
|
-
|
|
901
|
+
input: Record<string, unknown>;
|
|
902
|
+
}) => Promise<{
|
|
903
|
+
resolvedValue: unknown;
|
|
904
|
+
} | null>;
|
|
905
|
+
tryResolveFromSearch?: (bag: {
|
|
906
|
+
input: Record<string, unknown>;
|
|
907
|
+
search?: string;
|
|
840
908
|
}) => Promise<{
|
|
841
909
|
resolvedValue: unknown;
|
|
842
910
|
} | null>;
|
|
843
911
|
}
|
|
844
912
|
/**
|
|
845
|
-
* The runtime formatter `defineFormatter` binds to: `
|
|
913
|
+
* The runtime formatter `defineFormatter` binds to: `getContext` runs once per
|
|
846
914
|
* rendered batch (imports captured, no sdk) to build shared context; `format`
|
|
847
915
|
* is pure and synchronous, turning one item + context into a `FormattedItem`.
|
|
848
916
|
*/
|
|
849
917
|
interface BoundFormatter<TItem = unknown, TInput = Record<string, unknown>, TContext = unknown> {
|
|
850
|
-
|
|
918
|
+
getContext?: (bag: {
|
|
851
919
|
items: TItem[];
|
|
852
920
|
input: TInput;
|
|
853
921
|
context?: TContext;
|
|
@@ -1126,7 +1194,7 @@ interface MethodEntry {
|
|
|
1126
1194
|
* public callable / imports take as positional args. */
|
|
1127
1195
|
positional?: readonly string[];
|
|
1128
1196
|
/** Bound input resolvers (their imports captured at materialization), keyed by
|
|
1129
|
-
* param name. The CLI calls these with
|
|
1197
|
+
* param name. The CLI calls these with input only, no sdk. */
|
|
1130
1198
|
resolvers?: Record<string, BoundResolver>;
|
|
1131
1199
|
/** Bound output formatter (imports captured at materialization). */
|
|
1132
1200
|
formatter?: BoundFormatter;
|
|
@@ -1328,8 +1396,24 @@ interface FunctionRegistryEntry<TSdk = any> {
|
|
|
1328
1396
|
schema: z.ZodSchema;
|
|
1329
1397
|
}>;
|
|
1330
1398
|
outputSchema?: z.ZodSchema;
|
|
1399
|
+
/**
|
|
1400
|
+
* Ordered input keys the public surface projects onto positional arguments
|
|
1401
|
+
* (the method's `positional` declaration). Absent when the method takes only
|
|
1402
|
+
* the canonical single bag. Lifted off the materialized method entry by the
|
|
1403
|
+
* surface builder, like `boundResolvers` — a runtime projection, not
|
|
1404
|
+
* descriptive meta.
|
|
1405
|
+
*/
|
|
1406
|
+
positional?: readonly string[];
|
|
1331
1407
|
categories: string[];
|
|
1332
1408
|
resolvers?: Record<string, ResolverMetadata<TSdk, any, any>>;
|
|
1409
|
+
/**
|
|
1410
|
+
* Per-parameter bound resolvers from the new model (imports already captured,
|
|
1411
|
+
* called with `input` only, no sdk). Parallel to the legacy `resolvers` field
|
|
1412
|
+
* and `formatter`: the surface builder lifts these off the materialized method
|
|
1413
|
+
* entry. Additive bridge — populated for migrated `defineMethod` plugins; the
|
|
1414
|
+
* legacy `resolvers` field above stays the source for unmigrated ones.
|
|
1415
|
+
*/
|
|
1416
|
+
boundResolvers?: Record<string, BoundResolver>;
|
|
1333
1417
|
packages?: string[];
|
|
1334
1418
|
/**
|
|
1335
1419
|
* True if the plugin is registered only in the experimental SDK
|
|
@@ -1350,7 +1434,7 @@ interface FunctionRegistryEntry<TSdk = any> {
|
|
|
1350
1434
|
aliases?: Record<string, string>;
|
|
1351
1435
|
/**
|
|
1352
1436
|
* Output formatter, normalized to the bound runtime shape (its imports/sdk
|
|
1353
|
-
* already captured), so consumers call `
|
|
1437
|
+
* already captured), so consumers call `getContext`/`format` with no sdk.
|
|
1354
1438
|
* The surface builder produces this from the method entry — `entry.formatter`
|
|
1355
1439
|
* for a migrated plugin, or the legacy `meta.formatter` adapted — so vintage
|
|
1356
1440
|
* is invisible here.
|
|
@@ -1883,6 +1967,112 @@ declare function defineMethod<const TName extends string, TInput, TResponse, TIt
|
|
|
1883
1967
|
}) => TState;
|
|
1884
1968
|
run: (bag: MethodRunBag<ImportsOf<TImports>, TInput & PageFetchInput, TState>) => TResponse | Promise<TResponse>;
|
|
1885
1969
|
} & LeafMetaFields): MethodPlugin<TName, TInput & PaginatedCallInput, PaginatedSdkResult<TItem>> & LeafSummary<TNamespace, TName, TImports>;
|
|
1970
|
+
/**
|
|
1971
|
+
* Define an input resolver: a method attachment for one of its parameters. Like
|
|
1972
|
+
* `defineMethod` it declares its own `imports`, and its callbacks receive a
|
|
1973
|
+
* narrowed `imports` bag, NOT the whole SDK. The graph reaches its imports
|
|
1974
|
+
* (materialize + dedup) but they never enter the host method's run-bag, so a
|
|
1975
|
+
* resolver may even import its own host method. At createSdk the imports are
|
|
1976
|
+
* captured, so the CLI later calls `listItems(input)` / `tryResolveWithoutPrompt
|
|
1977
|
+
* (input)` with no sdk argument.
|
|
1978
|
+
*
|
|
1979
|
+
* The `type` selects the kind (a {@link Resolver} union member); the config
|
|
1980
|
+
* narrows to it. `requireParameters` names sibling parameters that must resolve
|
|
1981
|
+
* first (it reads their values from `input`), independent of `imports` (the
|
|
1982
|
+
* SDK-capability graph). `object` / `array` resolvers compose nested resolvers;
|
|
1983
|
+
* an import-bearing resolver reached from a built field lives in `definitions`
|
|
1984
|
+
* (reached by `{ ref }`), since it can't be inlined when the field set is built
|
|
1985
|
+
* dynamically.
|
|
1986
|
+
*/
|
|
1987
|
+
declare function defineResolver<const TImports extends ImportsInput = readonly [], TItem = unknown, TInput = Record<string, unknown>, TContext = unknown>(config: {
|
|
1988
|
+
type?: "dynamic";
|
|
1989
|
+
imports?: TImports & StaticList<TImports>;
|
|
1990
|
+
requireParameters?: readonly string[];
|
|
1991
|
+
inputType?: "text" | "password" | "email" | "search";
|
|
1992
|
+
placeholder?: string;
|
|
1993
|
+
/** Compute side-context once, before `listItems` (pre-fetch, no items yet),
|
|
1994
|
+
* with the narrowed `imports`. Its result flows into `listItems` and `prompt`
|
|
1995
|
+
* as `context`, so one place resolves what both the fetch and the render need
|
|
1996
|
+
* (e.g. a capability gate). May re-run across re-asks; keep it cheap. */
|
|
1997
|
+
getContext?: (bag: {
|
|
1998
|
+
imports: ImportsOf<TImports>;
|
|
1999
|
+
input: TInput;
|
|
2000
|
+
}) => PromiseLike<TContext>;
|
|
2001
|
+
/** Produce the candidate list. Behaves like an SDK list method (returns a page
|
|
2002
|
+
* / paginated result, never a bare array). `cursor` is the stateless "load
|
|
2003
|
+
* more" re-entry hook. */
|
|
2004
|
+
listItems?: (bag: {
|
|
2005
|
+
imports: ImportsOf<TImports>;
|
|
2006
|
+
input: TInput;
|
|
2007
|
+
/** The value `getContext` returned, if any. */
|
|
2008
|
+
context?: TContext;
|
|
2009
|
+
/** Free-text term the CLI injects for search-mode resolvers; a separate key
|
|
2010
|
+
* from `input`, so it never collides with a parameter named `search`. */
|
|
2011
|
+
search?: string;
|
|
2012
|
+
cursor?: string;
|
|
2013
|
+
}) => ListItemsResult<TItem>;
|
|
2014
|
+
prompt?: (bag: {
|
|
2015
|
+
items: TItem[];
|
|
2016
|
+
input: TInput;
|
|
2017
|
+
/** The value `getContext` returned, if any. */
|
|
2018
|
+
context?: TContext;
|
|
2019
|
+
}) => ResolverPromptConfig;
|
|
2020
|
+
/** Resolve with no user input (e.g. a configured default), skipping the prompt. */
|
|
2021
|
+
tryResolveWithoutPrompt?: (bag: {
|
|
2022
|
+
imports: ImportsOf<TImports>;
|
|
2023
|
+
input: TInput;
|
|
2024
|
+
}) => Promise<{
|
|
2025
|
+
resolvedValue: unknown;
|
|
2026
|
+
} | null>;
|
|
2027
|
+
/** Search-mode exact match: the typed `search` already names a valid value, so
|
|
2028
|
+
* return it and skip the picker. Returns null to fall through to `listItems`. */
|
|
2029
|
+
tryResolveFromSearch?: (bag: {
|
|
2030
|
+
imports: ImportsOf<TImports>;
|
|
2031
|
+
input: TInput;
|
|
2032
|
+
search?: string;
|
|
2033
|
+
}) => Promise<{
|
|
2034
|
+
resolvedValue: unknown;
|
|
2035
|
+
} | null>;
|
|
2036
|
+
}): DynamicResolver;
|
|
2037
|
+
declare function defineResolver(config: {
|
|
2038
|
+
type: "static";
|
|
2039
|
+
requireParameters?: readonly string[];
|
|
2040
|
+
inputType?: "text" | "password" | "email" | "search";
|
|
2041
|
+
placeholder?: string;
|
|
2042
|
+
}): StaticResolver;
|
|
2043
|
+
declare function defineResolver(config: {
|
|
2044
|
+
type: "constant";
|
|
2045
|
+
value: unknown;
|
|
2046
|
+
requireParameters?: readonly string[];
|
|
2047
|
+
}): ConstantResolver;
|
|
2048
|
+
declare function defineResolver(config: {
|
|
2049
|
+
type: "info";
|
|
2050
|
+
text: string;
|
|
2051
|
+
}): InfoResolver;
|
|
2052
|
+
declare function defineResolver<const TImports extends ImportsInput = readonly [], TInput = Record<string, unknown>>(config: {
|
|
2053
|
+
type: "object";
|
|
2054
|
+
imports?: TImports & StaticList<TImports>;
|
|
2055
|
+
requireParameters?: readonly string[];
|
|
2056
|
+
properties?: Record<string, Field$1>;
|
|
2057
|
+
/** Build the property map when the key set is dynamic (re-invoked as `input`
|
|
2058
|
+
* grow). Returns the map raw, no envelope. */
|
|
2059
|
+
getProperties?: (bag: {
|
|
2060
|
+
imports: ImportsOf<TImports>;
|
|
2061
|
+
input: TInput;
|
|
2062
|
+
}) => PromiseLike<Record<string, Field$1>>;
|
|
2063
|
+
definitions?: Record<string, Resolver>;
|
|
2064
|
+
}): ObjectResolver;
|
|
2065
|
+
declare function defineResolver(config: {
|
|
2066
|
+
type: "array";
|
|
2067
|
+
requireParameters?: readonly string[];
|
|
2068
|
+
items: Resolver | ResolverRef;
|
|
2069
|
+
minItems?: number;
|
|
2070
|
+
maxItems?: number;
|
|
2071
|
+
/** Coarse value type of each element, so a free-text item answer coerces
|
|
2072
|
+
* (e.g. `"5"` → `5`) like object fields do via `Field.valueType`. */
|
|
2073
|
+
itemValueType?: string;
|
|
2074
|
+
definitions?: Record<string, Resolver>;
|
|
2075
|
+
}): ArrayResolver;
|
|
1886
2076
|
/**
|
|
1887
2077
|
* Declare a stand-in for a method registered elsewhere (a configured factory
|
|
1888
2078
|
* plugin, or just a different module). You reference it by `id` (`namespace/name`,
|
|
@@ -2026,6 +2216,308 @@ declare function addPlugin<TSdk extends object, P>(sdk: TSdk, plugin: P, options
|
|
|
2026
2216
|
override?: boolean;
|
|
2027
2217
|
}): asserts sdk is TSdk & AddedSurface<P>;
|
|
2028
2218
|
|
|
2219
|
+
/**
|
|
2220
|
+
* Public types for the resolution engine: the serializable protocol a host
|
|
2221
|
+
* drives (`start` / `step`), the in-process `resolve` sugar's answerer, and the
|
|
2222
|
+
* reflection shapes (`listMethods` / `getMethod` / `listChoices`). The engine
|
|
2223
|
+
* turns a method's partial input into a complete, validated input by resolving
|
|
2224
|
+
* each parameter, interacting with the host only when it must. See the kitcore
|
|
2225
|
+
* README's "Resolving inputs: controllers" section for worked host examples.
|
|
2226
|
+
*/
|
|
2227
|
+
/** A candidate value the host renders; the host composes its own display label
|
|
2228
|
+
* from `label`/`hint`. `value` is what flows back in a `choose` action. */
|
|
2229
|
+
interface ControllerChoice {
|
|
2230
|
+
label: string;
|
|
2231
|
+
value: string;
|
|
2232
|
+
hint?: string;
|
|
2233
|
+
}
|
|
2234
|
+
/**
|
|
2235
|
+
* A move the host can make in response to a question, self-described so an agent
|
|
2236
|
+
* can follow it without the type definitions (HATEOAS-lite). `description` says
|
|
2237
|
+
* what it does; `supply` names the single payload field to include when sending
|
|
2238
|
+
* the action (absent = no payload). Enriching an affordance with a full field
|
|
2239
|
+
* schema later is additive and never changes the {@link ControllerAction} it
|
|
2240
|
+
* produces.
|
|
2241
|
+
*/
|
|
2242
|
+
interface ControllerAffordance {
|
|
2243
|
+
action: ControllerAction["type"];
|
|
2244
|
+
description: string;
|
|
2245
|
+
supply?: "value" | "term";
|
|
2246
|
+
}
|
|
2247
|
+
/** A question the host renders. Discriminated on `type`; the available moves are
|
|
2248
|
+
* the self-describing `actions` list (single source of truth, no flags). */
|
|
2249
|
+
type ControllerQuestion = {
|
|
2250
|
+
type: "select";
|
|
2251
|
+
message: string;
|
|
2252
|
+
/** What this field is, for an agent that lacks the schema. */
|
|
2253
|
+
description?: string;
|
|
2254
|
+
choices: ControllerChoice[];
|
|
2255
|
+
actions: ControllerAffordance[];
|
|
2256
|
+
/** A multi-select (the resolver's `prompt` returned `type: "checkbox"`);
|
|
2257
|
+
* the `choose` action then carries an array. */
|
|
2258
|
+
multiple?: boolean;
|
|
2259
|
+
/** Informational, non-selectable lines (`PromptConfig.notes`), e.g. a
|
|
2260
|
+
* capability hint. A host renders them dimmed, after the choices. */
|
|
2261
|
+
notes?: string[];
|
|
2262
|
+
} | {
|
|
2263
|
+
type: "input";
|
|
2264
|
+
message: string;
|
|
2265
|
+
description?: string;
|
|
2266
|
+
inputType: "text" | "password" | "email";
|
|
2267
|
+
placeholder?: string;
|
|
2268
|
+
actions: ControllerAffordance[];
|
|
2269
|
+
} | {
|
|
2270
|
+
type: "collection";
|
|
2271
|
+
message: string;
|
|
2272
|
+
description?: string;
|
|
2273
|
+
count: number;
|
|
2274
|
+
min: number;
|
|
2275
|
+
/** Absent when the array is unbounded (no `maxItems`); a finite cap
|
|
2276
|
+
* otherwise. Omitted rather than `Infinity` so the question stays JSON. */
|
|
2277
|
+
max?: number;
|
|
2278
|
+
actions: ControllerAffordance[];
|
|
2279
|
+
};
|
|
2280
|
+
/** The host's response to a question. The wire shape is frozen: a fuller
|
|
2281
|
+
* HATEOAS affordance schema would still produce exactly these. */
|
|
2282
|
+
type ControllerAction = {
|
|
2283
|
+
type: "choose";
|
|
2284
|
+
value: string | string[];
|
|
2285
|
+
} | {
|
|
2286
|
+
type: "search";
|
|
2287
|
+
term: string;
|
|
2288
|
+
} | {
|
|
2289
|
+
type: "more";
|
|
2290
|
+
} | {
|
|
2291
|
+
type: "custom";
|
|
2292
|
+
value: string;
|
|
2293
|
+
} | {
|
|
2294
|
+
type: "skip";
|
|
2295
|
+
} | {
|
|
2296
|
+
type: "add";
|
|
2297
|
+
} | {
|
|
2298
|
+
type: "done";
|
|
2299
|
+
} | {
|
|
2300
|
+
type: "cancel";
|
|
2301
|
+
} | {
|
|
2302
|
+
type: "retry";
|
|
2303
|
+
};
|
|
2304
|
+
/** What `start` / `step` return alongside the next state. `ask` carries a
|
|
2305
|
+
* question to answer; `done` the fully resolved input; `invalid` the validation
|
|
2306
|
+
* issues; `failed` a thrown lookup error plus a question offering retry/cancel. */
|
|
2307
|
+
type ControllerResult = {
|
|
2308
|
+
status: "ask";
|
|
2309
|
+
question: ControllerQuestion;
|
|
2310
|
+
/** The prior answer's validation failure (`PromptConfig.validate`), when
|
|
2311
|
+
* this is a re-ask. About the last transition, not the question itself. */
|
|
2312
|
+
error?: string;
|
|
2313
|
+
} | {
|
|
2314
|
+
status: "done";
|
|
2315
|
+
value: Record<string, unknown>;
|
|
2316
|
+
} | {
|
|
2317
|
+
status: "invalid";
|
|
2318
|
+
issues: ControllerIssue[];
|
|
2319
|
+
} | {
|
|
2320
|
+
status: "failed";
|
|
2321
|
+
error: ControllerError;
|
|
2322
|
+
question: ControllerQuestion;
|
|
2323
|
+
} | {
|
|
2324
|
+
status: "cancelled";
|
|
2325
|
+
};
|
|
2326
|
+
/** A thrown lookup failure, normalized to plain data at the wall. The engine
|
|
2327
|
+
* catches an arbitrary throwable; a raw `Error` loses its message under
|
|
2328
|
+
* `JSON.stringify` (and a circular/custom value can break transport), so a
|
|
2329
|
+
* `failed` result carries this DTO instead, which a remote host can render. */
|
|
2330
|
+
interface ControllerError {
|
|
2331
|
+
name: string;
|
|
2332
|
+
message: string;
|
|
2333
|
+
code?: string;
|
|
2334
|
+
}
|
|
2335
|
+
/** A single validation problem, keyed to the offending parameter when known. */
|
|
2336
|
+
interface ControllerIssue {
|
|
2337
|
+
parameter?: string;
|
|
2338
|
+
message: string;
|
|
2339
|
+
}
|
|
2340
|
+
/**
|
|
2341
|
+
* The serializable, caller-held progress of a resolution. The host carries it
|
|
2342
|
+
* forward and passes it back into the next `step`; it round-trips across a
|
|
2343
|
+
* client/server boundary unchanged (no closures, no live iterators). It carries
|
|
2344
|
+
* the method id, so `step` needs nothing else.
|
|
2345
|
+
*/
|
|
2346
|
+
interface ControllerState {
|
|
2347
|
+
method: string;
|
|
2348
|
+
/** The growing input, as a nested tree of *real values only* — objects build
|
|
2349
|
+
* in place (`resolved.inputs.channel`), so a leaf value lives at its {@link ControllerPath}. */
|
|
2350
|
+
resolved: Record<string, unknown>;
|
|
2351
|
+
/** Dotted path-keys the engine is done with: a resolved leaf (value in
|
|
2352
|
+
* `resolved`), a skipped leaf (no value), or a finished array. Objects derive
|
|
2353
|
+
* doneness from their children. The "touched" analog from form libraries. */
|
|
2354
|
+
settled: string[];
|
|
2355
|
+
/** The path of the parameter (or nested field) currently being asked. */
|
|
2356
|
+
current?: ControllerPath;
|
|
2357
|
+
/** Listing progress for the current dynamic leaf (serializable: items +
|
|
2358
|
+
* cursor, never a live iterator). */
|
|
2359
|
+
listing?: ControllerListing;
|
|
2360
|
+
/** Whether the host will prompt. Interactive (the default) always asks;
|
|
2361
|
+
* non-interactive runs `tryResolveWithoutPrompt` to auto-fill what it can
|
|
2362
|
+
* (e.g. configured defaults) before asking for the rest. */
|
|
2363
|
+
interactive: boolean;
|
|
2364
|
+
}
|
|
2365
|
+
/** A location in the input tree: top-level `["app"]`, a nested object field
|
|
2366
|
+
* `["inputs", "channel"]`, or (later) an array item `["records", 0, "id"]`. */
|
|
2367
|
+
type ControllerPath = (string | number)[];
|
|
2368
|
+
/** Accumulated candidate items for the current dynamic parameter, plus the
|
|
2369
|
+
* serializable cursor for "load more" and the active search term. */
|
|
2370
|
+
interface ControllerListing {
|
|
2371
|
+
items: unknown[];
|
|
2372
|
+
cursor?: string;
|
|
2373
|
+
search?: string;
|
|
2374
|
+
/** True when the source reported no further pages. */
|
|
2375
|
+
exhausted: boolean;
|
|
2376
|
+
}
|
|
2377
|
+
/**
|
|
2378
|
+
* The one pluggable seam for the in-process `resolve` sugar. It receives the
|
|
2379
|
+
* same `{ state, result }` pair `start`/`step` return (so an answer callback
|
|
2380
|
+
* sees exactly what a host driving the protocol directly would) and produces
|
|
2381
|
+
* the next action. `result` is a question-bearing result — `ask` (the question
|
|
2382
|
+
* plus any prior-answer `error`) or `failed` (a lookup threw; the question
|
|
2383
|
+
* offers `retry`/`cancel`, `error` is the thrown value). `state` is read-only
|
|
2384
|
+
* context (e.g. an agent can inspect `state.resolved`); mutating it is
|
|
2385
|
+
* unsupported. Modality-agnostic — inquirer/DOM, an LLM agent, an auto-select
|
|
2386
|
+
* policy, or a test script all satisfy it. The `start`/`step` protocol needs no
|
|
2387
|
+
* answer callback.
|
|
2388
|
+
*/
|
|
2389
|
+
type ControllerAnswerFn = (turn: {
|
|
2390
|
+
state: ControllerState;
|
|
2391
|
+
result: Extract<ControllerResult, {
|
|
2392
|
+
status: "ask" | "failed";
|
|
2393
|
+
}>;
|
|
2394
|
+
}) => Promise<ControllerAction>;
|
|
2395
|
+
/** Per-parameter metadata for reflection (agents / MCP / docs / previews). The
|
|
2396
|
+
* static, no-I/O view, complementing the in-the-moment `question`. */
|
|
2397
|
+
interface ControllerParameterDescription {
|
|
2398
|
+
required: boolean;
|
|
2399
|
+
/** True when values come from a fetch (`listItems`) rather than a static set. */
|
|
2400
|
+
dynamic: boolean;
|
|
2401
|
+
/** True when the resolver accepts a free-text search term. */
|
|
2402
|
+
searchable?: boolean;
|
|
2403
|
+
/** The field's serialized type (`z.toJSONSchema` of its input schema). Absent
|
|
2404
|
+
* for a dynamically-shaped field (`getProperties`) with no static schema, or
|
|
2405
|
+
* when the schema can't be represented as JSON Schema. zod never crosses the
|
|
2406
|
+
* wall; this is its plain-data projection. */
|
|
2407
|
+
schema?: Record<string, unknown>;
|
|
2408
|
+
/** Statically known labeled values, when the parameter is a fixed enum. Richer
|
|
2409
|
+
* than `schema.enum` (carries label/hint), so kept alongside `schema`. */
|
|
2410
|
+
choices?: ControllerChoice[];
|
|
2411
|
+
/** Sibling parameters this one depends on (`requireParameters`). A form host
|
|
2412
|
+
* reads this to know which fields are independent (render together) and which
|
|
2413
|
+
* to re-fetch when a dependency changes. */
|
|
2414
|
+
requireParameters?: readonly string[];
|
|
2415
|
+
}
|
|
2416
|
+
/** A method's lightweight index entry: enough to render a menu or tool list
|
|
2417
|
+
* without the full per-parameter detail. The list face of {@link Controller}. */
|
|
2418
|
+
interface ControllerMethodSummary {
|
|
2419
|
+
name: string;
|
|
2420
|
+
description?: string;
|
|
2421
|
+
categories?: string[];
|
|
2422
|
+
}
|
|
2423
|
+
/** A method's full static contract, serialized: its parameters as a named bag
|
|
2424
|
+
* (mirroring the canonical single-object input), the positional projection if
|
|
2425
|
+
* the surface declares one, and the output type. All plain JSON — the
|
|
2426
|
+
* serializable projection of the registry entry, never its live zod. */
|
|
2427
|
+
interface ControllerMethodDescription {
|
|
2428
|
+
name: string;
|
|
2429
|
+
description?: string;
|
|
2430
|
+
categories?: string[];
|
|
2431
|
+
/** Keyed by parameter name (the input bag's shape), not an ordered array:
|
|
2432
|
+
* named-first, since MCP/web/agent hosts fill named slots. Order, when it
|
|
2433
|
+
* matters, lives in `positional`. */
|
|
2434
|
+
parameters: Record<string, ControllerParameterDescription>;
|
|
2435
|
+
/** Ordered input keys the public surface takes as positional args, when the
|
|
2436
|
+
* method declares a positional projection. Absent for a pure single-bag call. */
|
|
2437
|
+
positional?: readonly string[];
|
|
2438
|
+
/** The output type (`z.toJSONSchema` of the output schema), when known. */
|
|
2439
|
+
output?: Record<string, unknown>;
|
|
2440
|
+
}
|
|
2441
|
+
/**
|
|
2442
|
+
* Drives parameter resolution over a built SDK, reading its registry for the
|
|
2443
|
+
* method's input schema and bound resolvers. Created from an SDK with
|
|
2444
|
+
* `createController(sdk)`; transport-agnostic, so a remote implementation
|
|
2445
|
+
* (browser → server) satisfies the same interface.
|
|
2446
|
+
*/
|
|
2447
|
+
interface Controller {
|
|
2448
|
+
/** In-process sugar: loop `start`/`step` against an answer callback, return
|
|
2449
|
+
* the resolved input (ready to pass to the SDK method). Throws on cancel. */
|
|
2450
|
+
resolve(opts: {
|
|
2451
|
+
method: string;
|
|
2452
|
+
input?: Record<string, unknown>;
|
|
2453
|
+
answer: ControllerAnswerFn;
|
|
2454
|
+
/** Defaults to true. Pass false for an agent/headless answer callback that
|
|
2455
|
+
* wants configured defaults auto-filled (`tryResolveWithoutPrompt`) rather
|
|
2456
|
+
* than prompted. */
|
|
2457
|
+
interactive?: boolean;
|
|
2458
|
+
}): Promise<Record<string, unknown>>;
|
|
2459
|
+
/** Start resolving: seed from `input`, auto-resolve what needs no interaction,
|
|
2460
|
+
* return the first result (an `ask`, or `done`). */
|
|
2461
|
+
start(opts: {
|
|
2462
|
+
method: string;
|
|
2463
|
+
input?: Record<string, unknown>;
|
|
2464
|
+
/** Defaults to true (always prompt). Pass false for headless/agent hosts to
|
|
2465
|
+
* auto-fill via `tryResolveWithoutPrompt` before asking. */
|
|
2466
|
+
interactive?: boolean;
|
|
2467
|
+
}): Promise<{
|
|
2468
|
+
state: ControllerState;
|
|
2469
|
+
result: ControllerResult;
|
|
2470
|
+
}>;
|
|
2471
|
+
/** Advance with the user's action; return the next state and result. */
|
|
2472
|
+
step(opts: {
|
|
2473
|
+
state: ControllerState;
|
|
2474
|
+
action: ControllerAction;
|
|
2475
|
+
}): Promise<{
|
|
2476
|
+
state: ControllerState;
|
|
2477
|
+
result: ControllerResult;
|
|
2478
|
+
}>;
|
|
2479
|
+
/** Reflection (list): the lightweight index of every method (no I/O). The
|
|
2480
|
+
* `nextCursor` slot mirrors `listChoices` and leaves room for paging a future
|
|
2481
|
+
* dynamic/large method set; unpaged today. */
|
|
2482
|
+
listMethods(): {
|
|
2483
|
+
data: ControllerMethodSummary[];
|
|
2484
|
+
nextCursor?: string;
|
|
2485
|
+
};
|
|
2486
|
+
/** Reflection (item): one method's full static contract, serialized (no I/O).
|
|
2487
|
+
* Named `getMethod` to mirror the SDK's `getApp`/`listApps` resource pair;
|
|
2488
|
+
* returns the method's *description*, not the callable. */
|
|
2489
|
+
getMethod(opts: {
|
|
2490
|
+
method: string;
|
|
2491
|
+
}): {
|
|
2492
|
+
data: ControllerMethodDescription;
|
|
2493
|
+
};
|
|
2494
|
+
/** Reflection: enumerate legal values for one dynamic parameter. */
|
|
2495
|
+
listChoices(opts: {
|
|
2496
|
+
method: string;
|
|
2497
|
+
parameter: string;
|
|
2498
|
+
input?: Record<string, unknown>;
|
|
2499
|
+
search?: string;
|
|
2500
|
+
cursor?: string;
|
|
2501
|
+
}): Promise<{
|
|
2502
|
+
data: ControllerChoice[];
|
|
2503
|
+
nextCursor?: string;
|
|
2504
|
+
}>;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
/** The slice of a built SDK the driver needs: its registry accessor. */
|
|
2508
|
+
interface ControllerSdk {
|
|
2509
|
+
getRegistry: (options?: {
|
|
2510
|
+
package?: string;
|
|
2511
|
+
}) => RegistryResult;
|
|
2512
|
+
}
|
|
2513
|
+
/**
|
|
2514
|
+
* Build a {@link Controller} over a built SDK. Reads `sdk.getRegistry()`
|
|
2515
|
+
* at call time (so post-build `addPlugin` additions are visible) to find each
|
|
2516
|
+
* method's canonical input schema and bound resolvers, then drives the engine.
|
|
2517
|
+
* The SDK surface itself is untouched; this is a sibling layer.
|
|
2518
|
+
*/
|
|
2519
|
+
declare function createController(sdk: ControllerSdk): Controller;
|
|
2520
|
+
|
|
2029
2521
|
/**
|
|
2030
2522
|
* Generic utility functions for creating SDK-method wrappers.
|
|
2031
2523
|
*
|
|
@@ -2100,10 +2592,10 @@ declare const CoreErrorCode: {
|
|
|
2100
2592
|
type CoreErrorCode = (typeof CoreErrorCode)[keyof typeof CoreErrorCode];
|
|
2101
2593
|
/**
|
|
2102
2594
|
* Standard error envelope. kitcore doesn't generate these
|
|
2103
|
-
* itself; heads set `errors?:
|
|
2595
|
+
* itself; heads set `errors?: CoreApiError[]` on their error constructor
|
|
2104
2596
|
* options when surfacing structured upstream failures.
|
|
2105
2597
|
*/
|
|
2106
|
-
interface
|
|
2598
|
+
interface CoreApiError {
|
|
2107
2599
|
status: number;
|
|
2108
2600
|
code: string;
|
|
2109
2601
|
title: string;
|
|
@@ -2229,6 +2721,55 @@ declare function toTitleCase(input: string): string;
|
|
|
2229
2721
|
*/
|
|
2230
2722
|
declare function toSnakeCase(input: string): string;
|
|
2231
2723
|
|
|
2724
|
+
/**
|
|
2725
|
+
* Core signal machinery.
|
|
2726
|
+
*
|
|
2727
|
+
* Signals are intentional control-flow throws — not failures. They're the
|
|
2728
|
+
* sibling of {@link CoreError}: where an error means "something went wrong," a
|
|
2729
|
+
* signal means "stop and do this on purpose." The first (and currently only)
|
|
2730
|
+
* one is {@link CoreCancelledSignal}, thrown by `Controller.resolve` when the
|
|
2731
|
+
* host cancels resolution (its answer callback returned `{ type: "cancel" }`).
|
|
2732
|
+
*
|
|
2733
|
+
* Like errors, every signal is brand-stamped with {@link CORE_SIGNAL_SYMBOL} so
|
|
2734
|
+
* a consumer can recognize one via {@link isCoreSignal} without sharing class
|
|
2735
|
+
* identity — important across the bundled-vs-standalone kitcore boundary.
|
|
2736
|
+
*/
|
|
2737
|
+
/**
|
|
2738
|
+
* Cross-package brand for kitcore signals. `Symbol.for(key)` reads the
|
|
2739
|
+
* engine-global registry, so the same value resolves across realms and across
|
|
2740
|
+
* multiple copies of kitcore. Use {@link isCoreSignal} for cross-package checks.
|
|
2741
|
+
*/
|
|
2742
|
+
declare const CORE_SIGNAL_SYMBOL: unique symbol;
|
|
2743
|
+
/**
|
|
2744
|
+
* Base class for kitcore signals. A signal is intentional control flow, not an
|
|
2745
|
+
* error, so it does NOT extend any error hierarchy that failure-handling code
|
|
2746
|
+
* sweeps up via `instanceof CoreError`. Subclasses declare a stable `name` and
|
|
2747
|
+
* `code`. (Mirrors the head convention, e.g. zapier-sdk's `ZapierSignal`.)
|
|
2748
|
+
*/
|
|
2749
|
+
declare abstract class CoreSignal extends Error {
|
|
2750
|
+
abstract readonly name: string;
|
|
2751
|
+
abstract readonly code: string;
|
|
2752
|
+
constructor(message?: string);
|
|
2753
|
+
}
|
|
2754
|
+
/**
|
|
2755
|
+
* Cross-package-safe check that `value` is a kitcore signal (an intentional
|
|
2756
|
+
* control-flow throw), as opposed to a real error. Survives the
|
|
2757
|
+
* bundled/standalone kitcore split, where `instanceof CoreSignal` may not.
|
|
2758
|
+
*/
|
|
2759
|
+
declare function isCoreSignal(value: unknown): boolean;
|
|
2760
|
+
/**
|
|
2761
|
+
* Thrown by `Controller.resolve` when the host cancels resolution (the answer
|
|
2762
|
+
* callback returned `{ type: "cancel" }`). The lower-level `start`/`step`
|
|
2763
|
+
* protocol instead returns a `{ status: "cancelled" }` result, so a host
|
|
2764
|
+
* driving it directly never sees this throw; `resolve` raises it because its
|
|
2765
|
+
* contract is "the resolved input, or nothing."
|
|
2766
|
+
*/
|
|
2767
|
+
declare class CoreCancelledSignal extends CoreSignal {
|
|
2768
|
+
readonly name = "CoreCancelledSignal";
|
|
2769
|
+
readonly code: "CANCELLED";
|
|
2770
|
+
constructor(message?: string);
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2232
2773
|
declare const AppKeyPropertySchema: z.ZodString & {
|
|
2233
2774
|
_def: z.core.$ZodStringDef & PositionalMetadata;
|
|
2234
2775
|
};
|
|
@@ -2313,7 +2854,7 @@ type LeaseLimitProperty = z.infer<typeof LeaseLimitPropertySchema>;
|
|
|
2313
2854
|
|
|
2314
2855
|
interface ErrorOptions {
|
|
2315
2856
|
statusCode?: number;
|
|
2316
|
-
errors?:
|
|
2857
|
+
errors?: CoreApiError[];
|
|
2317
2858
|
cause?: unknown;
|
|
2318
2859
|
response?: unknown;
|
|
2319
2860
|
}
|
|
@@ -2329,7 +2870,7 @@ declare class ZapierError extends Error {
|
|
|
2329
2870
|
readonly name: string;
|
|
2330
2871
|
readonly code: string;
|
|
2331
2872
|
statusCode?: number;
|
|
2332
|
-
errors?:
|
|
2873
|
+
errors?: CoreApiError[];
|
|
2333
2874
|
cause?: unknown;
|
|
2334
2875
|
response?: unknown;
|
|
2335
2876
|
constructor(message: string, options?: ErrorOptions);
|
|
@@ -2462,7 +3003,7 @@ declare class ZapierActionError extends ZapierError {
|
|
|
2462
3003
|
appKey?: string;
|
|
2463
3004
|
actionKey?: string;
|
|
2464
3005
|
});
|
|
2465
|
-
get actionErrors():
|
|
3006
|
+
get actionErrors(): CoreApiError[] | undefined;
|
|
2466
3007
|
}
|
|
2467
3008
|
/**
|
|
2468
3009
|
* Error thrown when an operation conflicts with existing state (409). Common
|
|
@@ -16590,4 +17131,4 @@ declare const registryPlugin: (sdk: {
|
|
|
16590
17131
|
};
|
|
16591
17132
|
}) => {};
|
|
16592
17133
|
|
|
16593
|
-
export { type Connection as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetConnectionStartUrlItem as G, type Action as H, type App as I, type Field as J, type Choice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type ActionExecutionResult as Q, type ResolvedAppLocator as R, type SdkContext as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type ActionField as V, type WaitForNewConnectionItem as W, type ActionFieldChoice as X, type NeedsRequest as Y, type ZapierSdkOptions as Z, type NeedsResponse as _, type PluginMeta as a, type PollOptions as a$, type ConnectionsResponse as a0, type UserProfile as a1, isPositional as a2, createFunction as a3, createPluginStack as a4, createCorePlugin as a5, addPlugin as a6, createSdk as a7, fromFunctionPlugin as a8, defineLegacyMerge as a9, buildCapabilityMessage as aA, logDeprecation as aB, resetDeprecationWarnings as aC, RelayRequestSchema as aD, RelayFetchSchema as aE, createZapierSdkWithoutRegistry as aF, createOptionsPlugin as aG, createZapierCoreStack as aH, type FunctionRegistryEntry as aI, type FunctionDeprecation as aJ, BaseSdkOptionsSchema as aK, isCoreError as aL, getCoreErrorCode as aM, getCoreErrorCause as aN, CORE_ERROR_SYMBOL as aO, CoreErrorCode as aP, type Plugin as aQ, type PluginProvides as aR, definePlugin as aS, createPluginMethod as aT, createPaginatedPluginMethod as aU, composePlugins as aV, type ActionItem as aW, type ActionTypeItem as aX, getAgent as aY, registryPlugin as aZ, type RequestOptions as a_, dangerousContextPlugin as aa, getContext as ab, defineMethod as ac, defineProperty as ad, declareMethod as ae, declareProperty as af, zapierSdkPlugin as ag, type FormattedItem as ah, type BoundFormatter as ai, type Formatter as aj, type Resolver$1 as ak, type ArrayResolver$1 as al, type ResolverMetadata as am, type StaticResolver$1 as an, type DynamicListResolver as ao, type DynamicSearchResolver as ap, type FieldsResolver as aq, runInMethodScope as ar, runWithTelemetryContext as as, getCallerContext as at, runWithCallerContext as au, type CallerContext as av, toSnakeCase as aw, toTitleCase as ax, batch as ay, type BatchOptions as az, type Manifest as b, type FieldsProperty as b$, createZapierApi as b0, getOrCreateApiClient as b1, isPermanentHttpError as b2, type SseMessage as b3, type JsonSseMessage as b4, DEPRECATION_NOTICE_EVENT as b5, type DeprecationNoticePayload as b6, type AppItem as b7, type ConnectionItem as b8, type ActionItem$1 as b9, AppsPropertySchema as bA, TablesPropertySchema as bB, ConnectionsPropertySchema as bC, TriggerInboxPropertySchema as bD, TriggerInboxNamePropertySchema as bE, LeasePropertySchema as bF, LeaseSecondsPropertySchema as bG, LeaseLimitPropertySchema as bH, type AppKeyProperty as bI, type AppProperty as bJ, type ActionTypeProperty as bK, type ActionKeyProperty as bL, type ActionProperty as bM, type InputFieldProperty as bN, type ConnectionIdProperty as bO, type ConnectionProperty as bP, type AuthenticationIdProperty as bQ, type InputsProperty as bR, type LimitProperty as bS, type OffsetProperty as bT, type OutputProperty as bU, type DebugProperty as bV, type ParamsProperty as bW, type ActionTimeoutMsProperty as bX, type TableProperty as bY, type RecordProperty as bZ, type RecordsProperty as b_, type InputFieldItem as ba, type InfoFieldItem as bb, type RootFieldItem as bc, type UserProfileItem as bd, type SdkPage as be, type PaginatedSdkFunction as bf, AppKeyPropertySchema as bg, AppPropertySchema as bh, ActionTypePropertySchema as bi, ActionKeyPropertySchema as bj, ActionPropertySchema as bk, InputFieldPropertySchema as bl, ConnectionIdPropertySchema as bm, AuthenticationIdPropertySchema as bn, ConnectionPropertySchema as bo, InputsPropertySchema as bp, LimitPropertySchema as bq, OffsetPropertySchema as br, OutputPropertySchema as bs, DebugPropertySchema as bt, ParamsPropertySchema as bu, ActionTimeoutMsPropertySchema as bv, TablePropertySchema as bw, RecordPropertySchema as bx, RecordsPropertySchema as by, FieldsPropertySchema as bz, type UpdateManifestEntryResult as c, findUniqueConnectionPlugin as c$, type AppsProperty as c0, type TablesProperty as c1, type ConnectionsProperty as c2, type TriggerInboxProperty as c3, type TriggerInboxNameProperty as c4, type LeaseProperty as c5, type LeaseSecondsProperty as c6, type LeaseLimitProperty as c7, type ErrorOptions as c8, ZapierError as c9, type FetchPluginProvides as cA, listAppsPlugin as cB, type ListAppsPluginProvides as cC, listActionsPlugin as cD, type ListActionsPluginProvides as cE, listActionInputFieldsPlugin as cF, type ListActionInputFieldsPluginProvides as cG, listActionInputFieldChoicesPlugin as cH, type ListActionInputFieldChoicesPluginProvides as cI, getActionInputFieldsSchemaPlugin as cJ, type GetActionInputFieldsSchemaPluginProvides as cK, listConnectionsPlugin as cL, type ListConnectionsPluginProvides as cM, listClientCredentialsPlugin as cN, type ListClientCredentialsPluginProvides as cO, createClientCredentialsPlugin as cP, type CreateClientCredentialsPluginProvides as cQ, deleteClientCredentialsPlugin as cR, type DeleteClientCredentialsPluginProvides as cS, getAppPlugin as cT, type GetAppPluginProvides as cU, getActionPlugin as cV, type GetActionPluginProvides as cW, getConnectionPlugin as cX, type GetConnectionPluginProvides as cY, findFirstConnectionPlugin as cZ, type FindFirstConnectionPluginProvides as c_, ZapierValidationError as ca, ZapierUnknownError as cb, ZapierAuthenticationError as cc, zapierAdaptError as cd, ZapierApiError as ce, ZapierAppNotFoundError as cf, ZapierNotFoundError as cg, ZapierResourceNotFoundError as ch, ZapierConfigurationError as ci, ZapierBundleError as cj, ZapierTimeoutError as ck, ZapierActionError as cl, ZapierConflictError as cm, type RateLimitInfo as cn, ZapierRateLimitError as co, type ApprovalStatus as cp, ZapierApprovalError as cq, ZapierRelayError as cr, formatErrorMessage as cs, type ApiError as ct, ZapierSignal as cu, appsPlugin as cv, type AppsPluginProvides as cw, type ActionExecutionOptions as cx, type AppFactoryInput as cy, fetchPlugin as cz, type AddActionEntryOptions as d, type EventCallback as d$, type FindUniqueConnectionPluginProvides as d0, CONTEXT_CACHE_TTL_MS as d1, CONTEXT_CACHE_MAX_SIZE as d2, runActionPlugin as d3, type RunActionPluginProvides as d4, requestPlugin as d5, type RequestPluginProvides as d6, type ManifestPluginOptions as d7, getPreferredManifestEntryKey as d8, manifestPlugin as d9, tableRecordIdsResolver as dA, tableFieldIdsResolver as dB, tableNameResolver as dC, tableFieldsResolver as dD, tableRecordsResolver as dE, tableUpdateRecordsResolver as dF, tableFiltersResolver as dG, tableSortResolver as dH, type ResolveAuthTokenOptions as dI, AuthMechanism as dJ, type ResolvedAuth as dK, clearTokenCache as dL, invalidateCachedToken as dM, injectCliLogin as dN, isCliLoginAvailable as dO, getTokenFromCliLogin as dP, resolveAuth as dQ, resolveAuthToken as dR, invalidateCredentialsToken as dS, type ZapierCache as dT, type ZapierCacheEntry as dU, type ZapierCacheSetOptions as dV, createMemoryCache as dW, type SdkEvent as dX, type AuthEvent as dY, type ApiEvent as dZ, type LoadingEvent as d_, type ManifestPluginProvides as da, DEFAULT_CONFIG_PATH as db, type ManifestEntry as dc, getProfilePlugin as dd, type ApiPluginOptions as de, apiPlugin as df, type ApiPluginProvides as dg, appKeyResolver as dh, actionTypeResolver as di, actionKeyResolver as dj, connectionIdResolver as dk, connectionIdGenericResolver as dl, inputsResolver as dm, inputsAllOptionalResolver as dn, inputFieldKeyResolver as dp, clientCredentialsNameResolver as dq, clientIdResolver as dr, tableIdResolver as ds, triggerInboxResolver as dt, workflowIdResolver as du, durableRunIdResolver as dv, workflowVersionIdResolver as dw, workflowRunIdResolver as dx, triggerMessagesResolver as dy, tableRecordIdResolver as dz, type AddActionEntryResult as e, type DeleteTableRecordsPluginProvides as e$, type Credentials as e0, type ResolvedCredentials as e1, type CredentialsObject as e2, type ClientCredentialsObject as e3, type PkceCredentialsObject as e4, isClientCredentials as e5, isPkceCredentials as e6, isCredentialsObject as e7, isCredentialsFunction as e8, type ResolveCredentialsOptions as e9, ZAPIER_MAX_CONCURRENT_REQUESTS as eA, getZapierApprovalMode as eB, getZapierOpenAutoModeApprovalsInBrowser as eC, getZapierDefaultApprovalMode as eD, DEFAULT_APPROVAL_TIMEOUT_MS as eE, DEFAULT_MAX_APPROVAL_RETRIES as eF, listTablesPlugin as eG, type ListTablesPluginProvides as eH, getTablePlugin as eI, type GetTablePluginProvides as eJ, createTablePlugin as eK, type CreateTablePluginProvides as eL, deleteTablePlugin as eM, type DeleteTablePluginProvides as eN, listTableFieldsPlugin as eO, type ListTableFieldsPluginProvides as eP, createTableFieldsPlugin as eQ, type CreateTableFieldsPluginProvides as eR, deleteTableFieldsPlugin as eS, type DeleteTableFieldsPluginProvides as eT, getTableRecordPlugin as eU, type GetTableRecordPluginProvides as eV, listTableRecordsPlugin as eW, type ListTableRecordsPluginProvides as eX, createTableRecordsPlugin as eY, type CreateTableRecordsPluginProvides as eZ, deleteTableRecordsPlugin as e_, resolveCredentialsFromEnv as ea, resolveCredentials as eb, getBaseUrlFromCredentials as ec, getClientIdFromCredentials as ed, ClientCredentialsObjectSchema as ee, PkceCredentialsObjectSchema as ef, CredentialsObjectSchema as eg, ResolvedCredentialsSchema as eh, CredentialsFunctionSchema as ei, type CredentialsFunction as ej, CredentialsSchema as ek, ConnectionEntrySchema as el, type ConnectionEntry as em, ConnectionsMapSchema as en, type ConnectionsMap as eo, connectionsPlugin as ep, type ConnectionsPluginProvides as eq, ZAPIER_BASE_URL as er, getZapierSdkService as es, MAX_PAGE_LIMIT as et, DEFAULT_PAGE_SIZE as eu, DEFAULT_ACTION_TIMEOUT_MS as ev, ZAPIER_MAX_NETWORK_RETRIES as ew, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as ex, MAX_CONCURRENCY_LIMIT as ey, parseConcurrencyEnvVar as ez, type ActionEntry as f, updateTableRecordsPlugin as f0, type UpdateTableRecordsPluginProvides as f1, cleanupEventListeners as f2, type EventEmissionConfig as f3, eventEmissionPlugin as f4, type EventEmissionProvides as f5, type EventContext as f6, type ApplicationLifecycleEventData as f7, type EnhancedErrorEventData as f8, type MethodCalledEventData as f9, buildApplicationLifecycleEvent as fa, buildErrorEventWithContext as fb, buildErrorEvent as fc, createBaseEvent as fd, buildMethodCalledEvent as fe, type BaseEvent as ff, type MethodCalledEvent as fg, generateEventId as fh, getCurrentTimestamp as fi, getReleaseId as fj, getOsInfo as fk, getPlatformVersions as fl, isCi as fm, getCiPlatform as fn, getMemoryUsage as fo, getCpuTime as fp, getTtyContext as fq, createZapierSdk as fr, createZapierSdkStack as fs, type ZapierSdk as ft, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type CreateConnectionItem as j, type PositionalMetadata as k, type ZapierFetchInitOptions as l, type DynamicResolver$1 as m, type WatchTriggerInboxOptions as n, type ActionProxy as o, type ZapierSdkApps as p, type RegistryResult as q, readManifestFromFile as r, ZapierAbortDrainSignal as s, ZapierReleaseTriggerMessageSignal as t, type DrainTriggerInboxCallback as u, type DrainTriggerInboxErrorObserver as v, type ListAuthenticationsPluginProvides as w, type GetAuthenticationPluginProvides as x, type FindFirstAuthenticationPluginProvides as y, type FindUniqueAuthenticationPluginProvides as z };
|
|
17134
|
+
export { type Connection as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetConnectionStartUrlItem as G, type Action as H, type App as I, type Field as J, type Choice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type ActionExecutionResult as Q, type ResolvedAppLocator as R, type SdkContext as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type ActionField as V, type WaitForNewConnectionItem as W, type ActionFieldChoice as X, type NeedsRequest as Y, type ZapierSdkOptions as Z, type NeedsResponse as _, type PluginMeta as a, CORE_SIGNAL_SYMBOL as a$, type ConnectionsResponse as a0, type UserProfile as a1, isPositional as a2, createFunction as a3, createPluginStack as a4, createCorePlugin as a5, addPlugin as a6, createSdk as a7, fromFunctionPlugin as a8, defineLegacyMerge as a9, runWithTelemetryContext as aA, getCallerContext as aB, runWithCallerContext as aC, type CallerContext as aD, toSnakeCase as aE, toTitleCase as aF, batch as aG, type BatchOptions as aH, buildCapabilityMessage as aI, logDeprecation as aJ, resetDeprecationWarnings as aK, RelayRequestSchema as aL, RelayFetchSchema as aM, createZapierSdkWithoutRegistry as aN, createOptionsPlugin as aO, createZapierCoreStack as aP, type FunctionRegistryEntry as aQ, type FunctionDeprecation as aR, BaseSdkOptionsSchema as aS, isCoreError as aT, getCoreErrorCode as aU, getCoreErrorCause as aV, CORE_ERROR_SYMBOL as aW, CoreErrorCode as aX, CoreSignal as aY, CoreCancelledSignal as aZ, isCoreSignal as a_, dangerousContextPlugin as aa, getContext as ab, defineMethod as ac, defineProperty as ad, defineResolver as ae, declareMethod as af, declareProperty as ag, zapierSdkPlugin as ah, type FormattedItem as ai, type BoundFormatter as aj, type Formatter as ak, type Resolver$1 as al, type ArrayResolver$1 as am, type ResolverMetadata as an, type StaticResolver$1 as ao, type DynamicListResolver as ap, type DynamicSearchResolver as aq, type FieldsResolver as ar, createController as as, type ControllerQuestion as at, type ControllerAction as au, type ControllerAnswerFn as av, type ControllerMethodSummary as aw, type ControllerMethodDescription as ax, type ControllerParameterDescription as ay, runInMethodScope as az, type Manifest as b, type ConnectionProperty as b$, type Plugin as b0, type PluginProvides as b1, definePlugin as b2, createPluginMethod as b3, createPaginatedPluginMethod as b4, composePlugins as b5, type ActionItem as b6, type ActionTypeItem as b7, getAgent as b8, registryPlugin as b9, ConnectionPropertySchema as bA, InputsPropertySchema as bB, LimitPropertySchema as bC, OffsetPropertySchema as bD, OutputPropertySchema as bE, DebugPropertySchema as bF, ParamsPropertySchema as bG, ActionTimeoutMsPropertySchema as bH, TablePropertySchema as bI, RecordPropertySchema as bJ, RecordsPropertySchema as bK, FieldsPropertySchema as bL, AppsPropertySchema as bM, TablesPropertySchema as bN, ConnectionsPropertySchema as bO, TriggerInboxPropertySchema as bP, TriggerInboxNamePropertySchema as bQ, LeasePropertySchema as bR, LeaseSecondsPropertySchema as bS, LeaseLimitPropertySchema as bT, type AppKeyProperty as bU, type AppProperty as bV, type ActionTypeProperty as bW, type ActionKeyProperty as bX, type ActionProperty as bY, type InputFieldProperty as bZ, type ConnectionIdProperty as b_, type RequestOptions as ba, type PollOptions as bb, createZapierApi as bc, getOrCreateApiClient as bd, isPermanentHttpError as be, type SseMessage as bf, type JsonSseMessage as bg, DEPRECATION_NOTICE_EVENT as bh, type DeprecationNoticePayload as bi, type AppItem as bj, type ConnectionItem as bk, type ActionItem$1 as bl, type InputFieldItem as bm, type InfoFieldItem as bn, type RootFieldItem as bo, type UserProfileItem as bp, type SdkPage as bq, type PaginatedSdkFunction as br, AppKeyPropertySchema as bs, AppPropertySchema as bt, ActionTypePropertySchema as bu, ActionKeyPropertySchema as bv, ActionPropertySchema as bw, InputFieldPropertySchema as bx, ConnectionIdPropertySchema as by, AuthenticationIdPropertySchema as bz, type UpdateManifestEntryResult as c, createClientCredentialsPlugin as c$, type AuthenticationIdProperty as c0, type InputsProperty as c1, type LimitProperty as c2, type OffsetProperty as c3, type OutputProperty as c4, type DebugProperty as c5, type ParamsProperty as c6, type ActionTimeoutMsProperty as c7, type TableProperty as c8, type RecordProperty as c9, ZapierRateLimitError as cA, type ApprovalStatus as cB, ZapierApprovalError as cC, ZapierRelayError as cD, formatErrorMessage as cE, type CoreApiError as cF, ZapierSignal as cG, appsPlugin as cH, type AppsPluginProvides as cI, type ActionExecutionOptions as cJ, type AppFactoryInput as cK, fetchPlugin as cL, type FetchPluginProvides as cM, listAppsPlugin as cN, type ListAppsPluginProvides as cO, listActionsPlugin as cP, type ListActionsPluginProvides as cQ, listActionInputFieldsPlugin as cR, type ListActionInputFieldsPluginProvides as cS, listActionInputFieldChoicesPlugin as cT, type ListActionInputFieldChoicesPluginProvides as cU, getActionInputFieldsSchemaPlugin as cV, type GetActionInputFieldsSchemaPluginProvides as cW, listConnectionsPlugin as cX, type ListConnectionsPluginProvides as cY, listClientCredentialsPlugin as cZ, type ListClientCredentialsPluginProvides as c_, type RecordsProperty as ca, type FieldsProperty as cb, type AppsProperty as cc, type TablesProperty as cd, type ConnectionsProperty as ce, type TriggerInboxProperty as cf, type TriggerInboxNameProperty as cg, type LeaseProperty as ch, type LeaseSecondsProperty as ci, type LeaseLimitProperty as cj, type ErrorOptions as ck, ZapierError as cl, ZapierValidationError as cm, ZapierUnknownError as cn, ZapierAuthenticationError as co, zapierAdaptError as cp, ZapierApiError as cq, ZapierAppNotFoundError as cr, ZapierNotFoundError as cs, ZapierResourceNotFoundError as ct, ZapierConfigurationError as cu, ZapierBundleError as cv, ZapierTimeoutError as cw, ZapierActionError as cx, ZapierConflictError as cy, type RateLimitInfo as cz, type AddActionEntryOptions as d, getTokenFromCliLogin as d$, type CreateClientCredentialsPluginProvides as d0, deleteClientCredentialsPlugin as d1, type DeleteClientCredentialsPluginProvides as d2, getAppPlugin as d3, type GetAppPluginProvides as d4, getActionPlugin as d5, type GetActionPluginProvides as d6, getConnectionPlugin as d7, type GetConnectionPluginProvides as d8, findFirstConnectionPlugin as d9, inputsAllOptionalResolver as dA, inputFieldKeyResolver as dB, clientCredentialsNameResolver as dC, clientIdResolver as dD, tableIdResolver as dE, triggerInboxResolver as dF, workflowIdResolver as dG, durableRunIdResolver as dH, workflowVersionIdResolver as dI, workflowRunIdResolver as dJ, triggerMessagesResolver as dK, tableRecordIdResolver as dL, tableRecordIdsResolver as dM, tableFieldIdsResolver as dN, tableNameResolver as dO, tableFieldsResolver as dP, tableRecordsResolver as dQ, tableUpdateRecordsResolver as dR, tableFiltersResolver as dS, tableSortResolver as dT, type ResolveAuthTokenOptions as dU, AuthMechanism as dV, type ResolvedAuth as dW, clearTokenCache as dX, invalidateCachedToken as dY, injectCliLogin as dZ, isCliLoginAvailable as d_, type FindFirstConnectionPluginProvides as da, findUniqueConnectionPlugin as db, type FindUniqueConnectionPluginProvides as dc, CONTEXT_CACHE_TTL_MS as dd, CONTEXT_CACHE_MAX_SIZE as de, runActionPlugin as df, type RunActionPluginProvides as dg, requestPlugin as dh, type RequestPluginProvides as di, type ManifestPluginOptions as dj, getPreferredManifestEntryKey as dk, manifestPlugin as dl, type ManifestPluginProvides as dm, DEFAULT_CONFIG_PATH as dn, type ManifestEntry as dp, getProfilePlugin as dq, type ApiPluginOptions as dr, apiPlugin as ds, type ApiPluginProvides as dt, appKeyResolver as du, actionTypeResolver as dv, actionKeyResolver as dw, connectionIdResolver as dx, connectionIdGenericResolver as dy, inputsResolver as dz, type AddActionEntryResult as e, type ListTableFieldsPluginProvides as e$, resolveAuth as e0, resolveAuthToken as e1, invalidateCredentialsToken as e2, type ZapierCache as e3, type ZapierCacheEntry as e4, type ZapierCacheSetOptions as e5, createMemoryCache as e6, type SdkEvent as e7, type AuthEvent as e8, type ApiEvent as e9, type ConnectionsMap as eA, connectionsPlugin as eB, type ConnectionsPluginProvides as eC, ZAPIER_BASE_URL as eD, getZapierSdkService as eE, MAX_PAGE_LIMIT as eF, DEFAULT_PAGE_SIZE as eG, DEFAULT_ACTION_TIMEOUT_MS as eH, ZAPIER_MAX_NETWORK_RETRIES as eI, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as eJ, MAX_CONCURRENCY_LIMIT as eK, parseConcurrencyEnvVar as eL, ZAPIER_MAX_CONCURRENT_REQUESTS as eM, getZapierApprovalMode as eN, getZapierOpenAutoModeApprovalsInBrowser as eO, getZapierDefaultApprovalMode as eP, DEFAULT_APPROVAL_TIMEOUT_MS as eQ, DEFAULT_MAX_APPROVAL_RETRIES as eR, listTablesPlugin as eS, type ListTablesPluginProvides as eT, getTablePlugin as eU, type GetTablePluginProvides as eV, createTablePlugin as eW, type CreateTablePluginProvides as eX, deleteTablePlugin as eY, type DeleteTablePluginProvides as eZ, listTableFieldsPlugin as e_, type LoadingEvent as ea, type EventCallback as eb, type Credentials as ec, type ResolvedCredentials as ed, type CredentialsObject as ee, type ClientCredentialsObject as ef, type PkceCredentialsObject as eg, isClientCredentials as eh, isPkceCredentials as ei, isCredentialsObject as ej, isCredentialsFunction as ek, type ResolveCredentialsOptions as el, resolveCredentialsFromEnv as em, resolveCredentials as en, getBaseUrlFromCredentials as eo, getClientIdFromCredentials as ep, ClientCredentialsObjectSchema as eq, PkceCredentialsObjectSchema as er, CredentialsObjectSchema as es, ResolvedCredentialsSchema as et, CredentialsFunctionSchema as eu, type CredentialsFunction as ev, CredentialsSchema as ew, ConnectionEntrySchema as ex, type ConnectionEntry as ey, ConnectionsMapSchema as ez, type ActionEntry as f, createTableFieldsPlugin as f0, type CreateTableFieldsPluginProvides as f1, deleteTableFieldsPlugin as f2, type DeleteTableFieldsPluginProvides as f3, getTableRecordPlugin as f4, type GetTableRecordPluginProvides as f5, listTableRecordsPlugin as f6, type ListTableRecordsPluginProvides as f7, createTableRecordsPlugin as f8, type CreateTableRecordsPluginProvides as f9, getMemoryUsage as fA, getCpuTime as fB, getTtyContext as fC, createZapierSdk as fD, createZapierSdkStack as fE, type ZapierSdk as fF, deleteTableRecordsPlugin as fa, type DeleteTableRecordsPluginProvides as fb, updateTableRecordsPlugin as fc, type UpdateTableRecordsPluginProvides as fd, cleanupEventListeners as fe, type EventEmissionConfig as ff, eventEmissionPlugin as fg, type EventEmissionProvides as fh, type EventContext as fi, type ApplicationLifecycleEventData as fj, type EnhancedErrorEventData as fk, type MethodCalledEventData as fl, buildApplicationLifecycleEvent as fm, buildErrorEventWithContext as fn, buildErrorEvent as fo, createBaseEvent as fp, buildMethodCalledEvent as fq, type BaseEvent as fr, type MethodCalledEvent as fs, generateEventId as ft, getCurrentTimestamp as fu, getReleaseId as fv, getOsInfo as fw, getPlatformVersions as fx, isCi as fy, getCiPlatform as fz, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type CreateConnectionItem as j, type PositionalMetadata as k, type ZapierFetchInitOptions as l, type DynamicResolver$1 as m, type WatchTriggerInboxOptions as n, type ActionProxy as o, type ZapierSdkApps as p, type RegistryResult as q, readManifestFromFile as r, ZapierAbortDrainSignal as s, ZapierReleaseTriggerMessageSignal as t, type DrainTriggerInboxCallback as u, type DrainTriggerInboxErrorObserver as v, type ListAuthenticationsPluginProvides as w, type GetAuthenticationPluginProvides as x, type FindFirstAuthenticationPluginProvides as y, type FindUniqueAuthenticationPluginProvides as z };
|