@api-client/core 0.18.32 → 0.18.34

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.
@@ -143,7 +143,7 @@ export declare class ApiModel extends DependentModel {
143
143
  * The specific subset of Data Entities to be exposed by this API.
144
144
  * These are the entities that are included in the data domain schema.
145
145
  */
146
- exposes: ExposedEntity[];
146
+ accessor exposes: ExposedEntity[];
147
147
  /**
148
148
  * Optional array of access rules that define the access control policies
149
149
  * for the API. These rules are used to enforce security and permissions
@@ -1 +1 @@
1
- {"version":3,"file":"ApiModel.d.ts","sourceRoot":"","sources":["../../../src/modeling/ApiModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqC,MAAM,oBAAoB,CAAA;AACpF,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EAEzB,oBAAoB,EAEpB,aAAa,EACd,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAItG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,cAAe,SAA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AAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAS7C,OAAO,CAAC,kBAAkB;IAwB1B;;;;OAIG;IACH,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,aAAa,GAAG,SAAS;IAItE;;;;OAIG;IACH,oBAAoB,IAAI,IAAI;IAkB5B;;;;;;OAMG;IACH,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;CAS3C"}
@@ -10,6 +10,9 @@ import { createDomainKey } from './helpers/keying.js';
10
10
  import { ExposedEntity } from './ExposedEntity.js';
11
11
  let ApiModel = (() => {
12
12
  let _classSuper = DependentModel;
13
+ let _exposes_decorators;
14
+ let _exposes_initializers = [];
15
+ let _exposes_extraInitializers = [];
13
16
  let _termsOfService_decorators;
14
17
  let _termsOfService_initializers = [];
15
18
  let _termsOfService_extraInitializers = [];
@@ -22,9 +25,11 @@ let ApiModel = (() => {
22
25
  return class ApiModel extends _classSuper {
23
26
  static {
24
27
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
28
+ _exposes_decorators = [observed({ deep: true })];
25
29
  _termsOfService_decorators = [observed()];
26
30
  _contact_decorators = [observed({ deep: true })];
27
31
  _license_decorators = [observed({ deep: true })];
32
+ __esDecorate(this, null, _exposes_decorators, { kind: "accessor", name: "exposes", static: false, private: false, access: { has: obj => "exposes" in obj, get: obj => obj.exposes, set: (obj, value) => { obj.exposes = value; } }, metadata: _metadata }, _exposes_initializers, _exposes_extraInitializers);
28
33
  __esDecorate(this, null, _termsOfService_decorators, { kind: "accessor", name: "termsOfService", static: false, private: false, access: { has: obj => "termsOfService" in obj, get: obj => obj.termsOfService, set: (obj, value) => { obj.termsOfService = value; } }, metadata: _metadata }, _termsOfService_initializers, _termsOfService_extraInitializers);
29
34
  __esDecorate(this, null, _contact_decorators, { kind: "accessor", name: "contact", static: false, private: false, access: { has: obj => "contact" in obj, get: obj => obj.contact, set: (obj, value) => { obj.contact = value; } }, metadata: _metadata }, _contact_initializers, _contact_extraInitializers);
30
35
  __esDecorate(this, null, _license_decorators, { kind: "accessor", name: "license", static: false, private: false, access: { has: obj => "license" in obj, get: obj => obj.license, set: (obj, value) => { obj.license = value; } }, metadata: _metadata }, _license_initializers, _license_extraInitializers);
@@ -65,11 +70,13 @@ let ApiModel = (() => {
65
70
  * The API model is invalid if this is not set.
66
71
  */
67
72
  session;
73
+ #exposes_accessor_storage = __runInitializers(this, _exposes_initializers, void 0);
68
74
  /**
69
75
  * The specific subset of Data Entities to be exposed by this API.
70
76
  * These are the entities that are included in the data domain schema.
71
77
  */
72
- exposes;
78
+ get exposes() { return this.#exposes_accessor_storage; }
79
+ set exposes(value) { this.#exposes_accessor_storage = value; }
73
80
  /**
74
81
  * Optional array of access rules that define the access control policies
75
82
  * for the API. These rules are used to enforce security and permissions
@@ -78,7 +85,7 @@ let ApiModel = (() => {
78
85
  * These rules apply to all exposed entities and actions. An API action
79
86
  * can declare its own access rules, which will override these.
80
87
  */
81
- accessRule;
88
+ accessRule = __runInitializers(this, _exposes_extraInitializers);
82
89
  /**
83
90
  * Optional configuration for API-wide rate limiting and throttling.
84
91
  * Defines rules to protect the API from overuse.
@@ -309,8 +316,8 @@ let ApiModel = (() => {
309
316
  entity: { ...entity },
310
317
  actions: [],
311
318
  isRoot: true,
312
- relativeCollectionPath,
313
- relativeResourcePath,
319
+ collectionPath: relativeCollectionPath,
320
+ resourcePath: relativeResourcePath,
314
321
  hasCollection: true,
315
322
  };
316
323
  if (options) {
@@ -386,8 +393,8 @@ let ApiModel = (() => {
386
393
  entity: { ...target },
387
394
  actions: [],
388
395
  isRoot: false,
389
- relativeCollectionPath,
390
- relativeResourcePath,
396
+ collectionPath: relativeCollectionPath,
397
+ resourcePath: relativeResourcePath,
391
398
  hasCollection: isCollection,
392
399
  parent: {
393
400
  key: parentKey,
@@ -1 +1 @@
1
- {"version":3,"file":"ApiModel.js","sourceRoot":"","sources":["../../../src/modeling/ApiModel.ts"],"names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C/B,CAAC;YACD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,IAAI,MAAM,EAAE,CAAC;gBAChE,MAAM,KAAK,GAAG,IAAI,CAAC,aAAwC,CAAA;gBAC3D,KAAK,CAAC,OAAO,GAAG,EAAE,CAAA;YACpB,CAAC;QACH,CAAC;QAED;;;;;;WAMG;QACH,gBAAgB,CAAC,MAAkB;YACjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAA;YAC3G,CAAC;YACD,IAAI,CAAC,oBAAoB,EAAE,CAAA;YAC3B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;YACzC,IAAI,CAAC,cAAc,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;YACzE,IAAI,CAAC,YAAY,EAAE,CAAA;QACrB,CAAC;;;SApeU,QAAQ","sourcesContent":["import { nanoid } from '../nanoid.js'\nimport { ApiModelKind, DataDomainKind, ExposedEntityKind } from '../models/kinds.js'\nimport { type IThing, Thing } from '../models/Thing.js'\nimport type {\n AccessRule,\n AssociationTarget,\n AuthenticationConfiguration,\n AuthorizationConfiguration,\n ExposedEntitySchema,\n RateLimitingConfiguration,\n RolesBasedAccessControl,\n SessionConfiguration,\n UsernamePasswordConfiguration,\n ExposeOptions,\n} from './types.js'\nimport { DataDomain } from './DataDomain.js'\nimport { DependentModel, type DependentModelSchema, type DomainDependency } from './DependentModel.js'\nimport { observed, toRaw } from '../decorators/observed.js'\nimport pluralize from '@jarrodek/pluralize'\nimport { createDomainKey } from './helpers/keying.js'\nimport { ExposedEntity } from './ExposedEntity.js'\n\n/**\n * Contact information for the exposed API.\n */\nexport interface ApiContact {\n /**\n * The identifying name of the contact person/organization.\n */\n name?: string\n /**\n * The URL pointing to the contact information. MUST be in the format of a URL.\n */\n url?: string\n /**\n * The email address of the contact person/organization. MUST be in the format of an email address.\n */\n email?: string\n}\n\n/**\n * License information for the exposed API.\n */\nexport interface ApiLicense {\n /**\n * The license name used for the API. It is recommended to be an SPDX license identifier.\n */\n name: string\n /**\n * A URL to the license used for the API. MUST be in the format of a URL.\n */\n url?: string\n}\n\nexport interface ApiModelSchema extends DependentModelSchema {\n /**\n * The data domain kind recognizable by the ecosystem.\n */\n kind: typeof ApiModelKind\n /**\n * The unique key of the API model schema.\n * This is a stable identifier that does not change across versions.\n */\n key: string\n /**\n * Contains the name, display name, description, and the version of the API model schema.\n */\n info: IThing\n\n /**\n * The designated Data Entity that represents a \"User\".\n * This entity should be marked with the \"User\" semantic in the Data Modeler.\n *\n * This property is required to publish the API.\n */\n user?: AssociationTarget\n\n /**\n * Configuration for how users prove their identity.\n * The API model is invalid if this is not set.\n */\n authentication?: AuthenticationConfiguration\n\n /**\n * Configuration for what authenticated users are allowed to do.\n * The API model is invalid if this is not set.\n */\n authorization?: AuthorizationConfiguration\n\n /**\n * Configuration for the transport and payload of the user session.\n * The API model is invalid if this is not set.\n */\n session?: SessionConfiguration\n /**\n * The specific subset of Data Entities to be exposed by this API.\n * These are the entities that are included in the data domain schema.\n */\n exposes: ExposedEntitySchema[]\n\n /**\n * Optional array of access rules that define the access control policies\n * for the API. These rules are used to enforce security and permissions\n * on the exposed entities.\n *\n * These rules apply to all exposed entities and actions. An API action\n * can declare its own access rules, which will override these.\n */\n accessRule?: AccessRule[]\n /**\n * Optional configuration for API-wide rate limiting and throttling.\n * Defines rules to protect the API from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n /**\n * A URL to the Terms of Service for the API.\n */\n termsOfService?: string\n /**\n * The contact information for the exposed API.\n */\n contact?: ApiContact\n /**\n * The license information for the API.\n */\n license?: ApiLicense\n}\n\nexport class ApiModel extends DependentModel {\n /**\n * The data domain kind recognizable by the ecosystem.\n */\n kind: typeof ApiModelKind\n /**\n * The unique key of the data domain schema.\n * This is a stable identifier that does not change across versions.\n */\n key: string\n\n /**\n * The description of the domain property.\n */\n info: Thing\n /**\n * The designated Data Entity that represents a \"User\".\n * This entity must be marked with the \"User\" semantic in the Data Modeler.\n *\n * This property is required to publish the API.\n */\n user?: AssociationTarget\n\n /**\n * Configuration for how users prove their identity.\n * The API model is invalid if this is not set.\n */\n authentication?: AuthenticationConfiguration\n\n /**\n * Configuration for what authenticated users are allowed to do.\n * The API model is invalid if this is not set.\n */\n authorization?: AuthorizationConfiguration\n\n /**\n * Configuration for the transport and payload of the user session.\n * The API model is invalid if this is not set.\n */\n session?: SessionConfiguration\n /**\n * The specific subset of Data Entities to be exposed by this API.\n * These are the entities that are included in the data domain schema.\n */\n exposes: ExposedEntity[]\n /**\n * Optional array of access rules that define the access control policies\n * for the API. These rules are used to enforce security and permissions\n * on the exposed entities.\n *\n * These rules apply to all exposed entities and actions. An API action\n * can declare its own access rules, which will override these.\n */\n accessRule?: AccessRule[]\n /**\n * Optional configuration for API-wide rate limiting and throttling.\n * Defines rules to protect the API from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n /**\n * A URL to the Terms of Service for the API.\n */\n @observed() accessor termsOfService: string | undefined\n /**\n * The contact information for the exposed API.\n */\n @observed({ deep: true }) accessor contact: ApiContact | undefined\n /**\n * The license information for the API.\n */\n @observed({ deep: true }) accessor license: ApiLicense | undefined\n\n /**\n * When the initializing flag is set to true,\n * the domain is not notified of changes.\n */\n #initializing = true\n\n /**\n * When the notifying flag is set to true,\n * the domain is pending a notification.\n * No other notifications will be sent until\n * the current notification is sent.\n */\n #notifying = false\n\n /**\n * A convenience getter that returns the DataDomain associated with this API model.\n * Since the API model can have only one DataDomain,\n * this getter returns the first dependency in the list.\n *\n * The parent interface `DependentModel` allows for multiple dependencies,\n * to unify the dependency management across different models.\n */\n get domain(): DataDomain | undefined {\n if (this.dependencyList.length === 0) {\n return undefined\n }\n const domain = this.dependencyList[0]\n return this.dependencies.get(domain.key)\n }\n\n static createSchema(input: Partial<ApiModelSchema> = {}): ApiModelSchema {\n const { key = nanoid(), exposes = [] } = input\n const info = Thing.fromJSON(input.info, { name: 'Unnamed API' }).toJSON()\n const result: ApiModelSchema = {\n kind: ApiModelKind,\n key,\n info,\n exposes,\n }\n if (input.user) {\n result.user = { ...input.user }\n }\n if (input.dependencyList) {\n result.dependencyList = structuredClone(input.dependencyList)\n }\n if (input.authentication) {\n result.authentication = input.authentication\n }\n if (input.authorization) {\n result.authorization = input.authorization\n }\n if (input.session) {\n result.session = input.session\n }\n if (input.accessRule) {\n result.accessRule = input.accessRule\n }\n if (input.rateLimiting) {\n result.rateLimiting = input.rateLimiting\n }\n if (input.termsOfService) {\n result.termsOfService = input.termsOfService\n }\n if (input.contact) {\n result.contact = structuredClone(input.contact)\n }\n if (input.license) {\n result.license = structuredClone(input.license)\n }\n return result\n }\n\n constructor(state?: Partial<ApiModelSchema>, domain?: DomainDependency) {\n const init = ApiModel.createSchema(state)\n const instances: DataDomain[] = []\n if (domain instanceof DataDomain) {\n instances.push(domain)\n } else if (typeof domain === 'object' && domain.kind === DataDomainKind) {\n instances.push(new DataDomain(domain))\n } else if (domain) {\n throw new Error(`Invalid domain provided. Expected a DataDomain instance or schema.`)\n }\n super(init.dependencyList, instances)\n this.kind = init.kind\n this.key = init.key\n this.info = new Thing(init.info)\n this.user = init.user\n if (init.authentication) {\n this.authentication = structuredClone(init.authentication)\n }\n if (init.authorization) {\n this.authorization = structuredClone(init.authorization)\n }\n if (init.session) {\n this.session = structuredClone(init.session)\n }\n if (Array.isArray(init.exposes)) {\n this.exposes = init.exposes.map((e) => new ExposedEntity(this, e))\n } else {\n this.exposes = []\n }\n if (init.accessRule) {\n this.accessRule = structuredClone(init.accessRule)\n }\n if (init.rateLimiting) {\n this.rateLimiting = structuredClone(init.rateLimiting)\n }\n if (init.termsOfService) {\n this.termsOfService = init.termsOfService\n }\n if (init.contact) {\n this.contact = init.contact\n }\n if (init.license) {\n this.license = init.license\n }\n this.#initializing = false\n this.info.addEventListener('change', () => {\n this.notifyChange()\n })\n }\n\n toJSON(): ApiModelSchema {\n const result: ApiModelSchema = {\n kind: this.kind,\n key: this.key,\n info: this.info.toJSON(),\n exposes: this.exposes.map((e) => e.toJSON()),\n }\n if (this.user) {\n result.user = { ...this.user }\n }\n if (this.dependencyList.length > 0) {\n result.dependencyList = structuredClone(this.dependencyList)\n }\n if (this.authentication) {\n result.authentication = structuredClone(this.authentication)\n }\n if (this.authorization) {\n result.authorization = structuredClone(this.authorization)\n }\n if (this.session) {\n result.session = structuredClone(this.session)\n }\n if (this.accessRule) {\n result.accessRule = structuredClone(this.accessRule)\n }\n if (this.rateLimiting) {\n result.rateLimiting = structuredClone(this.rateLimiting)\n }\n if (this.termsOfService) {\n result.termsOfService = this.termsOfService\n }\n if (this.contact) {\n result.contact = structuredClone(toRaw(this, this.contact))\n }\n if (this.license) {\n result.license = structuredClone(toRaw(this, this.license))\n }\n return result\n }\n\n /**\n * This function is used internally by all domain elements to notify that something has changed.\n * Since we want to notify listeners after the operation commits, we use microtask\n * to ensure that the event is dispatched after the current operation.\n */\n notifyChange() {\n if (this.#notifying || this.#initializing) {\n return\n }\n this.#notifying = true\n queueMicrotask(() => {\n this.#notifying = false\n const event = new Event('change')\n this.dispatchEvent(event)\n })\n }\n\n /**\n * Exposes a new entity in the API model.\n * If the entity already exists, it returns the existing one.\n * @param entity The entity key and domain to expose.\n * @returns The exposed entity.\n */\n exposeEntity(entity: AssociationTarget, options?: ExposeOptions): ExposedEntity {\n const domain = this.domain\n if (!domain) {\n throw new Error(`No domain attached to API model`)\n }\n // checks whether the entity is already exposed as a root exposure.\n const existing = this.exposes.find(\n (e) => e.isRoot && e.entity.key === entity.key && e.entity.domain === entity.domain\n )\n if (existing) {\n // quietly return the existing exposure\n // TBD: should we throw an error here?\n return existing\n }\n const domainEntity = domain.findEntity(entity.key, entity.domain)\n if (!domainEntity) {\n throw new Error(`Entity not found in domain: ${entity.key}`)\n }\n const name = domainEntity.info.name || ''\n const segment = pluralize(name.toLocaleLowerCase())\n const relativeCollectionPath = `/${segment}`\n const relativeResourcePath = `/${segment}/{id}`\n const newEntity: ExposedEntitySchema = {\n kind: ExposedEntityKind,\n key: nanoid(),\n entity: { ...entity },\n actions: [],\n isRoot: true,\n relativeCollectionPath,\n relativeResourcePath,\n hasCollection: true,\n }\n if (options) {\n newEntity.exposeOptions = { ...options }\n }\n const created = new ExposedEntity(this, newEntity)\n this.exposes.push(created)\n\n // Follow associations if requested\n if (options?.followAssociations) {\n if (options?.maxDepth === undefined || options.maxDepth > 0) {\n this.followEntityAssociations(newEntity, options)\n }\n }\n this.notifyChange()\n return created\n }\n\n /**\n * Follows associations for a newly exposed entity if configured to do so.\n * This creates nested exposures based on the entity's associations.\n *\n * @param parentExposure The root exposure to follow associations from\n * @param options The expose options containing follow configuration\n */\n private followEntityAssociations(parentExposure: ExposedEntitySchema, options: ExposeOptions): void {\n const domain = this.domain\n if (!domain) {\n return\n }\n const maxDepth = options.maxDepth ?? 6\n const visited = new Set<string>()\n // Add parent entity's key to the visited set so we won't skip it when traversing\n // associations.\n visited.add(createDomainKey(parentExposure.entity))\n\n const follow = (currentEntity: AssociationTarget, parentKey: string, depth: number) => {\n // Find the domain entity\n const domainEntity = domain.findEntity(currentEntity.key, currentEntity.domain)\n if (!domainEntity) return\n\n // Iterate through associations\n for (const association of domainEntity.listAssociations()) {\n for (const target of association.targets) {\n // Skip self-referencing associations\n if (target.key === currentEntity.key && target.domain === currentEntity.domain) {\n continue\n }\n\n // Create unique identifier for circular detection\n const visitKey = createDomainKey(target)\n if (visited.has(visitKey)) {\n continue // Skip circular references\n }\n visited.add(visitKey)\n\n // Check if this nested exposure already exists\n const existingNested = this.exposes.find(\n (e) =>\n !e.isRoot &&\n e.entity.key === target.key &&\n e.entity.domain === target.domain &&\n e.parent?.key === parentKey\n )\n\n if (existingNested) {\n continue // Already exposed under this parent\n }\n\n // Find the target domain entity for path generation\n const targetDomainEntity = domain.findEntity(target.key, target.domain)\n if (!targetDomainEntity) continue\n\n const name = association.info.name || ''\n const segment = pluralize(name.toLocaleLowerCase())\n const isCollection = association.multiple !== false\n const relativeCollectionPath = isCollection ? `/${segment}` : undefined\n const relativeResourcePath = isCollection ? `/${segment}/{id}` : `/${segment}`\n // Create nested exposure\n const nestedExposure: ExposedEntitySchema = {\n kind: ExposedEntityKind,\n key: nanoid(),\n entity: { ...target },\n actions: [],\n isRoot: false,\n relativeCollectionPath,\n relativeResourcePath,\n hasCollection: isCollection,\n parent: {\n key: parentKey,\n association: {\n key: association.key,\n domain: currentEntity.domain,\n },\n depth: depth + 1,\n },\n }\n\n this.exposes.push(new ExposedEntity(this, nestedExposure))\n if (depth + 1 >= maxDepth) {\n nestedExposure.truncated = true\n } else {\n // Recursively follow associations\n follow(target, nestedExposure.key, depth + 1)\n }\n }\n }\n }\n\n // Start following from the root exposure\n follow(parentExposure.entity, parentExposure.key, 0)\n }\n\n /**\n * Removes an exposed entity from the API model.\n * @param entity The entity to remove.\n */\n removeEntity(entity: AssociationTarget): void {\n const current = this.exposes.find((e) => e.entity.key === entity.key && e.entity.domain === entity.domain)\n if (!current) {\n return\n }\n this.removeWithChildren(current.key)\n this.notifyChange()\n }\n\n private removeWithChildren(key: string): void {\n const index = this.exposes.findIndex((e) => e.key === key)\n if (index < 0) {\n return\n }\n // Remove the parent itself\n this.exposes.splice(index, 1)\n // Remove all children recursively\n const removeChildren = (parentKey: string) => {\n // Find all exposures whose parent.key matches parentKey\n const children = this.exposes.filter((e) => e.parent?.key === parentKey)\n for (const child of children) {\n removeChildren(child.key)\n const childIndex = this.exposes.findIndex((e) => e.key === child.key)\n if (childIndex >= 0) {\n this.exposes.splice(childIndex, 1)\n }\n }\n }\n // Then also remove children\n removeChildren(key)\n this.notifyChange()\n }\n\n /**\n * Returns the exposed entity by its key.\n * @param entityKey The key of the entity to find.\n * @returns The exposed entity or undefined if not found.\n */\n getExposedEntity(entity: AssociationTarget): ExposedEntity | undefined {\n return this.exposes.find((e) => e.entity.key === entity.key && e.entity.domain === entity.domain)\n }\n\n /**\n * Clears the API model for a new entity change.\n * This method resets the dependencies, exposes, user,\n * authentication, authorization, and session properties.\n */\n cleanForEntityChange(): void {\n this.dependencies.clear()\n this.dependencyList = []\n this.exposes = []\n this.user = undefined\n if (this.session) {\n this.session.properties = []\n }\n if (this.authentication && this.authentication.strategy === 'UsernamePassword') {\n const typed = this.authentication as UsernamePasswordConfiguration\n typed.passwordKey = undefined\n }\n if (this.authorization && this.authorization.strategy == 'RBAC') {\n const typed = this.authorization as RolesBasedAccessControl\n typed.roleKey = ''\n }\n }\n\n /**\n * Attaches a DataDomain to this API model.\n * This method clears any existing dependencies and sets the new domain.\n *\n * @param domain The DataDomain to attach to this API model.\n * @throws Error if the domain does not have a version set in its info.\n */\n attachDataDomain(domain: DataDomain): void {\n if (!domain.info.version) {\n throw new Error(`Cannot attach DataDomain without a version. Please set the version in the domain info.`)\n }\n this.cleanForEntityChange()\n this.dependencies.set(domain.key, domain)\n this.dependencyList = [{ key: domain.key, version: domain.info.version }]\n this.notifyChange()\n }\n}\n"]}
1
+ {"version":3,"file":"ApiModel.js","sourceRoot":"","sources":["../../../src/modeling/ApiModel.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACpF,OAAO,EAAe,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAavD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAoD,MAAM,qBAAqB,CAAA;AACtG,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,SAAS,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,q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AED;;;;;;WAMG;QACH,gBAAgB,CAAC,MAAkB;YACjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAA;YAC3G,CAAC;YACD,IAAI,CAAC,oBAAoB,EAAE,CAAA;YAC3B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;YACzC,IAAI,CAAC,cAAc,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;YACzE,IAAI,CAAC,YAAY,EAAE,CAAA;QACrB,CAAC;;;SApeU,QAAQ","sourcesContent":["import { nanoid } from '../nanoid.js'\nimport { ApiModelKind, DataDomainKind, ExposedEntityKind } from '../models/kinds.js'\nimport { type IThing, Thing } from '../models/Thing.js'\nimport type {\n AccessRule,\n AssociationTarget,\n AuthenticationConfiguration,\n AuthorizationConfiguration,\n ExposedEntitySchema,\n RateLimitingConfiguration,\n RolesBasedAccessControl,\n SessionConfiguration,\n UsernamePasswordConfiguration,\n ExposeOptions,\n} from './types.js'\nimport { DataDomain } from './DataDomain.js'\nimport { DependentModel, type DependentModelSchema, type DomainDependency } from './DependentModel.js'\nimport { observed, toRaw } from '../decorators/observed.js'\nimport pluralize from '@jarrodek/pluralize'\nimport { createDomainKey } from './helpers/keying.js'\nimport { ExposedEntity } from './ExposedEntity.js'\n\n/**\n * Contact information for the exposed API.\n */\nexport interface ApiContact {\n /**\n * The identifying name of the contact person/organization.\n */\n name?: string\n /**\n * The URL pointing to the contact information. MUST be in the format of a URL.\n */\n url?: string\n /**\n * The email address of the contact person/organization. MUST be in the format of an email address.\n */\n email?: string\n}\n\n/**\n * License information for the exposed API.\n */\nexport interface ApiLicense {\n /**\n * The license name used for the API. It is recommended to be an SPDX license identifier.\n */\n name: string\n /**\n * A URL to the license used for the API. MUST be in the format of a URL.\n */\n url?: string\n}\n\nexport interface ApiModelSchema extends DependentModelSchema {\n /**\n * The data domain kind recognizable by the ecosystem.\n */\n kind: typeof ApiModelKind\n /**\n * The unique key of the API model schema.\n * This is a stable identifier that does not change across versions.\n */\n key: string\n /**\n * Contains the name, display name, description, and the version of the API model schema.\n */\n info: IThing\n\n /**\n * The designated Data Entity that represents a \"User\".\n * This entity should be marked with the \"User\" semantic in the Data Modeler.\n *\n * This property is required to publish the API.\n */\n user?: AssociationTarget\n\n /**\n * Configuration for how users prove their identity.\n * The API model is invalid if this is not set.\n */\n authentication?: AuthenticationConfiguration\n\n /**\n * Configuration for what authenticated users are allowed to do.\n * The API model is invalid if this is not set.\n */\n authorization?: AuthorizationConfiguration\n\n /**\n * Configuration for the transport and payload of the user session.\n * The API model is invalid if this is not set.\n */\n session?: SessionConfiguration\n /**\n * The specific subset of Data Entities to be exposed by this API.\n * These are the entities that are included in the data domain schema.\n */\n exposes: ExposedEntitySchema[]\n\n /**\n * Optional array of access rules that define the access control policies\n * for the API. These rules are used to enforce security and permissions\n * on the exposed entities.\n *\n * These rules apply to all exposed entities and actions. An API action\n * can declare its own access rules, which will override these.\n */\n accessRule?: AccessRule[]\n /**\n * Optional configuration for API-wide rate limiting and throttling.\n * Defines rules to protect the API from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n /**\n * A URL to the Terms of Service for the API.\n */\n termsOfService?: string\n /**\n * The contact information for the exposed API.\n */\n contact?: ApiContact\n /**\n * The license information for the API.\n */\n license?: ApiLicense\n}\n\nexport class ApiModel extends DependentModel {\n /**\n * The data domain kind recognizable by the ecosystem.\n */\n kind: typeof ApiModelKind\n /**\n * The unique key of the data domain schema.\n * This is a stable identifier that does not change across versions.\n */\n key: string\n\n /**\n * The description of the domain property.\n */\n info: Thing\n /**\n * The designated Data Entity that represents a \"User\".\n * This entity must be marked with the \"User\" semantic in the Data Modeler.\n *\n * This property is required to publish the API.\n */\n user?: AssociationTarget\n\n /**\n * Configuration for how users prove their identity.\n * The API model is invalid if this is not set.\n */\n authentication?: AuthenticationConfiguration\n\n /**\n * Configuration for what authenticated users are allowed to do.\n * The API model is invalid if this is not set.\n */\n authorization?: AuthorizationConfiguration\n\n /**\n * Configuration for the transport and payload of the user session.\n * The API model is invalid if this is not set.\n */\n session?: SessionConfiguration\n /**\n * The specific subset of Data Entities to be exposed by this API.\n * These are the entities that are included in the data domain schema.\n */\n @observed({ deep: true }) accessor exposes: ExposedEntity[]\n /**\n * Optional array of access rules that define the access control policies\n * for the API. These rules are used to enforce security and permissions\n * on the exposed entities.\n *\n * These rules apply to all exposed entities and actions. An API action\n * can declare its own access rules, which will override these.\n */\n accessRule?: AccessRule[]\n /**\n * Optional configuration for API-wide rate limiting and throttling.\n * Defines rules to protect the API from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n /**\n * A URL to the Terms of Service for the API.\n */\n @observed() accessor termsOfService: string | undefined\n /**\n * The contact information for the exposed API.\n */\n @observed({ deep: true }) accessor contact: ApiContact | undefined\n /**\n * The license information for the API.\n */\n @observed({ deep: true }) accessor license: ApiLicense | undefined\n\n /**\n * When the initializing flag is set to true,\n * the domain is not notified of changes.\n */\n #initializing = true\n\n /**\n * When the notifying flag is set to true,\n * the domain is pending a notification.\n * No other notifications will be sent until\n * the current notification is sent.\n */\n #notifying = false\n\n /**\n * A convenience getter that returns the DataDomain associated with this API model.\n * Since the API model can have only one DataDomain,\n * this getter returns the first dependency in the list.\n *\n * The parent interface `DependentModel` allows for multiple dependencies,\n * to unify the dependency management across different models.\n */\n get domain(): DataDomain | undefined {\n if (this.dependencyList.length === 0) {\n return undefined\n }\n const domain = this.dependencyList[0]\n return this.dependencies.get(domain.key)\n }\n\n static createSchema(input: Partial<ApiModelSchema> = {}): ApiModelSchema {\n const { key = nanoid(), exposes = [] } = input\n const info = Thing.fromJSON(input.info, { name: 'Unnamed API' }).toJSON()\n const result: ApiModelSchema = {\n kind: ApiModelKind,\n key,\n info,\n exposes,\n }\n if (input.user) {\n result.user = { ...input.user }\n }\n if (input.dependencyList) {\n result.dependencyList = structuredClone(input.dependencyList)\n }\n if (input.authentication) {\n result.authentication = input.authentication\n }\n if (input.authorization) {\n result.authorization = input.authorization\n }\n if (input.session) {\n result.session = input.session\n }\n if (input.accessRule) {\n result.accessRule = input.accessRule\n }\n if (input.rateLimiting) {\n result.rateLimiting = input.rateLimiting\n }\n if (input.termsOfService) {\n result.termsOfService = input.termsOfService\n }\n if (input.contact) {\n result.contact = structuredClone(input.contact)\n }\n if (input.license) {\n result.license = structuredClone(input.license)\n }\n return result\n }\n\n constructor(state?: Partial<ApiModelSchema>, domain?: DomainDependency) {\n const init = ApiModel.createSchema(state)\n const instances: DataDomain[] = []\n if (domain instanceof DataDomain) {\n instances.push(domain)\n } else if (typeof domain === 'object' && domain.kind === DataDomainKind) {\n instances.push(new DataDomain(domain))\n } else if (domain) {\n throw new Error(`Invalid domain provided. Expected a DataDomain instance or schema.`)\n }\n super(init.dependencyList, instances)\n this.kind = init.kind\n this.key = init.key\n this.info = new Thing(init.info)\n this.user = init.user\n if (init.authentication) {\n this.authentication = structuredClone(init.authentication)\n }\n if (init.authorization) {\n this.authorization = structuredClone(init.authorization)\n }\n if (init.session) {\n this.session = structuredClone(init.session)\n }\n if (Array.isArray(init.exposes)) {\n this.exposes = init.exposes.map((e) => new ExposedEntity(this, e))\n } else {\n this.exposes = []\n }\n if (init.accessRule) {\n this.accessRule = structuredClone(init.accessRule)\n }\n if (init.rateLimiting) {\n this.rateLimiting = structuredClone(init.rateLimiting)\n }\n if (init.termsOfService) {\n this.termsOfService = init.termsOfService\n }\n if (init.contact) {\n this.contact = init.contact\n }\n if (init.license) {\n this.license = init.license\n }\n this.#initializing = false\n this.info.addEventListener('change', () => {\n this.notifyChange()\n })\n }\n\n toJSON(): ApiModelSchema {\n const result: ApiModelSchema = {\n kind: this.kind,\n key: this.key,\n info: this.info.toJSON(),\n exposes: this.exposes.map((e) => e.toJSON()),\n }\n if (this.user) {\n result.user = { ...this.user }\n }\n if (this.dependencyList.length > 0) {\n result.dependencyList = structuredClone(this.dependencyList)\n }\n if (this.authentication) {\n result.authentication = structuredClone(this.authentication)\n }\n if (this.authorization) {\n result.authorization = structuredClone(this.authorization)\n }\n if (this.session) {\n result.session = structuredClone(this.session)\n }\n if (this.accessRule) {\n result.accessRule = structuredClone(this.accessRule)\n }\n if (this.rateLimiting) {\n result.rateLimiting = structuredClone(this.rateLimiting)\n }\n if (this.termsOfService) {\n result.termsOfService = this.termsOfService\n }\n if (this.contact) {\n result.contact = structuredClone(toRaw(this, this.contact))\n }\n if (this.license) {\n result.license = structuredClone(toRaw(this, this.license))\n }\n return result\n }\n\n /**\n * This function is used internally by all domain elements to notify that something has changed.\n * Since we want to notify listeners after the operation commits, we use microtask\n * to ensure that the event is dispatched after the current operation.\n */\n notifyChange() {\n if (this.#notifying || this.#initializing) {\n return\n }\n this.#notifying = true\n queueMicrotask(() => {\n this.#notifying = false\n const event = new Event('change')\n this.dispatchEvent(event)\n })\n }\n\n /**\n * Exposes a new entity in the API model.\n * If the entity already exists, it returns the existing one.\n * @param entity The entity key and domain to expose.\n * @returns The exposed entity.\n */\n exposeEntity(entity: AssociationTarget, options?: ExposeOptions): ExposedEntity {\n const domain = this.domain\n if (!domain) {\n throw new Error(`No domain attached to API model`)\n }\n // checks whether the entity is already exposed as a root exposure.\n const existing = this.exposes.find(\n (e) => e.isRoot && e.entity.key === entity.key && e.entity.domain === entity.domain\n )\n if (existing) {\n // quietly return the existing exposure\n // TBD: should we throw an error here?\n return existing\n }\n const domainEntity = domain.findEntity(entity.key, entity.domain)\n if (!domainEntity) {\n throw new Error(`Entity not found in domain: ${entity.key}`)\n }\n const name = domainEntity.info.name || ''\n const segment = pluralize(name.toLocaleLowerCase())\n const relativeCollectionPath = `/${segment}`\n const relativeResourcePath = `/${segment}/{id}`\n const newEntity: ExposedEntitySchema = {\n kind: ExposedEntityKind,\n key: nanoid(),\n entity: { ...entity },\n actions: [],\n isRoot: true,\n collectionPath: relativeCollectionPath,\n resourcePath: relativeResourcePath,\n hasCollection: true,\n }\n if (options) {\n newEntity.exposeOptions = { ...options }\n }\n const created = new ExposedEntity(this, newEntity)\n this.exposes.push(created)\n\n // Follow associations if requested\n if (options?.followAssociations) {\n if (options?.maxDepth === undefined || options.maxDepth > 0) {\n this.followEntityAssociations(newEntity, options)\n }\n }\n this.notifyChange()\n return created\n }\n\n /**\n * Follows associations for a newly exposed entity if configured to do so.\n * This creates nested exposures based on the entity's associations.\n *\n * @param parentExposure The root exposure to follow associations from\n * @param options The expose options containing follow configuration\n */\n private followEntityAssociations(parentExposure: ExposedEntitySchema, options: ExposeOptions): void {\n const domain = this.domain\n if (!domain) {\n return\n }\n const maxDepth = options.maxDepth ?? 6\n const visited = new Set<string>()\n // Add parent entity's key to the visited set so we won't skip it when traversing\n // associations.\n visited.add(createDomainKey(parentExposure.entity))\n\n const follow = (currentEntity: AssociationTarget, parentKey: string, depth: number) => {\n // Find the domain entity\n const domainEntity = domain.findEntity(currentEntity.key, currentEntity.domain)\n if (!domainEntity) return\n\n // Iterate through associations\n for (const association of domainEntity.listAssociations()) {\n for (const target of association.targets) {\n // Skip self-referencing associations\n if (target.key === currentEntity.key && target.domain === currentEntity.domain) {\n continue\n }\n\n // Create unique identifier for circular detection\n const visitKey = createDomainKey(target)\n if (visited.has(visitKey)) {\n continue // Skip circular references\n }\n visited.add(visitKey)\n\n // Check if this nested exposure already exists\n const existingNested = this.exposes.find(\n (e) =>\n !e.isRoot &&\n e.entity.key === target.key &&\n e.entity.domain === target.domain &&\n e.parent?.key === parentKey\n )\n\n if (existingNested) {\n continue // Already exposed under this parent\n }\n\n // Find the target domain entity for path generation\n const targetDomainEntity = domain.findEntity(target.key, target.domain)\n if (!targetDomainEntity) continue\n\n const name = association.info.name || ''\n const segment = pluralize(name.toLocaleLowerCase())\n const isCollection = association.multiple !== false\n const relativeCollectionPath = isCollection ? `/${segment}` : undefined\n const relativeResourcePath = isCollection ? `/${segment}/{id}` : `/${segment}`\n // Create nested exposure\n const nestedExposure: ExposedEntitySchema = {\n kind: ExposedEntityKind,\n key: nanoid(),\n entity: { ...target },\n actions: [],\n isRoot: false,\n collectionPath: relativeCollectionPath,\n resourcePath: relativeResourcePath,\n hasCollection: isCollection,\n parent: {\n key: parentKey,\n association: {\n key: association.key,\n domain: currentEntity.domain,\n },\n depth: depth + 1,\n },\n }\n\n this.exposes.push(new ExposedEntity(this, nestedExposure))\n if (depth + 1 >= maxDepth) {\n nestedExposure.truncated = true\n } else {\n // Recursively follow associations\n follow(target, nestedExposure.key, depth + 1)\n }\n }\n }\n }\n\n // Start following from the root exposure\n follow(parentExposure.entity, parentExposure.key, 0)\n }\n\n /**\n * Removes an exposed entity from the API model.\n * @param entity The entity to remove.\n */\n removeEntity(entity: AssociationTarget): void {\n const current = this.exposes.find((e) => e.entity.key === entity.key && e.entity.domain === entity.domain)\n if (!current) {\n return\n }\n this.removeWithChildren(current.key)\n this.notifyChange()\n }\n\n private removeWithChildren(key: string): void {\n const index = this.exposes.findIndex((e) => e.key === key)\n if (index < 0) {\n return\n }\n // Remove the parent itself\n this.exposes.splice(index, 1)\n // Remove all children recursively\n const removeChildren = (parentKey: string) => {\n // Find all exposures whose parent.key matches parentKey\n const children = this.exposes.filter((e) => e.parent?.key === parentKey)\n for (const child of children) {\n removeChildren(child.key)\n const childIndex = this.exposes.findIndex((e) => e.key === child.key)\n if (childIndex >= 0) {\n this.exposes.splice(childIndex, 1)\n }\n }\n }\n // Then also remove children\n removeChildren(key)\n this.notifyChange()\n }\n\n /**\n * Returns the exposed entity by its key.\n * @param entityKey The key of the entity to find.\n * @returns The exposed entity or undefined if not found.\n */\n getExposedEntity(entity: AssociationTarget): ExposedEntity | undefined {\n return this.exposes.find((e) => e.entity.key === entity.key && e.entity.domain === entity.domain)\n }\n\n /**\n * Clears the API model for a new entity change.\n * This method resets the dependencies, exposes, user,\n * authentication, authorization, and session properties.\n */\n cleanForEntityChange(): void {\n this.dependencies.clear()\n this.dependencyList = []\n this.exposes = []\n this.user = undefined\n if (this.session) {\n this.session.properties = []\n }\n if (this.authentication && this.authentication.strategy === 'UsernamePassword') {\n const typed = this.authentication as UsernamePasswordConfiguration\n typed.passwordKey = undefined\n }\n if (this.authorization && this.authorization.strategy == 'RBAC') {\n const typed = this.authorization as RolesBasedAccessControl\n typed.roleKey = ''\n }\n }\n\n /**\n * Attaches a DataDomain to this API model.\n * This method clears any existing dependencies and sets the new domain.\n *\n * @param domain The DataDomain to attach to this API model.\n * @throws Error if the domain does not have a version set in its info.\n */\n attachDataDomain(domain: DataDomain): void {\n if (!domain.info.version) {\n throw new Error(`Cannot attach DataDomain without a version. Please set the version in the domain info.`)\n }\n this.cleanForEntityChange()\n this.dependencies.set(domain.key, domain)\n this.dependencyList = [{ key: domain.key, version: domain.info.version }]\n this.notifyChange()\n }\n}\n"]}
@@ -20,51 +20,61 @@ export declare class ExposedEntity extends EventTarget {
20
20
  /**
21
21
  * A pointer to a Data Entity from the Data Domain.
22
22
  */
23
- entity: AssociationTarget;
23
+ accessor entity: AssociationTarget;
24
24
  /**
25
25
  * Indicates whether this exposure has a collection endpoint.
26
26
  * A collection endpoint is optional for nested exposures where the association is 1:1
27
27
  * and the schema is embedded directly under the parent resource.
28
+ *
29
+ * Note that this property is not observed for changes as it is immutable after creation.
28
30
  */
29
31
  hasCollection: boolean;
30
32
  /**
31
- * Relative path to the collection endpoint for this exposure.
33
+ * Path to the collection endpoint for this exposure.
32
34
  * Starts with '/'. Not set for 1:1 nested exposures where collection does not exist.
33
35
  */
34
- relativeCollectionPath?: string;
36
+ accessor collectionPath: string | undefined;
35
37
  /**
36
- * Relative path to the resource endpoint for this exposure.
38
+ * Path to the resource endpoint for this exposure.
37
39
  * Starts with '/'. For 1:1 nested exposures the resource path typically does not include an id segment.
38
40
  */
39
- relativeResourcePath: string;
41
+ accessor resourcePath: string;
40
42
  /**
41
43
  * Whether this exposure is a root exposure (top-level collection).
42
44
  * If this is set then the `parent` reference must be populated.
45
+ *
46
+ * Note that this property is not observed for changes as it is immutable after creation.
43
47
  */
44
48
  isRoot?: boolean;
45
49
  /**
46
50
  * Parent reference when this exposure was created via following an association.
51
+ *
52
+ * Note that this property is not observed for changes as it is immutable after creation.
47
53
  */
48
54
  parent?: ExposeParentRef;
49
55
  /**
50
56
  * Expose-time config used to create this exposure (persisted for auditing/UI).
51
57
  * This is only populated for the root exposure. All children exposures inherit this config.
58
+ *
59
+ * Note that this property is not observed for changes as it is immutable after creation.
52
60
  */
53
61
  exposeOptions?: ExposeOptions;
54
62
  /**
55
63
  * The list of enabled API actions for this exposure (List/Read/Create/etc.)
56
64
  */
57
- actions: ApiAction[];
65
+ accessor actions: ApiAction[];
58
66
  /**
59
67
  * Optional array of access rules that define the access control policies for this exposure.
60
68
  */
61
- accessRule?: AccessRule[];
69
+ accessor accessRule: AccessRule[] | undefined;
62
70
  /**
63
71
  * Optional configuration for rate limiting for this exposure.
64
72
  */
65
- rateLimiting?: RateLimitingConfiguration;
73
+ accessor rateLimiting: RateLimitingConfiguration | undefined;
66
74
  /**
67
75
  * When true, generation for this exposure hit configured limits
76
+ *
77
+ * Note that this property is not observed for changes as it is immutable after creation.
68
78
  */
69
79
  truncated?: boolean;
70
80
  /**
@@ -76,17 +86,17 @@ export declare class ExposedEntity extends EventTarget {
76
86
  notifyChange(): void;
77
87
  toJSON(): ExposedEntitySchema;
78
88
  /**
79
- * Sets a new relative collection path for this exposed entity.
89
+ * Sets a new collection path for this exposed entity.
80
90
  *
81
91
  * It:
82
- * - updates the relativeCollectionPath property
92
+ * - updates the collectionPath property
83
93
  * - updates the absoluteCollectionPath property accordingly
84
- * - updates the relativeResourcePath and absoluteResourcePath accordingly.
94
+ * - updates the resourcePath accordingly.
85
95
  * @param path The new path to set.
86
96
  */
87
- setRelativeCollectionPath(path: string): void;
97
+ setCollectionPath(path: string): void;
88
98
  /**
89
- * Sets a new relative resource path for this exposed entity.
99
+ * Sets a new resource path for this exposed entity.
90
100
  *
91
101
  * Rules:
92
102
  * - Must start with '/'.
@@ -94,19 +104,19 @@ export declare class ExposedEntity extends EventTarget {
94
104
  * parameter segment (e.g. `/products/{productId}`) and only the parameter name may vary.
95
105
  * - If this exposure does NOT have a collection, the path can be any two segments (e.g. `/profile/{id}` or `/a/b`).
96
106
  */
97
- setRelativeResourcePath(path: string): void;
107
+ setResourcePath(path: string): void;
98
108
  /**
99
109
  * Computes the absolute path for this exposure's resource endpoint by
100
110
  * walking up the exposure tree using `parent.key` until reaching a root exposure.
101
111
  * The absolute path is composed by concatenating each ancestor's resource path
102
- * with this exposure's relative resource path.
112
+ * with this exposure's resource path.
103
113
  */
104
114
  getAbsoluteResourcePath(): string;
105
115
  /**
106
116
  * Computes the absolute path for this exposure's collection endpoint (if any)
107
117
  * by walking up the exposure tree using `parent.key` until reaching a root exposure.
108
118
  * The absolute path is composed by concatenating each ancestor's resource path
109
- * with this exposure's relative collection path.
119
+ * with this exposure's collection path.
110
120
  * Returns undefined if this exposure has no collection.
111
121
  */
112
122
  getAbsoluteCollectionPath(): string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ExposedEntity.d.ts","sourceRoot":"","sources":["../../../src/modeling/ExposedEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,YAAY,CAAA;AAEnB;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,WAAW;;IAC5C;;OAEG;IACH,IAAI,EAAE,OAAO,iBAAiB,CAAA;IAE9B;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,MAAM,EAAE,iBAAiB,CAAA;IAEzB;;;;OAIG;IACH,a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