@relyio/sdk 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +88 -0
- package/dist/chunk-3DRDHXLY.js +680 -0
- package/dist/{chunk-PO7CUR5U.cjs → chunk-3MSFWXQL.cjs} +37 -65
- package/dist/{chunk-4HTIU5YE.cjs → chunk-DXCVO6M5.cjs} +46 -59
- package/dist/chunk-FI5VIF4M.cjs +686 -0
- package/dist/{chunk-7GLDVHIH.js → chunk-FRJEUAAF.js} +46 -59
- package/dist/{chunk-2TIJLV2X.js → chunk-POEEDYFM.js} +38 -65
- package/dist/client/index.cjs +3 -3
- package/dist/client/index.d.cts +5 -4
- package/dist/client/index.d.ts +5 -4
- package/dist/client/index.js +1 -1
- package/dist/{define-schema-CVi8nwc7.d.ts → define-schema-DgctHlI2.d.cts} +35 -220
- package/dist/{define-schema-DqpipEHv.d.cts → define-schema-mrEZbY1h.d.ts} +35 -220
- package/dist/{define-content-type-ENAod5Ve.d.cts → include-paths-CL4gHv6I.d.cts} +1673 -734
- package/dist/{define-content-type-ENAod5Ve.d.ts → include-paths-CrJNTsMl.d.ts} +1673 -734
- package/dist/{index-C73cK2Tt.d.ts → index-B9RfZVF1.d.ts} +3 -2
- package/dist/{index-MLAFUuco.d.cts → index-BrvEg6-A.d.cts} +107 -46
- package/dist/{index-BKEAYvvz.d.ts → index-Pw0onkJe.d.ts} +107 -46
- package/dist/{index-BM42r4yg.d.cts → index-b-AkfTUv.d.cts} +3 -2
- package/dist/index.cjs +102 -85
- package/dist/index.d.cts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +4 -3
- package/dist/rich-text/index.cjs +29 -0
- package/dist/rich-text/index.d.cts +148 -0
- package/dist/rich-text/index.d.ts +148 -0
- package/dist/rich-text/index.js +4 -0
- package/dist/rich-text.d-rKmpgdGd.d.cts +200 -0
- package/dist/rich-text.d-rKmpgdGd.d.ts +200 -0
- package/dist/schema/index.cjs +34 -38
- package/dist/schema/index.d.cts +84 -37
- package/dist/schema/index.d.ts +84 -37
- package/dist/schema/index.js +1 -1
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.ts +3 -2
- package/package.json +8 -2
- package/dist/.tsbuildinfo +0 -1
|
@@ -1681,10 +1681,18 @@ var _ContentQueryBuilder = class _ContentQueryBuilder {
|
|
|
1681
1681
|
return this;
|
|
1682
1682
|
}
|
|
1683
1683
|
/**
|
|
1684
|
-
*
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1684
|
+
* Expand references into the entries they point at: one include path per element (REL-1801).
|
|
1685
|
+
* A path names fields through lists, page builders, objects and references —
|
|
1686
|
+
* `'sections.features'`, `'sections.customers.logo'` — and may pick the fields each entry returns,
|
|
1687
|
+
* `'sections.features(name,slug)'`. Each is checked against the schema: a path that holds no
|
|
1688
|
+
* reference does not compile, and the read's type follows the paths — an expanded reference is the
|
|
1689
|
+
* entry, every other one its id.
|
|
1690
|
+
*/
|
|
1691
|
+
include(paths) {
|
|
1692
|
+
this.queryOptions.include = [
|
|
1693
|
+
...this.queryOptions.include ?? [],
|
|
1694
|
+
...paths
|
|
1695
|
+
];
|
|
1688
1696
|
return this;
|
|
1689
1697
|
}
|
|
1690
1698
|
sort(fieldOrOptions, direction) {
|
|
@@ -2069,10 +2077,15 @@ var _ContentByIdBuilder = class _ContentByIdBuilder {
|
|
|
2069
2077
|
return this;
|
|
2070
2078
|
}
|
|
2071
2079
|
/**
|
|
2072
|
-
*
|
|
2080
|
+
* Expand references into the entries they point at: one include path per element (REL-1801).
|
|
2081
|
+
* A path names fields through lists, page builders, objects and references —
|
|
2082
|
+
* `'sections.features'`, `'sections.customers.logo'` — and may pick the fields each entry returns,
|
|
2083
|
+
* `'sections.features(name,slug)'`. Each is checked against the schema: a path that holds no
|
|
2084
|
+
* reference does not compile, and the read's type follows the paths — an expanded reference is the
|
|
2085
|
+
* entry, every other one its id. A second call adds to the first.
|
|
2073
2086
|
*/
|
|
2074
|
-
include(
|
|
2075
|
-
this.includeRelations =
|
|
2087
|
+
include(paths) {
|
|
2088
|
+
this.includeRelations = [...this.includeRelations ?? [], ...paths];
|
|
2076
2089
|
return this;
|
|
2077
2090
|
}
|
|
2078
2091
|
/**
|
|
@@ -2246,9 +2259,6 @@ var _ContentClient = class _ContentClient {
|
|
|
2246
2259
|
}
|
|
2247
2260
|
return builder.execute();
|
|
2248
2261
|
}
|
|
2249
|
-
/**
|
|
2250
|
-
* Fetch content with query options
|
|
2251
|
-
*/
|
|
2252
2262
|
async fetch(options) {
|
|
2253
2263
|
const builder = this.query();
|
|
2254
2264
|
if (options?.where) {
|
|
@@ -2264,7 +2274,7 @@ var _ContentClient = class _ContentClient {
|
|
|
2264
2274
|
builder.sort(options.sort);
|
|
2265
2275
|
}
|
|
2266
2276
|
if (options?.include) {
|
|
2267
|
-
builder.include(options.include);
|
|
2277
|
+
builder.include([...options.include]);
|
|
2268
2278
|
}
|
|
2269
2279
|
if (options?.locale != null && options.locale !== "") {
|
|
2270
2280
|
builder.locale(options.locale);
|
|
@@ -2277,16 +2287,10 @@ var _ContentClient = class _ContentClient {
|
|
|
2277
2287
|
}
|
|
2278
2288
|
return builder.execute();
|
|
2279
2289
|
}
|
|
2280
|
-
/**
|
|
2281
|
-
* Fetch a single content item by ID
|
|
2282
|
-
* @param id - Entry ID or slug
|
|
2283
|
-
* @param options - Fetch options (include, locale, and `headers` this one request adds — e.g.
|
|
2284
|
-
* `{ 'X-RelyIO-Dataset': 'staging' }` to read a dataset other than the client's)
|
|
2285
|
-
*/
|
|
2286
2290
|
async fetchOne(id, options) {
|
|
2287
2291
|
const builder = this.findById(id);
|
|
2288
2292
|
if (options?.include != null) {
|
|
2289
|
-
builder.include(options.include);
|
|
2293
|
+
builder.include([...options.include]);
|
|
2290
2294
|
}
|
|
2291
2295
|
if (options?.locale != null && options.locale !== "") {
|
|
2292
2296
|
builder.locale(options.locale);
|
|
@@ -2296,27 +2300,11 @@ var _ContentClient = class _ContentClient {
|
|
|
2296
2300
|
}
|
|
2297
2301
|
return builder.execute();
|
|
2298
2302
|
}
|
|
2299
|
-
/**
|
|
2300
|
-
* Fetch one entry **and the entity tag that read served**.
|
|
2301
|
-
*
|
|
2302
|
-
* This is the read half of a conditional write. `X-Entity-Tag` is minted from
|
|
2303
|
-
* `(entryUid, locale, localeVersion)` and is exactly what `If-Match` takes,
|
|
2304
|
-
* so a caller reads here, edits, and hands the same string back to `update`
|
|
2305
|
-
* — with nothing to assemble in between
|
|
2306
|
-
* (`INV-API-CONDITIONAL-WRITE-IS-REACHABLE`).
|
|
2307
|
-
*
|
|
2308
|
-
* `entityTag` is `undefined` when the response came from the cache: a cached
|
|
2309
|
-
* body cannot know the current version, and an absent tag beats a stale one
|
|
2310
|
-
* that would refuse the next write.
|
|
2311
|
-
*
|
|
2312
|
-
* Unlike {@link fetchOne}, a missing entry is not `null`: the service's
|
|
2313
|
-
* `RESOURCE_NOT_FOUND` is thrown as it arrived, with the `kind` that says
|
|
2314
|
-
* whether the entry, the content type or the schema was missing. `headers`
|
|
2315
|
-
* are the ones this read adds, as for `fetchOne`.
|
|
2316
|
-
*/
|
|
2317
2303
|
async fetchOneWithTag(id, options) {
|
|
2318
2304
|
const query = {};
|
|
2319
|
-
if (options?.include != null)
|
|
2305
|
+
if (options?.include != null) {
|
|
2306
|
+
query.include = options.include.join(",");
|
|
2307
|
+
}
|
|
2320
2308
|
const locale = options?.locale ?? this.clientLocale();
|
|
2321
2309
|
if (locale != null && locale !== "") query.locale = locale;
|
|
2322
2310
|
const response = await this.httpClient.send(
|
|
@@ -3179,10 +3167,9 @@ var _AssetClient = class _AssetClient {
|
|
|
3179
3167
|
this.clientLocale
|
|
3180
3168
|
);
|
|
3181
3169
|
}
|
|
3182
|
-
/** Fetch a single asset entry by id (or slug), or `null` if not found. */
|
|
3183
3170
|
async fetchOne(id, options) {
|
|
3184
3171
|
const builder = this.findById(id);
|
|
3185
|
-
if (options?.include != null) builder.include(options.include);
|
|
3172
|
+
if (options?.include != null) builder.include([...options.include]);
|
|
3186
3173
|
if (options?.locale != null && options.locale !== "") builder.locale(options.locale);
|
|
3187
3174
|
return builder.execute();
|
|
3188
3175
|
}
|
|
@@ -3285,11 +3272,15 @@ var _SingletonClient = class _SingletonClient {
|
|
|
3285
3272
|
this.clientLocale = readClientLocale(locale);
|
|
3286
3273
|
}
|
|
3287
3274
|
/**
|
|
3288
|
-
*
|
|
3289
|
-
*
|
|
3275
|
+
* Expand references into the entries they point at: one include path per element (REL-1801).
|
|
3276
|
+
* A path names fields through lists, objects and references — `'hero.media.image'`,
|
|
3277
|
+
* `'featured.author'` — and may pick the fields each entry returns, `'featured(title,slug)'`.
|
|
3278
|
+
* Each is checked against the schema: a path that holds no reference does not compile, and the
|
|
3279
|
+
* read's type follows the paths — an expanded reference is the entry, every other one its id. A
|
|
3280
|
+
* second call adds to the first.
|
|
3290
3281
|
*/
|
|
3291
|
-
include(
|
|
3292
|
-
this.includeFields =
|
|
3282
|
+
include(paths) {
|
|
3283
|
+
this.includeFields = [...this.includeFields ?? [], ...paths];
|
|
3293
3284
|
return this;
|
|
3294
3285
|
}
|
|
3295
3286
|
/**
|
|
@@ -3300,10 +3291,6 @@ var _SingletonClient = class _SingletonClient {
|
|
|
3300
3291
|
this.localeValue = locale;
|
|
3301
3292
|
return this;
|
|
3302
3293
|
}
|
|
3303
|
-
/**
|
|
3304
|
-
* Fetch the singleton content
|
|
3305
|
-
* @param options - Optional fetch options (alternative to fluent methods)
|
|
3306
|
-
*/
|
|
3307
3294
|
async fetch(options) {
|
|
3308
3295
|
try {
|
|
3309
3296
|
return (await this.fetchWithTag(options)).content;
|
|
@@ -3321,7 +3308,7 @@ var _SingletonClient = class _SingletonClient {
|
|
|
3321
3308
|
*/
|
|
3322
3309
|
async fetchWithTag(options) {
|
|
3323
3310
|
const query = {};
|
|
3324
|
-
const includeValue = options?.include
|
|
3311
|
+
const includeValue = this.includeFields === void 0 && options?.include === void 0 ? void 0 : [...this.includeFields ?? [], ...options?.include ?? []];
|
|
3325
3312
|
const localeValueFinal = options?.locale ?? this.localeValue ?? this.clientLocale();
|
|
3326
3313
|
if (includeValue) query.include = includeValue.join(",");
|
|
3327
3314
|
if (localeValueFinal != null && localeValueFinal !== "") query.locale = localeValueFinal;
|
|
@@ -3442,11 +3429,15 @@ var _SettingsClient = class _SettingsClient {
|
|
|
3442
3429
|
this.clientLocale = readClientLocale(locale);
|
|
3443
3430
|
}
|
|
3444
3431
|
/**
|
|
3445
|
-
*
|
|
3446
|
-
*
|
|
3432
|
+
* Expand references into the entries they point at: one include path per element (REL-1801).
|
|
3433
|
+
* A path names fields through lists, objects and references — `'hero.media.image'`,
|
|
3434
|
+
* `'featured.author'` — and may pick the fields each entry returns, `'featured(title,slug)'`.
|
|
3435
|
+
* Each is checked against the schema: a path that holds no reference does not compile, and the
|
|
3436
|
+
* read's type follows the paths — an expanded reference is the entry, every other one its id. A
|
|
3437
|
+
* second call adds to the first.
|
|
3447
3438
|
*/
|
|
3448
|
-
include(
|
|
3449
|
-
this.includeFields =
|
|
3439
|
+
include(paths) {
|
|
3440
|
+
this.includeFields = [...this.includeFields ?? [], ...paths];
|
|
3450
3441
|
return this;
|
|
3451
3442
|
}
|
|
3452
3443
|
/**
|
|
@@ -3457,10 +3448,6 @@ var _SettingsClient = class _SettingsClient {
|
|
|
3457
3448
|
this.localeValue = locale;
|
|
3458
3449
|
return this;
|
|
3459
3450
|
}
|
|
3460
|
-
/**
|
|
3461
|
-
* Fetch the settings group
|
|
3462
|
-
* @param options - Optional fetch options (alternative to fluent methods)
|
|
3463
|
-
*/
|
|
3464
3451
|
async fetch(options) {
|
|
3465
3452
|
try {
|
|
3466
3453
|
return (await this.fetchWithTag(options)).settings;
|
|
@@ -3498,7 +3485,7 @@ var _SettingsClient = class _SettingsClient {
|
|
|
3498
3485
|
*/
|
|
3499
3486
|
async fetchWithTag(options) {
|
|
3500
3487
|
const query = {};
|
|
3501
|
-
const includeValue = options?.include
|
|
3488
|
+
const includeValue = this.includeFields === void 0 && options?.include === void 0 ? void 0 : [...this.includeFields ?? [], ...options?.include ?? []];
|
|
3502
3489
|
const localeValueFinal = options?.locale ?? this.localeValue ?? this.clientLocale();
|
|
3503
3490
|
if (includeValue) query.include = includeValue.join(",");
|
|
3504
3491
|
if (localeValueFinal != null && localeValueFinal !== "") query.locale = localeValueFinal;
|
|
@@ -6285,5 +6272,5 @@ function randomClientId() {
|
|
|
6285
6272
|
__name(randomClientId, "randomClientId");
|
|
6286
6273
|
|
|
6287
6274
|
export { AdhocQueryBuilder, AdhocQueryClient, AssetClient, AssetFileBuilder, AssetUploadBuilder, AuthorizationError, AutocompleteBuilder, BaseValidationError, BatchBuilder, BatchClient, ChangesExpiredError, ConnectionError, ContentByIdBuilder, ContentClient, ContentQueryBuilder, ErrorMapper, FileUploadError, FileValidationError, HttpClient, InvalidApiKeyError, InvalidPayloadError, LIVE_KEEPALIVE_INTERVAL_MS, LIVE_SOCKET_OPEN_TIMEOUT_MS, LiveEdgeError, MethodNotAllowedError, MissingApiKeyError, NetworkError, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RateLimitError, ReadOnlyKeyError, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, SearchBuilder, SearchClient, ServerError, ServiceIndeterminateError, SettingsClient, SimilarBuilder, SingletonClient, TimeoutError, TransactionRolledBackError, TypedRelyIOClient, UnknownContractError, UsageQuotaExceededError, VISITOR_ADMISSION_RETRY_AFTER_SECONDS, ValidationError, createClient, entityTagOf, isAborted, isAssetEntry, isPublishableKey, isResourceNotFound, matchRoute, serviceInstructedDelayMs, sleep, validateFile };
|
|
6288
|
-
//# sourceMappingURL=chunk-
|
|
6289
|
-
//# sourceMappingURL=chunk-
|
|
6275
|
+
//# sourceMappingURL=chunk-FRJEUAAF.js.map
|
|
6276
|
+
//# sourceMappingURL=chunk-FRJEUAAF.js.map
|
|
@@ -95,7 +95,6 @@ function defineSchema(config) {
|
|
|
95
95
|
_tag: "schema",
|
|
96
96
|
...config.locales !== void 0 && { locales: config.locales },
|
|
97
97
|
contentTypes: config.contentTypes,
|
|
98
|
-
components: config.components ?? {},
|
|
99
98
|
singletonContentTypes: config.singletonContentTypes ?? {},
|
|
100
99
|
queries: config.queries ?? {},
|
|
101
100
|
settingsGroups: config.settingsGroups,
|
|
@@ -109,30 +108,30 @@ __name(defineSchema, "defineSchema");
|
|
|
109
108
|
|
|
110
109
|
// src/schema/define-locale.ts
|
|
111
110
|
var BCP47_PATTERN = /^[a-z]{2}(-[A-Z]{2})?$/;
|
|
112
|
-
function defineLocale(
|
|
113
|
-
if (!BCP47_PATTERN.test(
|
|
111
|
+
function defineLocale(code2, options) {
|
|
112
|
+
if (!BCP47_PATTERN.test(code2)) {
|
|
114
113
|
throw new Error(
|
|
115
|
-
`Invalid locale code '${
|
|
114
|
+
`Invalid locale code '${code2}'. Expected BCP 47 format: 'xx' or 'xx-XX' (e.g., 'en', 'en-US', 'fr-FR')`
|
|
116
115
|
);
|
|
117
116
|
}
|
|
118
117
|
if (!options.displayName || options.displayName.trim().length === 0) {
|
|
119
|
-
throw new Error(`Locale '${
|
|
118
|
+
throw new Error(`Locale '${code2}' requires a displayName`);
|
|
120
119
|
}
|
|
121
120
|
if (options.fallback) {
|
|
122
121
|
for (const fallbackCode of options.fallback) {
|
|
123
122
|
if (typeof fallbackCode !== "string" || !BCP47_PATTERN.test(fallbackCode)) {
|
|
124
123
|
throw new Error(
|
|
125
|
-
`Invalid fallback locale code '${fallbackCode}' in locale '${
|
|
124
|
+
`Invalid fallback locale code '${fallbackCode}' in locale '${code2}'. Expected BCP 47 format.`
|
|
126
125
|
);
|
|
127
126
|
}
|
|
128
|
-
if (fallbackCode ===
|
|
129
|
-
throw new Error(`Locale '${
|
|
127
|
+
if (fallbackCode === code2) {
|
|
128
|
+
throw new Error(`Locale '${code2}' cannot reference itself in fallback chain`);
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
return {
|
|
134
133
|
_tag: "locale",
|
|
135
|
-
code,
|
|
134
|
+
code: code2,
|
|
136
135
|
displayName: options.displayName,
|
|
137
136
|
...options.default !== void 0 && { default: options.default },
|
|
138
137
|
...options.fallback !== void 0 && { fallback: options.fallback },
|
|
@@ -161,11 +160,11 @@ function buildFallbackChain(localeCode, locales, maxDepth = 10) {
|
|
|
161
160
|
const localeMap = new Map(locales.map((l) => [l.code, l]));
|
|
162
161
|
const chain = [];
|
|
163
162
|
const visited = /* @__PURE__ */ new Set();
|
|
164
|
-
function addFallbacks(
|
|
165
|
-
if (depth > maxDepth || visited.has(
|
|
166
|
-
const locale = localeMap.get(
|
|
163
|
+
function addFallbacks(code2, depth) {
|
|
164
|
+
if (depth > maxDepth || visited.has(code2)) return;
|
|
165
|
+
const locale = localeMap.get(code2);
|
|
167
166
|
if (!locale?.fallback) return;
|
|
168
|
-
visited.add(
|
|
167
|
+
visited.add(code2);
|
|
169
168
|
for (const fallbackCode of locale.fallback) {
|
|
170
169
|
if (!chain.includes(fallbackCode) && fallbackCode !== localeCode) {
|
|
171
170
|
chain.push(fallbackCode);
|
|
@@ -194,7 +193,7 @@ function fieldset(id, config) {
|
|
|
194
193
|
}
|
|
195
194
|
__name(fieldset, "fieldset");
|
|
196
195
|
function defineContentType(name, config) {
|
|
197
|
-
|
|
196
|
+
return {
|
|
198
197
|
_tag: "contentType",
|
|
199
198
|
name,
|
|
200
199
|
displayName: config.displayName,
|
|
@@ -206,21 +205,15 @@ function defineContentType(name, config) {
|
|
|
206
205
|
// definition from YAML and another from TypeScript, with a different schemaHash (REL-1458)
|
|
207
206
|
...config.hierarchical !== void 0 && { hierarchical: config.hierarchical },
|
|
208
207
|
...config.accessTags !== void 0 && { accessTags: config.accessTags },
|
|
209
|
-
...config.workflow !== void 0 && { workflow: config.workflow }
|
|
208
|
+
...config.workflow !== void 0 && { workflow: config.workflow },
|
|
209
|
+
fields: config.fields
|
|
210
210
|
};
|
|
211
|
-
if ("fields" in config && config.fields) {
|
|
212
|
-
return { ...base, fields: config.fields };
|
|
213
|
-
}
|
|
214
|
-
if ("fieldsets" in config && config.fieldsets) {
|
|
215
|
-
return { ...base, fieldsets: config.fieldsets };
|
|
216
|
-
}
|
|
217
|
-
throw new Error("Content type must have either fields or fieldsets");
|
|
218
211
|
}
|
|
219
212
|
__name(defineContentType, "defineContentType");
|
|
220
213
|
|
|
221
214
|
// src/schema/define-singleton.ts
|
|
222
215
|
function defineSingletonContentType(name, config) {
|
|
223
|
-
|
|
216
|
+
return {
|
|
224
217
|
_tag: "singletonContentType",
|
|
225
218
|
name,
|
|
226
219
|
displayName: config.displayName,
|
|
@@ -232,36 +225,13 @@ function defineSingletonContentType(name, config) {
|
|
|
232
225
|
...config.hierarchical !== void 0 && { hierarchical: config.hierarchical },
|
|
233
226
|
...config.accessTags !== void 0 && { accessTags: config.accessTags },
|
|
234
227
|
// Its config type took `workflow` and this dropped it, so a singleton's workflow never deployed
|
|
235
|
-
...config.workflow !== void 0 && { workflow: config.workflow }
|
|
228
|
+
...config.workflow !== void 0 && { workflow: config.workflow },
|
|
229
|
+
fields: config.fields
|
|
236
230
|
};
|
|
237
|
-
if ("fields" in config && config.fields) {
|
|
238
|
-
return { ...base, fields: config.fields };
|
|
239
|
-
}
|
|
240
|
-
if ("fieldsets" in config && config.fieldsets) {
|
|
241
|
-
return { ...base, fieldsets: config.fieldsets };
|
|
242
|
-
}
|
|
243
|
-
throw new Error("Singleton content type must have either fields or fieldsets");
|
|
244
231
|
}
|
|
245
232
|
__name(defineSingletonContentType, "defineSingletonContentType");
|
|
246
233
|
var defineSingleton = defineSingletonContentType;
|
|
247
234
|
|
|
248
|
-
// src/schema/define-component.ts
|
|
249
|
-
function defineComponent(name, config) {
|
|
250
|
-
return {
|
|
251
|
-
_tag: "component",
|
|
252
|
-
name,
|
|
253
|
-
displayName: config.displayName,
|
|
254
|
-
description: config.description,
|
|
255
|
-
ai: config.ai,
|
|
256
|
-
// Written only when given: `false` whenever not made a YAML and a TypeScript component two
|
|
257
|
-
// definitions (REL-1458)
|
|
258
|
-
...config.deprecated !== void 0 && { deprecated: config.deprecated },
|
|
259
|
-
fields: config.fields,
|
|
260
|
-
metadata: config.metadata
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
__name(defineComponent, "defineComponent");
|
|
264
|
-
|
|
265
235
|
// src/schema/define-settings-group.ts
|
|
266
236
|
function defineSettingsGroup(name, config) {
|
|
267
237
|
return {
|
|
@@ -287,7 +257,7 @@ function defineAssetType(name, config) {
|
|
|
287
257
|
`Asset type '${name}' declares multiple kind keys (${kindKeys.join(", ")}); exactly one is allowed`
|
|
288
258
|
);
|
|
289
259
|
}
|
|
290
|
-
|
|
260
|
+
return {
|
|
291
261
|
_tag: "assetType",
|
|
292
262
|
name,
|
|
293
263
|
displayName: config.displayName,
|
|
@@ -300,15 +270,9 @@ function defineAssetType(name, config) {
|
|
|
300
270
|
...config.workflow !== void 0 && { workflow: config.workflow },
|
|
301
271
|
...config.image !== void 0 && { image: config.image },
|
|
302
272
|
...config.video !== void 0 && { video: config.video },
|
|
303
|
-
...config.file !== void 0 && { file: config.file }
|
|
273
|
+
...config.file !== void 0 && { file: config.file },
|
|
274
|
+
...config.fields !== void 0 && { fields: config.fields }
|
|
304
275
|
};
|
|
305
|
-
if ("fields" in config && config.fields) {
|
|
306
|
-
return { ...base, fields: config.fields };
|
|
307
|
-
}
|
|
308
|
-
if ("fieldsets" in config && config.fieldsets) {
|
|
309
|
-
return { ...base, fieldsets: config.fieldsets };
|
|
310
|
-
}
|
|
311
|
-
return base;
|
|
312
276
|
}
|
|
313
277
|
__name(defineAssetType, "defineAssetType");
|
|
314
278
|
|
|
@@ -587,7 +551,7 @@ __name(defineQuery, "defineQuery");
|
|
|
587
551
|
var fields_exports = {};
|
|
588
552
|
__export(fields_exports, {
|
|
589
553
|
boolean: () => boolean,
|
|
590
|
-
|
|
554
|
+
code: () => code,
|
|
591
555
|
date: () => date,
|
|
592
556
|
dateTime: () => dateTime,
|
|
593
557
|
decimal: () => decimal,
|
|
@@ -596,10 +560,12 @@ __export(fields_exports, {
|
|
|
596
560
|
integer: () => integer,
|
|
597
561
|
list: () => list,
|
|
598
562
|
longText: () => longText,
|
|
563
|
+
object: () => object,
|
|
599
564
|
reference: () => reference,
|
|
600
565
|
richText: () => richText,
|
|
601
566
|
shortText: () => shortText,
|
|
602
567
|
slug: () => slug,
|
|
568
|
+
table: () => table,
|
|
603
569
|
tags: () => tags,
|
|
604
570
|
url: () => url
|
|
605
571
|
});
|
|
@@ -632,6 +598,14 @@ function richText(id, options = {}) {
|
|
|
632
598
|
return createField(id, "richText", options);
|
|
633
599
|
}
|
|
634
600
|
__name(richText, "richText");
|
|
601
|
+
function table(id, options = {}) {
|
|
602
|
+
return createField(id, "table", options);
|
|
603
|
+
}
|
|
604
|
+
__name(table, "table");
|
|
605
|
+
function code(id, options = {}) {
|
|
606
|
+
return createField(id, "code", options);
|
|
607
|
+
}
|
|
608
|
+
__name(code, "code");
|
|
635
609
|
function slug(id, options = {}) {
|
|
636
610
|
return createField(id, "slug", options);
|
|
637
611
|
}
|
|
@@ -680,15 +654,14 @@ function list(id, options = {}) {
|
|
|
680
654
|
return createField(id, "list", options);
|
|
681
655
|
}
|
|
682
656
|
__name(list, "list");
|
|
683
|
-
function
|
|
684
|
-
|
|
685
|
-
return createField(id, type, options);
|
|
657
|
+
function object(id, options) {
|
|
658
|
+
return createField(id, "object", options);
|
|
686
659
|
}
|
|
687
|
-
__name(
|
|
660
|
+
__name(object, "object");
|
|
688
661
|
|
|
689
662
|
// src/schema/index.ts
|
|
690
663
|
var fields = fields_exports;
|
|
691
664
|
|
|
692
|
-
export { BUILT_IN_ROLES, BUILT_IN_ROLE_ACTIONS, ROLE_ACTIONS, buildFallbackChain, defineAssetType,
|
|
693
|
-
//# sourceMappingURL=chunk-
|
|
694
|
-
//# sourceMappingURL=chunk-
|
|
665
|
+
export { BUILT_IN_ROLES, BUILT_IN_ROLE_ACTIONS, ROLE_ACTIONS, buildFallbackChain, defineAssetType, defineContentType, defineContentTypeWorkflow, defineLocale, defineQuery, defineRole, defineSchema, defineSettingsGroup, defineSingleton, defineSingletonContentType, defineView, defineWorkflow, defineWorkflowStage, fields, fieldset, findDefaultLocale, findWorkflowStage, getActiveLocales, getBuiltInRoleActions, getFirstWorkflowStage, getLocaleCodes, getNextWorkflowStage, getWorkflowStageIds, isBuiltInRole, isFinalWorkflowStage, isLocaleDefinition, isRoleDefinition, isWorkflowDefinition, isWorkflowStageDefinition };
|
|
666
|
+
//# sourceMappingURL=chunk-POEEDYFM.js.map
|
|
667
|
+
//# sourceMappingURL=chunk-POEEDYFM.js.map
|
package/dist/client/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDXCVO6M5_cjs = require('../chunk-DXCVO6M5.cjs');
|
|
4
4
|
require('../chunk-LSRPMNPT.cjs');
|
|
5
5
|
require('../chunk-TZL374LS.cjs');
|
|
6
6
|
require('../chunk-MWMSFIWN.cjs');
|
|
@@ -9,11 +9,11 @@ require('../chunk-MWMSFIWN.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "TypedRelyIOClient", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkDXCVO6M5_cjs.TypedRelyIOClient; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "createClient", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkDXCVO6M5_cjs.createClient; }
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=index.cjs.map
|
|
19
19
|
//# sourceMappingURL=index.cjs.map
|
package/dist/client/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { e as ClientSchema, R as Register, f as RegisteredSchema, d as TypedClientConfig, T as TypedRelyIOClient, c as createClient } from '../index-
|
|
2
|
-
import '../index-
|
|
3
|
-
import '../
|
|
4
|
-
import '../
|
|
1
|
+
export { e as ClientSchema, R as Register, f as RegisteredSchema, d as TypedClientConfig, T as TypedRelyIOClient, c as createClient } from '../index-BrvEg6-A.cjs';
|
|
2
|
+
import '../index-b-AkfTUv.cjs';
|
|
3
|
+
import '../rich-text.d-rKmpgdGd.cjs';
|
|
4
|
+
import '../include-paths-CL4gHv6I.cjs';
|
|
5
|
+
import '../define-schema-DgctHlI2.cjs';
|
|
5
6
|
import './live-visitor.js';
|
|
6
7
|
import '../dev-handshake/index.cjs';
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { e as ClientSchema, R as Register, f as RegisteredSchema, d as TypedClientConfig, T as TypedRelyIOClient, c as createClient } from '../index-
|
|
2
|
-
import '../index-
|
|
3
|
-
import '../
|
|
4
|
-
import '../
|
|
1
|
+
export { e as ClientSchema, R as Register, f as RegisteredSchema, d as TypedClientConfig, T as TypedRelyIOClient, c as createClient } from '../index-Pw0onkJe.js';
|
|
2
|
+
import '../index-B9RfZVF1.js';
|
|
3
|
+
import '../rich-text.d-rKmpgdGd.js';
|
|
4
|
+
import '../include-paths-CrJNTsMl.js';
|
|
5
|
+
import '../define-schema-mrEZbY1h.js';
|
|
5
6
|
import './live-visitor.js';
|
|
6
7
|
import '../dev-handshake/index.js';
|
package/dist/client/index.js
CHANGED