@relyio/sdk 0.19.0 → 0.21.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 +16 -0
- package/dist/automations/index.cjs +1 -1
- package/dist/automations/index.d.cts +2 -1588
- package/dist/automations/index.d.ts +2 -1588
- package/dist/automations/index.js +1 -1
- package/dist/{chunk-ZO6QDYJG.cjs → chunk-5WGMIQBH.cjs} +2 -2
- package/dist/{chunk-W2A4OTCI.js → chunk-EQUZNVAR.js} +2 -2
- package/dist/{chunk-P23G5NXD.cjs → chunk-K66MBRI4.cjs} +68 -51
- package/dist/{chunk-356SF5Y2.js → chunk-L42C4G2S.js} +25 -8
- package/dist/{chunk-T7LGREB3.js → chunk-OUR7OUUZ.js} +3 -3
- package/dist/{chunk-NN45CSPZ.cjs → chunk-UO2QRYKV.cjs} +3 -3
- package/dist/client/index.cjs +5 -5
- package/dist/client/index.d.cts +4 -4
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.js +3 -3
- package/dist/{define-content-type-BZ6X8GvL.d.cts → define-content-type-C2HnCYYX.d.cts} +1 -1
- package/dist/{define-content-type-C12jh8cY.d.ts → define-content-type-CVLUusfx.d.ts} +1 -1
- package/dist/dev-handshake/index.cjs +8 -8
- package/dist/dev-handshake/index.d.cts +1 -1
- package/dist/dev-handshake/index.d.ts +1 -1
- package/dist/dev-handshake/index.js +1 -1
- package/dist/extensions/index.cjs +3 -3
- package/dist/extensions/index.d.cts +2 -4
- package/dist/extensions/index.d.ts +2 -4
- package/dist/extensions/index.js +1 -1
- package/dist/functions/index.cjs +1 -1
- package/dist/functions/index.d.cts +2 -4
- package/dist/functions/index.d.ts +2 -4
- package/dist/functions/index.js +1 -1
- package/dist/{index-BxNnlc5D.d.ts → index-BAdue7TR.d.ts} +54 -9
- package/dist/{index-D5jyIeQ5.d.cts → index-BNf3S9W9.d.cts} +54 -9
- package/dist/{index-C-MymZTe.d.ts → index-BY1xU93u.d.ts} +1 -1
- package/dist/{index-DN0l8RHw.d.cts → index-Cmup6HJY.d.cts} +1 -1
- package/dist/index-D0r6fnvl.d.ts +2304 -0
- package/dist/index-U5NbHg3N.d.cts +2304 -0
- package/dist/index.cjs +76 -76
- package/dist/index.d.cts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +4 -4
- package/dist/preview/index.cjs +3 -3
- package/dist/preview/index.js +1 -1
- package/dist/rich-text/index.d.cts +2 -2
- package/dist/rich-text/index.d.ts +2 -2
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.d.cts +947 -4
- package/dist/schema/index.d.ts +947 -4
- package/dist/schema/index.js +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +5 -5
- package/dist/define-schema-BPlZl4a2.d.cts +0 -947
- package/dist/define-schema-CK7TtYot.d.ts +0 -947
- package/dist/register-BiMQKVp-.d.ts +0 -693
- package/dist/register-DeMsaurp.d.cts +0 -693
|
@@ -16240,4 +16240,4 @@ type RollupsOf<T> = T extends {
|
|
|
16240
16240
|
readonly __rollups?: infer R;
|
|
16241
16241
|
} ? unknown extends R ? unknown : RollupValues<NonNullable<R>> : unknown;
|
|
16242
16242
|
|
|
16243
|
-
export {
|
|
16243
|
+
export { boolean as $, type AIConfig as A, type BaseFieldConfig as B, type ConditionTree as C, type DateConfig as D, type EmailConfig as E, type FieldAIConfig as F, type RequirementRule as G, type RichTextConfig as H, type IntegerConfig as I, type JsonConfig as J, type KeyedEnumConfig as K, type ListConfig as L, type RichTextLinks as M, type NeverUniqueFieldConfig as N, type ObjectConfig as O, type RuleCondition as P, type RuleConditions as Q, type ReadOnlyRule as R, type SequenceConfig as S, type ShortTextConfig as T, type SlugConfig as U, type TableConfig as V, type TagsConfig as W, type UrlConfig as X, type ValidationRule$1 as Y, type VisibilityRule as Z, type WidgetOptions as _, type AnyFieldDefinition as a, type SettingsReading as a$, code as a0, counter as a1, date as a2, dateTime as a3, decimal as a4, email as a5, enumField as a6, file as a7, integer as a8, json as a9, type AssetTypeDefinition as aA, type InferContentType as aB, type KeyedRoles as aC, type KeyedViews as aD, type CheckedLocales as aE, type CheckedRoles as aF, type CheckedWorkflow as aG, type CheckedSection as aH, type KeysDeclared as aI, type ContributedRecordType as aJ, type LocaleCodesOf as aK, type StagesDeclared as aL, type KeyedRolesAsList as aM, type KeyedViewsAsList as aN, type FieldSchemaContext as aO, type FieldValue as aP, type UnresolvedEntry as aQ, type Keyed as aR, type BlockOf as aS, type ShapeValue as aT, type AssetReading as aU, type CheckedIncludes as aV, type CheckInclude as aW, type ContentReading as aX, type IncludablePaths as aY, type Reading as aZ, type ReadWith as a_, list as aa, longText as ab, object as ac, owner as ad, reference as ae, richText as af, sequence as ag, shortText as ah, slug as ai, table as aj, tags as ak, url as al, type FieldMember as am, type FieldValues as an, type DeclaredFields as ao, type components as ap, type RecordFile as aq, type FileUpload as ar, type DisplayFieldOf as as, type ContentTypeDefinition as at, type SingletonContentTypeDefinition as au, type SettingsGroupDefinition as av, type LocaleDefinition as aw, type RoleDefinition as ax, type WorkflowDefinition as ay, type ViewDefinition as az, type AnyKeyedField as b, BUILT_IN_ROLES as b$, type SingletonReading as b0, type UntypedReading as b1, defineLocale as b2, isLocaleDefinition as b3, getLocaleCodes as b4, findDefaultLocale as b5, getActiveLocales as b6, buildFallbackChain as b7, type TextDirection as b8, type LocaleOptions as b9, type ImageTransform as bA, type ImageFitMode as bB, type ImageOutputFormat as bC, type ImageUploadConfig as bD, type ImageSourceConfig as bE, type ImageExifConfig as bF, type VariantDefinition as bG, type VideoUploadConfig as bH, type VideoPosterConfig as bI, type VideoCaptionsConfig as bJ, type VideoDownloadConfig as bK, type VideoWatermarkConfig as bL, type FileUploadConfig as bM, type FileScanConfig as bN, rollup as bO, type KeyedRollups as bP, type RollupDefinition as bQ, type RollupKind as bR, type RollupOptions as bS, type RollupValues as bT, type RollupWhereValue as bU, type StoredRollup as bV, type RollupsOf as bW, defineRole as bX, isRoleDefinition as bY, isBuiltInRole as bZ, getBuiltInRoleActions as b_, defineContentType as ba, fieldset as bb, type Fieldset as bc, type DeclaredFieldset as bd, type AnyDeclaredFieldset as be, type KeyedFieldsetConfig as bf, type KeyedContentTypeConfig as bg, type ContentTypeEndUsers as bh, type EntryMetadata as bi, type LocalePublicationFields as bj, defineSingleton as bk, type KeyedSingletonConfig as bl, type SingletonMetadata as bm, type InferSingleton as bn, defineSettingsGroup as bo, type KeyedSettingsGroupConfig as bp, type SettingsGroupMetadata as bq, type InferSettingsGroup as br, defineAssetType as bs, type KeyedAssetTypeConfig as bt, type InferAssetType as bu, type InferAssetEntry as bv, type AssetServedBlocks as bw, type ImageKindConfig as bx, type VideoKindConfig as by, type FileKindConfig as bz, type AssetAIConfig as c, type ExtensionSettingField as c$, ROLE_ACTIONS as c0, BUILT_IN_ROLE_ACTIONS as c1, type BuiltInRole as c2, type RoleAction as c3, type ResourcePermission as c4, type FieldVisibility as c5, type RoleConfig as c6, type KeyedRoleConfig as c7, type KeyedRoleDefinition as c8, defineWorkflow as c9, type ViewFilterRelativeDate as cA, type ViewFilterCondition as cB, type ViewFilter as cC, type ViewConfig as cD, type KeyedViewConfig as cE, type KeyedViewDefinition as cF, type InferJsonSchema as cG, type JsonFieldValue as cH, type JsonSchema as cI, type JsonValue as cJ, and as cK, conditionRoot as cL, not as cM, or as cN, CONDITION_OPERATORS as cO, type ConditionArgument as cP, type ConditionOperator as cQ, type ConditionPath as cR, type ConditionScalar as cS, type ConditionTest as cT, type ConditionTests as cU, type OpenConditionChildren as cV, type paths as cW, type RetryConfig as cX, type MergedRelyIOConfig as cY, type ApiResponse as cZ, type ExtensionSurfaces as c_, defineWorkflowStage as ca, defineContentTypeWorkflow as cb, isWorkflowDefinition as cc, isWorkflowStageDefinition as cd, getWorkflowStageIds as ce, findWorkflowStage as cf, getNextWorkflowStage as cg, getFirstWorkflowStage as ch, isFinalWorkflowStage as ci, type WorkflowEscalation as cj, type WorkflowAutoAssign as ck, type WorkflowStageConfig as cl, type WorkflowStageDefinition as cm, type ContentTypeWorkflowConfig as cn, type KeyedWorkflowConfig as co, type KeyedWorkflowStageConfig as cp, type KeyedWorkflowStageDefinition as cq, type KeyedWorkflowStages as cr, defineView as cs, type ViewScopeConfig as ct, type ContentTypeScopeConfig as cu, type ContentTypesScopeConfig as cv, type EntryTypeScopeConfig as cw, type AllScopeConfig as cx, type ViewFilterOperator as cy, type ViewFilterValue as cz, type BooleanConfig as d, type ExtensionSurface as d0, type ActionField as d1, type ExtensionValueField as d2, SDKError as d3, type RelyIOConfig as d4, type RelyIOConfigUpdate as d5, type LiveWebSocket as d6, type LiveWebSocketConstructor as d7, type AssetFileBlock as d8, type AssetUrls as d9, type PerformanceMetrics as dA, type CacheConfig as dB, type DebugConfig as dC, type RequestConfig as dD, type CacheStrategy as dE, type LogLevel as dF, type Environment as dG, type ValidationViolation as dH, BaseValidationError as dI, ValidationError as dJ, InvalidPayloadError as dK, type ReadWhere as dL, type CheckedInclude as dM, type FieldDefinition as dN, type BaseContent as da, type BaseSingleton as db, type BaseSettingsGroup as dc, type WhereScalar as dd, type WhereFieldCondition as de, type WhereClause as df, type WhereOperator as dg, type DateOnlyOperator as dh, type CreateInput as di, type CreatedContent as dj, type RevisedContent as dk, type WrittenSingleton as dl, type WrittenSettingsGroup as dm, type RestoredContent as dn, type ContentVersion as dp, type ContentVersionRow as dq, type UpdateInput as dr, type SingletonContent as ds, type CustomQuery as dt, type ContentTypeSchema as du, type ValidationRule as dv, type FieldOptions as dw, type RealtimeEventType as dx, type RealtimeEvent as dy, type SubscriptionOptions as dz, type CodeConfig as e, type CounterConfig as f, type DateTimeConfig as g, type DecimalConfig as h, type EnumConfig as i, type FieldDefinition$1 as j, type FieldRule as k, type FieldType as l, type FieldUIConfig as m, type FileConfig as n, type KeyedField as o, type KeyedFieldOptions as p, type KeyedFields as q, type KeyedFieldsOf as r, type KeyedMembers as s, type KeyedMembersOf as t, type LocalizationConfig as u, type Localized as v, type LocalizedDetails as w, type LongTextConfig as x, type OwnerConfig as y, type ReferenceConfig as z };
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5WGMIQBH_cjs = require('../chunk-5WGMIQBH.cjs');
|
|
4
4
|
require('../chunk-L6DXCKVQ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "DEV_CONTEXT_DIR", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk5WGMIQBH_cjs.DEV_CONTEXT_DIR; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "DEV_CONTEXT_FILE", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk5WGMIQBH_cjs.DEV_CONTEXT_FILE; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "DEV_CONTEXT_FILENAME", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk5WGMIQBH_cjs.DEV_CONTEXT_FILENAME; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "DEV_ENV", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk5WGMIQBH_cjs.DEV_ENV; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "buildDevEnv", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk5WGMIQBH_cjs.buildDevEnv; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "parseDevContextFile", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk5WGMIQBH_cjs.parseDevContextFile; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "parseDevEnv", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk5WGMIQBH_cjs.parseDevEnv; }
|
|
35
35
|
});
|
|
36
36
|
//# sourceMappingURL=index.cjs.map
|
|
37
37
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -52,7 +52,7 @@ declare const DEV_ENV: {
|
|
|
52
52
|
interface DevContext {
|
|
53
53
|
/** Ephemeral sandbox dataset the app should read (`X-RelyIO-Dataset`). */
|
|
54
54
|
datasetId: string;
|
|
55
|
-
/** Scoped
|
|
55
|
+
/** Scoped preview key for the sandbox dataset: drafts, and writes to that dataset alone (REL-4048) (`X-API-Key`). */
|
|
56
56
|
previewApiKey: string;
|
|
57
57
|
/** Sandbox branch id — informational to the SDK; `relyio promote` identifies the sandbox by it. */
|
|
58
58
|
branchId: string;
|
|
@@ -52,7 +52,7 @@ declare const DEV_ENV: {
|
|
|
52
52
|
interface DevContext {
|
|
53
53
|
/** Ephemeral sandbox dataset the app should read (`X-RelyIO-Dataset`). */
|
|
54
54
|
datasetId: string;
|
|
55
|
-
/** Scoped
|
|
55
|
+
/** Scoped preview key for the sandbox dataset: drafts, and writes to that dataset alone (REL-4048) (`X-API-Key`). */
|
|
56
56
|
previewApiKey: string;
|
|
57
57
|
/** Sandbox branch id — informational to the SDK; `relyio promote` identifies the sandbox by it. */
|
|
58
58
|
branchId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DEV_CONTEXT_DIR, DEV_CONTEXT_FILE, DEV_CONTEXT_FILENAME, DEV_ENV, buildDevEnv, parseDevContextFile, parseDevEnv } from '../chunk-
|
|
1
|
+
export { DEV_CONTEXT_DIR, DEV_CONTEXT_FILE, DEV_CONTEXT_FILENAME, DEV_ENV, buildDevEnv, parseDevContextFile, parseDevEnv } from '../chunk-EQUZNVAR.js';
|
|
2
2
|
import '../chunk-DI6KFDBO.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkDBYMG6MQ_cjs = require('../chunk-DBYMG6MQ.cjs');
|
|
4
4
|
var chunk5F3YYPLZ_cjs = require('../chunk-5F3YYPLZ.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkUO2QRYKV_cjs = require('../chunk-UO2QRYKV.cjs');
|
|
6
6
|
var chunkL6DXCKVQ_cjs = require('../chunk-L6DXCKVQ.cjs');
|
|
7
7
|
|
|
8
8
|
/* RelyIO SDK - Built with ❤️ by the RelyIO Team */
|
|
9
9
|
|
|
10
10
|
// src/extensions/index.ts
|
|
11
11
|
var DECLARED = "declared";
|
|
12
|
-
var SURFACES =
|
|
12
|
+
var SURFACES = chunkUO2QRYKV_cjs.EXTENSION_SURFACES;
|
|
13
13
|
function fieldKindBuilder(slug, name, kind) {
|
|
14
14
|
return (options = {}) => {
|
|
15
15
|
const ui = options.ui;
|
|
@@ -17,7 +17,7 @@ function fieldKindBuilder(slug, name, kind) {
|
|
|
17
17
|
return chunk5F3YYPLZ_cjs.keyedField("reference", {
|
|
18
18
|
...options,
|
|
19
19
|
to: kind.base.to,
|
|
20
|
-
ui: { ...widget, [
|
|
20
|
+
ui: { ...widget, [chunkUO2QRYKV_cjs.CONTRIBUTED_FIELD_KIND_OPTION]: chunkUO2QRYKV_cjs.contributedFieldKindName(slug, name) }
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import '../define-content-type-
|
|
2
|
-
export {
|
|
1
|
+
import '../define-content-type-C2HnCYYX.cjs';
|
|
2
|
+
export { aY as ClaimsOf, aV as ContributedFieldKindBuilder, aU as ContributedFieldOptions, aW as ExtensionHandle, aQ as ExtensionSettings, aS as ExtensionTriggerHandle, aO as ExtensionUse, aR as ExtensionsConfig, aP as ExtensionsDeclaration, aX as ExtensionsFile, a_ as ExtensionsFileData, aT as HandleOf, aZ as defineExtensions, b0 as extensionsDeclarationOf, a$ as isExtensionsFile } from '../index-U5NbHg3N.cjs';
|
|
3
3
|
import '../rich-text.d-BWc-5gX1.cjs';
|
|
4
|
-
import '../register-DeMsaurp.cjs';
|
|
5
|
-
import '../define-schema-BPlZl4a2.cjs';
|
|
6
4
|
import '../schema/index.cjs';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import '../define-content-type-
|
|
2
|
-
export {
|
|
1
|
+
import '../define-content-type-CVLUusfx.js';
|
|
2
|
+
export { aY as ClaimsOf, aV as ContributedFieldKindBuilder, aU as ContributedFieldOptions, aW as ExtensionHandle, aQ as ExtensionSettings, aS as ExtensionTriggerHandle, aO as ExtensionUse, aR as ExtensionsConfig, aP as ExtensionsDeclaration, aX as ExtensionsFile, a_ as ExtensionsFileData, aT as HandleOf, aZ as defineExtensions, b0 as extensionsDeclarationOf, a$ as isExtensionsFile } from '../index-D0r6fnvl.js';
|
|
3
3
|
import '../rich-text.d-BWc-5gX1.js';
|
|
4
|
-
import '../register-BiMQKVp-.js';
|
|
5
|
-
import '../define-schema-CK7TtYot.js';
|
|
6
4
|
import '../schema/index.js';
|
package/dist/extensions/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { extensionTrigger } from '../chunk-W2GRVXDG.js';
|
|
2
2
|
import { keyedField } from '../chunk-PZCDJFMA.js';
|
|
3
|
-
import { contributedFieldKindName, CONTRIBUTED_FIELD_KIND_OPTION, EXTENSION_SURFACES } from '../chunk-
|
|
3
|
+
import { contributedFieldKindName, CONTRIBUTED_FIELD_KIND_OPTION, EXTENSION_SURFACES } from '../chunk-OUR7OUUZ.js';
|
|
4
4
|
import { __name } from '../chunk-DI6KFDBO.js';
|
|
5
5
|
|
|
6
6
|
/* RelyIO SDK - Built with ❤️ by the RelyIO Team */
|
package/dist/functions/index.cjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../register-DeMsaurp.cjs';
|
|
3
|
-
import '../define-schema-BPlZl4a2.cjs';
|
|
4
|
-
import '../define-content-type-BZ6X8GvL.cjs';
|
|
1
|
+
export { b7 as FunctionActionHandle, b6 as FunctionActionReach, bw as FunctionActionRefused, bv as FunctionActions, bm as FunctionBatchRefused, bl as FunctionBatchResult, by as FunctionCapabilities, bB as FunctionConfig, b2 as FunctionContainerSize, bu as FunctionContent, bh as FunctionCounterMove, be as FunctionDeclaration, bC as FunctionDefinition, b3 as FunctionDuration, bs as FunctionEndUser, br as FunctionEndUserClaims, bq as FunctionEndUsers, bd as FunctionFieldDeclaration, F as FunctionFieldValues, bg as FunctionFile, bD as FunctionInputOf, b5 as FunctionNetworkHost, bE as FunctionOutputOf, bk as FunctionRecordBatch, bi as FunctionRecordReader, bf as FunctionRecordTypeName, bj as FunctionRecordWriter, bo as FunctionRecords, bz as FunctionResponse, ba as FunctionRoute, b4 as FunctionRouteMethod, b9 as FunctionRouteSignature, bt as FunctionRunInfo, b1 as FunctionRuntime, bc as FunctionSchedule, b8 as FunctionSecretDeclaration, bb as FunctionTool, bp as FunctionWayIn, bF as defineFunction, bx as isActionRefused, bn as isBatchRefused, bG as isFunctionDefinition, bA as respond } from '../index-U5NbHg3N.cjs';
|
|
5
2
|
export { fields } from '../schema/index.cjs';
|
|
3
|
+
import '../define-content-type-C2HnCYYX.cjs';
|
|
6
4
|
import '../rich-text.d-BWc-5gX1.cjs';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../register-BiMQKVp-.js';
|
|
3
|
-
import '../define-schema-CK7TtYot.js';
|
|
4
|
-
import '../define-content-type-C12jh8cY.js';
|
|
1
|
+
export { b7 as FunctionActionHandle, b6 as FunctionActionReach, bw as FunctionActionRefused, bv as FunctionActions, bm as FunctionBatchRefused, bl as FunctionBatchResult, by as FunctionCapabilities, bB as FunctionConfig, b2 as FunctionContainerSize, bu as FunctionContent, bh as FunctionCounterMove, be as FunctionDeclaration, bC as FunctionDefinition, b3 as FunctionDuration, bs as FunctionEndUser, br as FunctionEndUserClaims, bq as FunctionEndUsers, bd as FunctionFieldDeclaration, F as FunctionFieldValues, bg as FunctionFile, bD as FunctionInputOf, b5 as FunctionNetworkHost, bE as FunctionOutputOf, bk as FunctionRecordBatch, bi as FunctionRecordReader, bf as FunctionRecordTypeName, bj as FunctionRecordWriter, bo as FunctionRecords, bz as FunctionResponse, ba as FunctionRoute, b4 as FunctionRouteMethod, b9 as FunctionRouteSignature, bt as FunctionRunInfo, b1 as FunctionRuntime, bc as FunctionSchedule, b8 as FunctionSecretDeclaration, bb as FunctionTool, bp as FunctionWayIn, bF as defineFunction, bx as isActionRefused, bn as isBatchRefused, bG as isFunctionDefinition, bA as respond } from '../index-D0r6fnvl.js';
|
|
5
2
|
export { fields } from '../schema/index.js';
|
|
3
|
+
import '../define-content-type-CVLUusfx.js';
|
|
6
4
|
import '../rich-text.d-BWc-5gX1.js';
|
package/dist/functions/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compileKeyedMembers } from '../chunk-PZCDJFMA.js';
|
|
2
2
|
export { fields } from '../chunk-PZCDJFMA.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-OUR7OUUZ.js';
|
|
4
4
|
import { __name } from '../chunk-DI6KFDBO.js';
|
|
5
5
|
|
|
6
6
|
/* RelyIO SDK - Built with ❤️ by the RelyIO Team */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { b as ApiPath, c as ApiMethod, Q as QueryOf, W as Wire, H as HttpClient, F as FunctionFieldValues, R as Register, A as AnySchemaDefinition, h as RecordsClient, B as BaseRecord, v as RecordBatchOperation, x as RecordBatchOptions, y as RecordBatchResult, a as RegisteredSchema } from './index-D0r6fnvl.js';
|
|
2
|
+
import { bi as EntryMetadata, aZ as Reading, da as BaseContent, aV as CheckedIncludes, dL as ReadWhere, df as WhereClause, ap as components, a_ as ReadWith, dr as UpdateInput, b1 as UntypedReading, dk as RevisedContent, di as CreateInput, dj as CreatedContent, dq as ContentVersionRow, dp as ContentVersion, dn as RestoredContent, d3 as SDKError, dI as BaseValidationError, dH as ValidationViolation, bw as AssetServedBlocks, dM as CheckedInclude, de as WhereFieldCondition, d8 as AssetFileBlock, db as BaseSingleton, dl as WrittenSingleton, dc as BaseSettingsGroup, dm as WrittenSettingsGroup, s as KeyedMembers, aB as InferContentType, aX as ContentReading, bn as InferSingleton, cW as paths, d4 as RelyIOConfig, bu as InferAssetType, aU as AssetReading, b0 as SingletonReading, br as InferSettingsGroup, a$ as SettingsReading, d5 as RelyIOConfigUpdate, cY as MergedRelyIOConfig } from './define-content-type-CVLUusfx.js';
|
|
3
|
+
import { SchemaContentTypeNames, SchemaEntryOf, SchemaLocaleCodes, SchemaSingletonNames, AggregateBlock, QueryParameterValue, FullTextSearch, SchemaQueryNames, InferQueryParams, AnyQueryParameters, SchemaRecordTypeNames, InferRecordType, RecordWriteFieldsOf, RecordUpdateFieldsOf, SchemaAssetTypeNames, SchemaSettingsGroupNames } from './schema/index.js';
|
|
4
4
|
import { DevUnreadableReason } from './dev-handshake/index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -803,7 +803,7 @@ declare class FileValidationError extends BaseValidationError {
|
|
|
803
803
|
}
|
|
804
804
|
/** Constraints `validateFile` checks a file against (subset of the schema upload gate). */
|
|
805
805
|
interface FileValidationConstraints {
|
|
806
|
-
/** Allowed MIME types
|
|
806
|
+
/** Allowed MIME types: exact (`image/png`) or a wildcard pattern (`image/*`), as a schema declares them. */
|
|
807
807
|
allowedMimeTypes?: string[];
|
|
808
808
|
/** Max size in bytes. */
|
|
809
809
|
maxSizeBytes?: number;
|
|
@@ -1504,15 +1504,56 @@ interface FunctionCallOptions {
|
|
|
1504
1504
|
*/
|
|
1505
1505
|
idempotencyKey?: string;
|
|
1506
1506
|
}
|
|
1507
|
-
/** One Function, called
|
|
1507
|
+
/** One Function, called, before `Register` names the project's Functions: any input, any answer. */
|
|
1508
1508
|
type FunctionCall = (input?: Record<string, unknown>, options?: FunctionCallOptions) => Promise<unknown>;
|
|
1509
1509
|
/**
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1510
|
+
* One Function's input and output Fields, as the generated `schema.ts` registers them (REL-4059): the
|
|
1511
|
+
* keyed record its file declares under `input`, and under `output` when it declares one.
|
|
1512
1512
|
*/
|
|
1513
|
-
|
|
1513
|
+
interface RegisteredFunctionFields {
|
|
1514
|
+
readonly input: KeyedMembers;
|
|
1515
|
+
readonly output?: KeyedMembers;
|
|
1516
|
+
}
|
|
1517
|
+
/** What a registered Function's call answers: its output's values, or what its run returned when it declares none. */
|
|
1518
|
+
type OutputOf<F extends RegisteredFunctionFields> = F extends {
|
|
1519
|
+
readonly output: infer O extends KeyedMembers;
|
|
1520
|
+
} ? FunctionFieldValues<O> : unknown;
|
|
1521
|
+
/**
|
|
1522
|
+
* What a registered Function's call takes: its input Fields' values. A Function declaring no input
|
|
1523
|
+
* field takes none — `{}` would take any key, since an empty object type has no excess-property check.
|
|
1524
|
+
*/
|
|
1525
|
+
type InputOf<F extends RegisteredFunctionFields> = [keyof FunctionFieldValues<F['input']>] extends [
|
|
1526
|
+
never
|
|
1527
|
+
] ? {
|
|
1528
|
+
readonly [field: string]: never;
|
|
1529
|
+
} : FunctionFieldValues<F['input']>;
|
|
1530
|
+
/**
|
|
1531
|
+
* One registered Function, called: its input as its input Fields declare them — required when a
|
|
1532
|
+
* field of it is, so a missing, misnamed or mistyped field is a type error — and its output.
|
|
1533
|
+
*/
|
|
1534
|
+
type TypedFunctionCall<F extends RegisteredFunctionFields> = {} extends InputOf<F> ? (input?: InputOf<F>, options?: FunctionCallOptions) => Promise<OutputOf<F>> : (input: InputOf<F>, options?: FunctionCallOptions) => Promise<OutputOf<F>>;
|
|
1535
|
+
/**
|
|
1536
|
+
* `relyio.functions` over a project's Functions: exactly those registered, each typed by its Fields,
|
|
1537
|
+
* or any name before `relyio generate-types` registered any. Generic on purpose, as
|
|
1538
|
+
* `FunctionRecordTypeName` is: written over `Register` directly, the conditional can be resolved
|
|
1539
|
+
* before the program's augmentation is in view.
|
|
1540
|
+
*/
|
|
1541
|
+
type FunctionsAccessorOf<R> = R extends {
|
|
1542
|
+
readonly functions: infer F extends {
|
|
1543
|
+
readonly [name: string]: RegisteredFunctionFields;
|
|
1544
|
+
};
|
|
1545
|
+
} ? {
|
|
1546
|
+
readonly [N in keyof F]: TypedFunctionCall<F[N]>;
|
|
1547
|
+
} : {
|
|
1514
1548
|
readonly [name: string]: FunctionCall;
|
|
1515
1549
|
};
|
|
1550
|
+
/**
|
|
1551
|
+
* `relyio.functions`: every Function the key's Branch runs, by name. Once `relyio generate-types`
|
|
1552
|
+
* has registered the project's Functions (`Register`'s `functions`), only those names are on it and
|
|
1553
|
+
* each call is typed by its input and output Fields; before, any name, untyped. A name the Branch
|
|
1554
|
+
* does not run is refused by the service (`ResourceNotFoundError`), not here.
|
|
1555
|
+
*/
|
|
1556
|
+
type FunctionsAccessor = FunctionsAccessorOf<Register>;
|
|
1516
1557
|
|
|
1517
1558
|
/**
|
|
1518
1559
|
* What the search family's routes answer, read from the committed document, and what a search over
|
|
@@ -2600,9 +2641,13 @@ declare class TypedRelyIOClient<TSchema extends AnySchemaDefinition | undefined
|
|
|
2600
2641
|
* `FunctionRunFailedError` and one past five minutes `FunctionRunTimedOutError`, each naming the
|
|
2601
2642
|
* run. Never retried: a Function may write.
|
|
2602
2643
|
*
|
|
2644
|
+
* Once `relyio generate-types` has run, its `schema.ts` registers each Function's input and output
|
|
2645
|
+
* Fields (REL-4059): only the project's Functions are named here, and each call takes and answers
|
|
2646
|
+
* what its Fields declare, so a misnamed or mistyped input field is a type error.
|
|
2647
|
+
*
|
|
2603
2648
|
* @example
|
|
2604
2649
|
* ```typescript
|
|
2605
|
-
* const { orderId } =
|
|
2650
|
+
* const { orderId } = await relyio.functions.checkout({ cartId })
|
|
2606
2651
|
* ```
|
|
2607
2652
|
*/
|
|
2608
2653
|
readonly functions: FunctionsAccessor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { b as ApiPath, c as ApiMethod, Q as QueryOf, W as Wire, H as HttpClient, F as FunctionFieldValues, R as Register, A as AnySchemaDefinition, h as RecordsClient, B as BaseRecord, v as RecordBatchOperation, x as RecordBatchOptions, y as RecordBatchResult, a as RegisteredSchema } from './index-U5NbHg3N.cjs';
|
|
2
|
+
import { bi as EntryMetadata, aZ as Reading, da as BaseContent, aV as CheckedIncludes, dL as ReadWhere, df as WhereClause, ap as components, a_ as ReadWith, dr as UpdateInput, b1 as UntypedReading, dk as RevisedContent, di as CreateInput, dj as CreatedContent, dq as ContentVersionRow, dp as ContentVersion, dn as RestoredContent, d3 as SDKError, dI as BaseValidationError, dH as ValidationViolation, bw as AssetServedBlocks, dM as CheckedInclude, de as WhereFieldCondition, d8 as AssetFileBlock, db as BaseSingleton, dl as WrittenSingleton, dc as BaseSettingsGroup, dm as WrittenSettingsGroup, s as KeyedMembers, aB as InferContentType, aX as ContentReading, bn as InferSingleton, cW as paths, d4 as RelyIOConfig, bu as InferAssetType, aU as AssetReading, b0 as SingletonReading, br as InferSettingsGroup, a$ as SettingsReading, d5 as RelyIOConfigUpdate, cY as MergedRelyIOConfig } from './define-content-type-C2HnCYYX.cjs';
|
|
3
|
+
import { SchemaContentTypeNames, SchemaEntryOf, SchemaLocaleCodes, SchemaSingletonNames, AggregateBlock, QueryParameterValue, FullTextSearch, SchemaQueryNames, InferQueryParams, AnyQueryParameters, SchemaRecordTypeNames, InferRecordType, RecordWriteFieldsOf, RecordUpdateFieldsOf, SchemaAssetTypeNames, SchemaSettingsGroupNames } from './schema/index.cjs';
|
|
4
4
|
import { DevUnreadableReason } from './dev-handshake/index.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -803,7 +803,7 @@ declare class FileValidationError extends BaseValidationError {
|
|
|
803
803
|
}
|
|
804
804
|
/** Constraints `validateFile` checks a file against (subset of the schema upload gate). */
|
|
805
805
|
interface FileValidationConstraints {
|
|
806
|
-
/** Allowed MIME types
|
|
806
|
+
/** Allowed MIME types: exact (`image/png`) or a wildcard pattern (`image/*`), as a schema declares them. */
|
|
807
807
|
allowedMimeTypes?: string[];
|
|
808
808
|
/** Max size in bytes. */
|
|
809
809
|
maxSizeBytes?: number;
|
|
@@ -1504,15 +1504,56 @@ interface FunctionCallOptions {
|
|
|
1504
1504
|
*/
|
|
1505
1505
|
idempotencyKey?: string;
|
|
1506
1506
|
}
|
|
1507
|
-
/** One Function, called
|
|
1507
|
+
/** One Function, called, before `Register` names the project's Functions: any input, any answer. */
|
|
1508
1508
|
type FunctionCall = (input?: Record<string, unknown>, options?: FunctionCallOptions) => Promise<unknown>;
|
|
1509
1509
|
/**
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1510
|
+
* One Function's input and output Fields, as the generated `schema.ts` registers them (REL-4059): the
|
|
1511
|
+
* keyed record its file declares under `input`, and under `output` when it declares one.
|
|
1512
1512
|
*/
|
|
1513
|
-
|
|
1513
|
+
interface RegisteredFunctionFields {
|
|
1514
|
+
readonly input: KeyedMembers;
|
|
1515
|
+
readonly output?: KeyedMembers;
|
|
1516
|
+
}
|
|
1517
|
+
/** What a registered Function's call answers: its output's values, or what its run returned when it declares none. */
|
|
1518
|
+
type OutputOf<F extends RegisteredFunctionFields> = F extends {
|
|
1519
|
+
readonly output: infer O extends KeyedMembers;
|
|
1520
|
+
} ? FunctionFieldValues<O> : unknown;
|
|
1521
|
+
/**
|
|
1522
|
+
* What a registered Function's call takes: its input Fields' values. A Function declaring no input
|
|
1523
|
+
* field takes none — `{}` would take any key, since an empty object type has no excess-property check.
|
|
1524
|
+
*/
|
|
1525
|
+
type InputOf<F extends RegisteredFunctionFields> = [keyof FunctionFieldValues<F['input']>] extends [
|
|
1526
|
+
never
|
|
1527
|
+
] ? {
|
|
1528
|
+
readonly [field: string]: never;
|
|
1529
|
+
} : FunctionFieldValues<F['input']>;
|
|
1530
|
+
/**
|
|
1531
|
+
* One registered Function, called: its input as its input Fields declare them — required when a
|
|
1532
|
+
* field of it is, so a missing, misnamed or mistyped field is a type error — and its output.
|
|
1533
|
+
*/
|
|
1534
|
+
type TypedFunctionCall<F extends RegisteredFunctionFields> = {} extends InputOf<F> ? (input?: InputOf<F>, options?: FunctionCallOptions) => Promise<OutputOf<F>> : (input: InputOf<F>, options?: FunctionCallOptions) => Promise<OutputOf<F>>;
|
|
1535
|
+
/**
|
|
1536
|
+
* `relyio.functions` over a project's Functions: exactly those registered, each typed by its Fields,
|
|
1537
|
+
* or any name before `relyio generate-types` registered any. Generic on purpose, as
|
|
1538
|
+
* `FunctionRecordTypeName` is: written over `Register` directly, the conditional can be resolved
|
|
1539
|
+
* before the program's augmentation is in view.
|
|
1540
|
+
*/
|
|
1541
|
+
type FunctionsAccessorOf<R> = R extends {
|
|
1542
|
+
readonly functions: infer F extends {
|
|
1543
|
+
readonly [name: string]: RegisteredFunctionFields;
|
|
1544
|
+
};
|
|
1545
|
+
} ? {
|
|
1546
|
+
readonly [N in keyof F]: TypedFunctionCall<F[N]>;
|
|
1547
|
+
} : {
|
|
1514
1548
|
readonly [name: string]: FunctionCall;
|
|
1515
1549
|
};
|
|
1550
|
+
/**
|
|
1551
|
+
* `relyio.functions`: every Function the key's Branch runs, by name. Once `relyio generate-types`
|
|
1552
|
+
* has registered the project's Functions (`Register`'s `functions`), only those names are on it and
|
|
1553
|
+
* each call is typed by its input and output Fields; before, any name, untyped. A name the Branch
|
|
1554
|
+
* does not run is refused by the service (`ResourceNotFoundError`), not here.
|
|
1555
|
+
*/
|
|
1556
|
+
type FunctionsAccessor = FunctionsAccessorOf<Register>;
|
|
1516
1557
|
|
|
1517
1558
|
/**
|
|
1518
1559
|
* What the search family's routes answer, read from the committed document, and what a search over
|
|
@@ -2600,9 +2641,13 @@ declare class TypedRelyIOClient<TSchema extends AnySchemaDefinition | undefined
|
|
|
2600
2641
|
* `FunctionRunFailedError` and one past five minutes `FunctionRunTimedOutError`, each naming the
|
|
2601
2642
|
* run. Never retried: a Function may write.
|
|
2602
2643
|
*
|
|
2644
|
+
* Once `relyio generate-types` has run, its `schema.ts` registers each Function's input and output
|
|
2645
|
+
* Fields (REL-4059): only the project's Functions are named here, and each call takes and answers
|
|
2646
|
+
* what its Fields declare, so a misnamed or mistyped input field is a type error.
|
|
2647
|
+
*
|
|
2603
2648
|
* @example
|
|
2604
2649
|
* ```typescript
|
|
2605
|
-
* const { orderId } =
|
|
2650
|
+
* const { orderId } = await relyio.functions.checkout({ cartId })
|
|
2606
2651
|
* ```
|
|
2607
2652
|
*/
|
|
2608
2653
|
readonly functions: FunctionsAccessor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { k as RichTextHeading, b as RichTextValue, y as RichTextTable, h as RichTextCodeGroup, e as RichTextBlock, l as RichTextInline, t as RichTextNode, w as RichTextSpan, r as RichTextMark, A as AnyRichTextEntryLink, c as RichTextShapeValue } from './rich-text.d-BWc-5gX1.js';
|
|
2
|
-
import { da as BaseContent } from './define-content-type-
|
|
2
|
+
import { da as BaseContent } from './define-content-type-CVLUusfx.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The DOM↔field binding contract, as the one pure helper that emits it.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { k as RichTextHeading, b as RichTextValue, y as RichTextTable, h as RichTextCodeGroup, e as RichTextBlock, l as RichTextInline, t as RichTextNode, w as RichTextSpan, r as RichTextMark, A as AnyRichTextEntryLink, c as RichTextShapeValue } from './rich-text.d-BWc-5gX1.cjs';
|
|
2
|
-
import { da as BaseContent } from './define-content-type-
|
|
2
|
+
import { da as BaseContent } from './define-content-type-C2HnCYYX.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The DOM↔field binding contract, as the one pure helper that emits it.
|