@contentful/experience-delivery 1.0.0-dev.6 → 1.0.0-dev.7
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.d.ts +4 -0
- package/dist/cjs/BaseClient.js +4 -2
- package/dist/cjs/api/resources/component/client/Client.js +8 -6
- package/dist/cjs/api/resources/experience/client/Client.js +16 -12
- package/dist/cjs/api/resources/experienceFragment/client/Client.js +8 -6
- package/dist/cjs/api/resources/fragment/client/Client.js +8 -6
- package/dist/cjs/api/resources/release/resources/experience/client/Client.js +8 -6
- package/dist/cjs/api/resources/release/resources/fragment/client/Client.js +8 -6
- package/dist/cjs/api/resources/template/client/Client.js +8 -6
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +4 -0
- package/dist/esm/BaseClient.mjs +4 -2
- package/dist/esm/api/resources/component/client/Client.mjs +9 -7
- package/dist/esm/api/resources/experience/client/Client.mjs +17 -13
- package/dist/esm/api/resources/experienceFragment/client/Client.mjs +9 -7
- package/dist/esm/api/resources/fragment/client/Client.mjs +9 -7
- package/dist/esm/api/resources/release/resources/experience/client/Client.mjs +9 -7
- package/dist/esm/api/resources/release/resources/fragment/client/Client.mjs +9 -7
- package/dist/esm/api/resources/template/client/Client.mjs +9 -7
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/BaseClient.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export type BaseClientOptions = {
|
|
|
6
6
|
environment?: core.Supplier<environments.ContentfulViewDeliveryEnvironment | string>;
|
|
7
7
|
/** Specify a custom URL to connect the client to. */
|
|
8
8
|
baseUrl?: core.Supplier<string>;
|
|
9
|
+
/** Override the x-contentful-enable-alpha-feature header */
|
|
10
|
+
xContentfulEnableAlphaFeature?: "new-exo-entity-types";
|
|
9
11
|
/** Additional headers to include in requests. */
|
|
10
12
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
11
13
|
/** The default maximum time to wait for a response in seconds. */
|
|
@@ -26,6 +28,8 @@ export interface BaseRequestOptions {
|
|
|
26
28
|
maxRetries?: number;
|
|
27
29
|
/** A hook to abort the request. */
|
|
28
30
|
abortSignal?: AbortSignal;
|
|
31
|
+
/** Override the x-contentful-enable-alpha-feature header */
|
|
32
|
+
xContentfulEnableAlphaFeature?: "new-exo-entity-types";
|
|
29
33
|
/** Additional query string parameters to include in the request. */
|
|
30
34
|
queryParams?: Record<string, unknown>;
|
|
31
35
|
/** Additional headers to include in the request. */
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -40,13 +40,15 @@ const BearerAuthProvider_js_1 = require("./auth/BearerAuthProvider.js");
|
|
|
40
40
|
const headers_js_1 = require("./core/headers.js");
|
|
41
41
|
const core = __importStar(require("./core/index.js"));
|
|
42
42
|
function normalizeClientOptions(options) {
|
|
43
|
+
var _a;
|
|
43
44
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
45
|
"X-Fern-Language": "JavaScript",
|
|
45
46
|
"X-Fern-SDK-Name": "@contentful/experience-delivery",
|
|
46
|
-
"X-Fern-SDK-Version": "0.0.0-fern-placeholder.
|
|
47
|
-
"User-Agent": "@contentful/experience-delivery/0.0.0-fern-placeholder.
|
|
47
|
+
"X-Fern-SDK-Version": "0.0.0-fern-placeholder.6",
|
|
48
|
+
"User-Agent": "@contentful/experience-delivery/0.0.0-fern-placeholder.6",
|
|
48
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
|
+
"x-contentful-enable-alpha-feature": (_a = options === null || options === void 0 ? void 0 : options.xContentfulEnableAlphaFeature) !== null && _a !== void 0 ? _a : "new-exo-entity-types",
|
|
50
52
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
51
53
|
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
52
54
|
}
|
|
@@ -85,7 +85,7 @@ class ComponentClient {
|
|
|
85
85
|
}
|
|
86
86
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
87
87
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
88
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
88
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
89
89
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
90
90
|
const _queryParams = {
|
|
91
91
|
preview,
|
|
@@ -95,9 +95,11 @@ class ComponentClient {
|
|
|
95
95
|
variant,
|
|
96
96
|
};
|
|
97
97
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
98
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
98
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
99
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
100
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
99
101
|
const _response = yield core.fetcher({
|
|
100
|
-
url: core.url.join((
|
|
102
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/components/${core.url.encodePathParam(id)}`),
|
|
101
103
|
method: "GET",
|
|
102
104
|
headers: _headers,
|
|
103
105
|
queryString: core.url
|
|
@@ -105,10 +107,10 @@ class ComponentClient {
|
|
|
105
107
|
.addMany(_queryParams)
|
|
106
108
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
107
109
|
.build(),
|
|
108
|
-
timeoutMs: ((
|
|
109
|
-
maxRetries: (
|
|
110
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
111
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
110
112
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
-
fetchFn: (
|
|
113
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
112
114
|
logging: this._options.logging,
|
|
113
115
|
});
|
|
114
116
|
if (_response.ok) {
|
|
@@ -99,7 +99,7 @@ class ExperienceClient {
|
|
|
99
99
|
}
|
|
100
100
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
101
101
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
102
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
102
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
103
103
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
104
104
|
const _queryParams = {
|
|
105
105
|
preview,
|
|
@@ -109,9 +109,11 @@ class ExperienceClient {
|
|
|
109
109
|
variant,
|
|
110
110
|
};
|
|
111
111
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
112
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
112
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
113
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
114
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
113
115
|
const _response = yield core.fetcher({
|
|
114
|
-
url: core.url.join((
|
|
116
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/experiences/${core.url.encodePathParam(id)}`),
|
|
115
117
|
method: "GET",
|
|
116
118
|
headers: _headers,
|
|
117
119
|
queryString: core.url
|
|
@@ -119,10 +121,10 @@ class ExperienceClient {
|
|
|
119
121
|
.addMany(_queryParams)
|
|
120
122
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
121
123
|
.build(),
|
|
122
|
-
timeoutMs: ((
|
|
123
|
-
maxRetries: (
|
|
124
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
125
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
124
126
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
125
|
-
fetchFn: (
|
|
127
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
126
128
|
logging: this._options.logging,
|
|
127
129
|
});
|
|
128
130
|
if (_response.ok) {
|
|
@@ -193,7 +195,7 @@ class ExperienceClient {
|
|
|
193
195
|
}
|
|
194
196
|
__getWithOverrides(spaceId_1, environmentId_1, id_1) {
|
|
195
197
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
196
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
198
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
197
199
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request, _body = __rest(request, ["preview", "accessToken", "optimizationProfileId", "locale", "variant"]);
|
|
198
200
|
const _queryParams = {
|
|
199
201
|
preview,
|
|
@@ -203,9 +205,11 @@ class ExperienceClient {
|
|
|
203
205
|
variant,
|
|
204
206
|
};
|
|
205
207
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
206
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
208
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
209
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
210
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
207
211
|
const _response = yield core.fetcher({
|
|
208
|
-
url: core.url.join((
|
|
212
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/experiences/${core.url.encodePathParam(id)}`),
|
|
209
213
|
method: "POST",
|
|
210
214
|
headers: _headers,
|
|
211
215
|
contentType: "application/json",
|
|
@@ -221,10 +225,10 @@ class ExperienceClient {
|
|
|
221
225
|
allowUnrecognizedEnumValues: true,
|
|
222
226
|
omitUndefined: true,
|
|
223
227
|
}),
|
|
224
|
-
timeoutMs: ((
|
|
225
|
-
maxRetries: (
|
|
228
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
229
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
226
230
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
227
|
-
fetchFn: (
|
|
231
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
228
232
|
logging: this._options.logging,
|
|
229
233
|
});
|
|
230
234
|
if (_response.ok) {
|
|
@@ -85,7 +85,7 @@ class ExperienceFragmentClient {
|
|
|
85
85
|
}
|
|
86
86
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
87
87
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
88
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
88
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
89
89
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
90
90
|
const _queryParams = {
|
|
91
91
|
preview,
|
|
@@ -95,9 +95,11 @@ class ExperienceFragmentClient {
|
|
|
95
95
|
variant,
|
|
96
96
|
};
|
|
97
97
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
98
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
98
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
99
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
100
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
99
101
|
const _response = yield core.fetcher({
|
|
100
|
-
url: core.url.join((
|
|
102
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/experience_fragments/${core.url.encodePathParam(id)}`),
|
|
101
103
|
method: "GET",
|
|
102
104
|
headers: _headers,
|
|
103
105
|
queryString: core.url
|
|
@@ -105,10 +107,10 @@ class ExperienceFragmentClient {
|
|
|
105
107
|
.addMany(_queryParams)
|
|
106
108
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
107
109
|
.build(),
|
|
108
|
-
timeoutMs: ((
|
|
109
|
-
maxRetries: (
|
|
110
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
111
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
110
112
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
-
fetchFn: (
|
|
113
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
112
114
|
logging: this._options.logging,
|
|
113
115
|
});
|
|
114
116
|
if (_response.ok) {
|
|
@@ -89,7 +89,7 @@ class FragmentClient {
|
|
|
89
89
|
}
|
|
90
90
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
91
91
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
92
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
92
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
93
93
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
94
94
|
const _queryParams = {
|
|
95
95
|
preview,
|
|
@@ -99,9 +99,11 @@ class FragmentClient {
|
|
|
99
99
|
variant,
|
|
100
100
|
};
|
|
101
101
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
102
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
102
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
103
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
104
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
103
105
|
const _response = yield core.fetcher({
|
|
104
|
-
url: core.url.join((
|
|
106
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/fragments/${core.url.encodePathParam(id)}`),
|
|
105
107
|
method: "GET",
|
|
106
108
|
headers: _headers,
|
|
107
109
|
queryString: core.url
|
|
@@ -109,10 +111,10 @@ class FragmentClient {
|
|
|
109
111
|
.addMany(_queryParams)
|
|
110
112
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
111
113
|
.build(),
|
|
112
|
-
timeoutMs: ((
|
|
113
|
-
maxRetries: (
|
|
114
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
115
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
114
116
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
115
|
-
fetchFn: (
|
|
117
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
116
118
|
logging: this._options.logging,
|
|
117
119
|
});
|
|
118
120
|
if (_response.ok) {
|
|
@@ -84,7 +84,7 @@ class ExperienceClient {
|
|
|
84
84
|
}
|
|
85
85
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
86
86
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
87
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
88
88
|
const { accessToken, releaseLte, timestampLte, locale } = request;
|
|
89
89
|
const _queryParams = {
|
|
90
90
|
access_token: accessToken,
|
|
@@ -93,9 +93,11 @@ class ExperienceClient {
|
|
|
93
93
|
locale,
|
|
94
94
|
};
|
|
95
95
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
96
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
96
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
97
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
98
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
97
99
|
const _response = yield core.fetcher({
|
|
98
|
-
url: core.url.join((
|
|
100
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/timeline/experiences/${core.url.encodePathParam(id)}`),
|
|
99
101
|
method: "GET",
|
|
100
102
|
headers: _headers,
|
|
101
103
|
queryString: core.url
|
|
@@ -103,10 +105,10 @@ class ExperienceClient {
|
|
|
103
105
|
.addMany(_queryParams)
|
|
104
106
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
105
107
|
.build(),
|
|
106
|
-
timeoutMs: ((
|
|
107
|
-
maxRetries: (
|
|
108
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
109
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
108
110
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
109
|
-
fetchFn: (
|
|
111
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
110
112
|
logging: this._options.logging,
|
|
111
113
|
});
|
|
112
114
|
if (_response.ok) {
|
|
@@ -84,7 +84,7 @@ class FragmentClient {
|
|
|
84
84
|
}
|
|
85
85
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
86
86
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
87
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
88
88
|
const { accessToken, releaseLte, timestampLte, locale } = request;
|
|
89
89
|
const _queryParams = {
|
|
90
90
|
access_token: accessToken,
|
|
@@ -93,9 +93,11 @@ class FragmentClient {
|
|
|
93
93
|
locale,
|
|
94
94
|
};
|
|
95
95
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
96
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
96
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
97
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
98
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
97
99
|
const _response = yield core.fetcher({
|
|
98
|
-
url: core.url.join((
|
|
100
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/timeline/fragments/${core.url.encodePathParam(id)}`),
|
|
99
101
|
method: "GET",
|
|
100
102
|
headers: _headers,
|
|
101
103
|
queryString: core.url
|
|
@@ -103,10 +105,10 @@ class FragmentClient {
|
|
|
103
105
|
.addMany(_queryParams)
|
|
104
106
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
105
107
|
.build(),
|
|
106
|
-
timeoutMs: ((
|
|
107
|
-
maxRetries: (
|
|
108
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
109
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
108
110
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
109
|
-
fetchFn: (
|
|
111
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
110
112
|
logging: this._options.logging,
|
|
111
113
|
});
|
|
112
114
|
if (_response.ok) {
|
|
@@ -85,7 +85,7 @@ class TemplateClient {
|
|
|
85
85
|
}
|
|
86
86
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
87
87
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
88
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
88
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
89
89
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
90
90
|
const _queryParams = {
|
|
91
91
|
preview,
|
|
@@ -95,9 +95,11 @@ class TemplateClient {
|
|
|
95
95
|
variant,
|
|
96
96
|
};
|
|
97
97
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
98
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
98
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
99
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
100
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
99
101
|
const _response = yield core.fetcher({
|
|
100
|
-
url: core.url.join((
|
|
102
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/experience_templates/${core.url.encodePathParam(id)}`),
|
|
101
103
|
method: "GET",
|
|
102
104
|
headers: _headers,
|
|
103
105
|
queryString: core.url
|
|
@@ -105,10 +107,10 @@ class TemplateClient {
|
|
|
105
107
|
.addMany(_queryParams)
|
|
106
108
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
107
109
|
.build(),
|
|
108
|
-
timeoutMs: ((
|
|
109
|
-
maxRetries: (
|
|
110
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
111
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
110
112
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
-
fetchFn: (
|
|
113
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
112
114
|
logging: this._options.logging,
|
|
113
115
|
});
|
|
114
116
|
if (_response.ok) {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.0-fern-placeholder.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.0-fern-placeholder.6";
|
package/dist/cjs/version.js
CHANGED
|
@@ -6,6 +6,8 @@ export type BaseClientOptions = {
|
|
|
6
6
|
environment?: core.Supplier<environments.ContentfulViewDeliveryEnvironment | string>;
|
|
7
7
|
/** Specify a custom URL to connect the client to. */
|
|
8
8
|
baseUrl?: core.Supplier<string>;
|
|
9
|
+
/** Override the x-contentful-enable-alpha-feature header */
|
|
10
|
+
xContentfulEnableAlphaFeature?: "new-exo-entity-types";
|
|
9
11
|
/** Additional headers to include in requests. */
|
|
10
12
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
11
13
|
/** The default maximum time to wait for a response in seconds. */
|
|
@@ -26,6 +28,8 @@ export interface BaseRequestOptions {
|
|
|
26
28
|
maxRetries?: number;
|
|
27
29
|
/** A hook to abort the request. */
|
|
28
30
|
abortSignal?: AbortSignal;
|
|
31
|
+
/** Override the x-contentful-enable-alpha-feature header */
|
|
32
|
+
xContentfulEnableAlphaFeature?: "new-exo-entity-types";
|
|
29
33
|
/** Additional query string parameters to include in the request. */
|
|
30
34
|
queryParams?: Record<string, unknown>;
|
|
31
35
|
/** Additional headers to include in the request. */
|
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -3,13 +3,15 @@ import { BearerAuthProvider } from "./auth/BearerAuthProvider.mjs";
|
|
|
3
3
|
import { mergeHeaders } from "./core/headers.mjs";
|
|
4
4
|
import * as core from "./core/index.mjs";
|
|
5
5
|
export function normalizeClientOptions(options) {
|
|
6
|
+
var _a;
|
|
6
7
|
const headers = mergeHeaders({
|
|
7
8
|
"X-Fern-Language": "JavaScript",
|
|
8
9
|
"X-Fern-SDK-Name": "@contentful/experience-delivery",
|
|
9
|
-
"X-Fern-SDK-Version": "0.0.0-fern-placeholder.
|
|
10
|
-
"User-Agent": "@contentful/experience-delivery/0.0.0-fern-placeholder.
|
|
10
|
+
"X-Fern-SDK-Version": "0.0.0-fern-placeholder.6",
|
|
11
|
+
"User-Agent": "@contentful/experience-delivery/0.0.0-fern-placeholder.6",
|
|
11
12
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
13
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
14
|
+
"x-contentful-enable-alpha-feature": (_a = options === null || options === void 0 ? void 0 : options.xContentfulEnableAlphaFeature) !== null && _a !== void 0 ? _a : "new-exo-entity-types",
|
|
13
15
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
14
16
|
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
15
17
|
}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -49,7 +49,7 @@ export class ComponentClient {
|
|
|
49
49
|
}
|
|
50
50
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
51
51
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
53
53
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
54
54
|
const _queryParams = {
|
|
55
55
|
preview,
|
|
@@ -59,9 +59,11 @@ export class ComponentClient {
|
|
|
59
59
|
variant,
|
|
60
60
|
};
|
|
61
61
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
62
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
62
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
63
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
64
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
63
65
|
const _response = yield core.fetcher({
|
|
64
|
-
url: core.url.join((
|
|
66
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/components/${core.url.encodePathParam(id)}`),
|
|
65
67
|
method: "GET",
|
|
66
68
|
headers: _headers,
|
|
67
69
|
queryString: core.url
|
|
@@ -69,10 +71,10 @@ export class ComponentClient {
|
|
|
69
71
|
.addMany(_queryParams)
|
|
70
72
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
71
73
|
.build(),
|
|
72
|
-
timeoutMs: ((
|
|
73
|
-
maxRetries: (
|
|
74
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
75
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
74
76
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
75
|
-
fetchFn: (
|
|
77
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
76
78
|
logging: this._options.logging,
|
|
77
79
|
});
|
|
78
80
|
if (_response.ok) {
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
23
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
23
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
24
24
|
import * as core from "../../../../core/index.mjs";
|
|
25
25
|
import * as environments from "../../../../environments.mjs";
|
|
26
26
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -63,7 +63,7 @@ export class ExperienceClient {
|
|
|
63
63
|
}
|
|
64
64
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
65
65
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
66
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
66
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
67
67
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
68
68
|
const _queryParams = {
|
|
69
69
|
preview,
|
|
@@ -73,9 +73,11 @@ export class ExperienceClient {
|
|
|
73
73
|
variant,
|
|
74
74
|
};
|
|
75
75
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
76
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
76
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
77
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
78
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
77
79
|
const _response = yield core.fetcher({
|
|
78
|
-
url: core.url.join((
|
|
80
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/experiences/${core.url.encodePathParam(id)}`),
|
|
79
81
|
method: "GET",
|
|
80
82
|
headers: _headers,
|
|
81
83
|
queryString: core.url
|
|
@@ -83,10 +85,10 @@ export class ExperienceClient {
|
|
|
83
85
|
.addMany(_queryParams)
|
|
84
86
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
85
87
|
.build(),
|
|
86
|
-
timeoutMs: ((
|
|
87
|
-
maxRetries: (
|
|
88
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
89
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
88
90
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
89
|
-
fetchFn: (
|
|
91
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
90
92
|
logging: this._options.logging,
|
|
91
93
|
});
|
|
92
94
|
if (_response.ok) {
|
|
@@ -157,7 +159,7 @@ export class ExperienceClient {
|
|
|
157
159
|
}
|
|
158
160
|
__getWithOverrides(spaceId_1, environmentId_1, id_1) {
|
|
159
161
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
160
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
162
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
161
163
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request, _body = __rest(request, ["preview", "accessToken", "optimizationProfileId", "locale", "variant"]);
|
|
162
164
|
const _queryParams = {
|
|
163
165
|
preview,
|
|
@@ -167,9 +169,11 @@ export class ExperienceClient {
|
|
|
167
169
|
variant,
|
|
168
170
|
};
|
|
169
171
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
170
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
172
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
173
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
174
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
171
175
|
const _response = yield core.fetcher({
|
|
172
|
-
url: core.url.join((
|
|
176
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/experiences/${core.url.encodePathParam(id)}`),
|
|
173
177
|
method: "POST",
|
|
174
178
|
headers: _headers,
|
|
175
179
|
contentType: "application/json",
|
|
@@ -185,10 +189,10 @@ export class ExperienceClient {
|
|
|
185
189
|
allowUnrecognizedEnumValues: true,
|
|
186
190
|
omitUndefined: true,
|
|
187
191
|
}),
|
|
188
|
-
timeoutMs: ((
|
|
189
|
-
maxRetries: (
|
|
192
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
193
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
190
194
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
191
|
-
fetchFn: (
|
|
195
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
192
196
|
logging: this._options.logging,
|
|
193
197
|
});
|
|
194
198
|
if (_response.ok) {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -49,7 +49,7 @@ export class ExperienceFragmentClient {
|
|
|
49
49
|
}
|
|
50
50
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
51
51
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
53
53
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
54
54
|
const _queryParams = {
|
|
55
55
|
preview,
|
|
@@ -59,9 +59,11 @@ export class ExperienceFragmentClient {
|
|
|
59
59
|
variant,
|
|
60
60
|
};
|
|
61
61
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
62
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
62
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
63
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
64
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
63
65
|
const _response = yield core.fetcher({
|
|
64
|
-
url: core.url.join((
|
|
66
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/experience_fragments/${core.url.encodePathParam(id)}`),
|
|
65
67
|
method: "GET",
|
|
66
68
|
headers: _headers,
|
|
67
69
|
queryString: core.url
|
|
@@ -69,10 +71,10 @@ export class ExperienceFragmentClient {
|
|
|
69
71
|
.addMany(_queryParams)
|
|
70
72
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
71
73
|
.build(),
|
|
72
|
-
timeoutMs: ((
|
|
73
|
-
maxRetries: (
|
|
74
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
75
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
74
76
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
75
|
-
fetchFn: (
|
|
77
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
76
78
|
logging: this._options.logging,
|
|
77
79
|
});
|
|
78
80
|
if (_response.ok) {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -53,7 +53,7 @@ export class FragmentClient {
|
|
|
53
53
|
}
|
|
54
54
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
55
55
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
56
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
56
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
57
57
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
58
58
|
const _queryParams = {
|
|
59
59
|
preview,
|
|
@@ -63,9 +63,11 @@ export class FragmentClient {
|
|
|
63
63
|
variant,
|
|
64
64
|
};
|
|
65
65
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
66
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
66
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
67
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
68
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
67
69
|
const _response = yield core.fetcher({
|
|
68
|
-
url: core.url.join((
|
|
70
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/fragments/${core.url.encodePathParam(id)}`),
|
|
69
71
|
method: "GET",
|
|
70
72
|
headers: _headers,
|
|
71
73
|
queryString: core.url
|
|
@@ -73,10 +75,10 @@ export class FragmentClient {
|
|
|
73
75
|
.addMany(_queryParams)
|
|
74
76
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
75
77
|
.build(),
|
|
76
|
-
timeoutMs: ((
|
|
77
|
-
maxRetries: (
|
|
78
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
79
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
78
80
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
79
|
-
fetchFn: (
|
|
81
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
80
82
|
logging: this._options.logging,
|
|
81
83
|
});
|
|
82
84
|
if (_response.ok) {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -48,7 +48,7 @@ export class ExperienceClient {
|
|
|
48
48
|
}
|
|
49
49
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
50
50
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
52
52
|
const { accessToken, releaseLte, timestampLte, locale } = request;
|
|
53
53
|
const _queryParams = {
|
|
54
54
|
access_token: accessToken,
|
|
@@ -57,9 +57,11 @@ export class ExperienceClient {
|
|
|
57
57
|
locale,
|
|
58
58
|
};
|
|
59
59
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
60
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
60
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
61
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
62
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
61
63
|
const _response = yield core.fetcher({
|
|
62
|
-
url: core.url.join((
|
|
64
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/timeline/experiences/${core.url.encodePathParam(id)}`),
|
|
63
65
|
method: "GET",
|
|
64
66
|
headers: _headers,
|
|
65
67
|
queryString: core.url
|
|
@@ -67,10 +69,10 @@ export class ExperienceClient {
|
|
|
67
69
|
.addMany(_queryParams)
|
|
68
70
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
69
71
|
.build(),
|
|
70
|
-
timeoutMs: ((
|
|
71
|
-
maxRetries: (
|
|
72
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
73
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
72
74
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
73
|
-
fetchFn: (
|
|
75
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
74
76
|
logging: this._options.logging,
|
|
75
77
|
});
|
|
76
78
|
if (_response.ok) {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -48,7 +48,7 @@ export class FragmentClient {
|
|
|
48
48
|
}
|
|
49
49
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
50
50
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
52
52
|
const { accessToken, releaseLte, timestampLte, locale } = request;
|
|
53
53
|
const _queryParams = {
|
|
54
54
|
access_token: accessToken,
|
|
@@ -57,9 +57,11 @@ export class FragmentClient {
|
|
|
57
57
|
locale,
|
|
58
58
|
};
|
|
59
59
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
60
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
60
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
61
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
62
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
61
63
|
const _response = yield core.fetcher({
|
|
62
|
-
url: core.url.join((
|
|
64
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/timeline/fragments/${core.url.encodePathParam(id)}`),
|
|
63
65
|
method: "GET",
|
|
64
66
|
headers: _headers,
|
|
65
67
|
queryString: core.url
|
|
@@ -67,10 +69,10 @@ export class FragmentClient {
|
|
|
67
69
|
.addMany(_queryParams)
|
|
68
70
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
69
71
|
.build(),
|
|
70
|
-
timeoutMs: ((
|
|
71
|
-
maxRetries: (
|
|
72
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
73
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
72
74
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
73
|
-
fetchFn: (
|
|
75
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
74
76
|
logging: this._options.logging,
|
|
75
77
|
});
|
|
76
78
|
if (_response.ok) {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -49,7 +49,7 @@ export class TemplateClient {
|
|
|
49
49
|
}
|
|
50
50
|
__get(spaceId_1, environmentId_1, id_1) {
|
|
51
51
|
return __awaiter(this, arguments, void 0, function* (spaceId, environmentId, id, request = {}, requestOptions) {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
53
53
|
const { preview, accessToken, optimizationProfileId, locale, variant } = request;
|
|
54
54
|
const _queryParams = {
|
|
55
55
|
preview,
|
|
@@ -59,9 +59,11 @@ export class TemplateClient {
|
|
|
59
59
|
variant,
|
|
60
60
|
};
|
|
61
61
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
62
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
62
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
63
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
64
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
63
65
|
const _response = yield core.fetcher({
|
|
64
|
-
url: core.url.join((
|
|
66
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/environments/${core.url.encodePathParam(environmentId)}/experience_templates/${core.url.encodePathParam(id)}`),
|
|
65
67
|
method: "GET",
|
|
66
68
|
headers: _headers,
|
|
67
69
|
queryString: core.url
|
|
@@ -69,10 +71,10 @@ export class TemplateClient {
|
|
|
69
71
|
.addMany(_queryParams)
|
|
70
72
|
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
71
73
|
.build(),
|
|
72
|
-
timeoutMs: ((
|
|
73
|
-
maxRetries: (
|
|
74
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
75
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
74
76
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
75
|
-
fetchFn: (
|
|
77
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
76
78
|
logging: this._options.logging,
|
|
77
79
|
});
|
|
78
80
|
if (_response.ok) {
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.0-fern-placeholder.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.0-fern-placeholder.6";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.0-fern-placeholder.
|
|
1
|
+
export const SDK_VERSION = "0.0.0-fern-placeholder.6";
|