@aglyn/plugins-data 1.0.0-beta.218 → 1.0.0-beta.220

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 (84) hide show
  1. package/README.md +1 -1
  2. package/package.json +11 -9
  3. package/src/lib/constants/bundle-common.d.ts +8 -0
  4. package/src/lib/constants/bundle-common.js +6 -0
  5. package/src/lib/constants/bundle-common.js.map +1 -1
  6. package/src/lib/declarations.console-server.d.ts +47 -0
  7. package/src/lib/declarations.console-server.js +74 -0
  8. package/src/lib/declarations.console-server.js.map +1 -0
  9. package/src/lib/declarations.server.d.ts +43 -0
  10. package/src/lib/declarations.server.js +73 -0
  11. package/src/lib/declarations.server.js.map +1 -0
  12. package/src/lib/form-target/dataset-form-record-target.server.d.ts +40 -0
  13. package/src/lib/form-target/dataset-form-record-target.server.js +160 -0
  14. package/src/lib/form-target/dataset-form-record-target.server.js.map +1 -0
  15. package/src/lib/form-target/form-dataset-binding-token.d.ts +35 -0
  16. package/src/lib/form-target/form-dataset-binding-token.js +107 -0
  17. package/src/lib/form-target/form-dataset-binding-token.js.map +1 -0
  18. package/src/lib/form-target/form-dataset-binding.d.ts +50 -0
  19. package/src/lib/form-target/form-dataset-binding.js +74 -0
  20. package/src/lib/form-target/form-dataset-binding.js.map +1 -0
  21. package/src/lib/form-target/stamp-form-dataset-bindings.d.ts +39 -0
  22. package/src/lib/form-target/stamp-form-dataset-bindings.js +65 -0
  23. package/src/lib/form-target/stamp-form-dataset-bindings.js.map +1 -0
  24. package/src/lib/model/dataset-csv.d.ts +36 -0
  25. package/src/lib/model/dataset-csv.js +85 -0
  26. package/src/lib/model/dataset-csv.js.map +1 -0
  27. package/src/lib/model/dataset-io.d.ts +8 -7
  28. package/src/lib/model/dataset-io.js +9 -8
  29. package/src/lib/model/dataset-io.js.map +1 -1
  30. package/src/lib/model/dataset-record-list.d.ts +40 -0
  31. package/src/lib/model/dataset-record-list.js +61 -0
  32. package/src/lib/model/dataset-record-list.js.map +1 -0
  33. package/src/lib/model/dataset-record.d.ts +33 -0
  34. package/src/lib/model/dataset-record.js +68 -0
  35. package/src/lib/model/dataset-record.js.map +1 -0
  36. package/src/lib/plugin.js +3 -0
  37. package/src/lib/plugin.js.map +1 -1
  38. package/src/lib/repeat/dataset-repeat-rows.d.ts +2 -2
  39. package/src/lib/repeat/dataset-repeat-rows.js +2 -2
  40. package/src/lib/repeat/dataset-repeat-rows.js.map +1 -1
  41. package/src/lib/repeat/dataset-repeat-rows.server.d.ts +43 -0
  42. package/src/lib/repeat/dataset-repeat-rows.server.js +170 -0
  43. package/src/lib/repeat/dataset-repeat-rows.server.js.map +1 -0
  44. package/src/lib/repeat/dataset-repeat-source.js +3 -1
  45. package/src/lib/repeat/dataset-repeat-source.js.map +1 -1
  46. package/src/lib/server/announce-dataset-records.d.ts +37 -0
  47. package/src/lib/server/announce-dataset-records.js +54 -0
  48. package/src/lib/server/announce-dataset-records.js.map +1 -0
  49. package/src/lib/server/api-v1/datasets.d.ts +18 -0
  50. package/src/lib/server/api-v1/datasets.js +646 -0
  51. package/src/lib/server/api-v1/datasets.js.map +1 -0
  52. package/src/lib/server/api-v1/openapi.d.ts +26 -0
  53. package/src/lib/server/api-v1/openapi.js +260 -0
  54. package/src/lib/server/api-v1/openapi.js.map +1 -0
  55. package/src/lib/server/api-v1/usage.d.ts +26 -0
  56. package/src/lib/server/api-v1/usage.js +33 -0
  57. package/src/lib/server/api-v1/usage.js.map +1 -0
  58. package/src/lib/server/custom-field-types.d.ts +39 -0
  59. package/src/lib/server/custom-field-types.js +41 -0
  60. package/src/lib/server/custom-field-types.js.map +1 -0
  61. package/src/lib/server/dataset-figures.d.ts +61 -0
  62. package/src/lib/server/dataset-figures.js +413 -0
  63. package/src/lib/server/dataset-figures.js.map +1 -0
  64. package/src/lib/server/dataset-record-index.d.ts +18 -0
  65. package/src/lib/server/dataset-record-index.js +62 -0
  66. package/src/lib/server/dataset-record-index.js.map +1 -0
  67. package/src/lib/server/dataset-storage-meter.d.ts +29 -0
  68. package/src/lib/server/dataset-storage-meter.js +82 -0
  69. package/src/lib/server/dataset-storage-meter.js.map +1 -0
  70. package/src/lib/server/datasets-export-route.d.ts +57 -0
  71. package/src/lib/server/datasets-export-route.js +229 -0
  72. package/src/lib/server/datasets-export-route.js.map +1 -0
  73. package/src/lib/server/datasets-route.d.ts +38 -0
  74. package/src/lib/server/datasets-route.js +614 -0
  75. package/src/lib/server/datasets-route.js.map +1 -0
  76. package/src/lib/server.d.ts +23 -0
  77. package/src/lib/server.js +54 -0
  78. package/src/lib/server.js.map +1 -0
  79. package/src/lib/site-bundle/datasets-site-bundle.server.d.ts +87 -0
  80. package/src/lib/site-bundle/datasets-site-bundle.server.js +184 -0
  81. package/src/lib/site-bundle/datasets-site-bundle.server.js.map +1 -0
  82. package/src/lib/usage-axes.d.ts +24 -0
  83. package/src/lib/usage-axes.js +32 -0
  84. package/src/lib/usage-axes.js.map +1 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/data/src/lib/repeat/dataset-repeat-source.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FieldComponentType } from '@aglyn/aglyn'\nimport type {\n RepeatRowsAnswer,\n RepeatRowsRequest,\n RepeatSource,\n} from '@aglyn/aglyn/app-utils/repeat-sources'\nimport { useFirestore, useOrgDataScope } from '@aglyn/tenant-feature-instance'\nimport { useEffect, useState } from 'react'\nimport { readDatasetRepeatRows } from './dataset-repeat-rows'\n\n/**\n * The prop a repeat's dataset persists under (AGL-103). The published page's\n * composition expands every node that carries it, whatever its component, so\n * the Stack's stored repeats and any element's read as one shape. Persisted —\n * never rename.\n */\nexport const DATASET_REPEAT_KEY_PROP = 'repeatDataset'\n\n/**\n * A dataset's rows for the canvas, read once per key and site while a canvas\n * element repeats over it.\n *\n * `missing` for a site with no organization: datasets belong to the\n * organization, so there is nothing such a site can repeat over.\n */\nexport function useDatasetRepeatRows(\n request: RepeatRowsRequest,\n): RepeatRowsAnswer {\n const { hostId, key } = request\n const firestore = useFirestore()\n const { scope, ready } = useOrgDataScope({ hostId })\n const [answer, setAnswer] = useState<RepeatRowsAnswer>({ status: 'loading' })\n useEffect(() => {\n if (!ready) return undefined\n if (!scope) {\n setAnswer({ status: 'missing' })\n return undefined\n }\n let active = true\n setAnswer({ status: 'loading' })\n readDatasetRepeatRows({ firestore, scope, hostId, key }).then(\n (next) => {\n if (active) setAnswer(next)\n },\n (error) => {\n console.error(error)\n if (active) setAnswer({ status: 'error' })\n },\n )\n return () => {\n active = false\n }\n }, [firestore, scope, ready, hostId, key])\n return answer\n}\n\n/**\n * Datasets as a repeat source (AGL-3111): what any element can repeat over,\n * picked with the dataset picker and previewed on the canvas from the real\n * rows. Registered by {@link registerDataConsole}, the function the console's\n * plugin loader calls by name.\n */\nexport const DATASET_REPEAT_SOURCE: RepeatSource = {\n id: 'dataset',\n label: 'Dataset',\n keyProp: DATASET_REPEAT_KEY_PROP,\n keyAttribute: {\n component: FieldComponentType.DATASET_SELECT,\n label: 'Repeat over dataset',\n description:\n 'Render this element once per record of a dataset on the published ' +\n 'site. Use {{item.field}} for a record value. Stored by dataset id — ' +\n 'renames never break the repeat.',\n },\n useRows: useDatasetRepeatRows,\n}\n"],"names":["FieldComponentType","useFirestore","useOrgDataScope","useEffect","useState","readDatasetRepeatRows","DATASET_REPEAT_KEY_PROP","useDatasetRepeatRows","request","hostId","key","firestore","scope","ready","answer","setAnswer","status","undefined","active","then","next","error","console","DATASET_REPEAT_SOURCE","id","label","keyProp","keyAttribute","component","DATASET_SELECT","description","useRows"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,kBAAkB,QAAQ,eAAc;AAMjD,SAASC,YAAY,EAAEC,eAAe,QAAQ,iCAAgC;AAC9E,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAC3C,SAASC,qBAAqB,QAAQ,2BAAuB;AAE7D;;;;;CAKC,GACD,OAAO,MAAMC,0BAA0B,gBAAe;AAEtD;;;;;;CAMC,GACD,OAAO,SAASC,qBACdC,OAA0B;IAE1B,MAAM,EAAEC,MAAM,EAAEC,GAAG,EAAE,GAAGF;IACxB,MAAMG,YAAYV;IAClB,MAAM,EAAEW,KAAK,EAAEC,KAAK,EAAE,GAAGX,gBAAgB;QAAEO;IAAO;IAClD,MAAM,CAACK,QAAQC,UAAU,GAAGX,SAA2B;QAAEY,QAAQ;IAAU;IAC3Eb,UAAU;QACR,IAAI,CAACU,OAAO,OAAOI;QACnB,IAAI,CAACL,OAAO;YACVG,UAAU;gBAAEC,QAAQ;YAAU;YAC9B,OAAOC;QACT;QACA,IAAIC,SAAS;QACbH,UAAU;YAAEC,QAAQ;QAAU;QAC9BX,sBAAsB;YAAEM;YAAWC;YAAOH;YAAQC;QAAI,GAAGS,IAAI,CAC3D,CAACC;YACC,IAAIF,QAAQH,UAAUK;QACxB,GACA,CAACC;YACCC,QAAQD,KAAK,CAACA;YACd,IAAIH,QAAQH,UAAU;gBAAEC,QAAQ;YAAQ;QAC1C;QAEF,OAAO;YACLE,SAAS;QACX;IACF,GAAG;QAACP;QAAWC;QAAOC;QAAOJ;QAAQC;KAAI;IACzC,OAAOI;AACT;AAEA;;;;;CAKC,GACD,OAAO,MAAMS,wBAAsC;IACjDC,IAAI;IACJC,OAAO;IACPC,SAASpB;IACTqB,cAAc;QACZC,WAAW5B,mBAAmB6B,cAAc;QAC5CJ,OAAO;QACPK,aACE,uEACA,yEACA;IACJ;IACAC,SAASxB;AACX,EAAC"}
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/data/src/lib/repeat/dataset-repeat-source.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FieldComponentType } from '@aglyn/aglyn'\nimport type {\n RepeatRowsAnswer,\n RepeatRowsRequest,\n RepeatSource,\n} from '@aglyn/aglyn/app-utils/repeat-sources'\nimport { useFirestore, useOrgDataScope } from '@aglyn/tenant-feature-instance'\nimport { useEffect, useState } from 'react'\nimport { DATASET_REPEAT_SOURCE_ID } from '../constants/bundle-common'\nimport { readDatasetRepeatRows } from './dataset-repeat-rows'\n\n/**\n * The prop a repeat's dataset persists under (AGL-103). The published page's\n * composition expands every node that carries it, whatever its component, so\n * the Stack's stored repeats and any element's read as one shape. Persisted —\n * never rename.\n */\nexport const DATASET_REPEAT_KEY_PROP = 'repeatDataset'\n\n/**\n * A dataset's rows for the canvas, read once per key and site while a canvas\n * element repeats over it.\n *\n * `missing` for a site with no organization: datasets belong to the\n * organization, so there is nothing such a site can repeat over.\n */\nexport function useDatasetRepeatRows(\n request: RepeatRowsRequest,\n): RepeatRowsAnswer {\n const { hostId, key } = request\n const firestore = useFirestore()\n const { scope, ready } = useOrgDataScope({ hostId })\n const [answer, setAnswer] = useState<RepeatRowsAnswer>({ status: 'loading' })\n useEffect(() => {\n if (!ready) return undefined\n if (!scope) {\n setAnswer({ status: 'missing' })\n return undefined\n }\n let active = true\n setAnswer({ status: 'loading' })\n readDatasetRepeatRows({ firestore, scope, hostId, key }).then(\n (next) => {\n if (active) setAnswer(next)\n },\n (error) => {\n console.error(error)\n if (active) setAnswer({ status: 'error' })\n },\n )\n return () => {\n active = false\n }\n }, [firestore, scope, ready, hostId, key])\n return answer\n}\n\n/**\n * Datasets as a repeat source (AGL-3111): what any element can repeat over,\n * picked with the dataset picker and previewed on the canvas from the real\n * rows. Registered by {@link registerDataConsole}, the function the console's\n * plugin loader calls by name.\n */\nexport const DATASET_REPEAT_SOURCE: RepeatSource = {\n id: DATASET_REPEAT_SOURCE_ID,\n label: 'Dataset',\n keyProp: DATASET_REPEAT_KEY_PROP,\n entityKind: 'datasets',\n keyAttribute: {\n component: FieldComponentType.DATASET_SELECT,\n label: 'Repeat over dataset',\n description:\n 'Render this element once per record of a dataset on the published ' +\n 'site. Use {{item.field}} for a record value. Stored by dataset id — ' +\n 'renames never break the repeat.',\n },\n useRows: useDatasetRepeatRows,\n}\n"],"names":["FieldComponentType","useFirestore","useOrgDataScope","useEffect","useState","DATASET_REPEAT_SOURCE_ID","readDatasetRepeatRows","DATASET_REPEAT_KEY_PROP","useDatasetRepeatRows","request","hostId","key","firestore","scope","ready","answer","setAnswer","status","undefined","active","then","next","error","console","DATASET_REPEAT_SOURCE","id","label","keyProp","entityKind","keyAttribute","component","DATASET_SELECT","description","useRows"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,kBAAkB,QAAQ,eAAc;AAMjD,SAASC,YAAY,EAAEC,eAAe,QAAQ,iCAAgC;AAC9E,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAC3C,SAASC,wBAAwB,QAAQ,gCAA4B;AACrE,SAASC,qBAAqB,QAAQ,2BAAuB;AAE7D;;;;;CAKC,GACD,OAAO,MAAMC,0BAA0B,gBAAe;AAEtD;;;;;;CAMC,GACD,OAAO,SAASC,qBACdC,OAA0B;IAE1B,MAAM,EAAEC,MAAM,EAAEC,GAAG,EAAE,GAAGF;IACxB,MAAMG,YAAYX;IAClB,MAAM,EAAEY,KAAK,EAAEC,KAAK,EAAE,GAAGZ,gBAAgB;QAAEQ;IAAO;IAClD,MAAM,CAACK,QAAQC,UAAU,GAAGZ,SAA2B;QAAEa,QAAQ;IAAU;IAC3Ed,UAAU;QACR,IAAI,CAACW,OAAO,OAAOI;QACnB,IAAI,CAACL,OAAO;YACVG,UAAU;gBAAEC,QAAQ;YAAU;YAC9B,OAAOC;QACT;QACA,IAAIC,SAAS;QACbH,UAAU;YAAEC,QAAQ;QAAU;QAC9BX,sBAAsB;YAAEM;YAAWC;YAAOH;YAAQC;QAAI,GAAGS,IAAI,CAC3D,CAACC;YACC,IAAIF,QAAQH,UAAUK;QACxB,GACA,CAACC;YACCC,QAAQD,KAAK,CAACA;YACd,IAAIH,QAAQH,UAAU;gBAAEC,QAAQ;YAAQ;QAC1C;QAEF,OAAO;YACLE,SAAS;QACX;IACF,GAAG;QAACP;QAAWC;QAAOC;QAAOJ;QAAQC;KAAI;IACzC,OAAOI;AACT;AAEA;;;;;CAKC,GACD,OAAO,MAAMS,wBAAsC;IACjDC,IAAIpB;IACJqB,OAAO;IACPC,SAASpB;IACTqB,YAAY;IACZC,cAAc;QACZC,WAAW9B,mBAAmB+B,cAAc;QAC5CL,OAAO;QACPM,aACE,uEACA,yEACA;IACJ;IACAC,SAASzB;AACX,EAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { type DatasetAnnounceResult } from '@aglyn/tenant-data-admin/server/dataset-live-pages';
18
+ import type { Firestore } from 'firebase-admin/firestore';
19
+ /**
20
+ * Refresh every live page showing this dataset's records, from one of this
21
+ * plugin's console routes (AGL-3113).
22
+ *
23
+ * `announceDatasetRecordChange` works out WHICH pages a record write makes
24
+ * stale; the drop goes through the platform's site cache. Callers `await` it:
25
+ * the pages are supposed to be fresh by the time the editor's save returns.
26
+ * The result is returned rather than swallowed so a route can surface the
27
+ * shortfall warning — a refusal is the one case where the write landed and
28
+ * the live pages stay stale for the rest of their window.
29
+ *
30
+ * BEST EFFORT, ALWAYS. The record has already been written by the time this
31
+ * runs, so it never throws and never rejects.
32
+ */
33
+ export declare function announceDatasetRecords(options: {
34
+ firestore: Firestore;
35
+ orgId: string;
36
+ datasetId: string;
37
+ }): Promise<DatasetAnnounceResult>;
@@ -0,0 +1,54 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ /**
3
+ * @license
4
+ * Copyright 2026 Aglyn LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */ import { dropPluginSiteCache } from "@aglyn/aglyn/plugin-manager/plugin-site-cache";
18
+ import { announceDatasetRecordChange } from "@aglyn/tenant-data-admin/server/dataset-live-pages";
19
+ /**
20
+ * Drops one site's pages through the platform's site cache, narrowed to the
21
+ * addresses that repeat over the dataset — the app knows how to drop a page on
22
+ * every address a site answers at, and this plugin knows which pages.
23
+ */ const dropThroughSiteCache = async (target)=>{
24
+ const result = await dropPluginSiteCache({
25
+ hostIds: [
26
+ target.hostId
27
+ ],
28
+ paths: {
29
+ [target.hostId]: target.paths
30
+ },
31
+ reason: 'dataset records changed'
32
+ });
33
+ return result.complete && result.dropped > 0;
34
+ };
35
+ /**
36
+ * Refresh every live page showing this dataset's records, from one of this
37
+ * plugin's console routes (AGL-3113).
38
+ *
39
+ * `announceDatasetRecordChange` works out WHICH pages a record write makes
40
+ * stale; the drop goes through the platform's site cache. Callers `await` it:
41
+ * the pages are supposed to be fresh by the time the editor's save returns.
42
+ * The result is returned rather than swallowed so a route can surface the
43
+ * shortfall warning — a refusal is the one case where the write landed and
44
+ * the live pages stay stale for the rest of their window.
45
+ *
46
+ * BEST EFFORT, ALWAYS. The record has already been written by the time this
47
+ * runs, so it never throws and never rejects.
48
+ */ export async function announceDatasetRecords(options) {
49
+ return announceDatasetRecordChange(_extends({}, options, {
50
+ drop: dropThroughSiteCache
51
+ }));
52
+ }
53
+
54
+ //# sourceMappingURL=announce-dataset-records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/data/src/lib/server/announce-dataset-records.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dropPluginSiteCache } from '@aglyn/aglyn/plugin-manager/plugin-site-cache'\nimport {\n announceDatasetRecordChange,\n type DatasetAnnounceResult,\n type LivePageDropper,\n} from '@aglyn/tenant-data-admin/server/dataset-live-pages'\nimport type { Firestore } from 'firebase-admin/firestore'\n\n/**\n * Drops one site's pages through the platform's site cache, narrowed to the\n * addresses that repeat over the dataset — the app knows how to drop a page on\n * every address a site answers at, and this plugin knows which pages.\n */\nconst dropThroughSiteCache: LivePageDropper = async (target) => {\n const result = await dropPluginSiteCache({\n hostIds: [target.hostId],\n paths: { [target.hostId]: target.paths },\n reason: 'dataset records changed',\n })\n return result.complete && result.dropped > 0\n}\n\n/**\n * Refresh every live page showing this dataset's records, from one of this\n * plugin's console routes (AGL-3113).\n *\n * `announceDatasetRecordChange` works out WHICH pages a record write makes\n * stale; the drop goes through the platform's site cache. Callers `await` it:\n * the pages are supposed to be fresh by the time the editor's save returns.\n * The result is returned rather than swallowed so a route can surface the\n * shortfall warning — a refusal is the one case where the write landed and\n * the live pages stay stale for the rest of their window.\n *\n * BEST EFFORT, ALWAYS. The record has already been written by the time this\n * runs, so it never throws and never rejects.\n */\nexport async function announceDatasetRecords(options: {\n firestore: Firestore\n orgId: string\n datasetId: string\n}): Promise<DatasetAnnounceResult> {\n return announceDatasetRecordChange({ ...options, drop: dropThroughSiteCache })\n}\n"],"names":["dropPluginSiteCache","announceDatasetRecordChange","dropThroughSiteCache","target","result","hostIds","hostId","paths","reason","complete","dropped","announceDatasetRecords","options","drop"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,mBAAmB,QAAQ,gDAA+C;AACnF,SACEC,2BAA2B,QAGtB,qDAAoD;AAG3D;;;;CAIC,GACD,MAAMC,uBAAwC,OAAOC;IACnD,MAAMC,SAAS,MAAMJ,oBAAoB;QACvCK,SAAS;YAACF,OAAOG,MAAM;SAAC;QACxBC,OAAO;YAAE,CAACJ,OAAOG,MAAM,CAAC,EAAEH,OAAOI,KAAK;QAAC;QACvCC,QAAQ;IACV;IACA,OAAOJ,OAAOK,QAAQ,IAAIL,OAAOM,OAAO,GAAG;AAC7C;AAEA;;;;;;;;;;;;;CAaC,GACD,OAAO,eAAeC,uBAAuBC,OAI5C;IACC,OAAOX,4BAA4B,aAAKW;QAASC,MAAMX;;AACzD"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { type ApiV1Context } from '@aglyn/tenant-data-admin/server/api-v1-kit';
18
+ export declare function handleDatasets(request: Request, ctx: ApiV1Context, segments: string[], url: URL): Promise<Response>;