@51eat/sdk 0.0.9 → 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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +11 -6
- package/dist/cjs/api/resources/discovery/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/discovery/client/Client.js +52 -0
- package/dist/cjs/api/resources/editorials/client/Client.d.ts +41 -0
- package/dist/cjs/api/resources/editorials/client/Client.js +158 -0
- package/dist/cjs/api/resources/editorials/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/editorials/client/index.js +17 -0
- package/dist/cjs/api/resources/editorials/client/requests/GetEditorialRequest.d.ts +9 -0
- package/dist/cjs/api/resources/editorials/client/requests/GetEditorialRequest.js +3 -0
- package/dist/cjs/api/resources/editorials/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/editorials/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/editorials/exports.d.ts +2 -0
- package/dist/cjs/api/resources/editorials/exports.js +21 -0
- package/dist/cjs/api/resources/editorials/index.d.ts +2 -0
- package/dist/cjs/api/resources/editorials/index.js +18 -0
- package/dist/cjs/api/resources/editorials/types/GetEditorialResponse.d.ts +4 -0
- package/dist/cjs/api/resources/editorials/types/GetEditorialResponse.js +3 -0
- package/dist/cjs/api/resources/editorials/types/ListEditorialsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/editorials/types/ListEditorialsResponse.js +3 -0
- package/dist/cjs/api/resources/editorials/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/editorials/types/index.js +18 -0
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/types/BardBlockquoteNode.d.ts +4 -0
- package/dist/cjs/api/types/BardBlockquoteNode.js +3 -0
- package/dist/cjs/api/types/BardBody.d.ts +2 -0
- package/dist/cjs/api/types/BardBody.js +3 -0
- package/dist/cjs/api/types/BardBulletListNode.d.ts +4 -0
- package/dist/cjs/api/types/BardBulletListNode.js +3 -0
- package/dist/cjs/api/types/BardEventSetValues.d.ts +15 -0
- package/dist/cjs/api/types/BardEventSetValues.js +3 -0
- package/dist/cjs/api/types/BardHardBreakNode.d.ts +1 -0
- package/dist/cjs/api/types/BardHardBreakNode.js +3 -0
- package/dist/cjs/api/types/BardHeadingNode.d.ts +11 -0
- package/dist/cjs/api/types/BardHeadingNode.js +3 -0
- package/dist/cjs/api/types/BardHeadingNodeContentItem.d.ts +10 -0
- package/dist/cjs/api/types/BardHeadingNodeContentItem.js +3 -0
- package/dist/cjs/api/types/BardHorizontalRuleNode.d.ts +1 -0
- package/dist/cjs/api/types/BardHorizontalRuleNode.js +3 -0
- package/dist/cjs/api/types/BardImageNode.d.ts +11 -0
- package/dist/cjs/api/types/BardImageNode.js +3 -0
- package/dist/cjs/api/types/BardListItemNode.d.ts +11 -0
- package/dist/cjs/api/types/BardListItemNode.js +10 -0
- package/dist/cjs/api/types/BardMark.d.ts +23 -0
- package/dist/cjs/api/types/BardMark.js +18 -0
- package/dist/cjs/api/types/BardMenuItemSetValues.d.ts +13 -0
- package/dist/cjs/api/types/BardMenuItemSetValues.js +3 -0
- package/dist/cjs/api/types/BardNode.d.ts +31 -0
- package/dist/cjs/api/types/BardNode.js +3 -0
- package/dist/cjs/api/types/BardOrderedListNode.d.ts +4 -0
- package/dist/cjs/api/types/BardOrderedListNode.js +3 -0
- package/dist/cjs/api/types/BardParagraphNode.d.ts +11 -0
- package/dist/cjs/api/types/BardParagraphNode.js +10 -0
- package/dist/cjs/api/types/BardParagraphNodeContentItem.d.ts +10 -0
- package/dist/cjs/api/types/BardParagraphNodeContentItem.js +3 -0
- package/dist/cjs/api/types/BardProductSetValues.d.ts +13 -0
- package/dist/cjs/api/types/BardProductSetValues.js +3 -0
- package/dist/cjs/api/types/BardSetNode.d.ts +12 -0
- package/dist/cjs/api/types/BardSetNode.js +3 -0
- package/dist/cjs/api/types/BardSetValues.d.ts +13 -0
- package/dist/cjs/api/types/BardSetValues.js +3 -0
- package/dist/cjs/api/types/BardTextNode.d.ts +5 -0
- package/dist/cjs/api/types/BardTextNode.js +3 -0
- package/dist/cjs/api/types/DiscoveryBusinessResource.d.ts +6 -0
- package/dist/cjs/api/types/DiscoveryHighlightsResource.d.ts +10 -0
- package/dist/cjs/api/types/DiscoveryHighlightsResource.js +3 -0
- package/dist/cjs/api/types/EditorialResource.d.ts +31 -0
- package/dist/cjs/api/types/EditorialResource.js +3 -0
- package/dist/cjs/api/types/EditorialSummaryResource.d.ts +29 -0
- package/dist/cjs/api/types/EditorialSummaryResource.js +3 -0
- package/dist/cjs/api/types/index.d.ts +23 -0
- package/dist/cjs/api/types/index.js +23 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/discovery/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/discovery/client/Client.mjs +52 -0
- package/dist/esm/api/resources/editorials/client/Client.d.mts +41 -0
- package/dist/esm/api/resources/editorials/client/Client.mjs +121 -0
- package/dist/esm/api/resources/editorials/client/index.d.mts +1 -0
- package/dist/esm/api/resources/editorials/client/index.mjs +1 -0
- package/dist/esm/api/resources/editorials/client/requests/GetEditorialRequest.d.mts +9 -0
- package/dist/esm/api/resources/editorials/client/requests/GetEditorialRequest.mjs +2 -0
- package/dist/esm/api/resources/editorials/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/editorials/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/editorials/exports.d.mts +2 -0
- package/dist/esm/api/resources/editorials/exports.mjs +3 -0
- package/dist/esm/api/resources/editorials/index.d.mts +2 -0
- package/dist/esm/api/resources/editorials/index.mjs +2 -0
- package/dist/esm/api/resources/editorials/types/GetEditorialResponse.d.mts +4 -0
- package/dist/esm/api/resources/editorials/types/GetEditorialResponse.mjs +2 -0
- package/dist/esm/api/resources/editorials/types/ListEditorialsResponse.d.mts +4 -0
- package/dist/esm/api/resources/editorials/types/ListEditorialsResponse.mjs +2 -0
- package/dist/esm/api/resources/editorials/types/index.d.mts +2 -0
- package/dist/esm/api/resources/editorials/types/index.mjs +2 -0
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/types/BardBlockquoteNode.d.mts +4 -0
- package/dist/esm/api/types/BardBlockquoteNode.mjs +2 -0
- package/dist/esm/api/types/BardBody.d.mts +2 -0
- package/dist/esm/api/types/BardBody.mjs +2 -0
- package/dist/esm/api/types/BardBulletListNode.d.mts +4 -0
- package/dist/esm/api/types/BardBulletListNode.mjs +2 -0
- package/dist/esm/api/types/BardEventSetValues.d.mts +15 -0
- package/dist/esm/api/types/BardEventSetValues.mjs +2 -0
- package/dist/esm/api/types/BardHardBreakNode.d.mts +1 -0
- package/dist/esm/api/types/BardHardBreakNode.mjs +2 -0
- package/dist/esm/api/types/BardHeadingNode.d.mts +11 -0
- package/dist/esm/api/types/BardHeadingNode.mjs +2 -0
- package/dist/esm/api/types/BardHeadingNodeContentItem.d.mts +10 -0
- package/dist/esm/api/types/BardHeadingNodeContentItem.mjs +2 -0
- package/dist/esm/api/types/BardHorizontalRuleNode.d.mts +1 -0
- package/dist/esm/api/types/BardHorizontalRuleNode.mjs +2 -0
- package/dist/esm/api/types/BardImageNode.d.mts +11 -0
- package/dist/esm/api/types/BardImageNode.mjs +2 -0
- package/dist/esm/api/types/BardListItemNode.d.mts +11 -0
- package/dist/esm/api/types/BardListItemNode.mjs +7 -0
- package/dist/esm/api/types/BardMark.d.mts +23 -0
- package/dist/esm/api/types/BardMark.mjs +15 -0
- package/dist/esm/api/types/BardMenuItemSetValues.d.mts +13 -0
- package/dist/esm/api/types/BardMenuItemSetValues.mjs +2 -0
- package/dist/esm/api/types/BardNode.d.mts +31 -0
- package/dist/esm/api/types/BardNode.mjs +2 -0
- package/dist/esm/api/types/BardOrderedListNode.d.mts +4 -0
- package/dist/esm/api/types/BardOrderedListNode.mjs +2 -0
- package/dist/esm/api/types/BardParagraphNode.d.mts +11 -0
- package/dist/esm/api/types/BardParagraphNode.mjs +7 -0
- package/dist/esm/api/types/BardParagraphNodeContentItem.d.mts +10 -0
- package/dist/esm/api/types/BardParagraphNodeContentItem.mjs +2 -0
- package/dist/esm/api/types/BardProductSetValues.d.mts +13 -0
- package/dist/esm/api/types/BardProductSetValues.mjs +2 -0
- package/dist/esm/api/types/BardSetNode.d.mts +12 -0
- package/dist/esm/api/types/BardSetNode.mjs +2 -0
- package/dist/esm/api/types/BardSetValues.d.mts +13 -0
- package/dist/esm/api/types/BardSetValues.mjs +2 -0
- package/dist/esm/api/types/BardTextNode.d.mts +5 -0
- package/dist/esm/api/types/BardTextNode.mjs +2 -0
- package/dist/esm/api/types/DiscoveryBusinessResource.d.mts +6 -0
- package/dist/esm/api/types/DiscoveryHighlightsResource.d.mts +10 -0
- package/dist/esm/api/types/DiscoveryHighlightsResource.mjs +2 -0
- package/dist/esm/api/types/EditorialResource.d.mts +31 -0
- package/dist/esm/api/types/EditorialResource.mjs +2 -0
- package/dist/esm/api/types/EditorialSummaryResource.d.mts +29 -0
- package/dist/esm/api/types/EditorialSummaryResource.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +23 -0
- package/dist/esm/api/types/index.mjs +23 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -1
- package/reference.md +179 -0
|
@@ -0,0 +1,41 @@
|
|
|
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 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,121 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../index.mjs";
|
|
18
|
+
export class EditorialsClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns a paginated list of published editorials with basic business info.
|
|
24
|
+
*
|
|
25
|
+
* @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
|
+
*
|
|
27
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* await client.editorials.listEditorials()
|
|
31
|
+
*/
|
|
32
|
+
listEditorials(requestOptions) {
|
|
33
|
+
return core.HttpResponsePromise.fromPromise(this.__listEditorials(requestOptions));
|
|
34
|
+
}
|
|
35
|
+
__listEditorials(requestOptions) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
38
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
39
|
+
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);
|
|
40
|
+
const _response = yield core.fetcher({
|
|
41
|
+
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"),
|
|
42
|
+
method: "GET",
|
|
43
|
+
headers: _headers,
|
|
44
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
45
|
+
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,
|
|
46
|
+
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,
|
|
47
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
48
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
49
|
+
logging: this._options.logging,
|
|
50
|
+
});
|
|
51
|
+
if (_response.ok) {
|
|
52
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
53
|
+
}
|
|
54
|
+
if (_response.error.reason === "status-code") {
|
|
55
|
+
switch (_response.error.statusCode) {
|
|
56
|
+
case 401:
|
|
57
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
58
|
+
default:
|
|
59
|
+
throw new errors.FiveOneEatError({
|
|
60
|
+
statusCode: _response.error.statusCode,
|
|
61
|
+
body: _response.error.body,
|
|
62
|
+
rawResponse: _response.rawResponse,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/editorials");
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Returns a published editorial by slug, with the full augmented body
|
|
71
|
+
* including resolved menu item, product, and event references.
|
|
72
|
+
*
|
|
73
|
+
* @param {FiveOneEat.GetEditorialRequest} request
|
|
74
|
+
* @param {EditorialsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* await client.editorials.getEditorial({
|
|
80
|
+
* slug: "slug"
|
|
81
|
+
* })
|
|
82
|
+
*/
|
|
83
|
+
getEditorial(request, requestOptions) {
|
|
84
|
+
return core.HttpResponsePromise.fromPromise(this.__getEditorial(request, requestOptions));
|
|
85
|
+
}
|
|
86
|
+
__getEditorial(request, requestOptions) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
89
|
+
const { slug } = request;
|
|
90
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
91
|
+
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);
|
|
92
|
+
const _response = yield core.fetcher({
|
|
93
|
+
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)}`),
|
|
94
|
+
method: "GET",
|
|
95
|
+
headers: _headers,
|
|
96
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
97
|
+
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,
|
|
98
|
+
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,
|
|
99
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
100
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
101
|
+
logging: this._options.logging,
|
|
102
|
+
});
|
|
103
|
+
if (_response.ok) {
|
|
104
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
105
|
+
}
|
|
106
|
+
if (_response.error.reason === "status-code") {
|
|
107
|
+
switch (_response.error.statusCode) {
|
|
108
|
+
case 401:
|
|
109
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
110
|
+
default:
|
|
111
|
+
throw new errors.FiveOneEatError({
|
|
112
|
+
statusCode: _response.error.statusCode,
|
|
113
|
+
body: _response.error.body,
|
|
114
|
+
rawResponse: _response.rawResponse,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/editorials/{slug}");
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { GetEditorialRequest } from "./GetEditorialRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -15,6 +15,9 @@ export * from "./customerMessaging/types/index.mjs";
|
|
|
15
15
|
export * from "./discovery/client/requests/index.mjs";
|
|
16
16
|
export * as discovery from "./discovery/index.mjs";
|
|
17
17
|
export * from "./discovery/types/index.mjs";
|
|
18
|
+
export * from "./editorials/client/requests/index.mjs";
|
|
19
|
+
export * as editorials from "./editorials/index.mjs";
|
|
20
|
+
export * from "./editorials/types/index.mjs";
|
|
18
21
|
export * from "./events/client/requests/index.mjs";
|
|
19
22
|
export * as events from "./events/index.mjs";
|
|
20
23
|
export * from "./events/types/index.mjs";
|
|
@@ -15,6 +15,9 @@ export * from "./customerMessaging/types/index.mjs";
|
|
|
15
15
|
export * from "./discovery/client/requests/index.mjs";
|
|
16
16
|
export * as discovery from "./discovery/index.mjs";
|
|
17
17
|
export * from "./discovery/types/index.mjs";
|
|
18
|
+
export * from "./editorials/client/requests/index.mjs";
|
|
19
|
+
export * as editorials from "./editorials/index.mjs";
|
|
20
|
+
export * from "./editorials/types/index.mjs";
|
|
18
21
|
export * from "./events/client/requests/index.mjs";
|
|
19
22
|
export * as events from "./events/index.mjs";
|
|
20
23
|
export * from "./events/types/index.mjs";
|
|
@@ -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 @@
|
|
|
1
|
+
export type BardHardBreakNode = {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
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,10 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
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 @@
|
|
|
1
|
+
export type BardHorizontalRuleNode = {};
|
|
@@ -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,11 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
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,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
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var BardMark;
|
|
3
|
+
(function (BardMark) {
|
|
4
|
+
/** The mark type. */
|
|
5
|
+
BardMark.Type = {
|
|
6
|
+
Bold: "bold",
|
|
7
|
+
Italic: "italic",
|
|
8
|
+
Underline: "underline",
|
|
9
|
+
Link: "link",
|
|
10
|
+
Anchor: "anchor",
|
|
11
|
+
Small: "small",
|
|
12
|
+
Subscript: "subscript",
|
|
13
|
+
Superscript: "superscript",
|
|
14
|
+
};
|
|
15
|
+
})(BardMark || (BardMark = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BardMenuItemSetValues {
|
|
2
|
+
caption: string | null;
|
|
3
|
+
item: BardMenuItemSetValues.Item | null;
|
|
4
|
+
}
|
|
5
|
+
export declare namespace BardMenuItemSetValues {
|
|
6
|
+
interface Item {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: (string | null) | undefined;
|
|
10
|
+
price?: (string | null) | undefined;
|
|
11
|
+
image?: (string | null) | undefined;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
2
|
+
export type BardNode = FiveOneEat.BardNode.Paragraph | FiveOneEat.BardNode.Heading | FiveOneEat.BardNode.Image | FiveOneEat.BardNode.HardBreak | FiveOneEat.BardNode.HorizontalRule | FiveOneEat.BardNode.BulletList | FiveOneEat.BardNode.OrderedList | FiveOneEat.BardNode.Blockquote | FiveOneEat.BardNode.Set;
|
|
3
|
+
export declare namespace BardNode {
|
|
4
|
+
interface Paragraph extends FiveOneEat.BardParagraphNode {
|
|
5
|
+
type: "paragraph";
|
|
6
|
+
}
|
|
7
|
+
interface Heading extends FiveOneEat.BardHeadingNode {
|
|
8
|
+
type: "heading";
|
|
9
|
+
}
|
|
10
|
+
interface Image extends FiveOneEat.BardImageNode {
|
|
11
|
+
type: "image";
|
|
12
|
+
}
|
|
13
|
+
interface HardBreak extends FiveOneEat.BardHardBreakNode {
|
|
14
|
+
type: "hardBreak";
|
|
15
|
+
}
|
|
16
|
+
interface HorizontalRule extends FiveOneEat.BardHorizontalRuleNode {
|
|
17
|
+
type: "horizontalRule";
|
|
18
|
+
}
|
|
19
|
+
interface BulletList extends FiveOneEat.BardBulletListNode {
|
|
20
|
+
type: "bulletList";
|
|
21
|
+
}
|
|
22
|
+
interface OrderedList extends FiveOneEat.BardOrderedListNode {
|
|
23
|
+
type: "orderedList";
|
|
24
|
+
}
|
|
25
|
+
interface Blockquote extends FiveOneEat.BardBlockquoteNode {
|
|
26
|
+
type: "blockquote";
|
|
27
|
+
}
|
|
28
|
+
interface Set extends FiveOneEat.BardSetNode {
|
|
29
|
+
type: "set";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
2
|
+
export interface BardParagraphNode {
|
|
3
|
+
type: BardParagraphNode.Type;
|
|
4
|
+
content?: FiveOneEat.BardParagraphNodeContentItem[] | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare namespace BardParagraphNode {
|
|
7
|
+
const Type: {
|
|
8
|
+
readonly Paragraph: "paragraph";
|
|
9
|
+
};
|
|
10
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
2
|
+
export type BardParagraphNodeContentItem = FiveOneEat.BardParagraphNodeContentItem.Text | FiveOneEat.BardParagraphNodeContentItem.HardBreak;
|
|
3
|
+
export declare namespace BardParagraphNodeContentItem {
|
|
4
|
+
interface Text extends FiveOneEat.BardTextNode {
|
|
5
|
+
type: "text";
|
|
6
|
+
}
|
|
7
|
+
interface HardBreak extends FiveOneEat.BardHardBreakNode {
|
|
8
|
+
type: "hardBreak";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BardProductSetValues {
|
|
2
|
+
caption: string | null;
|
|
3
|
+
item: BardProductSetValues.Item | null;
|
|
4
|
+
}
|
|
5
|
+
export declare namespace BardProductSetValues {
|
|
6
|
+
interface Item {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: (string | null) | undefined;
|
|
10
|
+
price?: (number | null) | undefined;
|
|
11
|
+
image?: (string | null) | undefined;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
2
|
+
export interface BardSetNode {
|
|
3
|
+
attrs: BardSetNode.Attrs;
|
|
4
|
+
}
|
|
5
|
+
export declare namespace BardSetNode {
|
|
6
|
+
interface Attrs {
|
|
7
|
+
/** Bard set row identifier. */
|
|
8
|
+
id: string;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
values: FiveOneEat.BardSetValues;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../index.mjs";
|
|
2
|
+
export type BardSetValues = FiveOneEat.BardSetValues.MenuItem | FiveOneEat.BardSetValues.Product | FiveOneEat.BardSetValues.Event;
|
|
3
|
+
export declare namespace BardSetValues {
|
|
4
|
+
interface MenuItem extends FiveOneEat.BardMenuItemSetValues {
|
|
5
|
+
type: "menu_item";
|
|
6
|
+
}
|
|
7
|
+
interface Product extends FiveOneEat.BardProductSetValues {
|
|
8
|
+
type: "product";
|
|
9
|
+
}
|
|
10
|
+
interface Event extends FiveOneEat.BardEventSetValues {
|
|
11
|
+
type: "event";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -12,6 +12,7 @@ export interface DiscoveryBusinessResource {
|
|
|
12
12
|
latest_bulletin: DiscoveryBusinessResource.LatestBulletin | null;
|
|
13
13
|
badges: DiscoveryBusinessResource.Badges;
|
|
14
14
|
created_at: string;
|
|
15
|
+
editorial?: (DiscoveryBusinessResource.Editorial | null) | undefined;
|
|
15
16
|
}
|
|
16
17
|
export declare namespace DiscoveryBusinessResource {
|
|
17
18
|
interface Location {
|
|
@@ -35,4 +36,9 @@ export declare namespace DiscoveryBusinessResource {
|
|
|
35
36
|
founding_partner: boolean;
|
|
36
37
|
staff_pick: boolean;
|
|
37
38
|
}
|
|
39
|
+
interface Editorial {
|
|
40
|
+
slug: string;
|
|
41
|
+
title: string;
|
|
42
|
+
excerpt: string | null;
|
|
43
|
+
}
|
|
38
44
|
}
|