@nocobase/plugin-data-source-main 1.2.12-alpha → 1.3.0-alpha.20240710084543
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 +2 -2
- package/dist/client/index.d.ts +0 -13
- package/dist/client/index.js +0 -10
- package/dist/externalVersion.js +0 -21
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -48
- package/dist/locale/en-US.json +0 -3
- package/dist/locale/zh-CN.json +0 -3
- package/dist/server/collections/collectionCategories.d.ts +0 -11
- package/dist/server/collections/collectionCategories.js +0 -61
- package/dist/server/collections/collections.d.ts +0 -11
- package/dist/server/collections/collections.js +0 -101
- package/dist/server/collections/fields.d.ts +0 -11
- package/dist/server/collections/fields.js +0 -103
- package/dist/server/errors/field-name-exists-error.d.ts +0 -13
- package/dist/server/errors/field-name-exists-error.js +0 -45
- package/dist/server/hooks/afterCreateForForeignKeyField.d.ts +0 -10
- package/dist/server/hooks/afterCreateForForeignKeyField.js +0 -217
- package/dist/server/hooks/afterCreateForReverseField.d.ts +0 -12
- package/dist/server/hooks/afterCreateForReverseField.js +0 -46
- package/dist/server/hooks/afterDestroyForForeignKeyField.d.ts +0 -10
- package/dist/server/hooks/afterDestroyForForeignKeyField.js +0 -98
- package/dist/server/hooks/beforeCreateForChildrenCollection.d.ts +0 -13
- package/dist/server/hooks/beforeCreateForChildrenCollection.js +0 -67
- package/dist/server/hooks/beforeCreateForReverseField.d.ts +0 -12
- package/dist/server/hooks/beforeCreateForReverseField.js +0 -73
- package/dist/server/hooks/beforeCreateForValidateField.d.ts +0 -15
- package/dist/server/hooks/beforeCreateForValidateField.js +0 -76
- package/dist/server/hooks/beforeCreateForViewCollection.d.ts +0 -13
- package/dist/server/hooks/beforeCreateForViewCollection.js +0 -39
- package/dist/server/hooks/beforeDestroyForeignKey.d.ts +0 -10
- package/dist/server/hooks/beforeDestroyForeignKey.js +0 -75
- package/dist/server/hooks/beforeInitOptions.d.ts +0 -23
- package/dist/server/hooks/beforeInitOptions.js +0 -137
- package/dist/server/hooks/index.d.ts +0 -13
- package/dist/server/hooks/index.js +0 -38
- package/dist/server/index.d.ts +0 -12
- package/dist/server/index.js +0 -54
- package/dist/server/migrations/20220613103214-alert-sub-table.d.ts +0 -13
- package/dist/server/migrations/20220613103214-alert-sub-table.js +0 -50
- package/dist/server/migrations/20220704225714-drop-foreign-keys.d.ts +0 -13
- package/dist/server/migrations/20220704225714-drop-foreign-keys.js +0 -79
- package/dist/server/migrations/20221101111110-update-foreign-fields.d.ts +0 -13
- package/dist/server/migrations/20221101111110-update-foreign-fields.js +0 -74
- package/dist/server/migrations/20221104151410-update-collections-hidden.d.ts +0 -13
- package/dist/server/migrations/20221104151410-update-collections-hidden.js +0 -57
- package/dist/server/migrations/20221121111110-update-fk-type.d.ts +0 -13
- package/dist/server/migrations/20221121111110-update-fk-type.js +0 -155
- package/dist/server/migrations/20221121111113-update-id-to-bigint.d.ts +0 -13
- package/dist/server/migrations/20221121111113-update-id-to-bigint.js +0 -189
- package/dist/server/migrations/20221221103220-timestamps.d.ts +0 -13
- package/dist/server/migrations/20221221103220-timestamps.js +0 -55
- package/dist/server/migrations/20230225111112-drop-ui-schema-relation.d.ts +0 -13
- package/dist/server/migrations/20230225111112-drop-ui-schema-relation.js +0 -97
- package/dist/server/migrations/20230509111114-alert-ui-schema.d.ts +0 -13
- package/dist/server/migrations/20230509111114-alert-ui-schema.js +0 -87
- package/dist/server/migrations/20230623145414-number-step.d.ts +0 -13
- package/dist/server/migrations/20230623145414-number-step.js +0 -81
- package/dist/server/migrations/20230704222935-tableoid.d.ts +0 -13
- package/dist/server/migrations/20230704222935-tableoid.js +0 -83
- package/dist/server/migrations/20230918024546-set-collection-schema.d.ts +0 -13
- package/dist/server/migrations/20230918024546-set-collection-schema.js +0 -55
- package/dist/server/migrations/20240220153103-install-main-datasource.d.ts +0 -14
- package/dist/server/migrations/20240220153103-install-main-datasource.js +0 -51
- package/dist/server/migrations/20240419182147-fix-created-by-field-target.d.ts +0 -14
- package/dist/server/migrations/20240419182147-fix-created-by-field-target.js +0 -49
- package/dist/server/migrations/20240420105949-add-sort-field.d.ts +0 -14
- package/dist/server/migrations/20240420105949-add-sort-field.js +0 -81
- package/dist/server/migrations/20240517101001-fix-target-option-in-tree-collection.d.ts +0 -14
- package/dist/server/migrations/20240517101001-fix-target-option-in-tree-collection.js +0 -54
- package/dist/server/models/collection.d.ts +0 -27
- package/dist/server/models/collection.js +0 -194
- package/dist/server/models/field.d.ts +0 -26
- package/dist/server/models/field.js +0 -173
- package/dist/server/models/index.d.ts +0 -10
- package/dist/server/models/index.js +0 -32
- package/dist/server/repositories/collection-repository.d.ts +0 -20
- package/dist/server/repositories/collection-repository.js +0 -169
- package/dist/server/repositories/index.d.ts +0 -9
- package/dist/server/repositories/index.js +0 -30
- package/dist/server/resourcers/collections.d.ts +0 -12
- package/dist/server/resourcers/collections.js +0 -102
- package/dist/server/resourcers/views.d.ts +0 -17
- package/dist/server/resourcers/views.js +0 -116
- package/dist/server/server.d.ts +0 -19
- package/dist/server/server.js +0 -384
- package/dist/swagger/index.d.ts +0 -413
- package/dist/swagger/index.js +0 -440
package/dist/swagger/index.js
DELETED
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var swagger_exports = {};
|
|
28
|
-
__export(swagger_exports, {
|
|
29
|
-
default: () => swagger_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(swagger_exports);
|
|
32
|
-
var swagger_default = {
|
|
33
|
-
openapi: "3.0.2",
|
|
34
|
-
info: {
|
|
35
|
-
title: "NocoBase API - Collection manager plugin"
|
|
36
|
-
},
|
|
37
|
-
tags: [
|
|
38
|
-
{
|
|
39
|
-
name: "collections"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: "collections.fields"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "collectionCategories"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: "dbViews",
|
|
49
|
-
description: "manager db views"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
paths: {
|
|
53
|
-
"/collections:list": {
|
|
54
|
-
get: {
|
|
55
|
-
tags: ["collections"],
|
|
56
|
-
description: "",
|
|
57
|
-
parameters: [],
|
|
58
|
-
responses: {
|
|
59
|
-
"200": {
|
|
60
|
-
description: "OK"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"/collections:get": {
|
|
66
|
-
get: {
|
|
67
|
-
tags: ["collections"],
|
|
68
|
-
description: "",
|
|
69
|
-
parameters: [],
|
|
70
|
-
responses: {
|
|
71
|
-
"200": {
|
|
72
|
-
description: "OK"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
"/collections:create": {
|
|
78
|
-
post: {
|
|
79
|
-
tags: ["collections"],
|
|
80
|
-
description: "",
|
|
81
|
-
parameters: [],
|
|
82
|
-
responses: {
|
|
83
|
-
"200": {
|
|
84
|
-
description: "OK"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"/collections:update": {
|
|
90
|
-
post: {
|
|
91
|
-
tags: ["collections"],
|
|
92
|
-
description: "",
|
|
93
|
-
parameters: [],
|
|
94
|
-
responses: {
|
|
95
|
-
"200": {
|
|
96
|
-
description: "OK"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"/collections:destroy": {
|
|
102
|
-
post: {
|
|
103
|
-
tags: ["collections"],
|
|
104
|
-
description: "",
|
|
105
|
-
parameters: [],
|
|
106
|
-
responses: {
|
|
107
|
-
"200": {
|
|
108
|
-
description: "OK"
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
"/collections:move": {
|
|
114
|
-
post: {
|
|
115
|
-
tags: ["collections"],
|
|
116
|
-
description: "",
|
|
117
|
-
parameters: [],
|
|
118
|
-
responses: {
|
|
119
|
-
"200": {
|
|
120
|
-
description: "OK"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
"/collections:setFields": {
|
|
126
|
-
post: {
|
|
127
|
-
tags: ["collections"],
|
|
128
|
-
description: "",
|
|
129
|
-
parameters: [],
|
|
130
|
-
responses: {
|
|
131
|
-
"200": {
|
|
132
|
-
description: "OK"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"/collections/{collectionName}/fields:get": {
|
|
138
|
-
get: {
|
|
139
|
-
tags: ["collections.fields"],
|
|
140
|
-
description: "",
|
|
141
|
-
parameters: [],
|
|
142
|
-
responses: {
|
|
143
|
-
"200": {
|
|
144
|
-
description: "OK"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
"/collections/{collectionName}/fields:list": {
|
|
150
|
-
get: {
|
|
151
|
-
tags: ["collections.fields"],
|
|
152
|
-
description: "",
|
|
153
|
-
parameters: [],
|
|
154
|
-
responses: {
|
|
155
|
-
"200": {
|
|
156
|
-
description: "OK"
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
"/collections/{collectionName}/fields:create": {
|
|
162
|
-
post: {
|
|
163
|
-
tags: ["collections.fields"],
|
|
164
|
-
description: "",
|
|
165
|
-
parameters: [],
|
|
166
|
-
responses: {
|
|
167
|
-
"200": {
|
|
168
|
-
description: "OK"
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
"/collections/{collectionName}/fields:update": {
|
|
174
|
-
post: {
|
|
175
|
-
tags: ["collections.fields"],
|
|
176
|
-
description: "",
|
|
177
|
-
parameters: [],
|
|
178
|
-
responses: {
|
|
179
|
-
"200": {
|
|
180
|
-
description: "OK"
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
"/collections/{collectionName}/fields:destroy": {
|
|
186
|
-
post: {
|
|
187
|
-
tags: ["collections.fields"],
|
|
188
|
-
description: "",
|
|
189
|
-
parameters: [],
|
|
190
|
-
responses: {
|
|
191
|
-
"200": {
|
|
192
|
-
description: "OK"
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
"/collections/{collectionName}/fields:move": {
|
|
198
|
-
post: {
|
|
199
|
-
tags: ["collections.fields"],
|
|
200
|
-
description: "",
|
|
201
|
-
parameters: [],
|
|
202
|
-
responses: {
|
|
203
|
-
"200": {
|
|
204
|
-
description: "OK"
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
"/collectionCategories:list": {
|
|
210
|
-
post: {
|
|
211
|
-
tags: ["collectionCategories"],
|
|
212
|
-
description: "",
|
|
213
|
-
parameters: [],
|
|
214
|
-
responses: {
|
|
215
|
-
"200": {
|
|
216
|
-
description: "OK"
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
"/collectionCategories:get": {
|
|
222
|
-
post: {
|
|
223
|
-
tags: ["collectionCategories"],
|
|
224
|
-
description: "",
|
|
225
|
-
parameters: [],
|
|
226
|
-
responses: {
|
|
227
|
-
"200": {
|
|
228
|
-
description: "OK"
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
"/collectionCategories:create": {
|
|
234
|
-
post: {
|
|
235
|
-
tags: ["collectionCategories"],
|
|
236
|
-
description: "",
|
|
237
|
-
parameters: [],
|
|
238
|
-
responses: {
|
|
239
|
-
"200": {
|
|
240
|
-
description: "OK"
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
"/collectionCategories:update": {
|
|
246
|
-
post: {
|
|
247
|
-
tags: ["collectionCategories"],
|
|
248
|
-
description: "",
|
|
249
|
-
parameters: [],
|
|
250
|
-
responses: {
|
|
251
|
-
"200": {
|
|
252
|
-
description: "OK"
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
"/collectionCategories:destroy": {
|
|
258
|
-
post: {
|
|
259
|
-
tags: ["collectionCategories"],
|
|
260
|
-
description: "",
|
|
261
|
-
parameters: [],
|
|
262
|
-
responses: {
|
|
263
|
-
"200": {
|
|
264
|
-
description: "OK"
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
"/collectionCategories:move": {
|
|
270
|
-
post: {
|
|
271
|
-
tags: ["collectionCategories"],
|
|
272
|
-
description: "",
|
|
273
|
-
parameters: [],
|
|
274
|
-
responses: {
|
|
275
|
-
"200": {
|
|
276
|
-
description: "OK"
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
"/dbViews:get": {
|
|
282
|
-
get: {
|
|
283
|
-
tags: ["dbViews"],
|
|
284
|
-
summary: "get db view fields",
|
|
285
|
-
parameters: [
|
|
286
|
-
{
|
|
287
|
-
name: "filterByTk",
|
|
288
|
-
in: "query",
|
|
289
|
-
description: "view name in database",
|
|
290
|
-
schema: {
|
|
291
|
-
type: "string"
|
|
292
|
-
},
|
|
293
|
-
required: true,
|
|
294
|
-
example: "posts_view"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
name: "schema",
|
|
298
|
-
in: "query",
|
|
299
|
-
description: "postgres schema of view in database",
|
|
300
|
-
schema: {
|
|
301
|
-
type: "string"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
],
|
|
305
|
-
responses: {
|
|
306
|
-
"200": {
|
|
307
|
-
description: "OK",
|
|
308
|
-
content: {
|
|
309
|
-
"application/json": {
|
|
310
|
-
schema: {
|
|
311
|
-
type: "object",
|
|
312
|
-
properties: {
|
|
313
|
-
data: {
|
|
314
|
-
type: "object",
|
|
315
|
-
properties: {
|
|
316
|
-
fields: {
|
|
317
|
-
type: "object",
|
|
318
|
-
additionalProperties: {
|
|
319
|
-
type: "object",
|
|
320
|
-
properties: {
|
|
321
|
-
name: { type: "string", description: "field name" },
|
|
322
|
-
type: { type: "string", description: "field type" },
|
|
323
|
-
source: { type: "string", required: false, description: "source field of view field" }
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
sources: {
|
|
328
|
-
type: "array",
|
|
329
|
-
items: { type: "string" }
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
"/dbViews:list": {
|
|
342
|
-
get: {
|
|
343
|
-
tags: ["dbViews"],
|
|
344
|
-
summary: "list views that not connected to collections in database",
|
|
345
|
-
responses: {
|
|
346
|
-
"200": {
|
|
347
|
-
description: "OK",
|
|
348
|
-
content: {
|
|
349
|
-
"application/json": {
|
|
350
|
-
schema: {
|
|
351
|
-
type: "object",
|
|
352
|
-
properties: {
|
|
353
|
-
data: {
|
|
354
|
-
type: "array",
|
|
355
|
-
items: {
|
|
356
|
-
type: "object",
|
|
357
|
-
properties: {
|
|
358
|
-
name: { type: "string", description: "name of view" },
|
|
359
|
-
definition: { type: "string", description: "definition of view" },
|
|
360
|
-
schema: { type: "string", description: "schema of view" }
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
"/dbViews:query": {
|
|
373
|
-
get: {
|
|
374
|
-
tags: ["dbViews"],
|
|
375
|
-
summary: "query db view data",
|
|
376
|
-
parameters: [
|
|
377
|
-
{
|
|
378
|
-
name: "filterByTk",
|
|
379
|
-
in: "query",
|
|
380
|
-
description: "view name in database",
|
|
381
|
-
schema: {
|
|
382
|
-
type: "string"
|
|
383
|
-
},
|
|
384
|
-
required: true,
|
|
385
|
-
example: "posts_view"
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
name: "schema",
|
|
389
|
-
in: "query",
|
|
390
|
-
description: "postgres schema of view in database",
|
|
391
|
-
schema: {
|
|
392
|
-
type: "string"
|
|
393
|
-
}
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
name: "page",
|
|
397
|
-
in: "query",
|
|
398
|
-
description: "page number",
|
|
399
|
-
schema: {
|
|
400
|
-
type: "integer"
|
|
401
|
-
}
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
name: "pageSize",
|
|
405
|
-
in: "query",
|
|
406
|
-
description: "page size",
|
|
407
|
-
schema: {
|
|
408
|
-
type: "integer"
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
],
|
|
412
|
-
responses: {
|
|
413
|
-
"200": {
|
|
414
|
-
description: "OK",
|
|
415
|
-
content: {
|
|
416
|
-
"application/json": {
|
|
417
|
-
schema: {
|
|
418
|
-
type: "object",
|
|
419
|
-
properties: {
|
|
420
|
-
data: {
|
|
421
|
-
type: "array",
|
|
422
|
-
items: {
|
|
423
|
-
type: "object",
|
|
424
|
-
description: "row data of view",
|
|
425
|
-
additionalProperties: {
|
|
426
|
-
type: "object",
|
|
427
|
-
description: "row data's field value"
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
};
|