@pikku/addon-twist 0.0.2
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/README.md +12 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +67 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.js +78 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -0
- package/dist/.pikku/addon/pikku-addon-types.gen.ts +106 -0
- package/dist/.pikku/addon/pikku-package.gen.d.ts +2 -0
- package/dist/.pikku/addon/pikku-package.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/pikku-package.gen.js +11 -0
- package/dist/.pikku/addon/pikku-package.gen.js.map +1 -0
- package/dist/.pikku/addon/pikku-package.gen.ts +13 -0
- package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +4 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +47 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.js +18 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.ts +82 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +112 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts.map +1 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.js +60 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.js.map +1 -0
- package/dist/.pikku/channel/pikku-channel-types.gen.ts +177 -0
- package/dist/.pikku/console/pikku-addon-meta.gen.json +14 -0
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +7 -0
- package/dist/.pikku/console/pikku-node-types.gen.d.ts.map +1 -0
- package/dist/.pikku/console/pikku-node-types.gen.js +2 -0
- package/dist/.pikku/console/pikku-node-types.gen.js.map +1 -0
- package/dist/.pikku/console/pikku-node-types.gen.ts +8 -0
- package/dist/.pikku/credentials/pikku-credentials-meta.gen.json +20 -0
- package/dist/.pikku/credentials/pikku-credentials.gen.d.ts +15 -0
- package/dist/.pikku/credentials/pikku-credentials.gen.d.ts.map +1 -0
- package/dist/.pikku/credentials/pikku-credentials.gen.js +13 -0
- package/dist/.pikku/credentials/pikku-credentials.gen.js.map +1 -0
- package/dist/.pikku/credentials/pikku-credentials.gen.ts +23 -0
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +490 -0
- package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -0
- package/dist/.pikku/function/pikku-function-types.gen.js +334 -0
- package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -0
- package/dist/.pikku/function/pikku-function-types.gen.ts +754 -0
- package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +640 -0
- package/dist/.pikku/function/pikku-functions-meta.gen.d.ts +2 -0
- package/dist/.pikku/function/pikku-functions-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/function/pikku-functions-meta.gen.js +7 -0
- package/dist/.pikku/function/pikku-functions-meta.gen.js.map +1 -0
- package/dist/.pikku/function/pikku-functions-meta.gen.json +420 -0
- package/dist/.pikku/function/pikku-functions-meta.gen.ts +7 -0
- package/dist/.pikku/function/pikku-functions.gen.d.ts +2 -0
- package/dist/.pikku/function/pikku-functions.gen.d.ts.map +1 -0
- package/dist/.pikku/function/pikku-functions.gen.js +50 -0
- package/dist/.pikku/function/pikku-functions.gen.js.map +1 -0
- package/dist/.pikku/function/pikku-functions.gen.ts +50 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +120 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.js +72 -0
- package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -0
- package/dist/.pikku/http/pikku-http-types.gen.ts +147 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +131 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts.map +1 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +38 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js.map +1 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +9 -0
- package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -0
- package/dist/.pikku/pikku-bootstrap.gen.js +9 -0
- package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -0
- package/dist/.pikku/pikku-bootstrap.gen.ts +8 -0
- package/dist/.pikku/pikku-meta-service.gen.d.ts +8 -0
- package/dist/.pikku/pikku-meta-service.gen.d.ts.map +1 -0
- package/dist/.pikku/pikku-meta-service.gen.js +10 -0
- package/dist/.pikku/pikku-meta-service.gen.js.map +1 -0
- package/dist/.pikku/pikku-meta-service.gen.ts +10 -0
- package/dist/.pikku/pikku-services.gen.d.ts +36 -0
- package/dist/.pikku/pikku-services.gen.d.ts.map +1 -0
- package/dist/.pikku/pikku-services.gen.js +32 -0
- package/dist/.pikku/pikku-services.gen.js.map +1 -0
- package/dist/.pikku/pikku-services.gen.ts +45 -0
- package/dist/.pikku/pikku-types.gen.d.ts +12 -0
- package/dist/.pikku/pikku-types.gen.d.ts.map +1 -0
- package/dist/.pikku/pikku-types.gen.js +17 -0
- package/dist/.pikku/pikku-types.gen.js.map +1 -0
- package/dist/.pikku/pikku-types.gen.ts +21 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +24 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts.map +1 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.js +17 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.js.map +1 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.ts +27 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +248 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +270 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +2 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +24 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +22 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts.map +1 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +17 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js.map +1 -0
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
- package/dist/.pikku/schemas/register.gen.d.ts +2 -0
- package/dist/.pikku/schemas/register.gen.d.ts.map +1 -0
- package/dist/.pikku/schemas/register.gen.js +99 -0
- package/dist/.pikku/schemas/register.gen.js.map +1 -0
- package/dist/.pikku/schemas/register.gen.ts +191 -0
- package/dist/.pikku/schemas/schemas/ChannelArchiveInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelArchiveOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelCreateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelCreateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelDeleteInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelDeleteOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelGetAllInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelGetAllOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelGetOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelUnarchiveInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelUnarchiveOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelUpdateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ChannelUpdateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentCreateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentCreateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentDeleteInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentDeleteOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentGetAllInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentGetAllOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentGetOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentUpdateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CommentUpdateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/CredentialSchema_twist.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageCreateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageCreateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageDeleteInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageDeleteOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageGetAllInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageGetAllOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageGetOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageUpdateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/MessageUpdateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/SecretSchema_twistOAuthApp.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadCreateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadCreateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadDeleteInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadDeleteOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadGetAllInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadGetAllOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadGetInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadGetOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadUpdateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/ThreadUpdateOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/VariableSchema_TWIST_BASE_URL.schema.json +1 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +6 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +1 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +5 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +1 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.ts +5 -0
- package/dist/.pikku/secrets/pikku-secrets-meta.gen.json +10 -0
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +15 -0
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +1 -0
- package/dist/.pikku/secrets/pikku-secrets.gen.js +13 -0
- package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -0
- package/dist/.pikku/secrets/pikku-secrets.gen.ts +23 -0
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +114 -0
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts.map +1 -0
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +34 -0
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js.map +1 -0
- package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +160 -0
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +6 -0
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +1 -0
- package/dist/.pikku/variables/pikku-variable-types.gen.js +5 -0
- package/dist/.pikku/variables/pikku-variable-types.gen.js.map +1 -0
- package/dist/.pikku/variables/pikku-variable-types.gen.ts +5 -0
- package/dist/.pikku/variables/pikku-variables-meta.gen.json +10 -0
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +15 -0
- package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +1 -0
- package/dist/.pikku/variables/pikku-variables.gen.js +13 -0
- package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -0
- package/dist/.pikku/variables/pikku-variables.gen.ts +23 -0
- package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +38 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +90 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +18 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +167 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts +2 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts.map +1 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +7 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +9 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +5 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts.map +1 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +5 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js.map +1 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +3 -0
- package/dist/src/functions/channelArchive.function.d.ts +13 -0
- package/dist/src/functions/channelArchive.function.d.ts.map +1 -0
- package/dist/src/functions/channelArchive.function.js +15 -0
- package/dist/src/functions/channelArchive.function.js.map +1 -0
- package/dist/src/functions/channelCreate.function.d.ts +17 -0
- package/dist/src/functions/channelCreate.function.d.ts.map +1 -0
- package/dist/src/functions/channelCreate.function.js +16 -0
- package/dist/src/functions/channelCreate.function.js.map +1 -0
- package/dist/src/functions/channelDelete.function.d.ts +13 -0
- package/dist/src/functions/channelDelete.function.d.ts.map +1 -0
- package/dist/src/functions/channelDelete.function.js +15 -0
- package/dist/src/functions/channelDelete.function.js.map +1 -0
- package/dist/src/functions/channelGet.function.d.ts +13 -0
- package/dist/src/functions/channelGet.function.d.ts.map +1 -0
- package/dist/src/functions/channelGet.function.js +15 -0
- package/dist/src/functions/channelGet.function.js.map +1 -0
- package/dist/src/functions/channelGetAll.function.d.ts +13 -0
- package/dist/src/functions/channelGetAll.function.d.ts.map +1 -0
- package/dist/src/functions/channelGetAll.function.js +15 -0
- package/dist/src/functions/channelGetAll.function.js.map +1 -0
- package/dist/src/functions/channelUnarchive.function.d.ts +13 -0
- package/dist/src/functions/channelUnarchive.function.d.ts.map +1 -0
- package/dist/src/functions/channelUnarchive.function.js +15 -0
- package/dist/src/functions/channelUnarchive.function.js.map +1 -0
- package/dist/src/functions/channelUpdate.function.d.ts +17 -0
- package/dist/src/functions/channelUpdate.function.d.ts.map +1 -0
- package/dist/src/functions/channelUpdate.function.js +16 -0
- package/dist/src/functions/channelUpdate.function.js.map +1 -0
- package/dist/src/functions/commentCreate.function.d.ts +17 -0
- package/dist/src/functions/commentCreate.function.d.ts.map +1 -0
- package/dist/src/functions/commentCreate.function.js +16 -0
- package/dist/src/functions/commentCreate.function.js.map +1 -0
- package/dist/src/functions/commentDelete.function.d.ts +13 -0
- package/dist/src/functions/commentDelete.function.d.ts.map +1 -0
- package/dist/src/functions/commentDelete.function.js +15 -0
- package/dist/src/functions/commentDelete.function.js.map +1 -0
- package/dist/src/functions/commentGet.function.d.ts +13 -0
- package/dist/src/functions/commentGet.function.d.ts.map +1 -0
- package/dist/src/functions/commentGet.function.js +15 -0
- package/dist/src/functions/commentGet.function.js.map +1 -0
- package/dist/src/functions/commentGetAll.function.d.ts +13 -0
- package/dist/src/functions/commentGetAll.function.d.ts.map +1 -0
- package/dist/src/functions/commentGetAll.function.js +15 -0
- package/dist/src/functions/commentGetAll.function.js.map +1 -0
- package/dist/src/functions/commentUpdate.function.d.ts +17 -0
- package/dist/src/functions/commentUpdate.function.d.ts.map +1 -0
- package/dist/src/functions/commentUpdate.function.js +16 -0
- package/dist/src/functions/commentUpdate.function.js.map +1 -0
- package/dist/src/functions/messageCreate.function.d.ts +21 -0
- package/dist/src/functions/messageCreate.function.d.ts.map +1 -0
- package/dist/src/functions/messageCreate.function.js +17 -0
- package/dist/src/functions/messageCreate.function.js.map +1 -0
- package/dist/src/functions/messageDelete.function.d.ts +13 -0
- package/dist/src/functions/messageDelete.function.d.ts.map +1 -0
- package/dist/src/functions/messageDelete.function.js +15 -0
- package/dist/src/functions/messageDelete.function.js.map +1 -0
- package/dist/src/functions/messageGet.function.d.ts +13 -0
- package/dist/src/functions/messageGet.function.d.ts.map +1 -0
- package/dist/src/functions/messageGet.function.js +15 -0
- package/dist/src/functions/messageGet.function.js.map +1 -0
- package/dist/src/functions/messageGetAll.function.d.ts +13 -0
- package/dist/src/functions/messageGetAll.function.d.ts.map +1 -0
- package/dist/src/functions/messageGetAll.function.js +15 -0
- package/dist/src/functions/messageGetAll.function.js.map +1 -0
- package/dist/src/functions/messageUpdate.function.d.ts +17 -0
- package/dist/src/functions/messageUpdate.function.d.ts.map +1 -0
- package/dist/src/functions/messageUpdate.function.js +16 -0
- package/dist/src/functions/messageUpdate.function.js.map +1 -0
- package/dist/src/functions/threadCreate.function.d.ts +21 -0
- package/dist/src/functions/threadCreate.function.d.ts.map +1 -0
- package/dist/src/functions/threadCreate.function.js +17 -0
- package/dist/src/functions/threadCreate.function.js.map +1 -0
- package/dist/src/functions/threadDelete.function.d.ts +13 -0
- package/dist/src/functions/threadDelete.function.d.ts.map +1 -0
- package/dist/src/functions/threadDelete.function.js +15 -0
- package/dist/src/functions/threadDelete.function.js.map +1 -0
- package/dist/src/functions/threadGet.function.d.ts +13 -0
- package/dist/src/functions/threadGet.function.d.ts.map +1 -0
- package/dist/src/functions/threadGet.function.js +15 -0
- package/dist/src/functions/threadGet.function.js.map +1 -0
- package/dist/src/functions/threadGetAll.function.d.ts +13 -0
- package/dist/src/functions/threadGetAll.function.d.ts.map +1 -0
- package/dist/src/functions/threadGetAll.function.js +15 -0
- package/dist/src/functions/threadGetAll.function.js.map +1 -0
- package/dist/src/functions/threadUpdate.function.d.ts +21 -0
- package/dist/src/functions/threadUpdate.function.d.ts.map +1 -0
- package/dist/src/functions/threadUpdate.function.js +17 -0
- package/dist/src/functions/threadUpdate.function.js.map +1 -0
- package/dist/src/index.d.ts +23 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +23 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/services.d.ts +2 -0
- package/dist/src/services.d.ts.map +1 -0
- package/dist/src/services.js +7 -0
- package/dist/src/services.js.map +1 -0
- package/dist/src/twist-api.service.d.ts +15 -0
- package/dist/src/twist-api.service.d.ts.map +1 -0
- package/dist/src/twist-api.service.js +219 -0
- package/dist/src/twist-api.service.js.map +1 -0
- package/dist/src/twist.credential.d.ts +10 -0
- package/dist/src/twist.credential.d.ts.map +1 -0
- package/dist/src/twist.credential.js +33 -0
- package/dist/src/twist.credential.js.map +1 -0
- package/dist/src/twist.types.d.ts +7 -0
- package/dist/src/twist.types.d.ts.map +1 -0
- package/dist/src/twist.types.js +8 -0
- package/dist/src/twist.types.js.map +1 -0
- package/dist/src/twist.variable.d.ts +5 -0
- package/dist/src/twist.variable.d.ts.map +1 -0
- package/dist/src/twist.variable.js +11 -0
- package/dist/src/twist.variable.js.map +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { OAuth2Client } from '@pikku/core/oauth2';
|
|
2
|
+
import { BadRequestError, ConflictError, ForbiddenError, InternalServerError, MethodNotAllowedError, NotFoundError, TooManyRequestsError, UnauthorizedError, UnprocessableContentError } from '@pikku/core/errors';
|
|
3
|
+
export const TWIST_OAUTH2_CONFIG = {
|
|
4
|
+
tokenSecretId: 'TWIST_TOKENS',
|
|
5
|
+
authorizationUrl: "https://example.com/oauth2/authorize",
|
|
6
|
+
tokenUrl: "https://example.com/oauth2/token",
|
|
7
|
+
scopes: ["read", "write"],
|
|
8
|
+
};
|
|
9
|
+
const ROUTES = {
|
|
10
|
+
"POST /channels/add": {
|
|
11
|
+
"path": [],
|
|
12
|
+
"query": [],
|
|
13
|
+
"headers": []
|
|
14
|
+
},
|
|
15
|
+
"POST /channels/remove": {
|
|
16
|
+
"path": [],
|
|
17
|
+
"query": [
|
|
18
|
+
"id"
|
|
19
|
+
],
|
|
20
|
+
"headers": []
|
|
21
|
+
},
|
|
22
|
+
"GET /channels/getone": {
|
|
23
|
+
"path": [],
|
|
24
|
+
"query": [
|
|
25
|
+
"id"
|
|
26
|
+
],
|
|
27
|
+
"headers": []
|
|
28
|
+
},
|
|
29
|
+
"GET /channels/get": {
|
|
30
|
+
"path": [],
|
|
31
|
+
"query": [
|
|
32
|
+
"workspace_id"
|
|
33
|
+
],
|
|
34
|
+
"headers": []
|
|
35
|
+
},
|
|
36
|
+
"POST /channels/update": {
|
|
37
|
+
"path": [],
|
|
38
|
+
"query": [],
|
|
39
|
+
"headers": []
|
|
40
|
+
},
|
|
41
|
+
"POST /channels/archive": {
|
|
42
|
+
"path": [],
|
|
43
|
+
"query": [
|
|
44
|
+
"id"
|
|
45
|
+
],
|
|
46
|
+
"headers": []
|
|
47
|
+
},
|
|
48
|
+
"POST /channels/unarchive": {
|
|
49
|
+
"path": [],
|
|
50
|
+
"query": [
|
|
51
|
+
"id"
|
|
52
|
+
],
|
|
53
|
+
"headers": []
|
|
54
|
+
},
|
|
55
|
+
"POST /comments/add": {
|
|
56
|
+
"path": [],
|
|
57
|
+
"query": [],
|
|
58
|
+
"headers": []
|
|
59
|
+
},
|
|
60
|
+
"POST /comments/remove": {
|
|
61
|
+
"path": [],
|
|
62
|
+
"query": [
|
|
63
|
+
"id"
|
|
64
|
+
],
|
|
65
|
+
"headers": []
|
|
66
|
+
},
|
|
67
|
+
"GET /comments/getone": {
|
|
68
|
+
"path": [],
|
|
69
|
+
"query": [
|
|
70
|
+
"id"
|
|
71
|
+
],
|
|
72
|
+
"headers": []
|
|
73
|
+
},
|
|
74
|
+
"GET /comments/get": {
|
|
75
|
+
"path": [],
|
|
76
|
+
"query": [
|
|
77
|
+
"thread_id"
|
|
78
|
+
],
|
|
79
|
+
"headers": []
|
|
80
|
+
},
|
|
81
|
+
"POST /comments/update": {
|
|
82
|
+
"path": [],
|
|
83
|
+
"query": [],
|
|
84
|
+
"headers": []
|
|
85
|
+
},
|
|
86
|
+
"POST /conversation_messages/add": {
|
|
87
|
+
"path": [],
|
|
88
|
+
"query": [],
|
|
89
|
+
"headers": []
|
|
90
|
+
},
|
|
91
|
+
"GET /conversation_messages/getone": {
|
|
92
|
+
"path": [],
|
|
93
|
+
"query": [
|
|
94
|
+
"id"
|
|
95
|
+
],
|
|
96
|
+
"headers": []
|
|
97
|
+
},
|
|
98
|
+
"GET /conversation_messages/get": {
|
|
99
|
+
"path": [],
|
|
100
|
+
"query": [
|
|
101
|
+
"conversation_id"
|
|
102
|
+
],
|
|
103
|
+
"headers": []
|
|
104
|
+
},
|
|
105
|
+
"POST /conversation_messages/remove": {
|
|
106
|
+
"path": [],
|
|
107
|
+
"query": [
|
|
108
|
+
"id"
|
|
109
|
+
],
|
|
110
|
+
"headers": []
|
|
111
|
+
},
|
|
112
|
+
"POST /conversation_messages/update": {
|
|
113
|
+
"path": [],
|
|
114
|
+
"query": [],
|
|
115
|
+
"headers": []
|
|
116
|
+
},
|
|
117
|
+
"POST /threads/add": {
|
|
118
|
+
"path": [],
|
|
119
|
+
"query": [],
|
|
120
|
+
"headers": []
|
|
121
|
+
},
|
|
122
|
+
"POST /threads/remove": {
|
|
123
|
+
"path": [],
|
|
124
|
+
"query": [
|
|
125
|
+
"id"
|
|
126
|
+
],
|
|
127
|
+
"headers": []
|
|
128
|
+
},
|
|
129
|
+
"GET /threads/getone": {
|
|
130
|
+
"path": [],
|
|
131
|
+
"query": [
|
|
132
|
+
"id"
|
|
133
|
+
],
|
|
134
|
+
"headers": []
|
|
135
|
+
},
|
|
136
|
+
"GET /threads/get": {
|
|
137
|
+
"path": [],
|
|
138
|
+
"query": [
|
|
139
|
+
"channel_id"
|
|
140
|
+
],
|
|
141
|
+
"headers": []
|
|
142
|
+
},
|
|
143
|
+
"POST /threads/update": {
|
|
144
|
+
"path": [],
|
|
145
|
+
"query": [],
|
|
146
|
+
"headers": []
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
export class TwistService {
|
|
150
|
+
constructor(secrets, variables) {
|
|
151
|
+
this.baseUrl = variables.get('TWIST_BASE_URL');
|
|
152
|
+
this.oauth = new OAuth2Client(TWIST_OAUTH2_CONFIG, 'TWIST_APP_CREDENTIALS', secrets);
|
|
153
|
+
}
|
|
154
|
+
async call(method, path, data) {
|
|
155
|
+
const route = ROUTES[`${method} ${path}`];
|
|
156
|
+
let endpoint = path;
|
|
157
|
+
let body;
|
|
158
|
+
const query = {};
|
|
159
|
+
const headers = {
|
|
160
|
+
'Content-Type': 'application/json',
|
|
161
|
+
};
|
|
162
|
+
if (data && route) {
|
|
163
|
+
// Interpolate path params
|
|
164
|
+
for (const param of route.path) {
|
|
165
|
+
if (data[param] !== undefined) {
|
|
166
|
+
endpoint = endpoint.replace(`{${param}}`, String(data[param]));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// Extract query params
|
|
170
|
+
for (const param of route.query) {
|
|
171
|
+
if (data[param] !== undefined) {
|
|
172
|
+
query[param] = String(data[param]);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// Extract header params
|
|
176
|
+
for (const param of route.headers) {
|
|
177
|
+
if (data[param] !== undefined) {
|
|
178
|
+
headers[param] = String(data[param]);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// Everything else goes into body
|
|
182
|
+
const pathQueryHeaders = new Set([...route.path, ...route.query, ...route.headers]);
|
|
183
|
+
const remaining = Object.fromEntries(Object.entries(data).filter(([k]) => !pathQueryHeaders.has(k)));
|
|
184
|
+
if (Object.keys(remaining).length > 0) {
|
|
185
|
+
body = remaining;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
const url = new URL(`${this.baseUrl}${endpoint}`);
|
|
189
|
+
for (const [key, value] of Object.entries(query)) {
|
|
190
|
+
url.searchParams.set(key, value);
|
|
191
|
+
}
|
|
192
|
+
const response = await this.oauth.request(url.toString(), {
|
|
193
|
+
method,
|
|
194
|
+
headers,
|
|
195
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
196
|
+
});
|
|
197
|
+
if (!response.ok) {
|
|
198
|
+
const errorText = await response.text();
|
|
199
|
+
const errorMessage = route?.errors?.[response.status] ?? errorText;
|
|
200
|
+
switch (response.status) {
|
|
201
|
+
case 400: throw new BadRequestError(errorMessage);
|
|
202
|
+
case 401: throw new UnauthorizedError(errorMessage);
|
|
203
|
+
case 403: throw new ForbiddenError(errorMessage);
|
|
204
|
+
case 404: throw new NotFoundError(errorMessage);
|
|
205
|
+
case 405: throw new MethodNotAllowedError(errorMessage);
|
|
206
|
+
case 409: throw new ConflictError(errorMessage);
|
|
207
|
+
case 422: throw new UnprocessableContentError(errorMessage);
|
|
208
|
+
case 429: throw new TooManyRequestsError(errorMessage);
|
|
209
|
+
case 500: throw new InternalServerError(errorMessage);
|
|
210
|
+
default: throw new Error(`Twist API error (${response.status}): ${errorText}`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const text = await response.text();
|
|
214
|
+
if (!text)
|
|
215
|
+
return {};
|
|
216
|
+
return JSON.parse(text);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=twist-api.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twist-api.service.js","sourceRoot":"","sources":["../../src/twist-api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAGlN,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,aAAa,EAAE,cAAc;IAC7B,gBAAgB,EAAE,sCAAsC;IACxD,QAAQ,EAAE,kCAAkC;IAC5C,MAAM,EAAE,CAAC,MAAM,EAAC,OAAO,CAAC;CACzB,CAAA;AAED,MAAM,MAAM,GAA4G;IACtH,oBAAoB,EAAE;QACpB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;KACd;IACD,uBAAuB,EAAE;QACvB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE;YACP,IAAI;SACL;QACD,SAAS,EAAE,EAAE;KACd;IACD,sBAAsB,EAAE;QACtB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE;YACP,IAAI;SACL;QACD,SAAS,EAAE,EAAE;KACd;IACD,mBAAmB,EAAE;QACnB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE;YACP,cAAc;SACf;QACD,SAAS,EAAE,EAAE;KACd;IACD,uBAAuB,EAAE;QACvB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;KACd;IACD,wBAAwB,EAAE;QACxB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE;YACP,IAAI;SACL;QACD,SAAS,EAAE,EAAE;KACd;IACD,0BAA0B,EAAE;QAC1B,MAAM,EAAE,EAAE;QACV,OAAO,EAAE;YACP,IAAI;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Q,CAAC,MAAM,MAAM,SAAS,EAAE,CAAC,CAAA;YAChF,CAAC;QACH,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;QAClC,IAAI,CAAC,IAAI;YAAE,OAAO,EAAO,CAAA;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAA;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const twistTokenSchema: z.ZodObject<{
|
|
3
|
+
accessToken: z.ZodString;
|
|
4
|
+
refreshToken: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const twistOAuthAppSchema: z.ZodObject<{
|
|
7
|
+
clientId: z.ZodString;
|
|
8
|
+
clientSecret: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
//# sourceMappingURL=twist.credential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twist.credential.d.ts","sourceRoot":"","sources":["../../src/twist.credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { wireCredential } from '@pikku/core/credential';
|
|
3
|
+
import { wireSecret } from '@pikku/core/secret';
|
|
4
|
+
export const twistTokenSchema = z.object({
|
|
5
|
+
accessToken: z.string(),
|
|
6
|
+
refreshToken: z.string().optional(),
|
|
7
|
+
});
|
|
8
|
+
export const twistOAuthAppSchema = z.object({
|
|
9
|
+
clientId: z.string().describe('OAuth2 app client ID'),
|
|
10
|
+
clientSecret: z.string().describe('OAuth2 app client secret'),
|
|
11
|
+
});
|
|
12
|
+
wireCredential({
|
|
13
|
+
name: 'twist',
|
|
14
|
+
displayName: 'Twist',
|
|
15
|
+
description: 'Consume the Twist team messaging API',
|
|
16
|
+
type: 'wire',
|
|
17
|
+
schema: twistTokenSchema,
|
|
18
|
+
oauth2: {
|
|
19
|
+
appCredentialSecretId: 'TWIST_OAUTH_APP',
|
|
20
|
+
tokenSecretId: 'TWIST_OAUTH_TOKENS',
|
|
21
|
+
authorizationUrl: 'https://example.com/oauth2/authorize',
|
|
22
|
+
tokenUrl: 'https://example.com/oauth2/token',
|
|
23
|
+
scopes: ['read', 'write'],
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
wireSecret({
|
|
27
|
+
name: 'twistOAuthApp',
|
|
28
|
+
displayName: 'Twist OAuth App',
|
|
29
|
+
description: 'OAuth2 app credentials for Twist',
|
|
30
|
+
secretId: 'TWIST_OAUTH_APP',
|
|
31
|
+
schema: twistOAuthAppSchema,
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=twist.credential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twist.credential.js","sourceRoot":"","sources":["../../src/twist.credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IACrD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;CAC9D,CAAC,CAAA;AAEF,cAAc,CAAC;IACb,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,sCAAsC;IACnD,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE;QACN,qBAAqB,EAAE,iBAAiB;QACxC,aAAa,EAAE,oBAAoB;QACnC,gBAAgB,EAAE,sCAAsC;QACxD,QAAQ,EAAE,kCAAkC;QAC5C,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;KAC1B;CACF,CAAC,CAAA;AAEF,UAAU,CAAC;IACT,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,kCAAkC;IAC/C,QAAQ,EAAE,iBAAiB;IAC3B,MAAM,EAAE,mBAAmB;CAC5B,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twist.types.d.ts","sourceRoot":"","sources":["../../src/twist.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,mBAAmB;;;iBAI9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twist.types.js","sourceRoot":"","sources":["../../src/twist.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,mCAAmC;AAEnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,mCAAmC;CACpC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twist.variable.d.ts","sourceRoot":"","sources":["../../src/twist.variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,kBAAkB;;GAAmF,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { wireVariable } from '@pikku/core/variable';
|
|
3
|
+
export const twistBaseUrlSchema = z.enum(["https://api.twist.com/api/v3"]).default("https://api.twist.com/api/v3");
|
|
4
|
+
wireVariable({
|
|
5
|
+
name: 'TWIST_BASE_URL',
|
|
6
|
+
displayName: 'Twist Base URL',
|
|
7
|
+
description: 'The base URL for the Twist API.',
|
|
8
|
+
variableId: 'TWIST_BASE_URL',
|
|
9
|
+
schema: twistBaseUrlSchema,
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=twist.variable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twist.variable.js","sourceRoot":"","sources":["../../src/twist.variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAA;AAElH,YAAY,CAAC;IACX,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,iCAAiC;IAC9C,UAAU,EAAE,gBAAgB;IAC5B,MAAM,EAAE,kBAAkB;CAC3B,CAAC,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pikku/addon-twist",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"imports": {
|
|
6
|
+
"#pikku": "./.pikku/pikku-types.gen.ts",
|
|
7
|
+
"#pikku/*": "./.pikku/*"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/src/index.d.ts",
|
|
12
|
+
"import": "./dist/src/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./.pikku/*": "./dist/.pikku/*",
|
|
15
|
+
"./.pikku/pikku-metadata.gen.json": "./dist/.pikku/pikku-metadata.gen.json",
|
|
16
|
+
"./.pikku/rpc/pikku-rpc-wirings-map.internal.gen.js": {
|
|
17
|
+
"types": "./dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"prepublishOnly": "yarn build",
|
|
25
|
+
"prebuild": "pikku all",
|
|
26
|
+
"build": "tsc && cp -r .pikku dist/",
|
|
27
|
+
"pikku": "pikku all"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@pikku/core": "*",
|
|
31
|
+
"zod": "^4"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@pikku/cli": "*",
|
|
35
|
+
"@pikku/core": "*",
|
|
36
|
+
"typescript": "^5.7.2",
|
|
37
|
+
"zod": "^4"
|
|
38
|
+
}
|
|
39
|
+
}
|