@51eat/sdk 0.0.71 → 0.0.72

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 (94) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/business/resources/stands/client/requests/UpdateStandRequest.d.ts +7 -0
  3. package/dist/cjs/api/resources/customer/client/Client.d.ts +0 -1
  4. package/dist/cjs/api/resources/customer/client/Client.js +1 -5
  5. package/dist/cjs/api/resources/customer/resources/ads/client/Client.d.ts +2 -4
  6. package/dist/cjs/api/resources/customer/resources/ads/client/Client.js +3 -11
  7. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.d.ts +27 -34
  8. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +83 -111
  9. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.ts +0 -1
  10. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.js +1 -5
  11. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +0 -2
  12. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +2 -10
  13. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.d.ts +0 -3
  14. package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.js +7 -19
  15. package/dist/cjs/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.ts +4 -4
  16. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.d.ts +2 -14
  17. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.js +33 -81
  18. package/dist/cjs/api/resources/customer/resources/editorials/client/Client.d.ts +3 -7
  19. package/dist/cjs/api/resources/customer/resources/editorials/client/Client.js +13 -30
  20. package/dist/cjs/api/resources/customer/resources/events/client/Client.d.ts +0 -1
  21. package/dist/cjs/api/resources/customer/resources/events/client/Client.js +1 -5
  22. package/dist/cjs/api/resources/customer/resources/explore/client/Client.d.ts +2 -3
  23. package/dist/cjs/api/resources/customer/resources/explore/client/Client.js +2 -6
  24. package/dist/cjs/api/resources/customer/resources/shop/client/Client.d.ts +2 -5
  25. package/dist/cjs/api/resources/customer/resources/shop/client/Client.js +4 -16
  26. package/dist/cjs/api/resources/customer/resources/stands/client/Client.js +1 -2
  27. package/dist/cjs/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.d.ts +4 -4
  28. package/dist/cjs/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.ts +1 -1
  29. package/dist/cjs/api/types/CartResource.d.ts +1 -1
  30. package/dist/cjs/api/types/InventoryLevelResource.d.ts +3 -3
  31. package/dist/cjs/api/types/OrderItemResource.d.ts +10 -0
  32. package/dist/cjs/api/types/OrderResource.d.ts +24 -9
  33. package/dist/cjs/api/types/PaginationResource.d.ts +4 -4
  34. package/dist/cjs/api/types/PriceListResource.d.ts +1 -1
  35. package/dist/cjs/api/types/PriceResource.d.ts +3 -3
  36. package/dist/cjs/api/types/ProductResource.d.ts +5 -6
  37. package/dist/cjs/api/types/Transaction.d.ts +6 -6
  38. package/dist/cjs/api/types/VariantResource.d.ts +3 -3
  39. package/dist/cjs/api/types/index.d.ts +1 -2
  40. package/dist/cjs/api/types/index.js +1 -2
  41. package/dist/cjs/version.d.ts +1 -1
  42. package/dist/cjs/version.js +1 -1
  43. package/dist/esm/BaseClient.mjs +2 -2
  44. package/dist/esm/api/resources/business/resources/stands/client/requests/UpdateStandRequest.d.mts +7 -0
  45. package/dist/esm/api/resources/customer/client/Client.d.mts +0 -1
  46. package/dist/esm/api/resources/customer/client/Client.mjs +1 -5
  47. package/dist/esm/api/resources/customer/resources/ads/client/Client.d.mts +2 -4
  48. package/dist/esm/api/resources/customer/resources/ads/client/Client.mjs +4 -12
  49. package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +27 -34
  50. package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +83 -111
  51. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.mts +0 -1
  52. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.mjs +1 -5
  53. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +0 -2
  54. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +2 -10
  55. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.d.mts +0 -3
  56. package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.mjs +7 -19
  57. package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +4 -4
  58. package/dist/esm/api/resources/customer/resources/discovery/client/Client.d.mts +2 -14
  59. package/dist/esm/api/resources/customer/resources/discovery/client/Client.mjs +34 -82
  60. package/dist/esm/api/resources/customer/resources/editorials/client/Client.d.mts +3 -7
  61. package/dist/esm/api/resources/customer/resources/editorials/client/Client.mjs +14 -31
  62. package/dist/esm/api/resources/customer/resources/events/client/Client.d.mts +0 -1
  63. package/dist/esm/api/resources/customer/resources/events/client/Client.mjs +1 -5
  64. package/dist/esm/api/resources/customer/resources/explore/client/Client.d.mts +2 -3
  65. package/dist/esm/api/resources/customer/resources/explore/client/Client.mjs +3 -7
  66. package/dist/esm/api/resources/customer/resources/shop/client/Client.d.mts +2 -5
  67. package/dist/esm/api/resources/customer/resources/shop/client/Client.mjs +5 -17
  68. package/dist/esm/api/resources/customer/resources/stands/client/Client.mjs +1 -2
  69. package/dist/esm/api/resources/customer/resources/stands/types/CreatePaymentIntentStandsResponse.d.mts +4 -4
  70. package/dist/esm/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.mts +1 -1
  71. package/dist/esm/api/types/CartResource.d.mts +1 -1
  72. package/dist/esm/api/types/InventoryLevelResource.d.mts +3 -3
  73. package/dist/esm/api/types/OrderItemResource.d.mts +10 -0
  74. package/dist/esm/api/types/OrderResource.d.mts +24 -9
  75. package/dist/esm/api/types/PaginationResource.d.mts +4 -4
  76. package/dist/esm/api/types/PriceListResource.d.mts +1 -1
  77. package/dist/esm/api/types/PriceResource.d.mts +3 -3
  78. package/dist/esm/api/types/ProductResource.d.mts +5 -6
  79. package/dist/esm/api/types/Transaction.d.mts +6 -6
  80. package/dist/esm/api/types/VariantResource.d.mts +3 -3
  81. package/dist/esm/api/types/index.d.mts +1 -2
  82. package/dist/esm/api/types/index.mjs +1 -2
  83. package/dist/esm/version.d.mts +1 -1
  84. package/dist/esm/version.mjs +1 -1
  85. package/package.json +1 -1
  86. package/reference.md +19 -19
  87. package/dist/cjs/api/types/ImageResource.d.ts +0 -6
  88. package/dist/cjs/api/types/ProductCategoryResource.d.ts +0 -8
  89. package/dist/cjs/api/types/ProductCategoryResource.js +0 -3
  90. package/dist/esm/api/types/ImageResource.d.mts +0 -6
  91. package/dist/esm/api/types/ProductCategoryResource.d.mts +0 -8
  92. package/dist/esm/api/types/ProductCategoryResource.mjs +0 -2
  93. /package/dist/cjs/api/types/{ImageResource.js → OrderItemResource.js} +0 -0
  94. /package/dist/esm/api/types/{ImageResource.mjs → OrderItemResource.mjs} +0 -0
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
11
+ import { normalizeClientOptions } from "../../../../../../BaseClient.mjs";
12
12
  import { mergeHeaders } from "../../../../../../core/headers.mjs";
13
13
  import * as core from "../../../../../../core/index.mjs";
14
14
  import * as environments from "../../../../../../environments.mjs";
@@ -17,7 +17,7 @@ import * as errors from "../../../../../../errors/index.mjs";
17
17
  import * as FiveOneEat from "../../../../../index.mjs";
18
18
  export class ExploreClient {
19
19
  constructor(options = {}) {
20
- this._options = normalizeClientOptionsWithAuth(options);
20
+ this._options = normalizeClientOptions(options);
21
21
  }
22
22
  /**
23
23
  * Retrieve businesses within the specified map bounds for map view.
@@ -26,7 +26,6 @@ export class ExploreClient {
26
26
  * @param {FiveOneEat.customer.BusinessesExploreRequest} request
27
27
  * @param {ExploreClient.RequestOptions} requestOptions - Request-specific configuration.
28
28
  *
29
- * @throws {@link FiveOneEat.UnauthorizedError}
30
29
  * @throws {@link FiveOneEat.UnprocessableEntityError}
31
30
  *
32
31
  * @example
@@ -47,8 +46,7 @@ export class ExploreClient {
47
46
  zoom_level: zoomLevel,
48
47
  categories,
49
48
  };
50
- const _authRequest = yield this._options.authProvider.getAuthRequest();
51
- 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);
49
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
52
50
  const _response = yield core.fetcher({
53
51
  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/explore/businesses"),
54
52
  method: "GET",
@@ -73,8 +71,6 @@ export class ExploreClient {
73
71
  }
74
72
  if (_response.error.reason === "status-code") {
75
73
  switch (_response.error.statusCode) {
76
- case 401:
77
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
78
74
  case 422:
79
75
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
80
76
  default:
@@ -1,5 +1,5 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptions } from "../../../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../../../core/index.mjs";
4
4
  import * as FiveOneEat from "../../../../../index.mjs";
5
5
  export declare namespace ShopClient {
@@ -8,13 +8,12 @@ export declare namespace ShopClient {
8
8
  }
9
9
  }
10
10
  export declare class ShopClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<ShopClient.Options>;
11
+ protected readonly _options: NormalizedClientOptions<ShopClient.Options>;
12
12
  constructor(options?: ShopClient.Options);
13
13
  /**
14
14
  * @param {FiveOneEat.customer.ListProductsShopRequest} request
15
15
  * @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
16
16
  *
17
- * @throws {@link FiveOneEat.UnauthorizedError}
18
17
  * @throws {@link FiveOneEat.NotFoundError}
19
18
  *
20
19
  * @example
@@ -28,7 +27,6 @@ export declare class ShopClient {
28
27
  * @param {FiveOneEat.customer.GetProductShopRequest} request
29
28
  * @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
30
29
  *
31
- * @throws {@link FiveOneEat.UnauthorizedError}
32
30
  * @throws {@link FiveOneEat.NotFoundError}
33
31
  *
34
32
  * @example
@@ -43,7 +41,6 @@ export declare class ShopClient {
43
41
  * @param {FiveOneEat.customer.ListCategoriesShopRequest} request
44
42
  * @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
45
43
  *
46
- * @throws {@link FiveOneEat.UnauthorizedError}
47
44
  * @throws {@link FiveOneEat.NotFoundError}
48
45
  *
49
46
  * @example
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
11
+ import { normalizeClientOptions } from "../../../../../../BaseClient.mjs";
12
12
  import { mergeHeaders } from "../../../../../../core/headers.mjs";
13
13
  import * as core from "../../../../../../core/index.mjs";
14
14
  import * as environments from "../../../../../../environments.mjs";
@@ -17,13 +17,12 @@ import * as errors from "../../../../../../errors/index.mjs";
17
17
  import * as FiveOneEat from "../../../../../index.mjs";
18
18
  export class ShopClient {
19
19
  constructor(options = {}) {
20
- this._options = normalizeClientOptionsWithAuth(options);
20
+ this._options = normalizeClientOptions(options);
21
21
  }
22
22
  /**
23
23
  * @param {FiveOneEat.customer.ListProductsShopRequest} request
24
24
  * @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
25
25
  *
26
- * @throws {@link FiveOneEat.UnauthorizedError}
27
26
  * @throws {@link FiveOneEat.NotFoundError}
28
27
  *
29
28
  * @example
@@ -41,8 +40,7 @@ export class ShopClient {
41
40
  const _queryParams = {
42
41
  category,
43
42
  };
44
- const _authRequest = yield this._options.authProvider.getAuthRequest();
45
- 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);
43
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
46
44
  const _response = yield core.fetcher({
47
45
  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/businesses/${core.url.encodePathParam(business)}/shop`),
48
46
  method: "GET",
@@ -67,8 +65,6 @@ export class ShopClient {
67
65
  }
68
66
  if (_response.error.reason === "status-code") {
69
67
  switch (_response.error.statusCode) {
70
- case 401:
71
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
72
68
  case 404:
73
69
  throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
74
70
  default:
@@ -86,7 +82,6 @@ export class ShopClient {
86
82
  * @param {FiveOneEat.customer.GetProductShopRequest} request
87
83
  * @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
88
84
  *
89
- * @throws {@link FiveOneEat.UnauthorizedError}
90
85
  * @throws {@link FiveOneEat.NotFoundError}
91
86
  *
92
87
  * @example
@@ -102,8 +97,7 @@ export class ShopClient {
102
97
  return __awaiter(this, void 0, void 0, function* () {
103
98
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
104
99
  const { business, product } = request;
105
- const _authRequest = yield this._options.authProvider.getAuthRequest();
106
- 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);
100
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
107
101
  const _response = yield core.fetcher({
108
102
  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/businesses/${core.url.encodePathParam(business)}/shop/products/${core.url.encodePathParam(product)}`),
109
103
  method: "GET",
@@ -123,8 +117,6 @@ export class ShopClient {
123
117
  }
124
118
  if (_response.error.reason === "status-code") {
125
119
  switch (_response.error.statusCode) {
126
- case 401:
127
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
128
120
  case 404:
129
121
  throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
130
122
  default:
@@ -142,7 +134,6 @@ export class ShopClient {
142
134
  * @param {FiveOneEat.customer.ListCategoriesShopRequest} request
143
135
  * @param {ShopClient.RequestOptions} requestOptions - Request-specific configuration.
144
136
  *
145
- * @throws {@link FiveOneEat.UnauthorizedError}
146
137
  * @throws {@link FiveOneEat.NotFoundError}
147
138
  *
148
139
  * @example
@@ -157,8 +148,7 @@ export class ShopClient {
157
148
  return __awaiter(this, void 0, void 0, function* () {
158
149
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
159
150
  const { business } = request;
160
- const _authRequest = yield this._options.authProvider.getAuthRequest();
161
- 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);
151
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
162
152
  const _response = yield core.fetcher({
163
153
  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/businesses/${core.url.encodePathParam(business)}/shop/categories`),
164
154
  method: "GET",
@@ -178,8 +168,6 @@ export class ShopClient {
178
168
  }
179
169
  if (_response.error.reason === "status-code") {
180
170
  switch (_response.error.statusCode) {
181
- case 401:
182
- throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
183
171
  case 404:
184
172
  throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
185
173
  default:
@@ -40,8 +40,7 @@ export class StandsClient {
40
40
  return __awaiter(this, void 0, void 0, function* () {
41
41
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
42
42
  const { stand } = request;
43
- const _authRequest = yield this._options.authProvider.getAuthRequest();
44
- 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);
43
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
45
44
  const _response = yield core.fetcher({
46
45
  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, `stand/${core.url.encodePathParam(stand)}`),
47
46
  method: "GET",
@@ -1,10 +1,10 @@
1
1
  export interface CreatePaymentIntentStandsResponse {
2
2
  client_secret: string;
3
3
  payment_intent_id: string;
4
- subtotal: string;
5
- tax_amount: string;
6
- platform_fee: string;
7
- total_amount: string;
4
+ subtotal: number;
5
+ tax_amount: number;
6
+ platform_fee: number;
7
+ total_amount: number;
8
8
  amount: number;
9
9
  currency: CreatePaymentIntentStandsResponse.Currency;
10
10
  }
@@ -4,7 +4,7 @@ export interface AppHttpResourcesApiV1BusinessCommerceProductResource {
4
4
  name: string;
5
5
  slug: string;
6
6
  description: string;
7
- is_active: string;
7
+ is_active: boolean;
8
8
  published_at: string;
9
9
  variants?: FiveOneEat.VariantResource[] | undefined;
10
10
  default_variant?: FiveOneEat.VariantResource | undefined;
@@ -2,7 +2,7 @@ export interface CartResource {
2
2
  id: string;
3
3
  items: CartResource.Items.Item[];
4
4
  subtotal_cents: number;
5
- subtotal: string;
5
+ subtotal: number;
6
6
  item_count: number;
7
7
  }
8
8
  export declare namespace CartResource {
@@ -1,7 +1,7 @@
1
1
  export interface InventoryLevelResource {
2
2
  id: string;
3
3
  sales_channel_id: string;
4
- quantity: string;
5
- tracks_inventory: string;
6
- allows_holds: string;
4
+ quantity: number;
5
+ tracks_inventory: boolean;
6
+ allows_holds: boolean;
7
7
  }
@@ -0,0 +1,10 @@
1
+ export interface OrderItemResource {
2
+ id: string;
3
+ variant_id: string;
4
+ product_name?: (string | null) | undefined;
5
+ variant_name?: string | undefined;
6
+ sku?: string | undefined;
7
+ quantity: number;
8
+ unit_price_cents: number;
9
+ total_cents: number;
10
+ }
@@ -1,27 +1,42 @@
1
+ import type * as FiveOneEat from "../index.mjs";
1
2
  export interface OrderResource {
2
3
  id: string;
3
4
  order_number: string;
4
5
  status: string;
5
6
  fulfillment_status: string;
6
7
  fulfillment_method: string;
7
- subtotal_cents: string;
8
- discount_cents: string;
9
- shipping_cents: string;
10
- tax_cents: string;
11
- platform_fee_cents: OrderResource.PlatformFeeCents;
12
- total_cents: string;
8
+ subtotal_cents: number;
9
+ discount_cents: number;
10
+ shipping_cents: number;
11
+ tax_cents: number;
12
+ platform_fee_cents: number;
13
+ total_cents: number;
13
14
  currency: string;
14
- shipping_address: string;
15
+ shipping_address: Record<string, unknown> | null;
15
16
  notes: string;
16
17
  fulfilled_at: string;
17
18
  refunded_at: string;
19
+ business?: OrderResource.Business | undefined;
20
+ transaction?: (OrderResource.Transaction | null) | undefined;
18
21
  tracking_number?: (string | null) | undefined;
22
+ tracking_url?: (string | null) | undefined;
19
23
  shipments: OrderResource.Shipments;
20
- items: unknown[];
24
+ items?: FiveOneEat.OrderItemResource[] | undefined;
21
25
  created_at: string;
22
26
  updated_at: string;
23
27
  }
24
28
  export declare namespace OrderResource {
25
- type PlatformFeeCents = string | number;
29
+ interface Business {
30
+ id: string;
31
+ handle: string;
32
+ name: string;
33
+ }
34
+ interface Transaction {
35
+ ulid: string;
36
+ status: string;
37
+ refunded_amount_cents: number;
38
+ payment_completed_at: string;
39
+ refunded_at: string;
40
+ }
26
41
  type Shipments = string | string[];
27
42
  }
@@ -1,6 +1,6 @@
1
1
  export interface PaginationResource {
2
- current_page: string;
3
- per_page: string;
4
- total: string;
5
- has_more: string;
2
+ current_page: number;
3
+ per_page: number;
4
+ total: number;
5
+ has_more: boolean;
6
6
  }
@@ -2,7 +2,7 @@ export interface PriceListResource {
2
2
  id: string;
3
3
  key: string;
4
4
  name: string;
5
- is_default: string;
5
+ is_default: boolean;
6
6
  created_at: string;
7
7
  updated_at: string;
8
8
  }
@@ -3,8 +3,8 @@ export interface PriceResource {
3
3
  id: string;
4
4
  price_list_id: string;
5
5
  price_list?: FiveOneEat.PriceListResource | undefined;
6
- amount_cents: string;
7
- compare_at_cents: string;
6
+ amount_cents: number;
7
+ compare_at_cents: number | null;
8
8
  currency: string;
9
- min_quantity: string;
9
+ min_quantity: number;
10
10
  }
@@ -1,17 +1,16 @@
1
- import type * as FiveOneEat from "../index.mjs";
2
1
  export interface ProductResource {
3
2
  id: string;
4
3
  name: string;
5
4
  slug: string;
6
5
  description: string;
7
- is_active: string;
6
+ is_active: boolean;
8
7
  published_at: string;
9
- metadata: string;
8
+ metadata: Record<string, unknown> | null;
10
9
  product_category_id: string;
11
- category?: FiveOneEat.ProductCategoryResource | undefined;
12
- images?: FiveOneEat.ImageResource[] | undefined;
10
+ category?: unknown[] | undefined;
11
+ images?: unknown[] | undefined;
13
12
  variants?: unknown[] | undefined;
14
- default_variant?: (unknown[] | null) | undefined;
13
+ default_variant?: unknown[] | undefined;
15
14
  created_at: string;
16
15
  updated_at: string;
17
16
  }
@@ -1,12 +1,12 @@
1
1
  export interface Transaction {
2
2
  ulid: string;
3
3
  status: string;
4
- subtotal: string;
5
- tax_amount: string;
6
- shipping_amount: string;
7
- platform_fee: string;
8
- total_amount: string;
9
- refunded_amount: string;
4
+ subtotal: number;
5
+ tax_amount: number;
6
+ shipping_amount: number;
7
+ platform_fee: number;
8
+ total_amount: number;
9
+ refunded_amount: number;
10
10
  customer_name: string | null;
11
11
  customer_email: string;
12
12
  stripe_payment_intent_id: string | null;
@@ -3,10 +3,10 @@ export interface VariantResource {
3
3
  id: string;
4
4
  name: string;
5
5
  sku: string;
6
- is_default: string;
7
- weight: string;
6
+ is_default: boolean;
7
+ weight: number | null;
8
8
  weight_unit: string;
9
- sort_order: string;
9
+ sort_order: number;
10
10
  prices?: FiveOneEat.PriceResource[] | undefined;
11
11
  inventory_levels?: FiveOneEat.InventoryLevelResource[] | undefined;
12
12
  created_at: string;
@@ -118,18 +118,17 @@ export * from "./ExploreTemporaryLocation.mjs";
118
118
  export * from "./FavoriteResponse.mjs";
119
119
  export * from "./ForbiddenErrorBody.mjs";
120
120
  export * from "./Image.mjs";
121
- export * from "./ImageResource.mjs";
122
121
  export * from "./InternalServerErrorBody.mjs";
123
122
  export * from "./InventoryLevelResource.mjs";
124
123
  export * from "./MenuItemSearchResult.mjs";
125
124
  export * from "./Message.mjs";
126
125
  export * from "./NotFoundErrorBody.mjs";
126
+ export * from "./OrderItemResource.mjs";
127
127
  export * from "./OrderResource.mjs";
128
128
  export * from "./PaginationResource.mjs";
129
129
  export * from "./PaymentMethod.mjs";
130
130
  export * from "./PriceListResource.mjs";
131
131
  export * from "./PriceResource.mjs";
132
- export * from "./ProductCategoryResource.mjs";
133
132
  export * from "./ProductResource.mjs";
134
133
  export * from "./ProductSearchResult.mjs";
135
134
  export * from "./RsvpEvent.mjs";
@@ -118,18 +118,17 @@ export * from "./ExploreTemporaryLocation.mjs";
118
118
  export * from "./FavoriteResponse.mjs";
119
119
  export * from "./ForbiddenErrorBody.mjs";
120
120
  export * from "./Image.mjs";
121
- export * from "./ImageResource.mjs";
122
121
  export * from "./InternalServerErrorBody.mjs";
123
122
  export * from "./InventoryLevelResource.mjs";
124
123
  export * from "./MenuItemSearchResult.mjs";
125
124
  export * from "./Message.mjs";
126
125
  export * from "./NotFoundErrorBody.mjs";
126
+ export * from "./OrderItemResource.mjs";
127
127
  export * from "./OrderResource.mjs";
128
128
  export * from "./PaginationResource.mjs";
129
129
  export * from "./PaymentMethod.mjs";
130
130
  export * from "./PriceListResource.mjs";
131
131
  export * from "./PriceResource.mjs";
132
- export * from "./ProductCategoryResource.mjs";
133
132
  export * from "./ProductResource.mjs";
134
133
  export * from "./ProductSearchResult.mjs";
135
134
  export * from "./RsvpEvent.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.71";
1
+ export declare const SDK_VERSION = "0.0.72";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.71";
1
+ export const SDK_VERSION = "0.0.72";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@51eat/sdk",
3
- "version": "0.0.71",
3
+ "version": "0.0.72",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -10332,7 +10332,7 @@ await client.customer.businesses.photos({
10332
10332
  </dl>
10333
10333
  </details>
10334
10334
 
10335
- <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">favorite</a>({ ...params }) -> FiveOneEat.FavoriteBusinessesResponse</code></summary>
10335
+ <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">listTemporaryLocations</a>({ ...params }) -> FiveOneEat.ListTemporaryLocationsBusinessesResponse</code></summary>
10336
10336
  <dl>
10337
10337
  <dd>
10338
10338
 
@@ -10344,7 +10344,7 @@ await client.customer.businesses.photos({
10344
10344
  <dl>
10345
10345
  <dd>
10346
10346
 
10347
- Add a business to the authenticated user's favorites.
10347
+ Retrieve active and upcoming temporary locations for a business.
10348
10348
  </dd>
10349
10349
  </dl>
10350
10350
  </dd>
@@ -10359,7 +10359,7 @@ Add a business to the authenticated user's favorites.
10359
10359
  <dd>
10360
10360
 
10361
10361
  ```typescript
10362
- await client.customer.businesses.favorite({
10362
+ await client.customer.businesses.listTemporaryLocations({
10363
10363
  business: "katzs-deli"
10364
10364
  });
10365
10365
 
@@ -10377,7 +10377,7 @@ await client.customer.businesses.favorite({
10377
10377
  <dl>
10378
10378
  <dd>
10379
10379
 
10380
- **request:** `FiveOneEat.customer.FavoriteBusinessesRequest`
10380
+ **request:** `FiveOneEat.customer.ListTemporaryLocationsBusinessesRequest`
10381
10381
 
10382
10382
  </dd>
10383
10383
  </dl>
@@ -10397,7 +10397,7 @@ await client.customer.businesses.favorite({
10397
10397
  </dl>
10398
10398
  </details>
10399
10399
 
10400
- <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">unfavorite</a>({ ...params }) -> void</code></summary>
10400
+ <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">getPickupTimeslots</a>({ ...params }) -> FiveOneEat.GetPickupTimeslotsBusinessesResponse</code></summary>
10401
10401
  <dl>
10402
10402
  <dd>
10403
10403
 
@@ -10409,7 +10409,7 @@ await client.customer.businesses.favorite({
10409
10409
  <dl>
10410
10410
  <dd>
10411
10411
 
10412
- Remove a business from the authenticated user's favorites.
10412
+ Returns available pickup timeslots for a business on a given date.
10413
10413
  </dd>
10414
10414
  </dl>
10415
10415
  </dd>
@@ -10424,8 +10424,9 @@ Remove a business from the authenticated user's favorites.
10424
10424
  <dd>
10425
10425
 
10426
10426
  ```typescript
10427
- await client.customer.businesses.unfavorite({
10428
- business: "katzs-deli"
10427
+ await client.customer.businesses.getPickupTimeslots({
10428
+ handle: "katzs-deli",
10429
+ date: "2023-01-15"
10429
10430
  });
10430
10431
 
10431
10432
  ```
@@ -10442,7 +10443,7 @@ await client.customer.businesses.unfavorite({
10442
10443
  <dl>
10443
10444
  <dd>
10444
10445
 
10445
- **request:** `FiveOneEat.customer.UnfavoriteBusinessesRequest`
10446
+ **request:** `FiveOneEat.customer.GetPickupTimeslotsBusinessesRequest`
10446
10447
 
10447
10448
  </dd>
10448
10449
  </dl>
@@ -10462,7 +10463,7 @@ await client.customer.businesses.unfavorite({
10462
10463
  </dl>
10463
10464
  </details>
10464
10465
 
10465
- <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">listTemporaryLocations</a>({ ...params }) -> FiveOneEat.ListTemporaryLocationsBusinessesResponse</code></summary>
10466
+ <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">favorite</a>({ ...params }) -> FiveOneEat.FavoriteBusinessesResponse</code></summary>
10466
10467
  <dl>
10467
10468
  <dd>
10468
10469
 
@@ -10474,7 +10475,7 @@ await client.customer.businesses.unfavorite({
10474
10475
  <dl>
10475
10476
  <dd>
10476
10477
 
10477
- Retrieve active and upcoming temporary locations for a business.
10478
+ Add a business to the authenticated user's favorites.
10478
10479
  </dd>
10479
10480
  </dl>
10480
10481
  </dd>
@@ -10489,7 +10490,7 @@ Retrieve active and upcoming temporary locations for a business.
10489
10490
  <dd>
10490
10491
 
10491
10492
  ```typescript
10492
- await client.customer.businesses.listTemporaryLocations({
10493
+ await client.customer.businesses.favorite({
10493
10494
  business: "katzs-deli"
10494
10495
  });
10495
10496
 
@@ -10507,7 +10508,7 @@ await client.customer.businesses.listTemporaryLocations({
10507
10508
  <dl>
10508
10509
  <dd>
10509
10510
 
10510
- **request:** `FiveOneEat.customer.ListTemporaryLocationsBusinessesRequest`
10511
+ **request:** `FiveOneEat.customer.FavoriteBusinessesRequest`
10511
10512
 
10512
10513
  </dd>
10513
10514
  </dl>
@@ -10527,7 +10528,7 @@ await client.customer.businesses.listTemporaryLocations({
10527
10528
  </dl>
10528
10529
  </details>
10529
10530
 
10530
- <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">getPickupTimeslots</a>({ ...params }) -> FiveOneEat.GetPickupTimeslotsBusinessesResponse</code></summary>
10531
+ <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">unfavorite</a>({ ...params }) -> void</code></summary>
10531
10532
  <dl>
10532
10533
  <dd>
10533
10534
 
@@ -10539,7 +10540,7 @@ await client.customer.businesses.listTemporaryLocations({
10539
10540
  <dl>
10540
10541
  <dd>
10541
10542
 
10542
- Returns available pickup timeslots for a business on a given date.
10543
+ Remove a business from the authenticated user's favorites.
10543
10544
  </dd>
10544
10545
  </dl>
10545
10546
  </dd>
@@ -10554,9 +10555,8 @@ Returns available pickup timeslots for a business on a given date.
10554
10555
  <dd>
10555
10556
 
10556
10557
  ```typescript
10557
- await client.customer.businesses.getPickupTimeslots({
10558
- handle: "katzs-deli",
10559
- date: "2023-01-15"
10558
+ await client.customer.businesses.unfavorite({
10559
+ business: "katzs-deli"
10560
10560
  });
10561
10561
 
10562
10562
  ```
@@ -10573,7 +10573,7 @@ await client.customer.businesses.getPickupTimeslots({
10573
10573
  <dl>
10574
10574
  <dd>
10575
10575
 
10576
- **request:** `FiveOneEat.customer.GetPickupTimeslotsBusinessesRequest`
10576
+ **request:** `FiveOneEat.customer.UnfavoriteBusinessesRequest`
10577
10577
 
10578
10578
  </dd>
10579
10579
  </dl>
@@ -1,6 +0,0 @@
1
- export interface ImageResource {
2
- id: string;
3
- url: string;
4
- alt_text: string | null;
5
- sort_order: number;
6
- }
@@ -1,8 +0,0 @@
1
- import type * as FiveOneEat from "../index.js";
2
- export interface ProductCategoryResource {
3
- id: string;
4
- name: string;
5
- slug: string;
6
- sort_order: string;
7
- parent?: FiveOneEat.ProductCategoryResource | undefined;
8
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was auto-generated by Fern from our API Definition.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- export interface ImageResource {
2
- id: string;
3
- url: string;
4
- alt_text: string | null;
5
- sort_order: number;
6
- }
@@ -1,8 +0,0 @@
1
- import type * as FiveOneEat from "../index.mjs";
2
- export interface ProductCategoryResource {
3
- id: string;
4
- name: string;
5
- slug: string;
6
- sort_order: string;
7
- parent?: FiveOneEat.ProductCategoryResource | undefined;
8
- }
@@ -1,2 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- export {};