@51eat/sdk 0.0.78 → 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.
Files changed (133) hide show
  1. package/README.md +15 -13
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +0 -3
  4. package/dist/cjs/Client.js +2 -7
  5. package/dist/cjs/api/resources/business/resources/productOrders/client/Client.d.ts +9 -0
  6. package/dist/cjs/api/resources/business/resources/productOrders/client/Client.js +13 -0
  7. package/dist/cjs/api/resources/customer/resources/businesses/types/GetPickupTimeslotsBusinessesResponse.d.ts +2 -5
  8. package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +13 -4
  9. package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +13 -4
  10. package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddItemCartRequest.d.ts +6 -4
  11. package/dist/cjs/api/resources/customer/resources/cart/client/requests/{UpdateItemCartRequest.d.ts → UpdateCartItemRequest.d.ts} +1 -1
  12. package/dist/cjs/api/resources/customer/resources/cart/client/requests/index.d.ts +1 -1
  13. package/dist/cjs/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.ts +1 -1
  14. package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.ts +1 -1
  15. package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.ts +1 -1
  16. package/dist/cjs/api/resources/customer/resources/stands/client/Client.d.ts +71 -0
  17. package/dist/cjs/api/resources/customer/resources/stands/client/Client.js +243 -0
  18. package/dist/cjs/api/resources/customer/resources/stands/client/requests/AddCartItemStandsRequest.d.ts +16 -0
  19. package/dist/{esm/api/resources/customerStands/client/requests/CustomerGetStandCartRequest.d.mts → cjs/api/resources/customer/resources/stands/client/requests/ClearCartStandsRequest.d.ts} +1 -1
  20. package/dist/cjs/api/resources/{customerStands/client/requests/CustomerGetStandCartRequest.d.ts → customer/resources/stands/client/requests/GetCartStandsRequest.d.ts} +1 -1
  21. package/dist/cjs/api/resources/customer/resources/stands/client/requests/NearbyStandsRequest.d.ts +13 -0
  22. package/dist/cjs/api/resources/customer/resources/stands/client/requests/index.d.ts +4 -0
  23. package/dist/cjs/api/resources/customer/resources/stands/types/AddCartItemStandsResponse.d.ts +4 -0
  24. package/dist/cjs/api/resources/customer/resources/stands/types/GetCartStandsResponse.d.ts +4 -0
  25. package/dist/cjs/api/resources/customer/resources/stands/types/GetCartStandsResponse.js +3 -0
  26. package/dist/cjs/api/resources/customer/resources/stands/types/NearbyStandsResponse.d.ts +10 -0
  27. package/dist/cjs/api/resources/customer/resources/stands/types/NearbyStandsResponse.js +3 -0
  28. package/dist/cjs/api/resources/customer/resources/stands/types/index.d.ts +3 -0
  29. package/dist/cjs/api/resources/customer/resources/stands/types/index.js +3 -0
  30. package/dist/cjs/api/resources/index.d.ts +0 -3
  31. package/dist/cjs/api/resources/index.js +1 -4
  32. package/dist/cjs/api/types/AddCartItemRequest.d.ts +9 -0
  33. package/dist/cjs/api/types/AddCartItemRequest.js +3 -0
  34. package/dist/cjs/api/types/BusinessEvent.d.ts +1 -0
  35. package/dist/cjs/api/types/CartResource.d.ts +5 -0
  36. package/dist/cjs/api/types/ExploreResponse.d.ts +1 -0
  37. package/dist/cjs/api/types/ExploreStand.d.ts +18 -0
  38. package/dist/cjs/api/types/ExploreStand.js +3 -0
  39. package/dist/cjs/api/types/NearbyStand.d.ts +19 -0
  40. package/dist/cjs/api/types/NearbyStand.js +3 -0
  41. package/dist/cjs/api/types/OrderResource.d.ts +9 -0
  42. package/dist/cjs/api/types/index.d.ts +3 -0
  43. package/dist/cjs/api/types/index.js +3 -0
  44. package/dist/cjs/version.d.ts +1 -1
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/esm/BaseClient.mjs +2 -2
  47. package/dist/esm/Client.d.mts +0 -3
  48. package/dist/esm/Client.mjs +0 -5
  49. package/dist/esm/api/resources/business/resources/productOrders/client/Client.d.mts +9 -0
  50. package/dist/esm/api/resources/business/resources/productOrders/client/Client.mjs +13 -0
  51. package/dist/esm/api/resources/customer/resources/businesses/types/GetPickupTimeslotsBusinessesResponse.d.mts +2 -5
  52. package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +13 -4
  53. package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +13 -4
  54. package/dist/esm/api/resources/customer/resources/cart/client/requests/AddItemCartRequest.d.mts +6 -4
  55. package/dist/esm/api/resources/customer/resources/cart/client/requests/{UpdateItemCartRequest.d.mts → UpdateCartItemRequest.d.mts} +1 -1
  56. package/dist/esm/api/resources/customer/resources/cart/client/requests/index.d.mts +1 -1
  57. package/dist/esm/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.mts +1 -1
  58. package/dist/esm/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.mts +1 -1
  59. package/dist/esm/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.mts +1 -1
  60. package/dist/esm/api/resources/customer/resources/stands/client/Client.d.mts +71 -0
  61. package/dist/esm/api/resources/customer/resources/stands/client/Client.mjs +243 -0
  62. package/dist/esm/api/resources/customer/resources/stands/client/requests/AddCartItemStandsRequest.d.mts +16 -0
  63. package/dist/esm/api/resources/{customerStands/client/requests/CustomerClearStandCartRequest.d.mts → customer/resources/stands/client/requests/ClearCartStandsRequest.d.mts} +1 -1
  64. package/dist/{cjs/api/resources/customerStands/client/requests/CustomerClearStandCartRequest.d.ts → esm/api/resources/customer/resources/stands/client/requests/GetCartStandsRequest.d.mts} +1 -1
  65. package/dist/esm/api/resources/customer/resources/stands/client/requests/NearbyStandsRequest.d.mts +13 -0
  66. package/dist/esm/api/resources/customer/resources/stands/client/requests/index.d.mts +4 -0
  67. package/dist/esm/api/resources/customer/resources/stands/types/AddCartItemStandsResponse.d.mts +4 -0
  68. package/dist/esm/api/resources/customer/resources/stands/types/GetCartStandsResponse.d.mts +4 -0
  69. package/dist/esm/api/resources/customer/resources/stands/types/GetCartStandsResponse.mjs +2 -0
  70. package/dist/esm/api/resources/customer/resources/stands/types/NearbyStandsResponse.d.mts +10 -0
  71. package/dist/esm/api/resources/customer/resources/stands/types/NearbyStandsResponse.mjs +2 -0
  72. package/dist/esm/api/resources/customer/resources/stands/types/index.d.mts +3 -0
  73. package/dist/esm/api/resources/customer/resources/stands/types/index.mjs +3 -0
  74. package/dist/esm/api/resources/index.d.mts +0 -3
  75. package/dist/esm/api/resources/index.mjs +0 -3
  76. package/dist/esm/api/types/AddCartItemRequest.d.mts +9 -0
  77. package/dist/esm/api/types/AddCartItemRequest.mjs +2 -0
  78. package/dist/esm/api/types/BusinessEvent.d.mts +1 -0
  79. package/dist/esm/api/types/CartResource.d.mts +5 -0
  80. package/dist/esm/api/types/ExploreResponse.d.mts +1 -0
  81. package/dist/esm/api/types/ExploreStand.d.mts +18 -0
  82. package/dist/esm/api/types/ExploreStand.mjs +2 -0
  83. package/dist/esm/api/types/NearbyStand.d.mts +19 -0
  84. package/dist/esm/api/types/NearbyStand.mjs +2 -0
  85. package/dist/esm/api/types/OrderResource.d.mts +9 -0
  86. package/dist/esm/api/types/index.d.mts +3 -0
  87. package/dist/esm/api/types/index.mjs +3 -0
  88. package/dist/esm/version.d.mts +1 -1
  89. package/dist/esm/version.mjs +1 -1
  90. package/package.json +2 -13
  91. package/reference.md +310 -159
  92. package/dist/cjs/api/resources/customerStands/client/Client.d.ts +0 -58
  93. package/dist/cjs/api/resources/customerStands/client/Client.js +0 -240
  94. package/dist/cjs/api/resources/customerStands/client/index.d.ts +0 -1
  95. package/dist/cjs/api/resources/customerStands/client/index.js +0 -17
  96. package/dist/cjs/api/resources/customerStands/client/requests/CustomerAddStandCartItemRequest.d.ts +0 -14
  97. package/dist/cjs/api/resources/customerStands/client/requests/index.d.ts +0 -3
  98. package/dist/cjs/api/resources/customerStands/client/requests/index.js +0 -2
  99. package/dist/cjs/api/resources/customerStands/exports.d.ts +0 -2
  100. package/dist/cjs/api/resources/customerStands/exports.js +0 -21
  101. package/dist/cjs/api/resources/customerStands/index.d.ts +0 -2
  102. package/dist/cjs/api/resources/customerStands/index.js +0 -18
  103. package/dist/cjs/api/resources/customerStands/types/CustomerAddStandCartItemResponse.d.ts +0 -4
  104. package/dist/cjs/api/resources/customerStands/types/CustomerGetStandCartResponse.d.ts +0 -4
  105. package/dist/cjs/api/resources/customerStands/types/index.d.ts +0 -2
  106. package/dist/cjs/api/resources/customerStands/types/index.js +0 -18
  107. package/dist/esm/api/resources/customerStands/client/Client.d.mts +0 -58
  108. package/dist/esm/api/resources/customerStands/client/Client.mjs +0 -203
  109. package/dist/esm/api/resources/customerStands/client/index.d.mts +0 -1
  110. package/dist/esm/api/resources/customerStands/client/index.mjs +0 -1
  111. package/dist/esm/api/resources/customerStands/client/requests/CustomerAddStandCartItemRequest.d.mts +0 -14
  112. package/dist/esm/api/resources/customerStands/client/requests/index.d.mts +0 -3
  113. package/dist/esm/api/resources/customerStands/client/requests/index.mjs +0 -1
  114. package/dist/esm/api/resources/customerStands/exports.d.mts +0 -2
  115. package/dist/esm/api/resources/customerStands/exports.mjs +0 -3
  116. package/dist/esm/api/resources/customerStands/index.d.mts +0 -2
  117. package/dist/esm/api/resources/customerStands/index.mjs +0 -2
  118. package/dist/esm/api/resources/customerStands/types/CustomerAddStandCartItemResponse.d.mts +0 -4
  119. package/dist/esm/api/resources/customerStands/types/CustomerGetStandCartResponse.d.mts +0 -4
  120. package/dist/esm/api/resources/customerStands/types/index.d.mts +0 -2
  121. package/dist/esm/api/resources/customerStands/types/index.mjs +0 -2
  122. /package/dist/cjs/api/resources/customer/resources/cart/client/requests/{UpdateItemCartRequest.js → UpdateCartItemRequest.js} +0 -0
  123. /package/dist/cjs/api/resources/{customerStands/client/requests/CustomerAddStandCartItemRequest.js → customer/resources/stands/client/requests/AddCartItemStandsRequest.js} +0 -0
  124. /package/dist/cjs/api/resources/{customerStands/client/requests/CustomerClearStandCartRequest.js → customer/resources/stands/client/requests/ClearCartStandsRequest.js} +0 -0
  125. /package/dist/cjs/api/resources/{customerStands/client/requests/CustomerGetStandCartRequest.js → customer/resources/stands/client/requests/GetCartStandsRequest.js} +0 -0
  126. /package/dist/cjs/api/resources/{customerStands/types/CustomerAddStandCartItemResponse.js → customer/resources/stands/client/requests/NearbyStandsRequest.js} +0 -0
  127. /package/dist/cjs/api/resources/{customerStands/types/CustomerGetStandCartResponse.js → customer/resources/stands/types/AddCartItemStandsResponse.js} +0 -0
  128. /package/dist/esm/api/resources/customer/resources/cart/client/requests/{UpdateItemCartRequest.mjs → UpdateCartItemRequest.mjs} +0 -0
  129. /package/dist/esm/api/resources/{customerStands/client/requests/CustomerAddStandCartItemRequest.mjs → customer/resources/stands/client/requests/AddCartItemStandsRequest.mjs} +0 -0
  130. /package/dist/esm/api/resources/{customerStands/client/requests/CustomerClearStandCartRequest.mjs → customer/resources/stands/client/requests/ClearCartStandsRequest.mjs} +0 -0
  131. /package/dist/esm/api/resources/{customerStands/client/requests/CustomerGetStandCartRequest.mjs → customer/resources/stands/client/requests/GetCartStandsRequest.mjs} +0 -0
  132. /package/dist/esm/api/resources/{customerStands/types/CustomerAddStandCartItemResponse.mjs → customer/resources/stands/client/requests/NearbyStandsRequest.mjs} +0 -0
  133. /package/dist/esm/api/resources/{customerStands/types/CustomerGetStandCartResponse.mjs → customer/resources/stands/types/AddCartItemStandsResponse.mjs} +0 -0
@@ -1,240 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
- return new (P || (P = Promise))(function (resolve, reject) {
39
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
- step((generator = generator.apply(thisArg, _arguments || [])).next());
43
- });
44
- };
45
- var __rest = (this && this.__rest) || function (s, e) {
46
- var t = {};
47
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
- t[p] = s[p];
49
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
- t[p[i]] = s[p[i]];
53
- }
54
- return t;
55
- };
56
- Object.defineProperty(exports, "__esModule", { value: true });
57
- exports.CustomerStandsClient = void 0;
58
- const BaseClient_js_1 = require("../../../../BaseClient.js");
59
- const headers_js_1 = require("../../../../core/headers.js");
60
- const core = __importStar(require("../../../../core/index.js"));
61
- const environments = __importStar(require("../../../../environments.js"));
62
- const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
63
- const errors = __importStar(require("../../../../errors/index.js"));
64
- const FiveOneEat = __importStar(require("../../../index.js"));
65
- class CustomerStandsClient {
66
- constructor(options = {}) {
67
- this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
- }
69
- /**
70
- * @param {FiveOneEat.CustomerGetStandCartRequest} request
71
- * @param {CustomerStandsClient.RequestOptions} requestOptions - Request-specific configuration.
72
- *
73
- * @throws {@link FiveOneEat.UnauthorizedError}
74
- * @throws {@link FiveOneEat.NotFoundError}
75
- *
76
- * @example
77
- * await client.customerStands.customerGetStandCart({
78
- * stand: "stand"
79
- * })
80
- */
81
- customerGetStandCart(request, requestOptions) {
82
- return core.HttpResponsePromise.fromPromise(this.__customerGetStandCart(request, requestOptions));
83
- }
84
- __customerGetStandCart(request, requestOptions) {
85
- return __awaiter(this, void 0, void 0, function* () {
86
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
87
- const { stand } = request;
88
- const _authRequest = yield this._options.authProvider.getAuthRequest();
89
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
90
- const _response = yield core.fetcher({
91
- 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, `customer/stands/${core.url.encodePathParam(stand)}/cart`),
92
- method: "GET",
93
- headers: _headers,
94
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
95
- 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,
96
- 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,
97
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
98
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
99
- logging: this._options.logging,
100
- });
101
- if (_response.ok) {
102
- return {
103
- data: _response.body,
104
- rawResponse: _response.rawResponse,
105
- };
106
- }
107
- if (_response.error.reason === "status-code") {
108
- switch (_response.error.statusCode) {
109
- case 401:
110
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
111
- case 404:
112
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
113
- default:
114
- throw new errors.FiveOneEatError({
115
- statusCode: _response.error.statusCode,
116
- body: _response.error.body,
117
- rawResponse: _response.rawResponse,
118
- });
119
- }
120
- }
121
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/stands/{stand}/cart");
122
- });
123
- }
124
- /**
125
- * @param {FiveOneEat.CustomerAddStandCartItemRequest} request
126
- * @param {CustomerStandsClient.RequestOptions} requestOptions - Request-specific configuration.
127
- *
128
- * @throws {@link FiveOneEat.UnauthorizedError}
129
- * @throws {@link FiveOneEat.NotFoundError}
130
- * @throws {@link FiveOneEat.UnprocessableEntityError}
131
- *
132
- * @example
133
- * await client.customerStands.customerAddStandCartItem({
134
- * stand: "stand",
135
- * variant_id: "variant_id",
136
- * quantity: 1
137
- * })
138
- */
139
- customerAddStandCartItem(request, requestOptions) {
140
- return core.HttpResponsePromise.fromPromise(this.__customerAddStandCartItem(request, requestOptions));
141
- }
142
- __customerAddStandCartItem(request, requestOptions) {
143
- return __awaiter(this, void 0, void 0, function* () {
144
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
145
- const { stand } = request, _body = __rest(request, ["stand"]);
146
- const _authRequest = yield this._options.authProvider.getAuthRequest();
147
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
148
- const _response = yield core.fetcher({
149
- 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, `customer/stands/${core.url.encodePathParam(stand)}/cart`),
150
- method: "POST",
151
- headers: _headers,
152
- contentType: "application/json",
153
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
154
- requestType: "json",
155
- body: _body,
156
- 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,
157
- 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,
158
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
159
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
160
- logging: this._options.logging,
161
- });
162
- if (_response.ok) {
163
- return {
164
- data: _response.body,
165
- rawResponse: _response.rawResponse,
166
- };
167
- }
168
- if (_response.error.reason === "status-code") {
169
- switch (_response.error.statusCode) {
170
- case 401:
171
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
172
- case 404:
173
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
174
- case 422:
175
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
176
- default:
177
- throw new errors.FiveOneEatError({
178
- statusCode: _response.error.statusCode,
179
- body: _response.error.body,
180
- rawResponse: _response.rawResponse,
181
- });
182
- }
183
- }
184
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/stands/{stand}/cart");
185
- });
186
- }
187
- /**
188
- * @param {FiveOneEat.CustomerClearStandCartRequest} request
189
- * @param {CustomerStandsClient.RequestOptions} requestOptions - Request-specific configuration.
190
- *
191
- * @throws {@link FiveOneEat.UnauthorizedError}
192
- * @throws {@link FiveOneEat.NotFoundError}
193
- *
194
- * @example
195
- * await client.customerStands.customerClearStandCart({
196
- * stand: "stand"
197
- * })
198
- */
199
- customerClearStandCart(request, requestOptions) {
200
- return core.HttpResponsePromise.fromPromise(this.__customerClearStandCart(request, requestOptions));
201
- }
202
- __customerClearStandCart(request, requestOptions) {
203
- return __awaiter(this, void 0, void 0, function* () {
204
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
205
- const { stand } = request;
206
- const _authRequest = yield this._options.authProvider.getAuthRequest();
207
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
208
- const _response = yield core.fetcher({
209
- 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, `customer/stands/${core.url.encodePathParam(stand)}/cart`),
210
- method: "DELETE",
211
- headers: _headers,
212
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
213
- 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,
214
- 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,
215
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
216
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
217
- logging: this._options.logging,
218
- });
219
- if (_response.ok) {
220
- return { data: undefined, rawResponse: _response.rawResponse };
221
- }
222
- if (_response.error.reason === "status-code") {
223
- switch (_response.error.statusCode) {
224
- case 401:
225
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
226
- case 404:
227
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
228
- default:
229
- throw new errors.FiveOneEatError({
230
- statusCode: _response.error.statusCode,
231
- body: _response.error.body,
232
- rawResponse: _response.rawResponse,
233
- });
234
- }
235
- }
236
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/customer/stands/{stand}/cart");
237
- });
238
- }
239
- }
240
- exports.CustomerStandsClient = CustomerStandsClient;
@@ -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,14 +0,0 @@
1
- /**
2
- * @example
3
- * {
4
- * stand: "stand",
5
- * variant_id: "variant_id",
6
- * quantity: 1
7
- * }
8
- */
9
- export interface CustomerAddStandCartItemRequest {
10
- /** The stand ID */
11
- stand: string;
12
- variant_id: string;
13
- quantity: number;
14
- }
@@ -1,3 +0,0 @@
1
- export type { CustomerAddStandCartItemRequest } from "./CustomerAddStandCartItemRequest.js";
2
- export type { CustomerClearStandCartRequest } from "./CustomerClearStandCartRequest.js";
3
- export type { CustomerGetStandCartRequest } from "./CustomerGetStandCartRequest.js";
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export { CustomerStandsClient } 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.CustomerStandsClient = void 0;
19
- var Client_js_1 = require("./client/Client.js");
20
- Object.defineProperty(exports, "CustomerStandsClient", { enumerable: true, get: function () { return Client_js_1.CustomerStandsClient; } });
21
- __exportStar(require("./client/index.js"), exports);
@@ -1,2 +0,0 @@
1
- export * from "./client/index.js";
2
- export * from "./types/index.js";
@@ -1,18 +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("./client/index.js"), exports);
18
- __exportStar(require("./types/index.js"), exports);
@@ -1,4 +0,0 @@
1
- import type * as FiveOneEat from "../../../index.js";
2
- export interface CustomerAddStandCartItemResponse {
3
- data: FiveOneEat.CartResource;
4
- }
@@ -1,4 +0,0 @@
1
- import type * as FiveOneEat from "../../../index.js";
2
- export interface CustomerGetStandCartResponse {
3
- data: FiveOneEat.CartResource;
4
- }
@@ -1,2 +0,0 @@
1
- export * from "./CustomerAddStandCartItemResponse.js";
2
- export * from "./CustomerGetStandCartResponse.js";
@@ -1,18 +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("./CustomerAddStandCartItemResponse.js"), exports);
18
- __exportStar(require("./CustomerGetStandCartResponse.js"), exports);
@@ -1,58 +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 CustomerStandsClient {
6
- type Options = BaseClientOptions;
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- export declare class CustomerStandsClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<CustomerStandsClient.Options>;
12
- constructor(options?: CustomerStandsClient.Options);
13
- /**
14
- * @param {FiveOneEat.CustomerGetStandCartRequest} request
15
- * @param {CustomerStandsClient.RequestOptions} requestOptions - Request-specific configuration.
16
- *
17
- * @throws {@link FiveOneEat.UnauthorizedError}
18
- * @throws {@link FiveOneEat.NotFoundError}
19
- *
20
- * @example
21
- * await client.customerStands.customerGetStandCart({
22
- * stand: "stand"
23
- * })
24
- */
25
- customerGetStandCart(request: FiveOneEat.CustomerGetStandCartRequest, requestOptions?: CustomerStandsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.CustomerGetStandCartResponse>;
26
- private __customerGetStandCart;
27
- /**
28
- * @param {FiveOneEat.CustomerAddStandCartItemRequest} request
29
- * @param {CustomerStandsClient.RequestOptions} requestOptions - Request-specific configuration.
30
- *
31
- * @throws {@link FiveOneEat.UnauthorizedError}
32
- * @throws {@link FiveOneEat.NotFoundError}
33
- * @throws {@link FiveOneEat.UnprocessableEntityError}
34
- *
35
- * @example
36
- * await client.customerStands.customerAddStandCartItem({
37
- * stand: "stand",
38
- * variant_id: "variant_id",
39
- * quantity: 1
40
- * })
41
- */
42
- customerAddStandCartItem(request: FiveOneEat.CustomerAddStandCartItemRequest, requestOptions?: CustomerStandsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.CustomerAddStandCartItemResponse>;
43
- private __customerAddStandCartItem;
44
- /**
45
- * @param {FiveOneEat.CustomerClearStandCartRequest} request
46
- * @param {CustomerStandsClient.RequestOptions} requestOptions - Request-specific configuration.
47
- *
48
- * @throws {@link FiveOneEat.UnauthorizedError}
49
- * @throws {@link FiveOneEat.NotFoundError}
50
- *
51
- * @example
52
- * await client.customerStands.customerClearStandCart({
53
- * stand: "stand"
54
- * })
55
- */
56
- customerClearStandCart(request: FiveOneEat.CustomerClearStandCartRequest, requestOptions?: CustomerStandsClient.RequestOptions): core.HttpResponsePromise<void>;
57
- private __customerClearStandCart;
58
- }
@@ -1,203 +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
- var __rest = (this && this.__rest) || function (s, e) {
12
- var t = {};
13
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
- t[p] = s[p];
15
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
- t[p[i]] = s[p[i]];
19
- }
20
- return t;
21
- };
22
- import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
24
- import * as core from "../../../../core/index.mjs";
25
- import * as environments from "../../../../environments.mjs";
26
- import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
27
- import * as errors from "../../../../errors/index.mjs";
28
- import * as FiveOneEat from "../../../index.mjs";
29
- export class CustomerStandsClient {
30
- constructor(options = {}) {
31
- this._options = normalizeClientOptionsWithAuth(options);
32
- }
33
- /**
34
- * @param {FiveOneEat.CustomerGetStandCartRequest} request
35
- * @param {CustomerStandsClient.RequestOptions} requestOptions - Request-specific configuration.
36
- *
37
- * @throws {@link FiveOneEat.UnauthorizedError}
38
- * @throws {@link FiveOneEat.NotFoundError}
39
- *
40
- * @example
41
- * await client.customerStands.customerGetStandCart({
42
- * stand: "stand"
43
- * })
44
- */
45
- customerGetStandCart(request, requestOptions) {
46
- return core.HttpResponsePromise.fromPromise(this.__customerGetStandCart(request, requestOptions));
47
- }
48
- __customerGetStandCart(request, requestOptions) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
51
- const { stand } = request;
52
- const _authRequest = yield this._options.authProvider.getAuthRequest();
53
- 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);
54
- const _response = yield core.fetcher({
55
- 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, `customer/stands/${core.url.encodePathParam(stand)}/cart`),
56
- method: "GET",
57
- headers: _headers,
58
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
59
- 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,
60
- 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,
61
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
62
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
63
- logging: this._options.logging,
64
- });
65
- if (_response.ok) {
66
- return {
67
- data: _response.body,
68
- rawResponse: _response.rawResponse,
69
- };
70
- }
71
- if (_response.error.reason === "status-code") {
72
- switch (_response.error.statusCode) {
73
- case 401:
74
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
75
- case 404:
76
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
77
- default:
78
- throw new errors.FiveOneEatError({
79
- statusCode: _response.error.statusCode,
80
- body: _response.error.body,
81
- rawResponse: _response.rawResponse,
82
- });
83
- }
84
- }
85
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/stands/{stand}/cart");
86
- });
87
- }
88
- /**
89
- * @param {FiveOneEat.CustomerAddStandCartItemRequest} request
90
- * @param {CustomerStandsClient.RequestOptions} requestOptions - Request-specific configuration.
91
- *
92
- * @throws {@link FiveOneEat.UnauthorizedError}
93
- * @throws {@link FiveOneEat.NotFoundError}
94
- * @throws {@link FiveOneEat.UnprocessableEntityError}
95
- *
96
- * @example
97
- * await client.customerStands.customerAddStandCartItem({
98
- * stand: "stand",
99
- * variant_id: "variant_id",
100
- * quantity: 1
101
- * })
102
- */
103
- customerAddStandCartItem(request, requestOptions) {
104
- return core.HttpResponsePromise.fromPromise(this.__customerAddStandCartItem(request, requestOptions));
105
- }
106
- __customerAddStandCartItem(request, requestOptions) {
107
- return __awaiter(this, void 0, void 0, function* () {
108
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
109
- const { stand } = request, _body = __rest(request, ["stand"]);
110
- const _authRequest = yield this._options.authProvider.getAuthRequest();
111
- 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);
112
- const _response = yield core.fetcher({
113
- 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, `customer/stands/${core.url.encodePathParam(stand)}/cart`),
114
- method: "POST",
115
- headers: _headers,
116
- contentType: "application/json",
117
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
118
- requestType: "json",
119
- body: _body,
120
- 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,
121
- 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,
122
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
123
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
124
- logging: this._options.logging,
125
- });
126
- if (_response.ok) {
127
- return {
128
- data: _response.body,
129
- rawResponse: _response.rawResponse,
130
- };
131
- }
132
- if (_response.error.reason === "status-code") {
133
- switch (_response.error.statusCode) {
134
- case 401:
135
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
136
- case 404:
137
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
138
- case 422:
139
- throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
140
- default:
141
- throw new errors.FiveOneEatError({
142
- statusCode: _response.error.statusCode,
143
- body: _response.error.body,
144
- rawResponse: _response.rawResponse,
145
- });
146
- }
147
- }
148
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/stands/{stand}/cart");
149
- });
150
- }
151
- /**
152
- * @param {FiveOneEat.CustomerClearStandCartRequest} request
153
- * @param {CustomerStandsClient.RequestOptions} requestOptions - Request-specific configuration.
154
- *
155
- * @throws {@link FiveOneEat.UnauthorizedError}
156
- * @throws {@link FiveOneEat.NotFoundError}
157
- *
158
- * @example
159
- * await client.customerStands.customerClearStandCart({
160
- * stand: "stand"
161
- * })
162
- */
163
- customerClearStandCart(request, requestOptions) {
164
- return core.HttpResponsePromise.fromPromise(this.__customerClearStandCart(request, requestOptions));
165
- }
166
- __customerClearStandCart(request, requestOptions) {
167
- return __awaiter(this, void 0, void 0, function* () {
168
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
169
- const { stand } = request;
170
- const _authRequest = yield this._options.authProvider.getAuthRequest();
171
- 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);
172
- const _response = yield core.fetcher({
173
- 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, `customer/stands/${core.url.encodePathParam(stand)}/cart`),
174
- method: "DELETE",
175
- headers: _headers,
176
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
177
- 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,
178
- 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,
179
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
180
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
181
- logging: this._options.logging,
182
- });
183
- if (_response.ok) {
184
- return { data: undefined, rawResponse: _response.rawResponse };
185
- }
186
- if (_response.error.reason === "status-code") {
187
- switch (_response.error.statusCode) {
188
- case 401:
189
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
190
- case 404:
191
- throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
192
- default:
193
- throw new errors.FiveOneEatError({
194
- statusCode: _response.error.statusCode,
195
- body: _response.error.body,
196
- rawResponse: _response.rawResponse,
197
- });
198
- }
199
- }
200
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/stands/{stand}/cart");
201
- });
202
- }
203
- }
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";