@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.
Files changed (54) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/automations/index.cjs +1 -1
  3. package/dist/automations/index.d.cts +2 -1588
  4. package/dist/automations/index.d.ts +2 -1588
  5. package/dist/automations/index.js +1 -1
  6. package/dist/{chunk-ZO6QDYJG.cjs → chunk-5WGMIQBH.cjs} +2 -2
  7. package/dist/{chunk-W2A4OTCI.js → chunk-EQUZNVAR.js} +2 -2
  8. package/dist/{chunk-P23G5NXD.cjs → chunk-K66MBRI4.cjs} +68 -51
  9. package/dist/{chunk-356SF5Y2.js → chunk-L42C4G2S.js} +25 -8
  10. package/dist/{chunk-T7LGREB3.js → chunk-OUR7OUUZ.js} +3 -3
  11. package/dist/{chunk-NN45CSPZ.cjs → chunk-UO2QRYKV.cjs} +3 -3
  12. package/dist/client/index.cjs +5 -5
  13. package/dist/client/index.d.cts +4 -4
  14. package/dist/client/index.d.ts +4 -4
  15. package/dist/client/index.js +3 -3
  16. package/dist/{define-content-type-BZ6X8GvL.d.cts → define-content-type-C2HnCYYX.d.cts} +1 -1
  17. package/dist/{define-content-type-C12jh8cY.d.ts → define-content-type-CVLUusfx.d.ts} +1 -1
  18. package/dist/dev-handshake/index.cjs +8 -8
  19. package/dist/dev-handshake/index.d.cts +1 -1
  20. package/dist/dev-handshake/index.d.ts +1 -1
  21. package/dist/dev-handshake/index.js +1 -1
  22. package/dist/extensions/index.cjs +3 -3
  23. package/dist/extensions/index.d.cts +2 -4
  24. package/dist/extensions/index.d.ts +2 -4
  25. package/dist/extensions/index.js +1 -1
  26. package/dist/functions/index.cjs +1 -1
  27. package/dist/functions/index.d.cts +2 -4
  28. package/dist/functions/index.d.ts +2 -4
  29. package/dist/functions/index.js +1 -1
  30. package/dist/{index-BxNnlc5D.d.ts → index-BAdue7TR.d.ts} +54 -9
  31. package/dist/{index-D5jyIeQ5.d.cts → index-BNf3S9W9.d.cts} +54 -9
  32. package/dist/{index-C-MymZTe.d.ts → index-BY1xU93u.d.ts} +1 -1
  33. package/dist/{index-DN0l8RHw.d.cts → index-Cmup6HJY.d.cts} +1 -1
  34. package/dist/index-D0r6fnvl.d.ts +2304 -0
  35. package/dist/index-U5NbHg3N.d.cts +2304 -0
  36. package/dist/index.cjs +76 -76
  37. package/dist/index.d.cts +7 -8
  38. package/dist/index.d.ts +7 -8
  39. package/dist/index.js +4 -4
  40. package/dist/preview/index.cjs +3 -3
  41. package/dist/preview/index.js +1 -1
  42. package/dist/rich-text/index.d.cts +2 -2
  43. package/dist/rich-text/index.d.ts +2 -2
  44. package/dist/schema/index.cjs +1 -1
  45. package/dist/schema/index.d.cts +947 -4
  46. package/dist/schema/index.d.ts +947 -4
  47. package/dist/schema/index.js +1 -1
  48. package/dist/types/index.d.cts +1 -1
  49. package/dist/types/index.d.ts +1 -1
  50. package/package.json +5 -5
  51. package/dist/define-schema-BPlZl4a2.d.cts +0 -947
  52. package/dist/define-schema-CK7TtYot.d.ts +0 -947
  53. package/dist/register-BiMQKVp-.d.ts +0 -693
  54. 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 { code as $, type AIConfig as A, type BaseFieldConfig as B, type CodeConfig as C, type DateConfig as D, type EmailConfig as E, type FieldAIConfig as F, type RichTextConfig as G, type RichTextLinks as H, type IntegerConfig as I, type JsonConfig as J, type KeyedEnumConfig as K, type ListConfig as L, type RuleCondition as M, type NeverUniqueFieldConfig as N, type ObjectConfig as O, type RuleConditions as P, type ShortTextConfig as Q, type ReadOnlyRule as R, type SequenceConfig as S, type SlugConfig as T, type TableConfig as U, type TagsConfig as V, type UrlConfig as W, type ValidationRule$1 as X, type VisibilityRule as Y, type WidgetOptions as Z, boolean as _, type AnyFieldDefinition as a, type SingletonContentTypeDefinition as a$, counter as a0, date as a1, dateTime as a2, decimal as a3, email as a4, enumField as a5, file as a6, integer as a7, json as a8, list as a9, type SettingsReading as aA, type SingletonReading as aB, type UntypedReading as aC, defineLocale as aD, isLocaleDefinition as aE, getLocaleCodes as aF, findDefaultLocale as aG, getActiveLocales as aH, buildFallbackChain as aI, type TextDirection as aJ, type LocaleOptions as aK, type LocaleDefinition as aL, defineContentType as aM, fieldset as aN, type Fieldset as aO, type DeclaredFieldset as aP, type AnyDeclaredFieldset as aQ, type KeyedFieldsetConfig as aR, type FieldMember as aS, type KeyedContentTypeConfig as aT, type ContentTypeEndUsers as aU, type ContentTypeDefinition as aV, type EntryMetadata as aW, type InferContentType as aX, type LocalePublicationFields as aY, defineSingleton as aZ, type KeyedSingletonConfig as a_, longText as aa, object as ab, owner as ac, reference as ad, richText as ae, sequence as af, shortText as ag, slug as ah, table as ai, tags as aj, url as ak, type FieldSchemaContext as al, type FieldValue as am, type FieldValues as an, type DeclaredFields as ao, type UnresolvedEntry as ap, type Keyed as aq, type BlockOf as ar, type ShapeValue as as, type AssetReading as at, type CheckedIncludes as au, type CheckInclude as av, type ContentReading as aw, type IncludablePaths as ax, type Reading as ay, type ReadWith as az, type AnyKeyedField as b, getNextWorkflowStage as b$, type SingletonMetadata as b0, type InferSingleton as b1, defineSettingsGroup as b2, type KeyedSettingsGroupConfig as b3, type SettingsGroupDefinition as b4, type SettingsGroupMetadata as b5, type InferSettingsGroup as b6, defineAssetType as b7, type KeyedAssetTypeConfig as b8, type AssetTypeDefinition as b9, type RollupWhereValue as bA, type StoredRollup as bB, type RollupsOf as bC, defineRole as bD, isRoleDefinition as bE, isBuiltInRole as bF, getBuiltInRoleActions as bG, BUILT_IN_ROLES as bH, ROLE_ACTIONS as bI, BUILT_IN_ROLE_ACTIONS as bJ, type BuiltInRole as bK, type RoleAction as bL, type ResourcePermission as bM, type FieldVisibility as bN, type RoleConfig as bO, type RoleDefinition as bP, type KeyedRoleConfig as bQ, type KeyedRoleDefinition as bR, type KeyedRoles as bS, type KeyedRolesAsList as bT, defineWorkflow as bU, defineWorkflowStage as bV, defineContentTypeWorkflow as bW, isWorkflowDefinition as bX, isWorkflowStageDefinition as bY, getWorkflowStageIds as bZ, findWorkflowStage as b_, type InferAssetType as ba, type InferAssetEntry as bb, type AssetServedBlocks as bc, type ImageKindConfig as bd, type VideoKindConfig as be, type FileKindConfig as bf, type ImageTransform as bg, type ImageFitMode as bh, type ImageOutputFormat as bi, type ImageUploadConfig as bj, type ImageSourceConfig as bk, type ImageExifConfig as bl, type VariantDefinition as bm, type VideoUploadConfig as bn, type VideoPosterConfig as bo, type VideoCaptionsConfig as bp, type VideoDownloadConfig as bq, type VideoWatermarkConfig as br, type FileUploadConfig as bs, type FileScanConfig as bt, rollup as bu, type KeyedRollups as bv, type RollupDefinition as bw, type RollupKind as bx, type RollupOptions as by, type RollupValues as bz, type AssetAIConfig as c, type paths as c$, getFirstWorkflowStage as c0, isFinalWorkflowStage as c1, type WorkflowEscalation as c2, type WorkflowAutoAssign as c3, type WorkflowStageConfig as c4, type WorkflowStageDefinition as c5, type WorkflowDefinition as c6, type ContentTypeWorkflowConfig as c7, type KeyedWorkflowConfig as c8, type KeyedWorkflowStageConfig as c9, conditionRoot as cA, not as cB, or as cC, CONDITION_OPERATORS as cD, type ConditionArgument as cE, type ConditionOperator as cF, type ConditionPath as cG, type ConditionScalar as cH, type ConditionTest as cI, type ConditionTests as cJ, type ConditionTree as cK, type OpenConditionChildren as cL, type ExtensionSurfaces as cM, type ExtensionSettingField as cN, type ExtensionSurface as cO, type ActionField as cP, type ExtensionValueField as cQ, type components as cR, type DisplayFieldOf as cS, type CheckedLocales as cT, type CheckedRoles as cU, type CheckedWorkflow as cV, type CheckedSection as cW, type KeysDeclared as cX, type ContributedRecordType as cY, type LocaleCodesOf as cZ, type StagesDeclared as c_, type KeyedWorkflowStageDefinition as ca, type KeyedWorkflowStages as cb, defineView as cc, type ViewScopeConfig as cd, type ContentTypeScopeConfig as ce, type ContentTypesScopeConfig as cf, type EntryTypeScopeConfig as cg, type AllScopeConfig as ch, type ViewFilterOperator as ci, type ViewFilterValue as cj, type ViewFilterRelativeDate as ck, type ViewFilterCondition as cl, type ViewFilter as cm, type ViewConfig as cn, type ViewDefinition as co, type KeyedViewConfig as cp, type KeyedViewDefinition as cq, type KeyedViews as cr, type KeyedViewsAsList as cs, type InferJsonSchema as ct, type JsonFieldValue as cu, type JsonSchema as cv, type JsonValue as cw, type FileUpload as cx, type RecordFile as cy, and as cz, type BooleanConfig as d, type RetryConfig as d0, type MergedRelyIOConfig as d1, type ApiResponse 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 CounterConfig as e, type DateTimeConfig as f, type DecimalConfig as g, type EnumConfig as h, type FieldDefinition$1 as i, type FieldRule as j, type FieldType as k, type FieldUIConfig as l, type FileConfig as m, type KeyedField as n, type KeyedFieldOptions as o, type KeyedFields as p, type KeyedFieldsOf as q, type KeyedMembers as r, type KeyedMembersOf as s, type LocalizationConfig as t, type Localized as u, type LocalizedDetails as v, type LongTextConfig as w, type OwnerConfig as x, type ReferenceConfig as y, type RequirementRule as z };
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 chunkZO6QDYJG_cjs = require('../chunk-ZO6QDYJG.cjs');
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 chunkZO6QDYJG_cjs.DEV_CONTEXT_DIR; }
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 chunkZO6QDYJG_cjs.DEV_CONTEXT_FILE; }
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 chunkZO6QDYJG_cjs.DEV_CONTEXT_FILENAME; }
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 chunkZO6QDYJG_cjs.DEV_ENV; }
22
+ get: function () { return chunk5WGMIQBH_cjs.DEV_ENV; }
23
23
  });
24
24
  Object.defineProperty(exports, "buildDevEnv", {
25
25
  enumerable: true,
26
- get: function () { return chunkZO6QDYJG_cjs.buildDevEnv; }
26
+ get: function () { return chunk5WGMIQBH_cjs.buildDevEnv; }
27
27
  });
28
28
  Object.defineProperty(exports, "parseDevContextFile", {
29
29
  enumerable: true,
30
- get: function () { return chunkZO6QDYJG_cjs.parseDevContextFile; }
30
+ get: function () { return chunk5WGMIQBH_cjs.parseDevContextFile; }
31
31
  });
32
32
  Object.defineProperty(exports, "parseDevEnv", {
33
33
  enumerable: true,
34
- get: function () { return chunkZO6QDYJG_cjs.parseDevEnv; }
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 read-only preview key for the sandbox dataset (`X-API-Key`). */
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 read-only preview key for the sandbox dataset (`X-API-Key`). */
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-W2A4OTCI.js';
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 chunkNN45CSPZ_cjs = require('../chunk-NN45CSPZ.cjs');
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 = chunkNN45CSPZ_cjs.EXTENSION_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, [chunkNN45CSPZ_cjs.CONTRIBUTED_FIELD_KIND_OPTION]: chunkNN45CSPZ_cjs.contributedFieldKindName(slug, name) }
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-BZ6X8GvL.cjs';
2
- export { h as ClaimsOf, e as ContributedFieldKindBuilder, C as ContributedFieldOptions, f as ExtensionHandle, b as ExtensionSettings, d as ExtensionTriggerHandle, E as ExtensionUse, c as ExtensionsConfig, a as ExtensionsDeclaration, g as ExtensionsFile, j as ExtensionsFileData, H as HandleOf, i as defineExtensions, l as extensionsDeclarationOf, k as isExtensionsFile } from '../automations/index.cjs';
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-C12jh8cY.js';
2
- export { h as ClaimsOf, e as ContributedFieldKindBuilder, C as ContributedFieldOptions, f as ExtensionHandle, b as ExtensionSettings, d as ExtensionTriggerHandle, E as ExtensionUse, c as ExtensionsConfig, a as ExtensionsDeclaration, g as ExtensionsFile, j as ExtensionsFileData, H as HandleOf, i as defineExtensions, l as extensionsDeclarationOf, k as isExtensionsFile } from '../automations/index.js';
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';
@@ -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-T7LGREB3.js';
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 */
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk5F3YYPLZ_cjs = require('../chunk-5F3YYPLZ.cjs');
4
- require('../chunk-NN45CSPZ.cjs');
4
+ require('../chunk-UO2QRYKV.cjs');
5
5
  var chunkL6DXCKVQ_cjs = require('../chunk-L6DXCKVQ.cjs');
6
6
 
7
7
  /* RelyIO SDK - Built with ❤️ by the RelyIO Team */
@@ -1,6 +1,4 @@
1
- export { r as FunctionActionHandle, q as FunctionActionReach, T as FunctionActionRefused, S as FunctionActions, J as FunctionBatchRefused, I as FunctionBatchResult, V as FunctionCapabilities, Y as FunctionConfig, m as FunctionContainerSize, R as FunctionContent, A as FunctionCounterMove, x as FunctionDeclaration, Z as FunctionDefinition, n as FunctionDuration, P as FunctionEndUser, O as FunctionEndUserClaims, N as FunctionEndUsers, w as FunctionFieldDeclaration, z as FunctionFile, _ as FunctionInputOf, p as FunctionNetworkHost, $ as FunctionOutputOf, G as FunctionRecordBatch, B as FunctionRecordReader, y as FunctionRecordTypeName, D as FunctionRecordWriter, L as FunctionRecords, W as FunctionResponse, t as FunctionRoute, o as FunctionRouteMethod, Q as FunctionRunInfo, F as FunctionRuntime, v as FunctionSchedule, s as FunctionSecretDeclaration, u as FunctionTool, M as FunctionWayIn, a0 as defineFunction, U as isActionRefused, K as isBatchRefused, a1 as isFunctionDefinition, X as respond } from '../automations/index.cjs';
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 { r as FunctionActionHandle, q as FunctionActionReach, T as FunctionActionRefused, S as FunctionActions, J as FunctionBatchRefused, I as FunctionBatchResult, V as FunctionCapabilities, Y as FunctionConfig, m as FunctionContainerSize, R as FunctionContent, A as FunctionCounterMove, x as FunctionDeclaration, Z as FunctionDefinition, n as FunctionDuration, P as FunctionEndUser, O as FunctionEndUserClaims, N as FunctionEndUsers, w as FunctionFieldDeclaration, z as FunctionFile, _ as FunctionInputOf, p as FunctionNetworkHost, $ as FunctionOutputOf, G as FunctionRecordBatch, B as FunctionRecordReader, y as FunctionRecordTypeName, D as FunctionRecordWriter, L as FunctionRecords, W as FunctionResponse, t as FunctionRoute, o as FunctionRouteMethod, Q as FunctionRunInfo, F as FunctionRuntime, v as FunctionSchedule, s as FunctionSecretDeclaration, u as FunctionTool, M as FunctionWayIn, a0 as defineFunction, U as isActionRefused, K as isBatchRefused, a1 as isFunctionDefinition, X as respond } from '../automations/index.js';
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';
@@ -1,6 +1,6 @@
1
1
  import { compileKeyedMembers } from '../chunk-PZCDJFMA.js';
2
2
  export { fields } from '../chunk-PZCDJFMA.js';
3
- import '../chunk-T7LGREB3.js';
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 { e as ApiPath, f as ApiMethod, Q as QueryOf, W as Wire, H as HttpClient, A as AnySchemaDefinition, l as RecordsClient, B as BaseRecord, y as RecordBatchOperation, C as RecordBatchOptions, b as RecordBatchResult, R as RegisteredSchema } from './register-BiMQKVp-.js';
2
- import { aW as EntryMetadata, ay as Reading, da as BaseContent, au as CheckedIncludes, dL as ReadWhere, df as WhereClause, cR as components, az as ReadWith, dr as UpdateInput, aC 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, bc as AssetServedBlocks, dM as CheckedInclude, de as WhereFieldCondition, d8 as AssetFileBlock, db as BaseSingleton, dl as WrittenSingleton, dc as BaseSettingsGroup, dm as WrittenSettingsGroup, aX as InferContentType, aw as ContentReading, b1 as InferSingleton, c$ as paths, d4 as RelyIOConfig, ba as InferAssetType, at as AssetReading, aB as SingletonReading, b6 as InferSettingsGroup, aA as SettingsReading, d5 as RelyIOConfigUpdate, d1 as MergedRelyIOConfig } from './define-content-type-C12jh8cY.js';
3
- import { b as SchemaContentTypeNames, k as SchemaEntryOf, f as SchemaLocaleCodes, c as SchemaSingletonNames, y as AggregateBlock, a5 as QueryParameterValue, w as FullTextSearch, e as SchemaQueryNames, a4 as InferQueryParams, a6 as AnyQueryParameters, i as SchemaRecordTypeNames, I as InferRecordType, r as RecordWriteFieldsOf, q as RecordUpdateFieldsOf, h as SchemaAssetTypeNames, g as SchemaSettingsGroupNames } from './define-schema-CK7TtYot.js';
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 (exact match). */
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: its input, as its input Fields declare it, and its output. */
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
- * `relyio.functions`: every Function the key's Branch runs, by name. A name the Branch does not run
1511
- * is refused by the service (`ResourceNotFoundError`), not here.
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
- type FunctionsAccessor = {
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 } = (await relyio.functions.checkout({ cartId })) as { orderId: string }
2650
+ * const { orderId } = await relyio.functions.checkout({ cartId })
2606
2651
  * ```
2607
2652
  */
2608
2653
  readonly functions: FunctionsAccessor;
@@ -1,6 +1,6 @@
1
- import { e as ApiPath, f as ApiMethod, Q as QueryOf, W as Wire, H as HttpClient, A as AnySchemaDefinition, l as RecordsClient, B as BaseRecord, y as RecordBatchOperation, C as RecordBatchOptions, b as RecordBatchResult, R as RegisteredSchema } from './register-DeMsaurp.cjs';
2
- import { aW as EntryMetadata, ay as Reading, da as BaseContent, au as CheckedIncludes, dL as ReadWhere, df as WhereClause, cR as components, az as ReadWith, dr as UpdateInput, aC 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, bc as AssetServedBlocks, dM as CheckedInclude, de as WhereFieldCondition, d8 as AssetFileBlock, db as BaseSingleton, dl as WrittenSingleton, dc as BaseSettingsGroup, dm as WrittenSettingsGroup, aX as InferContentType, aw as ContentReading, b1 as InferSingleton, c$ as paths, d4 as RelyIOConfig, ba as InferAssetType, at as AssetReading, aB as SingletonReading, b6 as InferSettingsGroup, aA as SettingsReading, d5 as RelyIOConfigUpdate, d1 as MergedRelyIOConfig } from './define-content-type-BZ6X8GvL.cjs';
3
- import { b as SchemaContentTypeNames, k as SchemaEntryOf, f as SchemaLocaleCodes, c as SchemaSingletonNames, y as AggregateBlock, a5 as QueryParameterValue, w as FullTextSearch, e as SchemaQueryNames, a4 as InferQueryParams, a6 as AnyQueryParameters, i as SchemaRecordTypeNames, I as InferRecordType, r as RecordWriteFieldsOf, q as RecordUpdateFieldsOf, h as SchemaAssetTypeNames, g as SchemaSettingsGroupNames } from './define-schema-BPlZl4a2.cjs';
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 (exact match). */
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: its input, as its input Fields declare it, and its output. */
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
- * `relyio.functions`: every Function the key's Branch runs, by name. A name the Branch does not run
1511
- * is refused by the service (`ResourceNotFoundError`), not here.
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
- type FunctionsAccessor = {
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 } = (await relyio.functions.checkout({ cartId })) as { orderId: string }
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-C12jh8cY.js';
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-BZ6X8GvL.cjs';
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.