@malloy-publisher/sdk 0.0.247 → 0.0.248

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.
@@ -2908,7 +2908,7 @@ export interface Source {
2908
2908
  */
2909
2909
  'givens'?: Array<Given>;
2910
2910
  /**
2911
- * Effective authorize expressions gating this source via `#(authorize)` / `##(authorize)` annotations — file-level expressions first, then the source\'s own, or, when it declares none, the nearest source it extends that does. Each is a Malloy boolean expression over declared givens, evaluated as a disjunction (OR) and enforced at query time. A request that reads this source is denied with HTTP 403 unless at least one expression evaluates true for the supplied givens; an empty or absent list means unrestricted. IMPORTANT for anything re-implementing the decision: this flat list cannot always express the predicate. Expressions from one source are OR-ed, but when more than one source gates the entry point (its own gate plus one carried from the source it derives from) those sources are AND-ed, and both sets appear here as one list. So a list of two expressions may mean \"either\" or \"both\". Treat it as \"at least these constraints apply\" — use it to decide THAT a source is gated, not to recompute WHETHER a given caller passes. Reading it as a pure disjunction grants where Publisher denies. Givens are caller-asserted, so this is a boundary only behind a trusted tier — see docs/authorize.md.
2911
+ * Effective authorize expressions gating this source, declared with a source-level `#(authorize)` annotation — the source\'s own, or, when it declares none, the nearest source it extends that does. (File-level `##(authorize)` is deprecated and fails the model load, so no expression here ever comes from one.) Each is a Malloy boolean expression over declared givens, evaluated as a disjunction (OR) and enforced at query time. An empty or absent list means unrestricted. How a denial surfaces depends on what the expression reads. An expression referencing only givens is a whole-source gate: the request is denied with HTTP 403 unless at least one expression evaluates true. An expression that also references a row field of the source is a row-level gate, applied as a filter instead — such a request succeeds with HTTP 200 and returns only the rows the expression admits, which may be none. Do not treat a 200 with zero rows as \"no gate applied\". IMPORTANT for anything re-implementing the decision: this flat list cannot always express the predicate. Expressions from one source are OR-ed, but when more than one source gates the entry point (its own gate plus one carried from the source it derives from) those sources are AND-ed, and both sets appear here as one list. So a list of two expressions may mean \"either\" or \"both\". Treat it as \"at least these constraints apply\" — use it to decide THAT a source is gated, not to recompute WHETHER a given caller passes. Reading it as a pure disjunction grants where Publisher denies. Givens are caller-asserted, so this is a boundary only behind a trusted tier — see docs/authorize.md.
2912
2912
  * @type {Array<string>}
2913
2913
  * @memberof Source
2914
2914
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@malloy-publisher/sdk",
3
3
  "description": "Malloy Publisher SDK",
4
- "version": "0.0.247",
4
+ "version": "0.0.248",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",