@51eat/sdk 0.0.10 → 0.0.11

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 (146) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +11 -6
  4. package/dist/cjs/api/resources/editorials/client/Client.d.ts +41 -0
  5. package/dist/cjs/api/resources/editorials/client/Client.js +158 -0
  6. package/dist/cjs/api/resources/editorials/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/editorials/client/index.js +17 -0
  8. package/dist/cjs/api/resources/editorials/client/requests/GetEditorialRequest.d.ts +9 -0
  9. package/dist/cjs/api/resources/editorials/client/requests/GetEditorialRequest.js +3 -0
  10. package/dist/cjs/api/resources/editorials/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/editorials/client/requests/index.js +2 -0
  12. package/dist/cjs/api/resources/editorials/exports.d.ts +2 -0
  13. package/dist/cjs/api/resources/editorials/exports.js +21 -0
  14. package/dist/cjs/api/resources/editorials/index.d.ts +2 -0
  15. package/dist/cjs/api/resources/editorials/index.js +18 -0
  16. package/dist/cjs/api/resources/editorials/types/GetEditorialResponse.d.ts +4 -0
  17. package/dist/cjs/api/resources/editorials/types/GetEditorialResponse.js +3 -0
  18. package/dist/cjs/api/resources/editorials/types/ListEditorialsResponse.d.ts +4 -0
  19. package/dist/cjs/api/resources/editorials/types/ListEditorialsResponse.js +3 -0
  20. package/dist/cjs/api/resources/editorials/types/index.d.ts +2 -0
  21. package/dist/cjs/api/resources/editorials/types/index.js +18 -0
  22. package/dist/cjs/api/resources/index.d.ts +3 -0
  23. package/dist/cjs/api/resources/index.js +4 -1
  24. package/dist/cjs/api/types/BardBlockquoteNode.d.ts +4 -0
  25. package/dist/cjs/api/types/BardBlockquoteNode.js +3 -0
  26. package/dist/cjs/api/types/BardBody.d.ts +2 -0
  27. package/dist/cjs/api/types/BardBody.js +3 -0
  28. package/dist/cjs/api/types/BardBulletListNode.d.ts +4 -0
  29. package/dist/cjs/api/types/BardBulletListNode.js +3 -0
  30. package/dist/cjs/api/types/BardEventSetValues.d.ts +15 -0
  31. package/dist/cjs/api/types/BardEventSetValues.js +3 -0
  32. package/dist/cjs/api/types/BardHardBreakNode.d.ts +1 -0
  33. package/dist/cjs/api/types/BardHardBreakNode.js +3 -0
  34. package/dist/cjs/api/types/BardHeadingNode.d.ts +11 -0
  35. package/dist/cjs/api/types/BardHeadingNode.js +3 -0
  36. package/dist/cjs/api/types/BardHeadingNodeContentItem.d.ts +10 -0
  37. package/dist/cjs/api/types/BardHeadingNodeContentItem.js +3 -0
  38. package/dist/cjs/api/types/BardHorizontalRuleNode.d.ts +1 -0
  39. package/dist/cjs/api/types/BardHorizontalRuleNode.js +3 -0
  40. package/dist/cjs/api/types/BardImageNode.d.ts +11 -0
  41. package/dist/cjs/api/types/BardImageNode.js +3 -0
  42. package/dist/cjs/api/types/BardListItemNode.d.ts +11 -0
  43. package/dist/cjs/api/types/BardListItemNode.js +10 -0
  44. package/dist/cjs/api/types/BardMark.d.ts +23 -0
  45. package/dist/cjs/api/types/BardMark.js +18 -0
  46. package/dist/cjs/api/types/BardMenuItemSetValues.d.ts +13 -0
  47. package/dist/cjs/api/types/BardMenuItemSetValues.js +3 -0
  48. package/dist/cjs/api/types/BardNode.d.ts +31 -0
  49. package/dist/cjs/api/types/BardNode.js +3 -0
  50. package/dist/cjs/api/types/BardOrderedListNode.d.ts +4 -0
  51. package/dist/cjs/api/types/BardOrderedListNode.js +3 -0
  52. package/dist/cjs/api/types/BardParagraphNode.d.ts +11 -0
  53. package/dist/cjs/api/types/BardParagraphNode.js +10 -0
  54. package/dist/cjs/api/types/BardParagraphNodeContentItem.d.ts +10 -0
  55. package/dist/cjs/api/types/BardParagraphNodeContentItem.js +3 -0
  56. package/dist/cjs/api/types/BardProductSetValues.d.ts +13 -0
  57. package/dist/cjs/api/types/BardProductSetValues.js +3 -0
  58. package/dist/cjs/api/types/BardSetNode.d.ts +12 -0
  59. package/dist/cjs/api/types/BardSetNode.js +3 -0
  60. package/dist/cjs/api/types/BardSetValues.d.ts +13 -0
  61. package/dist/cjs/api/types/BardSetValues.js +3 -0
  62. package/dist/cjs/api/types/BardTextNode.d.ts +5 -0
  63. package/dist/cjs/api/types/BardTextNode.js +3 -0
  64. package/dist/cjs/api/types/DiscoveryBusinessResource.d.ts +6 -0
  65. package/dist/cjs/api/types/EditorialResource.d.ts +31 -0
  66. package/dist/cjs/api/types/EditorialResource.js +3 -0
  67. package/dist/cjs/api/types/EditorialSummaryResource.d.ts +29 -0
  68. package/dist/cjs/api/types/EditorialSummaryResource.js +3 -0
  69. package/dist/cjs/api/types/index.d.ts +22 -0
  70. package/dist/cjs/api/types/index.js +22 -0
  71. package/dist/cjs/version.d.ts +1 -1
  72. package/dist/cjs/version.js +1 -1
  73. package/dist/esm/BaseClient.mjs +2 -2
  74. package/dist/esm/Client.d.mts +3 -0
  75. package/dist/esm/Client.mjs +5 -0
  76. package/dist/esm/api/resources/editorials/client/Client.d.mts +41 -0
  77. package/dist/esm/api/resources/editorials/client/Client.mjs +121 -0
  78. package/dist/esm/api/resources/editorials/client/index.d.mts +1 -0
  79. package/dist/esm/api/resources/editorials/client/index.mjs +1 -0
  80. package/dist/esm/api/resources/editorials/client/requests/GetEditorialRequest.d.mts +9 -0
  81. package/dist/esm/api/resources/editorials/client/requests/GetEditorialRequest.mjs +2 -0
  82. package/dist/esm/api/resources/editorials/client/requests/index.d.mts +1 -0
  83. package/dist/esm/api/resources/editorials/client/requests/index.mjs +1 -0
  84. package/dist/esm/api/resources/editorials/exports.d.mts +2 -0
  85. package/dist/esm/api/resources/editorials/exports.mjs +3 -0
  86. package/dist/esm/api/resources/editorials/index.d.mts +2 -0
  87. package/dist/esm/api/resources/editorials/index.mjs +2 -0
  88. package/dist/esm/api/resources/editorials/types/GetEditorialResponse.d.mts +4 -0
  89. package/dist/esm/api/resources/editorials/types/GetEditorialResponse.mjs +2 -0
  90. package/dist/esm/api/resources/editorials/types/ListEditorialsResponse.d.mts +4 -0
  91. package/dist/esm/api/resources/editorials/types/ListEditorialsResponse.mjs +2 -0
  92. package/dist/esm/api/resources/editorials/types/index.d.mts +2 -0
  93. package/dist/esm/api/resources/editorials/types/index.mjs +2 -0
  94. package/dist/esm/api/resources/index.d.mts +3 -0
  95. package/dist/esm/api/resources/index.mjs +3 -0
  96. package/dist/esm/api/types/BardBlockquoteNode.d.mts +4 -0
  97. package/dist/esm/api/types/BardBlockquoteNode.mjs +2 -0
  98. package/dist/esm/api/types/BardBody.d.mts +2 -0
  99. package/dist/esm/api/types/BardBody.mjs +2 -0
  100. package/dist/esm/api/types/BardBulletListNode.d.mts +4 -0
  101. package/dist/esm/api/types/BardBulletListNode.mjs +2 -0
  102. package/dist/esm/api/types/BardEventSetValues.d.mts +15 -0
  103. package/dist/esm/api/types/BardEventSetValues.mjs +2 -0
  104. package/dist/esm/api/types/BardHardBreakNode.d.mts +1 -0
  105. package/dist/esm/api/types/BardHardBreakNode.mjs +2 -0
  106. package/dist/esm/api/types/BardHeadingNode.d.mts +11 -0
  107. package/dist/esm/api/types/BardHeadingNode.mjs +2 -0
  108. package/dist/esm/api/types/BardHeadingNodeContentItem.d.mts +10 -0
  109. package/dist/esm/api/types/BardHeadingNodeContentItem.mjs +2 -0
  110. package/dist/esm/api/types/BardHorizontalRuleNode.d.mts +1 -0
  111. package/dist/esm/api/types/BardHorizontalRuleNode.mjs +2 -0
  112. package/dist/esm/api/types/BardImageNode.d.mts +11 -0
  113. package/dist/esm/api/types/BardImageNode.mjs +2 -0
  114. package/dist/esm/api/types/BardListItemNode.d.mts +11 -0
  115. package/dist/esm/api/types/BardListItemNode.mjs +7 -0
  116. package/dist/esm/api/types/BardMark.d.mts +23 -0
  117. package/dist/esm/api/types/BardMark.mjs +15 -0
  118. package/dist/esm/api/types/BardMenuItemSetValues.d.mts +13 -0
  119. package/dist/esm/api/types/BardMenuItemSetValues.mjs +2 -0
  120. package/dist/esm/api/types/BardNode.d.mts +31 -0
  121. package/dist/esm/api/types/BardNode.mjs +2 -0
  122. package/dist/esm/api/types/BardOrderedListNode.d.mts +4 -0
  123. package/dist/esm/api/types/BardOrderedListNode.mjs +2 -0
  124. package/dist/esm/api/types/BardParagraphNode.d.mts +11 -0
  125. package/dist/esm/api/types/BardParagraphNode.mjs +7 -0
  126. package/dist/esm/api/types/BardParagraphNodeContentItem.d.mts +10 -0
  127. package/dist/esm/api/types/BardParagraphNodeContentItem.mjs +2 -0
  128. package/dist/esm/api/types/BardProductSetValues.d.mts +13 -0
  129. package/dist/esm/api/types/BardProductSetValues.mjs +2 -0
  130. package/dist/esm/api/types/BardSetNode.d.mts +12 -0
  131. package/dist/esm/api/types/BardSetNode.mjs +2 -0
  132. package/dist/esm/api/types/BardSetValues.d.mts +13 -0
  133. package/dist/esm/api/types/BardSetValues.mjs +2 -0
  134. package/dist/esm/api/types/BardTextNode.d.mts +5 -0
  135. package/dist/esm/api/types/BardTextNode.mjs +2 -0
  136. package/dist/esm/api/types/DiscoveryBusinessResource.d.mts +6 -0
  137. package/dist/esm/api/types/EditorialResource.d.mts +31 -0
  138. package/dist/esm/api/types/EditorialResource.mjs +2 -0
  139. package/dist/esm/api/types/EditorialSummaryResource.d.mts +29 -0
  140. package/dist/esm/api/types/EditorialSummaryResource.mjs +2 -0
  141. package/dist/esm/api/types/index.d.mts +22 -0
  142. package/dist/esm/api/types/index.mjs +22 -0
  143. package/dist/esm/version.d.mts +1 -1
  144. package/dist/esm/version.mjs +1 -1
  145. package/package.json +12 -1
  146. package/reference.md +122 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@51eat/sdk",
46
- "X-Fern-SDK-Version": "0.0.10",
47
- "User-Agent": "@51eat/sdk/0.0.10",
46
+ "X-Fern-SDK-Version": "0.0.11",
47
+ "User-Agent": "@51eat/sdk/0.0.11",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -5,6 +5,7 @@ import { BusinessContentClient } from "./api/resources/businessContent/client/Cl
5
5
  import { BusinessProfilesClient } from "./api/resources/businessProfiles/client/Client.js";
6
6
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.js";
7
7
  import { DiscoveryClient } from "./api/resources/discovery/client/Client.js";
8
+ import { EditorialsClient } from "./api/resources/editorials/client/Client.js";
8
9
  import { EventsClient } from "./api/resources/events/client/Client.js";
9
10
  import { MyAccountClient } from "./api/resources/myAccount/client/Client.js";
10
11
  import { TicketingClient } from "./api/resources/ticketing/client/Client.js";
@@ -24,6 +25,7 @@ export declare class FiveOneEatClient {
24
25
  protected _businessProfiles: BusinessProfilesClient | undefined;
25
26
  protected _customerMessaging: CustomerMessagingClient | undefined;
26
27
  protected _discovery: DiscoveryClient | undefined;
28
+ protected _editorials: EditorialsClient | undefined;
27
29
  protected _events: EventsClient | undefined;
28
30
  protected _myAccount: MyAccountClient | undefined;
29
31
  protected _ticketing: TicketingClient | undefined;
@@ -34,6 +36,7 @@ export declare class FiveOneEatClient {
34
36
  get businessProfiles(): BusinessProfilesClient;
35
37
  get customerMessaging(): CustomerMessagingClient;
36
38
  get discovery(): DiscoveryClient;
39
+ get editorials(): EditorialsClient;
37
40
  get events(): EventsClient;
38
41
  get myAccount(): MyAccountClient;
39
42
  get ticketing(): TicketingClient;
@@ -51,9 +51,10 @@ const Client_js_3 = require("./api/resources/businessContent/client/Client.js");
51
51
  const Client_js_4 = require("./api/resources/businessProfiles/client/Client.js");
52
52
  const Client_js_5 = require("./api/resources/customerMessaging/client/Client.js");
53
53
  const Client_js_6 = require("./api/resources/discovery/client/Client.js");
54
- const Client_js_7 = require("./api/resources/events/client/Client.js");
55
- const Client_js_8 = require("./api/resources/myAccount/client/Client.js");
56
- const Client_js_9 = require("./api/resources/ticketing/client/Client.js");
54
+ const Client_js_7 = require("./api/resources/editorials/client/Client.js");
55
+ const Client_js_8 = require("./api/resources/events/client/Client.js");
56
+ const Client_js_9 = require("./api/resources/myAccount/client/Client.js");
57
+ const Client_js_10 = require("./api/resources/ticketing/client/Client.js");
57
58
  const BaseClient_js_1 = require("./BaseClient.js");
58
59
  const headers_js_1 = require("./core/headers.js");
59
60
  const core = __importStar(require("./core/index.js"));
@@ -89,17 +90,21 @@ class FiveOneEatClient {
89
90
  var _a;
90
91
  return ((_a = this._discovery) !== null && _a !== void 0 ? _a : (this._discovery = new Client_js_6.DiscoveryClient(this._options)));
91
92
  }
93
+ get editorials() {
94
+ var _a;
95
+ return ((_a = this._editorials) !== null && _a !== void 0 ? _a : (this._editorials = new Client_js_7.EditorialsClient(this._options)));
96
+ }
92
97
  get events() {
93
98
  var _a;
94
- return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_js_7.EventsClient(this._options)));
99
+ return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_js_8.EventsClient(this._options)));
95
100
  }
96
101
  get myAccount() {
97
102
  var _a;
98
- return ((_a = this._myAccount) !== null && _a !== void 0 ? _a : (this._myAccount = new Client_js_8.MyAccountClient(this._options)));
103
+ return ((_a = this._myAccount) !== null && _a !== void 0 ? _a : (this._myAccount = new Client_js_9.MyAccountClient(this._options)));
99
104
  }
100
105
  get ticketing() {
101
106
  var _a;
102
- return ((_a = this._ticketing) !== null && _a !== void 0 ? _a : (this._ticketing = new Client_js_9.TicketingClient(this._options)));
107
+ return ((_a = this._ticketing) !== null && _a !== void 0 ? _a : (this._ticketing = new Client_js_10.TicketingClient(this._options)));
103
108
  }
104
109
  /**
105
110
  * Returns grouped results for each type. Use per_type to control how many results
@@ -0,0 +1,41 @@
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 EditorialsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class EditorialsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<EditorialsClient.Options>;
12
+ constructor(options?: EditorialsClient.Options);
13
+ /**
14
+ * Returns a paginated list of published editorials with basic business info.
15
+ *
16
+ * @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
17
+ *
18
+ * @throws {@link FiveOneEat.UnauthorizedError}
19
+ *
20
+ * @example
21
+ * await client.editorials.listEditorials()
22
+ */
23
+ listEditorials(requestOptions?: EditorialsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.ListEditorialsResponse>;
24
+ private __listEditorials;
25
+ /**
26
+ * Returns a published editorial by slug, with the full augmented body
27
+ * including resolved menu item, product, and event references.
28
+ *
29
+ * @param {FiveOneEat.GetEditorialRequest} request
30
+ * @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @throws {@link FiveOneEat.UnauthorizedError}
33
+ *
34
+ * @example
35
+ * await client.editorials.getEditorial({
36
+ * slug: "slug"
37
+ * })
38
+ */
39
+ getEditorial(request: FiveOneEat.GetEditorialRequest, requestOptions?: EditorialsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.GetEditorialResponse>;
40
+ private __getEditorial;
41
+ }
@@ -0,0 +1,158 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.EditorialsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../errors/index.js"));
53
+ const FiveOneEat = __importStar(require("../../../index.js"));
54
+ class EditorialsClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Returns a paginated list of published editorials with basic business info.
60
+ *
61
+ * @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link FiveOneEat.UnauthorizedError}
64
+ *
65
+ * @example
66
+ * await client.editorials.listEditorials()
67
+ */
68
+ listEditorials(requestOptions) {
69
+ return core.HttpResponsePromise.fromPromise(this.__listEditorials(requestOptions));
70
+ }
71
+ __listEditorials(requestOptions) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
74
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
75
+ 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);
76
+ const _response = yield core.fetcher({
77
+ 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/editorials"),
78
+ method: "GET",
79
+ headers: _headers,
80
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
81
+ 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,
82
+ 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,
83
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
84
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
85
+ logging: this._options.logging,
86
+ });
87
+ if (_response.ok) {
88
+ return { data: _response.body, rawResponse: _response.rawResponse };
89
+ }
90
+ if (_response.error.reason === "status-code") {
91
+ switch (_response.error.statusCode) {
92
+ case 401:
93
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
94
+ default:
95
+ throw new errors.FiveOneEatError({
96
+ statusCode: _response.error.statusCode,
97
+ body: _response.error.body,
98
+ rawResponse: _response.rawResponse,
99
+ });
100
+ }
101
+ }
102
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/editorials");
103
+ });
104
+ }
105
+ /**
106
+ * Returns a published editorial by slug, with the full augmented body
107
+ * including resolved menu item, product, and event references.
108
+ *
109
+ * @param {FiveOneEat.GetEditorialRequest} request
110
+ * @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
111
+ *
112
+ * @throws {@link FiveOneEat.UnauthorizedError}
113
+ *
114
+ * @example
115
+ * await client.editorials.getEditorial({
116
+ * slug: "slug"
117
+ * })
118
+ */
119
+ getEditorial(request, requestOptions) {
120
+ return core.HttpResponsePromise.fromPromise(this.__getEditorial(request, requestOptions));
121
+ }
122
+ __getEditorial(request, requestOptions) {
123
+ return __awaiter(this, void 0, void 0, function* () {
124
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
125
+ const { slug } = request;
126
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
127
+ 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);
128
+ const _response = yield core.fetcher({
129
+ 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/editorials/${core.url.encodePathParam(slug)}`),
130
+ method: "GET",
131
+ headers: _headers,
132
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
133
+ 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,
134
+ 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,
135
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
136
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
137
+ logging: this._options.logging,
138
+ });
139
+ if (_response.ok) {
140
+ return { data: _response.body, rawResponse: _response.rawResponse };
141
+ }
142
+ if (_response.error.reason === "status-code") {
143
+ switch (_response.error.statusCode) {
144
+ case 401:
145
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
146
+ default:
147
+ throw new errors.FiveOneEatError({
148
+ statusCode: _response.error.statusCode,
149
+ body: _response.error.body,
150
+ rawResponse: _response.rawResponse,
151
+ });
152
+ }
153
+ }
154
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/editorials/{slug}");
155
+ });
156
+ }
157
+ }
158
+ exports.EditorialsClient = EditorialsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
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);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * slug: "slug"
5
+ * }
6
+ */
7
+ export interface GetEditorialRequest {
8
+ slug: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { GetEditorialRequest } from "./GetEditorialRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { EditorialsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
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.EditorialsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "EditorialsClient", { enumerable: true, get: function () { return Client_js_1.EditorialsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -0,0 +1,18 @@
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);
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../index.js";
2
+ export interface GetEditorialResponse {
3
+ data: FiveOneEat.EditorialResource;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../index.js";
2
+ export interface ListEditorialsResponse {
3
+ data: FiveOneEat.EditorialSummaryResource[];
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./GetEditorialResponse.js";
2
+ export * from "./ListEditorialsResponse.js";
@@ -0,0 +1,18 @@
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("./GetEditorialResponse.js"), exports);
18
+ __exportStar(require("./ListEditorialsResponse.js"), exports);
@@ -15,6 +15,9 @@ export * from "./customerMessaging/types/index.js";
15
15
  export * from "./discovery/client/requests/index.js";
16
16
  export * as discovery from "./discovery/index.js";
17
17
  export * from "./discovery/types/index.js";
18
+ export * from "./editorials/client/requests/index.js";
19
+ export * as editorials from "./editorials/index.js";
20
+ export * from "./editorials/types/index.js";
18
21
  export * from "./events/client/requests/index.js";
19
22
  export * as events from "./events/index.js";
20
23
  export * from "./events/types/index.js";
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.ticketing = exports.myAccount = exports.events = exports.discovery = exports.customerMessaging = exports.businessProfiles = exports.businessContent = exports.broadcasting = exports.authentication = void 0;
39
+ exports.ticketing = exports.myAccount = exports.events = exports.editorials = exports.discovery = exports.customerMessaging = exports.businessProfiles = exports.businessContent = exports.broadcasting = exports.authentication = void 0;
40
40
  __exportStar(require("./authentication/client/requests/index.js"), exports);
41
41
  exports.authentication = __importStar(require("./authentication/index.js"));
42
42
  __exportStar(require("./authentication/types/index.js"), exports);
@@ -54,6 +54,9 @@ __exportStar(require("./customerMessaging/types/index.js"), exports);
54
54
  __exportStar(require("./discovery/client/requests/index.js"), exports);
55
55
  exports.discovery = __importStar(require("./discovery/index.js"));
56
56
  __exportStar(require("./discovery/types/index.js"), exports);
57
+ __exportStar(require("./editorials/client/requests/index.js"), exports);
58
+ exports.editorials = __importStar(require("./editorials/index.js"));
59
+ __exportStar(require("./editorials/types/index.js"), exports);
57
60
  __exportStar(require("./events/client/requests/index.js"), exports);
58
61
  exports.events = __importStar(require("./events/index.js"));
59
62
  __exportStar(require("./events/types/index.js"), exports);
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../index.js";
2
+ export interface BardBlockquoteNode {
3
+ content?: FiveOneEat.BardParagraphNode[] | undefined;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type * as FiveOneEat from "../index.js";
2
+ export type BardBody = FiveOneEat.BardNode[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../index.js";
2
+ export interface BardBulletListNode {
3
+ content: FiveOneEat.BardListItemNode[];
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ export interface BardEventSetValues {
2
+ caption: string | null;
3
+ item: BardEventSetValues.Item | null;
4
+ }
5
+ export declare namespace BardEventSetValues {
6
+ interface Item {
7
+ id: string;
8
+ title: string;
9
+ description?: (string | null) | undefined;
10
+ starts_at?: (string | null) | undefined;
11
+ ends_at?: (string | null) | undefined;
12
+ location?: (string | null) | undefined;
13
+ image?: (string | null) | undefined;
14
+ }
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type BardHardBreakNode = {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type * as FiveOneEat from "../index.js";
2
+ export interface BardHeadingNode {
3
+ attrs: BardHeadingNode.Attrs;
4
+ content?: FiveOneEat.BardHeadingNodeContentItem[] | undefined;
5
+ }
6
+ export declare namespace BardHeadingNode {
7
+ interface Attrs {
8
+ /** Heading level 1–6. */
9
+ level: number;
10
+ }
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type * as FiveOneEat from "../index.js";
2
+ export type BardHeadingNodeContentItem = FiveOneEat.BardHeadingNodeContentItem.Text | FiveOneEat.BardHeadingNodeContentItem.HardBreak;
3
+ export declare namespace BardHeadingNodeContentItem {
4
+ interface Text extends FiveOneEat.BardTextNode {
5
+ type: "text";
6
+ }
7
+ interface HardBreak extends FiveOneEat.BardHardBreakNode {
8
+ type: "hardBreak";
9
+ }
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type BardHorizontalRuleNode = {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export interface BardImageNode {
2
+ attrs: BardImageNode.Attrs;
3
+ }
4
+ export declare namespace BardImageNode {
5
+ interface Attrs {
6
+ /** Resolved S3 asset URL. */
7
+ src: string;
8
+ alt?: (string | null) | undefined;
9
+ title?: (string | null) | undefined;
10
+ }
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type * as FiveOneEat from "../index.js";
2
+ export interface BardListItemNode {
3
+ type: BardListItemNode.Type;
4
+ content: FiveOneEat.BardParagraphNode[];
5
+ }
6
+ export declare namespace BardListItemNode {
7
+ const Type: {
8
+ readonly ListItem: "listItem";
9
+ };
10
+ type Type = (typeof Type)[keyof typeof Type];
11
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.BardListItemNode = void 0;
5
+ var BardListItemNode;
6
+ (function (BardListItemNode) {
7
+ BardListItemNode.Type = {
8
+ ListItem: "listItem",
9
+ };
10
+ })(BardListItemNode || (exports.BardListItemNode = BardListItemNode = {}));
@@ -0,0 +1,23 @@
1
+ export interface BardMark {
2
+ /** The mark type. */
3
+ type: BardMark.Type;
4
+ attrs?: BardMark.Attrs | undefined;
5
+ }
6
+ export declare namespace BardMark {
7
+ /** The mark type. */
8
+ const Type: {
9
+ readonly Bold: "bold";
10
+ readonly Italic: "italic";
11
+ readonly Underline: "underline";
12
+ readonly Link: "link";
13
+ readonly Anchor: "anchor";
14
+ readonly Small: "small";
15
+ readonly Subscript: "subscript";
16
+ readonly Superscript: "superscript";
17
+ };
18
+ type Type = (typeof Type)[keyof typeof Type];
19
+ interface Attrs {
20
+ href?: (string | null) | undefined;
21
+ target?: (string | null) | undefined;
22
+ }
23
+ }