@mobilerun/sdk 5.1.0 → 5.2.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 +41 -0
- package/client.d.mts +4 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -16
- package/client.d.ts.map +1 -1
- package/client.js +0 -12
- package/client.js.map +1 -1
- package/client.mjs +1 -13
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +12 -7
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +12 -7
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +0 -4
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +0 -4
- package/resources/apps.mjs.map +1 -1
- package/resources/carriers.d.mts +0 -3
- package/resources/carriers.d.mts.map +1 -1
- package/resources/carriers.d.ts +0 -3
- package/resources/carriers.d.ts.map +1 -1
- package/resources/carriers.js +0 -3
- package/resources/carriers.js.map +1 -1
- package/resources/carriers.mjs +0 -3
- package/resources/carriers.mjs.map +1 -1
- package/resources/connect/countries.d.mts +8 -3
- package/resources/connect/countries.d.mts.map +1 -1
- package/resources/connect/countries.d.ts +8 -3
- package/resources/connect/countries.d.ts.map +1 -1
- package/resources/connect/countries.js +6 -1
- package/resources/connect/countries.js.map +1 -1
- package/resources/connect/countries.mjs +6 -1
- package/resources/connect/countries.mjs.map +1 -1
- package/resources/connect/proxies.d.mts +11 -9
- package/resources/connect/proxies.d.mts.map +1 -1
- package/resources/connect/proxies.d.ts +11 -9
- package/resources/connect/proxies.d.ts.map +1 -1
- package/resources/connect/proxies.js +7 -5
- package/resources/connect/proxies.js.map +1 -1
- package/resources/connect/proxies.mjs +7 -5
- package/resources/connect/proxies.mjs.map +1 -1
- package/resources/connect/users.d.mts +7 -2
- package/resources/connect/users.d.mts.map +1 -1
- package/resources/connect/users.d.ts +7 -2
- package/resources/connect/users.d.ts.map +1 -1
- package/resources/connect/users.js +7 -2
- package/resources/connect/users.js.map +1 -1
- package/resources/connect/users.mjs +7 -2
- package/resources/connect/users.mjs.map +1 -1
- package/resources/credentials/credentials.d.mts +3 -4
- package/resources/credentials/credentials.d.mts.map +1 -1
- package/resources/credentials/credentials.d.ts +3 -4
- package/resources/credentials/credentials.d.ts.map +1 -1
- package/resources/credentials/credentials.js +3 -4
- package/resources/credentials/credentials.js.map +1 -1
- package/resources/credentials/credentials.mjs +3 -4
- package/resources/credentials/credentials.mjs.map +1 -1
- package/resources/credentials/packages/credentials/credentials.d.mts +14 -7
- package/resources/credentials/packages/credentials/credentials.d.mts.map +1 -1
- package/resources/credentials/packages/credentials/credentials.d.ts +14 -7
- package/resources/credentials/packages/credentials/credentials.d.ts.map +1 -1
- package/resources/credentials/packages/credentials/credentials.js +7 -6
- package/resources/credentials/packages/credentials/credentials.js.map +1 -1
- package/resources/credentials/packages/credentials/credentials.mjs +7 -6
- package/resources/credentials/packages/credentials/credentials.mjs.map +1 -1
- package/resources/credentials/packages/credentials/fields.d.mts +8 -6
- package/resources/credentials/packages/credentials/fields.d.mts.map +1 -1
- package/resources/credentials/packages/credentials/fields.d.ts +8 -6
- package/resources/credentials/packages/credentials/fields.d.ts.map +1 -1
- package/resources/credentials/packages/credentials/fields.js +8 -6
- package/resources/credentials/packages/credentials/fields.js.map +1 -1
- package/resources/credentials/packages/credentials/fields.mjs +8 -6
- package/resources/credentials/packages/credentials/fields.mjs.map +1 -1
- package/resources/credentials/packages/packages.d.mts +5 -5
- package/resources/credentials/packages/packages.d.mts.map +1 -1
- package/resources/credentials/packages/packages.d.ts +5 -5
- package/resources/credentials/packages/packages.d.ts.map +1 -1
- package/resources/credentials/packages/packages.js +5 -5
- package/resources/credentials/packages/packages.js.map +1 -1
- package/resources/credentials/packages/packages.mjs +5 -5
- package/resources/credentials/packages/packages.mjs.map +1 -1
- package/resources/devices/actions.d.mts +10 -5
- package/resources/devices/actions.d.mts.map +1 -1
- package/resources/devices/actions.d.ts +10 -5
- package/resources/devices/actions.d.ts.map +1 -1
- package/resources/devices/actions.js +10 -5
- package/resources/devices/actions.js.map +1 -1
- package/resources/devices/actions.mjs +10 -5
- package/resources/devices/actions.mjs.map +1 -1
- package/resources/devices/apps.d.mts +38 -5
- package/resources/devices/apps.d.mts.map +1 -1
- package/resources/devices/apps.d.ts +38 -5
- package/resources/devices/apps.d.ts.map +1 -1
- package/resources/devices/apps.js +21 -5
- package/resources/devices/apps.js.map +1 -1
- package/resources/devices/apps.mjs +21 -5
- package/resources/devices/apps.mjs.map +1 -1
- package/resources/devices/devices.d.mts +76 -14
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +76 -14
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +28 -12
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +28 -12
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/esim.d.mts +6 -4
- package/resources/devices/esim.d.mts.map +1 -1
- package/resources/devices/esim.d.ts +6 -4
- package/resources/devices/esim.d.ts.map +1 -1
- package/resources/devices/esim.js +6 -4
- package/resources/devices/esim.js.map +1 -1
- package/resources/devices/esim.mjs +6 -4
- package/resources/devices/esim.mjs.map +1 -1
- package/resources/devices/files.d.mts +7 -4
- package/resources/devices/files.d.mts.map +1 -1
- package/resources/devices/files.d.ts +7 -4
- package/resources/devices/files.d.ts.map +1 -1
- package/resources/devices/files.js +7 -4
- package/resources/devices/files.js.map +1 -1
- package/resources/devices/files.mjs +7 -4
- package/resources/devices/files.mjs.map +1 -1
- package/resources/devices/keyboard.d.mts +5 -3
- package/resources/devices/keyboard.d.mts.map +1 -1
- package/resources/devices/keyboard.d.ts +5 -3
- package/resources/devices/keyboard.d.ts.map +1 -1
- package/resources/devices/keyboard.js +5 -3
- package/resources/devices/keyboard.js.map +1 -1
- package/resources/devices/keyboard.mjs +5 -3
- package/resources/devices/keyboard.mjs.map +1 -1
- package/resources/devices/language.d.mts +4 -2
- package/resources/devices/language.d.mts.map +1 -1
- package/resources/devices/language.d.ts +4 -2
- package/resources/devices/language.d.ts.map +1 -1
- package/resources/devices/language.js +4 -2
- package/resources/devices/language.js.map +1 -1
- package/resources/devices/language.mjs +4 -2
- package/resources/devices/language.mjs.map +1 -1
- package/resources/devices/location.d.mts +4 -2
- package/resources/devices/location.d.mts.map +1 -1
- package/resources/devices/location.d.ts +4 -2
- package/resources/devices/location.d.ts.map +1 -1
- package/resources/devices/location.js +4 -2
- package/resources/devices/location.js.map +1 -1
- package/resources/devices/location.mjs +4 -2
- package/resources/devices/location.mjs.map +1 -1
- package/resources/devices/packages.d.mts +2 -1
- package/resources/devices/packages.d.mts.map +1 -1
- package/resources/devices/packages.d.ts +2 -1
- package/resources/devices/packages.d.ts.map +1 -1
- package/resources/devices/packages.js +2 -1
- package/resources/devices/packages.js.map +1 -1
- package/resources/devices/packages.mjs +2 -1
- package/resources/devices/packages.mjs.map +1 -1
- package/resources/devices/proxy.d.mts +29 -3
- package/resources/devices/proxy.d.mts.map +1 -1
- package/resources/devices/proxy.d.ts +29 -3
- package/resources/devices/proxy.d.ts.map +1 -1
- package/resources/devices/proxy.js +7 -3
- package/resources/devices/proxy.js.map +1 -1
- package/resources/devices/proxy.mjs +7 -3
- package/resources/devices/proxy.mjs.map +1 -1
- package/resources/devices/state.d.mts +7 -3
- package/resources/devices/state.d.mts.map +1 -1
- package/resources/devices/state.d.ts +7 -3
- package/resources/devices/state.d.ts.map +1 -1
- package/resources/devices/state.js +6 -3
- package/resources/devices/state.js.map +1 -1
- package/resources/devices/state.mjs +6 -3
- package/resources/devices/state.mjs.map +1 -1
- package/resources/devices/tasks.d.mts +4 -12
- package/resources/devices/tasks.d.mts.map +1 -1
- package/resources/devices/tasks.d.ts +4 -12
- package/resources/devices/tasks.d.ts.map +1 -1
- package/resources/devices/tasks.js +2 -4
- package/resources/devices/tasks.js.map +1 -1
- package/resources/devices/tasks.mjs +2 -4
- package/resources/devices/tasks.mjs.map +1 -1
- package/resources/devices/timezone.d.mts +4 -2
- package/resources/devices/timezone.d.mts.map +1 -1
- package/resources/devices/timezone.d.ts +4 -2
- package/resources/devices/timezone.d.ts.map +1 -1
- package/resources/devices/timezone.js +4 -2
- package/resources/devices/timezone.js.map +1 -1
- package/resources/devices/timezone.mjs +4 -2
- package/resources/devices/timezone.mjs.map +1 -1
- package/resources/hooks.d.mts +0 -239
- package/resources/hooks.d.mts.map +1 -1
- package/resources/hooks.d.ts +0 -239
- package/resources/hooks.d.ts.map +1 -1
- package/resources/hooks.js +0 -57
- package/resources/hooks.js.map +1 -1
- package/resources/hooks.mjs +0 -57
- package/resources/hooks.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/profiles.d.mts +69 -6
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts +69 -6
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.js.map +1 -1
- package/resources/profiles.mjs.map +1 -1
- package/resources/proxies.d.mts +14 -8
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +14 -8
- package/resources/proxies.d.ts.map +1 -1
- package/resources/proxies.js +14 -8
- package/resources/proxies.js.map +1 -1
- package/resources/proxies.mjs +14 -8
- package/resources/proxies.mjs.map +1 -1
- package/resources/shared.d.mts +14 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +14 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/tasks/tasks.d.mts +159 -64
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +159 -64
- package/resources/tasks/tasks.d.ts.map +1 -1
- package/resources/tasks/tasks.js +10 -2
- package/resources/tasks/tasks.js.map +1 -1
- package/resources/tasks/tasks.mjs +10 -2
- package/resources/tasks/tasks.mjs.map +1 -1
- package/resources/webhooks/deliveries.d.mts +38 -4
- package/resources/webhooks/deliveries.d.mts.map +1 -1
- package/resources/webhooks/deliveries.d.ts +38 -4
- package/resources/webhooks/deliveries.d.ts.map +1 -1
- package/resources/webhooks/deliveries.js +15 -4
- package/resources/webhooks/deliveries.js.map +1 -1
- package/resources/webhooks/deliveries.mjs +15 -4
- package/resources/webhooks/deliveries.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +67 -9
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +67 -9
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +26 -8
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +26 -8
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/resources/workflows/action-catalog.d.mts +5 -2
- package/resources/workflows/action-catalog.d.mts.map +1 -1
- package/resources/workflows/action-catalog.d.ts +5 -2
- package/resources/workflows/action-catalog.d.ts.map +1 -1
- package/resources/workflows/action-catalog.js +5 -2
- package/resources/workflows/action-catalog.js.map +1 -1
- package/resources/workflows/action-catalog.mjs +5 -2
- package/resources/workflows/action-catalog.mjs.map +1 -1
- package/resources/workflows/actions/actions.d.mts +15 -5
- package/resources/workflows/actions/actions.d.mts.map +1 -1
- package/resources/workflows/actions/actions.d.ts +15 -5
- package/resources/workflows/actions/actions.d.ts.map +1 -1
- package/resources/workflows/actions/actions.js +10 -5
- package/resources/workflows/actions/actions.js.map +1 -1
- package/resources/workflows/actions/actions.mjs +10 -5
- package/resources/workflows/actions/actions.mjs.map +1 -1
- package/resources/workflows/actions/services.d.mts +5 -2
- package/resources/workflows/actions/services.d.mts.map +1 -1
- package/resources/workflows/actions/services.d.ts +5 -2
- package/resources/workflows/actions/services.d.ts.map +1 -1
- package/resources/workflows/actions/services.js +5 -2
- package/resources/workflows/actions/services.js.map +1 -1
- package/resources/workflows/actions/services.mjs +5 -2
- package/resources/workflows/actions/services.mjs.map +1 -1
- package/resources/workflows/events/catalog.d.mts +0 -51
- package/resources/workflows/events/catalog.d.mts.map +1 -1
- package/resources/workflows/events/catalog.d.ts +0 -51
- package/resources/workflows/events/catalog.d.ts.map +1 -1
- package/resources/workflows/events/catalog.js +0 -12
- package/resources/workflows/events/catalog.js.map +1 -1
- package/resources/workflows/events/catalog.mjs +0 -12
- package/resources/workflows/events/catalog.mjs.map +1 -1
- package/resources/workflows/events/events.d.mts +10 -20
- package/resources/workflows/events/events.d.mts.map +1 -1
- package/resources/workflows/events/events.d.ts +10 -20
- package/resources/workflows/events/events.d.ts.map +1 -1
- package/resources/workflows/events/events.js.map +1 -1
- package/resources/workflows/events/events.mjs +1 -1
- package/resources/workflows/events/events.mjs.map +1 -1
- package/resources/workflows/events/index.d.mts +1 -1
- package/resources/workflows/events/index.d.mts.map +1 -1
- package/resources/workflows/events/index.d.ts +1 -1
- package/resources/workflows/events/index.d.ts.map +1 -1
- package/resources/workflows/events/index.js.map +1 -1
- package/resources/workflows/events/index.mjs +1 -1
- package/resources/workflows/events/index.mjs.map +1 -1
- package/resources/workflows/executions.d.mts +43 -5
- package/resources/workflows/executions.d.mts.map +1 -1
- package/resources/workflows/executions.d.ts +43 -5
- package/resources/workflows/executions.d.ts.map +1 -1
- package/resources/workflows/executions.js +8 -3
- package/resources/workflows/executions.js.map +1 -1
- package/resources/workflows/executions.mjs +8 -3
- package/resources/workflows/executions.mjs.map +1 -1
- package/resources/workflows/flows/actions.d.mts +12 -4
- package/resources/workflows/flows/actions.d.mts.map +1 -1
- package/resources/workflows/flows/actions.d.ts +12 -4
- package/resources/workflows/flows/actions.d.ts.map +1 -1
- package/resources/workflows/flows/actions.js +12 -4
- package/resources/workflows/flows/actions.js.map +1 -1
- package/resources/workflows/flows/actions.mjs +12 -4
- package/resources/workflows/flows/actions.mjs.map +1 -1
- package/resources/workflows/flows/flows.d.mts +33 -7
- package/resources/workflows/flows/flows.d.mts.map +1 -1
- package/resources/workflows/flows/flows.d.ts +33 -7
- package/resources/workflows/flows/flows.d.ts.map +1 -1
- package/resources/workflows/flows/flows.js +18 -6
- package/resources/workflows/flows/flows.js.map +1 -1
- package/resources/workflows/flows/flows.mjs +18 -6
- package/resources/workflows/flows/flows.mjs.map +1 -1
- package/resources/workflows/triggers.d.mts +75 -63
- package/resources/workflows/triggers.d.mts.map +1 -1
- package/resources/workflows/triggers.d.ts +75 -63
- package/resources/workflows/triggers.d.ts.map +1 -1
- package/resources/workflows/triggers.js +12 -5
- package/resources/workflows/triggers.js.map +1 -1
- package/resources/workflows/triggers.mjs +12 -5
- package/resources/workflows/triggers.mjs.map +1 -1
- package/resources/workflows/workflows.d.mts +15 -0
- package/resources/workflows/workflows.d.mts.map +1 -1
- package/resources/workflows/workflows.d.ts +15 -0
- package/resources/workflows/workflows.d.ts.map +1 -1
- package/resources/workflows/workflows.js.map +1 -1
- package/resources/workflows/workflows.mjs.map +1 -1
- package/src/client.ts +8 -46
- package/src/resources/apps.ts +16 -8
- package/src/resources/carriers.ts +0 -3
- package/src/resources/connect/countries.ts +8 -3
- package/src/resources/connect/proxies.ts +11 -9
- package/src/resources/connect/users.ts +7 -2
- package/src/resources/credentials/credentials.ts +3 -4
- package/src/resources/credentials/packages/credentials/credentials.ts +16 -7
- package/src/resources/credentials/packages/credentials/fields.ts +8 -6
- package/src/resources/credentials/packages/packages.ts +5 -5
- package/src/resources/devices/actions.ts +10 -5
- package/src/resources/devices/apps.ts +41 -5
- package/src/resources/devices/devices.ts +97 -15
- package/src/resources/devices/esim.ts +6 -4
- package/src/resources/devices/files.ts +7 -4
- package/src/resources/devices/keyboard.ts +5 -3
- package/src/resources/devices/language.ts +4 -2
- package/src/resources/devices/location.ts +4 -2
- package/src/resources/devices/packages.ts +2 -1
- package/src/resources/devices/proxy.ts +32 -3
- package/src/resources/devices/state.ts +8 -3
- package/src/resources/devices/tasks.ts +4 -15
- package/src/resources/devices/timezone.ts +4 -2
- package/src/resources/hooks.ts +1 -333
- package/src/resources/index.ts +4 -17
- package/src/resources/profiles.ts +105 -6
- package/src/resources/proxies.ts +14 -8
- package/src/resources/shared.ts +17 -0
- package/src/resources/tasks/tasks.ts +198 -78
- package/src/resources/webhooks/deliveries.ts +43 -4
- package/src/resources/webhooks/webhooks.ts +79 -9
- package/src/resources/workflows/action-catalog.ts +5 -2
- package/src/resources/workflows/actions/actions.ts +17 -5
- package/src/resources/workflows/actions/services.ts +5 -2
- package/src/resources/workflows/events/catalog.ts +1 -84
- package/src/resources/workflows/events/events.ts +14 -36
- package/src/resources/workflows/events/index.ts +1 -7
- package/src/resources/workflows/executions.ts +50 -5
- package/src/resources/workflows/flows/actions.ts +12 -4
- package/src/resources/workflows/flows/flows.ts +41 -7
- package/src/resources/workflows/triggers.ts +92 -75
- package/src/resources/workflows/workflows.ts +21 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -3,11 +3,13 @@ import { APIPromise } from "../../core/api-promise.js";
|
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
4
|
export declare class Timezone extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Returns the device's current timezone identifier. Devices that do not support
|
|
7
|
+
* timezone control return an unsupported-feature error.
|
|
7
8
|
*/
|
|
8
9
|
get(deviceID: string, params?: TimezoneGetParams | null | undefined, options?: RequestOptions): APIPromise<TimezoneGetResponse>;
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
+
* Sets the device timezone to the identifier in the request body. Devices that do
|
|
12
|
+
* not support timezone control return an unsupported-feature error.
|
|
11
13
|
*/
|
|
12
14
|
set(deviceID: string, params: TimezoneSetParams, options?: RequestOptions): APIPromise<void>;
|
|
13
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../src/resources/devices/timezone.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"timezone.d.ts","sourceRoot":"","sources":["../../src/resources/devices/timezone.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;OAGG;IACH,GAAG,CACD,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAelC;;;OAGG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAgB7F;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -7,7 +7,8 @@ const headers_1 = require("../../internal/headers.js");
|
|
|
7
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
8
|
class Timezone extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Returns the device's current timezone identifier. Devices that do not support
|
|
11
|
+
* timezone control return an unsupported-feature error.
|
|
11
12
|
*/
|
|
12
13
|
get(deviceID, params = {}, options) {
|
|
13
14
|
const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
|
|
@@ -24,7 +25,8 @@ class Timezone extends resource_1.APIResource {
|
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
27
|
-
*
|
|
28
|
+
* Sets the device timezone to the identifier in the request body. Devices that do
|
|
29
|
+
* not support timezone control return an unsupported-feature error.
|
|
28
30
|
*/
|
|
29
31
|
set(deviceID, params, options) {
|
|
30
32
|
const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone.js","sourceRoot":"","sources":["../../src/resources/devices/timezone.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"timezone.js","sourceRoot":"","sources":["../../src/resources/devices/timezone.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;OAGG;IACH,GAAG,CACD,QAAgB,EAChB,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,WAAW,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBACxC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;wBACzD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,QAAgB,EAAE,MAAyB,EAAE,OAAwB;QACvE,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,WAAW,EAAE;YAC5D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,MAAM,EAAE,KAAK;oBACb,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBACxC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;wBACzD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA5CD,4BA4CC"}
|
|
@@ -4,7 +4,8 @@ import { buildHeaders } from "../../internal/headers.mjs";
|
|
|
4
4
|
import { path } from "../../internal/utils/path.mjs";
|
|
5
5
|
export class Timezone extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Returns the device's current timezone identifier. Devices that do not support
|
|
8
|
+
* timezone control return an unsupported-feature error.
|
|
8
9
|
*/
|
|
9
10
|
get(deviceID, params = {}, options) {
|
|
10
11
|
const { 'X-Device-Display-ID': xDeviceDisplayID } = params ?? {};
|
|
@@ -21,7 +22,8 @@ export class Timezone extends APIResource {
|
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
+
* Sets the device timezone to the identifier in the request body. Devices that do
|
|
26
|
+
* not support timezone control return an unsupported-feature error.
|
|
25
27
|
*/
|
|
26
28
|
set(deviceID, params, options) {
|
|
27
29
|
const { 'X-Device-Display-ID': xDeviceDisplayID, ...body } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezone.mjs","sourceRoot":"","sources":["../../src/resources/devices/timezone.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"timezone.mjs","sourceRoot":"","sources":["../../src/resources/devices/timezone.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;OAGG;IACH,GAAG,CACD,QAAgB,EAChB,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,WAAW,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBACxC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;wBACzD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,QAAgB,EAAE,MAAyB,EAAE,OAAwB;QACvE,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,QAAQ,WAAW,EAAE;YAC5D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,MAAM,EAAE,KAAK;oBACb,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBACxC,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;wBACzD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/hooks.d.mts
CHANGED
|
@@ -1,243 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as Shared from "./shared.mjs";
|
|
3
|
-
import * as TasksAPI from "./tasks/tasks.mjs";
|
|
4
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
2
|
export declare class Hooks extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Get a hook subscription by id.
|
|
9
|
-
*/
|
|
10
|
-
retrieve(hookID: string, options?: RequestOptions): APIPromise<HookRetrieveResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* Edit a hook subscription (events or state).
|
|
13
|
-
*
|
|
14
|
-
* Allows updating the events filter and/or the state of a hook.
|
|
15
|
-
*/
|
|
16
|
-
update(hookID: string, body: HookUpdateParams, options?: RequestOptions): APIPromise<HookUpdateResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* List hooks belonging to the requesting user (paginated).
|
|
19
|
-
*/
|
|
20
|
-
list(query?: HookListParams | null | undefined, options?: RequestOptions): APIPromise<HookListResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* Get sample hook data for Zapier Perform List (testing/field mapping).
|
|
23
|
-
*/
|
|
24
|
-
getSampleData(options?: RequestOptions): APIPromise<HookGetSampleDataResponse>;
|
|
25
|
-
/**
|
|
26
|
-
* Zapier Perform endpoint - processes webhook payloads.
|
|
27
|
-
*/
|
|
28
|
-
perform(params: HookPerformParams, options?: RequestOptions): APIPromise<HookPerformResponse>;
|
|
29
|
-
/**
|
|
30
|
-
* Subscribe the current user to a webhook URL. Returns subscription id.
|
|
31
|
-
*/
|
|
32
|
-
subscribe(body: HookSubscribeParams, options?: RequestOptions): APIPromise<HookSubscribeResponse>;
|
|
33
|
-
/**
|
|
34
|
-
* Send a test event to a webhook endpoint.
|
|
35
|
-
*
|
|
36
|
-
* Delivers a sample payload to the hook's URL with a single attempt (no retries)
|
|
37
|
-
* for fast feedback.
|
|
38
|
-
*/
|
|
39
|
-
test(hookID: string, body: HookTestParams, options?: RequestOptions): APIPromise<HookTestResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* Unsubscribe a previously created subscription by id.
|
|
42
|
-
*
|
|
43
|
-
* Permanently deletes the subscription if it belongs to the user.
|
|
44
|
-
*/
|
|
45
|
-
unsubscribe(hookID: string, options?: RequestOptions): APIPromise<HookUnsubscribeResponse>;
|
|
46
|
-
}
|
|
47
|
-
export interface HookRetrieveResponse {
|
|
48
|
-
service: 'zapier' | 'n8n' | 'make' | 'internal' | 'other';
|
|
49
|
-
url: string;
|
|
50
|
-
userId: string;
|
|
51
|
-
id?: string;
|
|
52
|
-
createdAt?: string;
|
|
53
|
-
events?: Array<TasksAPI.TaskStatus>;
|
|
54
|
-
state?: 'active' | 'disabled' | 'deleted';
|
|
55
|
-
updatedAt?: string;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Response model after successfully editing a hook.
|
|
59
|
-
*/
|
|
60
|
-
export interface HookUpdateResponse {
|
|
61
|
-
/**
|
|
62
|
-
* The subscription ID
|
|
63
|
-
*/
|
|
64
|
-
id: string;
|
|
65
|
-
/**
|
|
66
|
-
* The hook state
|
|
67
|
-
*/
|
|
68
|
-
state: string;
|
|
69
|
-
/**
|
|
70
|
-
* Whether the hook was updated
|
|
71
|
-
*/
|
|
72
|
-
updated: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* The webhook URL
|
|
75
|
-
*/
|
|
76
|
-
url: string;
|
|
77
|
-
/**
|
|
78
|
-
* List of subscribed events
|
|
79
|
-
*/
|
|
80
|
-
events?: Array<string> | null;
|
|
81
|
-
}
|
|
82
|
-
export interface HookListResponse {
|
|
83
|
-
/**
|
|
84
|
-
* The paginated items
|
|
85
|
-
*/
|
|
86
|
-
items: Array<HookListResponse.Item>;
|
|
87
|
-
/**
|
|
88
|
-
* Pagination metadata
|
|
89
|
-
*/
|
|
90
|
-
pagination: Shared.PaginationMeta;
|
|
91
|
-
}
|
|
92
|
-
export declare namespace HookListResponse {
|
|
93
|
-
interface Item {
|
|
94
|
-
service: 'zapier' | 'n8n' | 'make' | 'internal' | 'other';
|
|
95
|
-
url: string;
|
|
96
|
-
userId: string;
|
|
97
|
-
id?: string;
|
|
98
|
-
createdAt?: string;
|
|
99
|
-
events?: Array<TasksAPI.TaskStatus>;
|
|
100
|
-
state?: 'active' | 'disabled' | 'deleted';
|
|
101
|
-
updatedAt?: string;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
export type HookGetSampleDataResponse = Array<HookGetSampleDataResponse.HookGetSampleDataResponseItem>;
|
|
105
|
-
export declare namespace HookGetSampleDataResponse {
|
|
106
|
-
/**
|
|
107
|
-
* Sample webhook event data for testing/mapping in Zapier.
|
|
108
|
-
*/
|
|
109
|
-
interface HookGetSampleDataResponseItem {
|
|
110
|
-
/**
|
|
111
|
-
* The subscription ID
|
|
112
|
-
*/
|
|
113
|
-
id: string;
|
|
114
|
-
/**
|
|
115
|
-
* ISO timestamp of when the subscription was created
|
|
116
|
-
*/
|
|
117
|
-
createdAt: string;
|
|
118
|
-
/**
|
|
119
|
-
* List of subscribed events
|
|
120
|
-
*/
|
|
121
|
-
events: Array<string>;
|
|
122
|
-
/**
|
|
123
|
-
* The hook state
|
|
124
|
-
*/
|
|
125
|
-
state: string;
|
|
126
|
-
/**
|
|
127
|
-
* The webhook URL
|
|
128
|
-
*/
|
|
129
|
-
url: string;
|
|
130
|
-
/**
|
|
131
|
-
* ISO timestamp of the last update
|
|
132
|
-
*/
|
|
133
|
-
updatedAt?: string | null;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
export type HookPerformResponse = Array<{
|
|
137
|
-
[key: string]: unknown;
|
|
138
|
-
}>;
|
|
139
|
-
/**
|
|
140
|
-
* Response model after successful subscription.
|
|
141
|
-
*/
|
|
142
|
-
export interface HookSubscribeResponse {
|
|
143
|
-
/**
|
|
144
|
-
* The subscription ID
|
|
145
|
-
*/
|
|
146
|
-
id: string;
|
|
147
|
-
/**
|
|
148
|
-
* Whether subscription was successful
|
|
149
|
-
*/
|
|
150
|
-
subscribed: boolean;
|
|
151
|
-
/**
|
|
152
|
-
* The webhook URL
|
|
153
|
-
*/
|
|
154
|
-
url: string;
|
|
155
|
-
/**
|
|
156
|
-
* List of subscribed events
|
|
157
|
-
*/
|
|
158
|
-
events?: Array<string> | null;
|
|
159
|
-
/**
|
|
160
|
-
* Service that receives the webhook
|
|
161
|
-
*/
|
|
162
|
-
service?: string | null;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Response after attempting test delivery.
|
|
166
|
-
*/
|
|
167
|
-
export interface HookTestResponse {
|
|
168
|
-
/**
|
|
169
|
-
* The hook ID
|
|
170
|
-
*/
|
|
171
|
-
id: string;
|
|
172
|
-
/**
|
|
173
|
-
* Whether delivery succeeded (2xx)
|
|
174
|
-
*/
|
|
175
|
-
success: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* Error message if delivery failed
|
|
178
|
-
*/
|
|
179
|
-
error?: string | null;
|
|
180
|
-
/**
|
|
181
|
-
* HTTP status from target
|
|
182
|
-
*/
|
|
183
|
-
statusCode?: number | null;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Response model after successful unsubscription.
|
|
187
|
-
*/
|
|
188
|
-
export interface HookUnsubscribeResponse {
|
|
189
|
-
/**
|
|
190
|
-
* The subscription ID
|
|
191
|
-
*/
|
|
192
|
-
id: string;
|
|
193
|
-
/**
|
|
194
|
-
* Whether unsubscription was successful
|
|
195
|
-
*/
|
|
196
|
-
unsubscribed: boolean;
|
|
197
|
-
}
|
|
198
|
-
export interface HookUpdateParams {
|
|
199
|
-
/**
|
|
200
|
-
* Updated list of events to subscribe to
|
|
201
|
-
*/
|
|
202
|
-
events?: Array<string> | null;
|
|
203
|
-
/**
|
|
204
|
-
* Updated hook state (active, disabled, deleted)
|
|
205
|
-
*/
|
|
206
|
-
state?: string | null;
|
|
207
|
-
}
|
|
208
|
-
export interface HookListParams {
|
|
209
|
-
orderBy?: string | null;
|
|
210
|
-
orderByDirection?: 'asc' | 'desc';
|
|
211
|
-
page?: number;
|
|
212
|
-
pageSize?: number;
|
|
213
|
-
}
|
|
214
|
-
export interface HookPerformParams {
|
|
215
|
-
body: {
|
|
216
|
-
[key: string]: unknown;
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
export interface HookSubscribeParams {
|
|
220
|
-
/**
|
|
221
|
-
* The webhook URL to send notifications to
|
|
222
|
-
*/
|
|
223
|
-
targetUrl: string;
|
|
224
|
-
/**
|
|
225
|
-
* List of task events to subscribe to (created, running, completed, failed,
|
|
226
|
-
* cancelled, paused)
|
|
227
|
-
*/
|
|
228
|
-
events?: Array<string> | null;
|
|
229
|
-
/**
|
|
230
|
-
* Service that receives the webhook
|
|
231
|
-
*/
|
|
232
|
-
service?: string | null;
|
|
233
|
-
}
|
|
234
|
-
export interface HookTestParams {
|
|
235
|
-
/**
|
|
236
|
-
* Event type to simulate (default: completed)
|
|
237
|
-
*/
|
|
238
|
-
event?: string | null;
|
|
239
|
-
}
|
|
240
|
-
export declare namespace Hooks {
|
|
241
|
-
export { type HookRetrieveResponse as HookRetrieveResponse, type HookUpdateResponse as HookUpdateResponse, type HookListResponse as HookListResponse, type HookGetSampleDataResponse as HookGetSampleDataResponse, type HookPerformResponse as HookPerformResponse, type HookSubscribeResponse as HookSubscribeResponse, type HookTestResponse as HookTestResponse, type HookUnsubscribeResponse as HookUnsubscribeResponse, type HookUpdateParams as HookUpdateParams, type HookListParams as HookListParams, type HookPerformParams as HookPerformParams, type HookSubscribeParams as HookSubscribeParams, type HookTestParams as HookTestParams, };
|
|
242
3
|
}
|
|
243
4
|
//# sourceMappingURL=hooks.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.mts","sourceRoot":"","sources":["../src/resources/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;
|
|
1
|
+
{"version":3,"file":"hooks.d.mts","sourceRoot":"","sources":["../src/resources/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,qBAAa,KAAM,SAAQ,WAAW;CAAG"}
|
package/resources/hooks.d.ts
CHANGED
|
@@ -1,243 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as Shared from "./shared.js";
|
|
3
|
-
import * as TasksAPI from "./tasks/tasks.js";
|
|
4
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
5
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
6
2
|
export declare class Hooks extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Get a hook subscription by id.
|
|
9
|
-
*/
|
|
10
|
-
retrieve(hookID: string, options?: RequestOptions): APIPromise<HookRetrieveResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* Edit a hook subscription (events or state).
|
|
13
|
-
*
|
|
14
|
-
* Allows updating the events filter and/or the state of a hook.
|
|
15
|
-
*/
|
|
16
|
-
update(hookID: string, body: HookUpdateParams, options?: RequestOptions): APIPromise<HookUpdateResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* List hooks belonging to the requesting user (paginated).
|
|
19
|
-
*/
|
|
20
|
-
list(query?: HookListParams | null | undefined, options?: RequestOptions): APIPromise<HookListResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* Get sample hook data for Zapier Perform List (testing/field mapping).
|
|
23
|
-
*/
|
|
24
|
-
getSampleData(options?: RequestOptions): APIPromise<HookGetSampleDataResponse>;
|
|
25
|
-
/**
|
|
26
|
-
* Zapier Perform endpoint - processes webhook payloads.
|
|
27
|
-
*/
|
|
28
|
-
perform(params: HookPerformParams, options?: RequestOptions): APIPromise<HookPerformResponse>;
|
|
29
|
-
/**
|
|
30
|
-
* Subscribe the current user to a webhook URL. Returns subscription id.
|
|
31
|
-
*/
|
|
32
|
-
subscribe(body: HookSubscribeParams, options?: RequestOptions): APIPromise<HookSubscribeResponse>;
|
|
33
|
-
/**
|
|
34
|
-
* Send a test event to a webhook endpoint.
|
|
35
|
-
*
|
|
36
|
-
* Delivers a sample payload to the hook's URL with a single attempt (no retries)
|
|
37
|
-
* for fast feedback.
|
|
38
|
-
*/
|
|
39
|
-
test(hookID: string, body: HookTestParams, options?: RequestOptions): APIPromise<HookTestResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* Unsubscribe a previously created subscription by id.
|
|
42
|
-
*
|
|
43
|
-
* Permanently deletes the subscription if it belongs to the user.
|
|
44
|
-
*/
|
|
45
|
-
unsubscribe(hookID: string, options?: RequestOptions): APIPromise<HookUnsubscribeResponse>;
|
|
46
|
-
}
|
|
47
|
-
export interface HookRetrieveResponse {
|
|
48
|
-
service: 'zapier' | 'n8n' | 'make' | 'internal' | 'other';
|
|
49
|
-
url: string;
|
|
50
|
-
userId: string;
|
|
51
|
-
id?: string;
|
|
52
|
-
createdAt?: string;
|
|
53
|
-
events?: Array<TasksAPI.TaskStatus>;
|
|
54
|
-
state?: 'active' | 'disabled' | 'deleted';
|
|
55
|
-
updatedAt?: string;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Response model after successfully editing a hook.
|
|
59
|
-
*/
|
|
60
|
-
export interface HookUpdateResponse {
|
|
61
|
-
/**
|
|
62
|
-
* The subscription ID
|
|
63
|
-
*/
|
|
64
|
-
id: string;
|
|
65
|
-
/**
|
|
66
|
-
* The hook state
|
|
67
|
-
*/
|
|
68
|
-
state: string;
|
|
69
|
-
/**
|
|
70
|
-
* Whether the hook was updated
|
|
71
|
-
*/
|
|
72
|
-
updated: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* The webhook URL
|
|
75
|
-
*/
|
|
76
|
-
url: string;
|
|
77
|
-
/**
|
|
78
|
-
* List of subscribed events
|
|
79
|
-
*/
|
|
80
|
-
events?: Array<string> | null;
|
|
81
|
-
}
|
|
82
|
-
export interface HookListResponse {
|
|
83
|
-
/**
|
|
84
|
-
* The paginated items
|
|
85
|
-
*/
|
|
86
|
-
items: Array<HookListResponse.Item>;
|
|
87
|
-
/**
|
|
88
|
-
* Pagination metadata
|
|
89
|
-
*/
|
|
90
|
-
pagination: Shared.PaginationMeta;
|
|
91
|
-
}
|
|
92
|
-
export declare namespace HookListResponse {
|
|
93
|
-
interface Item {
|
|
94
|
-
service: 'zapier' | 'n8n' | 'make' | 'internal' | 'other';
|
|
95
|
-
url: string;
|
|
96
|
-
userId: string;
|
|
97
|
-
id?: string;
|
|
98
|
-
createdAt?: string;
|
|
99
|
-
events?: Array<TasksAPI.TaskStatus>;
|
|
100
|
-
state?: 'active' | 'disabled' | 'deleted';
|
|
101
|
-
updatedAt?: string;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
export type HookGetSampleDataResponse = Array<HookGetSampleDataResponse.HookGetSampleDataResponseItem>;
|
|
105
|
-
export declare namespace HookGetSampleDataResponse {
|
|
106
|
-
/**
|
|
107
|
-
* Sample webhook event data for testing/mapping in Zapier.
|
|
108
|
-
*/
|
|
109
|
-
interface HookGetSampleDataResponseItem {
|
|
110
|
-
/**
|
|
111
|
-
* The subscription ID
|
|
112
|
-
*/
|
|
113
|
-
id: string;
|
|
114
|
-
/**
|
|
115
|
-
* ISO timestamp of when the subscription was created
|
|
116
|
-
*/
|
|
117
|
-
createdAt: string;
|
|
118
|
-
/**
|
|
119
|
-
* List of subscribed events
|
|
120
|
-
*/
|
|
121
|
-
events: Array<string>;
|
|
122
|
-
/**
|
|
123
|
-
* The hook state
|
|
124
|
-
*/
|
|
125
|
-
state: string;
|
|
126
|
-
/**
|
|
127
|
-
* The webhook URL
|
|
128
|
-
*/
|
|
129
|
-
url: string;
|
|
130
|
-
/**
|
|
131
|
-
* ISO timestamp of the last update
|
|
132
|
-
*/
|
|
133
|
-
updatedAt?: string | null;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
export type HookPerformResponse = Array<{
|
|
137
|
-
[key: string]: unknown;
|
|
138
|
-
}>;
|
|
139
|
-
/**
|
|
140
|
-
* Response model after successful subscription.
|
|
141
|
-
*/
|
|
142
|
-
export interface HookSubscribeResponse {
|
|
143
|
-
/**
|
|
144
|
-
* The subscription ID
|
|
145
|
-
*/
|
|
146
|
-
id: string;
|
|
147
|
-
/**
|
|
148
|
-
* Whether subscription was successful
|
|
149
|
-
*/
|
|
150
|
-
subscribed: boolean;
|
|
151
|
-
/**
|
|
152
|
-
* The webhook URL
|
|
153
|
-
*/
|
|
154
|
-
url: string;
|
|
155
|
-
/**
|
|
156
|
-
* List of subscribed events
|
|
157
|
-
*/
|
|
158
|
-
events?: Array<string> | null;
|
|
159
|
-
/**
|
|
160
|
-
* Service that receives the webhook
|
|
161
|
-
*/
|
|
162
|
-
service?: string | null;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Response after attempting test delivery.
|
|
166
|
-
*/
|
|
167
|
-
export interface HookTestResponse {
|
|
168
|
-
/**
|
|
169
|
-
* The hook ID
|
|
170
|
-
*/
|
|
171
|
-
id: string;
|
|
172
|
-
/**
|
|
173
|
-
* Whether delivery succeeded (2xx)
|
|
174
|
-
*/
|
|
175
|
-
success: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* Error message if delivery failed
|
|
178
|
-
*/
|
|
179
|
-
error?: string | null;
|
|
180
|
-
/**
|
|
181
|
-
* HTTP status from target
|
|
182
|
-
*/
|
|
183
|
-
statusCode?: number | null;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Response model after successful unsubscription.
|
|
187
|
-
*/
|
|
188
|
-
export interface HookUnsubscribeResponse {
|
|
189
|
-
/**
|
|
190
|
-
* The subscription ID
|
|
191
|
-
*/
|
|
192
|
-
id: string;
|
|
193
|
-
/**
|
|
194
|
-
* Whether unsubscription was successful
|
|
195
|
-
*/
|
|
196
|
-
unsubscribed: boolean;
|
|
197
|
-
}
|
|
198
|
-
export interface HookUpdateParams {
|
|
199
|
-
/**
|
|
200
|
-
* Updated list of events to subscribe to
|
|
201
|
-
*/
|
|
202
|
-
events?: Array<string> | null;
|
|
203
|
-
/**
|
|
204
|
-
* Updated hook state (active, disabled, deleted)
|
|
205
|
-
*/
|
|
206
|
-
state?: string | null;
|
|
207
|
-
}
|
|
208
|
-
export interface HookListParams {
|
|
209
|
-
orderBy?: string | null;
|
|
210
|
-
orderByDirection?: 'asc' | 'desc';
|
|
211
|
-
page?: number;
|
|
212
|
-
pageSize?: number;
|
|
213
|
-
}
|
|
214
|
-
export interface HookPerformParams {
|
|
215
|
-
body: {
|
|
216
|
-
[key: string]: unknown;
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
export interface HookSubscribeParams {
|
|
220
|
-
/**
|
|
221
|
-
* The webhook URL to send notifications to
|
|
222
|
-
*/
|
|
223
|
-
targetUrl: string;
|
|
224
|
-
/**
|
|
225
|
-
* List of task events to subscribe to (created, running, completed, failed,
|
|
226
|
-
* cancelled, paused)
|
|
227
|
-
*/
|
|
228
|
-
events?: Array<string> | null;
|
|
229
|
-
/**
|
|
230
|
-
* Service that receives the webhook
|
|
231
|
-
*/
|
|
232
|
-
service?: string | null;
|
|
233
|
-
}
|
|
234
|
-
export interface HookTestParams {
|
|
235
|
-
/**
|
|
236
|
-
* Event type to simulate (default: completed)
|
|
237
|
-
*/
|
|
238
|
-
event?: string | null;
|
|
239
|
-
}
|
|
240
|
-
export declare namespace Hooks {
|
|
241
|
-
export { type HookRetrieveResponse as HookRetrieveResponse, type HookUpdateResponse as HookUpdateResponse, type HookListResponse as HookListResponse, type HookGetSampleDataResponse as HookGetSampleDataResponse, type HookPerformResponse as HookPerformResponse, type HookSubscribeResponse as HookSubscribeResponse, type HookTestResponse as HookTestResponse, type HookUnsubscribeResponse as HookUnsubscribeResponse, type HookUpdateParams as HookUpdateParams, type HookListParams as HookListParams, type HookPerformParams as HookPerformParams, type HookSubscribeParams as HookSubscribeParams, type HookTestParams as HookTestParams, };
|
|
242
3
|
}
|
|
243
4
|
//# sourceMappingURL=hooks.d.ts.map
|
package/resources/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/resources/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/resources/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAE/C,qBAAa,KAAM,SAAQ,WAAW;CAAG"}
|
package/resources/hooks.js
CHANGED
|
@@ -3,64 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Hooks = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
|
-
const path_1 = require("../internal/utils/path.js");
|
|
7
6
|
class Hooks extends resource_1.APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Get a hook subscription by id.
|
|
10
|
-
*/
|
|
11
|
-
retrieve(hookID, options) {
|
|
12
|
-
return this._client.get((0, path_1.path) `/hooks/${hookID}`, options);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Edit a hook subscription (events or state).
|
|
16
|
-
*
|
|
17
|
-
* Allows updating the events filter and/or the state of a hook.
|
|
18
|
-
*/
|
|
19
|
-
update(hookID, body, options) {
|
|
20
|
-
return this._client.post((0, path_1.path) `/hooks/${hookID}/edit`, { body, ...options });
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* List hooks belonging to the requesting user (paginated).
|
|
24
|
-
*/
|
|
25
|
-
list(query = {}, options) {
|
|
26
|
-
return this._client.get('/hooks', { query, ...options });
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get sample hook data for Zapier Perform List (testing/field mapping).
|
|
30
|
-
*/
|
|
31
|
-
getSampleData(options) {
|
|
32
|
-
return this._client.get('/hooks/sample', options);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Zapier Perform endpoint - processes webhook payloads.
|
|
36
|
-
*/
|
|
37
|
-
perform(params, options) {
|
|
38
|
-
const { body } = params;
|
|
39
|
-
return this._client.post('/hooks/perform', { body: body, ...options });
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Subscribe the current user to a webhook URL. Returns subscription id.
|
|
43
|
-
*/
|
|
44
|
-
subscribe(body, options) {
|
|
45
|
-
return this._client.post('/hooks/subscribe', { body, ...options });
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Send a test event to a webhook endpoint.
|
|
49
|
-
*
|
|
50
|
-
* Delivers a sample payload to the hook's URL with a single attempt (no retries)
|
|
51
|
-
* for fast feedback.
|
|
52
|
-
*/
|
|
53
|
-
test(hookID, body, options) {
|
|
54
|
-
return this._client.post((0, path_1.path) `/hooks/${hookID}/test`, { body, ...options });
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Unsubscribe a previously created subscription by id.
|
|
58
|
-
*
|
|
59
|
-
* Permanently deletes the subscription if it belongs to the user.
|
|
60
|
-
*/
|
|
61
|
-
unsubscribe(hookID, options) {
|
|
62
|
-
return this._client.post((0, path_1.path) `/hooks/${hookID}/unsubscribe`, options);
|
|
63
|
-
}
|
|
64
7
|
}
|
|
65
8
|
exports.Hooks = Hooks;
|
|
66
9
|
//# sourceMappingURL=hooks.js.map
|
package/resources/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/resources/hooks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/resources/hooks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,MAAa,KAAM,SAAQ,sBAAW;CAAG;AAAzC,sBAAyC"}
|