@zapier/zapier-sdk 0.4.1 → 0.5.1
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 +13 -0
- package/README.md +343 -0
- package/dist/api/auth.d.ts +9 -0
- package/dist/api/auth.d.ts.map +1 -0
- package/dist/api/auth.js +25 -0
- package/dist/api/client.d.ts +9 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +322 -0
- package/dist/api/debug.d.ts +13 -0
- package/dist/api/debug.d.ts.map +1 -0
- package/dist/api/debug.js +55 -0
- package/dist/api/index.d.ts +29 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +41 -0
- package/dist/api/polling.d.ts +16 -0
- package/dist/api/polling.d.ts.map +1 -0
- package/dist/api/polling.js +45 -0
- package/dist/api/schemas.d.ts +2473 -0
- package/dist/api/schemas.d.ts.map +1 -0
- package/dist/api/schemas.js +355 -0
- package/dist/api/types.d.ts +75 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +11 -0
- package/dist/auth.d.ts +34 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +47 -0
- package/dist/constants.d.ts +10 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +9 -0
- package/dist/index.cjs +2108 -1379
- package/dist/index.d.mts +2440 -620
- package/dist/index.d.ts +17 -892
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.mjs +2093 -1362
- package/dist/plugins/api/index.d.ts +14 -0
- package/dist/plugins/api/index.d.ts.map +1 -0
- package/dist/plugins/api/index.js +21 -0
- package/dist/plugins/apps/index.d.ts +11 -0
- package/dist/plugins/apps/index.d.ts.map +1 -0
- package/dist/plugins/apps/index.js +91 -0
- package/dist/plugins/apps/types.d.ts +30 -0
- package/dist/plugins/apps/types.d.ts.map +1 -0
- package/dist/plugins/apps/types.js +2 -0
- package/dist/plugins/fetch/index.d.ts +21 -0
- package/dist/plugins/fetch/index.d.ts.map +1 -0
- package/dist/plugins/fetch/index.js +20 -0
- package/dist/plugins/findFirstAuthentication/index.d.ts +20 -0
- package/dist/plugins/findFirstAuthentication/index.d.ts.map +1 -0
- package/dist/plugins/findFirstAuthentication/index.js +24 -0
- package/dist/plugins/findFirstAuthentication/index.test.d.ts +2 -0
- package/dist/plugins/findFirstAuthentication/index.test.d.ts.map +1 -0
- package/dist/plugins/findFirstAuthentication/index.test.js +171 -0
- package/dist/plugins/findFirstAuthentication/schemas.d.ts +29 -0
- package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +1 -0
- package/dist/plugins/findFirstAuthentication/schemas.js +18 -0
- package/dist/plugins/findUniqueAuthentication/index.d.ts +20 -0
- package/dist/plugins/findUniqueAuthentication/index.d.ts.map +1 -0
- package/dist/plugins/findUniqueAuthentication/index.js +31 -0
- package/dist/plugins/findUniqueAuthentication/index.test.d.ts +2 -0
- package/dist/plugins/findUniqueAuthentication/index.test.d.ts.map +1 -0
- package/dist/plugins/findUniqueAuthentication/index.test.js +152 -0
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts +29 -0
- package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +1 -0
- package/dist/plugins/findUniqueAuthentication/schemas.js +18 -0
- package/dist/plugins/getAction/index.d.ts +23 -0
- package/dist/plugins/getAction/index.d.ts.map +1 -0
- package/dist/plugins/getAction/index.js +28 -0
- package/dist/plugins/getAction/index.test.d.ts +2 -0
- package/dist/plugins/getAction/index.test.d.ts.map +1 -0
- package/dist/plugins/getAction/index.test.js +186 -0
- package/dist/plugins/getAction/schemas.d.ts +23 -0
- package/dist/plugins/getAction/schemas.d.ts.map +1 -0
- package/dist/plugins/getAction/schemas.js +10 -0
- package/dist/plugins/getApp/index.d.ts +22 -0
- package/dist/plugins/getApp/index.d.ts.map +1 -0
- package/dist/plugins/getApp/index.js +39 -0
- package/dist/plugins/getApp/index.test.d.ts +2 -0
- package/dist/plugins/getApp/index.test.d.ts.map +1 -0
- package/dist/plugins/getApp/index.test.js +100 -0
- package/dist/plugins/getApp/schemas.d.ts +18 -0
- package/dist/plugins/getApp/schemas.d.ts.map +1 -0
- package/dist/plugins/getApp/schemas.js +10 -0
- package/dist/plugins/getAuthentication/index.d.ts +22 -0
- package/dist/plugins/getAuthentication/index.d.ts.map +1 -0
- package/dist/plugins/getAuthentication/index.js +41 -0
- package/dist/plugins/getAuthentication/index.test.d.ts +2 -0
- package/dist/plugins/getAuthentication/index.test.d.ts.map +1 -0
- package/dist/plugins/getAuthentication/index.test.js +205 -0
- package/dist/plugins/getAuthentication/schemas.d.ts +17 -0
- package/dist/plugins/getAuthentication/schemas.d.ts.map +1 -0
- package/dist/plugins/getAuthentication/schemas.js +11 -0
- package/dist/plugins/getProfile/index.d.ts +23 -0
- package/dist/plugins/getProfile/index.d.ts.map +1 -0
- package/dist/plugins/getProfile/index.js +29 -0
- package/dist/plugins/getProfile/schemas.d.ts +13 -0
- package/dist/plugins/getProfile/schemas.d.ts.map +1 -0
- package/dist/plugins/getProfile/schemas.js +5 -0
- package/dist/plugins/listActions/index.d.ts +28 -0
- package/dist/plugins/listActions/index.d.ts.map +1 -0
- package/dist/plugins/listActions/index.js +61 -0
- package/dist/plugins/listActions/index.test.d.ts +2 -0
- package/dist/plugins/listActions/index.test.d.ts.map +1 -0
- package/dist/plugins/listActions/index.test.js +467 -0
- package/dist/plugins/listActions/schemas.d.ts +29 -0
- package/dist/plugins/listActions/schemas.d.ts.map +1 -0
- package/dist/plugins/listActions/schemas.js +21 -0
- package/dist/plugins/listApps/index.d.ts +28 -0
- package/dist/plugins/listApps/index.d.ts.map +1 -0
- package/dist/plugins/listApps/index.js +62 -0
- package/dist/plugins/listApps/index.test.d.ts +2 -0
- package/dist/plugins/listApps/index.test.d.ts.map +1 -0
- package/dist/plugins/listApps/index.test.js +313 -0
- package/dist/plugins/listApps/schemas.d.ts +30 -0
- package/dist/plugins/listApps/schemas.d.ts.map +1 -0
- package/dist/plugins/listApps/schemas.js +23 -0
- package/dist/plugins/listAuthentications/index.d.ts +28 -0
- package/dist/plugins/listAuthentications/index.d.ts.map +1 -0
- package/dist/plugins/listAuthentications/index.js +77 -0
- package/dist/plugins/listAuthentications/index.test.d.ts +2 -0
- package/dist/plugins/listAuthentications/index.test.d.ts.map +1 -0
- package/dist/plugins/listAuthentications/index.test.js +564 -0
- package/dist/plugins/listAuthentications/schemas.d.ts +38 -0
- package/dist/plugins/listAuthentications/schemas.d.ts.map +1 -0
- package/dist/plugins/listAuthentications/schemas.js +28 -0
- package/dist/plugins/listInputFields/index.d.ts +28 -0
- package/dist/plugins/listInputFields/index.d.ts.map +1 -0
- package/dist/plugins/listInputFields/index.js +133 -0
- package/dist/plugins/listInputFields/index.test.d.ts +2 -0
- package/dist/plugins/listInputFields/index.test.d.ts.map +1 -0
- package/dist/plugins/listInputFields/index.test.js +325 -0
- package/dist/plugins/listInputFields/schemas.d.ts +38 -0
- package/dist/plugins/listInputFields/schemas.d.ts.map +1 -0
- package/dist/plugins/listInputFields/schemas.js +22 -0
- package/dist/plugins/registry/index.d.ts +11 -0
- package/dist/plugins/registry/index.d.ts.map +1 -0
- package/dist/plugins/registry/index.js +14 -0
- package/dist/plugins/request/index.d.ts +19 -0
- package/dist/plugins/request/index.d.ts.map +1 -0
- package/dist/plugins/request/index.js +62 -0
- package/dist/plugins/request/index.test.d.ts +2 -0
- package/dist/plugins/request/index.test.d.ts.map +1 -0
- package/dist/plugins/request/index.test.js +256 -0
- package/dist/plugins/request/schemas.d.ts +69 -0
- package/dist/plugins/request/schemas.d.ts.map +1 -0
- package/dist/plugins/request/schemas.js +42 -0
- package/dist/plugins/runAction/index.d.ts +28 -0
- package/dist/plugins/runAction/index.d.ts.map +1 -0
- package/dist/plugins/runAction/index.js +86 -0
- package/dist/plugins/runAction/index.test.d.ts +2 -0
- package/dist/plugins/runAction/index.test.d.ts.map +1 -0
- package/dist/plugins/runAction/index.test.js +320 -0
- package/dist/plugins/runAction/schemas.d.ts +37 -0
- package/dist/plugins/runAction/schemas.d.ts.map +1 -0
- package/dist/plugins/runAction/schemas.js +22 -0
- package/dist/resolvers/actionKey.d.ts +9 -0
- package/dist/resolvers/actionKey.d.ts.map +1 -0
- package/dist/resolvers/actionKey.js +19 -0
- package/dist/resolvers/actionType.d.ts +9 -0
- package/dist/resolvers/actionType.d.ts.map +1 -0
- package/dist/resolvers/actionType.js +22 -0
- package/dist/resolvers/appKey.d.ts +7 -0
- package/dist/resolvers/appKey.d.ts.map +1 -0
- package/dist/resolvers/appKey.js +5 -0
- package/dist/resolvers/authenticationId.d.ts +9 -0
- package/dist/resolvers/authenticationId.d.ts.map +1 -0
- package/dist/resolvers/authenticationId.js +33 -0
- package/dist/resolvers/index.d.ts +40 -0
- package/dist/resolvers/index.d.ts.map +1 -0
- package/dist/resolvers/index.js +91 -0
- package/dist/resolvers/inputs.d.ts +8 -0
- package/dist/resolvers/inputs.d.ts.map +1 -0
- package/dist/resolvers/inputs.js +14 -0
- package/dist/schemas/Action.d.ts +243 -0
- package/dist/schemas/Action.d.ts.map +1 -0
- package/dist/schemas/Action.js +34 -0
- package/dist/schemas/App.d.ts +26 -0
- package/dist/schemas/App.d.ts.map +1 -0
- package/dist/schemas/App.js +22 -0
- package/dist/schemas/Auth.d.ts +161 -0
- package/dist/schemas/Auth.d.ts.map +1 -0
- package/dist/schemas/Auth.js +41 -0
- package/dist/schemas/Field.d.ts +144 -0
- package/dist/schemas/Field.d.ts.map +1 -0
- package/dist/schemas/Field.js +105 -0
- package/dist/schemas/UserProfile.d.ts +163 -0
- package/dist/schemas/UserProfile.d.ts.map +1 -0
- package/dist/schemas/UserProfile.js +29 -0
- package/dist/sdk.d.ts +10 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.js +94 -0
- package/dist/sdk.test.d.ts +2 -0
- package/dist/sdk.test.d.ts.map +1 -0
- package/dist/sdk.test.js +135 -0
- package/dist/types/domain.d.ts +36 -0
- package/dist/types/domain.d.ts.map +1 -0
- package/dist/types/domain.js +1 -0
- package/dist/types/domain.test.d.ts +2 -0
- package/dist/types/domain.test.d.ts.map +1 -0
- package/dist/types/domain.test.js +39 -0
- package/dist/types/errors.d.ts +143 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +187 -0
- package/dist/types/events.d.ts +38 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +7 -0
- package/dist/types/functions.d.ts +26 -0
- package/dist/types/functions.d.ts.map +1 -0
- package/dist/types/functions.js +4 -0
- package/dist/types/plugin.d.ts +61 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +9 -0
- package/dist/types/properties.d.ts +22 -0
- package/dist/types/properties.d.ts.map +1 -0
- package/dist/types/properties.js +50 -0
- package/dist/types/sdk.d.ts +43 -0
- package/dist/types/sdk.d.ts.map +1 -0
- package/dist/types/sdk.js +4 -0
- package/dist/utils/array-utils.d.ts +31 -0
- package/dist/utils/array-utils.d.ts.map +1 -0
- package/dist/utils/array-utils.js +36 -0
- package/dist/utils/array-utils.test.d.ts +2 -0
- package/dist/utils/array-utils.test.d.ts.map +1 -0
- package/dist/utils/array-utils.test.js +107 -0
- package/dist/utils/domain-utils.d.ts +78 -0
- package/dist/utils/domain-utils.d.ts.map +1 -0
- package/dist/utils/domain-utils.js +218 -0
- package/dist/utils/domain-utils.test.d.ts +2 -0
- package/dist/utils/domain-utils.test.d.ts.map +1 -0
- package/dist/utils/domain-utils.test.js +192 -0
- package/dist/utils/function-utils.d.ts +45 -0
- package/dist/utils/function-utils.d.ts.map +1 -0
- package/dist/utils/function-utils.js +158 -0
- package/dist/utils/function-utils.test.d.ts +2 -0
- package/dist/utils/function-utils.test.d.ts.map +1 -0
- package/dist/utils/function-utils.test.js +110 -0
- package/dist/utils/pagination-utils.d.ts +37 -0
- package/dist/utils/pagination-utils.d.ts.map +1 -0
- package/dist/utils/pagination-utils.js +165 -0
- package/dist/utils/pagination-utils.test.d.ts +17 -0
- package/dist/utils/pagination-utils.test.d.ts.map +1 -0
- package/dist/utils/pagination-utils.test.js +461 -0
- package/dist/utils/schema-utils.d.ts +45 -0
- package/dist/utils/schema-utils.d.ts.map +1 -0
- package/dist/utils/schema-utils.js +65 -0
- package/dist/utils/validation.d.ts +4 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +30 -0
- package/dist/utils/validation.test.d.ts +2 -0
- package/dist/utils/validation.test.d.ts.map +1 -0
- package/dist/utils/validation.test.js +43 -0
- package/package.json +12 -3
- package/src/api/client.ts +394 -171
- package/src/api/debug.ts +10 -1
- package/src/api/index.ts +0 -2
- package/src/api/polling.ts +28 -7
- package/src/api/schemas.ts +387 -0
- package/src/api/types.ts +72 -136
- package/src/constants.ts +10 -0
- package/src/index.ts +40 -19
- package/src/plugins/api/index.ts +47 -0
- package/src/plugins/apps/index.ts +25 -19
- package/src/plugins/apps/types.ts +7 -11
- package/src/plugins/fetch/index.ts +48 -40
- package/src/plugins/findFirstAuthentication/index.test.ts +206 -0
- package/src/plugins/findFirstAuthentication/index.ts +55 -0
- package/src/plugins/findFirstAuthentication/schemas.ts +41 -0
- package/src/plugins/findUniqueAuthentication/index.test.ts +197 -0
- package/src/plugins/findUniqueAuthentication/index.ts +72 -0
- package/src/plugins/findUniqueAuthentication/schemas.ts +42 -0
- package/src/plugins/getAction/index.test.ts +239 -0
- package/src/plugins/getAction/index.ts +57 -0
- package/src/plugins/getAction/schemas.ts +33 -0
- package/src/plugins/getApp/index.test.ts +127 -0
- package/src/plugins/getApp/index.ts +66 -0
- package/src/plugins/getApp/schemas.ts +38 -0
- package/src/plugins/getAuthentication/index.test.ts +284 -0
- package/src/plugins/getAuthentication/index.ts +86 -0
- package/src/plugins/getAuthentication/schemas.ts +31 -0
- package/src/plugins/getProfile/index.ts +55 -0
- package/src/plugins/getProfile/schemas.ts +26 -0
- package/src/plugins/listActions/index.test.ts +582 -0
- package/src/plugins/listActions/index.ts +115 -0
- package/src/plugins/listActions/schemas.ts +54 -0
- package/src/plugins/listApps/index.test.ts +357 -0
- package/src/plugins/listApps/index.ts +121 -0
- package/src/plugins/listApps/schemas.ts +49 -0
- package/src/plugins/listAuthentications/index.test.ts +709 -0
- package/src/plugins/listAuthentications/index.ts +136 -0
- package/src/plugins/listAuthentications/schemas.ts +60 -0
- package/src/plugins/listInputFields/index.test.ts +408 -0
- package/src/plugins/listInputFields/index.ts +204 -0
- package/src/plugins/listInputFields/schemas.ts +56 -0
- package/src/plugins/registry/index.ts +30 -0
- package/src/plugins/request/index.test.ts +329 -0
- package/src/plugins/request/index.ts +103 -0
- package/src/{functions → plugins}/request/schemas.ts +20 -9
- package/src/plugins/runAction/index.test.ts +387 -0
- package/src/plugins/runAction/index.ts +176 -0
- package/src/plugins/runAction/schemas.ts +53 -0
- package/src/resolvers/actionKey.ts +6 -4
- package/src/resolvers/actionType.ts +7 -2
- package/src/resolvers/appKey.ts +1 -1
- package/src/resolvers/authenticationId.ts +12 -3
- package/src/resolvers/inputs.ts +3 -1
- package/src/schemas/Action.ts +18 -12
- package/src/schemas/App.ts +11 -19
- package/src/schemas/Auth.ts +18 -13
- package/src/schemas/Field.ts +106 -11
- package/src/schemas/UserProfile.ts +43 -0
- package/src/sdk.test.ts +212 -0
- package/src/sdk.ts +132 -102
- package/src/types/domain.test.ts +50 -0
- package/src/types/domain.ts +43 -75
- package/src/types/errors.ts +275 -0
- package/src/types/functions.ts +27 -0
- package/src/types/optional-zapier-sdk-cli-login.d.ts +37 -0
- package/src/types/plugin.ts +105 -0
- package/src/types/properties.ts +4 -3
- package/src/types/sdk.ts +70 -48
- package/src/utils/array-utils.test.ts +131 -0
- package/src/utils/array-utils.ts +41 -0
- package/src/utils/domain-utils.test.ts +239 -0
- package/src/utils/domain-utils.ts +283 -0
- package/src/utils/function-utils.test.ts +141 -0
- package/src/utils/function-utils.ts +245 -0
- package/src/utils/pagination-utils.test.ts +620 -0
- package/src/utils/pagination-utils.ts +242 -0
- package/src/utils/validation.test.ts +50 -0
- package/src/utils/validation.ts +44 -0
- package/tsconfig.build.json +16 -2
- package/tsconfig.json +3 -1
- package/tsconfig.tsbuildinfo +1 -0
- package/tsup.config.ts +2 -0
- package/src/functions/bundleCode/index.ts +0 -78
- package/src/functions/bundleCode/info.ts +0 -9
- package/src/functions/bundleCode/schemas.ts +0 -30
- package/src/functions/findFirstAuthentication/index.ts +0 -24
- package/src/functions/findFirstAuthentication/info.ts +0 -9
- package/src/functions/findFirstAuthentication/schemas.ts +0 -50
- package/src/functions/findUniqueAuthentication/index.ts +0 -35
- package/src/functions/findUniqueAuthentication/info.ts +0 -9
- package/src/functions/findUniqueAuthentication/schemas.ts +0 -50
- package/src/functions/generateTypes/index.ts +0 -363
- package/src/functions/generateTypes/info.ts +0 -9
- package/src/functions/generateTypes/schemas.ts +0 -31
- package/src/functions/getAction/index.ts +0 -33
- package/src/functions/getAction/info.ts +0 -9
- package/src/functions/getAction/schemas.ts +0 -25
- package/src/functions/getApp/index.ts +0 -41
- package/src/functions/getApp/info.ts +0 -9
- package/src/functions/getApp/schemas.ts +0 -20
- package/src/functions/getAuthentication/index.ts +0 -50
- package/src/functions/getAuthentication/info.ts +0 -9
- package/src/functions/getAuthentication/schemas.ts +0 -29
- package/src/functions/listActions/index.ts +0 -149
- package/src/functions/listActions/info.ts +0 -9
- package/src/functions/listActions/schemas.ts +0 -30
- package/src/functions/listApps/index.ts +0 -60
- package/src/functions/listApps/info.ts +0 -9
- package/src/functions/listApps/schemas.ts +0 -32
- package/src/functions/listAuthentications/index.ts +0 -162
- package/src/functions/listAuthentications/info.ts +0 -9
- package/src/functions/listAuthentications/schemas.ts +0 -50
- package/src/functions/listFields/index.ts +0 -86
- package/src/functions/listFields/info.ts +0 -9
- package/src/functions/listFields/schemas.ts +0 -36
- package/src/functions/request/index.ts +0 -150
- package/src/functions/request/info.ts +0 -11
- package/src/functions/runAction/index.ts +0 -127
- package/src/functions/runAction/info.ts +0 -9
- package/src/functions/runAction/schemas.ts +0 -34
- package/src/plugins/apps/info.ts +0 -12
- package/src/plugins/fetch/types.ts +0 -2
- /package/src/{schema-utils.ts → utils/schema-utils.ts} +0 -0
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
AppKeyPropertySchema,
|
|
4
|
-
AuthenticationIdPropertySchema,
|
|
5
|
-
OutputPropertySchema,
|
|
6
|
-
DebugPropertySchema,
|
|
7
|
-
} from "../../types/properties";
|
|
8
|
-
import type { FunctionOptions } from "../../types/domain";
|
|
9
|
-
|
|
10
|
-
// Pure Zod schema - no resolver metadata!
|
|
11
|
-
export const GenerateTypesSchema = z
|
|
12
|
-
.object({
|
|
13
|
-
appKey: AppKeyPropertySchema.describe("App key to generate SDK code for"),
|
|
14
|
-
authenticationId: AuthenticationIdPropertySchema.optional(),
|
|
15
|
-
output: OutputPropertySchema.optional().describe(
|
|
16
|
-
"Output file path (defaults to generated/<appKey>.ts)",
|
|
17
|
-
),
|
|
18
|
-
debug: DebugPropertySchema.describe(
|
|
19
|
-
"Enable debug logging during generation",
|
|
20
|
-
),
|
|
21
|
-
})
|
|
22
|
-
.describe("Generate TypeScript SDK code for a specific app");
|
|
23
|
-
|
|
24
|
-
// Type inferred from schema + function config
|
|
25
|
-
export type GenerateTypesOptions = z.infer<typeof GenerateTypesSchema> &
|
|
26
|
-
FunctionOptions;
|
|
27
|
-
|
|
28
|
-
// SDK function interface - ready to be mixed into main SDK interface
|
|
29
|
-
export interface GenerateTypesSdkFunction {
|
|
30
|
-
generateTypes: (options: GenerateTypesOptions) => Promise<string>;
|
|
31
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { Action } from "../../types/domain";
|
|
2
|
-
import { listActions } from "../listActions";
|
|
3
|
-
import type { GetActionOptions } from "./schemas";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Get a specific action by app, action key, and type
|
|
7
|
-
*
|
|
8
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
9
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
10
|
-
*
|
|
11
|
-
* @param options - App key, action key, type, and API configuration options
|
|
12
|
-
* @returns Promise<Action>
|
|
13
|
-
*/
|
|
14
|
-
export async function getAction(options: GetActionOptions): Promise<Action> {
|
|
15
|
-
const { appKey, actionKey, actionType } = options;
|
|
16
|
-
|
|
17
|
-
const actions = await listActions({
|
|
18
|
-
...options,
|
|
19
|
-
appKey: appKey,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const action = actions.find(
|
|
23
|
-
(a) => a.key === actionKey && a.type === actionType,
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
if (!action) {
|
|
27
|
-
throw new Error(`Action not found: ${actionKey} with type ${actionType}`);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return action;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// No registry info here - moved to info.ts for proper tree-shaking
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { getAction } from "./index";
|
|
2
|
-
import { GetActionSchema } from "./schemas";
|
|
3
|
-
|
|
4
|
-
// Function registry info - imports both function and schema
|
|
5
|
-
export const getActionInfo = {
|
|
6
|
-
name: getAction.name,
|
|
7
|
-
inputSchema: GetActionSchema,
|
|
8
|
-
implementation: getAction,
|
|
9
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
AppKeyPropertySchema,
|
|
4
|
-
ActionTypePropertySchema,
|
|
5
|
-
ActionKeyPropertySchema,
|
|
6
|
-
} from "../../types/properties";
|
|
7
|
-
import type { Action, FunctionOptions } from "../../types/domain";
|
|
8
|
-
|
|
9
|
-
// Pure Zod schema - no resolver metadata!
|
|
10
|
-
export const GetActionSchema = z
|
|
11
|
-
.object({
|
|
12
|
-
appKey: AppKeyPropertySchema,
|
|
13
|
-
actionType: ActionTypePropertySchema,
|
|
14
|
-
actionKey: ActionKeyPropertySchema,
|
|
15
|
-
})
|
|
16
|
-
.describe("Get detailed information about a specific action");
|
|
17
|
-
|
|
18
|
-
// Type inferred from schema + function config
|
|
19
|
-
export type GetActionOptions = z.infer<typeof GetActionSchema> &
|
|
20
|
-
FunctionOptions;
|
|
21
|
-
|
|
22
|
-
// SDK function interface - ready to be mixed into main SDK interface
|
|
23
|
-
export interface GetActionSdkFunction {
|
|
24
|
-
getAction: (options: GetActionOptions) => Promise<Action>;
|
|
25
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { getOrCreateApiClient } from "../../api";
|
|
2
|
-
import type { Integration } from "../../types/domain";
|
|
3
|
-
import { AppNotFoundError } from "../../types/domain";
|
|
4
|
-
import type { GetAppOptions } from "./schemas";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Get a specific app by key
|
|
8
|
-
*
|
|
9
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
10
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
11
|
-
*
|
|
12
|
-
* @param options - App key and API configuration options
|
|
13
|
-
* @returns Promise<Integration>
|
|
14
|
-
*/
|
|
15
|
-
export async function getApp(options: GetAppOptions): Promise<Integration> {
|
|
16
|
-
const api = getOrCreateApiClient(options);
|
|
17
|
-
|
|
18
|
-
const { appKey } = options;
|
|
19
|
-
|
|
20
|
-
const app = await api.get(`/api/v4/apps/${appKey}/`, {
|
|
21
|
-
customErrorHandler: (response) => {
|
|
22
|
-
if (response.status === 404) {
|
|
23
|
-
return new AppNotFoundError(appKey);
|
|
24
|
-
}
|
|
25
|
-
return undefined;
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
key: app.slug,
|
|
31
|
-
name: app.name,
|
|
32
|
-
description: app.description,
|
|
33
|
-
version: "1.0.0",
|
|
34
|
-
category: app.category?.name,
|
|
35
|
-
actions: [],
|
|
36
|
-
triggers: [],
|
|
37
|
-
current_implementation_id: app.current_implementation_id,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// No registry info here - moved to info.ts for proper tree-shaking
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { AppKeyPropertySchema } from "../../types/properties";
|
|
3
|
-
import type { Integration, FunctionOptions } from "../../types/domain";
|
|
4
|
-
|
|
5
|
-
// Pure Zod schema - no resolver metadata!
|
|
6
|
-
export const GetAppSchema = z
|
|
7
|
-
.object({
|
|
8
|
-
appKey: AppKeyPropertySchema.describe(
|
|
9
|
-
"App key or slug to fetch (e.g., google-sheets, slack, github)",
|
|
10
|
-
),
|
|
11
|
-
})
|
|
12
|
-
.describe("Get detailed information about a specific app");
|
|
13
|
-
|
|
14
|
-
// Type inferred from schema + function config
|
|
15
|
-
export type GetAppOptions = z.infer<typeof GetAppSchema> & FunctionOptions;
|
|
16
|
-
|
|
17
|
-
// SDK function interface - ready to be mixed into main SDK interface
|
|
18
|
-
export interface GetAppSdkFunction {
|
|
19
|
-
getApp: (options: GetAppOptions) => Promise<Integration>;
|
|
20
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { getOrCreateApiClient } from "../../api";
|
|
2
|
-
import type { Authentication } from "../../types/domain";
|
|
3
|
-
import type { GetAuthenticationOptions } from "./schemas";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Get a specific authentication by ID
|
|
7
|
-
*
|
|
8
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
9
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
10
|
-
*
|
|
11
|
-
* @param options - Authentication ID and API configuration options
|
|
12
|
-
* @returns Promise<Authentication> - The authentication details
|
|
13
|
-
* @throws Error if authentication not found or access denied
|
|
14
|
-
*/
|
|
15
|
-
export async function getAuthentication(
|
|
16
|
-
options: GetAuthenticationOptions,
|
|
17
|
-
): Promise<Authentication> {
|
|
18
|
-
const { authenticationId } = options;
|
|
19
|
-
const api = getOrCreateApiClient(options);
|
|
20
|
-
|
|
21
|
-
const data: Authentication = await api.get(
|
|
22
|
-
`/api/v4/authentications/${authenticationId}/`,
|
|
23
|
-
{
|
|
24
|
-
customErrorHandler: (response) => {
|
|
25
|
-
if (response.status === 401) {
|
|
26
|
-
return new Error(
|
|
27
|
-
`Authentication failed. Your token may not have permission to access authentications or may be expired. (HTTP ${response.status})`,
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
if (response.status === 403) {
|
|
31
|
-
return new Error(
|
|
32
|
-
`Access forbidden. Your token may not have the required scopes to get authentication ${authenticationId}. (HTTP ${response.status})`,
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
if (response.status === 404) {
|
|
36
|
-
return new Error(
|
|
37
|
-
`Authentication ${authenticationId} not found. It may not exist or you may not have access to it. (HTTP ${response.status})`,
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
return undefined;
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
// Coerce title from label if title is missing (API cleanup)
|
|
46
|
-
return {
|
|
47
|
-
...data,
|
|
48
|
-
title: data.title || (data as any).label || undefined,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { getAuthentication } from "./index";
|
|
2
|
-
import { GetAuthenticationSchema } from "./schemas";
|
|
3
|
-
|
|
4
|
-
// Function registry info - imports both function and schema
|
|
5
|
-
export const getAuthenticationInfo = {
|
|
6
|
-
name: getAuthentication.name,
|
|
7
|
-
inputSchema: GetAuthenticationSchema,
|
|
8
|
-
implementation: getAuthentication,
|
|
9
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { withOutputSchema } from "../../schema-utils";
|
|
3
|
-
import { AuthItemSchema } from "../../schemas/Auth";
|
|
4
|
-
import type { Authentication, FunctionOptions } from "../../types/domain";
|
|
5
|
-
|
|
6
|
-
// Pure Zod schema - no resolver metadata!
|
|
7
|
-
export const GetAuthenticationSchema = withOutputSchema(
|
|
8
|
-
z
|
|
9
|
-
.object({
|
|
10
|
-
authenticationId: z
|
|
11
|
-
.number()
|
|
12
|
-
.int()
|
|
13
|
-
.positive()
|
|
14
|
-
.describe("Authentication ID to retrieve"),
|
|
15
|
-
})
|
|
16
|
-
.describe("Get a specific authentication by ID"),
|
|
17
|
-
AuthItemSchema,
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
// Type inferred from schema + function config
|
|
21
|
-
export type GetAuthenticationOptions = z.infer<typeof GetAuthenticationSchema> &
|
|
22
|
-
FunctionOptions;
|
|
23
|
-
|
|
24
|
-
// SDK function interface - ready to be mixed into main SDK interface
|
|
25
|
-
export interface GetAuthenticationSdkFunction {
|
|
26
|
-
getAuthentication: (
|
|
27
|
-
options: GetAuthenticationOptions,
|
|
28
|
-
) => Promise<Authentication>;
|
|
29
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { getOrCreateApiClient } from "../../api";
|
|
2
|
-
import type { Action } from "../../types/domain";
|
|
3
|
-
import { getApp } from "../getApp";
|
|
4
|
-
import type { ListActionsOptions } from "./schemas";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* List available actions with optional filtering
|
|
8
|
-
*
|
|
9
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
10
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
11
|
-
*
|
|
12
|
-
* @param options - Filtering and API configuration options
|
|
13
|
-
* @returns Promise<Action[]> with pagination metadata
|
|
14
|
-
*/
|
|
15
|
-
export async function listActions(
|
|
16
|
-
options: Partial<ListActionsOptions> = {},
|
|
17
|
-
): Promise<Action[]> {
|
|
18
|
-
const api = getOrCreateApiClient(options);
|
|
19
|
-
|
|
20
|
-
// If filtering by appKey, use optimized approach with selected_apis parameter
|
|
21
|
-
if (options.appKey) {
|
|
22
|
-
try {
|
|
23
|
-
// Use the standalone getApp function
|
|
24
|
-
const appData = await getApp({
|
|
25
|
-
appKey: options.appKey,
|
|
26
|
-
api,
|
|
27
|
-
token: options.token,
|
|
28
|
-
baseUrl: options.baseUrl,
|
|
29
|
-
debug: options.debug,
|
|
30
|
-
fetch: options.fetch,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// Extract implementation name from current_implementation_id (e.g., "SlackCLIAPI@1.20.0" -> "SlackCLIAPI")
|
|
34
|
-
const implementationId = appData.current_implementation_id?.split("@")[0];
|
|
35
|
-
if (!implementationId) {
|
|
36
|
-
throw new Error("No current_implementation_id found for app");
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const searchParams = {
|
|
40
|
-
global: "true",
|
|
41
|
-
public_only: "true",
|
|
42
|
-
selected_apis: implementationId,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const data = await api.get("/api/v4/implementations/", {
|
|
46
|
-
searchParams,
|
|
47
|
-
});
|
|
48
|
-
const actions: Action[] = [];
|
|
49
|
-
|
|
50
|
-
// Transform implementations to actions
|
|
51
|
-
for (const implementation of data.results || []) {
|
|
52
|
-
if (implementation.actions) {
|
|
53
|
-
for (const action of implementation.actions) {
|
|
54
|
-
const transformedAction: Action = {
|
|
55
|
-
key: action.key,
|
|
56
|
-
name: action.name || action.label,
|
|
57
|
-
description: action.description || "",
|
|
58
|
-
appKey: implementation.slug || "",
|
|
59
|
-
type: action.type || action.type_of || "read",
|
|
60
|
-
inputFields: [], // Would need additional API call for detailed fields
|
|
61
|
-
outputFields: [],
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// Apply type filter if provided
|
|
65
|
-
if (options?.type && transformedAction.type !== options.type) {
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
actions.push(transformedAction);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Add pagination metadata for app-specific queries
|
|
75
|
-
if (actions.length > 0) {
|
|
76
|
-
(actions as any).__pagination = {
|
|
77
|
-
count: data.count,
|
|
78
|
-
hasNext: !!data.next,
|
|
79
|
-
hasPrevious: !!data.previous,
|
|
80
|
-
nextUrl: data.next,
|
|
81
|
-
previousUrl: data.previous,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return actions;
|
|
86
|
-
} catch (error) {
|
|
87
|
-
// If it's an AppNotFoundError, don't try fallback - just re-throw
|
|
88
|
-
if (error instanceof Error && error.name === "AppNotFoundError") {
|
|
89
|
-
throw error;
|
|
90
|
-
}
|
|
91
|
-
// Fallback to original approach if optimized approach fails
|
|
92
|
-
console.warn(
|
|
93
|
-
"Optimized app lookup failed, falling back to full scan:",
|
|
94
|
-
error,
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Original approach for general queries or when optimization fails
|
|
100
|
-
const searchParams = {
|
|
101
|
-
global: "true",
|
|
102
|
-
public_only: "true",
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const data = await api.get("/api/v4/implementations/", { searchParams });
|
|
106
|
-
const actions: Action[] = [];
|
|
107
|
-
|
|
108
|
-
// Transform implementations to actions
|
|
109
|
-
for (const implementation of data.results || []) {
|
|
110
|
-
if (implementation.actions) {
|
|
111
|
-
for (const action of implementation.actions) {
|
|
112
|
-
const transformedAction: Action = {
|
|
113
|
-
key: action.key,
|
|
114
|
-
name: action.name || action.label,
|
|
115
|
-
description: action.description || "",
|
|
116
|
-
appKey: implementation.slug || "",
|
|
117
|
-
type: action.type || action.type_of || "read",
|
|
118
|
-
inputFields: [], // Would need additional API call for detailed fields
|
|
119
|
-
outputFields: [],
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
// Apply filters
|
|
123
|
-
if (options?.appKey && transformedAction.appKey !== options.appKey) {
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
if (options?.type && transformedAction.type !== options.type) {
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
actions.push(transformedAction);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// Add pagination metadata for general queries
|
|
136
|
-
if (actions.length > 0) {
|
|
137
|
-
(actions as any).__pagination = {
|
|
138
|
-
count: data.count,
|
|
139
|
-
hasNext: !!data.next,
|
|
140
|
-
hasPrevious: !!data.previous,
|
|
141
|
-
nextUrl: data.next,
|
|
142
|
-
previousUrl: data.previous,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return actions;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// No registry info here - moved to info.ts for proper tree-shaking
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { listActions } from "./index";
|
|
2
|
-
import { ListActionsSchema } from "./schemas";
|
|
3
|
-
|
|
4
|
-
// Function registry info - imports both function and schema
|
|
5
|
-
export const listActionsInfo = {
|
|
6
|
-
name: listActions.name,
|
|
7
|
-
inputSchema: ListActionsSchema,
|
|
8
|
-
implementation: listActions,
|
|
9
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
AppKeyPropertySchema,
|
|
4
|
-
ActionTypePropertySchema,
|
|
5
|
-
} from "../../types/properties";
|
|
6
|
-
import { withOutputSchema } from "../../schema-utils";
|
|
7
|
-
import { ActionItemSchema } from "../../schemas/Action";
|
|
8
|
-
import type { Action, FunctionOptions } from "../../types/domain";
|
|
9
|
-
|
|
10
|
-
// Pure Zod schema - no resolver metadata!
|
|
11
|
-
export const ListActionsSchema = withOutputSchema(
|
|
12
|
-
z
|
|
13
|
-
.object({
|
|
14
|
-
appKey: AppKeyPropertySchema.optional(),
|
|
15
|
-
type: ActionTypePropertySchema.optional().describe(
|
|
16
|
-
"Filter actions by type",
|
|
17
|
-
),
|
|
18
|
-
})
|
|
19
|
-
.describe("List all actions for a specific app"),
|
|
20
|
-
ActionItemSchema,
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
// Type inferred from schema + function config
|
|
24
|
-
export type ListActionsOptions = z.infer<typeof ListActionsSchema> &
|
|
25
|
-
FunctionOptions;
|
|
26
|
-
|
|
27
|
-
// SDK function interface - ready to be mixed into main SDK interface
|
|
28
|
-
export interface ListActionsSdkFunction {
|
|
29
|
-
listActions: (options?: Partial<ListActionsOptions>) => Promise<Action[]>;
|
|
30
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { getOrCreateApiClient } from "../../api";
|
|
2
|
-
import type { Integration } from "../../types/domain";
|
|
3
|
-
import type { ListAppsOptions } from "./schemas";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* List available apps with optional filtering
|
|
7
|
-
*
|
|
8
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
9
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
10
|
-
*
|
|
11
|
-
* @param options - Filtering, pagination, and API configuration options
|
|
12
|
-
* @returns Promise<Integration[]> with pagination metadata
|
|
13
|
-
*/
|
|
14
|
-
export async function listApps(
|
|
15
|
-
options: ListAppsOptions = {},
|
|
16
|
-
): Promise<Integration[]> {
|
|
17
|
-
const api = getOrCreateApiClient(options);
|
|
18
|
-
|
|
19
|
-
// Build search parameters
|
|
20
|
-
const searchParams: Record<string, string> = {};
|
|
21
|
-
if (options.category) {
|
|
22
|
-
searchParams.category = options.category;
|
|
23
|
-
}
|
|
24
|
-
if (options.limit) {
|
|
25
|
-
searchParams.limit = options.limit.toString();
|
|
26
|
-
}
|
|
27
|
-
if (options.offset) {
|
|
28
|
-
searchParams.offset = options.offset.toString();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const data = await api.get("/api/v4/apps/", { searchParams });
|
|
32
|
-
|
|
33
|
-
// Transform API response to our Integration interface
|
|
34
|
-
const apps =
|
|
35
|
-
data.results?.map(
|
|
36
|
-
(app: any): Integration => ({
|
|
37
|
-
key: app.slug,
|
|
38
|
-
name: app.name,
|
|
39
|
-
description: app.description,
|
|
40
|
-
version: "1.0.0", // API doesn't provide version
|
|
41
|
-
category: app.category?.name,
|
|
42
|
-
actions: [], // Will be populated separately
|
|
43
|
-
triggers: [],
|
|
44
|
-
current_implementation_id: app.current_implementation_id,
|
|
45
|
-
}),
|
|
46
|
-
) || [];
|
|
47
|
-
|
|
48
|
-
// Add pagination metadata to the response
|
|
49
|
-
if (apps.length > 0) {
|
|
50
|
-
(apps as any).__pagination = {
|
|
51
|
-
count: data.count,
|
|
52
|
-
hasNext: !!data.next,
|
|
53
|
-
hasPrevious: !!data.previous,
|
|
54
|
-
nextUrl: data.next,
|
|
55
|
-
previousUrl: data.previous,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return apps;
|
|
60
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { listApps } from "./index";
|
|
2
|
-
import { ListAppsSchema } from "./schemas";
|
|
3
|
-
|
|
4
|
-
// Function registry info - imports both function and schema
|
|
5
|
-
export const listAppsInfo = {
|
|
6
|
-
name: listApps.name,
|
|
7
|
-
inputSchema: ListAppsSchema,
|
|
8
|
-
implementation: listApps,
|
|
9
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
LimitPropertySchema,
|
|
4
|
-
OffsetPropertySchema,
|
|
5
|
-
} from "../../types/properties";
|
|
6
|
-
import { withOutputSchema } from "../../schema-utils";
|
|
7
|
-
import { AppItemSchema } from "../../schemas/App";
|
|
8
|
-
import type { Integration, FunctionOptions } from "../../types/domain";
|
|
9
|
-
|
|
10
|
-
// Pure Zod schema - no resolver metadata!
|
|
11
|
-
export const ListAppsSchema = withOutputSchema(
|
|
12
|
-
z
|
|
13
|
-
.object({
|
|
14
|
-
category: z.string().optional().describe("Filter apps by category"),
|
|
15
|
-
limit: LimitPropertySchema.optional().describe(
|
|
16
|
-
"Maximum number of items to return (1-200)",
|
|
17
|
-
),
|
|
18
|
-
offset: OffsetPropertySchema.optional().describe(
|
|
19
|
-
"Number of items to skip for pagination",
|
|
20
|
-
),
|
|
21
|
-
})
|
|
22
|
-
.describe("List all available apps with optional filtering"),
|
|
23
|
-
AppItemSchema,
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
// Type inferred from schema + function config
|
|
27
|
-
export type ListAppsOptions = z.infer<typeof ListAppsSchema> & FunctionOptions;
|
|
28
|
-
|
|
29
|
-
// SDK function interface - ready to be mixed into main SDK interface
|
|
30
|
-
export interface ListAppsSdkFunction {
|
|
31
|
-
listApps: (options?: Partial<ListAppsOptions>) => Promise<Integration[]>;
|
|
32
|
-
}
|