@zapier/zapier-sdk 0.77.0 → 0.77.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/experimental.cjs +4 -3
- package/dist/experimental.d.mts +2 -3
- package/dist/experimental.d.ts +918 -934
- package/dist/experimental.mjs +4 -3
- package/dist/{index-BZShISEr.d.mts → index-kC0bJpsG.d.mts} +25 -3
- package/dist/{index-BZShISEr.d.ts → index-kC0bJpsG.d.ts} +25 -3
- package/dist/index.cjs +4 -3
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +6 -81
- package/dist/index.mjs +4 -3
- package/package.json +3 -3
- package/dist/api/approval-review-stream.d.ts +0 -25
- package/dist/api/approval-review-stream.d.ts.map +0 -1
- package/dist/api/approval-review-stream.js +0 -104
- package/dist/api/auth.d.ts +0 -14
- package/dist/api/auth.d.ts.map +0 -1
- package/dist/api/auth.js +0 -77
- package/dist/api/client.d.ts +0 -9
- package/dist/api/client.d.ts.map +0 -1
- package/dist/api/client.js +0 -1232
- package/dist/api/concurrency.d.ts +0 -28
- package/dist/api/concurrency.d.ts.map +0 -1
- package/dist/api/concurrency.js +0 -90
- package/dist/api/debug.d.ts +0 -14
- package/dist/api/debug.d.ts.map +0 -1
- package/dist/api/debug.js +0 -133
- package/dist/api/error-classification.d.ts +0 -19
- package/dist/api/error-classification.d.ts.map +0 -1
- package/dist/api/error-classification.js +0 -31
- package/dist/api/index.d.ts +0 -33
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -44
- package/dist/api/polling.d.ts +0 -64
- package/dist/api/polling.d.ts.map +0 -1
- package/dist/api/polling.js +0 -180
- package/dist/api/schemas.d.ts +0 -423
- package/dist/api/schemas.d.ts.map +0 -1
- package/dist/api/schemas.js +0 -323
- package/dist/api/sse-parser.d.ts +0 -51
- package/dist/api/sse-parser.d.ts.map +0 -1
- package/dist/api/sse-parser.js +0 -95
- package/dist/api/types.d.ts +0 -215
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js +0 -1
- package/dist/auth.d.ts +0 -149
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -526
- package/dist/cache.d.ts +0 -50
- package/dist/cache.d.ts.map +0 -1
- package/dist/cache.js +0 -47
- package/dist/constants.d.ts +0 -84
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -122
- package/dist/core-stack.d.ts +0 -24
- package/dist/core-stack.d.ts.map +0 -1
- package/dist/core-stack.js +0 -32
- package/dist/credentials.d.ts +0 -57
- package/dist/credentials.d.ts.map +0 -1
- package/dist/credentials.js +0 -184
- package/dist/define/apps-entrypoint.d.ts +0 -3
- package/dist/define/apps-entrypoint.d.ts.map +0 -1
- package/dist/define/apps-entrypoint.js +0 -1
- package/dist/define/apps-registry-keys.d.ts +0 -2
- package/dist/define/apps-registry-keys.d.ts.map +0 -1
- package/dist/define/apps-registry-keys.js +0 -2
- package/dist/define/apps-registry.d.ts +0 -13
- package/dist/define/apps-registry.d.ts.map +0 -1
- package/dist/define/apps-registry.js +0 -31
- package/dist/define/apps-registry.json +0 -9010
- package/dist/define/apps.d.ts +0 -11
- package/dist/define/apps.d.ts.map +0 -1
- package/dist/define/apps.js +0 -2
- package/dist/define/define.d.ts +0 -13
- package/dist/define/define.d.ts.map +0 -1
- package/dist/define/define.js +0 -93
- package/dist/define/helpers.d.ts +0 -8
- package/dist/define/helpers.d.ts.map +0 -1
- package/dist/define/helpers.js +0 -6
- package/dist/define/index.d.ts +0 -5
- package/dist/define/index.d.ts.map +0 -1
- package/dist/define/index.js +0 -2
- package/dist/define/types.d.ts +0 -246
- package/dist/define/types.d.ts.map +0 -1
- package/dist/define/types.js +0 -1
- package/dist/experimental.d.ts.map +0 -1
- package/dist/experimental.js +0 -232
- package/dist/formatters/action.d.ts +0 -4
- package/dist/formatters/action.d.ts.map +0 -1
- package/dist/formatters/action.js +0 -18
- package/dist/formatters/actionResult.d.ts +0 -3
- package/dist/formatters/actionResult.d.ts.map +0 -1
- package/dist/formatters/actionResult.js +0 -25
- package/dist/formatters/app.d.ts +0 -4
- package/dist/formatters/app.d.ts.map +0 -1
- package/dist/formatters/app.js +0 -10
- package/dist/formatters/clientCredentials.d.ts +0 -5
- package/dist/formatters/clientCredentials.d.ts.map +0 -1
- package/dist/formatters/clientCredentials.js +0 -27
- package/dist/formatters/connection.d.ts +0 -4
- package/dist/formatters/connection.d.ts.map +0 -1
- package/dist/formatters/connection.js +0 -26
- package/dist/formatters/field.d.ts +0 -4
- package/dist/formatters/field.d.ts.map +0 -1
- package/dist/formatters/field.js +0 -51
- package/dist/formatters/index.d.ts +0 -2
- package/dist/formatters/index.d.ts.map +0 -1
- package/dist/formatters/index.js +0 -1
- package/dist/formatters/inputFieldChoice.d.ts +0 -4
- package/dist/formatters/inputFieldChoice.d.ts.map +0 -1
- package/dist/formatters/inputFieldChoice.js +0 -16
- package/dist/formatters/tableField.d.ts +0 -4
- package/dist/formatters/tableField.d.ts.map +0 -1
- package/dist/formatters/tableField.js +0 -7
- package/dist/formatters/tableRecord.d.ts +0 -8
- package/dist/formatters/tableRecord.d.ts.map +0 -1
- package/dist/formatters/tableRecord.js +0 -24
- package/dist/formatters/triggerInbox.d.ts +0 -4
- package/dist/formatters/triggerInbox.d.ts.map +0 -1
- package/dist/formatters/triggerInbox.js +0 -31
- package/dist/formatters/triggerMessage.d.ts +0 -5
- package/dist/formatters/triggerMessage.d.ts.map +0 -1
- package/dist/formatters/triggerMessage.js +0 -34
- package/dist/formatters/userProfile.d.ts +0 -4
- package/dist/formatters/userProfile.d.ts.map +0 -1
- package/dist/formatters/userProfile.js +0 -19
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -94
- package/dist/plugins/api/index.d.ts +0 -30
- package/dist/plugins/api/index.d.ts.map +0 -1
- package/dist/plugins/api/index.js +0 -35
- package/dist/plugins/apps/index.d.ts +0 -118
- package/dist/plugins/apps/index.d.ts.map +0 -1
- package/dist/plugins/apps/index.js +0 -156
- package/dist/plugins/apps/schemas.d.ts +0 -50
- package/dist/plugins/apps/schemas.d.ts.map +0 -1
- package/dist/plugins/apps/schemas.js +0 -37
- package/dist/plugins/capabilities/index.d.ts +0 -27
- package/dist/plugins/capabilities/index.d.ts.map +0 -1
- package/dist/plugins/capabilities/index.js +0 -75
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts +0 -70
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.js +0 -28
- package/dist/plugins/codeSubstrate/cancelDurableRun/schemas.d.ts +0 -11
- package/dist/plugins/codeSubstrate/cancelDurableRun/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/schemas.js +0 -12
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts +0 -49
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/createWorkflow/index.js +0 -24
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts +0 -20
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.js +0 -42
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts +0 -75
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +0 -28
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts +0 -10
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.js +0 -13
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts +0 -76
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/disableWorkflow/index.js +0 -21
- package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts +0 -11
- package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/disableWorkflow/schemas.js +0 -12
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts +0 -76
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/enableWorkflow/index.js +0 -21
- package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts +0 -11
- package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/enableWorkflow/schemas.js +0 -12
- package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +0 -119
- package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getDurableRun/index.js +0 -21
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts +0 -178
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.js +0 -126
- package/dist/plugins/codeSubstrate/getTriggerRun/index.d.ts +0 -47
- package/dist/plugins/codeSubstrate/getTriggerRun/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getTriggerRun/index.js +0 -23
- package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts +0 -24
- package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getTriggerRun/schemas.js +0 -30
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts +0 -114
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getWorkflow/index.js +0 -21
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts +0 -81
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.js +0 -71
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts +0 -112
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.js +0 -25
- package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts +0 -26
- package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.js +0 -43
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts +0 -132
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.js +0 -25
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts +0 -30
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.js +0 -35
- package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts +0 -55
- package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/index.js +0 -31
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts +0 -73
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.js +0 -58
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts +0 -88
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.js +0 -34
- package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts +0 -63
- package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.js +0 -69
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts +0 -98
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.js +0 -34
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts +0 -63
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.js +0 -58
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts +0 -61
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/listWorkflows/index.js +0 -28
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts +0 -86
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.js +0 -79
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +0 -150
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.js +0 -80
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts +0 -158
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.js +0 -124
- package/dist/plugins/codeSubstrate/runDurable/index.d.ts +0 -94
- package/dist/plugins/codeSubstrate/runDurable/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/runDurable/index.js +0 -41
- package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts +0 -149
- package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/runDurable/schemas.js +0 -95
- package/dist/plugins/codeSubstrate/shared-schemas.d.ts +0 -41
- package/dist/plugins/codeSubstrate/shared-schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/shared-schemas.js +0 -83
- package/dist/plugins/codeSubstrate/shared.d.ts +0 -72
- package/dist/plugins/codeSubstrate/shared.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/shared.js +0 -115
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts +0 -78
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.js +0 -40
- package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts +0 -16
- package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.js +0 -26
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts +0 -85
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/updateWorkflow/index.js +0 -28
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts +0 -20
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts.map +0 -1
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.js +0 -37
- package/dist/plugins/connections/index.d.ts +0 -19
- package/dist/plugins/connections/index.d.ts.map +0 -1
- package/dist/plugins/connections/index.js +0 -21
- package/dist/plugins/createClientCredentials/index.d.ts +0 -32
- package/dist/plugins/createClientCredentials/index.d.ts.map +0 -1
- package/dist/plugins/createClientCredentials/index.js +0 -29
- package/dist/plugins/createClientCredentials/schemas.d.ts +0 -18
- package/dist/plugins/createClientCredentials/schemas.d.ts.map +0 -1
- package/dist/plugins/createClientCredentials/schemas.js +0 -16
- package/dist/plugins/createConnection/index.d.ts +0 -189
- package/dist/plugins/createConnection/index.d.ts.map +0 -1
- package/dist/plugins/createConnection/index.js +0 -71
- package/dist/plugins/createConnection/schemas.d.ts +0 -21
- package/dist/plugins/createConnection/schemas.d.ts.map +0 -1
- package/dist/plugins/createConnection/schemas.js +0 -38
- package/dist/plugins/deleteClientCredentials/index.d.ts +0 -48
- package/dist/plugins/deleteClientCredentials/index.d.ts.map +0 -1
- package/dist/plugins/deleteClientCredentials/index.js +0 -21
- package/dist/plugins/deleteClientCredentials/schemas.d.ts +0 -12
- package/dist/plugins/deleteClientCredentials/schemas.d.ts.map +0 -1
- package/dist/plugins/deleteClientCredentials/schemas.js +0 -8
- package/dist/plugins/deprecated/authentications.d.ts +0 -763
- package/dist/plugins/deprecated/authentications.d.ts.map +0 -1
- package/dist/plugins/deprecated/authentications.js +0 -100
- package/dist/plugins/deprecated/inputFields.d.ts +0 -503
- package/dist/plugins/deprecated/inputFields.d.ts.map +0 -1
- package/dist/plugins/deprecated/inputFields.js +0 -81
- package/dist/plugins/eventEmission/builders.d.ts +0 -14
- package/dist/plugins/eventEmission/builders.d.ts.map +0 -1
- package/dist/plugins/eventEmission/builders.js +0 -117
- package/dist/plugins/eventEmission/event-emission-hook.d.ts +0 -10
- package/dist/plugins/eventEmission/event-emission-hook.d.ts.map +0 -1
- package/dist/plugins/eventEmission/event-emission-hook.js +0 -47
- package/dist/plugins/eventEmission/index.d.ts +0 -50
- package/dist/plugins/eventEmission/index.d.ts.map +0 -1
- package/dist/plugins/eventEmission/index.js +0 -398
- package/dist/plugins/eventEmission/method-metadata.d.ts +0 -16
- package/dist/plugins/eventEmission/method-metadata.d.ts.map +0 -1
- package/dist/plugins/eventEmission/method-metadata.js +0 -20
- package/dist/plugins/eventEmission/transport.d.ts +0 -27
- package/dist/plugins/eventEmission/transport.d.ts.map +0 -1
- package/dist/plugins/eventEmission/transport.js +0 -105
- package/dist/plugins/eventEmission/types.d.ts +0 -67
- package/dist/plugins/eventEmission/types.d.ts.map +0 -1
- package/dist/plugins/eventEmission/types.js +0 -1
- package/dist/plugins/eventEmission/utils.d.ts +0 -56
- package/dist/plugins/eventEmission/utils.d.ts.map +0 -1
- package/dist/plugins/eventEmission/utils.js +0 -142
- package/dist/plugins/fetch/index.d.ts +0 -72
- package/dist/plugins/fetch/index.d.ts.map +0 -1
- package/dist/plugins/fetch/index.js +0 -238
- package/dist/plugins/fetch/schemas.d.ts +0 -28
- package/dist/plugins/fetch/schemas.d.ts.map +0 -1
- package/dist/plugins/fetch/schemas.js +0 -52
- package/dist/plugins/findFirstConnection/index.d.ts +0 -115
- package/dist/plugins/findFirstConnection/index.d.ts.map +0 -1
- package/dist/plugins/findFirstConnection/index.js +0 -25
- package/dist/plugins/findFirstConnection/schemas.d.ts +0 -25
- package/dist/plugins/findFirstConnection/schemas.d.ts.map +0 -1
- package/dist/plugins/findFirstConnection/schemas.js +0 -9
- package/dist/plugins/findUniqueConnection/index.d.ts +0 -115
- package/dist/plugins/findUniqueConnection/index.d.ts.map +0 -1
- package/dist/plugins/findUniqueConnection/index.js +0 -28
- package/dist/plugins/findUniqueConnection/schemas.d.ts +0 -25
- package/dist/plugins/findUniqueConnection/schemas.d.ts.map +0 -1
- package/dist/plugins/findUniqueConnection/schemas.js +0 -9
- package/dist/plugins/getAction/index.d.ts +0 -215
- package/dist/plugins/getAction/index.d.ts.map +0 -1
- package/dist/plugins/getAction/index.js +0 -41
- package/dist/plugins/getAction/schemas.d.ts +0 -82
- package/dist/plugins/getAction/schemas.d.ts.map +0 -1
- package/dist/plugins/getAction/schemas.js +0 -22
- package/dist/plugins/getActionInputFieldsSchema/index.d.ts +0 -301
- package/dist/plugins/getActionInputFieldsSchema/index.d.ts.map +0 -1
- package/dist/plugins/getActionInputFieldsSchema/index.js +0 -57
- package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts +0 -97
- package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts.map +0 -1
- package/dist/plugins/getActionInputFieldsSchema/schemas.js +0 -49
- package/dist/plugins/getApp/index.d.ts +0 -146
- package/dist/plugins/getApp/index.d.ts.map +0 -1
- package/dist/plugins/getApp/index.js +0 -24
- package/dist/plugins/getApp/schemas.d.ts +0 -32
- package/dist/plugins/getApp/schemas.d.ts.map +0 -1
- package/dist/plugins/getApp/schemas.js +0 -18
- package/dist/plugins/getConnection/index.d.ts +0 -179
- package/dist/plugins/getConnection/index.d.ts.map +0 -1
- package/dist/plugins/getConnection/index.js +0 -33
- package/dist/plugins/getConnection/schemas.d.ts +0 -12
- package/dist/plugins/getConnection/schemas.d.ts.map +0 -1
- package/dist/plugins/getConnection/schemas.js +0 -14
- package/dist/plugins/getConnectionStartUrl/index.d.ts +0 -206
- package/dist/plugins/getConnectionStartUrl/index.d.ts.map +0 -1
- package/dist/plugins/getConnectionStartUrl/index.js +0 -39
- package/dist/plugins/getConnectionStartUrl/schemas.d.ts +0 -15
- package/dist/plugins/getConnectionStartUrl/schemas.d.ts.map +0 -1
- package/dist/plugins/getConnectionStartUrl/schemas.js +0 -23
- package/dist/plugins/getProfile/index.d.ts +0 -32
- package/dist/plugins/getProfile/index.d.ts.map +0 -1
- package/dist/plugins/getProfile/index.js +0 -28
- package/dist/plugins/getProfile/schemas.d.ts +0 -4
- package/dist/plugins/getProfile/schemas.d.ts.map +0 -1
- package/dist/plugins/getProfile/schemas.js +0 -5
- package/dist/plugins/listActionInputFieldChoices/index.d.ts +0 -372
- package/dist/plugins/listActionInputFieldChoices/index.d.ts.map +0 -1
- package/dist/plugins/listActionInputFieldChoices/index.js +0 -110
- package/dist/plugins/listActionInputFieldChoices/schemas.d.ts +0 -133
- package/dist/plugins/listActionInputFieldChoices/schemas.d.ts.map +0 -1
- package/dist/plugins/listActionInputFieldChoices/schemas.js +0 -75
- package/dist/plugins/listActionInputFields/index.d.ts +0 -330
- package/dist/plugins/listActionInputFields/index.d.ts.map +0 -1
- package/dist/plugins/listActionInputFields/index.js +0 -208
- package/dist/plugins/listActionInputFields/schemas.d.ts +0 -113
- package/dist/plugins/listActionInputFields/schemas.d.ts.map +0 -1
- package/dist/plugins/listActionInputFields/schemas.js +0 -56
- package/dist/plugins/listActions/index.d.ts +0 -219
- package/dist/plugins/listActions/index.d.ts.map +0 -1
- package/dist/plugins/listActions/index.js +0 -60
- package/dist/plugins/listActions/schemas.d.ts +0 -78
- package/dist/plugins/listActions/schemas.d.ts.map +0 -1
- package/dist/plugins/listActions/schemas.js +0 -33
- package/dist/plugins/listApps/index.d.ts +0 -127
- package/dist/plugins/listApps/index.d.ts.map +0 -1
- package/dist/plugins/listApps/index.js +0 -63
- package/dist/plugins/listApps/schemas.d.ts +0 -43
- package/dist/plugins/listApps/schemas.d.ts.map +0 -1
- package/dist/plugins/listApps/schemas.js +0 -54
- package/dist/plugins/listClientCredentials/index.d.ts +0 -36
- package/dist/plugins/listClientCredentials/index.d.ts.map +0 -1
- package/dist/plugins/listClientCredentials/index.js +0 -32
- package/dist/plugins/listClientCredentials/schemas.d.ts +0 -17
- package/dist/plugins/listClientCredentials/schemas.d.ts.map +0 -1
- package/dist/plugins/listClientCredentials/schemas.js +0 -23
- package/dist/plugins/listConnections/index.d.ts +0 -243
- package/dist/plugins/listConnections/index.d.ts.map +0 -1
- package/dist/plugins/listConnections/index.js +0 -97
- package/dist/plugins/listConnections/schemas.d.ts +0 -34
- package/dist/plugins/listConnections/schemas.d.ts.map +0 -1
- package/dist/plugins/listConnections/schemas.js +0 -74
- package/dist/plugins/manifest/index.d.ts +0 -97
- package/dist/plugins/manifest/index.d.ts.map +0 -1
- package/dist/plugins/manifest/index.js +0 -395
- package/dist/plugins/manifest/schemas.d.ts +0 -88
- package/dist/plugins/manifest/schemas.d.ts.map +0 -1
- package/dist/plugins/manifest/schemas.js +0 -61
- package/dist/plugins/registry/index.d.ts +0 -17
- package/dist/plugins/registry/index.d.ts.map +0 -1
- package/dist/plugins/registry/index.js +0 -11
- package/dist/plugins/request/index.d.ts +0 -70
- package/dist/plugins/request/index.d.ts.map +0 -1
- package/dist/plugins/request/index.js +0 -28
- package/dist/plugins/request/schemas.d.ts +0 -46
- package/dist/plugins/request/schemas.d.ts.map +0 -1
- package/dist/plugins/request/schemas.js +0 -42
- package/dist/plugins/runAction/index.d.ts +0 -313
- package/dist/plugins/runAction/index.d.ts.map +0 -1
- package/dist/plugins/runAction/index.js +0 -189
- package/dist/plugins/runAction/schemas.d.ts +0 -108
- package/dist/plugins/runAction/schemas.d.ts.map +0 -1
- package/dist/plugins/runAction/schemas.js +0 -53
- package/dist/plugins/tables/createTable/index.d.ts +0 -48
- package/dist/plugins/tables/createTable/index.d.ts.map +0 -1
- package/dist/plugins/tables/createTable/index.js +0 -20
- package/dist/plugins/tables/createTable/schemas.d.ts +0 -36
- package/dist/plugins/tables/createTable/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/createTable/schemas.js +0 -16
- package/dist/plugins/tables/createTableFields/index.d.ts +0 -92
- package/dist/plugins/tables/createTableFields/index.d.ts.map +0 -1
- package/dist/plugins/tables/createTableFields/index.js +0 -29
- package/dist/plugins/tables/createTableFields/schemas.d.ts +0 -317
- package/dist/plugins/tables/createTableFields/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/createTableFields/schemas.js +0 -62
- package/dist/plugins/tables/createTableRecords/index.d.ts +0 -114
- package/dist/plugins/tables/createTableRecords/index.d.ts.map +0 -1
- package/dist/plugins/tables/createTableRecords/index.js +0 -43
- package/dist/plugins/tables/createTableRecords/schemas.d.ts +0 -92
- package/dist/plugins/tables/createTableRecords/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/createTableRecords/schemas.js +0 -55
- package/dist/plugins/tables/deleteTable/index.d.ts +0 -74
- package/dist/plugins/tables/deleteTable/index.d.ts.map +0 -1
- package/dist/plugins/tables/deleteTable/index.js +0 -23
- package/dist/plugins/tables/deleteTable/schemas.d.ts +0 -28
- package/dist/plugins/tables/deleteTable/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/deleteTable/schemas.js +0 -21
- package/dist/plugins/tables/deleteTableFields/index.d.ts +0 -102
- package/dist/plugins/tables/deleteTableFields/index.d.ts.map +0 -1
- package/dist/plugins/tables/deleteTableFields/index.js +0 -30
- package/dist/plugins/tables/deleteTableFields/schemas.d.ts +0 -34
- package/dist/plugins/tables/deleteTableFields/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/deleteTableFields/schemas.js +0 -29
- package/dist/plugins/tables/deleteTableRecords/index.d.ts +0 -123
- package/dist/plugins/tables/deleteTableRecords/index.d.ts.map +0 -1
- package/dist/plugins/tables/deleteTableRecords/index.js +0 -23
- package/dist/plugins/tables/deleteTableRecords/schemas.d.ts +0 -34
- package/dist/plugins/tables/deleteTableRecords/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/deleteTableRecords/schemas.js +0 -30
- package/dist/plugins/tables/getTable/index.d.ts +0 -81
- package/dist/plugins/tables/getTable/index.d.ts.map +0 -1
- package/dist/plugins/tables/getTable/index.js +0 -24
- package/dist/plugins/tables/getTable/schemas.d.ts +0 -49
- package/dist/plugins/tables/getTable/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/getTable/schemas.js +0 -27
- package/dist/plugins/tables/getTableRecord/index.d.ts +0 -131
- package/dist/plugins/tables/getTableRecord/index.d.ts.map +0 -1
- package/dist/plugins/tables/getTableRecord/index.js +0 -38
- package/dist/plugins/tables/getTableRecord/schemas.d.ts +0 -88
- package/dist/plugins/tables/getTableRecord/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/getTableRecord/schemas.js +0 -56
- package/dist/plugins/tables/listTableFields/index.d.ts +0 -86
- package/dist/plugins/tables/listTableFields/index.d.ts.map +0 -1
- package/dist/plugins/tables/listTableFields/index.js +0 -41
- package/dist/plugins/tables/listTableFields/schemas.d.ts +0 -225
- package/dist/plugins/tables/listTableFields/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/listTableFields/schemas.js +0 -93
- package/dist/plugins/tables/listTableRecords/index.d.ts +0 -136
- package/dist/plugins/tables/listTableRecords/index.d.ts.map +0 -1
- package/dist/plugins/tables/listTableRecords/index.js +0 -81
- package/dist/plugins/tables/listTableRecords/schemas.d.ts +0 -256
- package/dist/plugins/tables/listTableRecords/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/listTableRecords/schemas.js +0 -95
- package/dist/plugins/tables/listTables/index.d.ts +0 -60
- package/dist/plugins/tables/listTables/index.d.ts.map +0 -1
- package/dist/plugins/tables/listTables/index.js +0 -67
- package/dist/plugins/tables/listTables/schemas.d.ts +0 -85
- package/dist/plugins/tables/listTables/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/listTables/schemas.js +0 -72
- package/dist/plugins/tables/shared.d.ts +0 -10
- package/dist/plugins/tables/shared.d.ts.map +0 -1
- package/dist/plugins/tables/shared.js +0 -9
- package/dist/plugins/tables/updateTableRecords/index.d.ts +0 -116
- package/dist/plugins/tables/updateTableRecords/index.d.ts.map +0 -1
- package/dist/plugins/tables/updateTableRecords/index.js +0 -47
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts +0 -97
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts.map +0 -1
- package/dist/plugins/tables/updateTableRecords/schemas.js +0 -55
- package/dist/plugins/tables/utils.d.ts +0 -69
- package/dist/plugins/tables/utils.d.ts.map +0 -1
- package/dist/plugins/tables/utils.js +0 -270
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts +0 -108
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts.map +0 -1
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.js +0 -36
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts +0 -34
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.js +0 -17
- package/dist/plugins/triggers/createTriggerInbox/index.d.ts +0 -292
- package/dist/plugins/triggers/createTriggerInbox/index.d.ts.map +0 -1
- package/dist/plugins/triggers/createTriggerInbox/index.js +0 -68
- package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts +0 -20
- package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/createTriggerInbox/schemas.js +0 -21
- package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts +0 -81
- package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts.map +0 -1
- package/dist/plugins/triggers/deleteTriggerInbox/index.js +0 -29
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts +0 -13
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.js +0 -9
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +0 -277
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +0 -1
- package/dist/plugins/triggers/drainTriggerInbox/index.js +0 -260
- package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts +0 -56
- package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts.map +0 -1
- package/dist/plugins/triggers/drainTriggerInbox/pipeline.js +0 -225
- package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts +0 -104
- package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/drainTriggerInbox/schemas.js +0 -102
- package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts +0 -292
- package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts.map +0 -1
- package/dist/plugins/triggers/ensureTriggerInbox/index.js +0 -65
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts +0 -20
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.js +0 -21
- package/dist/plugins/triggers/getTriggerInbox/index.d.ts +0 -81
- package/dist/plugins/triggers/getTriggerInbox/index.d.ts.map +0 -1
- package/dist/plugins/triggers/getTriggerInbox/index.js +0 -28
- package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts +0 -13
- package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/getTriggerInbox/schemas.js +0 -9
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts +0 -277
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts.map +0 -1
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.js +0 -23
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts +0 -13
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.js +0 -10
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts +0 -89
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts.map +0 -1
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.js +0 -74
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts +0 -57
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.js +0 -25
- package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts +0 -82
- package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggerInboxMessages/index.js +0 -40
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts +0 -37
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.js +0 -27
- package/dist/plugins/triggers/listTriggerInboxes/index.d.ts +0 -56
- package/dist/plugins/triggers/listTriggerInboxes/index.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggerInboxes/index.js +0 -42
- package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts +0 -58
- package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggerInboxes/schemas.js +0 -35
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts +0 -360
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.js +0 -32
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts +0 -20
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.js +0 -28
- package/dist/plugins/triggers/listTriggerInputFields/index.d.ts +0 -330
- package/dist/plugins/triggers/listTriggerInputFields/index.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggerInputFields/index.js +0 -34
- package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts +0 -16
- package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggerInputFields/schemas.js +0 -21
- package/dist/plugins/triggers/listTriggers/index.d.ts +0 -207
- package/dist/plugins/triggers/listTriggers/index.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggers/index.js +0 -26
- package/dist/plugins/triggers/listTriggers/schemas.d.ts +0 -11
- package/dist/plugins/triggers/listTriggers/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/listTriggers/schemas.js +0 -18
- package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts +0 -81
- package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts.map +0 -1
- package/dist/plugins/triggers/pauseTriggerInbox/index.js +0 -28
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts +0 -13
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.js +0 -9
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts +0 -108
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts.map +0 -1
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.js +0 -38
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts +0 -34
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.js +0 -17
- package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts +0 -81
- package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts.map +0 -1
- package/dist/plugins/triggers/resumeTriggerInbox/index.js +0 -28
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts +0 -13
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.js +0 -9
- package/dist/plugins/triggers/shared.d.ts +0 -17
- package/dist/plugins/triggers/shared.d.ts.map +0 -1
- package/dist/plugins/triggers/shared.js +0 -16
- package/dist/plugins/triggers/updateTriggerInbox/index.d.ts +0 -82
- package/dist/plugins/triggers/updateTriggerInbox/index.d.ts.map +0 -1
- package/dist/plugins/triggers/updateTriggerInbox/index.js +0 -32
- package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts +0 -14
- package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts.map +0 -1
- package/dist/plugins/triggers/updateTriggerInbox/schemas.js +0 -15
- package/dist/plugins/triggers/utils.d.ts +0 -23
- package/dist/plugins/triggers/utils.d.ts.map +0 -1
- package/dist/plugins/triggers/utils.js +0 -45
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +0 -221
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +0 -1
- package/dist/plugins/triggers/watchTriggerInbox/index.js +0 -402
- package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts +0 -32
- package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts.map +0 -1
- package/dist/plugins/triggers/watchTriggerInbox/sse.js +0 -36
- package/dist/plugins/waitForNewConnection/index.d.ts +0 -209
- package/dist/plugins/waitForNewConnection/index.d.ts.map +0 -1
- package/dist/plugins/waitForNewConnection/index.js +0 -75
- package/dist/plugins/waitForNewConnection/schemas.d.ts +0 -17
- package/dist/plugins/waitForNewConnection/schemas.d.ts.map +0 -1
- package/dist/plugins/waitForNewConnection/schemas.js +0 -39
- package/dist/resolvers/actionKey.d.ts +0 -16
- package/dist/resolvers/actionKey.d.ts.map +0 -1
- package/dist/resolvers/actionKey.js +0 -20
- package/dist/resolvers/actionType.d.ts +0 -14
- package/dist/resolvers/actionType.d.ts.map +0 -1
- package/dist/resolvers/actionType.js +0 -24
- package/dist/resolvers/appKey.d.ts +0 -13
- package/dist/resolvers/appKey.d.ts.map +0 -1
- package/dist/resolvers/appKey.js +0 -50
- package/dist/resolvers/clientCredentialsName.d.ts +0 -3
- package/dist/resolvers/clientCredentialsName.d.ts.map +0 -1
- package/dist/resolvers/clientCredentialsName.js +0 -5
- package/dist/resolvers/clientId.d.ts +0 -5
- package/dist/resolvers/clientId.d.ts.map +0 -1
- package/dist/resolvers/clientId.js +0 -14
- package/dist/resolvers/connectionId.d.ts +0 -12
- package/dist/resolvers/connectionId.d.ts.map +0 -1
- package/dist/resolvers/connectionId.js +0 -52
- package/dist/resolvers/durableRunId.d.ts +0 -5
- package/dist/resolvers/durableRunId.d.ts.map +0 -1
- package/dist/resolvers/durableRunId.js +0 -15
- package/dist/resolvers/index.d.ts +0 -27
- package/dist/resolvers/index.d.ts.map +0 -1
- package/dist/resolvers/index.js +0 -28
- package/dist/resolvers/inputFieldKey.d.ts +0 -12
- package/dist/resolvers/inputFieldKey.d.ts.map +0 -1
- package/dist/resolvers/inputFieldKey.js +0 -51
- package/dist/resolvers/inputs.d.ts +0 -17
- package/dist/resolvers/inputs.d.ts.map +0 -1
- package/dist/resolvers/inputs.js +0 -50
- package/dist/resolvers/tableFieldIds.d.ts +0 -7
- package/dist/resolvers/tableFieldIds.d.ts.map +0 -1
- package/dist/resolvers/tableFieldIds.js +0 -20
- package/dist/resolvers/tableFields.d.ts +0 -3
- package/dist/resolvers/tableFields.d.ts.map +0 -1
- package/dist/resolvers/tableFields.js +0 -31
- package/dist/resolvers/tableFilters.d.ts +0 -6
- package/dist/resolvers/tableFilters.d.ts.map +0 -1
- package/dist/resolvers/tableFilters.js +0 -74
- package/dist/resolvers/tableId.d.ts +0 -5
- package/dist/resolvers/tableId.d.ts.map +0 -1
- package/dist/resolvers/tableId.js +0 -30
- package/dist/resolvers/tableName.d.ts +0 -3
- package/dist/resolvers/tableName.d.ts.map +0 -1
- package/dist/resolvers/tableName.js +0 -5
- package/dist/resolvers/tableRecordId.d.ts +0 -10
- package/dist/resolvers/tableRecordId.d.ts.map +0 -1
- package/dist/resolvers/tableRecordId.js +0 -49
- package/dist/resolvers/tableRecords.d.ts +0 -9
- package/dist/resolvers/tableRecords.d.ts.map +0 -1
- package/dist/resolvers/tableRecords.js +0 -77
- package/dist/resolvers/tableSort.d.ts +0 -6
- package/dist/resolvers/tableSort.d.ts.map +0 -1
- package/dist/resolvers/tableSort.js +0 -43
- package/dist/resolvers/triggerInbox.d.ts +0 -5
- package/dist/resolvers/triggerInbox.d.ts.map +0 -1
- package/dist/resolvers/triggerInbox.js +0 -19
- package/dist/resolvers/triggerMessages.d.ts +0 -7
- package/dist/resolvers/triggerMessages.d.ts.map +0 -1
- package/dist/resolvers/triggerMessages.js +0 -21
- package/dist/resolvers/workflowId.d.ts +0 -5
- package/dist/resolvers/workflowId.d.ts.map +0 -1
- package/dist/resolvers/workflowId.js +0 -15
- package/dist/resolvers/workflowRunId.d.ts +0 -7
- package/dist/resolvers/workflowRunId.d.ts.map +0 -1
- package/dist/resolvers/workflowRunId.js +0 -20
- package/dist/resolvers/workflowVersionId.d.ts +0 -7
- package/dist/resolvers/workflowVersionId.d.ts.map +0 -1
- package/dist/resolvers/workflowVersionId.js +0 -20
- package/dist/schemas/Action.d.ts +0 -24
- package/dist/schemas/Action.d.ts.map +0 -1
- package/dist/schemas/Action.js +0 -16
- package/dist/schemas/App.d.ts +0 -56
- package/dist/schemas/App.d.ts.map +0 -1
- package/dist/schemas/App.js +0 -5
- package/dist/schemas/ClientCredentials.d.ts +0 -19
- package/dist/schemas/ClientCredentials.d.ts.map +0 -1
- package/dist/schemas/ClientCredentials.js +0 -6
- package/dist/schemas/Connection.d.ts +0 -32
- package/dist/schemas/Connection.d.ts.map +0 -1
- package/dist/schemas/Connection.js +0 -5
- package/dist/schemas/Field.d.ts +0 -61
- package/dist/schemas/Field.d.ts.map +0 -1
- package/dist/schemas/Field.js +0 -49
- package/dist/schemas/Run.d.ts +0 -3
- package/dist/schemas/Run.d.ts.map +0 -1
- package/dist/schemas/Run.js +0 -5
- package/dist/schemas/TriggerInbox.d.ts +0 -59
- package/dist/schemas/TriggerInbox.d.ts.map +0 -1
- package/dist/schemas/TriggerInbox.js +0 -49
- package/dist/schemas/TriggerMessage.d.ts +0 -48
- package/dist/schemas/TriggerMessage.d.ts.map +0 -1
- package/dist/schemas/TriggerMessage.js +0 -21
- package/dist/schemas/UserProfile.d.ts +0 -12
- package/dist/schemas/UserProfile.d.ts.map +0 -1
- package/dist/schemas/UserProfile.js +0 -13
- package/dist/sdk-version.d.ts +0 -28
- package/dist/sdk-version.d.ts.map +0 -1
- package/dist/sdk-version.js +0 -29
- package/dist/sdk.d.ts +0 -6065
- package/dist/sdk.d.ts.map +0 -1
- package/dist/sdk.js +0 -173
- package/dist/services/implementations.d.ts +0 -63
- package/dist/services/implementations.d.ts.map +0 -1
- package/dist/services/implementations.js +0 -79
- package/dist/types/connections.d.ts +0 -19
- package/dist/types/connections.d.ts.map +0 -1
- package/dist/types/connections.js +0 -20
- package/dist/types/credentials.d.ts +0 -186
- package/dist/types/credentials.d.ts.map +0 -1
- package/dist/types/credentials.js +0 -123
- package/dist/types/domain.d.ts +0 -52
- package/dist/types/domain.d.ts.map +0 -1
- package/dist/types/domain.js +0 -1
- package/dist/types/errors.d.ts +0 -254
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/errors.js +0 -336
- package/dist/types/events.d.ts +0 -38
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/events.js +0 -7
- package/dist/types/functions.d.ts +0 -2
- package/dist/types/functions.d.ts.map +0 -1
- package/dist/types/functions.js +0 -1
- package/dist/types/properties.d.ts +0 -83
- package/dist/types/properties.d.ts.map +0 -1
- package/dist/types/properties.js +0 -120
- package/dist/types/sdk.d.ts +0 -97
- package/dist/types/sdk.d.ts.map +0 -1
- package/dist/types/sdk.js +0 -114
- package/dist/types/signals.d.ts +0 -20
- package/dist/types/signals.d.ts.map +0 -1
- package/dist/types/signals.js +0 -21
- package/dist/types/telemetry-events.d.ts +0 -114
- package/dist/types/telemetry-events.d.ts.map +0 -1
- package/dist/types/telemetry-events.js +0 -10
- package/dist/utils/abort-utils.d.ts +0 -77
- package/dist/utils/abort-utils.d.ts.map +0 -1
- package/dist/utils/abort-utils.js +0 -122
- package/dist/utils/agent.d.ts +0 -44
- package/dist/utils/agent.d.ts.map +0 -1
- package/dist/utils/agent.js +0 -76
- package/dist/utils/array-utils.d.ts +0 -31
- package/dist/utils/array-utils.d.ts.map +0 -1
- package/dist/utils/array-utils.js +0 -36
- package/dist/utils/batch-utils.d.ts +0 -72
- package/dist/utils/batch-utils.d.ts.map +0 -1
- package/dist/utils/batch-utils.js +0 -161
- package/dist/utils/caller-context.d.ts +0 -21
- package/dist/utils/caller-context.d.ts.map +0 -1
- package/dist/utils/caller-context.js +0 -35
- package/dist/utils/domain-utils.d.ts +0 -96
- package/dist/utils/domain-utils.d.ts.map +0 -1
- package/dist/utils/domain-utils.js +0 -248
- package/dist/utils/file-utils.d.ts +0 -4
- package/dist/utils/file-utils.d.ts.map +0 -1
- package/dist/utils/file-utils.js +0 -74
- package/dist/utils/id-utils.d.ts +0 -15
- package/dist/utils/id-utils.d.ts.map +0 -1
- package/dist/utils/id-utils.js +0 -24
- package/dist/utils/logging.d.ts +0 -2
- package/dist/utils/logging.d.ts.map +0 -1
- package/dist/utils/logging.js +0 -2
- package/dist/utils/open-approval.d.ts +0 -2
- package/dist/utils/open-approval.d.ts.map +0 -1
- package/dist/utils/open-approval.js +0 -13
- package/dist/utils/open-url.d.ts +0 -3
- package/dist/utils/open-url.d.ts.map +0 -1
- package/dist/utils/open-url.js +0 -79
- package/dist/utils/pagination.d.ts +0 -38
- package/dist/utils/pagination.d.ts.map +0 -1
- package/dist/utils/pagination.js +0 -53
- package/dist/utils/retry-utils.d.ts +0 -70
- package/dist/utils/retry-utils.d.ts.map +0 -1
- package/dist/utils/retry-utils.js +0 -97
- package/dist/utils/should-open-browser.d.ts +0 -24
- package/dist/utils/should-open-browser.d.ts.map +0 -1
- package/dist/utils/should-open-browser.js +0 -55
- package/dist/utils/telemetry.d.ts +0 -11
- package/dist/utils/telemetry.d.ts.map +0 -1
- package/dist/utils/telemetry.js +0 -19
- package/dist/utils/type-guard-utils.d.ts +0 -7
- package/dist/utils/type-guard-utils.d.ts.map +0 -1
- package/dist/utils/type-guard-utils.js +0 -11
- package/dist/utils/url-utils.d.ts +0 -25
- package/dist/utils/url-utils.d.ts.map +0 -1
- package/dist/utils/url-utils.js +0 -79
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
export declare const updateTableRecordsPlugin: (sdk: {
|
|
2
|
-
context: {
|
|
3
|
-
api: import("../../..").ApiClient;
|
|
4
|
-
resolveCredentials: () => Promise<string | {
|
|
5
|
-
clientId: string;
|
|
6
|
-
clientSecret: string;
|
|
7
|
-
type?: "client_credentials" | undefined;
|
|
8
|
-
baseUrl?: string | undefined;
|
|
9
|
-
scope?: string | undefined;
|
|
10
|
-
} | {
|
|
11
|
-
clientId: string;
|
|
12
|
-
type?: "pkce" | undefined;
|
|
13
|
-
baseUrl?: string | undefined;
|
|
14
|
-
scope?: string | undefined;
|
|
15
|
-
} | undefined>;
|
|
16
|
-
};
|
|
17
|
-
} & {
|
|
18
|
-
context: import("../../eventEmission").EventEmissionContext;
|
|
19
|
-
} & {
|
|
20
|
-
listTables: (options?: ({
|
|
21
|
-
tables?: string[] | undefined;
|
|
22
|
-
tableIds?: string[] | undefined;
|
|
23
|
-
kind?: "table" | "virtual_table" | "both" | undefined;
|
|
24
|
-
search?: string | undefined;
|
|
25
|
-
owner?: string | undefined;
|
|
26
|
-
includeShared?: boolean | undefined;
|
|
27
|
-
pageSize?: number | undefined;
|
|
28
|
-
maxItems?: number | undefined;
|
|
29
|
-
cursor?: string | undefined;
|
|
30
|
-
} & {
|
|
31
|
-
cursor?: string;
|
|
32
|
-
pageSize?: number;
|
|
33
|
-
maxItems?: number;
|
|
34
|
-
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
35
|
-
id: string;
|
|
36
|
-
name: string;
|
|
37
|
-
created_at: string;
|
|
38
|
-
edited_at: string;
|
|
39
|
-
kind: "table" | "virtual_table";
|
|
40
|
-
account_id: string;
|
|
41
|
-
profile_id: string;
|
|
42
|
-
description?: string | undefined;
|
|
43
|
-
parent_table_id?: string | undefined;
|
|
44
|
-
}>;
|
|
45
|
-
} & {
|
|
46
|
-
context: {
|
|
47
|
-
meta: {
|
|
48
|
-
listTables: import("kitcore").PluginMeta<unknown>;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
} & {
|
|
52
|
-
listTableFields: (options?: {
|
|
53
|
-
table: string;
|
|
54
|
-
fields?: (string | number)[] | undefined;
|
|
55
|
-
fieldKeys?: (string | number)[] | undefined;
|
|
56
|
-
trash?: "only" | "include" | "exclude" | undefined;
|
|
57
|
-
} | {
|
|
58
|
-
tableId: string;
|
|
59
|
-
fields?: (string | number)[] | undefined;
|
|
60
|
-
fieldKeys?: (string | number)[] | undefined;
|
|
61
|
-
trash?: "only" | "include" | "exclude" | undefined;
|
|
62
|
-
} | undefined) => Promise<{
|
|
63
|
-
data: {
|
|
64
|
-
id: string;
|
|
65
|
-
type: "string" | "number" | "boolean" | "text" | "datetime" | "decimal" | "json" | "email" | "link" | "multiple_string" | "labeled_string" | "multiple_labeled_string" | "multiple_text" | "multiple_boolean" | "multiple_number" | "multiple_decimal" | "multiple_datetime" | "uuid" | "multiple_uuid" | "multiple_json" | "formula" | "button_trigger_zap" | "button_continue_zap" | "multiple_email" | "multiple_link" | "currency" | "phone_number" | "ai_formula" | "linked_record" | "multiple_linked_record";
|
|
66
|
-
name: string;
|
|
67
|
-
created_at?: string | undefined;
|
|
68
|
-
edited_at?: string | undefined;
|
|
69
|
-
options?: Record<string, unknown> | undefined;
|
|
70
|
-
config?: Record<string, unknown> | undefined;
|
|
71
|
-
deleted_at?: string | null | undefined;
|
|
72
|
-
}[];
|
|
73
|
-
}>;
|
|
74
|
-
} & {
|
|
75
|
-
context: {
|
|
76
|
-
meta: {
|
|
77
|
-
listTableFields: import("kitcore").PluginMeta<unknown>;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
} & {
|
|
81
|
-
context: {
|
|
82
|
-
meta: Record<string, import("kitcore").PluginMeta>;
|
|
83
|
-
};
|
|
84
|
-
}) => {
|
|
85
|
-
updateTableRecords: (options?: {
|
|
86
|
-
table: string;
|
|
87
|
-
records: {
|
|
88
|
-
id: string;
|
|
89
|
-
data: Record<string, unknown>;
|
|
90
|
-
}[];
|
|
91
|
-
keyMode: "names" | "ids";
|
|
92
|
-
} | {
|
|
93
|
-
tableId: string;
|
|
94
|
-
records: {
|
|
95
|
-
id: string;
|
|
96
|
-
data: Record<string, unknown>;
|
|
97
|
-
}[];
|
|
98
|
-
keyMode: "names" | "ids";
|
|
99
|
-
} | undefined) => Promise<{
|
|
100
|
-
data: {
|
|
101
|
-
data: Record<string, unknown>;
|
|
102
|
-
id: string;
|
|
103
|
-
created_at: string;
|
|
104
|
-
edited_at: string;
|
|
105
|
-
deleted_at?: string | null | undefined;
|
|
106
|
-
}[];
|
|
107
|
-
}>;
|
|
108
|
-
} & {
|
|
109
|
-
context: {
|
|
110
|
-
meta: {
|
|
111
|
-
updateTableRecords: import("kitcore").PluginMeta<unknown>;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
export type UpdateTableRecordsPluginProvides = ReturnType<typeof updateTableRecordsPlugin>;
|
|
116
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/updateTableRecords/index.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDpC,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,UAAU,CACvD,OAAO,wBAAwB,CAChC,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { definePlugin } from "kitcore";
|
|
2
|
-
import { createPluginMethod } from "kitcore";
|
|
3
|
-
import { UpdateTableRecordsOptionsInputSchema, UpdateTableRecordsApiResponseSchema, RecordItemSchema, } from "./schemas";
|
|
4
|
-
import { tableIdResolver, tableUpdateRecordsResolver, } from "../../../resolvers";
|
|
5
|
-
import { tableRecordFormatter } from "../../../formatters";
|
|
6
|
-
import { createFieldKeyTranslator, transformRecordItem, throwOnRecordErrors, throwOnResponseErrors, } from "../utils";
|
|
7
|
-
import { tablesDefaults } from "../shared";
|
|
8
|
-
export const updateTableRecordsPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
9
|
-
...tablesDefaults,
|
|
10
|
-
name: "updateTableRecords",
|
|
11
|
-
type: "update",
|
|
12
|
-
itemType: "Record",
|
|
13
|
-
returnType: "RecordItem[]",
|
|
14
|
-
inputSchema: UpdateTableRecordsOptionsInputSchema,
|
|
15
|
-
outputSchema: RecordItemSchema,
|
|
16
|
-
resolvers: {
|
|
17
|
-
table: tableIdResolver,
|
|
18
|
-
records: tableUpdateRecordsResolver,
|
|
19
|
-
},
|
|
20
|
-
formatter: tableRecordFormatter,
|
|
21
|
-
handler: async ({ sdk, options }) => {
|
|
22
|
-
const { api } = sdk.context;
|
|
23
|
-
const tableId = "table" in options ? options.table : options.tableId;
|
|
24
|
-
const translator = await createFieldKeyTranslator({
|
|
25
|
-
api,
|
|
26
|
-
tableId,
|
|
27
|
-
keyMode: options.keyMode,
|
|
28
|
-
});
|
|
29
|
-
const rawResponse = await api.patch(`/tables/api/v1/tables/${tableId}/records`, {
|
|
30
|
-
updated_records: options.records.map((record) => ({
|
|
31
|
-
id: record.id,
|
|
32
|
-
data: translator.translateInput(record.data),
|
|
33
|
-
})),
|
|
34
|
-
}, { authRequired: true, resource: { type: "table", id: tableId } });
|
|
35
|
-
throwOnResponseErrors(rawResponse);
|
|
36
|
-
const response = UpdateTableRecordsApiResponseSchema.parse(rawResponse);
|
|
37
|
-
for (const changeset of response.data) {
|
|
38
|
-
throwOnRecordErrors(changeset.new);
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
data: response.data.map((changeset) => ({
|
|
42
|
-
...transformRecordItem(changeset.new),
|
|
43
|
-
data: translator.translateOutput(changeset.new.data),
|
|
44
|
-
})),
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
}));
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { RecordItemSchema, type RecordItem } from "../getTableRecord/schemas";
|
|
3
|
-
export { RecordItemSchema };
|
|
4
|
-
export type { RecordItem };
|
|
5
|
-
export declare const UpdateTableRecordsApiResponseSchema: z.ZodObject<{
|
|
6
|
-
data: z.ZodArray<z.ZodObject<{
|
|
7
|
-
change_id: z.ZodString;
|
|
8
|
-
old: z.ZodNullable<z.ZodObject<{
|
|
9
|
-
id: z.ZodString;
|
|
10
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11
|
-
created_at: z.ZodString;
|
|
12
|
-
edited_at: z.ZodString;
|
|
13
|
-
schema_revision_id: z.ZodNumber;
|
|
14
|
-
errors: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
15
|
-
orig_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
16
|
-
is_source_record: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
17
|
-
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
-
}, z.core.$strip>>;
|
|
19
|
-
new: z.ZodObject<{
|
|
20
|
-
id: z.ZodString;
|
|
21
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
22
|
-
created_at: z.ZodString;
|
|
23
|
-
edited_at: z.ZodString;
|
|
24
|
-
schema_revision_id: z.ZodNumber;
|
|
25
|
-
errors: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
26
|
-
orig_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
27
|
-
is_source_record: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
28
|
-
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
changed_field_ids: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
|
|
31
|
-
record_id: z.ZodString;
|
|
32
|
-
}, z.core.$strip>>;
|
|
33
|
-
}, z.core.$strip>;
|
|
34
|
-
export type UpdateTableRecordsApiResponse = z.infer<typeof UpdateTableRecordsApiResponseSchema>;
|
|
35
|
-
export declare const UpdateRecordSchema: z.ZodObject<{
|
|
36
|
-
id: z.ZodString;
|
|
37
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
38
|
-
}, z.core.$strip>;
|
|
39
|
-
export type UpdateRecord = z.infer<typeof UpdateRecordSchema>;
|
|
40
|
-
export declare const UpdateTableRecordsOptionsSchema: z.ZodObject<{
|
|
41
|
-
table: z.ZodString & {
|
|
42
|
-
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
43
|
-
};
|
|
44
|
-
records: z.ZodArray<z.ZodObject<{
|
|
45
|
-
id: z.ZodString;
|
|
46
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
47
|
-
}, z.core.$strip>>;
|
|
48
|
-
keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
49
|
-
names: "names";
|
|
50
|
-
ids: "ids";
|
|
51
|
-
}>>>;
|
|
52
|
-
}, z.core.$strip>;
|
|
53
|
-
declare const UpdateTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
|
|
54
|
-
tableId: z.ZodString;
|
|
55
|
-
records: z.ZodArray<z.ZodObject<{
|
|
56
|
-
id: z.ZodString;
|
|
57
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
58
|
-
}, z.core.$strip>>;
|
|
59
|
-
keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
60
|
-
names: "names";
|
|
61
|
-
ids: "ids";
|
|
62
|
-
}>>>;
|
|
63
|
-
}, z.core.$strip>;
|
|
64
|
-
export declare const UpdateTableRecordsOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
65
|
-
table: z.ZodString & {
|
|
66
|
-
_def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
|
|
67
|
-
};
|
|
68
|
-
records: z.ZodArray<z.ZodObject<{
|
|
69
|
-
id: z.ZodString;
|
|
70
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
71
|
-
}, z.core.$strip>>;
|
|
72
|
-
keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
73
|
-
names: "names";
|
|
74
|
-
ids: "ids";
|
|
75
|
-
}>>>;
|
|
76
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
-
tableId: z.ZodString;
|
|
78
|
-
records: z.ZodArray<z.ZodObject<{
|
|
79
|
-
id: z.ZodString;
|
|
80
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
81
|
-
}, z.core.$strip>>;
|
|
82
|
-
keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
83
|
-
names: "names";
|
|
84
|
-
ids: "ids";
|
|
85
|
-
}>>>;
|
|
86
|
-
}, z.core.$strip>]>;
|
|
87
|
-
export type UpdateTableRecordsOptions = z.infer<typeof UpdateTableRecordsOptionsSchema> | (Omit<z.infer<typeof UpdateTableRecordsOptionsSchemaDeprecated>, "tableId"> & {
|
|
88
|
-
/** @deprecated Use `table` instead. */
|
|
89
|
-
tableId: z.infer<typeof UpdateTableRecordsOptionsSchemaDeprecated>["tableId"];
|
|
90
|
-
});
|
|
91
|
-
export interface UpdateTableRecordsResult {
|
|
92
|
-
data: RecordItem[];
|
|
93
|
-
}
|
|
94
|
-
export interface UpdateTableRecordsSdkFunction {
|
|
95
|
-
updateTableRecords: (options: UpdateTableRecordsOptions) => Promise<UpdateTableRecordsResult>;
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/updateTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAEL,gBAAgB,EAChB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,CAAC;AAU3B,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE9C,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;iBAK7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAc9D,eAAO,MAAM,+BAA+B;;;;;;;;;;;;iBAMF,CAAC;AAG3C,QAAA,MAAM,yCAAyC;;;;;;;;;;iBAOf,CAAC;AAGjC,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;mBAKP,CAAC;AAG3C,MAAM,MAAM,yBAAyB,GACjC,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,GAC/C,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,EACzD,SAAS,CACV,GAAG;IACF,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,OAAO,yCAAyC,CACjD,CAAC,SAAS,CAAC,CAAC;CACd,CAAC,CAAC;AAEP,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,CAClB,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACxC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { TablePropertySchema } from "../../../types/properties";
|
|
3
|
-
import { RecordApiItemSchema, RecordItemSchema, } from "../getTableRecord/schemas";
|
|
4
|
-
import { KeyModeSchema } from "../utils";
|
|
5
|
-
// Re-export for consumers
|
|
6
|
-
export { RecordItemSchema };
|
|
7
|
-
const RecordChangesetSchema = z.object({
|
|
8
|
-
change_id: z.string(),
|
|
9
|
-
old: RecordApiItemSchema.nullable(),
|
|
10
|
-
new: RecordApiItemSchema,
|
|
11
|
-
changed_field_ids: z.array(z.number()).nullable(),
|
|
12
|
-
record_id: z.string(),
|
|
13
|
-
});
|
|
14
|
-
export const UpdateTableRecordsApiResponseSchema = z.object({
|
|
15
|
-
data: z.array(RecordChangesetSchema),
|
|
16
|
-
});
|
|
17
|
-
export const UpdateRecordSchema = z.object({
|
|
18
|
-
id: z.string().describe("The record ID to update"),
|
|
19
|
-
data: z
|
|
20
|
-
.record(z.string(), z.unknown())
|
|
21
|
-
.describe("The field values to update, keyed by field key"),
|
|
22
|
-
});
|
|
23
|
-
const UpdateTableRecordsDescription = "Update one or more records in a table";
|
|
24
|
-
const UpdateTableRecordsBase = z.object({
|
|
25
|
-
records: z
|
|
26
|
-
.array(UpdateRecordSchema)
|
|
27
|
-
.min(1)
|
|
28
|
-
.max(100)
|
|
29
|
-
.describe("Array of records to update (max 100)"),
|
|
30
|
-
keyMode: KeyModeSchema,
|
|
31
|
-
});
|
|
32
|
-
// Schema for docs/registry (new param names only)
|
|
33
|
-
export const UpdateTableRecordsOptionsSchema = z
|
|
34
|
-
.object({
|
|
35
|
-
table: TablePropertySchema,
|
|
36
|
-
})
|
|
37
|
-
.merge(UpdateTableRecordsBase)
|
|
38
|
-
.describe(UpdateTableRecordsDescription)
|
|
39
|
-
.meta({ aliases: { tableId: "table" } });
|
|
40
|
-
// Deprecated schema (backward compat)
|
|
41
|
-
const UpdateTableRecordsOptionsSchemaDeprecated = z
|
|
42
|
-
.object({
|
|
43
|
-
tableId: z
|
|
44
|
-
.string()
|
|
45
|
-
.regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID")
|
|
46
|
-
.describe("The unique identifier of the table"),
|
|
47
|
-
})
|
|
48
|
-
.merge(UpdateTableRecordsBase);
|
|
49
|
-
// Union for runtime validation
|
|
50
|
-
export const UpdateTableRecordsOptionsInputSchema = z
|
|
51
|
-
.union([
|
|
52
|
-
UpdateTableRecordsOptionsSchema,
|
|
53
|
-
UpdateTableRecordsOptionsSchemaDeprecated,
|
|
54
|
-
])
|
|
55
|
-
.describe(UpdateTableRecordsDescription);
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { ApiClient } from "../../api";
|
|
3
|
-
import type { TableApiItem, TableItem } from "./listTables/schemas";
|
|
4
|
-
import type { RecordApiItem, RecordItem } from "./getTableRecord/schemas";
|
|
5
|
-
import type { FieldApiItem, FieldItem } from "./listTableFields/schemas";
|
|
6
|
-
export declare function formatFieldValue(v: unknown): string;
|
|
7
|
-
/**
|
|
8
|
-
* Convert a field ID to its numeric form for the Tables API.
|
|
9
|
-
* Accepts "f6", "6", or 6 and returns 6.
|
|
10
|
-
*/
|
|
11
|
-
export declare function toNumericFieldId(id: string | number): number;
|
|
12
|
-
export declare function transformTableItem(apiItem: TableApiItem): TableItem;
|
|
13
|
-
export declare function transformFieldItem(apiItem: FieldApiItem): FieldItem;
|
|
14
|
-
export declare function transformRecordItem(apiItem: RecordApiItem): RecordItem;
|
|
15
|
-
/**
|
|
16
|
-
* Check a record API item for field-level validation errors and throw if any
|
|
17
|
-
* are present. The errors dict is keyed by field ID, and each value has
|
|
18
|
-
* `{s, v, e, h}` where `h` is the human-friendly message and `e` is the
|
|
19
|
-
* technical one.
|
|
20
|
-
*/
|
|
21
|
-
export declare function throwOnRecordErrors(record: RecordApiItem): void;
|
|
22
|
-
/**
|
|
23
|
-
* Check an API response for top-level validation errors (in `meta.errors`)
|
|
24
|
-
* and throw if any are present.
|
|
25
|
-
*/
|
|
26
|
-
export declare function throwOnResponseErrors(response: {
|
|
27
|
-
meta?: {
|
|
28
|
-
errors?: unknown[];
|
|
29
|
-
} | null;
|
|
30
|
-
}): void;
|
|
31
|
-
export declare const KeyModeSchema: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
32
|
-
names: "names";
|
|
33
|
-
ids: "ids";
|
|
34
|
-
}>>>;
|
|
35
|
-
export type KeyMode = z.infer<typeof KeyModeSchema>;
|
|
36
|
-
export declare const TrashSchema: z.ZodOptional<z.ZodEnum<{
|
|
37
|
-
only: "only";
|
|
38
|
-
include: "include";
|
|
39
|
-
exclude: "exclude";
|
|
40
|
-
}>>;
|
|
41
|
-
export type Trash = z.infer<typeof TrashSchema>;
|
|
42
|
-
export declare function isFieldId(key: string): boolean;
|
|
43
|
-
export declare const NESTED_COMPONENTS: Record<string, Set<string>>;
|
|
44
|
-
/**
|
|
45
|
-
* Resolve an array of field keys (names like "Email" or IDs like "f6", "6", 6)
|
|
46
|
-
* to numeric field IDs for the API. Only fetches field metadata if any
|
|
47
|
-
* non-ID keys are present.
|
|
48
|
-
*/
|
|
49
|
-
export declare function resolveFieldKeys({ api, tableId, fieldKeys, }: {
|
|
50
|
-
api: ApiClient;
|
|
51
|
-
tableId: string;
|
|
52
|
-
fieldKeys: Array<string | number>;
|
|
53
|
-
}): Promise<number[]>;
|
|
54
|
-
export interface FieldKeyTranslator {
|
|
55
|
-
translateInput(data: Record<string, unknown>): Record<string, unknown>;
|
|
56
|
-
translateOutput(data: Record<string, unknown>): Record<string, unknown>;
|
|
57
|
-
translateFieldKey(key: string): string;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Resolve the field mapping for a table and return a translator.
|
|
61
|
-
* Fetches field metadata from the API once (when keyMode is "names"),
|
|
62
|
-
* then all translate methods are synchronous.
|
|
63
|
-
*/
|
|
64
|
-
export declare function createFieldKeyTranslator({ api, tableId, keyMode, }: {
|
|
65
|
-
api: ApiClient;
|
|
66
|
-
tableId: string;
|
|
67
|
-
keyMode: KeyMode;
|
|
68
|
-
}): Promise<FieldKeyTranslator>;
|
|
69
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/plugins/tables/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEzE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAUnD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAS5D;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,SAAS,CAiBnE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,SAAS,CAWnE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,CAQtE;AAkCD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAgB/D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE;IAC9C,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;CACtC,GAAG,IAAI,CASP;AAED,eAAO,MAAM,aAAa;;;IAMvB,CAAC;AAEJ,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,WAAW;;;;GAKrB,CAAC;AAEJ,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAIhD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE9C;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAKzD,CAAC;AA8CF;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,GAAG,EACH,OAAO,EACP,SAAS,GACV,EAAE;IACD,GAAG,EAAE,SAAS,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACnC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAyBpB;AAED,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvE,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxE,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,GAAG,EACH,OAAO,EACP,OAAO,GACR,EAAE;IACD,GAAG,EAAE,SAAS,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAkF9B"}
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { ZapierValidationError } from "../../types/errors";
|
|
3
|
-
export function formatFieldValue(v) {
|
|
4
|
-
if (v == null)
|
|
5
|
-
return "";
|
|
6
|
-
if (typeof v === "object") {
|
|
7
|
-
try {
|
|
8
|
-
return JSON.stringify(v);
|
|
9
|
-
}
|
|
10
|
-
catch {
|
|
11
|
-
return String(v);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return String(v);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Convert a field ID to its numeric form for the Tables API.
|
|
18
|
-
* Accepts "f6", "6", or 6 and returns 6.
|
|
19
|
-
*/
|
|
20
|
-
export function toNumericFieldId(id) {
|
|
21
|
-
if (typeof id === "number")
|
|
22
|
-
return id;
|
|
23
|
-
const num = parseInt(id.replace(/^f/, ""), 10);
|
|
24
|
-
if (isNaN(num)) {
|
|
25
|
-
throw new ZapierValidationError(`Invalid field ID: "${id}". Expected a numeric ID like "f6", "6", or 6.`);
|
|
26
|
-
}
|
|
27
|
-
return num;
|
|
28
|
-
}
|
|
29
|
-
export function transformTableItem(apiItem) {
|
|
30
|
-
return {
|
|
31
|
-
id: apiItem.id,
|
|
32
|
-
name: apiItem.name,
|
|
33
|
-
description: apiItem.description ?? undefined,
|
|
34
|
-
created_at: apiItem.created_at,
|
|
35
|
-
edited_at: apiItem.edited_at,
|
|
36
|
-
kind: apiItem.kind,
|
|
37
|
-
account_id: String(apiItem.owner_account_public_id ?? apiItem.owner_account_id),
|
|
38
|
-
profile_id: String(apiItem.owner_zapier_customuser_public_id ??
|
|
39
|
-
apiItem.owner_zapier_customuser_id),
|
|
40
|
-
parent_table_id: apiItem.parent_table_id ?? undefined,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export function transformFieldItem(apiItem) {
|
|
44
|
-
return {
|
|
45
|
-
id: `f${apiItem.id}`,
|
|
46
|
-
type: apiItem.type,
|
|
47
|
-
name: apiItem.name,
|
|
48
|
-
created_at: apiItem.created_at,
|
|
49
|
-
edited_at: apiItem.edited_at,
|
|
50
|
-
options: apiItem.options,
|
|
51
|
-
config: apiItem.config,
|
|
52
|
-
deleted_at: apiItem.deleted_at,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export function transformRecordItem(apiItem) {
|
|
56
|
-
return {
|
|
57
|
-
id: apiItem.id,
|
|
58
|
-
data: apiItem.data,
|
|
59
|
-
created_at: apiItem.created_at,
|
|
60
|
-
edited_at: apiItem.edited_at,
|
|
61
|
-
deleted_at: apiItem.deleted_at,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function formatRecordError(fieldId, err) {
|
|
65
|
-
const message = err.h || err.e || "validation error";
|
|
66
|
-
if (err.v !== undefined) {
|
|
67
|
-
return `Field ${fieldId}: ${message} (value: ${JSON.stringify(err.v)})`;
|
|
68
|
-
}
|
|
69
|
-
return `Field ${fieldId}: ${message}`;
|
|
70
|
-
}
|
|
71
|
-
function formatResponseError(err) {
|
|
72
|
-
const message = err.human_title || err.title || "Unknown error";
|
|
73
|
-
if (err.meta && Object.keys(err.meta).length > 0) {
|
|
74
|
-
const metaParts = Object.entries(err.meta)
|
|
75
|
-
.map(([key, val]) => `${key}: ${JSON.stringify(val)}`)
|
|
76
|
-
.join(", ");
|
|
77
|
-
return `${message} (${metaParts})`;
|
|
78
|
-
}
|
|
79
|
-
return message;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Check a record API item for field-level validation errors and throw if any
|
|
83
|
-
* are present. The errors dict is keyed by field ID, and each value has
|
|
84
|
-
* `{s, v, e, h}` where `h` is the human-friendly message and `e` is the
|
|
85
|
-
* technical one.
|
|
86
|
-
*/
|
|
87
|
-
export function throwOnRecordErrors(record) {
|
|
88
|
-
if (!record.errors)
|
|
89
|
-
return;
|
|
90
|
-
const messages = [];
|
|
91
|
-
for (const [fieldId, error] of Object.entries(record.errors)) {
|
|
92
|
-
const err = error;
|
|
93
|
-
if (err.s === "error") {
|
|
94
|
-
messages.push(formatRecordError(fieldId, err));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
if (messages.length > 0) {
|
|
98
|
-
throw new ZapierValidationError(`Record ${record.id} has errors: ${messages.join("; ")}`);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Check an API response for top-level validation errors (in `meta.errors`)
|
|
103
|
-
* and throw if any are present.
|
|
104
|
-
*/
|
|
105
|
-
export function throwOnResponseErrors(response) {
|
|
106
|
-
const errors = response.meta?.errors;
|
|
107
|
-
if (!errors || errors.length === 0)
|
|
108
|
-
return;
|
|
109
|
-
const messages = errors.map((err) => formatResponseError(err));
|
|
110
|
-
throw new ZapierValidationError(messages.join("; "));
|
|
111
|
-
}
|
|
112
|
-
export const KeyModeSchema = z
|
|
113
|
-
.enum(["names", "ids"])
|
|
114
|
-
.optional()
|
|
115
|
-
.default("names")
|
|
116
|
-
.describe('How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2).');
|
|
117
|
-
export const TrashSchema = z
|
|
118
|
-
.enum(["exclude", "include", "only"])
|
|
119
|
-
.optional()
|
|
120
|
-
.describe('Control soft-deleted item visibility. "exclude" (default) returns active items only, "include" returns both active and soft-deleted, "only" returns soft-deleted items only.');
|
|
121
|
-
const FIELD_ID_PATTERN = /^f\d+$/;
|
|
122
|
-
export function isFieldId(key) {
|
|
123
|
-
return FIELD_ID_PATTERN.test(key);
|
|
124
|
-
}
|
|
125
|
-
export const NESTED_COMPONENTS = {
|
|
126
|
-
labeled_string: new Set(["value"]),
|
|
127
|
-
ai_formula: new Set(["value"]),
|
|
128
|
-
link: new Set(["link", "text"]),
|
|
129
|
-
linked_record: new Set(["label", "source"]),
|
|
130
|
-
};
|
|
131
|
-
async function getFieldMapping(api, tableId, keyMode) {
|
|
132
|
-
if (keyMode === "ids") {
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
// "names" mode — fetch from API
|
|
136
|
-
const rawResponse = await api.get(`/tables/api/v1/tables/${tableId}/fields`, {
|
|
137
|
-
authRequired: true,
|
|
138
|
-
resource: { type: "table", id: tableId },
|
|
139
|
-
});
|
|
140
|
-
const data = rawResponse.data;
|
|
141
|
-
// First match wins for duplicate names
|
|
142
|
-
const nameToId = new Map();
|
|
143
|
-
const idToName = new Map();
|
|
144
|
-
const idToType = new Map();
|
|
145
|
-
for (const field of data) {
|
|
146
|
-
const id = `f${field.id}`;
|
|
147
|
-
if (!nameToId.has(field.name)) {
|
|
148
|
-
nameToId.set(field.name, id);
|
|
149
|
-
}
|
|
150
|
-
if (!idToName.has(id)) {
|
|
151
|
-
idToName.set(id, field.name);
|
|
152
|
-
}
|
|
153
|
-
idToType.set(id, field.type);
|
|
154
|
-
}
|
|
155
|
-
return { nameToId, idToName, idToType };
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Resolve an array of field keys (names like "Email" or IDs like "f6", "6", 6)
|
|
159
|
-
* to numeric field IDs for the API. Only fetches field metadata if any
|
|
160
|
-
* non-ID keys are present.
|
|
161
|
-
*/
|
|
162
|
-
export async function resolveFieldKeys({ api, tableId, fieldKeys, }) {
|
|
163
|
-
const allAreIds = fieldKeys.every((key) => typeof key === "number" || /^(f?\d+)$/.test(key));
|
|
164
|
-
if (allAreIds) {
|
|
165
|
-
return fieldKeys.map(toNumericFieldId);
|
|
166
|
-
}
|
|
167
|
-
const mapping = await getFieldMapping(api, tableId, "names");
|
|
168
|
-
if (!mapping) {
|
|
169
|
-
return fieldKeys.map(toNumericFieldId);
|
|
170
|
-
}
|
|
171
|
-
return fieldKeys.map((key) => {
|
|
172
|
-
if (typeof key === "number")
|
|
173
|
-
return key;
|
|
174
|
-
if (FIELD_ID_PATTERN.test(key))
|
|
175
|
-
return toNumericFieldId(key);
|
|
176
|
-
const id = mapping.nameToId.get(key);
|
|
177
|
-
if (!id) {
|
|
178
|
-
throw new ZapierValidationError(`Unknown field name: "${key}". Use a valid field name or ID.`);
|
|
179
|
-
}
|
|
180
|
-
return toNumericFieldId(id);
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Resolve the field mapping for a table and return a translator.
|
|
185
|
-
* Fetches field metadata from the API once (when keyMode is "names"),
|
|
186
|
-
* then all translate methods are synchronous.
|
|
187
|
-
*/
|
|
188
|
-
export async function createFieldKeyTranslator({ api, tableId, keyMode, }) {
|
|
189
|
-
const mapping = await getFieldMapping(api, tableId, keyMode);
|
|
190
|
-
return {
|
|
191
|
-
translateInput(data) {
|
|
192
|
-
if (!mapping)
|
|
193
|
-
return data;
|
|
194
|
-
const result = {};
|
|
195
|
-
for (const [key, value] of Object.entries(data)) {
|
|
196
|
-
if (FIELD_ID_PATTERN.test(key) && mapping.idToName.has(key)) {
|
|
197
|
-
result[key] = value;
|
|
198
|
-
}
|
|
199
|
-
else if (mapping.nameToId.has(key)) {
|
|
200
|
-
result[mapping.nameToId.get(key)] = value;
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
result[key] = value;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return result;
|
|
207
|
-
},
|
|
208
|
-
translateOutput(data) {
|
|
209
|
-
if (!mapping)
|
|
210
|
-
return data;
|
|
211
|
-
const result = {};
|
|
212
|
-
for (const [key, value] of Object.entries(data)) {
|
|
213
|
-
if (mapping.idToName.has(key)) {
|
|
214
|
-
result[mapping.idToName.get(key)] = value;
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
result[key] = value;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return result;
|
|
221
|
-
},
|
|
222
|
-
translateFieldKey(key) {
|
|
223
|
-
if (!mapping)
|
|
224
|
-
return key;
|
|
225
|
-
if (FIELD_ID_PATTERN.test(key) && mapping.idToName.has(key)) {
|
|
226
|
-
// Auto-append component for single-component types (e.g., f3 → f3__value for labeled_string)
|
|
227
|
-
const fieldType = mapping.idToType.get(key);
|
|
228
|
-
if (fieldType) {
|
|
229
|
-
const components = NESTED_COMPONENTS[fieldType];
|
|
230
|
-
if (components?.size === 1) {
|
|
231
|
-
return `${key}__${[...components][0]}`;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
return key;
|
|
235
|
-
}
|
|
236
|
-
if (mapping.nameToId.has(key)) {
|
|
237
|
-
const fieldId = mapping.nameToId.get(key);
|
|
238
|
-
// Auto-append component for single-component types (e.g., Status → f3__value for labeled_string)
|
|
239
|
-
const fieldType = mapping.idToType.get(fieldId);
|
|
240
|
-
if (fieldType) {
|
|
241
|
-
const components = NESTED_COMPONENTS[fieldType];
|
|
242
|
-
if (components?.size === 1) {
|
|
243
|
-
return `${fieldId}__${[...components][0]}`;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
return fieldId;
|
|
247
|
-
}
|
|
248
|
-
// Handle nested component syntax (e.g., "Status__value" → "f3__value")
|
|
249
|
-
const sepIndex = key.lastIndexOf("__");
|
|
250
|
-
if (sepIndex > 0) {
|
|
251
|
-
const prefix = key.slice(0, sepIndex);
|
|
252
|
-
const component = key.slice(sepIndex + 2);
|
|
253
|
-
let fieldId;
|
|
254
|
-
if (FIELD_ID_PATTERN.test(prefix) && mapping.idToName.has(prefix)) {
|
|
255
|
-
fieldId = prefix;
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
fieldId = mapping.nameToId.get(prefix);
|
|
259
|
-
}
|
|
260
|
-
if (fieldId) {
|
|
261
|
-
const fieldType = mapping.idToType.get(fieldId);
|
|
262
|
-
if (fieldType && NESTED_COMPONENTS[fieldType]?.has(component)) {
|
|
263
|
-
return `${fieldId}__${component}`;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
return key;
|
|
268
|
-
},
|
|
269
|
-
};
|
|
270
|
-
}
|