@notiflows/node 0.0.1
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/LICENSE +201 -0
- package/README.md +422 -0
- 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 +207 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +207 -0
- package/client.d.ts.map +1 -0
- package/client.js +502 -0
- package/client.js.map +1 -0
- package/client.mjs +498 -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/pagination.d.mts +59 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +59 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.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 +7 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +7 -0
- package/index.d.ts.map +1 -0
- package/index.js +32 -0
- package/index.js.map +1 -0
- package/index.mjs +8 -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 +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.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 +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -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 +147 -0
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- 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/deliveries.d.mts +143 -0
- package/resources/deliveries.d.mts.map +1 -0
- package/resources/deliveries.d.ts +143 -0
- package/resources/deliveries.d.ts.map +1 -0
- package/resources/deliveries.js +44 -0
- package/resources/deliveries.js.map +1 -0
- package/resources/deliveries.mjs +40 -0
- package/resources/deliveries.mjs.map +1 -0
- package/resources/index.d.mts +6 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +6 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +15 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +7 -0
- package/resources/index.mjs.map +1 -0
- package/resources/notifications.d.mts +170 -0
- package/resources/notifications.d.mts.map +1 -0
- package/resources/notifications.d.ts +170 -0
- package/resources/notifications.d.ts.map +1 -0
- package/resources/notifications.js +58 -0
- package/resources/notifications.js.map +1 -0
- package/resources/notifications.mjs +54 -0
- package/resources/notifications.mjs.map +1 -0
- package/resources/notiflows.d.mts +122 -0
- package/resources/notiflows.d.mts.map +1 -0
- package/resources/notiflows.d.ts +122 -0
- package/resources/notiflows.d.ts.map +1 -0
- package/resources/notiflows.js +36 -0
- package/resources/notiflows.js.map +1 -0
- package/resources/notiflows.mjs +32 -0
- package/resources/notiflows.mjs.map +1 -0
- package/resources/topics/index.d.mts +3 -0
- package/resources/topics/index.d.mts.map +1 -0
- package/resources/topics/index.d.ts +3 -0
- package/resources/topics/index.d.ts.map +1 -0
- package/resources/topics/index.js +9 -0
- package/resources/topics/index.js.map +1 -0
- package/resources/topics/index.mjs +4 -0
- package/resources/topics/index.mjs.map +1 -0
- package/resources/topics/subscriptions.d.mts +137 -0
- package/resources/topics/subscriptions.d.mts.map +1 -0
- package/resources/topics/subscriptions.d.ts +137 -0
- package/resources/topics/subscriptions.d.ts.map +1 -0
- package/resources/topics/subscriptions.js +78 -0
- package/resources/topics/subscriptions.js.map +1 -0
- package/resources/topics/subscriptions.mjs +74 -0
- package/resources/topics/subscriptions.mjs.map +1 -0
- package/resources/topics/topics.d.mts +70 -0
- package/resources/topics/topics.d.mts.map +1 -0
- package/resources/topics/topics.d.ts +70 -0
- package/resources/topics/topics.d.ts.map +1 -0
- package/resources/topics/topics.js +65 -0
- package/resources/topics/topics.js.map +1 -0
- package/resources/topics/topics.mjs +60 -0
- package/resources/topics/topics.mjs.map +1 -0
- package/resources/topics.d.mts +2 -0
- package/resources/topics.d.mts.map +1 -0
- package/resources/topics.d.ts +2 -0
- package/resources/topics.d.ts.map +1 -0
- package/resources/topics.js +6 -0
- package/resources/topics.js.map +1 -0
- package/resources/topics.mjs +3 -0
- package/resources/topics.mjs.map +1 -0
- package/resources/users/channel-settings.d.mts +158 -0
- package/resources/users/channel-settings.d.mts.map +1 -0
- package/resources/users/channel-settings.d.ts +158 -0
- package/resources/users/channel-settings.d.ts.map +1 -0
- package/resources/users/channel-settings.js +98 -0
- package/resources/users/channel-settings.js.map +1 -0
- package/resources/users/channel-settings.mjs +94 -0
- package/resources/users/channel-settings.mjs.map +1 -0
- package/resources/users/deliveries.d.mts +71 -0
- package/resources/users/deliveries.d.mts.map +1 -0
- package/resources/users/deliveries.d.ts +71 -0
- package/resources/users/deliveries.d.ts.map +1 -0
- package/resources/users/deliveries.js +45 -0
- package/resources/users/deliveries.js.map +1 -0
- package/resources/users/deliveries.mjs +41 -0
- package/resources/users/deliveries.mjs.map +1 -0
- package/resources/users/index.d.mts +7 -0
- package/resources/users/index.d.mts.map +1 -0
- package/resources/users/index.d.ts +7 -0
- package/resources/users/index.d.ts.map +1 -0
- package/resources/users/index.js +17 -0
- package/resources/users/index.js.map +1 -0
- package/resources/users/index.mjs +8 -0
- package/resources/users/index.mjs.map +1 -0
- package/resources/users/notifications.d.mts +68 -0
- package/resources/users/notifications.d.mts.map +1 -0
- package/resources/users/notifications.d.ts +68 -0
- package/resources/users/notifications.d.ts.map +1 -0
- package/resources/users/notifications.js +43 -0
- package/resources/users/notifications.js.map +1 -0
- package/resources/users/notifications.mjs +39 -0
- package/resources/users/notifications.mjs.map +1 -0
- package/resources/users/preferences.d.mts +166 -0
- package/resources/users/preferences.d.mts.map +1 -0
- package/resources/users/preferences.d.ts +166 -0
- package/resources/users/preferences.d.ts.map +1 -0
- package/resources/users/preferences.js +60 -0
- package/resources/users/preferences.js.map +1 -0
- package/resources/users/preferences.mjs +56 -0
- package/resources/users/preferences.mjs.map +1 -0
- package/resources/users/subscriptions.d.mts +121 -0
- package/resources/users/subscriptions.d.mts.map +1 -0
- package/resources/users/subscriptions.d.ts +121 -0
- package/resources/users/subscriptions.d.ts.map +1 -0
- package/resources/users/subscriptions.js +84 -0
- package/resources/users/subscriptions.js.map +1 -0
- package/resources/users/subscriptions.mjs +80 -0
- package/resources/users/subscriptions.mjs.map +1 -0
- package/resources/users/users.d.mts +216 -0
- package/resources/users/users.d.mts.map +1 -0
- package/resources/users/users.d.ts +216 -0
- package/resources/users/users.d.ts.map +1 -0
- package/resources/users/users.js +102 -0
- package/resources/users/users.js.map +1 -0
- package/resources/users/users.mjs +97 -0
- package/resources/users/users.mjs.map +1 -0
- package/resources/users.d.mts +2 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +2 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +6 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +3 -0
- package/resources/users.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 +838 -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/pagination.ts +163 -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 +23 -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 +56 -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 +128 -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/pagination.ts +2 -0
- package/src/resource.ts +2 -0
- package/src/resources/deliveries.ts +183 -0
- package/src/resources/index.ts +19 -0
- package/src/resources/notifications.ts +225 -0
- package/src/resources/notiflows.ts +155 -0
- package/src/resources/topics/index.ts +11 -0
- package/src/resources/topics/subscriptions.ts +182 -0
- package/src/resources/topics/topics.ts +115 -0
- package/src/resources/topics.ts +3 -0
- package/src/resources/users/channel-settings.ts +205 -0
- package/src/resources/users/deliveries.ts +103 -0
- package/src/resources/users/index.ts +23 -0
- package/src/resources/users/notifications.ts +100 -0
- package/src/resources/users/preferences.ts +182 -0
- package/src/resources/users/subscriptions.ts +179 -0
- package/src/resources/users/users.ts +324 -0
- package/src/resources/users.ts +3 -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 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as DeliveriesAPI from "../deliveries.mjs";
|
|
3
|
+
import { DeliveriesCursorPage } from "../deliveries.mjs";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
+
import { type CursorPageParams, PagePromise } from "../../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
|
+
export declare class Deliveries extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve details of a specific delivery attempt for a user.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const delivery = await client.users.deliveries.retrieve(
|
|
14
|
+
* '01HQXYZ123456789ABCDEFGHIJ',
|
|
15
|
+
* { user_id: 'user_12345' },
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
retrieve(deliveryID: string, params: DeliveryRetrieveParams, options?: RequestOptions): APIPromise<DeliveriesAPI.Delivery>;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieve all delivery attempts for a user across all channels.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Automatically fetches more pages as needed.
|
|
26
|
+
* for await (const delivery of client.users.deliveries.list(
|
|
27
|
+
* 'user_12345',
|
|
28
|
+
* )) {
|
|
29
|
+
* // ...
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
list(userID: string, query?: DeliveryListParams | null | undefined, options?: RequestOptions): PagePromise<DeliveriesCursorPage, DeliveriesAPI.Delivery>;
|
|
34
|
+
}
|
|
35
|
+
export interface DeliveryRetrieveParams {
|
|
36
|
+
/**
|
|
37
|
+
* User external ID
|
|
38
|
+
*/
|
|
39
|
+
user_id: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DeliveryListParams extends CursorPageParams {
|
|
42
|
+
/**
|
|
43
|
+
* Cursor for fetching the previous page
|
|
44
|
+
*/
|
|
45
|
+
before?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Filter by channel ID (UUID)
|
|
48
|
+
*/
|
|
49
|
+
channel_id?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Filter by created after (ISO 8601 datetime)
|
|
52
|
+
*/
|
|
53
|
+
created_after?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Filter by created before (ISO 8601 datetime)
|
|
56
|
+
*/
|
|
57
|
+
created_before?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Filter by status (pending, sent, failed)
|
|
60
|
+
*/
|
|
61
|
+
status?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Filter by topic name
|
|
64
|
+
*/
|
|
65
|
+
topic?: string;
|
|
66
|
+
}
|
|
67
|
+
export declare namespace Deliveries {
|
|
68
|
+
export { type DeliveryRetrieveParams as DeliveryRetrieveParams, type DeliveryListParams as DeliveryListParams, };
|
|
69
|
+
}
|
|
70
|
+
export { type DeliveriesCursorPage };
|
|
71
|
+
//# sourceMappingURL=deliveries.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deliveries.d.mts","sourceRoot":"","sources":["../../src/resources/users/deliveries.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EAAE,oBAAoB,EAAE;OACxB,EAAE,UAAU,EAAE;OACd,EAAc,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC;IAKrC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oBAAoB,EAAE,aAAa,CAAC,QAAQ,CAAC;CAM7D;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH;AAED,OAAO,EAAE,KAAK,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as DeliveriesAPI from "../deliveries.js";
|
|
3
|
+
import { DeliveriesCursorPage } from "../deliveries.js";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
+
import { type CursorPageParams, PagePromise } from "../../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
|
+
export declare class Deliveries extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve details of a specific delivery attempt for a user.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const delivery = await client.users.deliveries.retrieve(
|
|
14
|
+
* '01HQXYZ123456789ABCDEFGHIJ',
|
|
15
|
+
* { user_id: 'user_12345' },
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
retrieve(deliveryID: string, params: DeliveryRetrieveParams, options?: RequestOptions): APIPromise<DeliveriesAPI.Delivery>;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieve all delivery attempts for a user across all channels.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Automatically fetches more pages as needed.
|
|
26
|
+
* for await (const delivery of client.users.deliveries.list(
|
|
27
|
+
* 'user_12345',
|
|
28
|
+
* )) {
|
|
29
|
+
* // ...
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
list(userID: string, query?: DeliveryListParams | null | undefined, options?: RequestOptions): PagePromise<DeliveriesCursorPage, DeliveriesAPI.Delivery>;
|
|
34
|
+
}
|
|
35
|
+
export interface DeliveryRetrieveParams {
|
|
36
|
+
/**
|
|
37
|
+
* User external ID
|
|
38
|
+
*/
|
|
39
|
+
user_id: string;
|
|
40
|
+
}
|
|
41
|
+
export interface DeliveryListParams extends CursorPageParams {
|
|
42
|
+
/**
|
|
43
|
+
* Cursor for fetching the previous page
|
|
44
|
+
*/
|
|
45
|
+
before?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Filter by channel ID (UUID)
|
|
48
|
+
*/
|
|
49
|
+
channel_id?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Filter by created after (ISO 8601 datetime)
|
|
52
|
+
*/
|
|
53
|
+
created_after?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Filter by created before (ISO 8601 datetime)
|
|
56
|
+
*/
|
|
57
|
+
created_before?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Filter by status (pending, sent, failed)
|
|
60
|
+
*/
|
|
61
|
+
status?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Filter by topic name
|
|
64
|
+
*/
|
|
65
|
+
topic?: string;
|
|
66
|
+
}
|
|
67
|
+
export declare namespace Deliveries {
|
|
68
|
+
export { type DeliveryRetrieveParams as DeliveryRetrieveParams, type DeliveryListParams as DeliveryListParams, };
|
|
69
|
+
}
|
|
70
|
+
export { type DeliveriesCursorPage };
|
|
71
|
+
//# sourceMappingURL=deliveries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deliveries.d.ts","sourceRoot":"","sources":["../../src/resources/users/deliveries.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EAAE,oBAAoB,EAAE;OACxB,EAAE,UAAU,EAAE;OACd,EAAc,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC;IAKrC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oBAAoB,EAAE,aAAa,CAAC,QAAQ,CAAC;CAM7D;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH;AAED,OAAO,EAAE,KAAK,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Deliveries = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class Deliveries extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve details of a specific delivery attempt for a user.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const delivery = await client.users.deliveries.retrieve(
|
|
15
|
+
* '01HQXYZ123456789ABCDEFGHIJ',
|
|
16
|
+
* { user_id: 'user_12345' },
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieve(deliveryID, params, options) {
|
|
21
|
+
const { user_id } = params;
|
|
22
|
+
return this._client.get((0, path_1.path) `/users/${user_id}/deliveries/${deliveryID}`, options);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Retrieve all delivery attempts for a user across all channels.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // Automatically fetches more pages as needed.
|
|
30
|
+
* for await (const delivery of client.users.deliveries.list(
|
|
31
|
+
* 'user_12345',
|
|
32
|
+
* )) {
|
|
33
|
+
* // ...
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
list(userID, query = {}, options) {
|
|
38
|
+
return this._client.getAPIList((0, path_1.path) `/users/${userID}/deliveries`, (pagination_1.CursorPage), {
|
|
39
|
+
query,
|
|
40
|
+
...options,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.Deliveries = Deliveries;
|
|
45
|
+
//# sourceMappingURL=deliveries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deliveries.js","sourceRoot":"","sources":["../../src/resources/users/deliveries.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAAuF;AAEvF,uDAAiD;AAEjD,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;OAUG;IACH,QAAQ,CACN,UAAkB,EAClB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,eAAe,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAc,EACd,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,aAAa,EAAE,CAAA,uBAAkC,CAAA,EAAE;YACpG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA5CD,gCA4CC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../../core/pagination.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
export class Deliveries extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieve details of a specific delivery attempt for a user.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const delivery = await client.users.deliveries.retrieve(
|
|
12
|
+
* '01HQXYZ123456789ABCDEFGHIJ',
|
|
13
|
+
* { user_id: 'user_12345' },
|
|
14
|
+
* );
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
retrieve(deliveryID, params, options) {
|
|
18
|
+
const { user_id } = params;
|
|
19
|
+
return this._client.get(path `/users/${user_id}/deliveries/${deliveryID}`, options);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Retrieve all delivery attempts for a user across all channels.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Automatically fetches more pages as needed.
|
|
27
|
+
* for await (const delivery of client.users.deliveries.list(
|
|
28
|
+
* 'user_12345',
|
|
29
|
+
* )) {
|
|
30
|
+
* // ...
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
list(userID, query = {}, options) {
|
|
35
|
+
return this._client.getAPIList(path `/users/${userID}/deliveries`, (CursorPage), {
|
|
36
|
+
query,
|
|
37
|
+
...options,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=deliveries.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deliveries.mjs","sourceRoot":"","sources":["../../src/resources/users/deliveries.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,QAAQ,CACN,UAAkB,EAClB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,eAAe,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAc,EACd,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,UAAU,MAAM,aAAa,EAAE,CAAA,UAAkC,CAAA,EAAE;YACpG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ChannelSettings, type MobilePushSettings, type SlackSettings, type ChannelSettingRetrieveParams, type ChannelSettingUpdateParams, type ChannelSettingDeleteParams, } from "./channel-settings.mjs";
|
|
2
|
+
export { Deliveries, type DeliveryRetrieveParams, type DeliveryListParams } from "./deliveries.mjs";
|
|
3
|
+
export { Notifications, type NotificationRetrieveParams, type NotificationListParams } from "./notifications.mjs";
|
|
4
|
+
export { Preferences, type UpdatePreferencesRequest, type PreferenceUpdateParams } from "./preferences.mjs";
|
|
5
|
+
export { Subscriptions, type Subscription, type SubscriptionRetrieveParams, type SubscriptionListParams, type SubscriptionSubscribeParams, type SubscriptionUnsubscribeParams, type SubscriptionsCursorPage, } from "./subscriptions.mjs";
|
|
6
|
+
export { Users, type User, type UserListParams, type UserUpsertParams, type UsersCursorPage } from "./users.mjs";
|
|
7
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":"OAEO,EACL,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,GAChC;OACM,EAAE,UAAU,EAAE,KAAK,sBAAsB,EAAE,KAAK,kBAAkB,EAAE;OACpE,EAAE,aAAa,EAAE,KAAK,0BAA0B,EAAE,KAAK,sBAAsB,EAAE;OAC/E,EAAE,WAAW,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE;OAC3E,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,GAC7B;OACM,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ChannelSettings, type MobilePushSettings, type SlackSettings, type ChannelSettingRetrieveParams, type ChannelSettingUpdateParams, type ChannelSettingDeleteParams, } from "./channel-settings.js";
|
|
2
|
+
export { Deliveries, type DeliveryRetrieveParams, type DeliveryListParams } from "./deliveries.js";
|
|
3
|
+
export { Notifications, type NotificationRetrieveParams, type NotificationListParams } from "./notifications.js";
|
|
4
|
+
export { Preferences, type UpdatePreferencesRequest, type PreferenceUpdateParams } from "./preferences.js";
|
|
5
|
+
export { Subscriptions, type Subscription, type SubscriptionRetrieveParams, type SubscriptionListParams, type SubscriptionSubscribeParams, type SubscriptionUnsubscribeParams, type SubscriptionsCursorPage, } from "./subscriptions.js";
|
|
6
|
+
export { Users, type User, type UserListParams, type UserUpsertParams, type UsersCursorPage } from "./users.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":"OAEO,EACL,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,GAChC;OACM,EAAE,UAAU,EAAE,KAAK,sBAAsB,EAAE,KAAK,kBAAkB,EAAE;OACpE,EAAE,aAAa,EAAE,KAAK,0BAA0B,EAAE,KAAK,sBAAsB,EAAE;OAC/E,EAAE,WAAW,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE;OAC3E,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,GAC7B;OACM,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Users = exports.Subscriptions = exports.Preferences = exports.Notifications = exports.Deliveries = exports.ChannelSettings = void 0;
|
|
5
|
+
var channel_settings_1 = require("./channel-settings.js");
|
|
6
|
+
Object.defineProperty(exports, "ChannelSettings", { enumerable: true, get: function () { return channel_settings_1.ChannelSettings; } });
|
|
7
|
+
var deliveries_1 = require("./deliveries.js");
|
|
8
|
+
Object.defineProperty(exports, "Deliveries", { enumerable: true, get: function () { return deliveries_1.Deliveries; } });
|
|
9
|
+
var notifications_1 = require("./notifications.js");
|
|
10
|
+
Object.defineProperty(exports, "Notifications", { enumerable: true, get: function () { return notifications_1.Notifications; } });
|
|
11
|
+
var preferences_1 = require("./preferences.js");
|
|
12
|
+
Object.defineProperty(exports, "Preferences", { enumerable: true, get: function () { return preferences_1.Preferences; } });
|
|
13
|
+
var subscriptions_1 = require("./subscriptions.js");
|
|
14
|
+
Object.defineProperty(exports, "Subscriptions", { enumerable: true, get: function () { return subscriptions_1.Subscriptions; } });
|
|
15
|
+
var users_1 = require("./users.js");
|
|
16
|
+
Object.defineProperty(exports, "Users", { enumerable: true, get: function () { return users_1.Users; } });
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0DAO4B;AAN1B,mHAAA,eAAe,OAAA;AAOjB,8CAAgG;AAAvF,wGAAA,UAAU,OAAA;AACnB,oDAA8G;AAArG,8GAAA,aAAa,OAAA;AACtB,gDAAwG;AAA/F,0GAAA,WAAW,OAAA;AACpB,oDAQyB;AAPvB,8GAAA,aAAa,OAAA;AAQf,oCAA6G;AAApG,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export { ChannelSettings, } from "./channel-settings.mjs";
|
|
3
|
+
export { Deliveries } from "./deliveries.mjs";
|
|
4
|
+
export { Notifications } from "./notifications.mjs";
|
|
5
|
+
export { Preferences } from "./preferences.mjs";
|
|
6
|
+
export { Subscriptions, } from "./subscriptions.mjs";
|
|
7
|
+
export { Users } from "./users.mjs";
|
|
8
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,eAAe,GAMhB;OACM,EAAE,UAAU,EAAwD;OACpE,EAAE,aAAa,EAAgE;OAC/E,EAAE,WAAW,EAA8D;OAC3E,EACL,aAAa,GAOd;OACM,EAAE,KAAK,EAA+E"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as NotificationsAPI from "../notifications.mjs";
|
|
3
|
+
import { NotificationsCursorPage } from "../notifications.mjs";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
+
import { type CursorPageParams, PagePromise } from "../../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
|
+
export declare class Notifications extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve a specific notification for a user, including all delivery attempts.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const notification =
|
|
14
|
+
* await client.users.notifications.retrieve(
|
|
15
|
+
* '01HQXYZ123456789ABCDEFGHIJ',
|
|
16
|
+
* { user_id: 'user_12345' },
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieve(notificationID: string, params: NotificationRetrieveParams, options?: RequestOptions): APIPromise<NotificationsAPI.Notification>;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieve all notifications sent to a specific user.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Automatically fetches more pages as needed.
|
|
27
|
+
* for await (const notification of client.users.notifications.list(
|
|
28
|
+
* 'user_12345',
|
|
29
|
+
* )) {
|
|
30
|
+
* // ...
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
list(userID: string, query?: NotificationListParams | null | undefined, options?: RequestOptions): PagePromise<NotificationsCursorPage, NotificationsAPI.Notification>;
|
|
35
|
+
}
|
|
36
|
+
export interface NotificationRetrieveParams {
|
|
37
|
+
/**
|
|
38
|
+
* User external ID
|
|
39
|
+
*/
|
|
40
|
+
user_id: string;
|
|
41
|
+
}
|
|
42
|
+
export interface NotificationListParams extends CursorPageParams {
|
|
43
|
+
/**
|
|
44
|
+
* Cursor for fetching the previous page
|
|
45
|
+
*/
|
|
46
|
+
before?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Filter by created after (ISO 8601 datetime)
|
|
49
|
+
*/
|
|
50
|
+
created_after?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Filter by created before (ISO 8601 datetime)
|
|
53
|
+
*/
|
|
54
|
+
created_before?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Filter by status
|
|
57
|
+
*/
|
|
58
|
+
status?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Filter by topic
|
|
61
|
+
*/
|
|
62
|
+
topic?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare namespace Notifications {
|
|
65
|
+
export { type NotificationRetrieveParams as NotificationRetrieveParams, type NotificationListParams as NotificationListParams, };
|
|
66
|
+
}
|
|
67
|
+
export { type NotificationsCursorPage };
|
|
68
|
+
//# sourceMappingURL=notifications.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.d.mts","sourceRoot":"","sources":["../../src/resources/users/notifications.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,uBAAuB,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAc,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAK5C;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,YAAY,CAAC;CAOvE;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH;AAED,OAAO,EAAE,KAAK,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as NotificationsAPI from "../notifications.js";
|
|
3
|
+
import { NotificationsCursorPage } from "../notifications.js";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
+
import { type CursorPageParams, PagePromise } from "../../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
|
+
export declare class Notifications extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve a specific notification for a user, including all delivery attempts.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const notification =
|
|
14
|
+
* await client.users.notifications.retrieve(
|
|
15
|
+
* '01HQXYZ123456789ABCDEFGHIJ',
|
|
16
|
+
* { user_id: 'user_12345' },
|
|
17
|
+
* );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieve(notificationID: string, params: NotificationRetrieveParams, options?: RequestOptions): APIPromise<NotificationsAPI.Notification>;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieve all notifications sent to a specific user.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Automatically fetches more pages as needed.
|
|
27
|
+
* for await (const notification of client.users.notifications.list(
|
|
28
|
+
* 'user_12345',
|
|
29
|
+
* )) {
|
|
30
|
+
* // ...
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
list(userID: string, query?: NotificationListParams | null | undefined, options?: RequestOptions): PagePromise<NotificationsCursorPage, NotificationsAPI.Notification>;
|
|
35
|
+
}
|
|
36
|
+
export interface NotificationRetrieveParams {
|
|
37
|
+
/**
|
|
38
|
+
* User external ID
|
|
39
|
+
*/
|
|
40
|
+
user_id: string;
|
|
41
|
+
}
|
|
42
|
+
export interface NotificationListParams extends CursorPageParams {
|
|
43
|
+
/**
|
|
44
|
+
* Cursor for fetching the previous page
|
|
45
|
+
*/
|
|
46
|
+
before?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Filter by created after (ISO 8601 datetime)
|
|
49
|
+
*/
|
|
50
|
+
created_after?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Filter by created before (ISO 8601 datetime)
|
|
53
|
+
*/
|
|
54
|
+
created_before?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Filter by status
|
|
57
|
+
*/
|
|
58
|
+
status?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Filter by topic
|
|
61
|
+
*/
|
|
62
|
+
topic?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare namespace Notifications {
|
|
65
|
+
export { type NotificationRetrieveParams as NotificationRetrieveParams, type NotificationListParams as NotificationListParams, };
|
|
66
|
+
}
|
|
67
|
+
export { type NotificationsCursorPage };
|
|
68
|
+
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/resources/users/notifications.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,EAAE,uBAAuB,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAc,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAK5C;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,YAAY,CAAC;CAOvE;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH;AAED,OAAO,EAAE,KAAK,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Notifications = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class Notifications extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve a specific notification for a user, including all delivery attempts.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const notification =
|
|
15
|
+
* await client.users.notifications.retrieve(
|
|
16
|
+
* '01HQXYZ123456789ABCDEFGHIJ',
|
|
17
|
+
* { user_id: 'user_12345' },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
retrieve(notificationID, params, options) {
|
|
22
|
+
const { user_id } = params;
|
|
23
|
+
return this._client.get((0, path_1.path) `/users/${user_id}/notifications/${notificationID}`, options);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieve all notifications sent to a specific user.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* // Automatically fetches more pages as needed.
|
|
31
|
+
* for await (const notification of client.users.notifications.list(
|
|
32
|
+
* 'user_12345',
|
|
33
|
+
* )) {
|
|
34
|
+
* // ...
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
list(userID, query = {}, options) {
|
|
39
|
+
return this._client.getAPIList((0, path_1.path) `/users/${userID}/notifications`, (pagination_1.CursorPage), { query, ...options });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.Notifications = Notifications;
|
|
43
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/resources/users/notifications.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,yDAAuF;AAEvF,uDAAiD;AAEjD,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,cAAsB,EACtB,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,kBAAkB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAc,EACd,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,UAAU,MAAM,gBAAgB,EACpC,CAAA,uBAAyC,CAAA,EACzC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AA9CD,sCA8CC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../../core/pagination.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
export class Notifications extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieve a specific notification for a user, including all delivery attempts.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const notification =
|
|
12
|
+
* await client.users.notifications.retrieve(
|
|
13
|
+
* '01HQXYZ123456789ABCDEFGHIJ',
|
|
14
|
+
* { user_id: 'user_12345' },
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
retrieve(notificationID, params, options) {
|
|
19
|
+
const { user_id } = params;
|
|
20
|
+
return this._client.get(path `/users/${user_id}/notifications/${notificationID}`, options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Retrieve all notifications sent to a specific user.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* // Automatically fetches more pages as needed.
|
|
28
|
+
* for await (const notification of client.users.notifications.list(
|
|
29
|
+
* 'user_12345',
|
|
30
|
+
* )) {
|
|
31
|
+
* // ...
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
list(userID, query = {}, options) {
|
|
36
|
+
return this._client.getAPIList(path `/users/${userID}/notifications`, (CursorPage), { query, ...options });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=notifications.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.mjs","sourceRoot":"","sources":["../../src/resources/users/notifications.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,cAAsB,EACtB,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,kBAAkB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAc,EACd,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,UAAU,MAAM,gBAAgB,EACpC,CAAA,UAAyC,CAAA,EACzC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF"}
|