eat518 1.0.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 +10 -0
- package/LICENSE +201 -0
- package/README.md +391 -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 +180 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +180 -0
- package/client.d.ts.map +1 -0
- package/client.js +461 -0
- package/client.js.map +1 -0
- package/client.mjs +457 -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 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- 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/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 +138 -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/customer/businesses.d.mts +260 -0
- package/resources/customer/businesses.d.mts.map +1 -0
- package/resources/customer/businesses.d.ts +260 -0
- package/resources/customer/businesses.d.ts.map +1 -0
- package/resources/customer/businesses.js +77 -0
- package/resources/customer/businesses.js.map +1 -0
- package/resources/customer/businesses.mjs +73 -0
- package/resources/customer/businesses.mjs.map +1 -0
- package/resources/customer/channels.d.mts +34 -0
- package/resources/customer/channels.d.mts.map +1 -0
- package/resources/customer/channels.d.ts +34 -0
- package/resources/customer/channels.d.ts.map +1 -0
- package/resources/customer/channels.js +25 -0
- package/resources/customer/channels.js.map +1 -0
- package/resources/customer/channels.mjs +21 -0
- package/resources/customer/channels.mjs.map +1 -0
- package/resources/customer/customer.d.mts +151 -0
- package/resources/customer/customer.d.mts.map +1 -0
- package/resources/customer/customer.d.ts +151 -0
- package/resources/customer/customer.d.ts.map +1 -0
- package/resources/customer/customer.js +104 -0
- package/resources/customer/customer.js.map +1 -0
- package/resources/customer/customer.mjs +99 -0
- package/resources/customer/customer.mjs.map +1 -0
- package/resources/customer/discovery/category.d.mts +84 -0
- package/resources/customer/discovery/category.d.mts.map +1 -0
- package/resources/customer/discovery/category.d.ts +84 -0
- package/resources/customer/discovery/category.d.ts.map +1 -0
- package/resources/customer/discovery/category.js +25 -0
- package/resources/customer/discovery/category.js.map +1 -0
- package/resources/customer/discovery/category.mjs +21 -0
- package/resources/customer/discovery/category.mjs.map +1 -0
- package/resources/customer/discovery/discovery.d.mts +34 -0
- package/resources/customer/discovery/discovery.d.mts.map +1 -0
- package/resources/customer/discovery/discovery.d.ts +34 -0
- package/resources/customer/discovery/discovery.d.ts.map +1 -0
- package/resources/customer/discovery/discovery.js +30 -0
- package/resources/customer/discovery/discovery.js.map +1 -0
- package/resources/customer/discovery/discovery.mjs +25 -0
- package/resources/customer/discovery/discovery.mjs.map +1 -0
- package/resources/customer/discovery/index.d.mts +3 -0
- package/resources/customer/discovery/index.d.mts.map +1 -0
- package/resources/customer/discovery/index.d.ts +3 -0
- package/resources/customer/discovery/index.d.ts.map +1 -0
- package/resources/customer/discovery/index.js +9 -0
- package/resources/customer/discovery/index.js.map +1 -0
- package/resources/customer/discovery/index.mjs +4 -0
- package/resources/customer/discovery/index.mjs.map +1 -0
- package/resources/customer/discovery.d.mts +2 -0
- package/resources/customer/discovery.d.mts.map +1 -0
- package/resources/customer/discovery.d.ts +2 -0
- package/resources/customer/discovery.d.ts.map +1 -0
- package/resources/customer/discovery.js +6 -0
- package/resources/customer/discovery.js.map +1 -0
- package/resources/customer/discovery.mjs +3 -0
- package/resources/customer/discovery.mjs.map +1 -0
- package/resources/customer/explore.d.mts +59 -0
- package/resources/customer/explore.d.mts.map +1 -0
- package/resources/customer/explore.d.ts +59 -0
- package/resources/customer/explore.d.ts.map +1 -0
- package/resources/customer/explore.js +24 -0
- package/resources/customer/explore.js.map +1 -0
- package/resources/customer/explore.mjs +20 -0
- package/resources/customer/explore.mjs.map +1 -0
- package/resources/customer/index.d.mts +8 -0
- package/resources/customer/index.d.mts.map +1 -0
- package/resources/customer/index.d.ts +8 -0
- package/resources/customer/index.d.ts.map +1 -0
- package/resources/customer/index.js +19 -0
- package/resources/customer/index.js.map +1 -0
- package/resources/customer/index.mjs +9 -0
- package/resources/customer/index.mjs.map +1 -0
- package/resources/customer/messaging/conversations/conversations.d.mts +106 -0
- package/resources/customer/messaging/conversations/conversations.d.mts.map +1 -0
- package/resources/customer/messaging/conversations/conversations.d.ts +106 -0
- package/resources/customer/messaging/conversations/conversations.d.ts.map +1 -0
- package/resources/customer/messaging/conversations/conversations.js +77 -0
- package/resources/customer/messaging/conversations/conversations.js.map +1 -0
- package/resources/customer/messaging/conversations/conversations.mjs +72 -0
- package/resources/customer/messaging/conversations/conversations.mjs.map +1 -0
- package/resources/customer/messaging/conversations/index.d.mts +3 -0
- package/resources/customer/messaging/conversations/index.d.mts.map +1 -0
- package/resources/customer/messaging/conversations/index.d.ts +3 -0
- package/resources/customer/messaging/conversations/index.d.ts.map +1 -0
- package/resources/customer/messaging/conversations/index.js +9 -0
- package/resources/customer/messaging/conversations/index.js.map +1 -0
- package/resources/customer/messaging/conversations/index.mjs +4 -0
- package/resources/customer/messaging/conversations/index.mjs.map +1 -0
- package/resources/customer/messaging/conversations/messages.d.mts +117 -0
- package/resources/customer/messaging/conversations/messages.d.mts.map +1 -0
- package/resources/customer/messaging/conversations/messages.d.ts +117 -0
- package/resources/customer/messaging/conversations/messages.d.ts.map +1 -0
- package/resources/customer/messaging/conversations/messages.js +79 -0
- package/resources/customer/messaging/conversations/messages.js.map +1 -0
- package/resources/customer/messaging/conversations/messages.mjs +75 -0
- package/resources/customer/messaging/conversations/messages.mjs.map +1 -0
- package/resources/customer/messaging/conversations.d.mts +2 -0
- package/resources/customer/messaging/conversations.d.mts.map +1 -0
- package/resources/customer/messaging/conversations.d.ts +2 -0
- package/resources/customer/messaging/conversations.d.ts.map +1 -0
- package/resources/customer/messaging/conversations.js +6 -0
- package/resources/customer/messaging/conversations.js.map +1 -0
- package/resources/customer/messaging/conversations.mjs +3 -0
- package/resources/customer/messaging/conversations.mjs.map +1 -0
- package/resources/customer/messaging/index.d.mts +3 -0
- package/resources/customer/messaging/index.d.mts.map +1 -0
- package/resources/customer/messaging/index.d.ts +3 -0
- package/resources/customer/messaging/index.d.ts.map +1 -0
- package/resources/customer/messaging/index.js +9 -0
- package/resources/customer/messaging/index.js.map +1 -0
- package/resources/customer/messaging/index.mjs +4 -0
- package/resources/customer/messaging/index.mjs.map +1 -0
- package/resources/customer/messaging/messaging.d.mts +10 -0
- package/resources/customer/messaging/messaging.d.mts.map +1 -0
- package/resources/customer/messaging/messaging.d.ts +10 -0
- package/resources/customer/messaging/messaging.d.ts.map +1 -0
- package/resources/customer/messaging/messaging.js +17 -0
- package/resources/customer/messaging/messaging.js.map +1 -0
- package/resources/customer/messaging/messaging.mjs +12 -0
- package/resources/customer/messaging/messaging.mjs.map +1 -0
- package/resources/customer/messaging.d.mts +2 -0
- package/resources/customer/messaging.d.mts.map +1 -0
- package/resources/customer/messaging.d.ts +2 -0
- package/resources/customer/messaging.d.ts.map +1 -0
- package/resources/customer/messaging.js +6 -0
- package/resources/customer/messaging.js.map +1 -0
- package/resources/customer/messaging.mjs +3 -0
- package/resources/customer/messaging.mjs.map +1 -0
- package/resources/customer/tokens.d.mts +43 -0
- package/resources/customer/tokens.d.mts.map +1 -0
- package/resources/customer/tokens.d.ts +43 -0
- package/resources/customer/tokens.d.ts.map +1 -0
- package/resources/customer/tokens.js +34 -0
- package/resources/customer/tokens.js.map +1 -0
- package/resources/customer/tokens.mjs +30 -0
- package/resources/customer/tokens.mjs.map +1 -0
- package/resources/customer.d.mts +2 -0
- package/resources/customer.d.mts.map +1 -0
- package/resources/customer.d.ts +2 -0
- package/resources/customer.d.ts.map +1 -0
- package/resources/customer.js +6 -0
- package/resources/customer.js.map +1 -0
- package/resources/customer.mjs +3 -0
- package/resources/customer.mjs.map +1 -0
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +7 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +3 -0
- package/resources/index.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 +748 -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/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/customer/businesses.ts +397 -0
- package/src/resources/customer/channels.ts +45 -0
- package/src/resources/customer/customer.ts +249 -0
- package/src/resources/customer/discovery/category.ts +127 -0
- package/src/resources/customer/discovery/discovery.ts +51 -0
- package/src/resources/customer/discovery/index.ts +4 -0
- package/src/resources/customer/discovery.ts +3 -0
- package/src/resources/customer/explore.ts +87 -0
- package/src/resources/customer/index.ts +33 -0
- package/src/resources/customer/messaging/conversations/conversations.ts +173 -0
- package/src/resources/customer/messaging/conversations/index.ts +21 -0
- package/src/resources/customer/messaging/conversations/messages.ts +184 -0
- package/src/resources/customer/messaging/conversations.ts +3 -0
- package/src/resources/customer/messaging/index.ts +12 -0
- package/src/resources/customer/messaging/messaging.ts +31 -0
- package/src/resources/customer/messaging.ts +3 -0
- package/src/resources/customer/tokens.ts +58 -0
- package/src/resources/customer.ts +3 -0
- package/src/resources/index.ts +14 -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,151 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as BusinessesAPI from "./businesses.mjs";
|
|
3
|
+
import { BusinessGetBulletinsParams, BusinessGetBulletinsResponse, BusinessGetEventsParams, BusinessGetEventsResponse, BusinessGetMenusParams, BusinessGetMenusResponse, BusinessGetPhotosParams, BusinessGetPhotosResponse, BusinessRetrieveProfileResponse, Businesses, Image, Pagination } from "./businesses.mjs";
|
|
4
|
+
import * as ChannelsAPI from "./channels.mjs";
|
|
5
|
+
import { ChannelAuthenticateParams, ChannelAuthenticateResponse, Channels } from "./channels.mjs";
|
|
6
|
+
import * as ExploreAPI from "./explore.mjs";
|
|
7
|
+
import { Explore, ExploreListBusinessesParams, ExploreListBusinessesResponse } from "./explore.mjs";
|
|
8
|
+
import * as TokensAPI from "./tokens.mjs";
|
|
9
|
+
import { TokenListResponse, TokenRevokeResponse, Tokens } from "./tokens.mjs";
|
|
10
|
+
import * as DiscoveryAPI from "./discovery/discovery.mjs";
|
|
11
|
+
import { Discovery, DiscoveryListCategoriesResponse } from "./discovery/discovery.mjs";
|
|
12
|
+
import * as MessagingAPI from "./messaging/messaging.mjs";
|
|
13
|
+
import { Messaging } from "./messaging/messaging.mjs";
|
|
14
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
15
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
16
|
+
export declare class Customer extends APIResource {
|
|
17
|
+
tokens: TokensAPI.Tokens;
|
|
18
|
+
channels: ChannelsAPI.Channels;
|
|
19
|
+
businesses: BusinessesAPI.Businesses;
|
|
20
|
+
messaging: MessagingAPI.Messaging;
|
|
21
|
+
explore: ExploreAPI.Explore;
|
|
22
|
+
discovery: DiscoveryAPI.Discovery;
|
|
23
|
+
/**
|
|
24
|
+
* Exchange user credentials for an API token that can be used for subsequent
|
|
25
|
+
* authenticated requests.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.customer.login({
|
|
30
|
+
* device_name: 'iPhone 15',
|
|
31
|
+
* email: 'user@example.com',
|
|
32
|
+
* password: 'password123',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
login(body: CustomerLoginParams, options?: RequestOptions): APIPromise<CustomerLoginResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Revoke the current API token and log out the user.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response = await client.customer.logout();
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
logout(options?: RequestOptions): APIPromise<CustomerLogoutResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Revoke all API tokens for the authenticated user.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const response = await client.customer.logoutAll();
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
logoutAll(options?: RequestOptions): APIPromise<CustomerLogoutAllResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Create a new customer account and return an API token for immediate
|
|
57
|
+
* authentication.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const response = await client.customer.register({
|
|
62
|
+
* device_name: 'iPhone 15',
|
|
63
|
+
* email: 'john@example.com',
|
|
64
|
+
* name: 'John Doe',
|
|
65
|
+
* password: 'password123',
|
|
66
|
+
* password_confirmation: 'password123',
|
|
67
|
+
* });
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
register(body: CustomerRegisterParams, options?: RequestOptions): APIPromise<CustomerRegisterResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Retrieve the current authenticated user's profile information.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const response = await client.customer.retrieveUser();
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
retrieveUser(options?: RequestOptions): APIPromise<CustomerRetrieveUserResponse>;
|
|
80
|
+
}
|
|
81
|
+
export interface LoginResponse {
|
|
82
|
+
token: string;
|
|
83
|
+
user: User;
|
|
84
|
+
}
|
|
85
|
+
export interface User {
|
|
86
|
+
id: string;
|
|
87
|
+
email: string;
|
|
88
|
+
name: string;
|
|
89
|
+
role: string;
|
|
90
|
+
}
|
|
91
|
+
export interface CustomerLoginResponse {
|
|
92
|
+
data: LoginResponse;
|
|
93
|
+
}
|
|
94
|
+
export interface CustomerLogoutResponse {
|
|
95
|
+
message: 'Successfully logged out';
|
|
96
|
+
}
|
|
97
|
+
export interface CustomerLogoutAllResponse {
|
|
98
|
+
message: 'All tokens revoked successfully';
|
|
99
|
+
}
|
|
100
|
+
export interface CustomerRegisterResponse {
|
|
101
|
+
data: LoginResponse;
|
|
102
|
+
}
|
|
103
|
+
export interface CustomerRetrieveUserResponse {
|
|
104
|
+
data: User;
|
|
105
|
+
}
|
|
106
|
+
export interface CustomerLoginParams {
|
|
107
|
+
/**
|
|
108
|
+
* A descriptive name for the device
|
|
109
|
+
*/
|
|
110
|
+
device_name: string;
|
|
111
|
+
/**
|
|
112
|
+
* The user's email address
|
|
113
|
+
*/
|
|
114
|
+
email: string;
|
|
115
|
+
/**
|
|
116
|
+
* The user's password
|
|
117
|
+
*/
|
|
118
|
+
password: string;
|
|
119
|
+
}
|
|
120
|
+
export interface CustomerRegisterParams {
|
|
121
|
+
/**
|
|
122
|
+
* A descriptive name for the device
|
|
123
|
+
*/
|
|
124
|
+
device_name: string;
|
|
125
|
+
/**
|
|
126
|
+
* The customer's email address
|
|
127
|
+
*/
|
|
128
|
+
email: string;
|
|
129
|
+
/**
|
|
130
|
+
* The customer's full name
|
|
131
|
+
*/
|
|
132
|
+
name: string;
|
|
133
|
+
/**
|
|
134
|
+
* The customer's password
|
|
135
|
+
*/
|
|
136
|
+
password: string;
|
|
137
|
+
/**
|
|
138
|
+
* Password confirmation
|
|
139
|
+
*/
|
|
140
|
+
password_confirmation: string;
|
|
141
|
+
}
|
|
142
|
+
export declare namespace Customer {
|
|
143
|
+
export { type LoginResponse as LoginResponse, type User as User, type CustomerLoginResponse as CustomerLoginResponse, type CustomerLogoutResponse as CustomerLogoutResponse, type CustomerLogoutAllResponse as CustomerLogoutAllResponse, type CustomerRegisterResponse as CustomerRegisterResponse, type CustomerRetrieveUserResponse as CustomerRetrieveUserResponse, type CustomerLoginParams as CustomerLoginParams, type CustomerRegisterParams as CustomerRegisterParams, };
|
|
144
|
+
export { Tokens as Tokens, type TokenListResponse as TokenListResponse, type TokenRevokeResponse as TokenRevokeResponse, };
|
|
145
|
+
export { Channels as Channels, type ChannelAuthenticateResponse as ChannelAuthenticateResponse, type ChannelAuthenticateParams as ChannelAuthenticateParams, };
|
|
146
|
+
export { Businesses as Businesses, type Image as Image, type Pagination as Pagination, type BusinessGetBulletinsResponse as BusinessGetBulletinsResponse, type BusinessGetEventsResponse as BusinessGetEventsResponse, type BusinessGetMenusResponse as BusinessGetMenusResponse, type BusinessGetPhotosResponse as BusinessGetPhotosResponse, type BusinessRetrieveProfileResponse as BusinessRetrieveProfileResponse, type BusinessGetBulletinsParams as BusinessGetBulletinsParams, type BusinessGetEventsParams as BusinessGetEventsParams, type BusinessGetMenusParams as BusinessGetMenusParams, type BusinessGetPhotosParams as BusinessGetPhotosParams, };
|
|
147
|
+
export { Messaging as Messaging };
|
|
148
|
+
export { Explore as Explore, type ExploreListBusinessesResponse as ExploreListBusinessesResponse, type ExploreListBusinessesParams as ExploreListBusinessesParams, };
|
|
149
|
+
export { Discovery as Discovery, type DiscoveryListCategoriesResponse as DiscoveryListCategoriesResponse };
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=customer.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.d.mts","sourceRoot":"","sources":["../../src/resources/customer/customer.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,+BAA+B,EAC/B,UAAU,EACV,KAAK,EACL,UAAU,EACX;OACM,KAAK,WAAW;OAChB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,QAAQ,EAAE;OACpE,KAAK,UAAU;OACf,EAAE,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE;OACvE,KAAK,SAAS;OACd,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,EAAE;OAClD,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AAQ,EACpB,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;IAEF,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,CAAC;IAElC,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;IAEF,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,KAAK,+BAA+B,IAAI,+BAA+B,EAAE,CAAC;CAC5G"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as BusinessesAPI from "./businesses.js";
|
|
3
|
+
import { BusinessGetBulletinsParams, BusinessGetBulletinsResponse, BusinessGetEventsParams, BusinessGetEventsResponse, BusinessGetMenusParams, BusinessGetMenusResponse, BusinessGetPhotosParams, BusinessGetPhotosResponse, BusinessRetrieveProfileResponse, Businesses, Image, Pagination } from "./businesses.js";
|
|
4
|
+
import * as ChannelsAPI from "./channels.js";
|
|
5
|
+
import { ChannelAuthenticateParams, ChannelAuthenticateResponse, Channels } from "./channels.js";
|
|
6
|
+
import * as ExploreAPI from "./explore.js";
|
|
7
|
+
import { Explore, ExploreListBusinessesParams, ExploreListBusinessesResponse } from "./explore.js";
|
|
8
|
+
import * as TokensAPI from "./tokens.js";
|
|
9
|
+
import { TokenListResponse, TokenRevokeResponse, Tokens } from "./tokens.js";
|
|
10
|
+
import * as DiscoveryAPI from "./discovery/discovery.js";
|
|
11
|
+
import { Discovery, DiscoveryListCategoriesResponse } from "./discovery/discovery.js";
|
|
12
|
+
import * as MessagingAPI from "./messaging/messaging.js";
|
|
13
|
+
import { Messaging } from "./messaging/messaging.js";
|
|
14
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
15
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
16
|
+
export declare class Customer extends APIResource {
|
|
17
|
+
tokens: TokensAPI.Tokens;
|
|
18
|
+
channels: ChannelsAPI.Channels;
|
|
19
|
+
businesses: BusinessesAPI.Businesses;
|
|
20
|
+
messaging: MessagingAPI.Messaging;
|
|
21
|
+
explore: ExploreAPI.Explore;
|
|
22
|
+
discovery: DiscoveryAPI.Discovery;
|
|
23
|
+
/**
|
|
24
|
+
* Exchange user credentials for an API token that can be used for subsequent
|
|
25
|
+
* authenticated requests.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.customer.login({
|
|
30
|
+
* device_name: 'iPhone 15',
|
|
31
|
+
* email: 'user@example.com',
|
|
32
|
+
* password: 'password123',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
login(body: CustomerLoginParams, options?: RequestOptions): APIPromise<CustomerLoginResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Revoke the current API token and log out the user.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response = await client.customer.logout();
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
logout(options?: RequestOptions): APIPromise<CustomerLogoutResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Revoke all API tokens for the authenticated user.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const response = await client.customer.logoutAll();
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
logoutAll(options?: RequestOptions): APIPromise<CustomerLogoutAllResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Create a new customer account and return an API token for immediate
|
|
57
|
+
* authentication.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const response = await client.customer.register({
|
|
62
|
+
* device_name: 'iPhone 15',
|
|
63
|
+
* email: 'john@example.com',
|
|
64
|
+
* name: 'John Doe',
|
|
65
|
+
* password: 'password123',
|
|
66
|
+
* password_confirmation: 'password123',
|
|
67
|
+
* });
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
register(body: CustomerRegisterParams, options?: RequestOptions): APIPromise<CustomerRegisterResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Retrieve the current authenticated user's profile information.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const response = await client.customer.retrieveUser();
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
retrieveUser(options?: RequestOptions): APIPromise<CustomerRetrieveUserResponse>;
|
|
80
|
+
}
|
|
81
|
+
export interface LoginResponse {
|
|
82
|
+
token: string;
|
|
83
|
+
user: User;
|
|
84
|
+
}
|
|
85
|
+
export interface User {
|
|
86
|
+
id: string;
|
|
87
|
+
email: string;
|
|
88
|
+
name: string;
|
|
89
|
+
role: string;
|
|
90
|
+
}
|
|
91
|
+
export interface CustomerLoginResponse {
|
|
92
|
+
data: LoginResponse;
|
|
93
|
+
}
|
|
94
|
+
export interface CustomerLogoutResponse {
|
|
95
|
+
message: 'Successfully logged out';
|
|
96
|
+
}
|
|
97
|
+
export interface CustomerLogoutAllResponse {
|
|
98
|
+
message: 'All tokens revoked successfully';
|
|
99
|
+
}
|
|
100
|
+
export interface CustomerRegisterResponse {
|
|
101
|
+
data: LoginResponse;
|
|
102
|
+
}
|
|
103
|
+
export interface CustomerRetrieveUserResponse {
|
|
104
|
+
data: User;
|
|
105
|
+
}
|
|
106
|
+
export interface CustomerLoginParams {
|
|
107
|
+
/**
|
|
108
|
+
* A descriptive name for the device
|
|
109
|
+
*/
|
|
110
|
+
device_name: string;
|
|
111
|
+
/**
|
|
112
|
+
* The user's email address
|
|
113
|
+
*/
|
|
114
|
+
email: string;
|
|
115
|
+
/**
|
|
116
|
+
* The user's password
|
|
117
|
+
*/
|
|
118
|
+
password: string;
|
|
119
|
+
}
|
|
120
|
+
export interface CustomerRegisterParams {
|
|
121
|
+
/**
|
|
122
|
+
* A descriptive name for the device
|
|
123
|
+
*/
|
|
124
|
+
device_name: string;
|
|
125
|
+
/**
|
|
126
|
+
* The customer's email address
|
|
127
|
+
*/
|
|
128
|
+
email: string;
|
|
129
|
+
/**
|
|
130
|
+
* The customer's full name
|
|
131
|
+
*/
|
|
132
|
+
name: string;
|
|
133
|
+
/**
|
|
134
|
+
* The customer's password
|
|
135
|
+
*/
|
|
136
|
+
password: string;
|
|
137
|
+
/**
|
|
138
|
+
* Password confirmation
|
|
139
|
+
*/
|
|
140
|
+
password_confirmation: string;
|
|
141
|
+
}
|
|
142
|
+
export declare namespace Customer {
|
|
143
|
+
export { type LoginResponse as LoginResponse, type User as User, type CustomerLoginResponse as CustomerLoginResponse, type CustomerLogoutResponse as CustomerLogoutResponse, type CustomerLogoutAllResponse as CustomerLogoutAllResponse, type CustomerRegisterResponse as CustomerRegisterResponse, type CustomerRetrieveUserResponse as CustomerRetrieveUserResponse, type CustomerLoginParams as CustomerLoginParams, type CustomerRegisterParams as CustomerRegisterParams, };
|
|
144
|
+
export { Tokens as Tokens, type TokenListResponse as TokenListResponse, type TokenRevokeResponse as TokenRevokeResponse, };
|
|
145
|
+
export { Channels as Channels, type ChannelAuthenticateResponse as ChannelAuthenticateResponse, type ChannelAuthenticateParams as ChannelAuthenticateParams, };
|
|
146
|
+
export { Businesses as Businesses, type Image as Image, type Pagination as Pagination, type BusinessGetBulletinsResponse as BusinessGetBulletinsResponse, type BusinessGetEventsResponse as BusinessGetEventsResponse, type BusinessGetMenusResponse as BusinessGetMenusResponse, type BusinessGetPhotosResponse as BusinessGetPhotosResponse, type BusinessRetrieveProfileResponse as BusinessRetrieveProfileResponse, type BusinessGetBulletinsParams as BusinessGetBulletinsParams, type BusinessGetEventsParams as BusinessGetEventsParams, type BusinessGetMenusParams as BusinessGetMenusParams, type BusinessGetPhotosParams as BusinessGetPhotosParams, };
|
|
147
|
+
export { Messaging as Messaging };
|
|
148
|
+
export { Explore as Explore, type ExploreListBusinessesResponse as ExploreListBusinessesResponse, type ExploreListBusinessesParams as ExploreListBusinessesParams, };
|
|
149
|
+
export { Discovery as Discovery, type DiscoveryListCategoriesResponse as DiscoveryListCategoriesResponse };
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=customer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../src/resources/customer/customer.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,+BAA+B,EAC/B,UAAU,EACV,KAAK,EACL,UAAU,EACX;OACM,KAAK,WAAW;OAChB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,QAAQ,EAAE;OACpE,KAAK,UAAU;OACf,EAAE,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE;OACvE,KAAK,SAAS;OACd,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,EAAE;OAClD,KAAK,YAAY;OACjB,EAAE,SAAS,EAAE,+BAA+B,EAAE;OAC9C,KAAK,YAAY;OACjB,EAAE,SAAS,EAAE;OACb,EAAE,UAAU,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U,IAAI,UAAU,EACxB,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;IAEF,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,CAAC;IAElC,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;IAEF,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,KAAK,+BAA+B,IAAI,+BAA+B,EAAE,CAAC;CAC5G"}
|
|
@@ -0,0 +1,104 @@
|
|
|
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.Customer = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const BusinessesAPI = tslib_1.__importStar(require("./businesses.js"));
|
|
8
|
+
const businesses_1 = require("./businesses.js");
|
|
9
|
+
const ChannelsAPI = tslib_1.__importStar(require("./channels.js"));
|
|
10
|
+
const channels_1 = require("./channels.js");
|
|
11
|
+
const ExploreAPI = tslib_1.__importStar(require("./explore.js"));
|
|
12
|
+
const explore_1 = require("./explore.js");
|
|
13
|
+
const TokensAPI = tslib_1.__importStar(require("./tokens.js"));
|
|
14
|
+
const tokens_1 = require("./tokens.js");
|
|
15
|
+
const DiscoveryAPI = tslib_1.__importStar(require("./discovery/discovery.js"));
|
|
16
|
+
const discovery_1 = require("./discovery/discovery.js");
|
|
17
|
+
const MessagingAPI = tslib_1.__importStar(require("./messaging/messaging.js"));
|
|
18
|
+
const messaging_1 = require("./messaging/messaging.js");
|
|
19
|
+
class Customer extends resource_1.APIResource {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.tokens = new TokensAPI.Tokens(this._client);
|
|
23
|
+
this.channels = new ChannelsAPI.Channels(this._client);
|
|
24
|
+
this.businesses = new BusinessesAPI.Businesses(this._client);
|
|
25
|
+
this.messaging = new MessagingAPI.Messaging(this._client);
|
|
26
|
+
this.explore = new ExploreAPI.Explore(this._client);
|
|
27
|
+
this.discovery = new DiscoveryAPI.Discovery(this._client);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Exchange user credentials for an API token that can be used for subsequent
|
|
31
|
+
* authenticated requests.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.customer.login({
|
|
36
|
+
* device_name: 'iPhone 15',
|
|
37
|
+
* email: 'user@example.com',
|
|
38
|
+
* password: 'password123',
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
login(body, options) {
|
|
43
|
+
return this._client.post('/customer/login', { body, ...options });
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Revoke the current API token and log out the user.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const response = await client.customer.logout();
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
logout(options) {
|
|
54
|
+
return this._client.post('/customer/logout', options);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Revoke all API tokens for the authenticated user.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const response = await client.customer.logoutAll();
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
logoutAll(options) {
|
|
65
|
+
return this._client.post('/customer/logout-all', options);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Create a new customer account and return an API token for immediate
|
|
69
|
+
* authentication.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const response = await client.customer.register({
|
|
74
|
+
* device_name: 'iPhone 15',
|
|
75
|
+
* email: 'john@example.com',
|
|
76
|
+
* name: 'John Doe',
|
|
77
|
+
* password: 'password123',
|
|
78
|
+
* password_confirmation: 'password123',
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
register(body, options) {
|
|
83
|
+
return this._client.post('/customer/register', { body, ...options });
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Retrieve the current authenticated user's profile information.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const response = await client.customer.retrieveUser();
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
retrieveUser(options) {
|
|
94
|
+
return this._client.get('/customer/user', options);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.Customer = Customer;
|
|
98
|
+
Customer.Tokens = tokens_1.Tokens;
|
|
99
|
+
Customer.Channels = channels_1.Channels;
|
|
100
|
+
Customer.Businesses = businesses_1.Businesses;
|
|
101
|
+
Customer.Messaging = messaging_1.Messaging;
|
|
102
|
+
Customer.Explore = explore_1.Explore;
|
|
103
|
+
Customer.Discovery = discovery_1.Discovery;
|
|
104
|
+
//# sourceMappingURL=customer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/resources/customer/customer.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,uEAA8C;AAC9C,gDAasB;AACtB,mEAA0C;AAC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,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;CACF;AA/ED,4BA+EC;AAkFD,QAAQ,CAAC,MAAM,GAAG,eAAM,CAAC;AACzB,QAAQ,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AAC7B,QAAQ,CAAC,UAAU,GAAG,uBAAU,CAAC;AACjC,QAAQ,CAAC,SAAS,GAAG,qBAAS,CAAC;AAC/B,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC;AAC3B,QAAQ,CAAC,SAAS,GAAG,qBAAS,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as BusinessesAPI from "./businesses.mjs";
|
|
4
|
+
import { Businesses, } from "./businesses.mjs";
|
|
5
|
+
import * as ChannelsAPI from "./channels.mjs";
|
|
6
|
+
import { Channels } from "./channels.mjs";
|
|
7
|
+
import * as ExploreAPI from "./explore.mjs";
|
|
8
|
+
import { Explore } from "./explore.mjs";
|
|
9
|
+
import * as TokensAPI from "./tokens.mjs";
|
|
10
|
+
import { Tokens } from "./tokens.mjs";
|
|
11
|
+
import * as DiscoveryAPI from "./discovery/discovery.mjs";
|
|
12
|
+
import { Discovery } from "./discovery/discovery.mjs";
|
|
13
|
+
import * as MessagingAPI from "./messaging/messaging.mjs";
|
|
14
|
+
import { Messaging } from "./messaging/messaging.mjs";
|
|
15
|
+
export class Customer extends APIResource {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.tokens = new TokensAPI.Tokens(this._client);
|
|
19
|
+
this.channels = new ChannelsAPI.Channels(this._client);
|
|
20
|
+
this.businesses = new BusinessesAPI.Businesses(this._client);
|
|
21
|
+
this.messaging = new MessagingAPI.Messaging(this._client);
|
|
22
|
+
this.explore = new ExploreAPI.Explore(this._client);
|
|
23
|
+
this.discovery = new DiscoveryAPI.Discovery(this._client);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Exchange user credentials for an API token that can be used for subsequent
|
|
27
|
+
* authenticated requests.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.customer.login({
|
|
32
|
+
* device_name: 'iPhone 15',
|
|
33
|
+
* email: 'user@example.com',
|
|
34
|
+
* password: 'password123',
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
login(body, options) {
|
|
39
|
+
return this._client.post('/customer/login', { body, ...options });
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Revoke the current API token and log out the user.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const response = await client.customer.logout();
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
logout(options) {
|
|
50
|
+
return this._client.post('/customer/logout', options);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Revoke all API tokens for the authenticated user.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response = await client.customer.logoutAll();
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
logoutAll(options) {
|
|
61
|
+
return this._client.post('/customer/logout-all', options);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Create a new customer account and return an API token for immediate
|
|
65
|
+
* authentication.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const response = await client.customer.register({
|
|
70
|
+
* device_name: 'iPhone 15',
|
|
71
|
+
* email: 'john@example.com',
|
|
72
|
+
* name: 'John Doe',
|
|
73
|
+
* password: 'password123',
|
|
74
|
+
* password_confirmation: 'password123',
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
register(body, options) {
|
|
79
|
+
return this._client.post('/customer/register', { body, ...options });
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Retrieve the current authenticated user's profile information.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const response = await client.customer.retrieveUser();
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
retrieveUser(options) {
|
|
90
|
+
return this._client.get('/customer/user', options);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
Customer.Tokens = Tokens;
|
|
94
|
+
Customer.Channels = Channels;
|
|
95
|
+
Customer.Businesses = Businesses;
|
|
96
|
+
Customer.Messaging = Messaging;
|
|
97
|
+
Customer.Explore = Explore;
|
|
98
|
+
Customer.Discovery = Discovery;
|
|
99
|
+
//# sourceMappingURL=customer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.mjs","sourceRoot":"","sources":["../../src/resources/customer/customer.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EAUL,UAAU,GAGX;OACM,KAAK,WAAW;OAChB,EAA0D,QAAQ,EAAE;OACpE,KAAK,UAAU;OACf,EAAE,OAAO,EAA8D;OACvE,KAAK,SAAS;OACd,EAA0C,MAAM,EAAE;OAClD,KAAK,YAAY;OACjB,EAAE,SAAS,EAAmC;OAC9C,KAAK,YAAY;OACjB,EAAE,SAAS,EAAE;AAIpB,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI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AC;AAC7B,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;AACjC,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC;AAC/B,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;AAC3B,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as BusinessesAPI from "../businesses.mjs";
|
|
3
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
5
|
+
export declare class Category extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieve businesses for a specific category with pagination support. Results are
|
|
8
|
+
* optimized for list display.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response =
|
|
13
|
+
* await client.customer.discovery.category.getBusinesses(
|
|
14
|
+
* 'restaurant',
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
getBusinesses(category: string, query?: CategoryGetBusinessesParams | null | undefined, options?: RequestOptions): APIPromise<CategoryGetBusinessesResponse>;
|
|
19
|
+
}
|
|
20
|
+
export interface CategoryGetBusinessesResponse {
|
|
21
|
+
data: CategoryGetBusinessesResponse.Data;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace CategoryGetBusinessesResponse {
|
|
24
|
+
interface Data {
|
|
25
|
+
businesses: Array<Data.Business>;
|
|
26
|
+
category: string;
|
|
27
|
+
filters: Data.Filters;
|
|
28
|
+
pagination: BusinessesAPI.Pagination;
|
|
29
|
+
}
|
|
30
|
+
namespace Data {
|
|
31
|
+
interface Business {
|
|
32
|
+
id: string;
|
|
33
|
+
badges: Business.Badges;
|
|
34
|
+
bio: string;
|
|
35
|
+
category: string;
|
|
36
|
+
created_at: string;
|
|
37
|
+
description: string;
|
|
38
|
+
handle: string;
|
|
39
|
+
has_bulletins: string;
|
|
40
|
+
latest_bulletin: Business.LatestBulletin | null;
|
|
41
|
+
location: Business.Location;
|
|
42
|
+
logo: string;
|
|
43
|
+
name: string;
|
|
44
|
+
photos: string;
|
|
45
|
+
}
|
|
46
|
+
namespace Business {
|
|
47
|
+
interface Badges {
|
|
48
|
+
founding_partner: string;
|
|
49
|
+
staff_pick: string;
|
|
50
|
+
}
|
|
51
|
+
interface LatestBulletin {
|
|
52
|
+
content: string;
|
|
53
|
+
published_at: string;
|
|
54
|
+
title: string;
|
|
55
|
+
}
|
|
56
|
+
interface Location {
|
|
57
|
+
city: string;
|
|
58
|
+
state: string;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
interface Filters {
|
|
62
|
+
category: string;
|
|
63
|
+
search: string;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export interface CategoryGetBusinessesParams {
|
|
68
|
+
/**
|
|
69
|
+
* Page number for pagination
|
|
70
|
+
*/
|
|
71
|
+
page?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Number of businesses per page
|
|
74
|
+
*/
|
|
75
|
+
per_page?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Search term for business name or description
|
|
78
|
+
*/
|
|
79
|
+
search?: string;
|
|
80
|
+
}
|
|
81
|
+
export declare namespace Category {
|
|
82
|
+
export { type CategoryGetBusinessesResponse as CategoryGetBusinessesResponse, type CategoryGetBusinessesParams as CategoryGetBusinessesParams, };
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=category.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.d.mts","sourceRoot":"","sources":["../../../src/resources/customer/discovery/category.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,aAAa,CACX,QAAQ,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