@51eat/sdk 0.0.21 → 0.0.22

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.
Files changed (104) hide show
  1. package/README.md +16 -13
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +0 -6
  4. package/dist/cjs/Client.js +10 -20
  5. package/dist/cjs/api/resources/business/client/Client.d.ts +5 -2
  6. package/dist/cjs/api/resources/business/client/Client.js +7 -2
  7. package/dist/cjs/api/resources/business/resources/index.d.ts +4 -0
  8. package/dist/cjs/api/resources/business/resources/index.js +5 -1
  9. package/dist/cjs/api/resources/business/resources/messaging/client/Client.d.ts +24 -1
  10. package/dist/cjs/api/resources/business/resources/messaging/client/Client.js +107 -0
  11. package/dist/cjs/api/resources/business/resources/messaging/client/index.d.ts +1 -1
  12. package/dist/cjs/api/resources/business/resources/messaging/client/index.js +15 -0
  13. package/dist/cjs/api/resources/{businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.d.ts → business/resources/messaging/client/requests/ChannelAuthMessagingRequest.d.ts} +1 -1
  14. package/dist/cjs/api/resources/business/resources/messaging/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/business/resources/pushNotifications/client/Client.d.ts +47 -0
  16. package/dist/cjs/api/resources/{businessPushNotifications → business/resources/pushNotifications}/client/Client.js +22 -22
  17. package/dist/cjs/api/resources/{businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.d.ts → business/resources/pushNotifications/client/requests/UnregisterPushNotificationsRequest.d.ts} +1 -1
  18. package/dist/cjs/api/resources/business/resources/pushNotifications/client/requests/index.d.ts +2 -0
  19. package/dist/cjs/api/resources/business/resources/pushNotifications/exports.d.ts +2 -0
  20. package/dist/cjs/api/resources/{businessMessaging → business/resources/pushNotifications}/exports.js +2 -2
  21. package/dist/cjs/api/resources/{businessPushNotifications/types/RegisterBusinessPushTokenResponse.d.ts → business/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.ts} +1 -1
  22. package/dist/cjs/api/resources/business/resources/pushNotifications/types/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/{businessPushNotifications → business/resources/pushNotifications}/types/index.js +1 -1
  24. package/dist/cjs/api/resources/index.d.ts +0 -5
  25. package/dist/cjs/api/resources/index.js +1 -6
  26. package/dist/cjs/version.d.ts +1 -1
  27. package/dist/cjs/version.js +1 -1
  28. package/dist/esm/BaseClient.mjs +2 -2
  29. package/dist/esm/Client.d.mts +0 -6
  30. package/dist/esm/Client.mjs +0 -10
  31. package/dist/esm/api/resources/business/client/Client.d.mts +5 -2
  32. package/dist/esm/api/resources/business/client/Client.mjs +7 -2
  33. package/dist/esm/api/resources/business/resources/index.d.mts +4 -0
  34. package/dist/esm/api/resources/business/resources/index.mjs +4 -0
  35. package/dist/esm/api/resources/business/resources/messaging/client/Client.d.mts +24 -1
  36. package/dist/esm/api/resources/business/resources/messaging/client/Client.mjs +74 -0
  37. package/dist/esm/api/resources/business/resources/messaging/client/index.d.mts +1 -1
  38. package/dist/esm/api/resources/business/resources/messaging/client/index.mjs +1 -1
  39. package/dist/esm/api/resources/{businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.d.mts → business/resources/messaging/client/requests/ChannelAuthMessagingRequest.d.mts} +1 -1
  40. package/dist/esm/api/resources/business/resources/messaging/client/requests/index.d.mts +1 -0
  41. package/dist/esm/api/resources/business/resources/pushNotifications/client/Client.d.mts +47 -0
  42. package/dist/esm/api/resources/{businessPushNotifications → business/resources/pushNotifications}/client/Client.mjs +20 -20
  43. package/dist/esm/api/resources/{businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.d.mts → business/resources/pushNotifications/client/requests/UnregisterPushNotificationsRequest.d.mts} +1 -1
  44. package/dist/esm/api/resources/business/resources/pushNotifications/client/requests/index.d.mts +2 -0
  45. package/dist/esm/api/resources/business/resources/pushNotifications/exports.d.mts +2 -0
  46. package/dist/esm/api/resources/{businessMessaging → business/resources/pushNotifications}/exports.mjs +1 -1
  47. package/dist/esm/api/resources/{businessPushNotifications/types/RegisterBusinessPushTokenResponse.d.mts → business/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.mts} +1 -1
  48. package/dist/esm/api/resources/business/resources/pushNotifications/types/index.d.mts +1 -0
  49. package/dist/esm/api/resources/business/resources/pushNotifications/types/index.mjs +1 -0
  50. package/dist/esm/api/resources/index.d.mts +0 -5
  51. package/dist/esm/api/resources/index.mjs +0 -5
  52. package/dist/esm/version.d.mts +1 -1
  53. package/dist/esm/version.mjs +1 -1
  54. package/package.json +23 -34
  55. package/reference.md +202 -202
  56. package/dist/cjs/api/resources/businessMessaging/client/Client.d.ts +0 -32
  57. package/dist/cjs/api/resources/businessMessaging/client/Client.js +0 -118
  58. package/dist/cjs/api/resources/businessMessaging/client/requests/index.d.ts +0 -1
  59. package/dist/cjs/api/resources/businessMessaging/exports.d.ts +0 -2
  60. package/dist/cjs/api/resources/businessMessaging/index.d.ts +0 -1
  61. package/dist/cjs/api/resources/businessMessaging/index.js +0 -17
  62. package/dist/cjs/api/resources/businessPushNotifications/client/Client.d.ts +0 -47
  63. package/dist/cjs/api/resources/businessPushNotifications/client/index.d.ts +0 -1
  64. package/dist/cjs/api/resources/businessPushNotifications/client/index.js +0 -17
  65. package/dist/cjs/api/resources/businessPushNotifications/client/requests/index.d.ts +0 -2
  66. package/dist/cjs/api/resources/businessPushNotifications/exports.d.ts +0 -2
  67. package/dist/cjs/api/resources/businessPushNotifications/exports.js +0 -21
  68. package/dist/cjs/api/resources/businessPushNotifications/types/index.d.ts +0 -1
  69. package/dist/esm/api/resources/businessMessaging/client/Client.d.mts +0 -32
  70. package/dist/esm/api/resources/businessMessaging/client/Client.mjs +0 -81
  71. package/dist/esm/api/resources/businessMessaging/client/requests/index.d.mts +0 -1
  72. package/dist/esm/api/resources/businessMessaging/exports.d.mts +0 -2
  73. package/dist/esm/api/resources/businessMessaging/index.d.mts +0 -1
  74. package/dist/esm/api/resources/businessMessaging/index.mjs +0 -1
  75. package/dist/esm/api/resources/businessPushNotifications/client/Client.d.mts +0 -47
  76. package/dist/esm/api/resources/businessPushNotifications/client/index.d.mts +0 -1
  77. package/dist/esm/api/resources/businessPushNotifications/client/index.mjs +0 -1
  78. package/dist/esm/api/resources/businessPushNotifications/client/requests/index.d.mts +0 -2
  79. package/dist/esm/api/resources/businessPushNotifications/exports.d.mts +0 -2
  80. package/dist/esm/api/resources/businessPushNotifications/exports.mjs +0 -3
  81. package/dist/esm/api/resources/businessPushNotifications/types/index.d.mts +0 -1
  82. package/dist/esm/api/resources/businessPushNotifications/types/index.mjs +0 -1
  83. /package/dist/cjs/api/resources/{businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.js → business/resources/messaging/client/requests/ChannelAuthMessagingRequest.js} +0 -0
  84. /package/dist/cjs/api/resources/{businessMessaging → business/resources/messaging}/client/requests/index.js +0 -0
  85. /package/dist/cjs/api/resources/{businessMessaging → business/resources/pushNotifications}/client/index.d.ts +0 -0
  86. /package/dist/cjs/api/resources/{businessMessaging → business/resources/pushNotifications}/client/index.js +0 -0
  87. /package/dist/cjs/api/resources/{businessPushNotifications → business/resources/pushNotifications}/client/requests/StorePushTokenRequest.d.ts +0 -0
  88. /package/dist/cjs/api/resources/{businessPushNotifications → business/resources/pushNotifications}/client/requests/StorePushTokenRequest.js +0 -0
  89. /package/dist/cjs/api/resources/{businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.js → business/resources/pushNotifications/client/requests/UnregisterPushNotificationsRequest.js} +0 -0
  90. /package/dist/cjs/api/resources/{businessPushNotifications → business/resources/pushNotifications}/client/requests/index.js +0 -0
  91. /package/dist/cjs/api/resources/{businessPushNotifications → business/resources/pushNotifications}/index.d.ts +0 -0
  92. /package/dist/cjs/api/resources/{businessPushNotifications → business/resources/pushNotifications}/index.js +0 -0
  93. /package/dist/cjs/api/resources/{businessPushNotifications/types/RegisterBusinessPushTokenResponse.js → business/resources/pushNotifications/types/RegisterPushNotificationsResponse.js} +0 -0
  94. /package/dist/esm/api/resources/{businessMessaging/client/requests/BusinessChannelAuthAuthenticateRequest.mjs → business/resources/messaging/client/requests/ChannelAuthMessagingRequest.mjs} +0 -0
  95. /package/dist/esm/api/resources/{businessMessaging → business/resources/messaging}/client/requests/index.mjs +0 -0
  96. /package/dist/esm/api/resources/{businessMessaging → business/resources/pushNotifications}/client/index.d.mts +0 -0
  97. /package/dist/esm/api/resources/{businessMessaging → business/resources/pushNotifications}/client/index.mjs +0 -0
  98. /package/dist/esm/api/resources/{businessPushNotifications → business/resources/pushNotifications}/client/requests/StorePushTokenRequest.d.mts +0 -0
  99. /package/dist/esm/api/resources/{businessPushNotifications → business/resources/pushNotifications}/client/requests/StorePushTokenRequest.mjs +0 -0
  100. /package/dist/esm/api/resources/{businessPushNotifications/client/requests/UnregisterBusinessPushTokenRequest.mjs → business/resources/pushNotifications/client/requests/UnregisterPushNotificationsRequest.mjs} +0 -0
  101. /package/dist/esm/api/resources/{businessPushNotifications → business/resources/pushNotifications}/client/requests/index.mjs +0 -0
  102. /package/dist/esm/api/resources/{businessPushNotifications → business/resources/pushNotifications}/index.d.mts +0 -0
  103. /package/dist/esm/api/resources/{businessPushNotifications → business/resources/pushNotifications}/index.mjs +0 -0
  104. /package/dist/esm/api/resources/{businessPushNotifications/types/RegisterBusinessPushTokenResponse.mjs → business/resources/pushNotifications/types/RegisterPushNotificationsResponse.mjs} +0 -0
@@ -1,47 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
- import * as core from "../../../../core/index.js";
4
- import * as FiveOneEat from "../../../index.js";
5
- export declare namespace BusinessPushNotificationsClient {
6
- type Options = BaseClientOptions;
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- export declare class BusinessPushNotificationsClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<BusinessPushNotificationsClient.Options>;
12
- constructor(options?: BusinessPushNotificationsClient.Options);
13
- /**
14
- * Register (or update) the authenticated business user's Expo push token for a
15
- * device. If a `device_id` is provided, an existing registration for that device
16
- * is updated.
17
- *
18
- * @param {FiveOneEat.StorePushTokenRequest} request
19
- * @param {BusinessPushNotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
20
- *
21
- * @throws {@link FiveOneEat.UnauthorizedError}
22
- * @throws {@link FiveOneEat.UnprocessableEntityError}
23
- *
24
- * @example
25
- * await client.businessPushNotifications.registerBusinessPushToken({
26
- * token: "token"
27
- * })
28
- */
29
- registerBusinessPushToken(request: FiveOneEat.StorePushTokenRequest, requestOptions?: BusinessPushNotificationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.RegisterBusinessPushTokenResponse>;
30
- private __registerBusinessPushToken;
31
- /**
32
- * Delete the authenticated business user's Expo push token registration.
33
- *
34
- * @param {FiveOneEat.UnregisterBusinessPushTokenRequest} request
35
- * @param {BusinessPushNotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
36
- *
37
- * @throws {@link FiveOneEat.UnauthorizedError}
38
- * @throws {@link FiveOneEat.UnprocessableEntityError}
39
- *
40
- * @example
41
- * await client.businessPushNotifications.unregisterBusinessPushToken({
42
- * token: "token"
43
- * })
44
- */
45
- unregisterBusinessPushToken(request: FiveOneEat.UnregisterBusinessPushTokenRequest, requestOptions?: BusinessPushNotificationsClient.RequestOptions): core.HttpResponsePromise<void>;
46
- private __unregisterBusinessPushToken;
47
- }
@@ -1 +0,0 @@
1
- export * from "./requests/index.js";
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./requests/index.js"), exports);
@@ -1,2 +0,0 @@
1
- export { StorePushTokenRequest } from "./StorePushTokenRequest.js";
2
- export type { UnregisterBusinessPushTokenRequest } from "./UnregisterBusinessPushTokenRequest.js";
@@ -1,2 +0,0 @@
1
- export { BusinessPushNotificationsClient } from "./client/Client.js";
2
- export * from "./client/index.js";
@@ -1,21 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.BusinessPushNotificationsClient = void 0;
19
- var Client_js_1 = require("./client/Client.js");
20
- Object.defineProperty(exports, "BusinessPushNotificationsClient", { enumerable: true, get: function () { return Client_js_1.BusinessPushNotificationsClient; } });
21
- __exportStar(require("./client/index.js"), exports);
@@ -1 +0,0 @@
1
- export * from "./RegisterBusinessPushTokenResponse.js";
@@ -1,32 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
- import * as core from "../../../../core/index.mjs";
4
- import * as FiveOneEat from "../../../index.mjs";
5
- export declare namespace BusinessMessagingClient {
6
- type Options = BaseClientOptions;
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- export declare class BusinessMessagingClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<BusinessMessagingClient.Options>;
12
- constructor(options?: BusinessMessagingClient.Options);
13
- /**
14
- * This endpoint is used by the business companion mobile app to authenticate with
15
- * Pusher channels. It validates that the authenticated business user has
16
- * permission to access the requested channel, scoped to their active business.
17
- *
18
- * @param {FiveOneEat.BusinessChannelAuthAuthenticateRequest} request
19
- * @param {BusinessMessagingClient.RequestOptions} requestOptions - Request-specific configuration.
20
- *
21
- * @throws {@link FiveOneEat.UnauthorizedError}
22
- * @throws {@link FiveOneEat.UnprocessableEntityError}
23
- *
24
- * @example
25
- * await client.businessMessaging.businessChannelAuthAuthenticate({
26
- * channel_name: "channel_name",
27
- * socket_id: "socket_id"
28
- * })
29
- */
30
- businessChannelAuthAuthenticate(request: FiveOneEat.BusinessChannelAuthAuthenticateRequest, requestOptions?: BusinessMessagingClient.RequestOptions): core.HttpResponsePromise<number>;
31
- private __businessChannelAuthAuthenticate;
32
- }
@@ -1,81 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
- import { mergeHeaders } from "../../../../core/headers.mjs";
13
- import * as core from "../../../../core/index.mjs";
14
- import * as environments from "../../../../environments.mjs";
15
- import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
- import * as errors from "../../../../errors/index.mjs";
17
- import * as FiveOneEat from "../../../index.mjs";
18
- export class BusinessMessagingClient {
19
- constructor(options = {}) {
20
- this._options = normalizeClientOptionsWithAuth(options);
21
- }
22
- /**
23
- * This endpoint is used by the business companion mobile app to authenticate with
24
- * Pusher channels. It validates that the authenticated business user has
25
- * permission to access the requested channel, scoped to their active business.
26
- *
27
- * @param {FiveOneEat.BusinessChannelAuthAuthenticateRequest} request
28
- * @param {BusinessMessagingClient.RequestOptions} requestOptions - Request-specific configuration.
29
- *
30
- * @throws {@link FiveOneEat.UnauthorizedError}
31
- * @throws {@link FiveOneEat.UnprocessableEntityError}
32
- *
33
- * @example
34
- * await client.businessMessaging.businessChannelAuthAuthenticate({
35
- * channel_name: "channel_name",
36
- * socket_id: "socket_id"
37
- * })
38
- */
39
- businessChannelAuthAuthenticate(request, requestOptions) {
40
- return core.HttpResponsePromise.fromPromise(this.__businessChannelAuthAuthenticate(request, requestOptions));
41
- }
42
- __businessChannelAuthAuthenticate(request, requestOptions) {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
45
- const _authRequest = yield this._options.authProvider.getAuthRequest();
46
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
47
- const _response = yield core.fetcher({
48
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "business/channels/auth"),
49
- method: "POST",
50
- headers: _headers,
51
- contentType: "application/json",
52
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
53
- requestType: "json",
54
- body: request,
55
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
56
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
57
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
58
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
59
- logging: this._options.logging,
60
- });
61
- if (_response.ok) {
62
- return { data: _response.body, rawResponse: _response.rawResponse };
63
- }
64
- if (_response.error.reason === "status-code") {
65
- switch (_response.error.statusCode) {
66
- case 401:
67
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
68
- case 422:
69
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
70
- default:
71
- throw new errors.FiveOneEatError({
72
- statusCode: _response.error.statusCode,
73
- body: _response.error.body,
74
- rawResponse: _response.rawResponse,
75
- });
76
- }
77
- }
78
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/business/channels/auth");
79
- });
80
- }
81
- }
@@ -1 +0,0 @@
1
- export type { BusinessChannelAuthAuthenticateRequest } from "./BusinessChannelAuthAuthenticateRequest.mjs";
@@ -1,2 +0,0 @@
1
- export { BusinessMessagingClient } from "./client/Client.mjs";
2
- export * from "./client/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./client/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./client/index.mjs";
@@ -1,47 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
- import * as core from "../../../../core/index.mjs";
4
- import * as FiveOneEat from "../../../index.mjs";
5
- export declare namespace BusinessPushNotificationsClient {
6
- type Options = BaseClientOptions;
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- export declare class BusinessPushNotificationsClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<BusinessPushNotificationsClient.Options>;
12
- constructor(options?: BusinessPushNotificationsClient.Options);
13
- /**
14
- * Register (or update) the authenticated business user's Expo push token for a
15
- * device. If a `device_id` is provided, an existing registration for that device
16
- * is updated.
17
- *
18
- * @param {FiveOneEat.StorePushTokenRequest} request
19
- * @param {BusinessPushNotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
20
- *
21
- * @throws {@link FiveOneEat.UnauthorizedError}
22
- * @throws {@link FiveOneEat.UnprocessableEntityError}
23
- *
24
- * @example
25
- * await client.businessPushNotifications.registerBusinessPushToken({
26
- * token: "token"
27
- * })
28
- */
29
- registerBusinessPushToken(request: FiveOneEat.StorePushTokenRequest, requestOptions?: BusinessPushNotificationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.RegisterBusinessPushTokenResponse>;
30
- private __registerBusinessPushToken;
31
- /**
32
- * Delete the authenticated business user's Expo push token registration.
33
- *
34
- * @param {FiveOneEat.UnregisterBusinessPushTokenRequest} request
35
- * @param {BusinessPushNotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
36
- *
37
- * @throws {@link FiveOneEat.UnauthorizedError}
38
- * @throws {@link FiveOneEat.UnprocessableEntityError}
39
- *
40
- * @example
41
- * await client.businessPushNotifications.unregisterBusinessPushToken({
42
- * token: "token"
43
- * })
44
- */
45
- unregisterBusinessPushToken(request: FiveOneEat.UnregisterBusinessPushTokenRequest, requestOptions?: BusinessPushNotificationsClient.RequestOptions): core.HttpResponsePromise<void>;
46
- private __unregisterBusinessPushToken;
47
- }
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1,2 +0,0 @@
1
- export { StorePushTokenRequest } from "./StorePushTokenRequest.mjs";
2
- export type { UnregisterBusinessPushTokenRequest } from "./UnregisterBusinessPushTokenRequest.mjs";
@@ -1,2 +0,0 @@
1
- export { BusinessPushNotificationsClient } from "./client/Client.mjs";
2
- export * from "./client/index.mjs";
@@ -1,3 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export { BusinessPushNotificationsClient } from "./client/Client.mjs";
3
- export * from "./client/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./RegisterBusinessPushTokenResponse.mjs";
@@ -1 +0,0 @@
1
- export * from "./RegisterBusinessPushTokenResponse.mjs";