@uniformdev/mesh-edgehancer-sdk 20.71.0 → 20.71.2-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -236,6 +236,45 @@ type AfterAIEditResult = z.infer<typeof afterAIEditResultSchema>;
236
236
  */
237
237
  type AfterAIEditHookFn = (context: AfterAIEditContext) => Promise<AfterAIEditResult>;
238
238
 
239
+ /**
240
+ * A normalized record of one bound parameter value that consumed a data
241
+ * resource somewhere in the composition tree. Custom edgehancer authors can
242
+ * use this to derive minimal upstream queries (e.g. GraphQL field selection,
243
+ * downstream `select.*` forwarding) instead of always fetching the full
244
+ * resource shape.
245
+ */
246
+ type CollectedBinding = {
247
+ /**
248
+ * Data resource name referenced by the binding (post-alias-deref,
249
+ * post-loop-synthesis when surfaced from canvas-sdk's scope walker — the
250
+ * raw parsed name when produced by `collectComponentBindings`). Used as
251
+ * the key into per-DR binding buckets.
252
+ */
253
+ dataResource: string;
254
+ /**
255
+ * The full effective pointer for this binding, e.g. `/items/fields/title`,
256
+ * _including_ the leading `/<dataResource>` segment. Per-integration
257
+ * translators (UC's `deriveUniformContentProjection`, custom edgehancer
258
+ * authors) scan this for `/fields/<name>` and `/parameters/<name>` segments
259
+ * to derive a minimal upstream query.
260
+ */
261
+ pointer: string;
262
+ /**
263
+ * The JSON pointer expression _inside_ the data resource, with the leading
264
+ * `/<dataResource>` segment removed. May be undefined if the binding
265
+ * references the whole resource.
266
+ */
267
+ dataExpression: string | undefined;
268
+ /** Parameter id (property name) where the binding was found. */
269
+ parameterId: string;
270
+ /**
271
+ * Locale the binding's locale-scoped value was found under, if any. The
272
+ * empty string is normalized to undefined.
273
+ */
274
+ locale: string | undefined;
275
+ /** Condition index, or -1 for the default (non-conditional) value. */
276
+ conditionIndex: number;
277
+ };
239
278
  type RequestEdgehancerDataResourceContext = {
240
279
  /**
241
280
  * The data resource to fetch.
@@ -529,6 +568,14 @@ type PreRequestEdgehancerDataResourceContext = {
529
568
  * The data resource definition that will be requested.
530
569
  */
531
570
  dataResource: EdgehancerMergedDataType;
571
+ /**
572
+ * The set of bindings in the originating composition/entry that consume this
573
+ * data resource. This can be used to derive a data projection to the target API.
574
+ *
575
+ * Undefined for editor / authoring fetches so the editor can read every
576
+ * field to create new bindings. Never an empty array — unused data resources are automatically skipped from being fetched.
577
+ */
578
+ bindings?: readonly CollectedBinding[];
532
579
  };
533
580
  type PreRequestEdgehancerContext = {
534
581
  fetchContext: DataResourceFetchContext;
@@ -739,4 +786,4 @@ declare function getDataResourceQueryString({ parameters, url }: EdgehancerMerge
739
786
  /** Gets the HTTP headers for a data resource */
740
787
  declare function getDataResourceHeaders({ headers }: EdgehancerMergedDataType): Headers;
741
788
 
742
- export { type AfterAIDataResourceEditContext, type AfterAIDataResourceEditHookFn, type AfterAIDataResourceEditResult, type AfterAIEditContext, type AfterAIEditHookFn, type AfterAIEditResult, COLLECTION_DEFAULT_LIMIT, COLLECTION_DEFAULT_OFFSET, COLLECTION_MAX_LIMIT, type ConvertBatchResultsToEdgehancerResultOptions, type CreateAIDataResourceEditContext, type CreateAIDataResourceEditHookFn, type CreateAIDataResourceEditResult, type CreateAIEditContext, type CreateAIEditHookFn, type CreateAIEditResult, type CustomEdgehancerDefinition, type DataResource, type DataResourceFetchContext, type EdgehancerDataIssue, type EdgehancerMergedDataType, type MergedDataType, type PreRequestEdgehancerContext, type PreRequestEdgehancerDataResourceContext, type PreRequestEdgehancerDataResourceResult, type PreRequestEdgehancerResult, type PreRequestHookFn, type RequestEdgehancerContext, type RequestEdgehancerDataResourceContext, type RequestEdgehancerDataResourceResolutionResult, type RequestEdgehancerResult, type RequestHookFn, type ResolveBatchIdsResult, afterAIDataResourceEditContextSchema, afterAIDataResourceEditResultSchema, afterAIEditContextSchema, afterAIEditResultSchema, convertBatchResultsToEdgehancerResult, createAIDataResourceEditContextSchema, createAIDataResourceEditResultSchema, createAIEditContextSchema, createAIEditResultSchema, dataResourceSchema, edgehancerMergedDataTypeSchema, getDataResourceAsRequest, getDataResourceHeaders, getDataResourceQueryString, getDataResourceUrl, mergedDataTypeSchema, preRequestEdgehancerDataResourceResultSchema, preRequestEdgehancerResultSchema, requestEdgehancerDataResourceResolutionResultSchema, requestEdgehancerResultSchema, resolveBatchFetchIds, resolvingIssueSchema };
789
+ export { type AfterAIDataResourceEditContext, type AfterAIDataResourceEditHookFn, type AfterAIDataResourceEditResult, type AfterAIEditContext, type AfterAIEditHookFn, type AfterAIEditResult, COLLECTION_DEFAULT_LIMIT, COLLECTION_DEFAULT_OFFSET, COLLECTION_MAX_LIMIT, type CollectedBinding, type ConvertBatchResultsToEdgehancerResultOptions, type CreateAIDataResourceEditContext, type CreateAIDataResourceEditHookFn, type CreateAIDataResourceEditResult, type CreateAIEditContext, type CreateAIEditHookFn, type CreateAIEditResult, type CustomEdgehancerDefinition, type DataResource, type DataResourceFetchContext, type EdgehancerDataIssue, type EdgehancerMergedDataType, type MergedDataType, type PreRequestEdgehancerContext, type PreRequestEdgehancerDataResourceContext, type PreRequestEdgehancerDataResourceResult, type PreRequestEdgehancerResult, type PreRequestHookFn, type RequestEdgehancerContext, type RequestEdgehancerDataResourceContext, type RequestEdgehancerDataResourceResolutionResult, type RequestEdgehancerResult, type RequestHookFn, type ResolveBatchIdsResult, afterAIDataResourceEditContextSchema, afterAIDataResourceEditResultSchema, afterAIEditContextSchema, afterAIEditResultSchema, convertBatchResultsToEdgehancerResult, createAIDataResourceEditContextSchema, createAIDataResourceEditResultSchema, createAIEditContextSchema, createAIEditResultSchema, dataResourceSchema, edgehancerMergedDataTypeSchema, getDataResourceAsRequest, getDataResourceHeaders, getDataResourceQueryString, getDataResourceUrl, mergedDataTypeSchema, preRequestEdgehancerDataResourceResultSchema, preRequestEdgehancerResultSchema, requestEdgehancerDataResourceResolutionResultSchema, requestEdgehancerResultSchema, resolveBatchFetchIds, resolvingIssueSchema };
package/dist/index.d.ts CHANGED
@@ -236,6 +236,45 @@ type AfterAIEditResult = z.infer<typeof afterAIEditResultSchema>;
236
236
  */
237
237
  type AfterAIEditHookFn = (context: AfterAIEditContext) => Promise<AfterAIEditResult>;
238
238
 
239
+ /**
240
+ * A normalized record of one bound parameter value that consumed a data
241
+ * resource somewhere in the composition tree. Custom edgehancer authors can
242
+ * use this to derive minimal upstream queries (e.g. GraphQL field selection,
243
+ * downstream `select.*` forwarding) instead of always fetching the full
244
+ * resource shape.
245
+ */
246
+ type CollectedBinding = {
247
+ /**
248
+ * Data resource name referenced by the binding (post-alias-deref,
249
+ * post-loop-synthesis when surfaced from canvas-sdk's scope walker — the
250
+ * raw parsed name when produced by `collectComponentBindings`). Used as
251
+ * the key into per-DR binding buckets.
252
+ */
253
+ dataResource: string;
254
+ /**
255
+ * The full effective pointer for this binding, e.g. `/items/fields/title`,
256
+ * _including_ the leading `/<dataResource>` segment. Per-integration
257
+ * translators (UC's `deriveUniformContentProjection`, custom edgehancer
258
+ * authors) scan this for `/fields/<name>` and `/parameters/<name>` segments
259
+ * to derive a minimal upstream query.
260
+ */
261
+ pointer: string;
262
+ /**
263
+ * The JSON pointer expression _inside_ the data resource, with the leading
264
+ * `/<dataResource>` segment removed. May be undefined if the binding
265
+ * references the whole resource.
266
+ */
267
+ dataExpression: string | undefined;
268
+ /** Parameter id (property name) where the binding was found. */
269
+ parameterId: string;
270
+ /**
271
+ * Locale the binding's locale-scoped value was found under, if any. The
272
+ * empty string is normalized to undefined.
273
+ */
274
+ locale: string | undefined;
275
+ /** Condition index, or -1 for the default (non-conditional) value. */
276
+ conditionIndex: number;
277
+ };
239
278
  type RequestEdgehancerDataResourceContext = {
240
279
  /**
241
280
  * The data resource to fetch.
@@ -529,6 +568,14 @@ type PreRequestEdgehancerDataResourceContext = {
529
568
  * The data resource definition that will be requested.
530
569
  */
531
570
  dataResource: EdgehancerMergedDataType;
571
+ /**
572
+ * The set of bindings in the originating composition/entry that consume this
573
+ * data resource. This can be used to derive a data projection to the target API.
574
+ *
575
+ * Undefined for editor / authoring fetches so the editor can read every
576
+ * field to create new bindings. Never an empty array — unused data resources are automatically skipped from being fetched.
577
+ */
578
+ bindings?: readonly CollectedBinding[];
532
579
  };
533
580
  type PreRequestEdgehancerContext = {
534
581
  fetchContext: DataResourceFetchContext;
@@ -739,4 +786,4 @@ declare function getDataResourceQueryString({ parameters, url }: EdgehancerMerge
739
786
  /** Gets the HTTP headers for a data resource */
740
787
  declare function getDataResourceHeaders({ headers }: EdgehancerMergedDataType): Headers;
741
788
 
742
- export { type AfterAIDataResourceEditContext, type AfterAIDataResourceEditHookFn, type AfterAIDataResourceEditResult, type AfterAIEditContext, type AfterAIEditHookFn, type AfterAIEditResult, COLLECTION_DEFAULT_LIMIT, COLLECTION_DEFAULT_OFFSET, COLLECTION_MAX_LIMIT, type ConvertBatchResultsToEdgehancerResultOptions, type CreateAIDataResourceEditContext, type CreateAIDataResourceEditHookFn, type CreateAIDataResourceEditResult, type CreateAIEditContext, type CreateAIEditHookFn, type CreateAIEditResult, type CustomEdgehancerDefinition, type DataResource, type DataResourceFetchContext, type EdgehancerDataIssue, type EdgehancerMergedDataType, type MergedDataType, type PreRequestEdgehancerContext, type PreRequestEdgehancerDataResourceContext, type PreRequestEdgehancerDataResourceResult, type PreRequestEdgehancerResult, type PreRequestHookFn, type RequestEdgehancerContext, type RequestEdgehancerDataResourceContext, type RequestEdgehancerDataResourceResolutionResult, type RequestEdgehancerResult, type RequestHookFn, type ResolveBatchIdsResult, afterAIDataResourceEditContextSchema, afterAIDataResourceEditResultSchema, afterAIEditContextSchema, afterAIEditResultSchema, convertBatchResultsToEdgehancerResult, createAIDataResourceEditContextSchema, createAIDataResourceEditResultSchema, createAIEditContextSchema, createAIEditResultSchema, dataResourceSchema, edgehancerMergedDataTypeSchema, getDataResourceAsRequest, getDataResourceHeaders, getDataResourceQueryString, getDataResourceUrl, mergedDataTypeSchema, preRequestEdgehancerDataResourceResultSchema, preRequestEdgehancerResultSchema, requestEdgehancerDataResourceResolutionResultSchema, requestEdgehancerResultSchema, resolveBatchFetchIds, resolvingIssueSchema };
789
+ export { type AfterAIDataResourceEditContext, type AfterAIDataResourceEditHookFn, type AfterAIDataResourceEditResult, type AfterAIEditContext, type AfterAIEditHookFn, type AfterAIEditResult, COLLECTION_DEFAULT_LIMIT, COLLECTION_DEFAULT_OFFSET, COLLECTION_MAX_LIMIT, type CollectedBinding, type ConvertBatchResultsToEdgehancerResultOptions, type CreateAIDataResourceEditContext, type CreateAIDataResourceEditHookFn, type CreateAIDataResourceEditResult, type CreateAIEditContext, type CreateAIEditHookFn, type CreateAIEditResult, type CustomEdgehancerDefinition, type DataResource, type DataResourceFetchContext, type EdgehancerDataIssue, type EdgehancerMergedDataType, type MergedDataType, type PreRequestEdgehancerContext, type PreRequestEdgehancerDataResourceContext, type PreRequestEdgehancerDataResourceResult, type PreRequestEdgehancerResult, type PreRequestHookFn, type RequestEdgehancerContext, type RequestEdgehancerDataResourceContext, type RequestEdgehancerDataResourceResolutionResult, type RequestEdgehancerResult, type RequestHookFn, type ResolveBatchIdsResult, afterAIDataResourceEditContextSchema, afterAIDataResourceEditResultSchema, afterAIEditContextSchema, afterAIEditResultSchema, convertBatchResultsToEdgehancerResult, createAIDataResourceEditContextSchema, createAIDataResourceEditResultSchema, createAIEditContextSchema, createAIEditResultSchema, dataResourceSchema, edgehancerMergedDataTypeSchema, getDataResourceAsRequest, getDataResourceHeaders, getDataResourceQueryString, getDataResourceUrl, mergedDataTypeSchema, preRequestEdgehancerDataResourceResultSchema, preRequestEdgehancerResultSchema, requestEdgehancerDataResourceResolutionResultSchema, requestEdgehancerResultSchema, resolveBatchFetchIds, resolvingIssueSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-edgehancer-sdk",
3
- "version": "20.71.0",
3
+ "version": "20.71.2-alpha.7+2ec20a4ae2",
4
4
  "description": "Uniform Mesh Edgehancer SDK",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -47,7 +47,7 @@
47
47
  "/dist"
48
48
  ],
49
49
  "dependencies": {
50
- "@uniformdev/canvas": "20.71.0",
50
+ "@uniformdev/canvas": "20.71.2-alpha.7+2ec20a4ae2",
51
51
  "tsafe": "1.8.12",
52
52
  "zod": "^4.4.3"
53
53
  },
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "9b3f5e3fa27b275c00cc252da7ed72913464cce6"
63
+ "gitHead": "2ec20a4ae2d167b6e4e6ad47463b90fb16b73c47"
64
64
  }