@zapier/zapier-sdk 0.18.4 → 0.19.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 +35 -0
- package/README.md +43 -31
- package/dist/index.cjs +365 -64
- package/dist/index.d.mts +220 -33
- package/dist/index.d.ts +2541 -40
- package/dist/index.mjs +345 -63
- package/package.json +14 -13
- package/dist/api/auth.d.ts +0 -19
- package/dist/api/auth.d.ts.map +0 -1
- package/dist/api/auth.js +0 -70
- package/dist/api/auth.test.d.ts +0 -2
- package/dist/api/auth.test.d.ts.map +0 -1
- package/dist/api/auth.test.js +0 -220
- package/dist/api/client.d.ts +0 -9
- package/dist/api/client.d.ts.map +0 -1
- package/dist/api/client.js +0 -356
- package/dist/api/client.test.d.ts +0 -2
- package/dist/api/client.test.d.ts.map +0 -1
- package/dist/api/client.test.js +0 -96
- package/dist/api/debug.d.ts +0 -14
- package/dist/api/debug.d.ts.map +0 -1
- package/dist/api/debug.js +0 -131
- package/dist/api/debug.test.d.ts +0 -2
- package/dist/api/debug.test.d.ts.map +0 -1
- package/dist/api/debug.test.js +0 -59
- package/dist/api/index.d.ts +0 -30
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -43
- package/dist/api/polling.d.ts +0 -46
- package/dist/api/polling.d.ts.map +0 -1
- package/dist/api/polling.js +0 -139
- package/dist/api/polling.test.d.ts +0 -2
- package/dist/api/polling.test.d.ts.map +0 -1
- package/dist/api/polling.test.js +0 -318
- package/dist/api/schemas.d.ts +0 -422
- package/dist/api/schemas.d.ts.map +0 -1
- package/dist/api/schemas.js +0 -322
- package/dist/api/types.d.ts +0 -83
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js +0 -1
- package/dist/auth.d.ts +0 -52
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -72
- package/dist/auth.test.d.ts +0 -2
- package/dist/auth.test.d.ts.map +0 -1
- package/dist/auth.test.js +0 -102
- package/dist/constants.d.ts +0 -14
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -13
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -42
- package/dist/plugins/api/index.d.ts +0 -12
- package/dist/plugins/api/index.d.ts.map +0 -1
- package/dist/plugins/api/index.js +0 -24
- package/dist/plugins/apps/index.d.ts +0 -15
- package/dist/plugins/apps/index.d.ts.map +0 -1
- package/dist/plugins/apps/index.js +0 -112
- package/dist/plugins/apps/schemas.d.ts +0 -42
- package/dist/plugins/apps/schemas.d.ts.map +0 -1
- package/dist/plugins/apps/schemas.js +0 -14
- package/dist/plugins/eventEmission/builders.d.ts +0 -14
- package/dist/plugins/eventEmission/builders.d.ts.map +0 -1
- package/dist/plugins/eventEmission/builders.js +0 -109
- package/dist/plugins/eventEmission/index.d.ts +0 -38
- package/dist/plugins/eventEmission/index.d.ts.map +0 -1
- package/dist/plugins/eventEmission/index.js +0 -336
- package/dist/plugins/eventEmission/index.test.d.ts +0 -5
- package/dist/plugins/eventEmission/index.test.d.ts.map +0 -1
- package/dist/plugins/eventEmission/index.test.js +0 -581
- package/dist/plugins/eventEmission/transport.d.ts +0 -27
- package/dist/plugins/eventEmission/transport.d.ts.map +0 -1
- package/dist/plugins/eventEmission/transport.js +0 -104
- package/dist/plugins/eventEmission/transport.test.d.ts +0 -5
- package/dist/plugins/eventEmission/transport.test.d.ts.map +0 -1
- package/dist/plugins/eventEmission/transport.test.js +0 -164
- package/dist/plugins/eventEmission/types.d.ts +0 -63
- package/dist/plugins/eventEmission/types.d.ts.map +0 -1
- package/dist/plugins/eventEmission/types.js +0 -1
- package/dist/plugins/eventEmission/utils.d.ts +0 -45
- package/dist/plugins/eventEmission/utils.d.ts.map +0 -1
- package/dist/plugins/eventEmission/utils.js +0 -114
- package/dist/plugins/fetch/index.d.ts +0 -36
- package/dist/plugins/fetch/index.d.ts.map +0 -1
- package/dist/plugins/fetch/index.js +0 -62
- package/dist/plugins/fetch/schemas.d.ts +0 -19
- package/dist/plugins/fetch/schemas.d.ts.map +0 -1
- package/dist/plugins/fetch/schemas.js +0 -31
- package/dist/plugins/findFirstAuthentication/index.d.ts +0 -21
- package/dist/plugins/findFirstAuthentication/index.d.ts.map +0 -1
- package/dist/plugins/findFirstAuthentication/index.js +0 -36
- package/dist/plugins/findFirstAuthentication/index.test.d.ts +0 -2
- package/dist/plugins/findFirstAuthentication/index.test.d.ts.map +0 -1
- package/dist/plugins/findFirstAuthentication/index.test.js +0 -177
- package/dist/plugins/findFirstAuthentication/schemas.d.ts +0 -20
- package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +0 -1
- package/dist/plugins/findFirstAuthentication/schemas.js +0 -18
- package/dist/plugins/findUniqueAuthentication/index.d.ts +0 -21
- package/dist/plugins/findUniqueAuthentication/index.d.ts.map +0 -1
- package/dist/plugins/findUniqueAuthentication/index.js +0 -39
- package/dist/plugins/findUniqueAuthentication/index.test.d.ts +0 -2
- package/dist/plugins/findUniqueAuthentication/index.test.d.ts.map +0 -1
- package/dist/plugins/findUniqueAuthentication/index.test.js +0 -159
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts +0 -20
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +0 -1
- package/dist/plugins/findUniqueAuthentication/schemas.js +0 -18
- package/dist/plugins/getAction/index.d.ts +0 -25
- package/dist/plugins/getAction/index.d.ts.map +0 -1
- package/dist/plugins/getAction/index.js +0 -42
- package/dist/plugins/getAction/index.test.d.ts +0 -2
- package/dist/plugins/getAction/index.test.d.ts.map +0 -1
- package/dist/plugins/getAction/index.test.js +0 -211
- package/dist/plugins/getAction/schemas.d.ts +0 -30
- package/dist/plugins/getAction/schemas.d.ts.map +0 -1
- package/dist/plugins/getAction/schemas.js +0 -12
- package/dist/plugins/getApp/index.d.ts +0 -21
- package/dist/plugins/getApp/index.d.ts.map +0 -1
- package/dist/plugins/getApp/index.js +0 -44
- package/dist/plugins/getApp/index.test.d.ts +0 -2
- package/dist/plugins/getApp/index.test.d.ts.map +0 -1
- package/dist/plugins/getApp/index.test.js +0 -157
- package/dist/plugins/getApp/schemas.d.ts +0 -16
- package/dist/plugins/getApp/schemas.d.ts.map +0 -1
- package/dist/plugins/getApp/schemas.js +0 -8
- package/dist/plugins/getAuthentication/index.d.ts +0 -21
- package/dist/plugins/getAuthentication/index.d.ts.map +0 -1
- package/dist/plugins/getAuthentication/index.js +0 -29
- package/dist/plugins/getAuthentication/index.test.d.ts +0 -2
- package/dist/plugins/getAuthentication/index.test.d.ts.map +0 -1
- package/dist/plugins/getAuthentication/index.test.js +0 -106
- package/dist/plugins/getAuthentication/schemas.d.ts +0 -7
- package/dist/plugins/getAuthentication/schemas.d.ts.map +0 -1
- package/dist/plugins/getAuthentication/schemas.js +0 -1
- package/dist/plugins/getInputFieldsSchema/index.d.ts +0 -23
- package/dist/plugins/getInputFieldsSchema/index.d.ts.map +0 -1
- package/dist/plugins/getInputFieldsSchema/index.js +0 -53
- package/dist/plugins/getInputFieldsSchema/index.test.d.ts +0 -2
- package/dist/plugins/getInputFieldsSchema/index.test.d.ts.map +0 -1
- package/dist/plugins/getInputFieldsSchema/index.test.js +0 -291
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts +0 -28
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +0 -1
- package/dist/plugins/getInputFieldsSchema/schemas.js +0 -13
- package/dist/plugins/getProfile/index.d.ts +0 -25
- package/dist/plugins/getProfile/index.d.ts.map +0 -1
- package/dist/plugins/getProfile/index.js +0 -39
- package/dist/plugins/getProfile/schemas.d.ts +0 -13
- package/dist/plugins/getProfile/schemas.d.ts.map +0 -1
- package/dist/plugins/getProfile/schemas.js +0 -6
- package/dist/plugins/listActions/index.d.ts +0 -30
- package/dist/plugins/listActions/index.d.ts.map +0 -1
- package/dist/plugins/listActions/index.js +0 -75
- package/dist/plugins/listActions/index.test.d.ts +0 -2
- package/dist/plugins/listActions/index.test.d.ts.map +0 -1
- package/dist/plugins/listActions/index.test.js +0 -453
- package/dist/plugins/listActions/schemas.d.ts +0 -35
- package/dist/plugins/listActions/schemas.d.ts.map +0 -1
- package/dist/plugins/listActions/schemas.js +0 -22
- package/dist/plugins/listApps/index.d.ts +0 -19
- package/dist/plugins/listApps/index.d.ts.map +0 -1
- package/dist/plugins/listApps/index.js +0 -67
- package/dist/plugins/listApps/index.test.d.ts +0 -2
- package/dist/plugins/listApps/index.test.d.ts.map +0 -1
- package/dist/plugins/listApps/index.test.js +0 -121
- package/dist/plugins/listApps/schemas.d.ts +0 -47
- package/dist/plugins/listApps/schemas.d.ts.map +0 -1
- package/dist/plugins/listApps/schemas.js +0 -49
- package/dist/plugins/listAuthentications/index.d.ts +0 -24
- package/dist/plugins/listAuthentications/index.d.ts.map +0 -1
- package/dist/plugins/listAuthentications/index.js +0 -77
- package/dist/plugins/listAuthentications/index.test.d.ts +0 -2
- package/dist/plugins/listAuthentications/index.test.d.ts.map +0 -1
- package/dist/plugins/listAuthentications/index.test.js +0 -848
- package/dist/plugins/listAuthentications/schemas.d.ts +0 -30
- package/dist/plugins/listAuthentications/schemas.d.ts.map +0 -1
- package/dist/plugins/listAuthentications/schemas.js +0 -32
- package/dist/plugins/listInputFieldChoices/index.d.ts +0 -33
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/index.js +0 -115
- package/dist/plugins/listInputFieldChoices/index.test.d.ts +0 -2
- package/dist/plugins/listInputFieldChoices/index.test.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/index.test.js +0 -717
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +0 -43
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/schemas.js +0 -65
- package/dist/plugins/listInputFields/index.d.ts +0 -34
- package/dist/plugins/listInputFields/index.d.ts.map +0 -1
- package/dist/plugins/listInputFields/index.js +0 -204
- package/dist/plugins/listInputFields/index.test.d.ts +0 -2
- package/dist/plugins/listInputFields/index.test.d.ts.map +0 -1
- package/dist/plugins/listInputFields/index.test.js +0 -359
- package/dist/plugins/listInputFields/schemas.d.ts +0 -35
- package/dist/plugins/listInputFields/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFields/schemas.js +0 -23
- package/dist/plugins/manifest/index.d.ts +0 -85
- package/dist/plugins/manifest/index.d.ts.map +0 -1
- package/dist/plugins/manifest/index.js +0 -376
- package/dist/plugins/manifest/index.test.d.ts +0 -2
- package/dist/plugins/manifest/index.test.d.ts.map +0 -1
- package/dist/plugins/manifest/index.test.js +0 -1139
- package/dist/plugins/manifest/schemas.d.ts +0 -57
- package/dist/plugins/manifest/schemas.d.ts.map +0 -1
- package/dist/plugins/manifest/schemas.js +0 -50
- package/dist/plugins/registry/index.d.ts +0 -21
- package/dist/plugins/registry/index.d.ts.map +0 -1
- package/dist/plugins/registry/index.js +0 -117
- package/dist/plugins/request/index.d.ts +0 -21
- package/dist/plugins/request/index.d.ts.map +0 -1
- package/dist/plugins/request/index.js +0 -76
- package/dist/plugins/request/index.test.d.ts +0 -2
- package/dist/plugins/request/index.test.d.ts.map +0 -1
- package/dist/plugins/request/index.test.js +0 -337
- package/dist/plugins/request/schemas.d.ts +0 -54
- package/dist/plugins/request/schemas.d.ts.map +0 -1
- package/dist/plugins/request/schemas.js +0 -41
- package/dist/plugins/runAction/index.d.ts +0 -33
- package/dist/plugins/runAction/index.d.ts.map +0 -1
- package/dist/plugins/runAction/index.js +0 -108
- package/dist/plugins/runAction/index.test.d.ts +0 -2
- package/dist/plugins/runAction/index.test.d.ts.map +0 -1
- package/dist/plugins/runAction/index.test.js +0 -333
- package/dist/plugins/runAction/schemas.d.ts +0 -34
- package/dist/plugins/runAction/schemas.d.ts.map +0 -1
- package/dist/plugins/runAction/schemas.js +0 -23
- package/dist/resolvers/actionKey.d.ts +0 -15
- package/dist/resolvers/actionKey.d.ts.map +0 -1
- package/dist/resolvers/actionKey.js +0 -19
- package/dist/resolvers/actionType.d.ts +0 -10
- package/dist/resolvers/actionType.d.ts.map +0 -1
- package/dist/resolvers/actionType.js +0 -21
- package/dist/resolvers/appKey.d.ts +0 -3
- package/dist/resolvers/appKey.d.ts.map +0 -1
- package/dist/resolvers/appKey.js +0 -5
- package/dist/resolvers/authenticationId.d.ts +0 -9
- package/dist/resolvers/authenticationId.d.ts.map +0 -1
- package/dist/resolvers/authenticationId.js +0 -42
- package/dist/resolvers/index.d.ts +0 -8
- package/dist/resolvers/index.d.ts.map +0 -1
- package/dist/resolvers/index.js +0 -8
- package/dist/resolvers/inputFieldKey.d.ts +0 -11
- package/dist/resolvers/inputFieldKey.d.ts.map +0 -1
- package/dist/resolvers/inputFieldKey.js +0 -47
- package/dist/resolvers/inputs.d.ts +0 -17
- package/dist/resolvers/inputs.d.ts.map +0 -1
- package/dist/resolvers/inputs.js +0 -50
- package/dist/schemas/Action.d.ts +0 -24
- package/dist/schemas/Action.d.ts.map +0 -1
- package/dist/schemas/Action.js +0 -40
- package/dist/schemas/App.d.ts +0 -57
- package/dist/schemas/App.d.ts.map +0 -1
- package/dist/schemas/App.js +0 -26
- package/dist/schemas/Auth.d.ts +0 -55
- package/dist/schemas/Auth.d.ts.map +0 -1
- package/dist/schemas/Auth.js +0 -33
- package/dist/schemas/Field.d.ts +0 -61
- package/dist/schemas/Field.d.ts.map +0 -1
- package/dist/schemas/Field.js +0 -116
- package/dist/schemas/Run.d.ts +0 -3
- package/dist/schemas/Run.d.ts.map +0 -1
- package/dist/schemas/Run.js +0 -31
- package/dist/schemas/UserProfile.d.ts +0 -13
- package/dist/schemas/UserProfile.d.ts.map +0 -1
- package/dist/schemas/UserProfile.js +0 -32
- package/dist/sdk.d.ts +0 -146
- package/dist/sdk.d.ts.map +0 -1
- package/dist/sdk.js +0 -112
- package/dist/sdk.test.d.ts +0 -2
- package/dist/sdk.test.d.ts.map +0 -1
- package/dist/sdk.test.js +0 -258
- package/dist/services/implementations.d.ts +0 -63
- package/dist/services/implementations.d.ts.map +0 -1
- package/dist/services/implementations.js +0 -80
- package/dist/types/domain.d.ts +0 -52
- package/dist/types/domain.d.ts.map +0 -1
- package/dist/types/domain.js +0 -1
- package/dist/types/domain.test.d.ts +0 -2
- package/dist/types/domain.test.d.ts.map +0 -1
- package/dist/types/domain.test.js +0 -39
- package/dist/types/errors.d.ts +0 -143
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/errors.js +0 -187
- package/dist/types/events.d.ts +0 -38
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/events.js +0 -7
- package/dist/types/functions.d.ts +0 -27
- package/dist/types/functions.d.ts.map +0 -1
- package/dist/types/functions.js +0 -1
- package/dist/types/plugin.d.ts +0 -75
- package/dist/types/plugin.d.ts.map +0 -1
- package/dist/types/plugin.js +0 -9
- package/dist/types/properties.d.ts +0 -33
- package/dist/types/properties.d.ts.map +0 -1
- package/dist/types/properties.js +0 -52
- package/dist/types/sdk.d.ts +0 -69
- package/dist/types/sdk.d.ts.map +0 -1
- package/dist/types/sdk.js +0 -4
- package/dist/types/telemetry-events.d.ts +0 -105
- package/dist/types/telemetry-events.d.ts.map +0 -1
- package/dist/types/telemetry-events.js +0 -8
- package/dist/utils/array-utils.d.ts +0 -31
- package/dist/utils/array-utils.d.ts.map +0 -1
- package/dist/utils/array-utils.js +0 -36
- package/dist/utils/array-utils.test.d.ts +0 -2
- package/dist/utils/array-utils.test.d.ts.map +0 -1
- package/dist/utils/array-utils.test.js +0 -107
- package/dist/utils/batch-utils.d.ts +0 -72
- package/dist/utils/batch-utils.d.ts.map +0 -1
- package/dist/utils/batch-utils.js +0 -162
- package/dist/utils/batch-utils.test.d.ts +0 -2
- package/dist/utils/batch-utils.test.d.ts.map +0 -1
- package/dist/utils/batch-utils.test.js +0 -476
- package/dist/utils/domain-utils.d.ts +0 -66
- package/dist/utils/domain-utils.d.ts.map +0 -1
- package/dist/utils/domain-utils.js +0 -164
- package/dist/utils/domain-utils.test.d.ts +0 -2
- package/dist/utils/domain-utils.test.d.ts.map +0 -1
- package/dist/utils/domain-utils.test.js +0 -346
- package/dist/utils/file-utils.d.ts +0 -4
- package/dist/utils/file-utils.d.ts.map +0 -1
- package/dist/utils/file-utils.js +0 -74
- package/dist/utils/file-utils.test.d.ts +0 -2
- package/dist/utils/file-utils.test.d.ts.map +0 -1
- package/dist/utils/file-utils.test.js +0 -51
- package/dist/utils/function-utils.d.ts +0 -73
- package/dist/utils/function-utils.d.ts.map +0 -1
- package/dist/utils/function-utils.js +0 -245
- package/dist/utils/function-utils.test.d.ts +0 -2
- package/dist/utils/function-utils.test.d.ts.map +0 -1
- package/dist/utils/function-utils.test.js +0 -110
- package/dist/utils/id-utils.d.ts +0 -13
- package/dist/utils/id-utils.d.ts.map +0 -1
- package/dist/utils/id-utils.js +0 -22
- package/dist/utils/id-utils.test.d.ts +0 -2
- package/dist/utils/id-utils.test.d.ts.map +0 -1
- package/dist/utils/id-utils.test.js +0 -22
- package/dist/utils/pagination-utils.d.ts +0 -37
- package/dist/utils/pagination-utils.d.ts.map +0 -1
- package/dist/utils/pagination-utils.js +0 -165
- package/dist/utils/pagination-utils.test.d.ts +0 -17
- package/dist/utils/pagination-utils.test.d.ts.map +0 -1
- package/dist/utils/pagination-utils.test.js +0 -461
- package/dist/utils/retry-utils.d.ts +0 -45
- package/dist/utils/retry-utils.d.ts.map +0 -1
- package/dist/utils/retry-utils.js +0 -51
- package/dist/utils/retry-utils.test.d.ts +0 -2
- package/dist/utils/retry-utils.test.d.ts.map +0 -1
- package/dist/utils/retry-utils.test.js +0 -90
- package/dist/utils/schema-utils.d.ts +0 -69
- package/dist/utils/schema-utils.d.ts.map +0 -1
- package/dist/utils/schema-utils.js +0 -72
- package/dist/utils/string-utils.d.ts +0 -40
- package/dist/utils/string-utils.d.ts.map +0 -1
- package/dist/utils/string-utils.js +0 -69
- package/dist/utils/string-utils.test.d.ts +0 -2
- package/dist/utils/string-utils.test.d.ts.map +0 -1
- package/dist/utils/string-utils.test.js +0 -59
- package/dist/utils/telemetry-utils.d.ts +0 -44
- package/dist/utils/telemetry-utils.d.ts.map +0 -1
- package/dist/utils/telemetry-utils.js +0 -55
- package/dist/utils/telemetry-utils.test.d.ts +0 -2
- package/dist/utils/telemetry-utils.test.d.ts.map +0 -1
- package/dist/utils/telemetry-utils.test.js +0 -94
- package/dist/utils/url-utils.d.ts +0 -19
- package/dist/utils/url-utils.d.ts.map +0 -1
- package/dist/utils/url-utils.js +0 -62
- package/dist/utils/url-utils.test.d.ts +0 -2
- package/dist/utils/url-utils.test.d.ts.map +0 -1
- package/dist/utils/url-utils.test.js +0 -103
- package/dist/utils/validation.d.ts +0 -4
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -30
- package/dist/utils/validation.test.d.ts +0 -2
- package/dist/utils/validation.test.d.ts.map +0 -1
- package/dist/utils/validation.test.js +0 -44
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
2
|
-
import { ZapierValidationError, ZapierConfigurationError, ZapierApiError, } from "../../types/errors";
|
|
3
|
-
import { listInputFieldsPlugin } from "./index";
|
|
4
|
-
import { getActionPlugin } from "../getAction";
|
|
5
|
-
import { getAppPlugin } from "../getApp";
|
|
6
|
-
import { listActionsPlugin } from "../listActions";
|
|
7
|
-
import { listAppsPlugin } from "../listApps";
|
|
8
|
-
import { createSdk } from "../../sdk";
|
|
9
|
-
import { eventEmissionPlugin } from "../eventEmission";
|
|
10
|
-
const mockNeeds = [
|
|
11
|
-
{
|
|
12
|
-
key: "message",
|
|
13
|
-
label: "Message",
|
|
14
|
-
help_text: "The message to send",
|
|
15
|
-
required: true,
|
|
16
|
-
type: "string",
|
|
17
|
-
placeholder: "Enter your message",
|
|
18
|
-
default: "",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
key: "channel",
|
|
22
|
-
label: "Channel",
|
|
23
|
-
help_text: "The channel to send to",
|
|
24
|
-
required: true,
|
|
25
|
-
type: "string",
|
|
26
|
-
choices: [
|
|
27
|
-
{ value: "#general", label: "General", sample: "#general" },
|
|
28
|
-
{ value: "#random", label: "Random", sample: "#random" },
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
key: "tags",
|
|
33
|
-
label: "Tags",
|
|
34
|
-
help_text: "List of tags",
|
|
35
|
-
type: "string",
|
|
36
|
-
list: true,
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
const mockNeedsResponse = {
|
|
40
|
-
success: true,
|
|
41
|
-
needs: mockNeeds,
|
|
42
|
-
};
|
|
43
|
-
const mockActionsResponse = {
|
|
44
|
-
results: [
|
|
45
|
-
{
|
|
46
|
-
slug: "slack",
|
|
47
|
-
selected_api: "slack",
|
|
48
|
-
actions: [
|
|
49
|
-
{
|
|
50
|
-
key: "send_message",
|
|
51
|
-
name: "Send Message",
|
|
52
|
-
description: "Send a message to a channel",
|
|
53
|
-
type_of: "write",
|
|
54
|
-
type: "write",
|
|
55
|
-
id: "core:12345",
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
meta: {
|
|
61
|
-
next_cursor: null,
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
describe("listInputFields plugin", () => {
|
|
65
|
-
let mockApiClient;
|
|
66
|
-
let mockGetVersionedImplementationId;
|
|
67
|
-
beforeEach(() => {
|
|
68
|
-
vi.clearAllMocks();
|
|
69
|
-
mockApiClient = {
|
|
70
|
-
get: vi.fn().mockResolvedValue(mockActionsResponse),
|
|
71
|
-
post: vi.fn().mockResolvedValue(mockNeedsResponse),
|
|
72
|
-
};
|
|
73
|
-
mockGetVersionedImplementationId = vi
|
|
74
|
-
.fn()
|
|
75
|
-
.mockResolvedValue("SlackCLIAPI@1.21.1");
|
|
76
|
-
});
|
|
77
|
-
function createTestSdk() {
|
|
78
|
-
return createSdk({}, {}, {
|
|
79
|
-
api: mockApiClient,
|
|
80
|
-
meta: {},
|
|
81
|
-
options: {},
|
|
82
|
-
getVersionedImplementationId: mockGetVersionedImplementationId,
|
|
83
|
-
})
|
|
84
|
-
.addPlugin(eventEmissionPlugin)
|
|
85
|
-
.addPlugin(listAppsPlugin)
|
|
86
|
-
.addPlugin(listActionsPlugin)
|
|
87
|
-
.addPlugin(getAppPlugin)
|
|
88
|
-
.addPlugin(getActionPlugin)
|
|
89
|
-
.addPlugin(listInputFieldsPlugin);
|
|
90
|
-
}
|
|
91
|
-
describe("schema validation", () => {
|
|
92
|
-
it("should throw validation error for missing required fields", () => {
|
|
93
|
-
const sdk = createTestSdk();
|
|
94
|
-
expect(() => {
|
|
95
|
-
sdk.listInputFields({
|
|
96
|
-
// Missing required fields
|
|
97
|
-
});
|
|
98
|
-
}).toThrow(ZapierValidationError);
|
|
99
|
-
});
|
|
100
|
-
it("should throw validation error for invalid field types", () => {
|
|
101
|
-
const sdk = createTestSdk();
|
|
102
|
-
expect(() => {
|
|
103
|
-
sdk.listInputFields({
|
|
104
|
-
appKey: 123,
|
|
105
|
-
actionType: "write",
|
|
106
|
-
actionKey: "send_message",
|
|
107
|
-
});
|
|
108
|
-
}).toThrow(ZapierValidationError);
|
|
109
|
-
});
|
|
110
|
-
it("should pass validation with all required fields", async () => {
|
|
111
|
-
const sdk = createTestSdk();
|
|
112
|
-
const result = await sdk.listInputFields({
|
|
113
|
-
appKey: "slack",
|
|
114
|
-
actionType: "write",
|
|
115
|
-
actionKey: "send_message",
|
|
116
|
-
});
|
|
117
|
-
expect(result.data).toBeDefined();
|
|
118
|
-
});
|
|
119
|
-
it("should pass validation with optional fields", async () => {
|
|
120
|
-
const sdk = createTestSdk();
|
|
121
|
-
const result = await sdk.listInputFields({
|
|
122
|
-
appKey: "slack",
|
|
123
|
-
actionType: "write",
|
|
124
|
-
actionKey: "send_message",
|
|
125
|
-
authenticationId: 123,
|
|
126
|
-
inputs: { channel: "#general" },
|
|
127
|
-
});
|
|
128
|
-
expect(result.data).toBeDefined();
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
describe("API integration", () => {
|
|
132
|
-
it("should call the correct API endpoint", async () => {
|
|
133
|
-
const sdk = createTestSdk();
|
|
134
|
-
await sdk.listInputFields({
|
|
135
|
-
appKey: "slack",
|
|
136
|
-
actionType: "write",
|
|
137
|
-
actionKey: "send_message",
|
|
138
|
-
});
|
|
139
|
-
expect(mockApiClient.post).toHaveBeenCalledWith("/zapier/api/v4/implementations/needs/", {
|
|
140
|
-
selected_api: "SlackCLIAPI@1.21.1",
|
|
141
|
-
action: "send_message",
|
|
142
|
-
type_of: "write",
|
|
143
|
-
params: {},
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
it("should include authentication_id when provided", async () => {
|
|
147
|
-
const sdk = createTestSdk();
|
|
148
|
-
await sdk.listInputFields({
|
|
149
|
-
appKey: "slack",
|
|
150
|
-
actionType: "write",
|
|
151
|
-
actionKey: "send_message",
|
|
152
|
-
authenticationId: 123,
|
|
153
|
-
});
|
|
154
|
-
expect(mockApiClient.post).toHaveBeenCalledWith("/zapier/api/v4/implementations/needs/", {
|
|
155
|
-
selected_api: "SlackCLIAPI@1.21.1",
|
|
156
|
-
action: "send_message",
|
|
157
|
-
type_of: "write",
|
|
158
|
-
params: {},
|
|
159
|
-
authentication_id: 123,
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
it("should exclude authentication_id when null", async () => {
|
|
163
|
-
const sdk = createTestSdk();
|
|
164
|
-
await sdk.listInputFields({
|
|
165
|
-
appKey: "slack",
|
|
166
|
-
actionType: "write",
|
|
167
|
-
actionKey: "send_message",
|
|
168
|
-
authenticationId: null,
|
|
169
|
-
});
|
|
170
|
-
expect(mockApiClient.post).toHaveBeenCalledWith("/zapier/api/v4/implementations/needs/", {
|
|
171
|
-
selected_api: "SlackCLIAPI@1.21.1",
|
|
172
|
-
action: "send_message",
|
|
173
|
-
type_of: "write",
|
|
174
|
-
params: {},
|
|
175
|
-
// No authentication_id
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
it("should include inputs when provided", async () => {
|
|
179
|
-
const sdk = createTestSdk();
|
|
180
|
-
const inputs = { channel: "#general", message: "test" };
|
|
181
|
-
await sdk.listInputFields({
|
|
182
|
-
appKey: "slack",
|
|
183
|
-
actionType: "write",
|
|
184
|
-
actionKey: "send_message",
|
|
185
|
-
inputs,
|
|
186
|
-
});
|
|
187
|
-
expect(mockApiClient.post).toHaveBeenCalledWith("/zapier/api/v4/implementations/needs/", {
|
|
188
|
-
selected_api: "SlackCLIAPI@1.21.1",
|
|
189
|
-
action: "send_message",
|
|
190
|
-
type_of: "write",
|
|
191
|
-
params: inputs,
|
|
192
|
-
});
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
describe("data transformation", () => {
|
|
196
|
-
it("should transform needs to input field items correctly", async () => {
|
|
197
|
-
const sdk = createTestSdk();
|
|
198
|
-
const result = await sdk.listInputFields({
|
|
199
|
-
appKey: "slack",
|
|
200
|
-
actionType: "write",
|
|
201
|
-
actionKey: "send_message",
|
|
202
|
-
});
|
|
203
|
-
expect(result.data).toHaveLength(3);
|
|
204
|
-
// Check message field transformation
|
|
205
|
-
expect(result.data[0]).toEqual(expect.objectContaining({
|
|
206
|
-
key: "message",
|
|
207
|
-
title: "Message",
|
|
208
|
-
description: "The message to send",
|
|
209
|
-
is_required: true,
|
|
210
|
-
value_type: "STRING",
|
|
211
|
-
placeholder: "Enter your message",
|
|
212
|
-
default_value: "",
|
|
213
|
-
}));
|
|
214
|
-
// Check channel field with SELECT format (choices should NOT be exposed)
|
|
215
|
-
expect(result.data[1]).toEqual(expect.objectContaining({
|
|
216
|
-
key: "channel",
|
|
217
|
-
title: "Channel",
|
|
218
|
-
description: "The channel to send to",
|
|
219
|
-
is_required: true,
|
|
220
|
-
value_type: "STRING",
|
|
221
|
-
format: "SELECT",
|
|
222
|
-
}));
|
|
223
|
-
// Verify choices are NOT exposed in listInputFields output
|
|
224
|
-
expect(result.data[1]).not.toHaveProperty("choices");
|
|
225
|
-
// Check array field
|
|
226
|
-
expect(result.data[2]).toEqual(expect.objectContaining({
|
|
227
|
-
key: "tags",
|
|
228
|
-
title: "Tags",
|
|
229
|
-
description: "List of tags",
|
|
230
|
-
value_type: "ARRAY",
|
|
231
|
-
items: { type: "STRING" },
|
|
232
|
-
}));
|
|
233
|
-
});
|
|
234
|
-
it("should handle different field types correctly", async () => {
|
|
235
|
-
const complexNeeds = [
|
|
236
|
-
{
|
|
237
|
-
key: "count",
|
|
238
|
-
type: "integer",
|
|
239
|
-
label: "Count",
|
|
240
|
-
required: false,
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
key: "price",
|
|
244
|
-
type: "decimal",
|
|
245
|
-
label: "Price",
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
key: "enabled",
|
|
249
|
-
type: "boolean",
|
|
250
|
-
label: "Enabled",
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
key: "config",
|
|
254
|
-
type: "dict",
|
|
255
|
-
label: "Configuration",
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
key: "description",
|
|
259
|
-
type: "text",
|
|
260
|
-
label: "Description",
|
|
261
|
-
},
|
|
262
|
-
];
|
|
263
|
-
mockApiClient.post = vi.fn().mockResolvedValue({
|
|
264
|
-
success: true,
|
|
265
|
-
needs: complexNeeds,
|
|
266
|
-
});
|
|
267
|
-
const sdk = createTestSdk();
|
|
268
|
-
const result = await sdk.listInputFields({
|
|
269
|
-
appKey: "slack",
|
|
270
|
-
actionType: "write",
|
|
271
|
-
actionKey: "send_message",
|
|
272
|
-
});
|
|
273
|
-
expect(result.data[0].value_type).toBe("INTEGER");
|
|
274
|
-
expect(result.data[1].value_type).toBe("NUMBER");
|
|
275
|
-
expect(result.data[2].value_type).toBe("BOOLEAN");
|
|
276
|
-
expect(result.data[3].value_type).toBe("OBJECT");
|
|
277
|
-
expect(result.data[4].value_type).toBe("STRING");
|
|
278
|
-
expect(result.data[4].format).toBe("MULTILINE");
|
|
279
|
-
});
|
|
280
|
-
});
|
|
281
|
-
describe("error handling", () => {
|
|
282
|
-
it("should throw ZapierConfigurationError when app has no current_implementation_id", async () => {
|
|
283
|
-
mockGetVersionedImplementationId.mockResolvedValue(null);
|
|
284
|
-
const sdk = createTestSdk();
|
|
285
|
-
await expect(sdk.listInputFields({
|
|
286
|
-
appKey: "invalid",
|
|
287
|
-
actionType: "write",
|
|
288
|
-
actionKey: "send_message",
|
|
289
|
-
})).rejects.toThrow(ZapierConfigurationError);
|
|
290
|
-
});
|
|
291
|
-
it("should throw ZapierApiError when API response indicates failure", async () => {
|
|
292
|
-
mockApiClient.post = vi.fn().mockResolvedValue({
|
|
293
|
-
success: false,
|
|
294
|
-
errors: ["Authentication failed", "Invalid credentials"],
|
|
295
|
-
});
|
|
296
|
-
const sdk = createTestSdk();
|
|
297
|
-
await expect(sdk.listInputFields({
|
|
298
|
-
appKey: "slack",
|
|
299
|
-
actionType: "write",
|
|
300
|
-
actionKey: "send_message", // Use valid action so we get to the POST call
|
|
301
|
-
})).rejects.toThrow(ZapierApiError);
|
|
302
|
-
await expect(sdk.listInputFields({
|
|
303
|
-
appKey: "slack",
|
|
304
|
-
actionType: "write",
|
|
305
|
-
actionKey: "send_message", // Use valid action so we get to the POST call
|
|
306
|
-
})).rejects.toThrow("Failed to get input fields: Authentication failed, Invalid credentials");
|
|
307
|
-
});
|
|
308
|
-
it("should handle API errors gracefully", async () => {
|
|
309
|
-
mockApiClient.post = vi
|
|
310
|
-
.fn()
|
|
311
|
-
.mockRejectedValue(new Error("Network error"));
|
|
312
|
-
const sdk = createTestSdk();
|
|
313
|
-
await expect(sdk.listInputFields({
|
|
314
|
-
appKey: "slack",
|
|
315
|
-
actionType: "write",
|
|
316
|
-
actionKey: "send_message",
|
|
317
|
-
})).rejects.toThrow("Network error");
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
describe("context and metadata", () => {
|
|
321
|
-
it("should provide context with meta information", () => {
|
|
322
|
-
const sdk = createTestSdk();
|
|
323
|
-
const context = sdk.getContext();
|
|
324
|
-
expect(context.meta.listInputFields).toBeDefined();
|
|
325
|
-
expect(context.meta.listInputFields.inputSchema).toBeDefined();
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
describe("pagination", () => {
|
|
329
|
-
it("should support async iteration over pages", async () => {
|
|
330
|
-
const sdk = createTestSdk();
|
|
331
|
-
const listInputFieldsResult = sdk.listInputFields({
|
|
332
|
-
appKey: "slack",
|
|
333
|
-
actionType: "write",
|
|
334
|
-
actionKey: "send_message",
|
|
335
|
-
});
|
|
336
|
-
const pages = [];
|
|
337
|
-
for await (const page of listInputFieldsResult) {
|
|
338
|
-
pages.push(page);
|
|
339
|
-
break; // Just get first page for testing
|
|
340
|
-
}
|
|
341
|
-
expect(pages).toHaveLength(1);
|
|
342
|
-
expect(pages[0].data).toHaveLength(3);
|
|
343
|
-
});
|
|
344
|
-
it("should support async iteration over individual items", async () => {
|
|
345
|
-
const sdk = createTestSdk();
|
|
346
|
-
const listInputFieldsResult = sdk.listInputFields({
|
|
347
|
-
appKey: "slack",
|
|
348
|
-
actionType: "write",
|
|
349
|
-
actionKey: "send_message",
|
|
350
|
-
});
|
|
351
|
-
const items = [];
|
|
352
|
-
for await (const item of listInputFieldsResult.items()) {
|
|
353
|
-
items.push(item);
|
|
354
|
-
}
|
|
355
|
-
expect(items).toHaveLength(3);
|
|
356
|
-
expect(items[0].key).toBe("message");
|
|
357
|
-
});
|
|
358
|
-
});
|
|
359
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { RootFieldItem } from "../../types/domain";
|
|
3
|
-
import type { PaginatedSdkFunction } from "../../types/functions";
|
|
4
|
-
import type { ZapierConfigurationError, ZapierApiError, ZapierAuthenticationError, ZapierAppNotFoundError, ZapierValidationError, ZapierUnknownError } from "../../types/errors";
|
|
5
|
-
export declare const ListInputFieldsSchema: z.ZodObject<{
|
|
6
|
-
appKey: z.ZodString & {
|
|
7
|
-
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
8
|
-
};
|
|
9
|
-
actionType: z.ZodEnum<{
|
|
10
|
-
search: "search";
|
|
11
|
-
filter: "filter";
|
|
12
|
-
read: "read";
|
|
13
|
-
read_bulk: "read_bulk";
|
|
14
|
-
run: "run";
|
|
15
|
-
search_and_write: "search_and_write";
|
|
16
|
-
search_or_write: "search_or_write";
|
|
17
|
-
write: "write";
|
|
18
|
-
}>;
|
|
19
|
-
actionKey: z.ZodString;
|
|
20
|
-
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
21
|
-
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
22
|
-
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
24
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
export type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema>;
|
|
27
|
-
export type ListInputFieldsError = ZapierConfigurationError | ZapierApiError | ZapierAuthenticationError | ZapierAppNotFoundError | ZapierValidationError | ZapierUnknownError;
|
|
28
|
-
export interface ListInputFieldsPage {
|
|
29
|
-
data: RootFieldItem[];
|
|
30
|
-
nextCursor?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ListInputFieldsSdkFunction {
|
|
33
|
-
listInputFields: PaginatedSdkFunction<ListInputFieldsOptions, RootFieldItem[]>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;iBAqBgC,CAAC;AAGnE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAG3E,MAAM,MAAM,oBAAoB,GAC5B,wBAAwB,GACxB,cAAc,GACd,yBAAyB,GACzB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,oBAAoB,CACnC,sBAAsB,EACtB,aAAa,EAAE,CAChB,CAAC;CACH"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { AppKeyPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, AuthenticationIdPropertySchema, InputsPropertySchema, } from "../../types/properties";
|
|
3
|
-
// Pure Zod schema - no resolver metadata!
|
|
4
|
-
export const ListInputFieldsSchema = z
|
|
5
|
-
.object({
|
|
6
|
-
appKey: AppKeyPropertySchema,
|
|
7
|
-
actionType: ActionTypePropertySchema,
|
|
8
|
-
actionKey: ActionKeyPropertySchema,
|
|
9
|
-
authenticationId: AuthenticationIdPropertySchema.nullable().optional(),
|
|
10
|
-
inputs: InputsPropertySchema.optional().describe("Current input values that may affect available fields"),
|
|
11
|
-
pageSize: z
|
|
12
|
-
.number()
|
|
13
|
-
.min(1)
|
|
14
|
-
.optional()
|
|
15
|
-
.describe("Number of input fields per page"),
|
|
16
|
-
maxItems: z
|
|
17
|
-
.number()
|
|
18
|
-
.min(1)
|
|
19
|
-
.optional()
|
|
20
|
-
.describe("Maximum total items to return across all pages"),
|
|
21
|
-
cursor: z.string().optional().describe("Cursor to start from"),
|
|
22
|
-
})
|
|
23
|
-
.describe("Get the input fields required for a specific action");
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { GetVersionedImplementationId, Manifest, ManifestEntry, ManifestPluginOptionsSchema, ResolveAppKeys, ActionEntry } from "./schemas";
|
|
2
|
-
import type { Plugin } from "../../types/plugin";
|
|
3
|
-
import type { z } from "zod";
|
|
4
|
-
import type { ApiClient } from "../../api";
|
|
5
|
-
export type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;
|
|
6
|
-
export interface UpdateManifestEntryOptions {
|
|
7
|
-
appKey: string;
|
|
8
|
-
entry: ManifestEntry;
|
|
9
|
-
configPath?: string;
|
|
10
|
-
skipWrite?: boolean;
|
|
11
|
-
manifest?: Manifest;
|
|
12
|
-
}
|
|
13
|
-
export interface UpdateManifestEntryResult {
|
|
14
|
-
key: string;
|
|
15
|
-
entry: ManifestEntry;
|
|
16
|
-
manifest: Manifest;
|
|
17
|
-
}
|
|
18
|
-
export interface AddActionEntryOptions {
|
|
19
|
-
name: string;
|
|
20
|
-
entry: ActionEntry;
|
|
21
|
-
configPath?: string;
|
|
22
|
-
skipWrite?: boolean;
|
|
23
|
-
manifest?: Manifest;
|
|
24
|
-
}
|
|
25
|
-
export interface AddActionEntryResult {
|
|
26
|
-
name: string;
|
|
27
|
-
entry: ActionEntry;
|
|
28
|
-
manifest: Manifest;
|
|
29
|
-
}
|
|
30
|
-
export interface ManifestPluginProvides {
|
|
31
|
-
context: {
|
|
32
|
-
getVersionedImplementationId: GetVersionedImplementationId;
|
|
33
|
-
resolveAppKeys: ResolveAppKeys;
|
|
34
|
-
updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
|
|
35
|
-
addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
|
|
36
|
-
findActionEntry: (options: {
|
|
37
|
-
name: string;
|
|
38
|
-
manifest: Manifest;
|
|
39
|
-
}) => ActionEntry | null;
|
|
40
|
-
listActionEntries: (options?: {
|
|
41
|
-
configPath?: string;
|
|
42
|
-
}) => Promise<Array<[string, ActionEntry]>>;
|
|
43
|
-
deleteActionEntry: (options: {
|
|
44
|
-
name: string;
|
|
45
|
-
configPath?: string;
|
|
46
|
-
skipWrite?: boolean;
|
|
47
|
-
}) => Promise<Manifest>;
|
|
48
|
-
hasActionEntry: (options: {
|
|
49
|
-
name: string;
|
|
50
|
-
manifest: Manifest;
|
|
51
|
-
}) => boolean;
|
|
52
|
-
findManifestEntry: (options: {
|
|
53
|
-
appKey: string;
|
|
54
|
-
manifest: Manifest;
|
|
55
|
-
}) => [string, ManifestEntry] | null;
|
|
56
|
-
readManifestFromFile: (filePath: string) => Promise<Manifest | null>;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Read manifest from a file path asynchronously
|
|
61
|
-
* Supports local files (Node.js) and browser environments (fallback to global filesystem)
|
|
62
|
-
*/
|
|
63
|
-
export declare function readManifestFromFile(filePath: string): Promise<Manifest | null>;
|
|
64
|
-
/**
|
|
65
|
-
* Get the preferred key for storing an app in the manifest
|
|
66
|
-
* Extracted from plugin to make it easier to test
|
|
67
|
-
*/
|
|
68
|
-
export declare function getPreferredManifestEntryKey({ appKey, api, }: {
|
|
69
|
-
appKey: string;
|
|
70
|
-
api: ApiClient;
|
|
71
|
-
}): Promise<string>;
|
|
72
|
-
/**
|
|
73
|
-
* Find a manifest entry by any app key (implementation name, slug, etc.).
|
|
74
|
-
*/
|
|
75
|
-
export declare function findManifestEntry({ appKey, manifest, }: {
|
|
76
|
-
appKey: string;
|
|
77
|
-
manifest: Manifest;
|
|
78
|
-
}): [string, ManifestEntry] | null;
|
|
79
|
-
export { DEFAULT_CONFIG_PATH } from "./schemas";
|
|
80
|
-
export type { ManifestEntry, Manifest, ActionEntry } from "./schemas";
|
|
81
|
-
export declare const manifestPlugin: Plugin<{}, // no SDK dependencies
|
|
82
|
-
{
|
|
83
|
-
api: ApiClient;
|
|
84
|
-
}, ManifestPluginProvides>;
|
|
85
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/manifest/index.ts"],"names":[],"mappings":"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"}
|