@relyio/sdk 0.12.0 → 0.13.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 +84 -0
- package/dist/{chunk-3DRDHXLY.js → chunk-3NPPMGB6.js} +435 -23
- package/dist/{chunk-FRJEUAAF.js → chunk-6NGJXLOR.js} +22 -11
- package/dist/{chunk-DXCVO6M5.cjs → chunk-DEDIJKHY.cjs} +22 -11
- package/dist/{chunk-POEEDYFM.js → chunk-EW23SZPX.js} +7 -2
- package/dist/{chunk-3MSFWXQL.cjs → chunk-FOSM4LMM.cjs} +7 -2
- package/dist/{chunk-FI5VIF4M.cjs → chunk-Z6GLWSSD.cjs} +442 -22
- package/dist/client/index.cjs +3 -3
- package/dist/client/index.d.cts +4 -5
- package/dist/client/index.d.ts +4 -5
- package/dist/client/index.js +1 -1
- package/dist/{define-schema-mrEZbY1h.d.ts → define-schema-UHViXKiv.d.ts} +2 -219
- package/dist/{define-schema-DgctHlI2.d.cts → define-schema-sWJ8Zn7C.d.cts} +2 -219
- package/dist/{include-paths-CL4gHv6I.d.cts → include-paths-Bs5FhNw2.d.cts} +2191 -108
- package/dist/{include-paths-CrJNTsMl.d.ts → include-paths-Cb7iPCW2.d.ts} +2191 -108
- package/dist/index--_u1nPHv.d.cts +507 -0
- package/dist/index-8DozAWsA.d.ts +507 -0
- package/dist/{index-BrvEg6-A.d.cts → index-BT0L8xJj.d.cts} +41 -53
- package/dist/{index-Pw0onkJe.d.ts → index-CPjJ25R4.d.ts} +41 -53
- package/dist/index.cjs +119 -112
- package/dist/index.d.cts +39 -70
- package/dist/index.d.ts +39 -70
- package/dist/index.js +5 -29
- package/dist/markdown/index.cjs +13750 -0
- package/dist/markdown/index.d.cts +111 -0
- package/dist/markdown/index.d.ts +111 -0
- package/dist/markdown/index.js +13742 -0
- package/dist/rich-text/index.cjs +26 -6
- package/dist/rich-text/index.d.cts +3 -148
- package/dist/rich-text/index.d.ts +3 -148
- package/dist/rich-text/index.js +1 -1
- package/dist/rich-text.d-BWc-5gX1.d.cts +326 -0
- package/dist/rich-text.d-BWc-5gX1.d.ts +326 -0
- package/dist/schema/index.cjs +34 -34
- package/dist/schema/index.d.cts +9 -178
- package/dist/schema/index.d.ts +9 -178
- package/dist/schema/index.js +1 -1
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.ts +2 -3
- package/package.json +14 -3
- package/dist/index-B9RfZVF1.d.ts +0 -861
- package/dist/index-b-AkfTUv.d.cts +0 -861
- package/dist/rich-text.d-rKmpgdGd.d.cts +0 -200
- package/dist/rich-text.d-rKmpgdGd.d.ts +0 -200
|
@@ -1662,13 +1662,19 @@ var _ContentQueryBuilder = class _ContentQueryBuilder {
|
|
|
1662
1662
|
return this;
|
|
1663
1663
|
}
|
|
1664
1664
|
/**
|
|
1665
|
-
* Add where conditions to the query
|
|
1666
|
-
*
|
|
1665
|
+
* Add where conditions to the query, each naming a value by its path: a field the content type
|
|
1666
|
+
* declares, a field inside an object (`'pricing.basePrice'`), a reference inside its blocks —
|
|
1667
|
+
* `{ 'sections.features': featureId }` keeps the entries some block of which holds that feature
|
|
1668
|
+
* (REL-1810) — and rich text that can point at an entry, by the entries it points at. A typed read
|
|
1669
|
+
* takes exactly the paths the API filters by (`FilterPaths`, REL-2136). A condition on `_metadata`
|
|
1670
|
+
* is refused here, before anything is sent (`refuseMetadataConditions`).
|
|
1667
1671
|
*/
|
|
1668
1672
|
where(conditions) {
|
|
1669
1673
|
refuseMetadataConditions(conditions);
|
|
1670
1674
|
this.queryOptions.where = {
|
|
1671
1675
|
...this.queryOptions.where,
|
|
1676
|
+
// Sent as written: a path into an object or a block, or a rich-text field's condition, rides
|
|
1677
|
+
// beside the fields', which `QueryOptions` types by the record's own keys alone
|
|
1672
1678
|
...conditions
|
|
1673
1679
|
};
|
|
1674
1680
|
return this;
|
|
@@ -2260,10 +2266,11 @@ var _ContentClient = class _ContentClient {
|
|
|
2260
2266
|
return builder.execute();
|
|
2261
2267
|
}
|
|
2262
2268
|
async fetch(options) {
|
|
2263
|
-
const
|
|
2269
|
+
const query = this.query();
|
|
2264
2270
|
if (options?.where) {
|
|
2265
|
-
|
|
2271
|
+
query.where(options.where);
|
|
2266
2272
|
}
|
|
2273
|
+
const builder = query;
|
|
2267
2274
|
if (options?.limit != null) {
|
|
2268
2275
|
builder.limit(options.limit);
|
|
2269
2276
|
}
|
|
@@ -2358,6 +2365,8 @@ var _ContentClient = class _ContentClient {
|
|
|
2358
2365
|
* request adds, as for {@link create}. `ifMatch` and `idempotencyKey` win over the same
|
|
2359
2366
|
* header among them. `locale` defaults to the client's own, the locale whose entity tag
|
|
2360
2367
|
* {@link fetchOneWithTag} reads, so the tag it hands back is checked against the same locale.
|
|
2368
|
+
* @returns The entry, its `_metadata.brokenLinks` naming each entry link another entry publishes
|
|
2369
|
+
* that this revision left pointing nowhere — empty when it took no heading away.
|
|
2361
2370
|
*/
|
|
2362
2371
|
async update(id, data, options) {
|
|
2363
2372
|
const { idempotencyKey, ifMatch, headers, locale, ...body } = options ?? {};
|
|
@@ -2441,6 +2450,9 @@ var _ContentClient = class _ContentClient {
|
|
|
2441
2450
|
* The restore is validated as strictly as a publish, so it cannot publish invalid content, and it
|
|
2442
2451
|
* records a new version of its own rather than rewinding the counter — so the revert is auditable
|
|
2443
2452
|
* and itself reversible.
|
|
2453
|
+
*
|
|
2454
|
+
* @returns The entry, its `_metadata.leftOut` naming each value of the version the active schema
|
|
2455
|
+
* no longer declares, and `_metadata.brokenLinks` the entry links it left pointing nowhere.
|
|
2444
2456
|
*/
|
|
2445
2457
|
async restore(id, versionNumber, locale, options) {
|
|
2446
2458
|
return this.httpClient.fetchPayload("/v1/{contentType}/{id}/versions/{versionNumber}/restore", "post", {
|
|
@@ -2454,15 +2466,14 @@ var _ContentClient = class _ContentClient {
|
|
|
2454
2466
|
});
|
|
2455
2467
|
}
|
|
2456
2468
|
/**
|
|
2457
|
-
* Get children of a hierarchical entry
|
|
2469
|
+
* Get the direct children of a hierarchical entry. The route lists one level and takes no depth
|
|
2470
|
+
* (REL-2195): `{ depth }` was sent as `?depth=`, which the API refused with `400`. A tree nested
|
|
2471
|
+
* under each entry is a list or entry read's `query().children()`.
|
|
2458
2472
|
* @param id - Parent entry ID
|
|
2459
|
-
* @param options -
|
|
2473
|
+
* @param options - Include paths to expand on each child, and the locale to read
|
|
2460
2474
|
*/
|
|
2461
2475
|
async children(id, options) {
|
|
2462
2476
|
const params = {};
|
|
2463
|
-
if (options?.depth != null) {
|
|
2464
|
-
params.depth = options.depth;
|
|
2465
|
-
}
|
|
2466
2477
|
if (options?.include != null) {
|
|
2467
2478
|
params.include = options.include.join(",");
|
|
2468
2479
|
}
|
|
@@ -6272,5 +6283,5 @@ function randomClientId() {
|
|
|
6272
6283
|
__name(randomClientId, "randomClientId");
|
|
6273
6284
|
|
|
6274
6285
|
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 };
|
|
6275
|
-
//# sourceMappingURL=chunk-
|
|
6276
|
-
//# sourceMappingURL=chunk-
|
|
6286
|
+
//# sourceMappingURL=chunk-6NGJXLOR.js.map
|
|
6287
|
+
//# sourceMappingURL=chunk-6NGJXLOR.js.map
|
|
@@ -1664,13 +1664,19 @@ var _ContentQueryBuilder = class _ContentQueryBuilder {
|
|
|
1664
1664
|
return this;
|
|
1665
1665
|
}
|
|
1666
1666
|
/**
|
|
1667
|
-
* Add where conditions to the query
|
|
1668
|
-
*
|
|
1667
|
+
* Add where conditions to the query, each naming a value by its path: a field the content type
|
|
1668
|
+
* declares, a field inside an object (`'pricing.basePrice'`), a reference inside its blocks —
|
|
1669
|
+
* `{ 'sections.features': featureId }` keeps the entries some block of which holds that feature
|
|
1670
|
+
* (REL-1810) — and rich text that can point at an entry, by the entries it points at. A typed read
|
|
1671
|
+
* takes exactly the paths the API filters by (`FilterPaths`, REL-2136). A condition on `_metadata`
|
|
1672
|
+
* is refused here, before anything is sent (`refuseMetadataConditions`).
|
|
1669
1673
|
*/
|
|
1670
1674
|
where(conditions) {
|
|
1671
1675
|
refuseMetadataConditions(conditions);
|
|
1672
1676
|
this.queryOptions.where = {
|
|
1673
1677
|
...this.queryOptions.where,
|
|
1678
|
+
// Sent as written: a path into an object or a block, or a rich-text field's condition, rides
|
|
1679
|
+
// beside the fields', which `QueryOptions` types by the record's own keys alone
|
|
1674
1680
|
...conditions
|
|
1675
1681
|
};
|
|
1676
1682
|
return this;
|
|
@@ -2262,10 +2268,11 @@ var _ContentClient = class _ContentClient {
|
|
|
2262
2268
|
return builder.execute();
|
|
2263
2269
|
}
|
|
2264
2270
|
async fetch(options) {
|
|
2265
|
-
const
|
|
2271
|
+
const query = this.query();
|
|
2266
2272
|
if (options?.where) {
|
|
2267
|
-
|
|
2273
|
+
query.where(options.where);
|
|
2268
2274
|
}
|
|
2275
|
+
const builder = query;
|
|
2269
2276
|
if (options?.limit != null) {
|
|
2270
2277
|
builder.limit(options.limit);
|
|
2271
2278
|
}
|
|
@@ -2360,6 +2367,8 @@ var _ContentClient = class _ContentClient {
|
|
|
2360
2367
|
* request adds, as for {@link create}. `ifMatch` and `idempotencyKey` win over the same
|
|
2361
2368
|
* header among them. `locale` defaults to the client's own, the locale whose entity tag
|
|
2362
2369
|
* {@link fetchOneWithTag} reads, so the tag it hands back is checked against the same locale.
|
|
2370
|
+
* @returns The entry, its `_metadata.brokenLinks` naming each entry link another entry publishes
|
|
2371
|
+
* that this revision left pointing nowhere — empty when it took no heading away.
|
|
2363
2372
|
*/
|
|
2364
2373
|
async update(id, data, options) {
|
|
2365
2374
|
const { idempotencyKey, ifMatch, headers, locale, ...body } = options ?? {};
|
|
@@ -2443,6 +2452,9 @@ var _ContentClient = class _ContentClient {
|
|
|
2443
2452
|
* The restore is validated as strictly as a publish, so it cannot publish invalid content, and it
|
|
2444
2453
|
* records a new version of its own rather than rewinding the counter — so the revert is auditable
|
|
2445
2454
|
* and itself reversible.
|
|
2455
|
+
*
|
|
2456
|
+
* @returns The entry, its `_metadata.leftOut` naming each value of the version the active schema
|
|
2457
|
+
* no longer declares, and `_metadata.brokenLinks` the entry links it left pointing nowhere.
|
|
2446
2458
|
*/
|
|
2447
2459
|
async restore(id, versionNumber, locale, options) {
|
|
2448
2460
|
return this.httpClient.fetchPayload("/v1/{contentType}/{id}/versions/{versionNumber}/restore", "post", {
|
|
@@ -2456,15 +2468,14 @@ var _ContentClient = class _ContentClient {
|
|
|
2456
2468
|
});
|
|
2457
2469
|
}
|
|
2458
2470
|
/**
|
|
2459
|
-
* Get children of a hierarchical entry
|
|
2471
|
+
* Get the direct children of a hierarchical entry. The route lists one level and takes no depth
|
|
2472
|
+
* (REL-2195): `{ depth }` was sent as `?depth=`, which the API refused with `400`. A tree nested
|
|
2473
|
+
* under each entry is a list or entry read's `query().children()`.
|
|
2460
2474
|
* @param id - Parent entry ID
|
|
2461
|
-
* @param options -
|
|
2475
|
+
* @param options - Include paths to expand on each child, and the locale to read
|
|
2462
2476
|
*/
|
|
2463
2477
|
async children(id, options) {
|
|
2464
2478
|
const params = {};
|
|
2465
|
-
if (options?.depth != null) {
|
|
2466
|
-
params.depth = options.depth;
|
|
2467
|
-
}
|
|
2468
2479
|
if (options?.include != null) {
|
|
2469
2480
|
params.include = options.include.join(",");
|
|
2470
2481
|
}
|
|
@@ -6333,5 +6344,5 @@ exports.matchRoute = matchRoute;
|
|
|
6333
6344
|
exports.serviceInstructedDelayMs = serviceInstructedDelayMs;
|
|
6334
6345
|
exports.sleep = sleep;
|
|
6335
6346
|
exports.validateFile = validateFile;
|
|
6336
|
-
//# sourceMappingURL=chunk-
|
|
6337
|
-
//# sourceMappingURL=chunk-
|
|
6347
|
+
//# sourceMappingURL=chunk-DEDIJKHY.cjs.map
|
|
6348
|
+
//# sourceMappingURL=chunk-DEDIJKHY.cjs.map
|
|
@@ -558,6 +558,7 @@ __export(fields_exports, {
|
|
|
558
558
|
email: () => email,
|
|
559
559
|
enum: () => enumField,
|
|
560
560
|
integer: () => integer,
|
|
561
|
+
json: () => json,
|
|
561
562
|
list: () => list,
|
|
562
563
|
longText: () => longText,
|
|
563
564
|
object: () => object,
|
|
@@ -658,10 +659,14 @@ function object(id, options) {
|
|
|
658
659
|
return createField(id, "object", options);
|
|
659
660
|
}
|
|
660
661
|
__name(object, "object");
|
|
662
|
+
function json(id, options = {}) {
|
|
663
|
+
return createField(id, "json", options);
|
|
664
|
+
}
|
|
665
|
+
__name(json, "json");
|
|
661
666
|
|
|
662
667
|
// src/schema/index.ts
|
|
663
668
|
var fields = fields_exports;
|
|
664
669
|
|
|
665
670
|
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-
|
|
667
|
-
//# sourceMappingURL=chunk-
|
|
671
|
+
//# sourceMappingURL=chunk-EW23SZPX.js.map
|
|
672
|
+
//# sourceMappingURL=chunk-EW23SZPX.js.map
|
|
@@ -560,6 +560,7 @@ chunkMWMSFIWN_cjs.__export(fields_exports, {
|
|
|
560
560
|
email: () => email,
|
|
561
561
|
enum: () => enumField,
|
|
562
562
|
integer: () => integer,
|
|
563
|
+
json: () => json,
|
|
563
564
|
list: () => list,
|
|
564
565
|
longText: () => longText,
|
|
565
566
|
object: () => object,
|
|
@@ -660,6 +661,10 @@ function object(id, options) {
|
|
|
660
661
|
return createField(id, "object", options);
|
|
661
662
|
}
|
|
662
663
|
chunkMWMSFIWN_cjs.__name(object, "object");
|
|
664
|
+
function json(id, options = {}) {
|
|
665
|
+
return createField(id, "json", options);
|
|
666
|
+
}
|
|
667
|
+
chunkMWMSFIWN_cjs.__name(json, "json");
|
|
663
668
|
|
|
664
669
|
// src/schema/index.ts
|
|
665
670
|
var fields = fields_exports;
|
|
@@ -697,5 +702,5 @@ exports.isLocaleDefinition = isLocaleDefinition;
|
|
|
697
702
|
exports.isRoleDefinition = isRoleDefinition;
|
|
698
703
|
exports.isWorkflowDefinition = isWorkflowDefinition;
|
|
699
704
|
exports.isWorkflowStageDefinition = isWorkflowStageDefinition;
|
|
700
|
-
//# sourceMappingURL=chunk-
|
|
701
|
-
//# sourceMappingURL=chunk-
|
|
705
|
+
//# sourceMappingURL=chunk-FOSM4LMM.cjs.map
|
|
706
|
+
//# sourceMappingURL=chunk-FOSM4LMM.cjs.map
|