@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
package/dist/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAyDlD,MAAM,WAAW,gBAAiB,SAAQ,cAAc;CAAG;AAE3D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB;;;;EAE5D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS;;;;;;;;;GAOxB;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAyHizK,CAAC;;;;sBAAiX,CAAC;qBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAV1wL;AASD,MAAM,WAAW,SAAU,SAAQ,UAAU,CAAC,OAAO,eAAe,CAAC;CAAG"}
|
package/dist/sdk.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { withDeprecatedAddPlugin } from "kitcore";
|
|
2
2
|
import { logDeprecation } from "./utils/logging";
|
|
3
|
+
import { createZapierCoreStack } from "./core-stack";
|
|
3
4
|
import { appsPlugin } from "./plugins/apps/index";
|
|
4
5
|
import { fetchPlugin } from "./plugins/fetch/index";
|
|
5
6
|
import { apiPlugin } from "./plugins/api/index";
|
|
@@ -45,86 +46,26 @@ import { eventEmissionPlugin } from "./plugins/eventEmission";
|
|
|
45
46
|
export function createOptionsPlugin(options) {
|
|
46
47
|
return () => ({ context: { options } });
|
|
47
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a pluggable SDK ready for chain-style extension via
|
|
51
|
+
* `.addPlugin(...)`. The returned SDK comes with kitcore's core plugin
|
|
52
|
+
* pre-installed (`zapierAdaptError` for branded validation/unknown errors;
|
|
53
|
+
* pagination shaping is per-method via each plugin's `adaptPage`).
|
|
54
|
+
*
|
|
55
|
+
* @deprecated The chain-style `createSdk().addPlugin(...).addPlugin(...)`
|
|
56
|
+
* pattern is going away. Build SDKs in one pass with
|
|
57
|
+
* `createPluginStack().use(...).toSdk()` instead — each `.toSdk()`
|
|
58
|
+
* produces fresh plugin closures, whereas the chain inherits closures
|
|
59
|
+
* from the prior step and shares state across derived SDKs. This entry
|
|
60
|
+
* point stays as a migration doorway for code written against the older
|
|
61
|
+
* chain pattern and will be removed once internal call sites finish
|
|
62
|
+
* migrating.
|
|
63
|
+
*/
|
|
48
64
|
export function createSdk() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
function buildSdk(properties, context) {
|
|
54
|
-
const frozenContext = Object.freeze(context);
|
|
55
|
-
const registryCache = new Map();
|
|
56
|
-
const sdk = {
|
|
57
|
-
...properties,
|
|
58
|
-
get context() {
|
|
59
|
-
return frozenContext;
|
|
60
|
-
},
|
|
61
|
-
getContext: () => frozenContext, // runtime compat shim, not in types
|
|
62
|
-
getRegistry(options) {
|
|
63
|
-
const cacheKey = options?.package ?? "__all__";
|
|
64
|
-
if (!registryCache.has(cacheKey)) {
|
|
65
|
-
registryCache.set(cacheKey, buildRegistry({
|
|
66
|
-
sdk: sdk,
|
|
67
|
-
meta: frozenContext.meta,
|
|
68
|
-
packageFilter: options?.package,
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
return registryCache.get(cacheKey);
|
|
72
|
-
},
|
|
73
|
-
addPlugin(plugin, options) {
|
|
74
|
-
const pluginResult = plugin({
|
|
75
|
-
...properties,
|
|
76
|
-
context: frozenContext,
|
|
77
|
-
});
|
|
78
|
-
const { context: pluginContext, ...pluginProperties } = pluginResult;
|
|
79
|
-
const { meta: pluginMeta, ...pluginContextRest } = pluginContext ?? {};
|
|
80
|
-
const existingProperties = properties;
|
|
81
|
-
const existingContext = context;
|
|
82
|
-
const existingMeta = context.meta ?? {};
|
|
83
|
-
// Detect collisions on the two shapes that matter: root-level
|
|
84
|
-
// methods and non-meta context fields. Meta entries don't need
|
|
85
|
-
// their own check — by convention a method comes with its meta,
|
|
86
|
-
// so a method-bearing meta collision is already caught by the
|
|
87
|
-
// root-key loop above. Pure meta-only overrides (e.g.
|
|
88
|
-
// cliOverridesPlugin tagging `meta.fetch.deprecated`) stay
|
|
89
|
-
// legitimate and last-win because their pluginProperties is
|
|
90
|
-
// empty, so no method collision fires.
|
|
91
|
-
//
|
|
92
|
-
// Callers that genuinely intend to wrap an existing method (e.g.,
|
|
93
|
-
// the CLI's drainTriggerInbox plugin replacing the SDK's same-named
|
|
94
|
-
// method with a flag-aware wrapper) opt in via `{ override: true }`.
|
|
95
|
-
// Plugin functions still execute against the pre-merge sdk, so
|
|
96
|
-
// wrappers can close over the original implementation.
|
|
97
|
-
const collisions = [];
|
|
98
|
-
for (const key of Object.keys(pluginProperties)) {
|
|
99
|
-
if (key in existingProperties)
|
|
100
|
-
collisions.push(`method "${key}"`);
|
|
101
|
-
}
|
|
102
|
-
for (const key of Object.keys(pluginContextRest)) {
|
|
103
|
-
if (key in existingContext)
|
|
104
|
-
collisions.push(`context.${key}`);
|
|
105
|
-
}
|
|
106
|
-
if (collisions.length > 0 && !options?.override) {
|
|
107
|
-
const name = plugin.name || "anonymous plugin";
|
|
108
|
-
console.warn(`[zapier-sdk] Skipping "${name}" — duplicate registration of: ${collisions.join(", ")}. ` +
|
|
109
|
-
`If the duplicate is intentional, pass { override: true } to addPlugin or wrap with composePlugins(...). ` +
|
|
110
|
-
`Otherwise rename the method or remove the duplicate.`);
|
|
111
|
-
// Whole-plugin skip: return the chain unchanged. The type
|
|
112
|
-
// assertion lies about the skipped contributions; getRegistry-based
|
|
113
|
-
// consumers (CLI, MCP) see an unchanged surface, and direct
|
|
114
|
-
// typed callers will see TypeError on the missing method (the
|
|
115
|
-
// upstream warn names the cause).
|
|
116
|
-
return buildSdk(properties, context);
|
|
117
|
-
}
|
|
118
|
-
const mergedProperties = { ...properties, ...pluginProperties };
|
|
119
|
-
const mergedContext = {
|
|
120
|
-
...context,
|
|
121
|
-
...pluginContextRest,
|
|
122
|
-
meta: { ...existingMeta, ...(pluginMeta ?? {}) },
|
|
123
|
-
};
|
|
124
|
-
return buildSdk(mergedProperties, mergedContext);
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
return sdk;
|
|
65
|
+
logDeprecation("createSdk() is deprecated. Build SDKs with createPluginStack().use(...).toSdk() instead. " +
|
|
66
|
+
"The chain pattern shares plugin closures (and their state) across derived SDKs in ways " +
|
|
67
|
+
"that are rarely what callers expect; stacks produce fresh closures per .toSdk() call.");
|
|
68
|
+
return withDeprecatedAddPlugin(createZapierCoreStack().toSdk());
|
|
128
69
|
}
|
|
129
70
|
/**
|
|
130
71
|
* @deprecated `getRegistry` is now built into every sdk, so the "without
|
|
@@ -135,67 +76,90 @@ export function createZapierSdkWithoutRegistry(options = {}) {
|
|
|
135
76
|
logDeprecation("createZapierSdkWithoutRegistry is deprecated; use createZapierSdk instead. getRegistry is now available on every sdk.");
|
|
136
77
|
return createZapierSdk(options);
|
|
137
78
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Build the unsealed `PluginStack` that `createZapierSdk` materializes
|
|
81
|
+
* into a sealed SDK. Exposed so downstream packages (`@zapier/zapier-sdk-cli`,
|
|
82
|
+
* `@zapier/zapier-sdk-mcp`, any future head built on top of this one)
|
|
83
|
+
* can layer additional plugins via `.use(...)` before sealing, instead
|
|
84
|
+
* of going through the deprecated `.addPlugin` chain.
|
|
85
|
+
*
|
|
86
|
+
* const sdk = createZapierSdkStack(options)
|
|
87
|
+
* .use(myExtensionPlugin)
|
|
88
|
+
* .use(cliOverridesPlugin, { override: true })
|
|
89
|
+
* .toSdk();
|
|
90
|
+
*/
|
|
91
|
+
export function createZapierSdkStack(options = {}) {
|
|
92
|
+
return (createZapierCoreStack()
|
|
93
|
+
.use(createOptionsPlugin(options))
|
|
141
94
|
// Event emission (must be first to be available to other plugins)
|
|
142
|
-
.
|
|
95
|
+
.use(eventEmissionPlugin)
|
|
143
96
|
// Provides the API client in context
|
|
144
|
-
.
|
|
97
|
+
.use(apiPlugin)
|
|
145
98
|
// Manifest plugin (provides version locking context) - must come after apiPlugin
|
|
146
|
-
.
|
|
99
|
+
.use(manifestPlugin)
|
|
147
100
|
// Capabilities gates (must come after manifestPlugin for config access)
|
|
148
|
-
.
|
|
101
|
+
.use(capabilitiesPlugin)
|
|
149
102
|
// Named connections resolution
|
|
150
|
-
.
|
|
151
|
-
// Apps
|
|
152
|
-
|
|
153
|
-
.
|
|
154
|
-
.
|
|
155
|
-
|
|
156
|
-
.
|
|
157
|
-
.
|
|
158
|
-
.
|
|
103
|
+
.use(connectionsPlugin)
|
|
104
|
+
// Apps first: many later plugins' resolvers prompt for an `app`
|
|
105
|
+
// parameter via `appKeyResolver`, which needs `getApp` + `listApps`.
|
|
106
|
+
.use(listAppsPlugin)
|
|
107
|
+
.use(getAppPlugin)
|
|
108
|
+
// Connections (needs apps; runAction below needs connections for its
|
|
109
|
+
// connection-id resolver).
|
|
110
|
+
.use(listConnectionsPlugin)
|
|
111
|
+
.use(getConnectionPlugin)
|
|
112
|
+
.use(findFirstConnectionPlugin)
|
|
113
|
+
.use(findUniqueConnectionPlugin)
|
|
114
|
+
// Actions / fields
|
|
115
|
+
.use(listActionsPlugin)
|
|
116
|
+
.use(getActionPlugin)
|
|
117
|
+
.use(listActionInputFieldsPlugin)
|
|
118
|
+
.use(getActionInputFieldsSchemaPlugin)
|
|
119
|
+
.use(listActionInputFieldChoicesPlugin)
|
|
159
120
|
// Deprecated aliases for the unprefixed names — delegate to the *Action*
|
|
160
121
|
// plugins above and stay hidden from generated docs / CLI help.
|
|
161
|
-
.
|
|
162
|
-
.
|
|
163
|
-
.
|
|
122
|
+
.use(listInputFieldsDeprecatedPlugin)
|
|
123
|
+
.use(getInputFieldsSchemaDeprecatedPlugin)
|
|
124
|
+
.use(listInputFieldChoicesDeprecatedPlugin)
|
|
164
125
|
// Run action
|
|
165
|
-
.
|
|
166
|
-
// Connections
|
|
167
|
-
.addPlugin(listConnectionsPlugin)
|
|
168
|
-
.addPlugin(getConnectionPlugin)
|
|
169
|
-
.addPlugin(findFirstConnectionPlugin)
|
|
170
|
-
.addPlugin(findUniqueConnectionPlugin)
|
|
126
|
+
.use(runActionPlugin)
|
|
171
127
|
// Deprecated authentication plugins (thin wrappers for backward compatibility)
|
|
172
|
-
.
|
|
173
|
-
.
|
|
174
|
-
.
|
|
175
|
-
.
|
|
128
|
+
.use(listAuthenticationsPlugin)
|
|
129
|
+
.use(getAuthenticationPlugin)
|
|
130
|
+
.use(findFirstAuthenticationPlugin)
|
|
131
|
+
.use(findUniqueAuthenticationPlugin)
|
|
176
132
|
// Client Credentials
|
|
177
|
-
.
|
|
178
|
-
.
|
|
179
|
-
.
|
|
133
|
+
.use(listClientCredentialsPlugin)
|
|
134
|
+
.use(createClientCredentialsPlugin)
|
|
135
|
+
.use(deleteClientCredentialsPlugin)
|
|
180
136
|
// Relay fetching — fetch is the primary HTTP plugin; request is a deprecated wrapper
|
|
181
|
-
.
|
|
182
|
-
.
|
|
137
|
+
.use(fetchPlugin)
|
|
138
|
+
.use(requestPlugin)
|
|
183
139
|
// Triggers (experimental — registered in src/experimental.ts only)
|
|
184
|
-
// Tables
|
|
185
|
-
.
|
|
186
|
-
.
|
|
187
|
-
.
|
|
188
|
-
.
|
|
189
|
-
.
|
|
190
|
-
.
|
|
191
|
-
.
|
|
192
|
-
.
|
|
193
|
-
.
|
|
194
|
-
.
|
|
195
|
-
.
|
|
196
|
-
.
|
|
140
|
+
// Tables. `list*` plugins are composed before their `get*` / mutation
|
|
141
|
+
// siblings because per-row resolvers need the listing methods.
|
|
142
|
+
.use(listTablesPlugin)
|
|
143
|
+
.use(getTablePlugin)
|
|
144
|
+
.use(deleteTablePlugin)
|
|
145
|
+
.use(createTablePlugin)
|
|
146
|
+
.use(listTableFieldsPlugin)
|
|
147
|
+
.use(createTableFieldsPlugin)
|
|
148
|
+
.use(deleteTableFieldsPlugin)
|
|
149
|
+
.use(listTableRecordsPlugin)
|
|
150
|
+
.use(getTableRecordPlugin)
|
|
151
|
+
.use(createTableRecordsPlugin)
|
|
152
|
+
.use(deleteTableRecordsPlugin)
|
|
153
|
+
.use(updateTableRecordsPlugin)
|
|
197
154
|
// Magic apps plugin
|
|
198
|
-
.
|
|
155
|
+
.use(appsPlugin)
|
|
199
156
|
// Profile
|
|
200
|
-
.
|
|
157
|
+
.use(getProfilePlugin));
|
|
158
|
+
}
|
|
159
|
+
export function createZapierSdk(options = {}) {
|
|
160
|
+
// Wrap the sealed sdk in withDeprecatedAddPlugin so the return type
|
|
161
|
+
// still carries `.addPlugin` for back-compat. The chain itself logs a
|
|
162
|
+
// deprecation warning on first call. Downstream packages should build
|
|
163
|
+
// off `createZapierSdkStack(options)` and add plugins via `.use(...)`.
|
|
164
|
+
return withDeprecatedAddPlugin(createZapierSdkStack(options).toSdk());
|
|
201
165
|
}
|
package/dist/types/errors.d.ts
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
export interface ApiError {
|
|
5
|
-
status: number;
|
|
6
|
-
code: string;
|
|
7
|
-
title: string;
|
|
8
|
-
detail: string;
|
|
9
|
-
source?: unknown;
|
|
10
|
-
meta?: unknown;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Base options for all error constructors
|
|
14
|
-
*/
|
|
1
|
+
import { CORE_ERROR_SYMBOL, type AdaptError, type ApiError } from "kitcore";
|
|
2
|
+
export type { ApiError } from "kitcore";
|
|
15
3
|
export interface ErrorOptions {
|
|
16
4
|
statusCode?: number;
|
|
17
5
|
errors?: ApiError[];
|
|
@@ -19,12 +7,16 @@ export interface ErrorOptions {
|
|
|
19
7
|
response?: unknown;
|
|
20
8
|
}
|
|
21
9
|
/**
|
|
22
|
-
* Base class for
|
|
23
|
-
*
|
|
10
|
+
* Base class for every Zapier-thrown error. Carries the core brand
|
|
11
|
+
* (`CORE_ERROR_SYMBOL`) so `isCoreError(err)` recognizes any
|
|
12
|
+
* `Zapier*` error as kitcore-originated, even when the SDK and kitcore
|
|
13
|
+
* are bundled separately. Subclasses override `name` and `code` per
|
|
14
|
+
* the existing `Zapier*` / `ZAPIER_*` convention.
|
|
24
15
|
*/
|
|
25
|
-
export declare
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
export declare class ZapierError extends Error {
|
|
17
|
+
readonly [CORE_ERROR_SYMBOL] = true;
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly code: string;
|
|
28
20
|
statusCode?: number;
|
|
29
21
|
errors?: ApiError[];
|
|
30
22
|
cause?: unknown;
|
|
@@ -32,26 +24,9 @@ export declare abstract class ZapierError extends Error {
|
|
|
32
24
|
constructor(message: string, options?: ErrorOptions);
|
|
33
25
|
}
|
|
34
26
|
/**
|
|
35
|
-
* Error thrown when
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
readonly name = "ZapierApiError";
|
|
39
|
-
readonly code: "ZAPIER_API_ERROR";
|
|
40
|
-
constructor(message: string, options?: ErrorOptions);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Error thrown when an app is not found
|
|
44
|
-
*/
|
|
45
|
-
export declare class ZapierAppNotFoundError extends ZapierError {
|
|
46
|
-
readonly name = "ZapierAppNotFoundError";
|
|
47
|
-
readonly code: "ZAPIER_APP_NOT_FOUND_ERROR";
|
|
48
|
-
appKey?: string;
|
|
49
|
-
constructor(message: string, options?: ErrorOptions & {
|
|
50
|
-
appKey?: string;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Error thrown when validation fails (e.g., invalid parameters)
|
|
27
|
+
* Error thrown when input validation fails (e.g., bad parameters).
|
|
28
|
+
* Constructed by kitcore's input-validation path via
|
|
29
|
+
* `zapierAdaptError`, and also by direct throws elsewhere in the SDK.
|
|
55
30
|
*/
|
|
56
31
|
export declare class ZapierValidationError extends ZapierError {
|
|
57
32
|
readonly name = "ZapierValidationError";
|
|
@@ -62,21 +37,48 @@ export declare class ZapierValidationError extends ZapierError {
|
|
|
62
37
|
});
|
|
63
38
|
}
|
|
64
39
|
/**
|
|
65
|
-
*
|
|
40
|
+
* Fallback for non-Error throws normalized by kitcore (`throw "oops"`,
|
|
41
|
+
* `throw { message: "X" }`, etc.). Real `Error` subclasses thrown by
|
|
42
|
+
* handlers bubble through unchanged and never become this.
|
|
66
43
|
*/
|
|
67
44
|
export declare class ZapierUnknownError extends ZapierError {
|
|
68
45
|
readonly name = "ZapierUnknownError";
|
|
69
46
|
readonly code: "ZAPIER_UNKNOWN_ERROR";
|
|
70
|
-
constructor(message: string, options?: ErrorOptions);
|
|
71
47
|
}
|
|
72
48
|
/**
|
|
73
|
-
* Error thrown for authentication and authorization failures (401/403)
|
|
49
|
+
* Error thrown for authentication and authorization failures (401/403).
|
|
74
50
|
*/
|
|
75
51
|
export declare class ZapierAuthenticationError extends ZapierError {
|
|
76
52
|
readonly name = "ZapierAuthenticationError";
|
|
77
53
|
readonly code: "ZAPIER_AUTHENTICATION_ERROR";
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Maps kitcore's abstract `CoreErrorCode` values onto Zapier's
|
|
57
|
+
* branded error classes. Wired into `createZapierSdk` via
|
|
58
|
+
* `createCorePlugin({ adaptError: zapierAdaptError })`, so
|
|
59
|
+
* every error kitcore constructs internally surfaces as the
|
|
60
|
+
* appropriate `Zapier*` subclass instead of a neutral `CoreError`.
|
|
61
|
+
*/
|
|
62
|
+
export declare const zapierAdaptError: AdaptError;
|
|
63
|
+
/**
|
|
64
|
+
* Error thrown when API requests fail
|
|
65
|
+
*/
|
|
66
|
+
export declare class ZapierApiError extends ZapierError {
|
|
67
|
+
readonly name = "ZapierApiError";
|
|
68
|
+
readonly code: "ZAPIER_API_ERROR";
|
|
78
69
|
constructor(message: string, options?: ErrorOptions);
|
|
79
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Error thrown when an app is not found
|
|
73
|
+
*/
|
|
74
|
+
export declare class ZapierAppNotFoundError extends ZapierError {
|
|
75
|
+
readonly name = "ZapierAppNotFoundError";
|
|
76
|
+
readonly code: "ZAPIER_APP_NOT_FOUND_ERROR";
|
|
77
|
+
appKey?: string;
|
|
78
|
+
constructor(message: string, options?: ErrorOptions & {
|
|
79
|
+
appKey?: string;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
80
82
|
/**
|
|
81
83
|
* Error thrown when a resource is not found (404)
|
|
82
84
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,EAEjB,KAAK,UAAU,EAEf,KAAK,QAAQ,EACd,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,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CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CA0F7D"}
|
package/dist/types/errors.js
CHANGED
|
@@ -1,68 +1,114 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
// `@zapier/zapier-sdk` owns the full `Zapier*` error hierarchy. kitcore
|
|
3
|
+
// only constructs errors at two internal sites (input validation and
|
|
4
|
+
// non-Error normalization) and routes both through the head-supplied
|
|
5
|
+
// `adaptError` factory below, which produces real `ZapierValidationError`
|
|
6
|
+
// / `ZapierUnknownError` instances. So consumers never see kitcore's
|
|
7
|
+
// `CoreError` fallback in normal operation, and `instanceof ZapierError`
|
|
8
|
+
// / `error.code === "ZAPIER_*"` continue to work the way they always
|
|
9
|
+
// have.
|
|
10
|
+
import { CORE_ERROR_SYMBOL, CoreErrorCode, } from "kitcore";
|
|
1
11
|
/**
|
|
2
|
-
* Base class for
|
|
3
|
-
*
|
|
12
|
+
* Base class for every Zapier-thrown error. Carries the core brand
|
|
13
|
+
* (`CORE_ERROR_SYMBOL`) so `isCoreError(err)` recognizes any
|
|
14
|
+
* `Zapier*` error as kitcore-originated, even when the SDK and kitcore
|
|
15
|
+
* are bundled separately. Subclasses override `name` and `code` per
|
|
16
|
+
* the existing `Zapier*` / `ZAPIER_*` convention.
|
|
4
17
|
*/
|
|
5
18
|
export class ZapierError extends Error {
|
|
6
19
|
constructor(message, options = {}) {
|
|
7
20
|
super(message);
|
|
8
|
-
this
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
this[_a] = true;
|
|
22
|
+
this.name = "ZapierError";
|
|
23
|
+
this.code = "ZAPIER_ERROR";
|
|
24
|
+
if (options.statusCode !== undefined)
|
|
25
|
+
this.statusCode = options.statusCode;
|
|
26
|
+
if (options.errors !== undefined)
|
|
27
|
+
this.errors = options.errors;
|
|
28
|
+
if (options.cause !== undefined)
|
|
29
|
+
this.cause = options.cause;
|
|
30
|
+
if (options.response !== undefined)
|
|
31
|
+
this.response = options.response;
|
|
13
32
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
14
33
|
}
|
|
15
34
|
}
|
|
35
|
+
_a = CORE_ERROR_SYMBOL;
|
|
16
36
|
/**
|
|
17
|
-
* Error thrown when
|
|
37
|
+
* Error thrown when input validation fails (e.g., bad parameters).
|
|
38
|
+
* Constructed by kitcore's input-validation path via
|
|
39
|
+
* `zapierAdaptError`, and also by direct throws elsewhere in the SDK.
|
|
18
40
|
*/
|
|
19
|
-
export class
|
|
41
|
+
export class ZapierValidationError extends ZapierError {
|
|
20
42
|
constructor(message, options = {}) {
|
|
21
43
|
super(message, options);
|
|
22
|
-
this.name = "
|
|
23
|
-
this.code = "
|
|
44
|
+
this.name = "ZapierValidationError";
|
|
45
|
+
this.code = "ZAPIER_VALIDATION_ERROR";
|
|
46
|
+
this.details = options.details;
|
|
24
47
|
}
|
|
25
48
|
}
|
|
26
49
|
/**
|
|
27
|
-
* Error
|
|
50
|
+
* Fallback for non-Error throws normalized by kitcore (`throw "oops"`,
|
|
51
|
+
* `throw { message: "X" }`, etc.). Real `Error` subclasses thrown by
|
|
52
|
+
* handlers bubble through unchanged and never become this.
|
|
28
53
|
*/
|
|
29
|
-
export class
|
|
30
|
-
constructor(
|
|
31
|
-
super(
|
|
32
|
-
this.name = "
|
|
33
|
-
this.code = "
|
|
34
|
-
this.appKey = options.appKey;
|
|
54
|
+
export class ZapierUnknownError extends ZapierError {
|
|
55
|
+
constructor() {
|
|
56
|
+
super(...arguments);
|
|
57
|
+
this.name = "ZapierUnknownError";
|
|
58
|
+
this.code = "ZAPIER_UNKNOWN_ERROR";
|
|
35
59
|
}
|
|
36
60
|
}
|
|
37
61
|
/**
|
|
38
|
-
* Error thrown
|
|
62
|
+
* Error thrown for authentication and authorization failures (401/403).
|
|
39
63
|
*/
|
|
40
|
-
export class
|
|
41
|
-
constructor(
|
|
42
|
-
super(
|
|
43
|
-
this.name = "
|
|
44
|
-
this.code = "
|
|
45
|
-
this.details = options.details;
|
|
64
|
+
export class ZapierAuthenticationError extends ZapierError {
|
|
65
|
+
constructor() {
|
|
66
|
+
super(...arguments);
|
|
67
|
+
this.name = "ZapierAuthenticationError";
|
|
68
|
+
this.code = "ZAPIER_AUTHENTICATION_ERROR";
|
|
46
69
|
}
|
|
47
70
|
}
|
|
48
71
|
/**
|
|
49
|
-
*
|
|
72
|
+
* Maps kitcore's abstract `CoreErrorCode` values onto Zapier's
|
|
73
|
+
* branded error classes. Wired into `createZapierSdk` via
|
|
74
|
+
* `createCorePlugin({ adaptError: zapierAdaptError })`, so
|
|
75
|
+
* every error kitcore constructs internally surfaces as the
|
|
76
|
+
* appropriate `Zapier*` subclass instead of a neutral `CoreError`.
|
|
50
77
|
*/
|
|
51
|
-
export
|
|
78
|
+
export const zapierAdaptError = (options) => {
|
|
79
|
+
switch (options.code) {
|
|
80
|
+
case CoreErrorCode.Validation:
|
|
81
|
+
return new ZapierValidationError(options.message, {
|
|
82
|
+
cause: options.cause,
|
|
83
|
+
details: options.details,
|
|
84
|
+
});
|
|
85
|
+
case CoreErrorCode.Unknown:
|
|
86
|
+
return new ZapierUnknownError(options.message, {
|
|
87
|
+
cause: options.cause,
|
|
88
|
+
});
|
|
89
|
+
default:
|
|
90
|
+
return new ZapierError(options.message, { cause: options.cause });
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Error thrown when API requests fail
|
|
95
|
+
*/
|
|
96
|
+
export class ZapierApiError extends ZapierError {
|
|
52
97
|
constructor(message, options = {}) {
|
|
53
98
|
super(message, options);
|
|
54
|
-
this.name = "
|
|
55
|
-
this.code = "
|
|
99
|
+
this.name = "ZapierApiError";
|
|
100
|
+
this.code = "ZAPIER_API_ERROR";
|
|
56
101
|
}
|
|
57
102
|
}
|
|
58
103
|
/**
|
|
59
|
-
* Error thrown
|
|
104
|
+
* Error thrown when an app is not found
|
|
60
105
|
*/
|
|
61
|
-
export class
|
|
106
|
+
export class ZapierAppNotFoundError extends ZapierError {
|
|
62
107
|
constructor(message, options = {}) {
|
|
63
108
|
super(message, options);
|
|
64
|
-
this.name = "
|
|
65
|
-
this.code = "
|
|
109
|
+
this.name = "ZapierAppNotFoundError";
|
|
110
|
+
this.code = "ZAPIER_APP_NOT_FOUND_ERROR";
|
|
111
|
+
this.appKey = options.appKey;
|
|
66
112
|
}
|
|
67
113
|
}
|
|
68
114
|
/**
|
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Function-related types and interfaces
|
|
4
|
-
*/
|
|
5
|
-
export interface FunctionOptions {
|
|
6
|
-
/** Base URL for Zapier API */
|
|
7
|
-
baseUrl?: string;
|
|
8
|
-
/** Authentication token */
|
|
9
|
-
token?: string;
|
|
10
|
-
/** Function to dynamically resolve authentication token */
|
|
11
|
-
getToken?: () => Promise<string | undefined>;
|
|
12
|
-
/** Optional pre-instantiated API client */
|
|
13
|
-
api?: ApiClient;
|
|
14
|
-
/** Enable debug logging */
|
|
15
|
-
debug?: boolean;
|
|
16
|
-
/** Custom fetch implementation */
|
|
17
|
-
fetch?: typeof globalThis.fetch;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Single page of a paginated SDK list result. Returned from the page-level
|
|
21
|
-
* promise and yielded from the page-level async iterable.
|
|
22
|
-
*/
|
|
23
|
-
export interface SdkPage<T = unknown> {
|
|
24
|
-
data: T[];
|
|
25
|
-
nextCursor?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Return type of every paginated SDK method. The same value is both:
|
|
29
|
-
*
|
|
30
|
-
* - a Promise that resolves to the first page (`SdkPage<TItem>`), and
|
|
31
|
-
* - an AsyncIterable that yields each page in turn,
|
|
32
|
-
*
|
|
33
|
-
* with an `.items()` method that returns an AsyncIterable over individual
|
|
34
|
-
* items across all pages. Named so paginated plugin signatures serialize
|
|
35
|
-
* as `PaginatedSdkResult<AppItem>` in `.d.ts` rather than expanding the
|
|
36
|
-
* full triple-intersection at every callsite.
|
|
37
|
-
*/
|
|
38
|
-
export interface PaginatedSdkResult<TItem> extends Promise<SdkPage<TItem>>, AsyncIterable<SdkPage<TItem>> {
|
|
39
|
-
items(): AsyncIterable<TItem>;
|
|
40
|
-
}
|
|
41
|
-
export type PaginatedSdkFunction<TOptions, TItem> = (options: TOptions) => PaginatedSdkResult<TItem>;
|
|
1
|
+
export type { SdkPage, PaginatedSdkResult, PaginatedSdkFunction, } from "kitcore";
|
|
42
2
|
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/types/functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/types/functions.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,OAAO,EACP,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|