@aglyn/plugins-data 1.25.0 → 1.26.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aglyn/plugins-data",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://aglyn.com",
|
|
6
6
|
"repository": {
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aglyn/aglyn": "1.
|
|
29
|
-
"@aglyn/shared-data-mdi": "1.
|
|
30
|
-
"@aglyn/shared-ui-jsx": "1.
|
|
31
|
-
"@aglyn/shared-ui-jsx-forms": "1.
|
|
32
|
-
"@aglyn/shared-ui-next": "1.
|
|
33
|
-
"@aglyn/shared-ui-snackstack": "1.
|
|
34
|
-
"@aglyn/shared-util-http": "1.
|
|
35
|
-
"@aglyn/shared-util-timestamp": "1.
|
|
36
|
-
"@aglyn/tenant-data-admin": "1.
|
|
37
|
-
"@aglyn/tenant-feature-instance": "1.
|
|
38
|
-
"@aglyn/tenant-runtime": "1.
|
|
28
|
+
"@aglyn/aglyn": "1.26.1",
|
|
29
|
+
"@aglyn/shared-data-mdi": "1.26.1",
|
|
30
|
+
"@aglyn/shared-ui-jsx": "1.26.1",
|
|
31
|
+
"@aglyn/shared-ui-jsx-forms": "1.26.1",
|
|
32
|
+
"@aglyn/shared-ui-next": "1.26.1",
|
|
33
|
+
"@aglyn/shared-ui-snackstack": "1.26.1",
|
|
34
|
+
"@aglyn/shared-util-http": "1.26.1",
|
|
35
|
+
"@aglyn/shared-util-timestamp": "1.26.1",
|
|
36
|
+
"@aglyn/tenant-data-admin": "1.26.1",
|
|
37
|
+
"@aglyn/tenant-feature-instance": "1.26.1",
|
|
38
|
+
"@aglyn/tenant-runtime": "1.26.1",
|
|
39
39
|
"@swc/helpers": "0.5.24"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
* document to every endpoint the documentation promises.
|
|
24
24
|
*/ export const DATASETS_API_V1_DESCRIPTION = {
|
|
25
25
|
tag: 'Datasets',
|
|
26
|
+
docsPage: 'datasets',
|
|
26
27
|
description: 'Structured collections and the records inside them.',
|
|
27
28
|
schemaName: 'Dataset',
|
|
28
29
|
required: [
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
method: 'get',
|
|
45
46
|
operationId: 'listDatasets',
|
|
46
47
|
summary: 'List datasets',
|
|
48
|
+
description: 'Lists the workspace’s datasets: the structured content, such as services, menus or team members, that site pages show. Each has an id, a name and its fields.',
|
|
47
49
|
list: true,
|
|
48
50
|
returns: 'Dataset'
|
|
49
51
|
},
|
|
@@ -52,15 +54,21 @@
|
|
|
52
54
|
method: 'post',
|
|
53
55
|
operationId: 'createDataset',
|
|
54
56
|
summary: 'Create a dataset',
|
|
57
|
+
description: 'Creates a dataset with a `name` and its `fields` (the names of its columns). Returns the new dataset.',
|
|
55
58
|
accepts: 'DatasetWrite',
|
|
56
59
|
returns: 'Dataset',
|
|
57
|
-
creates: true
|
|
60
|
+
creates: true,
|
|
61
|
+
bodyRequires: [
|
|
62
|
+
'name',
|
|
63
|
+
'fields'
|
|
64
|
+
]
|
|
58
65
|
},
|
|
59
66
|
{
|
|
60
67
|
path: '/v1/datasets/{datasetId}',
|
|
61
68
|
method: 'get',
|
|
62
69
|
operationId: 'getDataset',
|
|
63
|
-
summary: '
|
|
70
|
+
summary: 'Get a dataset',
|
|
71
|
+
description: 'Returns one dataset with its fields. Needs `datasetId` from List datasets.',
|
|
64
72
|
returns: 'Dataset',
|
|
65
73
|
pathParams: [
|
|
66
74
|
{
|
|
@@ -74,6 +82,7 @@
|
|
|
74
82
|
method: 'patch',
|
|
75
83
|
operationId: 'updateDataset',
|
|
76
84
|
summary: 'Update a dataset',
|
|
85
|
+
description: 'Changes a dataset’s name or fields. Needs `datasetId` from List datasets. Returns the updated dataset.',
|
|
77
86
|
accepts: 'DatasetWrite',
|
|
78
87
|
returns: 'Dataset',
|
|
79
88
|
pathParams: [
|
|
@@ -89,7 +98,7 @@
|
|
|
89
98
|
operationId: 'deleteDataset',
|
|
90
99
|
summary: 'Delete a dataset',
|
|
91
100
|
returns: 'Deleted',
|
|
92
|
-
description: '
|
|
101
|
+
description: 'Deletes an empty dataset permanently. Needs `datasetId` from List datasets. A dataset that still holds records is refused; delete its records first.',
|
|
93
102
|
pathParams: [
|
|
94
103
|
{
|
|
95
104
|
name: 'datasetId',
|
|
@@ -101,7 +110,8 @@
|
|
|
101
110
|
path: '/v1/datasets/{datasetId}/records',
|
|
102
111
|
method: 'get',
|
|
103
112
|
operationId: 'listDatasetRecords',
|
|
104
|
-
summary: 'List records',
|
|
113
|
+
summary: 'List a dataset’s records',
|
|
114
|
+
description: 'Lists the records in one dataset, each with its values by field. Needs `datasetId` from List datasets.',
|
|
105
115
|
list: true,
|
|
106
116
|
returns: 'DatasetRecord',
|
|
107
117
|
pathParams: [
|
|
@@ -115,7 +125,8 @@
|
|
|
115
125
|
path: '/v1/datasets/{datasetId}/records',
|
|
116
126
|
method: 'post',
|
|
117
127
|
operationId: 'createDatasetRecord',
|
|
118
|
-
summary: '
|
|
128
|
+
summary: 'Add a record to a dataset',
|
|
129
|
+
description: 'Adds a record to a dataset. Needs `datasetId` from List datasets; `values` maps the dataset’s field ids to values. Returns the new record. A page that shows the dataset picks it up after the site is published.',
|
|
119
130
|
accepts: 'DatasetRecordWrite',
|
|
120
131
|
returns: 'DatasetRecord',
|
|
121
132
|
creates: true,
|
|
@@ -130,7 +141,8 @@
|
|
|
130
141
|
path: '/v1/datasets/{datasetId}/records/{recordId}',
|
|
131
142
|
method: 'get',
|
|
132
143
|
operationId: 'getDatasetRecord',
|
|
133
|
-
summary: '
|
|
144
|
+
summary: 'Get a dataset record',
|
|
145
|
+
description: 'Returns one record with its values. Needs `datasetId` from List datasets and `recordId` from List a dataset’s records.',
|
|
134
146
|
returns: 'DatasetRecord',
|
|
135
147
|
pathParams: [
|
|
136
148
|
{
|
|
@@ -147,7 +159,8 @@
|
|
|
147
159
|
path: '/v1/datasets/{datasetId}/records/{recordId}',
|
|
148
160
|
method: 'patch',
|
|
149
161
|
operationId: 'updateDatasetRecord',
|
|
150
|
-
summary: 'Update a record',
|
|
162
|
+
summary: 'Update a dataset record',
|
|
163
|
+
description: 'Changes some of a record’s values; values not sent stay as they are. Needs `datasetId` and `recordId`. Returns the updated record.',
|
|
151
164
|
accepts: 'DatasetRecordWrite',
|
|
152
165
|
returns: 'DatasetRecord',
|
|
153
166
|
pathParams: [
|
|
@@ -165,7 +178,8 @@
|
|
|
165
178
|
path: '/v1/datasets/{datasetId}/records/{recordId}',
|
|
166
179
|
method: 'delete',
|
|
167
180
|
operationId: 'deleteDatasetRecord',
|
|
168
|
-
summary: 'Delete a record',
|
|
181
|
+
summary: 'Delete a dataset record',
|
|
182
|
+
description: 'Deletes a record permanently. Needs `datasetId` and `recordId`.',
|
|
169
183
|
returns: 'Deleted',
|
|
170
184
|
pathParams: [
|
|
171
185
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../libs/plugins/data/src/lib/server/api-v1/openapi.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 {\n type ApiV1ResourceDescription,\n isoField as ISO,\n nullableField as nullable,\n objectKindField as OBJECT_FIELD,\n stringField as str,\n stringListField as strList,\n} from '@aglyn/tenant-data-admin/server/api-v1-description'\n\n/**\n * `/v1/datasets` as the customer API's OpenAPI document describes it — the\n * dataset, its records and the two write bodies — what the console's builder\n * turns into paths, a tag and schemas, and the MCP tools derive from.\n * Transcribed from the customer-facing contract in\n * `apps/docs/api/resources/datasets.md`; `api-v1-openapi.spec.ts` holds the\n * document to every endpoint the documentation promises.\n */\nexport const DATASETS_API_V1_DESCRIPTION: ApiV1ResourceDescription = {\n tag: 'Datasets',\n description: 'Structured collections and the records inside them.',\n schemaName: 'Dataset',\n required: ['id', 'object', 'name', 'fields'],\n fields: {\n id: str('Dataset id.'),\n object: OBJECT_FIELD('dataset'),\n name: str('Display name; `\"\"` when none is set.'),\n fields: strList(\n 'Field ids in the dataset’s model. The model itself — types, limits, display names — is not returned.',\n ),\n created: nullable(ISO('When the dataset was created.')),\n },\n ops: [\n { path: '/v1/datasets', method: 'get', operationId: 'listDatasets', summary: 'List datasets', list: true, returns: 'Dataset' },\n { path: '/v1/datasets', method: 'post', operationId: 'createDataset', summary: 'Create a dataset', accepts: 'DatasetWrite', returns: 'Dataset', creates: true },\n { path: '/v1/datasets/{datasetId}', method: 'get', operationId: 'getDataset', summary: 'Retrieve a dataset', returns: 'Dataset', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }] },\n { path: '/v1/datasets/{datasetId}', method: 'patch', operationId: 'updateDataset', summary: 'Update a dataset', accepts: 'DatasetWrite', returns: 'Dataset', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }] },\n {\n path: '/v1/datasets/{datasetId}', method: 'delete', operationId: 'deleteDataset', summary: 'Delete a dataset', returns: 'Deleted',\n description: 'Refuses with `409 conflict` (`code: \"dataset_not_empty\"`) while the dataset still holds records.',\n pathParams: [{ name: 'datasetId', description: 'Dataset id.' }],\n },\n { path: '/v1/datasets/{datasetId}/records', method: 'get', operationId: 'listDatasetRecords', summary: 'List records', list: true, returns: 'DatasetRecord', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }] },\n { path: '/v1/datasets/{datasetId}/records', method: 'post', operationId: 'createDatasetRecord', summary: 'Create a record', accepts: 'DatasetRecordWrite', returns: 'DatasetRecord', creates: true, pathParams: [{ name: 'datasetId', description: 'Dataset id.' }] },\n { path: '/v1/datasets/{datasetId}/records/{recordId}', method: 'get', operationId: 'getDatasetRecord', summary: 'Retrieve a record', returns: 'DatasetRecord', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }, { name: 'recordId', description: 'Record id.' }] },\n { path: '/v1/datasets/{datasetId}/records/{recordId}', method: 'patch', operationId: 'updateDatasetRecord', summary: 'Update a record', accepts: 'DatasetRecordWrite', returns: 'DatasetRecord', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }, { name: 'recordId', description: 'Record id.' }] },\n { path: '/v1/datasets/{datasetId}/records/{recordId}', method: 'delete', operationId: 'deleteDatasetRecord', summary: 'Delete a record', returns: 'Deleted', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }, { name: 'recordId', description: 'Record id.' }] },\n ],\n components: {\n DatasetRecord: {\n type: 'object',\n description:\n 'A row in a dataset. Its values sit under `values`, keyed by field id — ' +\n 'whatever that dataset’s model defines, so they cannot be enumerated here.',\n required: ['id', 'object', 'values'],\n properties: {\n id: { type: 'string', description: 'Record id. Opaque — do not pattern-match it.' },\n object: { type: 'string', const: 'record', description: 'Always `record`.' },\n values: {\n type: 'object',\n description:\n 'Field id → value. A timestamp field comes back as epoch milliseconds, ' +\n 'not an ISO string.',\n additionalProperties: true,\n },\n created: { type: ['string', 'null'], format: 'date-time' },\n updated: { type: ['string', 'null'], format: 'date-time' },\n },\n },\n DatasetRecordWrite: {\n type: 'object',\n description:\n 'A record’s values, under `values` and keyed by field id.\\n\\n' +\n 'Only `values` is read. Any other member — `id` included — is ignored ' +\n 'rather than rejected, and so is a field id inside `values` that the ' +\n 'dataset’s model does not define. Strings are coerced to the field’s ' +\n 'type, and a `PATCH` merges `values` shallowly over the stored ones.',\n properties: {\n values: {\n type: 'object',\n description: 'Field id → value, per the dataset’s model.',\n additionalProperties: true,\n },\n },\n additionalProperties: true,\n },\n DatasetWrite: {\n type: 'object',\n description:\n 'The writable half of a dataset. A create needs `name` and `fields`; a ' +\n '`PATCH` takes any of the three and leaves an omitted one as it is.\\n\\n' +\n 'Members this body does not name are ignored rather than rejected — ' +\n '`id` and `created` included.',\n properties: {\n name: { type: 'string', description: 'Display name. Trimmed, and truncated to 120 characters.' },\n fields: {\n type: 'array',\n items: { type: 'string' },\n description:\n 'Field ids. Blanks are dropped and at most 100 kept; an empty result ' +\n 'is a `400`. A `PATCH` replaces the list rather than merging it.',\n },\n model: {\n type: 'object',\n additionalProperties: true,\n description:\n 'The typed field model. Stored as sent when it serializes to under ' +\n '64 KB; its shape is not validated, and it is never returned.',\n },\n },\n additionalProperties: true,\n },\n },\n}\n"],"names":["isoField","ISO","nullableField","nullable","objectKindField","OBJECT_FIELD","stringField","str","stringListField","strList","DATASETS_API_V1_DESCRIPTION","tag","description","schemaName","required","fields","id","object","name","created","ops","path","method","operationId","summary","list","returns","accepts","creates","pathParams","components","DatasetRecord","type","properties","const","values","additionalProperties","format","updated","DatasetRecordWrite","DatasetWrite","items","model"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAEEA,YAAYC,GAAG,EACfC,iBAAiBC,QAAQ,EACzBC,mBAAmBC,YAAY,EAC/BC,eAAeC,GAAG,EAClBC,mBAAmBC,OAAO,QACrB,qDAAoD;AAE3D;;;;;;;CAOC,GACD,OAAO,MAAMC,8BAAwD;IACnEC,KAAK;IACLC,aAAa;IACbC,YAAY;IACZC,UAAU;QAAC;QAAM;QAAU;QAAQ;KAAS;IAC5CC,QAAQ;QACNC,IAAIT,IAAI;QACRU,QAAQZ,aAAa;QACrBa,MAAMX,IAAI;QACVQ,QAAQN,QACN;QAEFU,SAAShB,SAASF,IAAI;IACxB;IACAmB,KAAK;QACH;YAAEC,MAAM;YAAgBC,QAAQ;YA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ACJ;YACF;YACAwB,sBAAsB;QACxB;IACF;AACF,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/plugins/data/src/lib/server/api-v1/openapi.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 {\n type ApiV1ResourceDescription,\n isoField as ISO,\n nullableField as nullable,\n objectKindField as OBJECT_FIELD,\n stringField as str,\n stringListField as strList,\n} from '@aglyn/tenant-data-admin/server/api-v1-description'\n\n/**\n * `/v1/datasets` as the customer API's OpenAPI document describes it — the\n * dataset, its records and the two write bodies — what the console's builder\n * turns into paths, a tag and schemas, and the MCP tools derive from.\n * Transcribed from the customer-facing contract in\n * `apps/docs/api/resources/datasets.md`; `api-v1-openapi.spec.ts` holds the\n * document to every endpoint the documentation promises.\n */\nexport const DATASETS_API_V1_DESCRIPTION: ApiV1ResourceDescription = {\n tag: 'Datasets',\n docsPage: 'datasets',\n description: 'Structured collections and the records inside them.',\n schemaName: 'Dataset',\n required: ['id', 'object', 'name', 'fields'],\n fields: {\n id: str('Dataset id.'),\n object: OBJECT_FIELD('dataset'),\n name: str('Display name; `\"\"` when none is set.'),\n fields: strList(\n 'Field ids in the dataset’s model. The model itself — types, limits, display names — is not returned.',\n ),\n created: nullable(ISO('When the dataset was created.')),\n },\n ops: [\n { path: '/v1/datasets', method: 'get', operationId: 'listDatasets', summary: 'List datasets', description: 'Lists the workspace’s datasets: the structured content, such as services, menus or team members, that site pages show. Each has an id, a name and its fields.', list: true, returns: 'Dataset' },\n { path: '/v1/datasets', method: 'post', operationId: 'createDataset', summary: 'Create a dataset', description: 'Creates a dataset with a `name` and its `fields` (the names of its columns). Returns the new dataset.', accepts: 'DatasetWrite', returns: 'Dataset', creates: true, bodyRequires: ['name', 'fields'] },\n { path: '/v1/datasets/{datasetId}', method: 'get', operationId: 'getDataset', summary: 'Get a dataset', description: 'Returns one dataset with its fields. Needs `datasetId` from List datasets.', returns: 'Dataset', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }] },\n { path: '/v1/datasets/{datasetId}', method: 'patch', operationId: 'updateDataset', summary: 'Update a dataset', description: 'Changes a dataset’s name or fields. Needs `datasetId` from List datasets. Returns the updated dataset.', accepts: 'DatasetWrite', returns: 'Dataset', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }] },\n {\n path: '/v1/datasets/{datasetId}', method: 'delete', operationId: 'deleteDataset', summary: 'Delete a dataset', returns: 'Deleted',\n description: 'Deletes an empty dataset permanently. Needs `datasetId` from List datasets. A dataset that still holds records is refused; delete its records first.',\n pathParams: [{ name: 'datasetId', description: 'Dataset id.' }],\n },\n { path: '/v1/datasets/{datasetId}/records', method: 'get', operationId: 'listDatasetRecords', summary: 'List a dataset’s records', description: 'Lists the records in one dataset, each with its values by field. Needs `datasetId` from List datasets.', list: true, returns: 'DatasetRecord', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }] },\n { path: '/v1/datasets/{datasetId}/records', method: 'post', operationId: 'createDatasetRecord', summary: 'Add a record to a dataset', description: 'Adds a record to a dataset. Needs `datasetId` from List datasets; `values` maps the dataset’s field ids to values. Returns the new record. A page that shows the dataset picks it up after the site is published.', accepts: 'DatasetRecordWrite', returns: 'DatasetRecord', creates: true, pathParams: [{ name: 'datasetId', description: 'Dataset id.' }] },\n { path: '/v1/datasets/{datasetId}/records/{recordId}', method: 'get', operationId: 'getDatasetRecord', summary: 'Get a dataset record', description: 'Returns one record with its values. Needs `datasetId` from List datasets and `recordId` from List a dataset’s records.', returns: 'DatasetRecord', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }, { name: 'recordId', description: 'Record id.' }] },\n { path: '/v1/datasets/{datasetId}/records/{recordId}', method: 'patch', operationId: 'updateDatasetRecord', summary: 'Update a dataset record', description: 'Changes some of a record’s values; values not sent stay as they are. Needs `datasetId` and `recordId`. Returns the updated record.', accepts: 'DatasetRecordWrite', returns: 'DatasetRecord', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }, { name: 'recordId', description: 'Record id.' }] },\n { path: '/v1/datasets/{datasetId}/records/{recordId}', method: 'delete', operationId: 'deleteDatasetRecord', summary: 'Delete a dataset record', description: 'Deletes a record permanently. Needs `datasetId` and `recordId`.', returns: 'Deleted', pathParams: [{ name: 'datasetId', description: 'Dataset id.' }, { name: 'recordId', description: 'Record id.' }] },\n ],\n components: {\n DatasetRecord: {\n type: 'object',\n description:\n 'A row in a dataset. Its values sit under `values`, keyed by field id — ' +\n 'whatever that dataset’s model defines, so they cannot be enumerated here.',\n required: ['id', 'object', 'values'],\n properties: {\n id: { type: 'string', description: 'Record id. Opaque — do not pattern-match it.' },\n object: { type: 'string', const: 'record', description: 'Always `record`.' },\n values: {\n type: 'object',\n description:\n 'Field id → value. A timestamp field comes back as epoch milliseconds, ' +\n 'not an ISO string.',\n additionalProperties: true,\n },\n created: { type: ['string', 'null'], format: 'date-time' },\n updated: { type: ['string', 'null'], format: 'date-time' },\n },\n },\n DatasetRecordWrite: {\n type: 'object',\n description:\n 'A record’s values, under `values` and keyed by field id.\\n\\n' +\n 'Only `values` is read. Any other member — `id` included — is ignored ' +\n 'rather than rejected, and so is a field id inside `values` that the ' +\n 'dataset’s model does not define. Strings are coerced to the field’s ' +\n 'type, and a `PATCH` merges `values` shallowly over the stored ones.',\n properties: {\n values: {\n type: 'object',\n description: 'Field id → value, per the dataset’s model.',\n additionalProperties: true,\n },\n },\n additionalProperties: true,\n },\n DatasetWrite: {\n type: 'object',\n description:\n 'The writable half of a dataset. A create needs `name` and `fields`; a ' +\n '`PATCH` takes any of the three and leaves an omitted one as it is.\\n\\n' +\n 'Members this body does not name are ignored rather than rejected — ' +\n '`id` and `created` included.',\n properties: {\n name: { type: 'string', description: 'Display name. Trimmed, and truncated to 120 characters.' },\n fields: {\n type: 'array',\n items: { type: 'string' },\n description:\n 'Field ids. Blanks are dropped and at most 100 kept; an empty result ' +\n 'is a `400`. A `PATCH` replaces the list rather than merging it.',\n },\n model: {\n type: 'object',\n additionalProperties: true,\n description:\n 'The typed field model. Stored as sent when it serializes to under ' +\n '64 KB; its shape is not validated, and it is never returned.',\n },\n },\n additionalProperties: true,\n },\n },\n}\n"],"names":["isoField","ISO","nullableField","nullable","objectKindField","OBJECT_FIELD","stringField","str","stringListField","strList","DATASETS_API_V1_DESCRIPTION","tag","docsPage","description","schemaName","required","fields","id","object","name","created","ops","path","method","operationId","summary","list","returns","accepts","creates","bodyRequires","pathParams","components","DatasetRecord","type","properties","const","values","additionalProperties","format","updated","DatasetRecordWrite","DatasetWrite","items","model"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAEEA,YAAYC,GAAG,EACfC,iBAAiBC,QAAQ,EACzBC,mBAAmBC,YAAY,EAC/BC,eAAeC,GAAG,EAClBC,mBAAmBC,OAAO,QACrB,qDAAoD;AAE3D;;;;;;;CAOC,GACD,OAAO,MAAMC,8BAAwD;IACnEC,KAAK;IACLC,UAAU;IACVC,aAAa;IACbC,YAAY;IACZC,UAAU;QAAC;QAAM;QAAU;QAAQ;KAAS;IAC5CC,QAAQ;QACNC,IAAIV,IAAI;QACRW,QAAQb,aAAa;QACrBc,MAAMZ,IAAI;QACVS,QAAQP,QACN;QAEFW,SAASjB,SAASF,IAAI;IACxB;IACAoB,KAAK;QACH;YAAEC,MAAM;YAAgBC,QAAQ;YAAOC,aAAa;YAAgBC,SAAS;YAAiBZ,aAAa;YAAiKa,MAAM;YAAMC,SAAS;QAAU;QAC3S;YAAEL,MAAM;YAAgBC,QAAQ;YAAQC,aAAa;YAAiBC,SAAS;YAAoBZ,aAAa;YAAyGe,SAAS;YAAgBD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