@mobilerun/sdk 4.0.0 → 5.1.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 +272 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +41 -24
- package/client.d.mts.map +1 -1
- package/client.d.ts +41 -24
- package/client.d.ts.map +1 -1
- package/client.js +52 -18
- package/client.js.map +1 -1
- package/client.mjs +53 -19
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +10 -10
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +10 -10
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/lib/trajectory-decoder-stream.d.mts.map +1 -1
- package/lib/trajectory-decoder-stream.d.ts.map +1 -1
- package/package.json +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/apps.d.mts +198 -16
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +198 -16
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +102 -0
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +102 -0
- package/resources/apps.mjs.map +1 -1
- package/resources/carriers.d.mts +108 -7
- package/resources/carriers.d.mts.map +1 -1
- package/resources/carriers.d.ts +108 -7
- package/resources/carriers.d.ts.map +1 -1
- package/resources/carriers.js +3 -0
- package/resources/carriers.js.map +1 -1
- package/resources/carriers.mjs +3 -0
- package/resources/carriers.mjs.map +1 -1
- package/resources/connect/connect.d.mts +18 -0
- package/resources/connect/connect.d.mts.map +1 -0
- package/resources/connect/connect.d.ts +18 -0
- package/resources/connect/connect.d.ts.map +1 -0
- package/resources/connect/connect.js +25 -0
- package/resources/connect/connect.js.map +1 -0
- package/resources/connect/connect.mjs +20 -0
- package/resources/connect/connect.mjs.map +1 -0
- package/resources/connect/countries.d.mts +79 -0
- package/resources/connect/countries.d.mts.map +1 -0
- package/resources/connect/countries.d.ts +79 -0
- package/resources/connect/countries.d.ts.map +1 -0
- package/resources/connect/countries.js +15 -0
- package/resources/connect/countries.js.map +1 -0
- package/resources/connect/countries.mjs +11 -0
- package/resources/connect/countries.mjs.map +1 -0
- package/resources/connect/index.d.mts +5 -0
- package/resources/connect/index.d.mts.map +1 -0
- package/resources/connect/index.d.ts +5 -0
- package/resources/connect/index.d.ts.map +1 -0
- package/resources/connect/index.js +13 -0
- package/resources/connect/index.js.map +1 -0
- package/resources/connect/index.mjs +6 -0
- package/resources/connect/index.mjs.map +1 -0
- package/resources/connect/proxies.d.mts +454 -0
- package/resources/connect/proxies.d.mts.map +1 -0
- package/resources/connect/proxies.d.ts +454 -0
- package/resources/connect/proxies.d.ts.map +1 -0
- package/resources/connect/proxies.js +57 -0
- package/resources/connect/proxies.js.map +1 -0
- package/resources/connect/proxies.mjs +53 -0
- package/resources/connect/proxies.mjs.map +1 -0
- package/resources/connect/users.d.mts +387 -0
- package/resources/connect/users.d.mts.map +1 -0
- package/resources/connect/users.d.ts +387 -0
- package/resources/connect/users.d.ts.map +1 -0
- package/resources/connect/users.js +54 -0
- package/resources/connect/users.js.map +1 -0
- package/resources/connect/users.mjs +50 -0
- package/resources/connect/users.mjs.map +1 -0
- package/resources/connect.d.mts +2 -0
- package/resources/connect.d.mts.map +1 -0
- package/resources/connect.d.ts +2 -0
- package/resources/connect.d.ts.map +1 -0
- package/resources/connect.js +6 -0
- package/resources/connect.js.map +1 -0
- package/resources/connect.mjs +3 -0
- package/resources/connect.mjs.map +1 -0
- package/resources/credentials/credentials.d.mts +3 -0
- package/resources/credentials/credentials.d.mts.map +1 -1
- package/resources/credentials/credentials.d.ts +3 -0
- package/resources/credentials/credentials.d.ts.map +1 -1
- package/resources/credentials/credentials.js +3 -0
- package/resources/credentials/credentials.js.map +1 -1
- package/resources/credentials/credentials.mjs +3 -0
- package/resources/credentials/credentials.mjs.map +1 -1
- package/resources/credentials/index.d.mts.map +1 -1
- package/resources/credentials/index.d.ts.map +1 -1
- package/resources/credentials/index.mjs.map +1 -1
- package/resources/credentials/packages/credentials/credentials.d.mts +3 -0
- package/resources/credentials/packages/credentials/credentials.d.mts.map +1 -1
- package/resources/credentials/packages/credentials/credentials.d.ts +3 -0
- package/resources/credentials/packages/credentials/credentials.d.ts.map +1 -1
- package/resources/credentials/packages/credentials/credentials.js +3 -0
- package/resources/credentials/packages/credentials/credentials.js.map +1 -1
- package/resources/credentials/packages/credentials/credentials.mjs +3 -0
- package/resources/credentials/packages/credentials/credentials.mjs.map +1 -1
- package/resources/credentials/packages/credentials/fields.d.mts +3 -0
- package/resources/credentials/packages/credentials/fields.d.mts.map +1 -1
- package/resources/credentials/packages/credentials/fields.d.ts +3 -0
- package/resources/credentials/packages/credentials/fields.d.ts.map +1 -1
- package/resources/credentials/packages/credentials/fields.js +3 -0
- package/resources/credentials/packages/credentials/fields.js.map +1 -1
- package/resources/credentials/packages/credentials/fields.mjs +3 -0
- package/resources/credentials/packages/credentials/fields.mjs.map +1 -1
- package/resources/credentials/packages/credentials/index.d.mts.map +1 -1
- package/resources/credentials/packages/credentials/index.d.ts.map +1 -1
- package/resources/credentials/packages/credentials/index.mjs.map +1 -1
- package/resources/credentials/packages/credentials.d.mts.map +1 -1
- package/resources/credentials/packages/credentials.d.ts.map +1 -1
- package/resources/credentials/packages/credentials.mjs.map +1 -1
- package/resources/credentials/packages/index.d.mts.map +1 -1
- package/resources/credentials/packages/index.d.ts.map +1 -1
- package/resources/credentials/packages/index.mjs.map +1 -1
- package/resources/credentials/packages/packages.d.mts +3 -0
- package/resources/credentials/packages/packages.d.mts.map +1 -1
- package/resources/credentials/packages/packages.d.ts +3 -0
- package/resources/credentials/packages/packages.d.ts.map +1 -1
- package/resources/credentials/packages/packages.js +3 -0
- package/resources/credentials/packages/packages.js.map +1 -1
- package/resources/credentials/packages/packages.mjs +3 -0
- package/resources/credentials/packages/packages.mjs.map +1 -1
- package/resources/credentials/packages.d.mts.map +1 -1
- package/resources/credentials/packages.d.ts.map +1 -1
- package/resources/credentials/packages.mjs.map +1 -1
- package/resources/credentials.d.mts.map +1 -1
- package/resources/credentials.d.ts.map +1 -1
- package/resources/credentials.mjs.map +1 -1
- package/resources/devices/actions.d.mts.map +1 -1
- package/resources/devices/actions.d.ts.map +1 -1
- package/resources/devices/actions.mjs.map +1 -1
- package/resources/devices/apps.d.mts +43 -22
- package/resources/devices/apps.d.mts.map +1 -1
- package/resources/devices/apps.d.ts +43 -22
- package/resources/devices/apps.d.ts.map +1 -1
- package/resources/devices/apps.js +19 -19
- package/resources/devices/apps.js.map +1 -1
- package/resources/devices/apps.mjs +19 -19
- package/resources/devices/apps.mjs.map +1 -1
- package/resources/devices/devices.d.mts +101 -36
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +101 -36
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +63 -20
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +63 -20
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/esim.d.mts +8 -2
- package/resources/devices/esim.d.mts.map +1 -1
- package/resources/devices/esim.d.ts +8 -2
- package/resources/devices/esim.d.ts.map +1 -1
- package/resources/devices/esim.mjs.map +1 -1
- package/resources/devices/files.d.mts.map +1 -1
- package/resources/devices/files.d.ts.map +1 -1
- package/resources/devices/files.mjs.map +1 -1
- package/resources/devices/index.d.mts +6 -5
- package/resources/devices/index.d.mts.map +1 -1
- package/resources/devices/index.d.ts +6 -5
- package/resources/devices/index.d.ts.map +1 -1
- package/resources/devices/index.js +5 -3
- package/resources/devices/index.js.map +1 -1
- package/resources/devices/index.mjs +3 -2
- package/resources/devices/index.mjs.map +1 -1
- package/resources/devices/keyboard.d.mts +5 -0
- package/resources/devices/keyboard.d.mts.map +1 -1
- package/resources/devices/keyboard.d.ts +5 -0
- package/resources/devices/keyboard.d.ts.map +1 -1
- package/resources/devices/keyboard.mjs.map +1 -1
- package/resources/devices/language.d.mts +43 -0
- package/resources/devices/language.d.mts.map +1 -0
- package/resources/devices/language.d.ts +43 -0
- package/resources/devices/language.d.ts.map +1 -0
- package/resources/devices/language.js +47 -0
- package/resources/devices/language.js.map +1 -0
- package/resources/devices/language.mjs +43 -0
- package/resources/devices/language.mjs.map +1 -0
- package/resources/devices/location.d.mts +3 -10
- package/resources/devices/location.d.mts.map +1 -1
- package/resources/devices/location.d.ts +3 -10
- package/resources/devices/location.d.ts.map +1 -1
- package/resources/devices/location.js.map +1 -1
- package/resources/devices/location.mjs.map +1 -1
- package/resources/devices/packages.d.mts.map +1 -1
- package/resources/devices/packages.d.ts.map +1 -1
- package/resources/devices/packages.mjs.map +1 -1
- package/resources/devices/profile.d.mts.map +1 -1
- package/resources/devices/profile.d.ts.map +1 -1
- package/resources/devices/profile.mjs.map +1 -1
- package/resources/devices/proxy.d.mts +2 -7
- package/resources/devices/proxy.d.mts.map +1 -1
- package/resources/devices/proxy.d.ts +2 -7
- package/resources/devices/proxy.d.ts.map +1 -1
- package/resources/devices/proxy.mjs.map +1 -1
- package/resources/devices/state.d.mts +38 -3
- package/resources/devices/state.d.mts.map +1 -1
- package/resources/devices/state.d.ts +38 -3
- package/resources/devices/state.d.ts.map +1 -1
- package/resources/devices/state.js +17 -0
- package/resources/devices/state.js.map +1 -1
- package/resources/devices/state.mjs +17 -0
- package/resources/devices/state.mjs.map +1 -1
- package/resources/devices/tasks.d.mts +3 -0
- package/resources/devices/tasks.d.mts.map +1 -1
- package/resources/devices/tasks.d.ts +3 -0
- package/resources/devices/tasks.d.ts.map +1 -1
- package/resources/devices/tasks.js +3 -0
- package/resources/devices/tasks.js.map +1 -1
- package/resources/devices/tasks.mjs +3 -0
- package/resources/devices/tasks.mjs.map +1 -1
- package/resources/devices/timezone.d.mts +37 -0
- package/resources/devices/timezone.d.mts.map +1 -0
- package/resources/devices/timezone.d.ts +37 -0
- package/resources/devices/timezone.d.ts.map +1 -0
- package/resources/devices/{time.js → timezone.js} +13 -30
- package/resources/devices/timezone.js.map +1 -0
- package/resources/devices/{time.mjs → timezone.mjs} +11 -28
- package/resources/devices/timezone.mjs.map +1 -0
- package/resources/devices.d.mts.map +1 -1
- package/resources/devices.d.ts.map +1 -1
- package/resources/devices.mjs.map +1 -1
- package/resources/hooks.d.mts +35 -4
- package/resources/hooks.d.mts.map +1 -1
- package/resources/hooks.d.ts +35 -4
- package/resources/hooks.d.ts.map +1 -1
- package/resources/hooks.js +9 -3
- package/resources/hooks.js.map +1 -1
- package/resources/hooks.mjs +9 -3
- package/resources/hooks.mjs.map +1 -1
- package/resources/index.d.mts +8 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -2
- package/resources/index.mjs.map +1 -1
- package/resources/models.d.mts +3 -0
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +3 -0
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +3 -0
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +3 -0
- package/resources/models.mjs.map +1 -1
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.mjs.map +1 -1
- package/resources/proxies.d.mts +90 -1
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +90 -1
- package/resources/proxies.d.ts.map +1 -1
- package/resources/proxies.js +9 -0
- package/resources/proxies.js.map +1 -1
- package/resources/proxies.mjs +9 -0
- package/resources/proxies.mjs.map +1 -1
- package/resources/shared.d.mts +21 -10
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +21 -10
- package/resources/shared.d.ts.map +1 -1
- package/resources/tasks/index.d.mts.map +1 -1
- package/resources/tasks/index.d.ts.map +1 -1
- package/resources/tasks/index.mjs.map +1 -1
- package/resources/tasks/screenshots.d.mts.map +1 -1
- package/resources/tasks/screenshots.d.ts.map +1 -1
- package/resources/tasks/screenshots.mjs.map +1 -1
- package/resources/tasks/tasks.d.mts +66 -5
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +66 -5
- package/resources/tasks/tasks.d.ts.map +1 -1
- package/resources/tasks/tasks.js.map +1 -1
- package/resources/tasks/tasks.mjs.map +1 -1
- package/resources/tasks/ui-states.d.mts.map +1 -1
- package/resources/tasks/ui-states.d.ts.map +1 -1
- package/resources/tasks/ui-states.mjs.map +1 -1
- package/resources/tasks.d.mts.map +1 -1
- package/resources/tasks.d.ts.map +1 -1
- package/resources/tasks.mjs.map +1 -1
- package/resources/webhooks/deliveries.d.mts +173 -0
- package/resources/webhooks/deliveries.d.mts.map +1 -0
- package/resources/webhooks/deliveries.d.ts +173 -0
- package/resources/webhooks/deliveries.d.ts.map +1 -0
- package/resources/webhooks/deliveries.js +62 -0
- package/resources/webhooks/deliveries.js.map +1 -0
- package/resources/webhooks/deliveries.mjs +58 -0
- package/resources/webhooks/deliveries.mjs.map +1 -0
- package/resources/webhooks/index.d.mts +3 -0
- package/resources/webhooks/index.d.mts.map +1 -0
- package/resources/webhooks/index.d.ts +3 -0
- package/resources/webhooks/index.d.ts.map +1 -0
- package/resources/webhooks/index.js +9 -0
- package/resources/webhooks/index.js.map +1 -0
- package/resources/webhooks/index.mjs +4 -0
- package/resources/webhooks/index.mjs.map +1 -0
- package/resources/webhooks/webhooks.d.mts +271 -0
- package/resources/webhooks/webhooks.d.mts.map +1 -0
- package/resources/webhooks/webhooks.d.ts +271 -0
- package/resources/webhooks/webhooks.d.ts.map +1 -0
- package/resources/webhooks/webhooks.js +122 -0
- package/resources/webhooks/webhooks.js.map +1 -0
- package/resources/webhooks/webhooks.mjs +117 -0
- package/resources/webhooks/webhooks.mjs.map +1 -0
- package/resources/webhooks.d.mts +2 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +2 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +6 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +3 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources/workflows/action-catalog.d.mts +40 -0
- package/resources/workflows/action-catalog.d.mts.map +1 -0
- package/resources/workflows/action-catalog.d.ts +40 -0
- package/resources/workflows/action-catalog.d.ts.map +1 -0
- package/resources/workflows/action-catalog.js +22 -0
- package/resources/workflows/action-catalog.js.map +1 -0
- package/resources/workflows/action-catalog.mjs +18 -0
- package/resources/workflows/action-catalog.mjs.map +1 -0
- package/resources/workflows/actions/actions.d.mts +86 -0
- package/resources/workflows/actions/actions.d.mts.map +1 -0
- package/resources/workflows/actions/actions.d.ts +86 -0
- package/resources/workflows/actions/actions.d.ts.map +1 -0
- package/resources/workflows/actions/actions.js +48 -0
- package/resources/workflows/actions/actions.js.map +1 -0
- package/resources/workflows/actions/actions.mjs +43 -0
- package/resources/workflows/actions/actions.mjs.map +1 -0
- package/resources/workflows/actions/index.d.mts +3 -0
- package/resources/workflows/actions/index.d.mts.map +1 -0
- package/resources/workflows/actions/index.d.ts +3 -0
- package/resources/workflows/actions/index.d.ts.map +1 -0
- package/resources/workflows/actions/index.js +9 -0
- package/resources/workflows/actions/index.js.map +1 -0
- package/resources/workflows/actions/index.mjs +4 -0
- package/resources/workflows/actions/index.mjs.map +1 -0
- package/resources/workflows/actions/services.d.mts +39 -0
- package/resources/workflows/actions/services.d.mts.map +1 -0
- package/resources/workflows/actions/services.d.ts +39 -0
- package/resources/workflows/actions/services.d.ts.map +1 -0
- package/resources/workflows/actions/services.js +22 -0
- package/resources/workflows/actions/services.js.map +1 -0
- package/resources/workflows/actions/services.mjs +18 -0
- package/resources/workflows/actions/services.mjs.map +1 -0
- package/resources/workflows/actions.d.mts +2 -0
- package/resources/workflows/actions.d.mts.map +1 -0
- package/resources/workflows/actions.d.ts +2 -0
- package/resources/workflows/actions.d.ts.map +1 -0
- package/resources/workflows/actions.js +6 -0
- package/resources/workflows/actions.js.map +1 -0
- package/resources/workflows/actions.mjs +3 -0
- package/resources/workflows/actions.mjs.map +1 -0
- package/resources/workflows/events/catalog.d.mts +55 -0
- package/resources/workflows/events/catalog.d.mts.map +1 -0
- package/resources/workflows/events/catalog.d.ts +55 -0
- package/resources/workflows/events/catalog.d.ts.map +1 -0
- package/resources/workflows/events/catalog.js +21 -0
- package/resources/workflows/events/catalog.js.map +1 -0
- package/resources/workflows/events/catalog.mjs +17 -0
- package/resources/workflows/events/catalog.mjs.map +1 -0
- package/resources/workflows/events/events.d.mts +123 -0
- package/resources/workflows/events/events.d.mts.map +1 -0
- package/resources/workflows/events/events.d.ts +123 -0
- package/resources/workflows/events/events.d.ts.map +1 -0
- package/resources/workflows/events/events.js +30 -0
- package/resources/workflows/events/events.js.map +1 -0
- package/resources/workflows/events/events.mjs +25 -0
- package/resources/workflows/events/events.mjs.map +1 -0
- package/resources/workflows/events/index.d.mts +3 -0
- package/resources/workflows/events/index.d.mts.map +1 -0
- package/resources/workflows/events/index.d.ts +3 -0
- package/resources/workflows/events/index.d.ts.map +1 -0
- package/resources/workflows/events/index.js +9 -0
- package/resources/workflows/events/index.js.map +1 -0
- package/resources/workflows/events/index.mjs +4 -0
- package/resources/workflows/events/index.mjs.map +1 -0
- package/resources/workflows/events.d.mts +2 -0
- package/resources/workflows/events.d.mts.map +1 -0
- package/resources/workflows/events.d.ts +2 -0
- package/resources/workflows/events.d.ts.map +1 -0
- package/resources/workflows/events.js +6 -0
- package/resources/workflows/events.js.map +1 -0
- package/resources/workflows/events.mjs +3 -0
- package/resources/workflows/events.mjs.map +1 -0
- package/resources/workflows/executions.d.mts +83 -0
- package/resources/workflows/executions.d.mts.map +1 -0
- package/resources/workflows/executions.d.ts +83 -0
- package/resources/workflows/executions.d.ts.map +1 -0
- package/resources/workflows/executions.js +28 -0
- package/resources/workflows/executions.js.map +1 -0
- package/resources/workflows/executions.mjs +24 -0
- package/resources/workflows/executions.mjs.map +1 -0
- package/resources/workflows/flows/actions.d.mts +81 -0
- package/resources/workflows/flows/actions.d.mts.map +1 -0
- package/resources/workflows/flows/actions.d.ts +81 -0
- package/resources/workflows/flows/actions.d.ts.map +1 -0
- package/resources/workflows/flows/actions.js +35 -0
- package/resources/workflows/flows/actions.js.map +1 -0
- package/resources/workflows/flows/actions.mjs +31 -0
- package/resources/workflows/flows/actions.mjs.map +1 -0
- package/resources/workflows/flows/flows.d.mts +128 -0
- package/resources/workflows/flows/flows.d.mts.map +1 -0
- package/resources/workflows/flows/flows.d.ts +128 -0
- package/resources/workflows/flows/flows.d.ts.map +1 -0
- package/resources/workflows/flows/flows.js +61 -0
- package/resources/workflows/flows/flows.js.map +1 -0
- package/resources/workflows/flows/flows.mjs +56 -0
- package/resources/workflows/flows/flows.mjs.map +1 -0
- package/resources/workflows/flows/index.d.mts +3 -0
- package/resources/workflows/flows/index.d.mts.map +1 -0
- package/resources/workflows/flows/index.d.ts +3 -0
- package/resources/workflows/flows/index.d.ts.map +1 -0
- package/resources/workflows/flows/index.js +9 -0
- package/resources/workflows/flows/index.js.map +1 -0
- package/resources/workflows/flows/index.mjs +4 -0
- package/resources/workflows/flows/index.mjs.map +1 -0
- package/resources/workflows/flows.d.mts +2 -0
- package/resources/workflows/flows.d.mts.map +1 -0
- package/resources/workflows/flows.d.ts +2 -0
- package/resources/workflows/flows.d.ts.map +1 -0
- package/resources/workflows/flows.js +6 -0
- package/resources/workflows/flows.js.map +1 -0
- package/resources/workflows/flows.mjs +3 -0
- package/resources/workflows/flows.mjs.map +1 -0
- package/resources/workflows/index.d.mts +9 -0
- package/resources/workflows/index.d.mts.map +1 -0
- package/resources/workflows/index.d.ts +9 -0
- package/resources/workflows/index.d.ts.map +1 -0
- package/resources/workflows/index.js +21 -0
- package/resources/workflows/index.js.map +1 -0
- package/resources/workflows/index.mjs +10 -0
- package/resources/workflows/index.mjs.map +1 -0
- package/resources/workflows/timezones.d.mts +16 -0
- package/resources/workflows/timezones.d.mts.map +1 -0
- package/resources/workflows/timezones.d.ts +16 -0
- package/resources/workflows/timezones.d.ts.map +1 -0
- package/resources/workflows/timezones.js +15 -0
- package/resources/workflows/timezones.js.map +1 -0
- package/resources/workflows/timezones.mjs +11 -0
- package/resources/workflows/timezones.mjs.map +1 -0
- package/resources/workflows/triggers.d.mts +313 -0
- package/resources/workflows/triggers.d.mts.map +1 -0
- package/resources/workflows/triggers.d.ts +313 -0
- package/resources/workflows/triggers.d.ts.map +1 -0
- package/resources/workflows/triggers.js +62 -0
- package/resources/workflows/triggers.js.map +1 -0
- package/resources/workflows/triggers.mjs +58 -0
- package/resources/workflows/triggers.mjs.map +1 -0
- package/resources/workflows/workflows.d.mts +57 -0
- package/resources/workflows/workflows.d.mts.map +1 -0
- package/resources/workflows/workflows.d.ts +57 -0
- package/resources/workflows/workflows.d.ts.map +1 -0
- package/resources/workflows/workflows.js +41 -0
- package/resources/workflows/workflows.js.map +1 -0
- package/resources/workflows/workflows.mjs +36 -0
- package/resources/workflows/workflows.mjs.map +1 -0
- package/resources/workflows.d.mts +2 -0
- package/resources/workflows.d.mts.map +1 -0
- package/resources/workflows.d.ts +2 -0
- package/resources/workflows.d.ts.map +1 -0
- package/resources/workflows.js +6 -0
- package/resources/workflows.js.map +1 -0
- package/resources/workflows.mjs +3 -0
- package/resources/workflows.mjs.map +1 -0
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +173 -68
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/apps.ts +547 -30
- package/src/resources/carriers.ts +191 -7
- package/src/resources/connect/connect.ts +73 -0
- package/src/resources/connect/countries.ts +101 -0
- package/src/resources/connect/index.ts +27 -0
- package/src/resources/connect/proxies.ts +596 -0
- package/src/resources/connect/users.ts +512 -0
- package/src/resources/connect.ts +3 -0
- package/src/resources/credentials/credentials.ts +3 -0
- package/src/resources/credentials/packages/credentials/credentials.ts +3 -0
- package/src/resources/credentials/packages/credentials/fields.ts +3 -0
- package/src/resources/credentials/packages/packages.ts +3 -0
- package/src/resources/devices/apps.ts +67 -41
- package/src/resources/devices/devices.ts +225 -103
- package/src/resources/devices/esim.ts +9 -2
- package/src/resources/devices/index.ts +17 -13
- package/src/resources/devices/keyboard.ts +6 -0
- package/src/resources/devices/language.ts +91 -0
- package/src/resources/devices/location.ts +3 -17
- package/src/resources/devices/proxy.ts +2 -8
- package/src/resources/devices/state.ts +82 -3
- package/src/resources/devices/tasks.ts +3 -0
- package/src/resources/devices/{time.ts → timezone.ts} +22 -52
- package/src/resources/hooks.ts +44 -3
- package/src/resources/index.ts +37 -3
- package/src/resources/models.ts +3 -0
- package/src/resources/proxies.ts +113 -0
- package/src/resources/shared.ts +31 -12
- package/src/resources/tasks/tasks.ts +103 -5
- package/src/resources/webhooks/deliveries.ts +284 -0
- package/src/resources/webhooks/index.ts +26 -0
- package/src/resources/webhooks/webhooks.ts +433 -0
- package/src/resources/webhooks.ts +3 -0
- package/src/resources/workflows/action-catalog.ts +71 -0
- package/src/resources/workflows/actions/actions.ts +155 -0
- package/src/resources/workflows/actions/index.ts +15 -0
- package/src/resources/workflows/actions/services.ts +61 -0
- package/src/resources/workflows/actions.ts +3 -0
- package/src/resources/workflows/events/catalog.ts +88 -0
- package/src/resources/workflows/events/events.ts +189 -0
- package/src/resources/workflows/events/index.ts +16 -0
- package/src/resources/workflows/events.ts +3 -0
- package/src/resources/workflows/executions.ts +149 -0
- package/src/resources/workflows/flows/actions.ts +141 -0
- package/src/resources/workflows/flows/flows.ts +250 -0
- package/src/resources/workflows/flows/index.ts +29 -0
- package/src/resources/workflows/flows.ts +3 -0
- package/src/resources/workflows/index.ts +68 -0
- package/src/resources/workflows/timezones.ts +22 -0
- package/src/resources/workflows/triggers.ts +454 -0
- package/src/resources/workflows/workflows.ts +218 -0
- package/src/resources/workflows.ts +3 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/agents.d.mts +0 -30
- package/resources/agents.d.mts.map +0 -1
- package/resources/agents.d.ts +0 -30
- package/resources/agents.d.ts.map +0 -1
- package/resources/agents.js +0 -18
- package/resources/agents.js.map +0 -1
- package/resources/agents.mjs +0 -14
- package/resources/agents.mjs.map +0 -1
- package/resources/devices/time.d.mts +0 -45
- package/resources/devices/time.d.mts.map +0 -1
- package/resources/devices/time.d.ts +0 -45
- package/resources/devices/time.d.ts.map +0 -1
- package/resources/devices/time.js.map +0 -1
- package/resources/devices/time.mjs.map +0 -1
- package/src/resources/agents.ts +0 -45
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../shared.mjs";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
export declare class Triggers extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a trigger
|
|
8
|
+
*/
|
|
9
|
+
create(body: TriggerCreateParams, options?: RequestOptions): APIPromise<TriggerCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a trigger
|
|
12
|
+
*/
|
|
13
|
+
retrieve(triggerID: string, options?: RequestOptions): APIPromise<TriggerRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Update a trigger
|
|
16
|
+
*/
|
|
17
|
+
update(triggerID: string, body?: TriggerUpdateParams | null | undefined, options?: RequestOptions): APIPromise<TriggerUpdateResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* List triggers
|
|
20
|
+
*/
|
|
21
|
+
list(query?: TriggerListParams | null | undefined, options?: RequestOptions): APIPromise<TriggerListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Delete a trigger
|
|
24
|
+
*/
|
|
25
|
+
delete(triggerID: string, options?: RequestOptions): APIPromise<TriggerDeleteResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Invoke a custom trigger directly with an arbitrary JSON payload.
|
|
28
|
+
*
|
|
29
|
+
* Fan-out: a trigger may be referenced by multiple flows (workflows). Firing it
|
|
30
|
+
* enqueues one execution per enabled, non-deleted flow attached to this trigger,
|
|
31
|
+
* each receiving the same payload. The `enqueuedCount` in the response reports how
|
|
32
|
+
* many were enqueued (0 if no flows are attached, or if all matching flows are
|
|
33
|
+
* gated by a cooldown).
|
|
34
|
+
*
|
|
35
|
+
* Payload validation:
|
|
36
|
+
*
|
|
37
|
+
* - If the trigger has a `customPayloadSchema`, the payload is validated against
|
|
38
|
+
* it (JSON Schema via AJV).
|
|
39
|
+
* - If no schema is configured, the payload only needs to be a JSON object — any
|
|
40
|
+
* keys and values are accepted.
|
|
41
|
+
*
|
|
42
|
+
* Only triggers with `activation = "custom"` can be fired through this endpoint;
|
|
43
|
+
* event and schedule triggers return 409.
|
|
44
|
+
*/
|
|
45
|
+
fire(triggerID: string, body: TriggerFireParams, options?: RequestOptions): APIPromise<TriggerFireResponse>;
|
|
46
|
+
}
|
|
47
|
+
export interface TriggerCreateResponse {
|
|
48
|
+
data: TriggerCreateResponse.Data;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace TriggerCreateResponse {
|
|
51
|
+
interface Data {
|
|
52
|
+
id: string;
|
|
53
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
54
|
+
createdAt: string | null;
|
|
55
|
+
customPayloadSchema: {
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
} | null;
|
|
58
|
+
description: string | null;
|
|
59
|
+
eventType: string | null;
|
|
60
|
+
name: string;
|
|
61
|
+
scheduleRule: Data.ScheduleRule;
|
|
62
|
+
timezone: string | null;
|
|
63
|
+
updatedAt: string | null;
|
|
64
|
+
userId: string;
|
|
65
|
+
conditions?: unknown;
|
|
66
|
+
nextFireTime?: string | null;
|
|
67
|
+
}
|
|
68
|
+
namespace Data {
|
|
69
|
+
interface ScheduleRule {
|
|
70
|
+
type: 'once' | 'cron' | 'recurring';
|
|
71
|
+
/**
|
|
72
|
+
* ISO 8601 datetime (for type=once)
|
|
73
|
+
*/
|
|
74
|
+
dateTime?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Cron expression (for type=cron)
|
|
77
|
+
*/
|
|
78
|
+
expression?: string;
|
|
79
|
+
/**
|
|
80
|
+
* RRULE string (for type=recurring)
|
|
81
|
+
*/
|
|
82
|
+
rrule?: string;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export interface TriggerRetrieveResponse {
|
|
87
|
+
data: TriggerRetrieveResponse.Data;
|
|
88
|
+
}
|
|
89
|
+
export declare namespace TriggerRetrieveResponse {
|
|
90
|
+
interface Data {
|
|
91
|
+
id: string;
|
|
92
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
93
|
+
createdAt: string | null;
|
|
94
|
+
customPayloadSchema: {
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
} | null;
|
|
97
|
+
description: string | null;
|
|
98
|
+
eventType: string | null;
|
|
99
|
+
name: string;
|
|
100
|
+
scheduleRule: Data.ScheduleRule | null;
|
|
101
|
+
timezone: string | null;
|
|
102
|
+
updatedAt: string | null;
|
|
103
|
+
userId: string;
|
|
104
|
+
conditions?: unknown;
|
|
105
|
+
nextFireTime?: string | null;
|
|
106
|
+
}
|
|
107
|
+
namespace Data {
|
|
108
|
+
interface ScheduleRule {
|
|
109
|
+
type: 'once' | 'cron' | 'recurring';
|
|
110
|
+
/**
|
|
111
|
+
* ISO 8601 datetime (for type=once)
|
|
112
|
+
*/
|
|
113
|
+
dateTime?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Cron expression (for type=cron)
|
|
116
|
+
*/
|
|
117
|
+
expression?: string;
|
|
118
|
+
/**
|
|
119
|
+
* RRULE string (for type=recurring)
|
|
120
|
+
*/
|
|
121
|
+
rrule?: string;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
export interface TriggerUpdateResponse {
|
|
126
|
+
data: TriggerUpdateResponse.Data;
|
|
127
|
+
}
|
|
128
|
+
export declare namespace TriggerUpdateResponse {
|
|
129
|
+
interface Data {
|
|
130
|
+
id: string;
|
|
131
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
132
|
+
createdAt: string | null;
|
|
133
|
+
customPayloadSchema: {
|
|
134
|
+
[key: string]: unknown;
|
|
135
|
+
} | null;
|
|
136
|
+
description: string | null;
|
|
137
|
+
eventType: string | null;
|
|
138
|
+
name: string;
|
|
139
|
+
scheduleRule: Data.ScheduleRule | null;
|
|
140
|
+
timezone: string | null;
|
|
141
|
+
updatedAt: string | null;
|
|
142
|
+
userId: string;
|
|
143
|
+
conditions?: unknown;
|
|
144
|
+
nextFireTime?: string | null;
|
|
145
|
+
}
|
|
146
|
+
namespace Data {
|
|
147
|
+
interface ScheduleRule {
|
|
148
|
+
type: 'once' | 'cron' | 'recurring';
|
|
149
|
+
/**
|
|
150
|
+
* ISO 8601 datetime (for type=once)
|
|
151
|
+
*/
|
|
152
|
+
dateTime?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Cron expression (for type=cron)
|
|
155
|
+
*/
|
|
156
|
+
expression?: string;
|
|
157
|
+
/**
|
|
158
|
+
* RRULE string (for type=recurring)
|
|
159
|
+
*/
|
|
160
|
+
rrule?: string;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export interface TriggerListResponse {
|
|
165
|
+
items: Array<TriggerListResponse.Item>;
|
|
166
|
+
pagination: Shared.Pagination;
|
|
167
|
+
}
|
|
168
|
+
export declare namespace TriggerListResponse {
|
|
169
|
+
interface Item {
|
|
170
|
+
id: string;
|
|
171
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
172
|
+
createdAt: string | null;
|
|
173
|
+
customPayloadSchema: {
|
|
174
|
+
[key: string]: unknown;
|
|
175
|
+
} | null;
|
|
176
|
+
description: string | null;
|
|
177
|
+
eventType: string | null;
|
|
178
|
+
name: string;
|
|
179
|
+
scheduleRule: Item.ScheduleRule | null;
|
|
180
|
+
timezone: string | null;
|
|
181
|
+
updatedAt: string | null;
|
|
182
|
+
userId: string;
|
|
183
|
+
conditions?: unknown;
|
|
184
|
+
nextFireTime?: string | null;
|
|
185
|
+
}
|
|
186
|
+
namespace Item {
|
|
187
|
+
interface ScheduleRule {
|
|
188
|
+
type: 'once' | 'cron' | 'recurring';
|
|
189
|
+
/**
|
|
190
|
+
* ISO 8601 datetime (for type=once)
|
|
191
|
+
*/
|
|
192
|
+
dateTime?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Cron expression (for type=cron)
|
|
195
|
+
*/
|
|
196
|
+
expression?: string;
|
|
197
|
+
/**
|
|
198
|
+
* RRULE string (for type=recurring)
|
|
199
|
+
*/
|
|
200
|
+
rrule?: string;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
export interface TriggerDeleteResponse {
|
|
205
|
+
message: string;
|
|
206
|
+
}
|
|
207
|
+
export interface TriggerFireResponse {
|
|
208
|
+
/**
|
|
209
|
+
* Number of flow executions enqueued. May be 0 if no flows are attached to this
|
|
210
|
+
* trigger, or if all attached flows are currently in cooldown.
|
|
211
|
+
*/
|
|
212
|
+
enqueuedCount: number;
|
|
213
|
+
/**
|
|
214
|
+
* Unique ID for this fire invocation. Job IDs in the execution queue are derived
|
|
215
|
+
* from it (one per enqueued flow).
|
|
216
|
+
*/
|
|
217
|
+
invocationId: string;
|
|
218
|
+
}
|
|
219
|
+
export interface TriggerCreateParams {
|
|
220
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
221
|
+
name: string;
|
|
222
|
+
conditions?: TriggerCreateParams.Conditions;
|
|
223
|
+
/**
|
|
224
|
+
* Optional JSON Schema for validating payloads sent to this custom trigger
|
|
225
|
+
*/
|
|
226
|
+
customPayloadSchema?: {
|
|
227
|
+
[key: string]: unknown;
|
|
228
|
+
};
|
|
229
|
+
description?: string;
|
|
230
|
+
eventType?: string;
|
|
231
|
+
scheduleRule?: TriggerCreateParams.ScheduleRule;
|
|
232
|
+
timezone?: string;
|
|
233
|
+
}
|
|
234
|
+
export declare namespace TriggerCreateParams {
|
|
235
|
+
interface Conditions {
|
|
236
|
+
all?: Array<unknown>;
|
|
237
|
+
any?: Array<unknown>;
|
|
238
|
+
}
|
|
239
|
+
interface ScheduleRule {
|
|
240
|
+
type: 'once' | 'cron' | 'recurring';
|
|
241
|
+
/**
|
|
242
|
+
* ISO 8601 datetime (for type=once)
|
|
243
|
+
*/
|
|
244
|
+
dateTime?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Cron expression (for type=cron)
|
|
247
|
+
*/
|
|
248
|
+
expression?: string;
|
|
249
|
+
/**
|
|
250
|
+
* RRULE string (for type=recurring)
|
|
251
|
+
*/
|
|
252
|
+
rrule?: string;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
export interface TriggerUpdateParams {
|
|
256
|
+
activation?: 'event' | 'schedule' | 'custom';
|
|
257
|
+
conditions?: TriggerUpdateParams.Conditions;
|
|
258
|
+
/**
|
|
259
|
+
* Optional JSON Schema for validating payloads sent to this custom trigger
|
|
260
|
+
*/
|
|
261
|
+
customPayloadSchema?: {
|
|
262
|
+
[key: string]: unknown;
|
|
263
|
+
} | null;
|
|
264
|
+
description?: string;
|
|
265
|
+
eventType?: string;
|
|
266
|
+
name?: string;
|
|
267
|
+
scheduleRule?: TriggerUpdateParams.ScheduleRule;
|
|
268
|
+
timezone?: string | null;
|
|
269
|
+
}
|
|
270
|
+
export declare namespace TriggerUpdateParams {
|
|
271
|
+
interface Conditions {
|
|
272
|
+
all?: Array<unknown>;
|
|
273
|
+
any?: Array<unknown>;
|
|
274
|
+
}
|
|
275
|
+
interface ScheduleRule {
|
|
276
|
+
type: 'once' | 'cron' | 'recurring';
|
|
277
|
+
/**
|
|
278
|
+
* ISO 8601 datetime (for type=once)
|
|
279
|
+
*/
|
|
280
|
+
dateTime?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Cron expression (for type=cron)
|
|
283
|
+
*/
|
|
284
|
+
expression?: string;
|
|
285
|
+
/**
|
|
286
|
+
* RRULE string (for type=recurring)
|
|
287
|
+
*/
|
|
288
|
+
rrule?: string;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
export interface TriggerListParams {
|
|
292
|
+
activation?: 'event' | 'schedule' | 'custom';
|
|
293
|
+
eventType?: string;
|
|
294
|
+
orderBy?: 'name' | 'createdAt' | 'updatedAt';
|
|
295
|
+
orderByDirection?: 'asc' | 'desc';
|
|
296
|
+
page?: number;
|
|
297
|
+
pageSize?: number;
|
|
298
|
+
search?: string;
|
|
299
|
+
}
|
|
300
|
+
export interface TriggerFireParams {
|
|
301
|
+
/**
|
|
302
|
+
* Arbitrary JSON object forwarded to every flow attached to this trigger.
|
|
303
|
+
* Validated against the trigger's customPayloadSchema when one is configured;
|
|
304
|
+
* otherwise only "must be a JSON object" is enforced.
|
|
305
|
+
*/
|
|
306
|
+
payload: {
|
|
307
|
+
[key: string]: unknown;
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
export declare namespace Triggers {
|
|
311
|
+
export { type TriggerCreateResponse as TriggerCreateResponse, type TriggerRetrieveResponse as TriggerRetrieveResponse, type TriggerUpdateResponse as TriggerUpdateResponse, type TriggerListResponse as TriggerListResponse, type TriggerDeleteResponse as TriggerDeleteResponse, type TriggerFireResponse as TriggerFireResponse, type TriggerCreateParams as TriggerCreateParams, type TriggerUpdateParams as TriggerUpdateParams, type TriggerListParams as TriggerListParams, type TriggerFireParams as TriggerFireParams, };
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=triggers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers.d.mts","sourceRoot":"","sources":["../../src/resources/workflows/triggers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAI1F;;OAEG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAItF;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,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GAAG,WAAW,CAAC;IAE7C,gBAAgB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAElC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as Shared from "../shared.js";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
+
export declare class Triggers extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a trigger
|
|
8
|
+
*/
|
|
9
|
+
create(body: TriggerCreateParams, options?: RequestOptions): APIPromise<TriggerCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a trigger
|
|
12
|
+
*/
|
|
13
|
+
retrieve(triggerID: string, options?: RequestOptions): APIPromise<TriggerRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Update a trigger
|
|
16
|
+
*/
|
|
17
|
+
update(triggerID: string, body?: TriggerUpdateParams | null | undefined, options?: RequestOptions): APIPromise<TriggerUpdateResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* List triggers
|
|
20
|
+
*/
|
|
21
|
+
list(query?: TriggerListParams | null | undefined, options?: RequestOptions): APIPromise<TriggerListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Delete a trigger
|
|
24
|
+
*/
|
|
25
|
+
delete(triggerID: string, options?: RequestOptions): APIPromise<TriggerDeleteResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Invoke a custom trigger directly with an arbitrary JSON payload.
|
|
28
|
+
*
|
|
29
|
+
* Fan-out: a trigger may be referenced by multiple flows (workflows). Firing it
|
|
30
|
+
* enqueues one execution per enabled, non-deleted flow attached to this trigger,
|
|
31
|
+
* each receiving the same payload. The `enqueuedCount` in the response reports how
|
|
32
|
+
* many were enqueued (0 if no flows are attached, or if all matching flows are
|
|
33
|
+
* gated by a cooldown).
|
|
34
|
+
*
|
|
35
|
+
* Payload validation:
|
|
36
|
+
*
|
|
37
|
+
* - If the trigger has a `customPayloadSchema`, the payload is validated against
|
|
38
|
+
* it (JSON Schema via AJV).
|
|
39
|
+
* - If no schema is configured, the payload only needs to be a JSON object — any
|
|
40
|
+
* keys and values are accepted.
|
|
41
|
+
*
|
|
42
|
+
* Only triggers with `activation = "custom"` can be fired through this endpoint;
|
|
43
|
+
* event and schedule triggers return 409.
|
|
44
|
+
*/
|
|
45
|
+
fire(triggerID: string, body: TriggerFireParams, options?: RequestOptions): APIPromise<TriggerFireResponse>;
|
|
46
|
+
}
|
|
47
|
+
export interface TriggerCreateResponse {
|
|
48
|
+
data: TriggerCreateResponse.Data;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace TriggerCreateResponse {
|
|
51
|
+
interface Data {
|
|
52
|
+
id: string;
|
|
53
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
54
|
+
createdAt: string | null;
|
|
55
|
+
customPayloadSchema: {
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
} | null;
|
|
58
|
+
description: string | null;
|
|
59
|
+
eventType: string | null;
|
|
60
|
+
name: string;
|
|
61
|
+
scheduleRule: Data.ScheduleRule;
|
|
62
|
+
timezone: string | null;
|
|
63
|
+
updatedAt: string | null;
|
|
64
|
+
userId: string;
|
|
65
|
+
conditions?: unknown;
|
|
66
|
+
nextFireTime?: string | null;
|
|
67
|
+
}
|
|
68
|
+
namespace Data {
|
|
69
|
+
interface ScheduleRule {
|
|
70
|
+
type: 'once' | 'cron' | 'recurring';
|
|
71
|
+
/**
|
|
72
|
+
* ISO 8601 datetime (for type=once)
|
|
73
|
+
*/
|
|
74
|
+
dateTime?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Cron expression (for type=cron)
|
|
77
|
+
*/
|
|
78
|
+
expression?: string;
|
|
79
|
+
/**
|
|
80
|
+
* RRULE string (for type=recurring)
|
|
81
|
+
*/
|
|
82
|
+
rrule?: string;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export interface TriggerRetrieveResponse {
|
|
87
|
+
data: TriggerRetrieveResponse.Data;
|
|
88
|
+
}
|
|
89
|
+
export declare namespace TriggerRetrieveResponse {
|
|
90
|
+
interface Data {
|
|
91
|
+
id: string;
|
|
92
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
93
|
+
createdAt: string | null;
|
|
94
|
+
customPayloadSchema: {
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
} | null;
|
|
97
|
+
description: string | null;
|
|
98
|
+
eventType: string | null;
|
|
99
|
+
name: string;
|
|
100
|
+
scheduleRule: Data.ScheduleRule | null;
|
|
101
|
+
timezone: string | null;
|
|
102
|
+
updatedAt: string | null;
|
|
103
|
+
userId: string;
|
|
104
|
+
conditions?: unknown;
|
|
105
|
+
nextFireTime?: string | null;
|
|
106
|
+
}
|
|
107
|
+
namespace Data {
|
|
108
|
+
interface ScheduleRule {
|
|
109
|
+
type: 'once' | 'cron' | 'recurring';
|
|
110
|
+
/**
|
|
111
|
+
* ISO 8601 datetime (for type=once)
|
|
112
|
+
*/
|
|
113
|
+
dateTime?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Cron expression (for type=cron)
|
|
116
|
+
*/
|
|
117
|
+
expression?: string;
|
|
118
|
+
/**
|
|
119
|
+
* RRULE string (for type=recurring)
|
|
120
|
+
*/
|
|
121
|
+
rrule?: string;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
export interface TriggerUpdateResponse {
|
|
126
|
+
data: TriggerUpdateResponse.Data;
|
|
127
|
+
}
|
|
128
|
+
export declare namespace TriggerUpdateResponse {
|
|
129
|
+
interface Data {
|
|
130
|
+
id: string;
|
|
131
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
132
|
+
createdAt: string | null;
|
|
133
|
+
customPayloadSchema: {
|
|
134
|
+
[key: string]: unknown;
|
|
135
|
+
} | null;
|
|
136
|
+
description: string | null;
|
|
137
|
+
eventType: string | null;
|
|
138
|
+
name: string;
|
|
139
|
+
scheduleRule: Data.ScheduleRule | null;
|
|
140
|
+
timezone: string | null;
|
|
141
|
+
updatedAt: string | null;
|
|
142
|
+
userId: string;
|
|
143
|
+
conditions?: unknown;
|
|
144
|
+
nextFireTime?: string | null;
|
|
145
|
+
}
|
|
146
|
+
namespace Data {
|
|
147
|
+
interface ScheduleRule {
|
|
148
|
+
type: 'once' | 'cron' | 'recurring';
|
|
149
|
+
/**
|
|
150
|
+
* ISO 8601 datetime (for type=once)
|
|
151
|
+
*/
|
|
152
|
+
dateTime?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Cron expression (for type=cron)
|
|
155
|
+
*/
|
|
156
|
+
expression?: string;
|
|
157
|
+
/**
|
|
158
|
+
* RRULE string (for type=recurring)
|
|
159
|
+
*/
|
|
160
|
+
rrule?: string;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export interface TriggerListResponse {
|
|
165
|
+
items: Array<TriggerListResponse.Item>;
|
|
166
|
+
pagination: Shared.Pagination;
|
|
167
|
+
}
|
|
168
|
+
export declare namespace TriggerListResponse {
|
|
169
|
+
interface Item {
|
|
170
|
+
id: string;
|
|
171
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
172
|
+
createdAt: string | null;
|
|
173
|
+
customPayloadSchema: {
|
|
174
|
+
[key: string]: unknown;
|
|
175
|
+
} | null;
|
|
176
|
+
description: string | null;
|
|
177
|
+
eventType: string | null;
|
|
178
|
+
name: string;
|
|
179
|
+
scheduleRule: Item.ScheduleRule | null;
|
|
180
|
+
timezone: string | null;
|
|
181
|
+
updatedAt: string | null;
|
|
182
|
+
userId: string;
|
|
183
|
+
conditions?: unknown;
|
|
184
|
+
nextFireTime?: string | null;
|
|
185
|
+
}
|
|
186
|
+
namespace Item {
|
|
187
|
+
interface ScheduleRule {
|
|
188
|
+
type: 'once' | 'cron' | 'recurring';
|
|
189
|
+
/**
|
|
190
|
+
* ISO 8601 datetime (for type=once)
|
|
191
|
+
*/
|
|
192
|
+
dateTime?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Cron expression (for type=cron)
|
|
195
|
+
*/
|
|
196
|
+
expression?: string;
|
|
197
|
+
/**
|
|
198
|
+
* RRULE string (for type=recurring)
|
|
199
|
+
*/
|
|
200
|
+
rrule?: string;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
export interface TriggerDeleteResponse {
|
|
205
|
+
message: string;
|
|
206
|
+
}
|
|
207
|
+
export interface TriggerFireResponse {
|
|
208
|
+
/**
|
|
209
|
+
* Number of flow executions enqueued. May be 0 if no flows are attached to this
|
|
210
|
+
* trigger, or if all attached flows are currently in cooldown.
|
|
211
|
+
*/
|
|
212
|
+
enqueuedCount: number;
|
|
213
|
+
/**
|
|
214
|
+
* Unique ID for this fire invocation. Job IDs in the execution queue are derived
|
|
215
|
+
* from it (one per enqueued flow).
|
|
216
|
+
*/
|
|
217
|
+
invocationId: string;
|
|
218
|
+
}
|
|
219
|
+
export interface TriggerCreateParams {
|
|
220
|
+
activation: 'event' | 'schedule' | 'custom';
|
|
221
|
+
name: string;
|
|
222
|
+
conditions?: TriggerCreateParams.Conditions;
|
|
223
|
+
/**
|
|
224
|
+
* Optional JSON Schema for validating payloads sent to this custom trigger
|
|
225
|
+
*/
|
|
226
|
+
customPayloadSchema?: {
|
|
227
|
+
[key: string]: unknown;
|
|
228
|
+
};
|
|
229
|
+
description?: string;
|
|
230
|
+
eventType?: string;
|
|
231
|
+
scheduleRule?: TriggerCreateParams.ScheduleRule;
|
|
232
|
+
timezone?: string;
|
|
233
|
+
}
|
|
234
|
+
export declare namespace TriggerCreateParams {
|
|
235
|
+
interface Conditions {
|
|
236
|
+
all?: Array<unknown>;
|
|
237
|
+
any?: Array<unknown>;
|
|
238
|
+
}
|
|
239
|
+
interface ScheduleRule {
|
|
240
|
+
type: 'once' | 'cron' | 'recurring';
|
|
241
|
+
/**
|
|
242
|
+
* ISO 8601 datetime (for type=once)
|
|
243
|
+
*/
|
|
244
|
+
dateTime?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Cron expression (for type=cron)
|
|
247
|
+
*/
|
|
248
|
+
expression?: string;
|
|
249
|
+
/**
|
|
250
|
+
* RRULE string (for type=recurring)
|
|
251
|
+
*/
|
|
252
|
+
rrule?: string;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
export interface TriggerUpdateParams {
|
|
256
|
+
activation?: 'event' | 'schedule' | 'custom';
|
|
257
|
+
conditions?: TriggerUpdateParams.Conditions;
|
|
258
|
+
/**
|
|
259
|
+
* Optional JSON Schema for validating payloads sent to this custom trigger
|
|
260
|
+
*/
|
|
261
|
+
customPayloadSchema?: {
|
|
262
|
+
[key: string]: unknown;
|
|
263
|
+
} | null;
|
|
264
|
+
description?: string;
|
|
265
|
+
eventType?: string;
|
|
266
|
+
name?: string;
|
|
267
|
+
scheduleRule?: TriggerUpdateParams.ScheduleRule;
|
|
268
|
+
timezone?: string | null;
|
|
269
|
+
}
|
|
270
|
+
export declare namespace TriggerUpdateParams {
|
|
271
|
+
interface Conditions {
|
|
272
|
+
all?: Array<unknown>;
|
|
273
|
+
any?: Array<unknown>;
|
|
274
|
+
}
|
|
275
|
+
interface ScheduleRule {
|
|
276
|
+
type: 'once' | 'cron' | 'recurring';
|
|
277
|
+
/**
|
|
278
|
+
* ISO 8601 datetime (for type=once)
|
|
279
|
+
*/
|
|
280
|
+
dateTime?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Cron expression (for type=cron)
|
|
283
|
+
*/
|
|
284
|
+
expression?: string;
|
|
285
|
+
/**
|
|
286
|
+
* RRULE string (for type=recurring)
|
|
287
|
+
*/
|
|
288
|
+
rrule?: string;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
export interface TriggerListParams {
|
|
292
|
+
activation?: 'event' | 'schedule' | 'custom';
|
|
293
|
+
eventType?: string;
|
|
294
|
+
orderBy?: 'name' | 'createdAt' | 'updatedAt';
|
|
295
|
+
orderByDirection?: 'asc' | 'desc';
|
|
296
|
+
page?: number;
|
|
297
|
+
pageSize?: number;
|
|
298
|
+
search?: string;
|
|
299
|
+
}
|
|
300
|
+
export interface TriggerFireParams {
|
|
301
|
+
/**
|
|
302
|
+
* Arbitrary JSON object forwarded to every flow attached to this trigger.
|
|
303
|
+
* Validated against the trigger's customPayloadSchema when one is configured;
|
|
304
|
+
* otherwise only "must be a JSON object" is enforced.
|
|
305
|
+
*/
|
|
306
|
+
payload: {
|
|
307
|
+
[key: string]: unknown;
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
export declare namespace Triggers {
|
|
311
|
+
export { type TriggerCreateResponse as TriggerCreateResponse, type TriggerRetrieveResponse as TriggerRetrieveResponse, type TriggerUpdateResponse as TriggerUpdateResponse, type TriggerListResponse as TriggerListResponse, type TriggerDeleteResponse as TriggerDeleteResponse, type TriggerFireResponse as TriggerFireResponse, type TriggerCreateParams as TriggerCreateParams, type TriggerUpdateParams as TriggerUpdateParams, type TriggerListParams as TriggerListParams, type TriggerFireParams as TriggerFireParams, };
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=triggers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../../src/resources/workflows/triggers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAI1F;;OAEG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAItF;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAGnC;AAED,MAAM,WAAW,qBAAqB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