@zapier/zapier-sdk 0.65.0 → 0.68.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 +48 -0
- package/README.md +64 -34
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +2 -0
- package/dist/api/debug.d.ts.map +1 -1
- package/dist/api/debug.js +6 -4
- package/dist/api/polling.d.ts +2 -0
- package/dist/api/polling.d.ts.map +1 -1
- package/dist/api/polling.js +10 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +8 -5
- package/dist/core-stack.d.ts +24 -0
- package/dist/core-stack.d.ts.map +1 -0
- package/dist/core-stack.js +32 -0
- package/dist/experimental.cjs +1598 -1323
- package/dist/experimental.d.mts +3476 -224
- package/dist/experimental.d.ts +3508 -256
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +117 -87
- package/dist/experimental.mjs +1585 -1322
- package/dist/formatters/action.d.ts +4 -0
- package/dist/formatters/action.d.ts.map +1 -0
- package/dist/formatters/action.js +18 -0
- package/dist/formatters/actionResult.d.ts +3 -0
- package/dist/formatters/actionResult.d.ts.map +1 -0
- package/dist/formatters/actionResult.js +25 -0
- package/dist/formatters/app.d.ts +4 -0
- package/dist/formatters/app.d.ts.map +1 -0
- package/dist/formatters/app.js +10 -0
- package/dist/formatters/clientCredentials.d.ts +5 -0
- package/dist/formatters/clientCredentials.d.ts.map +1 -0
- package/dist/formatters/clientCredentials.js +27 -0
- package/dist/formatters/connection.d.ts +4 -0
- package/dist/formatters/connection.d.ts.map +1 -0
- package/dist/formatters/connection.js +26 -0
- package/dist/formatters/field.d.ts +4 -0
- package/dist/formatters/field.d.ts.map +1 -0
- package/dist/formatters/field.js +51 -0
- package/dist/formatters/inputFieldChoice.d.ts +4 -0
- package/dist/formatters/inputFieldChoice.d.ts.map +1 -0
- package/dist/formatters/inputFieldChoice.js +16 -0
- package/dist/formatters/tableField.d.ts +4 -0
- package/dist/formatters/tableField.d.ts.map +1 -0
- package/dist/formatters/tableField.js +7 -0
- package/dist/formatters/tableRecord.d.ts +5 -3
- package/dist/formatters/tableRecord.d.ts.map +1 -1
- package/dist/formatters/tableRecord.js +4 -3
- package/dist/formatters/triggerInbox.d.ts +4 -0
- package/dist/formatters/triggerInbox.d.ts.map +1 -0
- package/dist/formatters/triggerInbox.js +31 -0
- package/dist/formatters/triggerMessage.d.ts +5 -0
- package/dist/formatters/triggerMessage.d.ts.map +1 -0
- package/dist/formatters/triggerMessage.js +34 -0
- package/dist/formatters/userProfile.d.ts +4 -0
- package/dist/formatters/userProfile.d.ts.map +1 -0
- package/dist/formatters/userProfile.js +19 -0
- package/dist/{index-JhNxS_mq.d.mts → index-oRnHsPn5.d.mts} +12906 -7603
- package/dist/{index-JhNxS_mq.d.ts → index-oRnHsPn5.d.ts} +12906 -7603
- package/dist/index.cjs +1729 -1469
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +12 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -7
- package/dist/index.mjs +1716 -1468
- package/dist/plugins/api/index.d.ts +1 -1
- package/dist/plugins/api/index.js +1 -1
- package/dist/plugins/apps/index.d.ts +8 -5
- package/dist/plugins/apps/index.d.ts.map +1 -1
- package/dist/plugins/apps/index.js +1 -1
- package/dist/plugins/capabilities/index.d.ts +1 -1
- package/dist/plugins/capabilities/index.js +1 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts +32 -2
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.js +1 -1
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts +2 -2
- package/dist/plugins/codeSubstrate/createWorkflow/index.js +1 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts +27 -2
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +1 -1
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts +27 -2
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/disableWorkflow/index.js +1 -1
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts +27 -2
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/enableWorkflow/index.js +1 -1
- package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +32 -2
- package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getDurableRun/index.js +1 -1
- package/dist/plugins/codeSubstrate/getTriggerRun/index.d.ts +2 -2
- package/dist/plugins/codeSubstrate/getTriggerRun/index.js +1 -1
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts +27 -2
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getWorkflow/index.js +1 -1
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts +55 -2
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.js +1 -1
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts +51 -2
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.js +1 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts +3 -3
- package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/index.js +1 -1
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts +28 -3
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.js +1 -1
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts +28 -3
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.js +1 -1
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts +3 -3
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listWorkflows/index.js +2 -3
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +27 -2
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.js +1 -1
- package/dist/plugins/codeSubstrate/runDurable/index.d.ts +2 -2
- package/dist/plugins/codeSubstrate/runDurable/index.js +1 -1
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts +73 -0
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.js +52 -0
- package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts +16 -0
- package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.js +31 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts +27 -2
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/updateWorkflow/index.js +1 -1
- package/dist/plugins/connections/index.d.ts +1 -1
- package/dist/plugins/connections/index.js +1 -1
- package/dist/plugins/createClientCredentials/index.d.ts +2 -2
- package/dist/plugins/createClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/createClientCredentials/index.js +4 -2
- package/dist/plugins/createClientCredentials/schemas.d.ts +1 -2
- package/dist/plugins/createClientCredentials/schemas.d.ts.map +1 -1
- package/dist/plugins/deleteClientCredentials/index.d.ts +24 -2
- package/dist/plugins/deleteClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/deleteClientCredentials/index.js +2 -2
- package/dist/plugins/deleteClientCredentials/schemas.d.ts +1 -2
- package/dist/plugins/deleteClientCredentials/schemas.d.ts.map +1 -1
- package/dist/plugins/deprecated/authentications.d.ts +144 -16
- package/dist/plugins/deprecated/authentications.d.ts.map +1 -1
- package/dist/plugins/deprecated/authentications.js +14 -5
- package/dist/plugins/deprecated/inputFields.d.ts +58 -23
- package/dist/plugins/deprecated/inputFields.d.ts.map +1 -1
- package/dist/plugins/deprecated/inputFields.js +15 -7
- package/dist/plugins/eventEmission/event-emission-hook.d.ts +10 -0
- package/dist/plugins/eventEmission/event-emission-hook.d.ts.map +1 -0
- package/dist/plugins/eventEmission/event-emission-hook.js +47 -0
- package/dist/plugins/eventEmission/index.d.ts +5 -3
- package/dist/plugins/eventEmission/index.d.ts.map +1 -1
- package/dist/plugins/eventEmission/index.js +16 -9
- package/dist/plugins/eventEmission/method-metadata.d.ts +16 -0
- package/dist/plugins/eventEmission/method-metadata.d.ts.map +1 -0
- package/dist/plugins/eventEmission/method-metadata.js +20 -0
- package/dist/plugins/eventEmission/transport.d.ts.map +1 -1
- package/dist/plugins/eventEmission/transport.js +2 -1
- package/dist/plugins/eventEmission/types.d.ts +1 -1
- package/dist/plugins/eventEmission/types.d.ts.map +1 -1
- package/dist/plugins/fetch/index.d.ts +11 -5
- package/dist/plugins/fetch/index.d.ts.map +1 -1
- package/dist/plugins/fetch/index.js +42 -32
- package/dist/plugins/fetch/schemas.d.ts +1 -1
- package/dist/plugins/findFirstConnection/index.d.ts +4 -4
- package/dist/plugins/findFirstConnection/index.d.ts.map +1 -1
- package/dist/plugins/findFirstConnection/index.js +4 -2
- package/dist/plugins/findFirstConnection/schemas.d.ts +2 -2
- package/dist/plugins/findUniqueConnection/index.d.ts +4 -4
- package/dist/plugins/findUniqueConnection/index.d.ts.map +1 -1
- package/dist/plugins/findUniqueConnection/index.js +4 -2
- package/dist/plugins/findUniqueConnection/schemas.d.ts +2 -2
- package/dist/plugins/getAction/index.d.ts +141 -4
- package/dist/plugins/getAction/index.d.ts.map +1 -1
- package/dist/plugins/getAction/index.js +5 -3
- package/dist/plugins/getAction/schemas.d.ts +6 -6
- package/dist/plugins/getActionInputFieldsSchema/index.d.ts +232 -3
- package/dist/plugins/getActionInputFieldsSchema/index.d.ts.map +1 -1
- package/dist/plugins/getActionInputFieldsSchema/index.js +3 -3
- package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts +6 -6
- package/dist/plugins/getApp/index.d.ts +4 -4
- package/dist/plugins/getApp/index.d.ts.map +1 -1
- package/dist/plugins/getApp/index.js +3 -1
- package/dist/plugins/getApp/schemas.d.ts +4 -4
- package/dist/plugins/getConnection/index.d.ts +125 -2
- package/dist/plugins/getConnection/index.d.ts.map +1 -1
- package/dist/plugins/getConnection/index.js +4 -2
- package/dist/plugins/getProfile/index.d.ts +2 -2
- package/dist/plugins/getProfile/index.d.ts.map +1 -1
- package/dist/plugins/getProfile/index.js +4 -2
- package/dist/plugins/getProfile/schemas.d.ts +1 -2
- package/dist/plugins/getProfile/schemas.d.ts.map +1 -1
- package/dist/plugins/listActionInputFieldChoices/index.d.ts +287 -4
- package/dist/plugins/listActionInputFieldChoices/index.d.ts.map +1 -1
- package/dist/plugins/listActionInputFieldChoices/index.js +6 -4
- package/dist/plugins/listActionInputFieldChoices/schemas.d.ts +8 -8
- package/dist/plugins/listActionInputFieldChoices/schemas.d.ts.map +1 -1
- package/dist/plugins/listActionInputFieldChoices/schemas.js +1 -22
- package/dist/plugins/listActionInputFields/index.d.ts +168 -5
- package/dist/plugins/listActionInputFields/index.d.ts.map +1 -1
- package/dist/plugins/listActionInputFields/index.js +7 -5
- package/dist/plugins/listActionInputFields/schemas.d.ts +6 -6
- package/dist/plugins/listActions/index.d.ts +140 -3
- package/dist/plugins/listActions/index.d.ts.map +1 -1
- package/dist/plugins/listActions/index.js +6 -4
- package/dist/plugins/listActions/schemas.d.ts +4 -4
- package/dist/plugins/listApps/index.d.ts +3 -3
- package/dist/plugins/listApps/index.d.ts.map +1 -1
- package/dist/plugins/listApps/index.js +6 -4
- package/dist/plugins/listClientCredentials/index.d.ts +3 -3
- package/dist/plugins/listClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/listClientCredentials/index.js +6 -4
- package/dist/plugins/listConnections/index.d.ts +140 -3
- package/dist/plugins/listConnections/index.d.ts.map +1 -1
- package/dist/plugins/listConnections/index.js +7 -5
- package/dist/plugins/listConnections/schemas.d.ts +2 -2
- package/dist/plugins/manifest/index.d.ts +1 -1
- package/dist/plugins/manifest/index.d.ts.map +1 -1
- package/dist/plugins/manifest/index.js +6 -4
- package/dist/plugins/registry/index.d.ts +1 -1
- package/dist/plugins/registry/index.js +1 -1
- package/dist/plugins/request/index.d.ts +8 -5
- package/dist/plugins/request/index.d.ts.map +1 -1
- package/dist/plugins/request/index.js +4 -3
- package/dist/plugins/request/schemas.d.ts +2 -2
- package/dist/plugins/runAction/index.d.ts +168 -5
- package/dist/plugins/runAction/index.d.ts.map +1 -1
- package/dist/plugins/runAction/index.js +9 -5
- package/dist/plugins/runAction/schemas.d.ts +6 -6
- package/dist/plugins/tables/createTable/index.d.ts +2 -2
- package/dist/plugins/tables/createTable/index.js +2 -2
- package/dist/plugins/tables/createTable/schemas.d.ts +1 -2
- package/dist/plugins/tables/createTable/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/createTableFields/index.d.ts +34 -2
- package/dist/plugins/tables/createTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableFields/index.js +4 -2
- package/dist/plugins/tables/createTableFields/schemas.d.ts +3 -4
- package/dist/plugins/tables/createTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/index.d.ts +63 -2
- package/dist/plugins/tables/createTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/index.js +2 -2
- package/dist/plugins/tables/createTableRecords/schemas.d.ts +3 -4
- package/dist/plugins/tables/createTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTable/index.d.ts +34 -2
- package/dist/plugins/tables/deleteTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTable/index.js +2 -2
- package/dist/plugins/tables/deleteTable/schemas.d.ts +3 -4
- package/dist/plugins/tables/deleteTable/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableFields/index.d.ts +63 -2
- package/dist/plugins/tables/deleteTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableFields/index.js +2 -2
- package/dist/plugins/tables/deleteTableFields/schemas.d.ts +4 -5
- package/dist/plugins/tables/deleteTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableRecords/index.d.ts +84 -2
- package/dist/plugins/tables/deleteTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableRecords/index.js +2 -2
- package/dist/plugins/tables/deleteTableRecords/schemas.d.ts +4 -5
- package/dist/plugins/tables/deleteTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/getTable/index.d.ts +34 -2
- package/dist/plugins/tables/getTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/getTable/index.js +2 -2
- package/dist/plugins/tables/getTable/schemas.d.ts +2 -2
- package/dist/plugins/tables/getTableRecord/index.d.ts +84 -2
- package/dist/plugins/tables/getTableRecord/index.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/index.js +2 -2
- package/dist/plugins/tables/getTableRecord/schemas.d.ts +6 -7
- package/dist/plugins/tables/getTableRecord/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/schemas.js +1 -10
- package/dist/plugins/tables/listTableFields/index.d.ts +34 -2
- package/dist/plugins/tables/listTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableFields/index.js +4 -2
- package/dist/plugins/tables/listTableFields/schemas.d.ts +4 -5
- package/dist/plugins/tables/listTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTableFields/schemas.js +1 -9
- package/dist/plugins/tables/listTableRecords/index.d.ts +65 -4
- package/dist/plugins/tables/listTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableRecords/index.js +3 -3
- package/dist/plugins/tables/listTableRecords/schemas.d.ts +2 -2
- package/dist/plugins/tables/listTables/index.d.ts +3 -3
- package/dist/plugins/tables/listTables/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTables/index.js +4 -4
- package/dist/plugins/tables/updateTableRecords/index.d.ts +63 -2
- package/dist/plugins/tables/updateTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/updateTableRecords/index.js +2 -2
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts +3 -4
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts +59 -2
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts.map +1 -1
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.js +1 -1
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts +1 -1
- package/dist/plugins/triggers/createTriggerInbox/index.d.ts +231 -2
- package/dist/plugins/triggers/createTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/createTriggerInbox/index.js +3 -1
- package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts +3 -4
- package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts.map +1 -1
- package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts +33 -2
- package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/deleteTriggerInbox/index.js +3 -1
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts +2 -3
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts.map +1 -1
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +68 -6
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/drainTriggerInbox/index.js +1 -1
- package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts +2 -2
- package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts +231 -2
- package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/ensureTriggerInbox/index.js +3 -1
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts +3 -4
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts.map +1 -1
- package/dist/plugins/triggers/getTriggerInbox/index.d.ts +33 -2
- package/dist/plugins/triggers/getTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/getTriggerInbox/index.js +3 -1
- package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts +2 -3
- package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts.map +1 -1
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts +232 -3
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts.map +1 -1
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.js +1 -1
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts +2 -2
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts +33 -2
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts.map +1 -1
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.js +1 -1
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts +1 -1
- package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts +34 -3
- package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts.map +1 -1
- package/dist/plugins/triggers/listTriggerInboxMessages/index.js +5 -13
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts +1 -1
- package/dist/plugins/triggers/listTriggerInboxes/index.d.ts +3 -3
- package/dist/plugins/triggers/listTriggerInboxes/index.d.ts.map +1 -1
- package/dist/plugins/triggers/listTriggerInboxes/index.js +5 -14
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts +288 -5
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts.map +1 -1
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.js +7 -5
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts +3 -3
- package/dist/plugins/triggers/listTriggerInputFields/index.d.ts +234 -5
- package/dist/plugins/triggers/listTriggerInputFields/index.d.ts.map +1 -1
- package/dist/plugins/triggers/listTriggerInputFields/index.js +6 -5
- package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts +2 -2
- package/dist/plugins/triggers/listTriggers/index.d.ts +142 -5
- package/dist/plugins/triggers/listTriggers/index.d.ts.map +1 -1
- package/dist/plugins/triggers/listTriggers/index.js +6 -5
- package/dist/plugins/triggers/listTriggers/schemas.d.ts +1 -1
- package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts +33 -2
- package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/pauseTriggerInbox/index.js +3 -1
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts +2 -3
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts.map +1 -1
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts +59 -2
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts.map +1 -1
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.js +1 -1
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts +1 -1
- package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts +33 -2
- package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/resumeTriggerInbox/index.js +3 -1
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts +2 -3
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts.map +1 -1
- package/dist/plugins/triggers/updateTriggerInbox/index.d.ts +33 -2
- package/dist/plugins/triggers/updateTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/updateTriggerInbox/index.js +3 -1
- package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts +2 -3
- package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts.map +1 -1
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +37 -6
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +1 -1
- package/dist/plugins/triggers/watchTriggerInbox/index.js +1 -1
- package/dist/resolvers/actionKey.d.ts +3 -2
- package/dist/resolvers/actionKey.d.ts.map +1 -1
- package/dist/resolvers/actionType.d.ts +7 -2
- package/dist/resolvers/actionType.d.ts.map +1 -1
- package/dist/resolvers/actionType.js +3 -0
- package/dist/resolvers/appKey.d.ts +10 -5
- package/dist/resolvers/appKey.d.ts.map +1 -1
- package/dist/resolvers/appKey.js +3 -0
- package/dist/resolvers/clientCredentialsName.d.ts +1 -1
- package/dist/resolvers/clientCredentialsName.d.ts.map +1 -1
- package/dist/resolvers/clientId.d.ts +3 -2
- package/dist/resolvers/clientId.d.ts.map +1 -1
- package/dist/resolvers/clientId.js +1 -1
- package/dist/resolvers/connectionId.d.ts +5 -2
- package/dist/resolvers/connectionId.d.ts.map +1 -1
- package/dist/resolvers/connectionId.js +1 -1
- package/dist/resolvers/durableRunId.d.ts +3 -2
- package/dist/resolvers/durableRunId.d.ts.map +1 -1
- package/dist/resolvers/durableRunId.js +3 -2
- package/dist/resolvers/inputFieldKey.d.ts +3 -2
- package/dist/resolvers/inputFieldKey.d.ts.map +1 -1
- package/dist/resolvers/inputFieldKey.js +1 -1
- package/dist/resolvers/tableFieldIds.d.ts +3 -2
- package/dist/resolvers/tableFieldIds.d.ts.map +1 -1
- package/dist/resolvers/tableFields.d.ts +2 -2
- package/dist/resolvers/tableFields.d.ts.map +1 -1
- package/dist/resolvers/tableFilters.d.ts +3 -2
- package/dist/resolvers/tableFilters.d.ts.map +1 -1
- package/dist/resolvers/tableId.d.ts +3 -2
- package/dist/resolvers/tableId.d.ts.map +1 -1
- package/dist/resolvers/tableId.js +1 -1
- package/dist/resolvers/tableName.d.ts +1 -1
- package/dist/resolvers/tableName.d.ts.map +1 -1
- package/dist/resolvers/tableRecordId.d.ts +4 -3
- package/dist/resolvers/tableRecordId.d.ts.map +1 -1
- package/dist/resolvers/tableRecords.d.ts +4 -3
- package/dist/resolvers/tableRecords.d.ts.map +1 -1
- package/dist/resolvers/tableSort.d.ts +3 -2
- package/dist/resolvers/tableSort.d.ts.map +1 -1
- package/dist/resolvers/triggerInbox.d.ts +3 -2
- package/dist/resolvers/triggerInbox.d.ts.map +1 -1
- package/dist/resolvers/triggerInbox.js +1 -1
- package/dist/resolvers/triggerMessages.d.ts +3 -2
- package/dist/resolvers/triggerMessages.d.ts.map +1 -1
- package/dist/resolvers/triggerMessages.js +2 -4
- package/dist/resolvers/workflowId.d.ts +3 -2
- package/dist/resolvers/workflowId.d.ts.map +1 -1
- package/dist/resolvers/workflowId.js +3 -2
- package/dist/resolvers/workflowRunId.d.ts +3 -2
- package/dist/resolvers/workflowRunId.d.ts.map +1 -1
- package/dist/resolvers/workflowRunId.js +5 -5
- package/dist/resolvers/workflowVersionId.d.ts +3 -2
- package/dist/resolvers/workflowVersionId.d.ts.map +1 -1
- package/dist/resolvers/workflowVersionId.js +7 -7
- package/dist/schemas/Action.d.ts.map +1 -1
- package/dist/schemas/Action.js +6 -30
- package/dist/schemas/App.d.ts +0 -1
- package/dist/schemas/App.d.ts.map +1 -1
- package/dist/schemas/App.js +2 -14
- package/dist/schemas/ClientCredentials.d.ts.map +1 -1
- package/dist/schemas/ClientCredentials.js +3 -41
- package/dist/schemas/Connection.d.ts.map +1 -1
- package/dist/schemas/Connection.js +2 -28
- package/dist/schemas/Field.d.ts.map +1 -1
- package/dist/schemas/Field.js +3 -70
- package/dist/schemas/Run.d.ts.map +1 -1
- package/dist/schemas/Run.js +3 -29
- package/dist/schemas/TriggerInbox.d.ts.map +1 -1
- package/dist/schemas/TriggerInbox.js +1 -33
- package/dist/schemas/TriggerMessage.d.ts.map +1 -1
- package/dist/schemas/TriggerMessage.js +2 -60
- package/dist/schemas/UserProfile.d.ts +0 -1
- package/dist/schemas/UserProfile.d.ts.map +1 -1
- package/dist/schemas/UserProfile.js +1 -20
- package/dist/sdk.d.ts +2761 -441
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +93 -129
- package/dist/types/errors.d.ts +44 -42
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +79 -33
- package/dist/types/functions.d.ts +1 -41
- package/dist/types/functions.d.ts.map +1 -1
- package/dist/types/properties.d.ts +7 -7
- package/dist/types/properties.js +1 -1
- package/dist/types/sdk.d.ts +1 -1
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/telemetry-events.d.ts +1 -1
- package/dist/types/telemetry-events.d.ts.map +1 -1
- package/dist/utils/domain-utils.js +1 -1
- package/dist/utils/logging.d.ts +1 -12
- package/dist/utils/logging.d.ts.map +1 -1
- package/dist/utils/logging.js +2 -20
- package/dist/utils/pagination.d.ts +38 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/pagination.js +53 -0
- package/package.json +3 -2
- package/dist/registry.d.ts +0 -9
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -103
- package/dist/types/meta.d.ts +0 -9
- package/dist/types/meta.d.ts.map +0 -1
- package/dist/types/meta.js +0 -3
- package/dist/types/plugin.d.ts +0 -84
- package/dist/types/plugin.d.ts.map +0 -1
- package/dist/types/plugin.js +0 -13
- package/dist/types/registry.d.ts +0 -54
- package/dist/types/registry.d.ts.map +0 -1
- package/dist/types/registry.js +0 -1
- package/dist/utils/function-utils.d.ts +0 -59
- package/dist/utils/function-utils.d.ts.map +0 -1
- package/dist/utils/function-utils.js +0 -245
- package/dist/utils/pagination-utils.d.ts +0 -73
- package/dist/utils/pagination-utils.d.ts.map +0 -1
- package/dist/utils/pagination-utils.js +0 -308
- package/dist/utils/plugin-utils.d.ts +0 -245
- package/dist/utils/plugin-utils.d.ts.map +0 -1
- package/dist/utils/plugin-utils.js +0 -234
- package/dist/utils/schema-utils.d.ts +0 -211
- 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/telemetry-context.d.ts +0 -15
- package/dist/utils/telemetry-context.d.ts.map +0 -1
- package/dist/utils/telemetry-context.js +0 -48
- 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 -60
- package/dist/utils/validation.d.ts +0 -4
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { definePlugin } from "
|
|
1
|
+
import { definePlugin } from "kitcore";
|
|
2
2
|
import { ZapierRelayError, ZapierTimeoutError } from "../../types/errors";
|
|
3
3
|
import { FetchUrlSchema, FetchInitSchema, FetchInitZapierFieldsSchema, } from "./schemas";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -6,11 +6,11 @@ import { resolveConnectionId } from "../../utils/domain-utils";
|
|
|
6
6
|
import { combineAbortSignals, createTimeoutAbortSignal, } from "../../utils/abort-utils";
|
|
7
7
|
import { isPlainObject } from "../../utils/type-guard-utils";
|
|
8
8
|
import { buildHttpRequestContext } from "@zapier/policy-context";
|
|
9
|
-
// fetch() doesn't
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
import {
|
|
13
|
-
import { createValidator } from "
|
|
9
|
+
// fetch() doesn't go through createPluginMethod (its signature is variadic,
|
|
10
|
+
// not single-options), so it enters its own method scope and fires
|
|
11
|
+
// onMethodStart / onMethodEnd hooks directly.
|
|
12
|
+
import { getCurrentDepth, runInMethodScope } from "kitcore";
|
|
13
|
+
import { createValidator } from "kitcore";
|
|
14
14
|
/**
|
|
15
15
|
* Transforms full URLs into Relay format: /relay/{domain}/{path}
|
|
16
16
|
*/
|
|
@@ -92,18 +92,31 @@ function buildAbortHandle({ maxTimeSeconds, callerSignal, }) {
|
|
|
92
92
|
const FetchInitSdkValidationSchema = z
|
|
93
93
|
.looseObject(FetchInitZapierFieldsSchema.shape)
|
|
94
94
|
.optional();
|
|
95
|
-
const validateFetchInit = createValidator(FetchInitSdkValidationSchema);
|
|
96
95
|
/**
|
|
97
96
|
* Fetch plugin, the primary way to make authenticated HTTP requests through Zapier's Relay service.
|
|
98
97
|
* Mirrors the native fetch(url, init?) signature with additional Zapier-specific options.
|
|
99
98
|
*/
|
|
100
99
|
export const fetchPlugin = definePlugin((sdk) => {
|
|
100
|
+
// Bind the validator to the head's `adaptError` so validation
|
|
101
|
+
// failures surface as `ZapierValidationError` rather than the
|
|
102
|
+
// neutral `CoreError` kitcore would otherwise fall back to.
|
|
103
|
+
const validateFetchInit = createValidator(FetchInitSdkValidationSchema, {
|
|
104
|
+
adaptError: sdk.context.core?.adaptError,
|
|
105
|
+
});
|
|
101
106
|
return {
|
|
102
107
|
fetch: async function fetch(url, init) {
|
|
103
|
-
return
|
|
108
|
+
return runInMethodScope(async () => {
|
|
104
109
|
const { api } = sdk.context;
|
|
110
|
+
const { onMethodStart, onMethodEnd } = sdk.context.hooks;
|
|
105
111
|
const startTime = Date.now();
|
|
106
|
-
const
|
|
112
|
+
const depth = getCurrentDepth();
|
|
113
|
+
const args = init === undefined ? [url] : [url, init];
|
|
114
|
+
onMethodStart?.({
|
|
115
|
+
methodName: "fetch",
|
|
116
|
+
args,
|
|
117
|
+
isPaginated: false,
|
|
118
|
+
depth,
|
|
119
|
+
});
|
|
107
120
|
try {
|
|
108
121
|
if (init) {
|
|
109
122
|
validateFetchInit(init);
|
|
@@ -167,17 +180,13 @@ export const fetchPlugin = definePlugin((sdk) => {
|
|
|
167
180
|
statusCode: result.status,
|
|
168
181
|
});
|
|
169
182
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
argument_count: init ? 2 : 1,
|
|
178
|
-
is_paginated: false,
|
|
179
|
-
});
|
|
180
|
-
}
|
|
183
|
+
onMethodEnd?.({
|
|
184
|
+
methodName: "fetch",
|
|
185
|
+
args,
|
|
186
|
+
isPaginated: false,
|
|
187
|
+
depth,
|
|
188
|
+
durationMs: Date.now() - startTime,
|
|
189
|
+
});
|
|
181
190
|
return result;
|
|
182
191
|
}
|
|
183
192
|
catch (error) {
|
|
@@ -192,17 +201,14 @@ export const fetchPlugin = definePlugin((sdk) => {
|
|
|
192
201
|
}
|
|
193
202
|
}
|
|
194
203
|
catch (error) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
is_paginated: false,
|
|
204
|
-
});
|
|
205
|
-
}
|
|
204
|
+
onMethodEnd?.({
|
|
205
|
+
methodName: "fetch",
|
|
206
|
+
args,
|
|
207
|
+
isPaginated: false,
|
|
208
|
+
depth,
|
|
209
|
+
durationMs: Date.now() - startTime,
|
|
210
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
211
|
+
});
|
|
206
212
|
throw error;
|
|
207
213
|
}
|
|
208
214
|
});
|
|
@@ -215,7 +221,11 @@ export const fetchPlugin = definePlugin((sdk) => {
|
|
|
215
221
|
"(OAuth tokens, API keys, etc.) into the outgoing request. " +
|
|
216
222
|
"Mirrors the native fetch(url, init?) signature with additional Zapier-specific options.",
|
|
217
223
|
packages: ["sdk", "cli", "mcp"],
|
|
218
|
-
|
|
224
|
+
// Auto-derive would produce "Http"/"Https" from the key alone;
|
|
225
|
+
// declare the title explicitly here so the registry renders
|
|
226
|
+
// "HTTP Request". Other plugins in this category use the bare
|
|
227
|
+
// string "http"; the object form wins regardless of order.
|
|
228
|
+
categories: [{ key: "http", title: "HTTP Request" }],
|
|
219
229
|
returnType: "Response",
|
|
220
230
|
inputParameters: [
|
|
221
231
|
{ name: "url", schema: FetchUrlSchema },
|
|
@@ -20,7 +20,7 @@ export declare const findFirstConnectionPlugin: (sdk: {
|
|
|
20
20
|
cursor?: string;
|
|
21
21
|
pageSize?: number;
|
|
22
22
|
maxItems?: number;
|
|
23
|
-
}) | undefined) => import("
|
|
23
|
+
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
24
24
|
date: string;
|
|
25
25
|
is_invite_only: boolean;
|
|
26
26
|
is_private: boolean;
|
|
@@ -52,14 +52,14 @@ export declare const findFirstConnectionPlugin: (sdk: {
|
|
|
52
52
|
} & {
|
|
53
53
|
context: {
|
|
54
54
|
meta: {
|
|
55
|
-
listConnections: import("
|
|
55
|
+
listConnections: import("kitcore").PluginMeta<unknown>;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
} & {
|
|
59
59
|
context: import("../eventEmission").EventEmissionContext;
|
|
60
60
|
} & {
|
|
61
61
|
context: {
|
|
62
|
-
meta: Record<string, import("
|
|
62
|
+
meta: Record<string, import("kitcore").PluginMeta>;
|
|
63
63
|
};
|
|
64
64
|
}) => {
|
|
65
65
|
findFirstConnection: (options?: {
|
|
@@ -107,7 +107,7 @@ export declare const findFirstConnectionPlugin: (sdk: {
|
|
|
107
107
|
} & {
|
|
108
108
|
context: {
|
|
109
109
|
meta: {
|
|
110
|
-
findFirstConnection: import("
|
|
110
|
+
findFirstConnection: import("kitcore").PluginMeta<unknown>;
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BrC,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,UAAU,CACxD,OAAO,yBAAyB,CACjC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { definePlugin } from "
|
|
2
|
-
import { createPluginMethod } from "
|
|
1
|
+
import { definePlugin } from "kitcore";
|
|
2
|
+
import { createPluginMethod } from "kitcore";
|
|
3
3
|
import { FindFirstConnectionSchema } from "./schemas";
|
|
4
4
|
import { ConnectionItemSchema } from "../../schemas/Connection";
|
|
5
|
+
import { connectionItemFormatter } from "../../formatters/connection";
|
|
5
6
|
import { ZapierResourceNotFoundError } from "../../types/errors";
|
|
6
7
|
export const findFirstConnectionPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
7
8
|
name: "findFirstConnection",
|
|
@@ -10,6 +11,7 @@ export const findFirstConnectionPlugin = definePlugin((sdk) => createPluginMetho
|
|
|
10
11
|
itemType: "Connection",
|
|
11
12
|
inputSchema: FindFirstConnectionSchema,
|
|
12
13
|
outputSchema: ConnectionItemSchema,
|
|
14
|
+
formatter: connectionItemFormatter,
|
|
13
15
|
handler: async ({ sdk, options = {} }) => {
|
|
14
16
|
const connectionsResponse = await sdk.listConnections({
|
|
15
17
|
...options,
|
|
@@ -4,10 +4,10 @@ export declare const FindFirstConnectionSchema: z.ZodObject<{
|
|
|
4
4
|
title: z.ZodOptional<z.ZodString>;
|
|
5
5
|
search: z.ZodOptional<z.ZodString>;
|
|
6
6
|
appKey: z.ZodOptional<z.ZodString & {
|
|
7
|
-
_def: z.core.$ZodStringDef & import("
|
|
7
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
8
8
|
}>;
|
|
9
9
|
app: z.ZodOptional<z.ZodString & {
|
|
10
|
-
_def: z.core.$ZodStringDef & import("
|
|
10
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
11
11
|
}>;
|
|
12
12
|
owner: z.ZodOptional<z.ZodString>;
|
|
13
13
|
account: z.ZodOptional<z.ZodString>;
|
|
@@ -20,7 +20,7 @@ export declare const findUniqueConnectionPlugin: (sdk: {
|
|
|
20
20
|
cursor?: string;
|
|
21
21
|
pageSize?: number;
|
|
22
22
|
maxItems?: number;
|
|
23
|
-
}) | undefined) => import("
|
|
23
|
+
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
24
24
|
date: string;
|
|
25
25
|
is_invite_only: boolean;
|
|
26
26
|
is_private: boolean;
|
|
@@ -52,14 +52,14 @@ export declare const findUniqueConnectionPlugin: (sdk: {
|
|
|
52
52
|
} & {
|
|
53
53
|
context: {
|
|
54
54
|
meta: {
|
|
55
|
-
listConnections: import("
|
|
55
|
+
listConnections: import("kitcore").PluginMeta<unknown>;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
} & {
|
|
59
59
|
context: import("../eventEmission").EventEmissionContext;
|
|
60
60
|
} & {
|
|
61
61
|
context: {
|
|
62
|
-
meta: Record<string, import("
|
|
62
|
+
meta: Record<string, import("kitcore").PluginMeta>;
|
|
63
63
|
};
|
|
64
64
|
}) => {
|
|
65
65
|
findUniqueConnection: (options?: {
|
|
@@ -107,7 +107,7 @@ export declare const findUniqueConnectionPlugin: (sdk: {
|
|
|
107
107
|
} & {
|
|
108
108
|
context: {
|
|
109
109
|
meta: {
|
|
110
|
-
findUniqueConnection: import("
|
|
110
|
+
findUniqueConnection: import("kitcore").PluginMeta<unknown>;
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCtC,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,UAAU,CACzD,OAAO,0BAA0B,CAClC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { definePlugin } from "
|
|
2
|
-
import { createPluginMethod } from "
|
|
1
|
+
import { definePlugin } from "kitcore";
|
|
2
|
+
import { createPluginMethod } from "kitcore";
|
|
3
3
|
import { FindUniqueConnectionSchema } from "./schemas";
|
|
4
4
|
import { ZapierResourceNotFoundError, ZapierValidationError, } from "../../types/errors";
|
|
5
5
|
import { ConnectionItemSchema } from "../../schemas/Connection";
|
|
6
|
+
import { connectionItemFormatter } from "../../formatters/connection";
|
|
6
7
|
export const findUniqueConnectionPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
7
8
|
name: "findUniqueConnection",
|
|
8
9
|
categories: ["connection"],
|
|
@@ -10,6 +11,7 @@ export const findUniqueConnectionPlugin = definePlugin((sdk) => createPluginMeth
|
|
|
10
11
|
itemType: "Connection",
|
|
11
12
|
inputSchema: FindUniqueConnectionSchema,
|
|
12
13
|
outputSchema: ConnectionItemSchema,
|
|
14
|
+
formatter: connectionItemFormatter,
|
|
13
15
|
handler: async ({ sdk, options = {} }) => {
|
|
14
16
|
const connectionsResponse = await sdk.listConnections({
|
|
15
17
|
...options,
|
|
@@ -4,10 +4,10 @@ export declare const FindUniqueConnectionSchema: z.ZodObject<{
|
|
|
4
4
|
title: z.ZodOptional<z.ZodString>;
|
|
5
5
|
search: z.ZodOptional<z.ZodString>;
|
|
6
6
|
appKey: z.ZodOptional<z.ZodString & {
|
|
7
|
-
_def: z.core.$ZodStringDef & import("
|
|
7
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
8
8
|
}>;
|
|
9
9
|
app: z.ZodOptional<z.ZodString & {
|
|
10
|
-
_def: z.core.$ZodStringDef & import("
|
|
10
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
11
11
|
}>;
|
|
12
12
|
owner: z.ZodOptional<z.ZodString>;
|
|
13
13
|
account: z.ZodOptional<z.ZodString>;
|
|
@@ -16,7 +16,7 @@ export declare const getActionPlugin: (sdk: {
|
|
|
16
16
|
cursor?: string;
|
|
17
17
|
pageSize?: number;
|
|
18
18
|
maxItems?: number;
|
|
19
|
-
}) | undefined) => import("
|
|
19
|
+
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
20
20
|
description: string;
|
|
21
21
|
key: string;
|
|
22
22
|
app_key: string;
|
|
@@ -31,7 +31,144 @@ export declare const getActionPlugin: (sdk: {
|
|
|
31
31
|
} & {
|
|
32
32
|
context: {
|
|
33
33
|
meta: {
|
|
34
|
-
listActions: import("
|
|
34
|
+
listActions: import("kitcore").PluginMeta<unknown>;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
} & {
|
|
38
|
+
getApp: (options?: {
|
|
39
|
+
app: string;
|
|
40
|
+
} | {
|
|
41
|
+
appKey: string;
|
|
42
|
+
} | undefined) => Promise<{
|
|
43
|
+
data: {
|
|
44
|
+
slug: string;
|
|
45
|
+
title: string;
|
|
46
|
+
key: string;
|
|
47
|
+
implementation_id: string;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
is_hidden?: boolean | undefined;
|
|
50
|
+
auth_type?: string | undefined;
|
|
51
|
+
actions?: {
|
|
52
|
+
read?: number | undefined;
|
|
53
|
+
read_bulk?: number | undefined;
|
|
54
|
+
write?: number | undefined;
|
|
55
|
+
search?: number | undefined;
|
|
56
|
+
search_or_write?: number | undefined;
|
|
57
|
+
search_and_write?: number | undefined;
|
|
58
|
+
filter?: number | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
is_deprecated?: boolean | undefined;
|
|
61
|
+
is_beta?: boolean | undefined;
|
|
62
|
+
is_premium?: boolean | undefined;
|
|
63
|
+
age_in_days?: number | undefined;
|
|
64
|
+
banner?: string | undefined;
|
|
65
|
+
categories?: {
|
|
66
|
+
id: number;
|
|
67
|
+
name: string;
|
|
68
|
+
slug: string;
|
|
69
|
+
}[] | undefined;
|
|
70
|
+
images?: {
|
|
71
|
+
url_16x16?: string | undefined;
|
|
72
|
+
url_32x32?: string | undefined;
|
|
73
|
+
url_64x64?: string | undefined;
|
|
74
|
+
url_128x128?: string | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
popularity?: number | undefined;
|
|
77
|
+
has_filters?: boolean | undefined;
|
|
78
|
+
has_reads?: boolean | undefined;
|
|
79
|
+
has_searches?: boolean | undefined;
|
|
80
|
+
has_searches_or_writes?: boolean | undefined;
|
|
81
|
+
has_upfront_fields?: boolean | undefined;
|
|
82
|
+
has_writes?: boolean | undefined;
|
|
83
|
+
is_built_in?: boolean | undefined;
|
|
84
|
+
is_featured?: boolean | undefined;
|
|
85
|
+
is_invite?: boolean | undefined;
|
|
86
|
+
is_public?: boolean | undefined;
|
|
87
|
+
is_upcoming?: boolean | undefined;
|
|
88
|
+
visibility?: string | undefined;
|
|
89
|
+
primary_color?: string | undefined;
|
|
90
|
+
secondary_color?: string | undefined;
|
|
91
|
+
classification?: string | undefined;
|
|
92
|
+
api_docs_url?: string | undefined;
|
|
93
|
+
image?: string | undefined;
|
|
94
|
+
version?: string | undefined;
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
} & {
|
|
98
|
+
context: {
|
|
99
|
+
meta: {
|
|
100
|
+
getApp: import("kitcore").PluginMeta<unknown>;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
} & {
|
|
104
|
+
listApps: (options?: ({
|
|
105
|
+
search?: string | undefined;
|
|
106
|
+
apps?: string[] | undefined;
|
|
107
|
+
appKeys?: string[] | undefined;
|
|
108
|
+
pageSize?: number | undefined;
|
|
109
|
+
maxItems?: number | undefined;
|
|
110
|
+
cursor?: string | undefined;
|
|
111
|
+
} & {
|
|
112
|
+
cursor?: string;
|
|
113
|
+
pageSize?: number;
|
|
114
|
+
maxItems?: number;
|
|
115
|
+
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
116
|
+
slug: string;
|
|
117
|
+
title: string;
|
|
118
|
+
key: string;
|
|
119
|
+
implementation_id: string;
|
|
120
|
+
description?: string | undefined;
|
|
121
|
+
is_hidden?: boolean | undefined;
|
|
122
|
+
auth_type?: string | undefined;
|
|
123
|
+
actions?: {
|
|
124
|
+
read?: number | undefined;
|
|
125
|
+
read_bulk?: number | undefined;
|
|
126
|
+
write?: number | undefined;
|
|
127
|
+
search?: number | undefined;
|
|
128
|
+
search_or_write?: number | undefined;
|
|
129
|
+
search_and_write?: number | undefined;
|
|
130
|
+
filter?: number | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
is_deprecated?: boolean | undefined;
|
|
133
|
+
is_beta?: boolean | undefined;
|
|
134
|
+
is_premium?: boolean | undefined;
|
|
135
|
+
age_in_days?: number | undefined;
|
|
136
|
+
banner?: string | undefined;
|
|
137
|
+
categories?: {
|
|
138
|
+
id: number;
|
|
139
|
+
name: string;
|
|
140
|
+
slug: string;
|
|
141
|
+
}[] | undefined;
|
|
142
|
+
images?: {
|
|
143
|
+
url_16x16?: string | undefined;
|
|
144
|
+
url_32x32?: string | undefined;
|
|
145
|
+
url_64x64?: string | undefined;
|
|
146
|
+
url_128x128?: string | undefined;
|
|
147
|
+
} | undefined;
|
|
148
|
+
popularity?: number | undefined;
|
|
149
|
+
has_filters?: boolean | undefined;
|
|
150
|
+
has_reads?: boolean | undefined;
|
|
151
|
+
has_searches?: boolean | undefined;
|
|
152
|
+
has_searches_or_writes?: boolean | undefined;
|
|
153
|
+
has_upfront_fields?: boolean | undefined;
|
|
154
|
+
has_writes?: boolean | undefined;
|
|
155
|
+
is_built_in?: boolean | undefined;
|
|
156
|
+
is_featured?: boolean | undefined;
|
|
157
|
+
is_invite?: boolean | undefined;
|
|
158
|
+
is_public?: boolean | undefined;
|
|
159
|
+
is_upcoming?: boolean | undefined;
|
|
160
|
+
visibility?: string | undefined;
|
|
161
|
+
primary_color?: string | undefined;
|
|
162
|
+
secondary_color?: string | undefined;
|
|
163
|
+
classification?: string | undefined;
|
|
164
|
+
api_docs_url?: string | undefined;
|
|
165
|
+
image?: string | undefined;
|
|
166
|
+
version?: string | undefined;
|
|
167
|
+
}>;
|
|
168
|
+
} & {
|
|
169
|
+
context: {
|
|
170
|
+
meta: {
|
|
171
|
+
listApps: import("kitcore").PluginMeta<unknown>;
|
|
35
172
|
};
|
|
36
173
|
};
|
|
37
174
|
} & {
|
|
@@ -42,7 +179,7 @@ export declare const getActionPlugin: (sdk: {
|
|
|
42
179
|
context: import("../eventEmission").EventEmissionContext;
|
|
43
180
|
} & {
|
|
44
181
|
context: {
|
|
45
|
-
meta: Record<string, import("
|
|
182
|
+
meta: Record<string, import("kitcore").PluginMeta>;
|
|
46
183
|
};
|
|
47
184
|
}) => {
|
|
48
185
|
getAction: (options?: {
|
|
@@ -70,7 +207,7 @@ export declare const getActionPlugin: (sdk: {
|
|
|
70
207
|
} & {
|
|
71
208
|
context: {
|
|
72
209
|
meta: {
|
|
73
|
-
getAction: import("
|
|
210
|
+
getAction: import("kitcore").PluginMeta<unknown>;
|
|
74
211
|
};
|
|
75
212
|
};
|
|
76
213
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getAction/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getAction/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAsB3C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAHf;QAAE,GAAG,EAAE,SAAS,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8C9B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { definePlugin } from "
|
|
2
|
-
import { createPluginMethod } from "
|
|
1
|
+
import { definePlugin } from "kitcore";
|
|
2
|
+
import { createPluginMethod } from "kitcore";
|
|
3
3
|
import { GetActionInputSchema } from "./schemas";
|
|
4
4
|
import { ZapierResourceNotFoundError } from "../../types/errors";
|
|
5
5
|
import { appKeyResolver, actionTypeResolver, actionKeyResolver, } from "../../resolvers";
|
|
6
6
|
import { ActionItemSchema } from "../../schemas/Action";
|
|
7
|
-
import {
|
|
7
|
+
import { actionItemFormatter } from "../../formatters/action";
|
|
8
|
+
import { setMethodMetadata } from "../eventEmission/method-metadata";
|
|
8
9
|
export const getActionPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
9
10
|
name: "getAction",
|
|
10
11
|
categories: ["action"],
|
|
@@ -12,6 +13,7 @@ export const getActionPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
|
12
13
|
itemType: "Action",
|
|
13
14
|
inputSchema: GetActionInputSchema,
|
|
14
15
|
outputSchema: ActionItemSchema,
|
|
16
|
+
formatter: actionItemFormatter,
|
|
15
17
|
resolvers: {
|
|
16
18
|
app: appKeyResolver,
|
|
17
19
|
actionType: actionTypeResolver,
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import type { ActionItem } from "../../types/domain";
|
|
3
3
|
export declare const GetActionSchema: z.ZodObject<{
|
|
4
4
|
app: z.ZodString & {
|
|
5
|
-
_def: z.core.$ZodStringDef & import("
|
|
5
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
6
6
|
};
|
|
7
7
|
actionType: z.ZodEnum<{
|
|
8
8
|
filter: "filter";
|
|
@@ -15,12 +15,12 @@ export declare const GetActionSchema: z.ZodObject<{
|
|
|
15
15
|
search_or_write: "search_or_write";
|
|
16
16
|
}>;
|
|
17
17
|
action: z.ZodString & {
|
|
18
|
-
_def: z.core.$ZodStringDef & import("
|
|
18
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
19
19
|
};
|
|
20
20
|
}, z.core.$strip>;
|
|
21
21
|
declare const GetActionSchemaDeprecated: z.ZodObject<{
|
|
22
22
|
appKey: z.ZodString & {
|
|
23
|
-
_def: z.core.$ZodStringDef & import("
|
|
23
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
24
24
|
};
|
|
25
25
|
actionType: z.ZodEnum<{
|
|
26
26
|
filter: "filter";
|
|
@@ -36,7 +36,7 @@ declare const GetActionSchemaDeprecated: z.ZodObject<{
|
|
|
36
36
|
}, z.core.$strip>;
|
|
37
37
|
export declare const GetActionInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
38
38
|
app: z.ZodString & {
|
|
39
|
-
_def: z.core.$ZodStringDef & import("
|
|
39
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
40
40
|
};
|
|
41
41
|
actionType: z.ZodEnum<{
|
|
42
42
|
filter: "filter";
|
|
@@ -49,11 +49,11 @@ export declare const GetActionInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
49
49
|
search_or_write: "search_or_write";
|
|
50
50
|
}>;
|
|
51
51
|
action: z.ZodString & {
|
|
52
|
-
_def: z.core.$ZodStringDef & import("
|
|
52
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
53
53
|
};
|
|
54
54
|
}, z.core.$strip>, z.ZodObject<{
|
|
55
55
|
appKey: z.ZodString & {
|
|
56
|
-
_def: z.core.$ZodStringDef & import("
|
|
56
|
+
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
57
57
|
};
|
|
58
58
|
actionType: z.ZodEnum<{
|
|
59
59
|
filter: "filter";
|