@surgeapi/node 0.25.7 → 0.26.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 +11 -0
- package/LICENSE +201 -21
- package/README.md +318 -115
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +208 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +208 -0
- package/client.d.ts.map +1 -0
- package/client.js +476 -0
- package/client.js.map +1 -0
- package/client.mjs +472 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -4
- package/index.d.ts.map +1 -0
- package/index.js +28 -42
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +139 -44
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/accounts.d.mts +526 -0
- package/resources/accounts.d.mts.map +1 -0
- package/resources/accounts.d.ts +526 -0
- package/resources/accounts.d.ts.map +1 -0
- package/resources/accounts.js +49 -0
- package/resources/accounts.js.map +1 -0
- package/resources/accounts.mjs +45 -0
- package/resources/accounts.mjs.map +1 -0
- package/resources/blasts.d.mts +110 -0
- package/resources/blasts.d.mts.map +1 -0
- package/resources/blasts.d.ts +110 -0
- package/resources/blasts.d.ts.map +1 -0
- package/resources/blasts.js +23 -0
- package/resources/blasts.js.map +1 -0
- package/resources/blasts.mjs +19 -0
- package/resources/blasts.mjs.map +1 -0
- package/resources/campaigns.d.mts +346 -0
- package/resources/campaigns.d.mts.map +1 -0
- package/resources/campaigns.d.ts +346 -0
- package/resources/campaigns.d.ts.map +1 -0
- package/resources/campaigns.js +41 -0
- package/resources/campaigns.js.map +1 -0
- package/resources/campaigns.mjs +37 -0
- package/resources/campaigns.mjs.map +1 -0
- package/resources/contacts.d.mts +151 -0
- package/resources/contacts.d.mts.map +1 -0
- package/resources/contacts.d.ts +151 -0
- package/resources/contacts.d.ts.map +1 -0
- package/resources/contacts.js +52 -0
- package/resources/contacts.js.map +1 -0
- package/resources/contacts.mjs +48 -0
- package/resources/contacts.mjs.map +1 -0
- package/resources/index.d.mts +11 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +11 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +25 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +12 -0
- package/resources/index.mjs.map +1 -0
- package/resources/messages.d.mts +263 -0
- package/resources/messages.d.mts.map +1 -0
- package/resources/messages.d.ts +263 -0
- package/resources/messages.d.ts.map +1 -0
- package/resources/messages.js +52 -0
- package/resources/messages.js.map +1 -0
- package/resources/messages.mjs +48 -0
- package/resources/messages.mjs.map +1 -0
- package/resources/phone-numbers.d.mts +90 -0
- package/resources/phone-numbers.d.mts.map +1 -0
- package/resources/phone-numbers.d.ts +90 -0
- package/resources/phone-numbers.d.ts.map +1 -0
- package/resources/phone-numbers.js +24 -0
- package/resources/phone-numbers.js.map +1 -0
- package/resources/phone-numbers.mjs +20 -0
- package/resources/phone-numbers.mjs.map +1 -0
- package/resources/shared.d.mts +20 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +20 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/users.d.mts +170 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +170 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +65 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +61 -0
- package/resources/users.mjs.map +1 -0
- package/resources/verifications.d.mts +96 -0
- package/resources/verifications.d.mts.map +1 -0
- package/resources/verifications.d.ts +96 -0
- package/resources/verifications.d.ts.map +1 -0
- package/resources/verifications.js +37 -0
- package/resources/verifications.js.map +1 -0
- package/resources/verifications.mjs +33 -0
- package/resources/verifications.mjs.map +1 -0
- package/resources/webhooks.d.mts +484 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +484 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +20 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +16 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +874 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/accounts.ts +778 -0
- package/src/resources/blasts.ts +140 -0
- package/src/resources/campaigns.ts +417 -0
- package/src/resources/contacts.ts +181 -0
- package/src/resources/index.ts +60 -0
- package/src/resources/messages.ts +314 -0
- package/src/resources/phone-numbers.ts +111 -0
- package/src/resources/shared.ts +21 -0
- package/src/resources/users.ts +209 -0
- package/src/resources/verifications.ts +121 -0
- package/src/resources/webhooks.ts +605 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -1
- package/version.d.ts.map +1 -0
- package/version.js +3 -2
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/Client.d.ts +0 -49
- package/Client.js +0 -47
- package/api/errors/ConflictError.d.ts +0 -9
- package/api/errors/ConflictError.js +0 -52
- package/api/errors/UnprocessableEntityError.d.ts +0 -9
- package/api/errors/UnprocessableEntityError.js +0 -52
- package/api/errors/index.d.ts +0 -2
- package/api/errors/index.js +0 -18
- package/api/index.d.ts +0 -3
- package/api/index.js +0 -19
- package/api/resources/accounts/client/Client.d.ts +0 -59
- package/api/resources/accounts/client/Client.js +0 -179
- package/api/resources/accounts/client/index.d.ts +0 -1
- package/api/resources/accounts/client/index.js +0 -17
- package/api/resources/accounts/client/requests/CreateAccountRequest.d.ts +0 -16
- package/api/resources/accounts/client/requests/CreateAccountRequest.js +0 -5
- package/api/resources/accounts/client/requests/UpdateAccountRequest.d.ts +0 -16
- package/api/resources/accounts/client/requests/UpdateAccountRequest.js +0 -5
- package/api/resources/accounts/client/requests/index.d.ts +0 -2
- package/api/resources/accounts/client/requests/index.js +0 -2
- package/api/resources/accounts/index.d.ts +0 -1
- package/api/resources/accounts/index.js +0 -17
- package/api/resources/blasts/client/Client.d.ts +0 -50
- package/api/resources/blasts/client/Client.js +0 -128
- package/api/resources/blasts/client/index.d.ts +0 -1
- package/api/resources/blasts/client/index.js +0 -17
- package/api/resources/blasts/client/requests/BlastRequest.d.ts +0 -31
- package/api/resources/blasts/client/requests/BlastRequest.js +0 -5
- package/api/resources/blasts/client/requests/index.d.ts +0 -1
- package/api/resources/blasts/client/requests/index.js +0 -2
- package/api/resources/blasts/index.d.ts +0 -1
- package/api/resources/blasts/index.js +0 -17
- package/api/resources/contacts/client/Client.d.ts +0 -81
- package/api/resources/contacts/client/Client.js +0 -242
- package/api/resources/contacts/client/index.d.ts +0 -1
- package/api/resources/contacts/client/index.js +0 -2
- package/api/resources/contacts/index.d.ts +0 -1
- package/api/resources/contacts/index.js +0 -17
- package/api/resources/index.d.ts +0 -14
- package/api/resources/index.js +0 -53
- package/api/resources/messages/client/Client.d.ts +0 -54
- package/api/resources/messages/client/Client.js +0 -132
- package/api/resources/messages/client/index.d.ts +0 -1
- package/api/resources/messages/client/index.js +0 -17
- package/api/resources/messages/client/requests/MessageRequest.d.ts +0 -28
- package/api/resources/messages/client/requests/MessageRequest.js +0 -5
- package/api/resources/messages/client/requests/index.d.ts +0 -1
- package/api/resources/messages/client/requests/index.js +0 -2
- package/api/resources/messages/index.d.ts +0 -1
- package/api/resources/messages/index.js +0 -17
- package/api/resources/phoneNumbers/client/Client.d.ts +0 -45
- package/api/resources/phoneNumbers/client/Client.js +0 -123
- package/api/resources/phoneNumbers/client/index.d.ts +0 -1
- package/api/resources/phoneNumbers/client/index.js +0 -17
- package/api/resources/phoneNumbers/client/requests/CreatePhoneNumberRequest.d.ts +0 -17
- package/api/resources/phoneNumbers/client/requests/CreatePhoneNumberRequest.js +0 -5
- package/api/resources/phoneNumbers/client/requests/index.d.ts +0 -1
- package/api/resources/phoneNumbers/client/requests/index.js +0 -2
- package/api/resources/phoneNumbers/index.d.ts +0 -2
- package/api/resources/phoneNumbers/index.js +0 -18
- package/api/resources/phoneNumbers/types/CreatePhoneNumberRequestType.d.ts +0 -11
- package/api/resources/phoneNumbers/types/CreatePhoneNumberRequestType.js +0 -10
- package/api/resources/phoneNumbers/types/index.d.ts +0 -1
- package/api/resources/phoneNumbers/types/index.js +0 -17
- package/api/resources/users/client/Client.d.ts +0 -61
- package/api/resources/users/client/Client.js +0 -180
- package/api/resources/users/client/index.d.ts +0 -1
- package/api/resources/users/client/index.js +0 -17
- package/api/resources/users/client/requests/UserRequest.d.ts +0 -25
- package/api/resources/users/client/requests/UserRequest.js +0 -5
- package/api/resources/users/client/requests/index.d.ts +0 -1
- package/api/resources/users/client/requests/index.js +0 -2
- package/api/resources/users/index.d.ts +0 -1
- package/api/resources/users/index.js +0 -17
- package/api/resources/verifications/client/Client.d.ts +0 -60
- package/api/resources/verifications/client/Client.js +0 -188
- package/api/resources/verifications/client/index.d.ts +0 -1
- package/api/resources/verifications/client/index.js +0 -17
- package/api/resources/verifications/client/requests/VerificationCheckRequest.d.ts +0 -13
- package/api/resources/verifications/client/requests/VerificationCheckRequest.js +0 -5
- package/api/resources/verifications/client/requests/VerificationRequest.d.ts +0 -13
- package/api/resources/verifications/client/requests/VerificationRequest.js +0 -5
- package/api/resources/verifications/client/requests/index.d.ts +0 -2
- package/api/resources/verifications/client/requests/index.js +0 -2
- package/api/resources/verifications/index.d.ts +0 -1
- package/api/resources/verifications/index.js +0 -17
- package/api/types/AccountResponse.d.ts +0 -14
- package/api/types/AccountResponse.js +0 -5
- package/api/types/AttachmentParams.d.ts +0 -10
- package/api/types/AttachmentParams.js +0 -5
- package/api/types/AttachmentResponse.d.ts +0 -14
- package/api/types/AttachmentResponse.js +0 -5
- package/api/types/BlastResponse.d.ts +0 -18
- package/api/types/BlastResponse.js +0 -5
- package/api/types/BlastResponseAttachmentsItem.d.ts +0 -7
- package/api/types/BlastResponseAttachmentsItem.js +0 -5
- package/api/types/Contact.d.ts +0 -16
- package/api/types/Contact.js +0 -5
- package/api/types/ContactRequest.d.ts +0 -18
- package/api/types/ContactRequest.js +0 -5
- package/api/types/ContactResponse.d.ts +0 -20
- package/api/types/ContactResponse.js +0 -5
- package/api/types/Conversation.d.ts +0 -13
- package/api/types/Conversation.js +0 -5
- package/api/types/ConversationPhoneNumber.d.ts +0 -15
- package/api/types/ConversationPhoneNumber.js +0 -5
- package/api/types/ConversationPhoneNumberType.d.ts +0 -13
- package/api/types/ConversationPhoneNumberType.js +0 -12
- package/api/types/MessageConversationContactParams.d.ts +0 -14
- package/api/types/MessageConversationContactParams.js +0 -5
- package/api/types/MessageConversationParams.d.ts +0 -12
- package/api/types/MessageConversationParams.js +0 -5
- package/api/types/MessageResponse.d.ts +0 -15
- package/api/types/MessageResponse.js +0 -5
- package/api/types/PhoneNumber.d.ts +0 -15
- package/api/types/PhoneNumber.js +0 -5
- package/api/types/PhoneNumberType.d.ts +0 -11
- package/api/types/PhoneNumberType.js +0 -10
- package/api/types/UserResponse.d.ts +0 -18
- package/api/types/UserResponse.js +0 -5
- package/api/types/Verification.d.ts +0 -17
- package/api/types/Verification.js +0 -5
- package/api/types/VerificationCheckAlreadyVerifiedResponse.d.ts +0 -12
- package/api/types/VerificationCheckAlreadyVerifiedResponse.js +0 -5
- package/api/types/VerificationCheckAlreadyVerifiedResponseResult.d.ts +0 -14
- package/api/types/VerificationCheckAlreadyVerifiedResponseResult.js +0 -13
- package/api/types/VerificationCheckIncorrectResponse.d.ts +0 -12
- package/api/types/VerificationCheckIncorrectResponse.js +0 -5
- package/api/types/VerificationCheckIncorrectResponseResult.d.ts +0 -12
- package/api/types/VerificationCheckIncorrectResponseResult.js +0 -11
- package/api/types/VerificationCheckOkResponse.d.ts +0 -21
- package/api/types/VerificationCheckOkResponse.js +0 -5
- package/api/types/VerificationCheckOkResponseResult.d.ts +0 -21
- package/api/types/VerificationCheckOkResponseResult.js +0 -13
- package/api/types/VerificationStatus.d.ts +0 -13
- package/api/types/VerificationStatus.js +0 -12
- package/api/types/index.d.ts +0 -25
- package/api/types/index.js +0 -41
- package/core/auth/BasicAuth.d.ts +0 -8
- package/core/auth/BasicAuth.js +0 -26
- package/core/auth/BearerToken.d.ts +0 -5
- package/core/auth/BearerToken.js +0 -15
- package/core/auth/index.d.ts +0 -2
- package/core/auth/index.js +0 -7
- package/core/fetcher/APIResponse.d.ts +0 -20
- package/core/fetcher/APIResponse.js +0 -2
- package/core/fetcher/Fetcher.d.ts +0 -39
- package/core/fetcher/Fetcher.js +0 -107
- package/core/fetcher/Headers.d.ts +0 -2
- package/core/fetcher/Headers.js +0 -84
- package/core/fetcher/HttpResponsePromise.d.ts +0 -58
- package/core/fetcher/HttpResponsePromise.js +0 -103
- package/core/fetcher/RawResponse.d.ts +0 -29
- package/core/fetcher/RawResponse.js +0 -44
- package/core/fetcher/Supplier.d.ts +0 -4
- package/core/fetcher/Supplier.js +0 -22
- package/core/fetcher/createRequestUrl.d.ts +0 -1
- package/core/fetcher/createRequestUrl.js +0 -12
- package/core/fetcher/getFetchFn.d.ts +0 -4
- package/core/fetcher/getFetchFn.js +0 -68
- package/core/fetcher/getHeader.d.ts +0 -1
- package/core/fetcher/getHeader.js +0 -11
- package/core/fetcher/getRequestBody.d.ts +0 -7
- package/core/fetcher/getRequestBody.js +0 -23
- package/core/fetcher/getResponseBody.d.ts +0 -1
- package/core/fetcher/getResponseBody.js +0 -54
- package/core/fetcher/index.d.ts +0 -8
- package/core/fetcher/index.js +0 -15
- package/core/fetcher/makeRequest.d.ts +0 -1
- package/core/fetcher/makeRequest.js +0 -42
- package/core/fetcher/requestWithRetries.d.ts +0 -1
- package/core/fetcher/requestWithRetries.js +0 -40
- package/core/fetcher/signals.d.ts +0 -11
- package/core/fetcher/signals.js +0 -36
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/core/index.d.ts +0 -3
- package/core/index.js +0 -19
- package/core/json.d.ts +0 -15
- package/core/json.js +0 -24
- package/core/runtime/index.d.ts +0 -1
- package/core/runtime/index.js +0 -5
- package/core/runtime/runtime.d.ts +0 -9
- package/core/runtime/runtime.js +0 -103
- package/dist/Client.d.ts +0 -49
- package/dist/Client.js +0 -47
- package/dist/api/errors/ConflictError.d.ts +0 -9
- package/dist/api/errors/ConflictError.js +0 -52
- package/dist/api/errors/UnprocessableEntityError.d.ts +0 -9
- package/dist/api/errors/UnprocessableEntityError.js +0 -52
- package/dist/api/errors/index.d.ts +0 -2
- package/dist/api/errors/index.js +0 -18
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.js +0 -19
- package/dist/api/resources/accounts/client/Client.d.ts +0 -59
- package/dist/api/resources/accounts/client/Client.js +0 -179
- package/dist/api/resources/accounts/client/index.d.ts +0 -1
- package/dist/api/resources/accounts/client/index.js +0 -17
- package/dist/api/resources/accounts/client/requests/CreateAccountRequest.d.ts +0 -16
- package/dist/api/resources/accounts/client/requests/CreateAccountRequest.js +0 -5
- package/dist/api/resources/accounts/client/requests/UpdateAccountRequest.d.ts +0 -16
- package/dist/api/resources/accounts/client/requests/UpdateAccountRequest.js +0 -5
- package/dist/api/resources/accounts/client/requests/index.d.ts +0 -2
- package/dist/api/resources/accounts/client/requests/index.js +0 -2
- package/dist/api/resources/accounts/index.d.ts +0 -1
- package/dist/api/resources/accounts/index.js +0 -17
- package/dist/api/resources/blasts/client/Client.d.ts +0 -50
- package/dist/api/resources/blasts/client/Client.js +0 -128
- package/dist/api/resources/blasts/client/index.d.ts +0 -1
- package/dist/api/resources/blasts/client/index.js +0 -17
- package/dist/api/resources/blasts/client/requests/BlastRequest.d.ts +0 -31
- package/dist/api/resources/blasts/client/requests/BlastRequest.js +0 -5
- package/dist/api/resources/blasts/client/requests/index.d.ts +0 -1
- package/dist/api/resources/blasts/client/requests/index.js +0 -2
- package/dist/api/resources/blasts/index.d.ts +0 -1
- package/dist/api/resources/blasts/index.js +0 -17
- package/dist/api/resources/contacts/client/Client.d.ts +0 -81
- package/dist/api/resources/contacts/client/Client.js +0 -242
- package/dist/api/resources/contacts/client/index.d.ts +0 -1
- package/dist/api/resources/contacts/client/index.js +0 -2
- package/dist/api/resources/contacts/index.d.ts +0 -1
- package/dist/api/resources/contacts/index.js +0 -17
- package/dist/api/resources/index.d.ts +0 -14
- package/dist/api/resources/index.js +0 -53
- package/dist/api/resources/messages/client/Client.d.ts +0 -54
- package/dist/api/resources/messages/client/Client.js +0 -132
- package/dist/api/resources/messages/client/index.d.ts +0 -1
- package/dist/api/resources/messages/client/index.js +0 -17
- package/dist/api/resources/messages/client/requests/MessageRequest.d.ts +0 -28
- package/dist/api/resources/messages/client/requests/MessageRequest.js +0 -5
- package/dist/api/resources/messages/client/requests/index.d.ts +0 -1
- package/dist/api/resources/messages/client/requests/index.js +0 -2
- package/dist/api/resources/messages/index.d.ts +0 -1
- package/dist/api/resources/messages/index.js +0 -17
- package/dist/api/resources/phoneNumbers/client/Client.d.ts +0 -45
- package/dist/api/resources/phoneNumbers/client/Client.js +0 -123
- package/dist/api/resources/phoneNumbers/client/index.d.ts +0 -1
- package/dist/api/resources/phoneNumbers/client/index.js +0 -17
- package/dist/api/resources/phoneNumbers/client/requests/CreatePhoneNumberRequest.d.ts +0 -17
- package/dist/api/resources/phoneNumbers/client/requests/CreatePhoneNumberRequest.js +0 -5
- package/dist/api/resources/phoneNumbers/client/requests/index.d.ts +0 -1
- package/dist/api/resources/phoneNumbers/client/requests/index.js +0 -2
- package/dist/api/resources/phoneNumbers/index.d.ts +0 -2
- package/dist/api/resources/phoneNumbers/index.js +0 -18
- package/dist/api/resources/phoneNumbers/types/CreatePhoneNumberRequestType.d.ts +0 -11
- package/dist/api/resources/phoneNumbers/types/CreatePhoneNumberRequestType.js +0 -10
- package/dist/api/resources/phoneNumbers/types/index.d.ts +0 -1
- package/dist/api/resources/phoneNumbers/types/index.js +0 -17
- package/dist/api/resources/users/client/Client.d.ts +0 -61
- package/dist/api/resources/users/client/Client.js +0 -180
- package/dist/api/resources/users/client/index.d.ts +0 -1
- package/dist/api/resources/users/client/index.js +0 -17
- package/dist/api/resources/users/client/requests/UserRequest.d.ts +0 -25
- package/dist/api/resources/users/client/requests/UserRequest.js +0 -5
- package/dist/api/resources/users/client/requests/index.d.ts +0 -1
- package/dist/api/resources/users/client/requests/index.js +0 -2
- package/dist/api/resources/users/index.d.ts +0 -1
- package/dist/api/resources/users/index.js +0 -17
- package/dist/api/resources/verifications/client/Client.d.ts +0 -60
- package/dist/api/resources/verifications/client/Client.js +0 -188
- package/dist/api/resources/verifications/client/index.d.ts +0 -1
- package/dist/api/resources/verifications/client/index.js +0 -17
- package/dist/api/resources/verifications/client/requests/VerificationCheckRequest.d.ts +0 -13
- package/dist/api/resources/verifications/client/requests/VerificationCheckRequest.js +0 -5
- package/dist/api/resources/verifications/client/requests/VerificationRequest.d.ts +0 -13
- package/dist/api/resources/verifications/client/requests/VerificationRequest.js +0 -5
- package/dist/api/resources/verifications/client/requests/index.d.ts +0 -2
- package/dist/api/resources/verifications/client/requests/index.js +0 -2
- package/dist/api/resources/verifications/index.d.ts +0 -1
- package/dist/api/resources/verifications/index.js +0 -17
- package/dist/api/types/AccountResponse.d.ts +0 -14
- package/dist/api/types/AccountResponse.js +0 -5
- package/dist/api/types/AttachmentParams.d.ts +0 -10
- package/dist/api/types/AttachmentParams.js +0 -5
- package/dist/api/types/AttachmentResponse.d.ts +0 -14
- package/dist/api/types/AttachmentResponse.js +0 -5
- package/dist/api/types/BlastResponse.d.ts +0 -18
- package/dist/api/types/BlastResponse.js +0 -5
- package/dist/api/types/BlastResponseAttachmentsItem.d.ts +0 -7
- package/dist/api/types/BlastResponseAttachmentsItem.js +0 -5
- package/dist/api/types/Contact.d.ts +0 -16
- package/dist/api/types/Contact.js +0 -5
- package/dist/api/types/ContactRequest.d.ts +0 -18
- package/dist/api/types/ContactRequest.js +0 -5
- package/dist/api/types/ContactResponse.d.ts +0 -20
- package/dist/api/types/ContactResponse.js +0 -5
- package/dist/api/types/Conversation.d.ts +0 -13
- package/dist/api/types/Conversation.js +0 -5
- package/dist/api/types/ConversationPhoneNumber.d.ts +0 -15
- package/dist/api/types/ConversationPhoneNumber.js +0 -5
- package/dist/api/types/ConversationPhoneNumberType.d.ts +0 -13
- package/dist/api/types/ConversationPhoneNumberType.js +0 -12
- package/dist/api/types/MessageConversationContactParams.d.ts +0 -14
- package/dist/api/types/MessageConversationContactParams.js +0 -5
- package/dist/api/types/MessageConversationParams.d.ts +0 -12
- package/dist/api/types/MessageConversationParams.js +0 -5
- package/dist/api/types/MessageResponse.d.ts +0 -15
- package/dist/api/types/MessageResponse.js +0 -5
- package/dist/api/types/PhoneNumber.d.ts +0 -15
- package/dist/api/types/PhoneNumber.js +0 -5
- package/dist/api/types/PhoneNumberType.d.ts +0 -11
- package/dist/api/types/PhoneNumberType.js +0 -10
- package/dist/api/types/UserResponse.d.ts +0 -18
- package/dist/api/types/UserResponse.js +0 -5
- package/dist/api/types/Verification.d.ts +0 -17
- package/dist/api/types/Verification.js +0 -5
- package/dist/api/types/VerificationCheckAlreadyVerifiedResponse.d.ts +0 -12
- package/dist/api/types/VerificationCheckAlreadyVerifiedResponse.js +0 -5
- package/dist/api/types/VerificationCheckAlreadyVerifiedResponseResult.d.ts +0 -14
- package/dist/api/types/VerificationCheckAlreadyVerifiedResponseResult.js +0 -13
- package/dist/api/types/VerificationCheckIncorrectResponse.d.ts +0 -12
- package/dist/api/types/VerificationCheckIncorrectResponse.js +0 -5
- package/dist/api/types/VerificationCheckIncorrectResponseResult.d.ts +0 -12
- package/dist/api/types/VerificationCheckIncorrectResponseResult.js +0 -11
- package/dist/api/types/VerificationCheckOkResponse.d.ts +0 -21
- package/dist/api/types/VerificationCheckOkResponse.js +0 -5
- package/dist/api/types/VerificationCheckOkResponseResult.d.ts +0 -21
- package/dist/api/types/VerificationCheckOkResponseResult.js +0 -13
- package/dist/api/types/VerificationStatus.d.ts +0 -13
- package/dist/api/types/VerificationStatus.js +0 -12
- package/dist/api/types/index.d.ts +0 -25
- package/dist/api/types/index.js +0 -41
- package/dist/core/auth/BasicAuth.d.ts +0 -8
- package/dist/core/auth/BasicAuth.js +0 -26
- package/dist/core/auth/BearerToken.d.ts +0 -5
- package/dist/core/auth/BearerToken.js +0 -15
- package/dist/core/auth/index.d.ts +0 -2
- package/dist/core/auth/index.js +0 -7
- package/dist/core/fetcher/APIResponse.d.ts +0 -20
- package/dist/core/fetcher/APIResponse.js +0 -2
- package/dist/core/fetcher/Fetcher.d.ts +0 -39
- package/dist/core/fetcher/Fetcher.js +0 -107
- package/dist/core/fetcher/Headers.d.ts +0 -2
- package/dist/core/fetcher/Headers.js +0 -84
- package/dist/core/fetcher/HttpResponsePromise.d.ts +0 -58
- package/dist/core/fetcher/HttpResponsePromise.js +0 -103
- package/dist/core/fetcher/RawResponse.d.ts +0 -29
- package/dist/core/fetcher/RawResponse.js +0 -44
- package/dist/core/fetcher/Supplier.d.ts +0 -4
- package/dist/core/fetcher/Supplier.js +0 -22
- package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
- package/dist/core/fetcher/createRequestUrl.js +0 -12
- package/dist/core/fetcher/getFetchFn.d.ts +0 -4
- package/dist/core/fetcher/getFetchFn.js +0 -68
- package/dist/core/fetcher/getHeader.d.ts +0 -1
- package/dist/core/fetcher/getHeader.js +0 -11
- package/dist/core/fetcher/getRequestBody.d.ts +0 -7
- package/dist/core/fetcher/getRequestBody.js +0 -23
- package/dist/core/fetcher/getResponseBody.d.ts +0 -1
- package/dist/core/fetcher/getResponseBody.js +0 -54
- package/dist/core/fetcher/index.d.ts +0 -8
- package/dist/core/fetcher/index.js +0 -15
- package/dist/core/fetcher/makeRequest.d.ts +0 -1
- package/dist/core/fetcher/makeRequest.js +0 -42
- package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
- package/dist/core/fetcher/requestWithRetries.js +0 -40
- package/dist/core/fetcher/signals.d.ts +0 -11
- package/dist/core/fetcher/signals.js +0 -36
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/dist/core/index.d.ts +0 -3
- package/dist/core/index.js +0 -19
- package/dist/core/json.d.ts +0 -15
- package/dist/core/json.js +0 -24
- package/dist/core/runtime/index.d.ts +0 -1
- package/dist/core/runtime/index.js +0 -5
- package/dist/core/runtime/runtime.d.ts +0 -9
- package/dist/core/runtime/runtime.js +0 -103
- package/dist/environments.d.ts +0 -7
- package/dist/environments.js +0 -9
- package/dist/errors/SurgeError.d.ts +0 -15
- package/dist/errors/SurgeError.js +0 -30
- package/dist/errors/SurgeTimeoutError.d.ts +0 -6
- package/dist/errors/SurgeTimeoutError.js +0 -13
- package/dist/errors/index.d.ts +0 -2
- package/dist/errors/index.js +0 -7
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -44
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -4
- package/environments.d.ts +0 -7
- package/environments.js +0 -9
- package/errors/SurgeError.d.ts +0 -15
- package/errors/SurgeError.js +0 -30
- package/errors/SurgeTimeoutError.d.ts +0 -6
- package/errors/SurgeTimeoutError.js +0 -13
- package/errors/index.d.ts +0 -2
- package/errors/index.js +0 -7
- package/jest.config.mjs +0 -8
- package/reference.md +0 -896
- package/scripts/rename-to-esm-files.js +0 -115
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as MessagesAPI from './messages';
|
|
5
|
+
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Blasts extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Sends a Blast.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const blast = await client.blasts.create(
|
|
16
|
+
* 'acct_01j9a43avnfqzbjfch6pygv1td',
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(accountID: string, body: BlastCreateParams, options?: RequestOptions): APIPromise<Blast> {
|
|
21
|
+
return this._client.post(path`/accounts/${accountID}/blasts`, { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A Blast is a message sent to multiple recipients at once.
|
|
27
|
+
*/
|
|
28
|
+
export interface Blast {
|
|
29
|
+
/**
|
|
30
|
+
* Unique identifier for the object.
|
|
31
|
+
*/
|
|
32
|
+
id?: string;
|
|
33
|
+
|
|
34
|
+
attachments?: Array<Blast.Attachment>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The message body.
|
|
38
|
+
*/
|
|
39
|
+
body?: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Optional name for the blast.
|
|
43
|
+
*/
|
|
44
|
+
name?: string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* When the blast will be or was sent.
|
|
48
|
+
*/
|
|
49
|
+
send_at?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export namespace Blast {
|
|
53
|
+
export interface Attachment {
|
|
54
|
+
/**
|
|
55
|
+
* The URL of the attachment.
|
|
56
|
+
*/
|
|
57
|
+
url?: string;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Parameters for creating a Blast
|
|
63
|
+
*/
|
|
64
|
+
export interface BlastParams {
|
|
65
|
+
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The message body.
|
|
69
|
+
*/
|
|
70
|
+
body?: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated Deprecated. Use `to` instead.
|
|
74
|
+
*/
|
|
75
|
+
contacts?: Array<string>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Optional name for the blast.
|
|
79
|
+
*/
|
|
80
|
+
name?: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Deprecated. Use `to` instead.
|
|
84
|
+
*/
|
|
85
|
+
segments?: Array<string>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* When to send the blast. If not provided, sends immediately.
|
|
89
|
+
*/
|
|
90
|
+
send_at?: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* List of recipients to whom the blast should be sent. This can be a combination
|
|
94
|
+
* of contact IDs, segment IDs, and phone numbers.
|
|
95
|
+
*/
|
|
96
|
+
to?: Array<string>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface BlastCreateParams {
|
|
100
|
+
attachments?: Array<MessagesAPI.AttachmentParams>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The message body.
|
|
104
|
+
*/
|
|
105
|
+
body?: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated Deprecated. Use `to` instead.
|
|
109
|
+
*/
|
|
110
|
+
contacts?: Array<string>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Optional name for the blast.
|
|
114
|
+
*/
|
|
115
|
+
name?: string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @deprecated Deprecated. Use `to` instead.
|
|
119
|
+
*/
|
|
120
|
+
segments?: Array<string>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* When to send the blast. If not provided, sends immediately.
|
|
124
|
+
*/
|
|
125
|
+
send_at?: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* List of recipients to whom the blast should be sent. This can be a combination
|
|
129
|
+
* of contact IDs, segment IDs, and phone numbers.
|
|
130
|
+
*/
|
|
131
|
+
to?: Array<string>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export declare namespace Blasts {
|
|
135
|
+
export {
|
|
136
|
+
type Blast as Blast,
|
|
137
|
+
type BlastParams as BlastParams,
|
|
138
|
+
type BlastCreateParams as BlastCreateParams,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Campaigns extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a campaign to register account to send text messages.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const campaign = await client.campaigns.create(
|
|
15
|
+
* 'acct_01j9a43avnfqzbjfch6pygv1td',
|
|
16
|
+
* {
|
|
17
|
+
* consent_flow:
|
|
18
|
+
* 'When customers bring in their car for service, they will fill out this web form for intake: https://fastauto.shop/bp108c In it they can choose to opt in to text message notifications. If they choose to opt in, we will send them notifications to let them know if our mechanics find issues and once the car is ready to go, as well as links to invoices and to leave us feedback.',
|
|
19
|
+
* description:
|
|
20
|
+
* 'This phone number will send auto maintenance notifications to end users that have opted in. It will also be used for responding to customer inquiries and sending some marketing offers.',
|
|
21
|
+
* message_samples: [
|
|
22
|
+
* 'You are now opted in to receive repair notifications from DT Precision Auto. Frequency varies. Msg&data rates apply. Reply STOP to opt out.',
|
|
23
|
+
* "You're lucky that hundred shot of NOS didn't blow the welds on the intake!",
|
|
24
|
+
* 'Your car is ready to go. See your invoice here: https://l.fastauto.shop/s034ij',
|
|
25
|
+
* ],
|
|
26
|
+
* privacy_policy_url: 'https://fastauto.shop/sms-privacy',
|
|
27
|
+
* use_cases: [
|
|
28
|
+
* 'account_notification',
|
|
29
|
+
* 'customer_care',
|
|
30
|
+
* 'marketing',
|
|
31
|
+
* ],
|
|
32
|
+
* volume: 'high',
|
|
33
|
+
* },
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
create(accountID: string, body: CampaignCreateParams, options?: RequestOptions): APIPromise<Campaign> {
|
|
38
|
+
return this._client.post(path`/accounts/${accountID}/campaigns`, { body, ...options });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* A campaign represents the context in which one or more of your phone numbers
|
|
44
|
+
* communicates with your contacts. Consent and opt-outs are tied to the campaign.
|
|
45
|
+
*/
|
|
46
|
+
export interface Campaign {
|
|
47
|
+
/**
|
|
48
|
+
* The campaign ID
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A string explaining the method through which end users will opt in to receive
|
|
54
|
+
* messages from the brand. Typically this should include URLs for opt-in forms or
|
|
55
|
+
* screenshots that might be helpful in explaining the flow to someone unfamiliar
|
|
56
|
+
* with the organization's purpose.
|
|
57
|
+
*/
|
|
58
|
+
consent_flow: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* An explanation of the organization's purpose and how it will be using text
|
|
62
|
+
* messaging to accomplish that purpose.
|
|
63
|
+
*/
|
|
64
|
+
description: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* A list of properties that this campaign should include. These properties can be
|
|
68
|
+
* any of the following values:
|
|
69
|
+
*
|
|
70
|
+
* - `links` - whether the campaign might send links in messages
|
|
71
|
+
* - `phone_numbers` - whether the campaign might send phone numbers in messages
|
|
72
|
+
* - `age_gated` - whether the campaign contains age gated content (controlled
|
|
73
|
+
* substances or adult content)
|
|
74
|
+
* - `direct_lending` - whether the campaign contains content related to direct
|
|
75
|
+
* lending or other loan arrangements
|
|
76
|
+
*/
|
|
77
|
+
includes: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* An array of 2-5 strings with examples of the messages that will be sent from
|
|
81
|
+
* this campaign. Typically the first sample should be a compliance message like
|
|
82
|
+
* `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
|
|
83
|
+
* These samples don't necessarily need to be the only templates that will be used
|
|
84
|
+
* for the campaign, but they should reflect the purpose of the messages that will
|
|
85
|
+
* be sent. Any variable content can be reflected by wrapping it in square brackets
|
|
86
|
+
* like `[customer name]`.
|
|
87
|
+
*/
|
|
88
|
+
message_samples: Array<string>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The URL of the privacy policy for the brand in question. This may be a shared
|
|
92
|
+
* privacy policy if it's the policy that is displayed to end users when they opt
|
|
93
|
+
* in to messaging.
|
|
94
|
+
*/
|
|
95
|
+
privacy_policy_url: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* A list containing 1-5 types of messages that will be sent with this campaign.
|
|
99
|
+
*
|
|
100
|
+
* The following use cases are typically available to all brands:
|
|
101
|
+
*
|
|
102
|
+
* - `account_notification` - For sending reminders, alerts, and general
|
|
103
|
+
* account-related notifications like booking confirmations or appointment
|
|
104
|
+
* reminders.
|
|
105
|
+
* - `customer_care` - For account support, troubleshooting, and general customer
|
|
106
|
+
* service communication.
|
|
107
|
+
* - `delivery_notification` - For notifying customers about the status of product
|
|
108
|
+
* or service deliveries.
|
|
109
|
+
* - `fraud_alert` - For warning customers about suspicious or potentially
|
|
110
|
+
* fraudulent activity.
|
|
111
|
+
* - `higher_education` - For messaging related to colleges, universities, and
|
|
112
|
+
* school districts outside of K–12.
|
|
113
|
+
* - `marketing` - For promotional or advertising messages intended to market
|
|
114
|
+
* products or services.
|
|
115
|
+
* - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
|
|
116
|
+
* - `public_service_announcement` - For raising awareness about social issues or
|
|
117
|
+
* important public information.
|
|
118
|
+
* - `security_alert` - For alerts related to potential security breaches or
|
|
119
|
+
* compromised systems requiring user action.
|
|
120
|
+
* - `two_factor_authentication` - For sending one-time passwords or verification
|
|
121
|
+
* codes for login or password reset.
|
|
122
|
+
*
|
|
123
|
+
* For access to special use cases not shown here, reach out to support@surge.app.
|
|
124
|
+
*/
|
|
125
|
+
use_cases: Array<
|
|
126
|
+
| 'account_notification'
|
|
127
|
+
| 'customer_care'
|
|
128
|
+
| 'delivery_notification'
|
|
129
|
+
| 'fraud_alert'
|
|
130
|
+
| 'higher_education'
|
|
131
|
+
| 'marketing'
|
|
132
|
+
| 'polling_voting'
|
|
133
|
+
| 'public_service_announcement'
|
|
134
|
+
| 'security_alert'
|
|
135
|
+
| 'two_factor_authentication'
|
|
136
|
+
>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* This will be one of the following:
|
|
140
|
+
*
|
|
141
|
+
* - `low` - The campaign will be allowed to send up to 2000 SMS segments to
|
|
142
|
+
* T-Mobile customers each day. In this case your platform will be charged for
|
|
143
|
+
* the setup fee for a low volume number upon receipt of the API request.
|
|
144
|
+
* - `high` - The campaign will be allowed to send up to 200k SMS segments to
|
|
145
|
+
* T-Mobile customers each day, depending on the trust score assigned by The
|
|
146
|
+
* Campaign Registry. Your platform will be charged for the setup fee for a high
|
|
147
|
+
* volume number upon receipt of the API request, and phone numbers will be
|
|
148
|
+
* charged as high volume numbers going forward.
|
|
149
|
+
*/
|
|
150
|
+
volume: 'high' | 'low';
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* A sample link that might be sent by this campaign. If links from other domains
|
|
154
|
+
* are sent through this campaign, they are much more likely to be filtered by the
|
|
155
|
+
* carriers. If link shortening is enabled for the account, the link shortener URL
|
|
156
|
+
* will be used instead of what is provided. Reach out to support if you would like
|
|
157
|
+
* to disable automatic link shortening.
|
|
158
|
+
*/
|
|
159
|
+
link_sample?: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The URL of the terms and conditions presented to end users when they opt in to
|
|
163
|
+
* messaging. These terms and conditions may be shared among all of a platform's
|
|
164
|
+
* customers if they're the terms that are presented to end users when they opt in
|
|
165
|
+
* to messaging.
|
|
166
|
+
*/
|
|
167
|
+
terms_and_conditions_url?: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Parameters for creating a new campaign
|
|
172
|
+
*/
|
|
173
|
+
export interface CampaignParams {
|
|
174
|
+
/**
|
|
175
|
+
* A string explaining the method through which end users will opt in to receive
|
|
176
|
+
* messages from the brand. Typically this should include URLs for opt-in forms or
|
|
177
|
+
* screenshots that might be helpful in explaining the flow to someone unfamiliar
|
|
178
|
+
* with the organization's purpose.
|
|
179
|
+
*/
|
|
180
|
+
consent_flow: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* An explanation of the organization's purpose and how it will be using text
|
|
184
|
+
* messaging to accomplish that purpose.
|
|
185
|
+
*/
|
|
186
|
+
description: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* An array of 2-5 strings with examples of the messages that will be sent from
|
|
190
|
+
* this campaign. Typically the first sample should be a compliance message like
|
|
191
|
+
* `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
|
|
192
|
+
* These samples don't necessarily need to be the only templates that will be used
|
|
193
|
+
* for the campaign, but they should reflect the purpose of the messages that will
|
|
194
|
+
* be sent. Any variable content can be reflected by wrapping it in square brackets
|
|
195
|
+
* like `[customer name]`.
|
|
196
|
+
*/
|
|
197
|
+
message_samples: Array<string>;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* The URL of the privacy policy for the brand in question. This may be a shared
|
|
201
|
+
* privacy policy if it's the policy that is displayed to end users when they opt
|
|
202
|
+
* in to messaging.
|
|
203
|
+
*/
|
|
204
|
+
privacy_policy_url: string;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* A list containing 1-5 types of messages that will be sent with this campaign.
|
|
208
|
+
*
|
|
209
|
+
* The following use cases are typically available to all brands:
|
|
210
|
+
*
|
|
211
|
+
* - `account_notification` - For sending reminders, alerts, and general
|
|
212
|
+
* account-related notifications like booking confirmations or appointment
|
|
213
|
+
* reminders.
|
|
214
|
+
* - `customer_care` - For account support, troubleshooting, and general customer
|
|
215
|
+
* service communication.
|
|
216
|
+
* - `delivery_notification` - For notifying customers about the status of product
|
|
217
|
+
* or service deliveries.
|
|
218
|
+
* - `fraud_alert` - For warning customers about suspicious or potentially
|
|
219
|
+
* fraudulent activity.
|
|
220
|
+
* - `higher_education` - For messaging related to colleges, universities, and
|
|
221
|
+
* school districts outside of K–12.
|
|
222
|
+
* - `marketing` - For promotional or advertising messages intended to market
|
|
223
|
+
* products or services.
|
|
224
|
+
* - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
|
|
225
|
+
* - `public_service_announcement` - For raising awareness about social issues or
|
|
226
|
+
* important public information.
|
|
227
|
+
* - `security_alert` - For alerts related to potential security breaches or
|
|
228
|
+
* compromised systems requiring user action.
|
|
229
|
+
* - `two_factor_authentication` - For sending one-time passwords or verification
|
|
230
|
+
* codes for login or password reset.
|
|
231
|
+
*
|
|
232
|
+
* For access to special use cases not shown here, reach out to support@surge.app.
|
|
233
|
+
*/
|
|
234
|
+
use_cases: Array<
|
|
235
|
+
| 'account_notification'
|
|
236
|
+
| 'customer_care'
|
|
237
|
+
| 'delivery_notification'
|
|
238
|
+
| 'fraud_alert'
|
|
239
|
+
| 'higher_education'
|
|
240
|
+
| 'marketing'
|
|
241
|
+
| 'polling_voting'
|
|
242
|
+
| 'public_service_announcement'
|
|
243
|
+
| 'security_alert'
|
|
244
|
+
| 'two_factor_authentication'
|
|
245
|
+
>;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* This will be one of the following:
|
|
249
|
+
*
|
|
250
|
+
* - `low` - The campaign will be allowed to send up to 2000 SMS segments to
|
|
251
|
+
* T-Mobile customers each day. In this case your platform will be charged for
|
|
252
|
+
* the setup fee for a low volume number upon receipt of the API request.
|
|
253
|
+
* - `high` - The campaign will be allowed to send up to 200k SMS segments to
|
|
254
|
+
* T-Mobile customers each day, depending on the trust score assigned by The
|
|
255
|
+
* Campaign Registry. Your platform will be charged for the setup fee for a high
|
|
256
|
+
* volume number upon receipt of the API request, and phone numbers will be
|
|
257
|
+
* charged as high volume numbers going forward.
|
|
258
|
+
*/
|
|
259
|
+
volume: 'high' | 'low';
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* A list of properties that this campaign should include. These properties can be
|
|
263
|
+
* any of the following values:
|
|
264
|
+
*
|
|
265
|
+
* - `links` - whether the campaign might send links in messages
|
|
266
|
+
* - `phone_numbers` - whether the campaign might send phone numbers in messages
|
|
267
|
+
* - `age_gated` - whether the campaign contains age gated content (controlled
|
|
268
|
+
* substances or adult content)
|
|
269
|
+
* - `direct_lending` - whether the campaign contains content related to direct
|
|
270
|
+
* lending or other loan arrangements
|
|
271
|
+
*/
|
|
272
|
+
includes?: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* A sample link that might be sent by this campaign. If links from other domains
|
|
276
|
+
* are sent through this campaign, they are much more likely to be filtered by the
|
|
277
|
+
* carriers. If link shortening is enabled for the account, the link shortener URL
|
|
278
|
+
* will be used instead of what is provided. Reach out to support if you would like
|
|
279
|
+
* to disable automatic link shortening.
|
|
280
|
+
*/
|
|
281
|
+
link_sample?: string;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The URL of the terms and conditions presented to end users when they opt in to
|
|
285
|
+
* messaging. These terms and conditions may be shared among all of a platform's
|
|
286
|
+
* customers if they're the terms that are presented to end users when they opt in
|
|
287
|
+
* to messaging.
|
|
288
|
+
*/
|
|
289
|
+
terms_and_conditions_url?: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export interface CampaignCreateParams {
|
|
293
|
+
/**
|
|
294
|
+
* A string explaining the method through which end users will opt in to receive
|
|
295
|
+
* messages from the brand. Typically this should include URLs for opt-in forms or
|
|
296
|
+
* screenshots that might be helpful in explaining the flow to someone unfamiliar
|
|
297
|
+
* with the organization's purpose.
|
|
298
|
+
*/
|
|
299
|
+
consent_flow: string;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* An explanation of the organization's purpose and how it will be using text
|
|
303
|
+
* messaging to accomplish that purpose.
|
|
304
|
+
*/
|
|
305
|
+
description: string;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* An array of 2-5 strings with examples of the messages that will be sent from
|
|
309
|
+
* this campaign. Typically the first sample should be a compliance message like
|
|
310
|
+
* `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
|
|
311
|
+
* These samples don't necessarily need to be the only templates that will be used
|
|
312
|
+
* for the campaign, but they should reflect the purpose of the messages that will
|
|
313
|
+
* be sent. Any variable content can be reflected by wrapping it in square brackets
|
|
314
|
+
* like `[customer name]`.
|
|
315
|
+
*/
|
|
316
|
+
message_samples: Array<string>;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* The URL of the privacy policy for the brand in question. This may be a shared
|
|
320
|
+
* privacy policy if it's the policy that is displayed to end users when they opt
|
|
321
|
+
* in to messaging.
|
|
322
|
+
*/
|
|
323
|
+
privacy_policy_url: string;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* A list containing 1-5 types of messages that will be sent with this campaign.
|
|
327
|
+
*
|
|
328
|
+
* The following use cases are typically available to all brands:
|
|
329
|
+
*
|
|
330
|
+
* - `account_notification` - For sending reminders, alerts, and general
|
|
331
|
+
* account-related notifications like booking confirmations or appointment
|
|
332
|
+
* reminders.
|
|
333
|
+
* - `customer_care` - For account support, troubleshooting, and general customer
|
|
334
|
+
* service communication.
|
|
335
|
+
* - `delivery_notification` - For notifying customers about the status of product
|
|
336
|
+
* or service deliveries.
|
|
337
|
+
* - `fraud_alert` - For warning customers about suspicious or potentially
|
|
338
|
+
* fraudulent activity.
|
|
339
|
+
* - `higher_education` - For messaging related to colleges, universities, and
|
|
340
|
+
* school districts outside of K–12.
|
|
341
|
+
* - `marketing` - For promotional or advertising messages intended to market
|
|
342
|
+
* products or services.
|
|
343
|
+
* - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
|
|
344
|
+
* - `public_service_announcement` - For raising awareness about social issues or
|
|
345
|
+
* important public information.
|
|
346
|
+
* - `security_alert` - For alerts related to potential security breaches or
|
|
347
|
+
* compromised systems requiring user action.
|
|
348
|
+
* - `two_factor_authentication` - For sending one-time passwords or verification
|
|
349
|
+
* codes for login or password reset.
|
|
350
|
+
*
|
|
351
|
+
* For access to special use cases not shown here, reach out to support@surge.app.
|
|
352
|
+
*/
|
|
353
|
+
use_cases: Array<
|
|
354
|
+
| 'account_notification'
|
|
355
|
+
| 'customer_care'
|
|
356
|
+
| 'delivery_notification'
|
|
357
|
+
| 'fraud_alert'
|
|
358
|
+
| 'higher_education'
|
|
359
|
+
| 'marketing'
|
|
360
|
+
| 'polling_voting'
|
|
361
|
+
| 'public_service_announcement'
|
|
362
|
+
| 'security_alert'
|
|
363
|
+
| 'two_factor_authentication'
|
|
364
|
+
>;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* This will be one of the following:
|
|
368
|
+
*
|
|
369
|
+
* - `low` - The campaign will be allowed to send up to 2000 SMS segments to
|
|
370
|
+
* T-Mobile customers each day. In this case your platform will be charged for
|
|
371
|
+
* the setup fee for a low volume number upon receipt of the API request.
|
|
372
|
+
* - `high` - The campaign will be allowed to send up to 200k SMS segments to
|
|
373
|
+
* T-Mobile customers each day, depending on the trust score assigned by The
|
|
374
|
+
* Campaign Registry. Your platform will be charged for the setup fee for a high
|
|
375
|
+
* volume number upon receipt of the API request, and phone numbers will be
|
|
376
|
+
* charged as high volume numbers going forward.
|
|
377
|
+
*/
|
|
378
|
+
volume: 'high' | 'low';
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* A list of properties that this campaign should include. These properties can be
|
|
382
|
+
* any of the following values:
|
|
383
|
+
*
|
|
384
|
+
* - `links` - whether the campaign might send links in messages
|
|
385
|
+
* - `phone_numbers` - whether the campaign might send phone numbers in messages
|
|
386
|
+
* - `age_gated` - whether the campaign contains age gated content (controlled
|
|
387
|
+
* substances or adult content)
|
|
388
|
+
* - `direct_lending` - whether the campaign contains content related to direct
|
|
389
|
+
* lending or other loan arrangements
|
|
390
|
+
*/
|
|
391
|
+
includes?: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* A sample link that might be sent by this campaign. If links from other domains
|
|
395
|
+
* are sent through this campaign, they are much more likely to be filtered by the
|
|
396
|
+
* carriers. If link shortening is enabled for the account, the link shortener URL
|
|
397
|
+
* will be used instead of what is provided. Reach out to support if you would like
|
|
398
|
+
* to disable automatic link shortening.
|
|
399
|
+
*/
|
|
400
|
+
link_sample?: string;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* The URL of the terms and conditions presented to end users when they opt in to
|
|
404
|
+
* messaging. These terms and conditions may be shared among all of a platform's
|
|
405
|
+
* customers if they're the terms that are presented to end users when they opt in
|
|
406
|
+
* to messaging.
|
|
407
|
+
*/
|
|
408
|
+
terms_and_conditions_url?: string;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export declare namespace Campaigns {
|
|
412
|
+
export {
|
|
413
|
+
type Campaign as Campaign,
|
|
414
|
+
type CampaignParams as CampaignParams,
|
|
415
|
+
type CampaignCreateParams as CampaignCreateParams,
|
|
416
|
+
};
|
|
417
|
+
}
|