@nocobase/plugin-api-doc 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/Document.d.ts +0 -12
- package/dist/client/index.d.ts +0 -14
- package/dist/client/index.js +0 -160
- package/dist/externalVersion.js +0 -22
- package/dist/index.d.ts +0 -9
- package/dist/index.js +0 -42
- package/dist/locale/en-US.json +0 -5
- package/dist/locale/index.d.ts +0 -12
- package/dist/locale/index.js +0 -53
- package/dist/locale/ko_KR.json +0 -5
- package/dist/locale/zh-CN.json +0 -5
- package/dist/server/index.d.ts +0 -9
- package/dist/server/index.js +0 -42
- package/dist/server/server.d.ts +0 -17
- package/dist/server/server.js +0 -83
- package/dist/server/swagger/base-swagger.d.ts +0 -57
- package/dist/server/swagger/base-swagger.js +0 -81
- package/dist/server/swagger/collections/components/field-type-map.d.ts +0 -30
- package/dist/server/swagger/collections/components/field-type-map.js +0 -66
- package/dist/server/swagger/collections/components/index.d.ts +0 -32
- package/dist/server/swagger/collections/components/index.js +0 -49
- package/dist/server/swagger/collections/components/parameters.d.ts +0 -13
- package/dist/server/swagger/collections/components/parameters.js +0 -203
- package/dist/server/swagger/collections/components/schemas.d.ts +0 -31
- package/dist/server/swagger/collections/components/schemas.js +0 -117
- package/dist/server/swagger/collections/index.d.ts +0 -39
- package/dist/server/swagger/collections/index.js +0 -52
- package/dist/server/swagger/collections/paths/associations/index.d.ts +0 -14
- package/dist/server/swagger/collections/paths/associations/index.js +0 -69
- package/dist/server/swagger/collections/paths/associations/multiple-association.d.ts +0 -14
- package/dist/server/swagger/collections/paths/associations/multiple-association.js +0 -134
- package/dist/server/swagger/collections/paths/associations/single-association.d.ts +0 -13
- package/dist/server/swagger/collections/paths/associations/single-association.js +0 -114
- package/dist/server/swagger/collections/paths/collection.d.ts +0 -209
- package/dist/server/swagger/collections/paths/collection.js +0 -371
- package/dist/server/swagger/collections/paths/index.d.ts +0 -14
- package/dist/server/swagger/collections/paths/index.js +0 -74
- package/dist/server/swagger/collections/tags/index.d.ts +0 -14
- package/dist/server/swagger/collections/tags/index.js +0 -52
- package/dist/server/swagger/constants.d.ts +0 -18
- package/dist/server/swagger/constants.js +0 -45
- package/dist/server/swagger/helpers.d.ts +0 -179
- package/dist/server/swagger/helpers.js +0 -143
- package/dist/server/swagger/index.d.ts +0 -57
- package/dist/server/swagger/index.js +0 -259
- package/dist/server/swagger/loader.d.ts +0 -12
- package/dist/server/swagger/loader.js +0 -89
- package/dist/server/swagger/merge.d.ts +0 -9
- package/dist/server/swagger/merge.js +0 -43
- package/dist/swagger.d.ts +0 -51
- package/dist/swagger.js +0 -73
package/dist/externalVersion.js
DELETED
|
@@ -1,22 +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
|
-
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.2.12-alpha",
|
|
12
|
-
"@nocobase/sdk": "1.2.12-alpha",
|
|
13
|
-
"antd": "5.12.8",
|
|
14
|
-
"react": "18.2.0",
|
|
15
|
-
"@ant-design/icons": "5.2.6",
|
|
16
|
-
"antd-style": "3.4.5",
|
|
17
|
-
"react-i18next": "11.18.6",
|
|
18
|
-
"@nocobase/actions": "1.2.12-alpha",
|
|
19
|
-
"@nocobase/server": "1.2.12-alpha",
|
|
20
|
-
"@nocobase/utils": "1.2.12-alpha",
|
|
21
|
-
"@nocobase/database": "1.2.12-alpha"
|
|
22
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,9 +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
|
-
export { default } from './server';
|
package/dist/index.js
DELETED
|
@@ -1,42 +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 __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var src_exports = {};
|
|
38
|
-
__export(src_exports, {
|
|
39
|
-
default: () => import_server.default
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(src_exports);
|
|
42
|
-
var import_server = __toESM(require("./server"));
|
package/dist/locale/en-US.json
DELETED
package/dist/locale/index.d.ts
DELETED
|
@@ -1,12 +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
|
-
export declare const NAMESPACE = "api-doc";
|
|
10
|
-
export declare function lang(key: string): string;
|
|
11
|
-
export declare function generateNTemplate(key: string): string;
|
|
12
|
-
export declare function useTranslation(): import("react-i18next").UseTranslationResponse<"api-doc", undefined>;
|
package/dist/locale/index.js
DELETED
|
@@ -1,53 +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 locale_exports = {};
|
|
28
|
-
__export(locale_exports, {
|
|
29
|
-
NAMESPACE: () => NAMESPACE,
|
|
30
|
-
generateNTemplate: () => generateNTemplate,
|
|
31
|
-
lang: () => lang,
|
|
32
|
-
useTranslation: () => useTranslation
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(locale_exports);
|
|
35
|
-
var import_client = require("@nocobase/client");
|
|
36
|
-
var import_react_i18next = require("react-i18next");
|
|
37
|
-
const NAMESPACE = "api-doc";
|
|
38
|
-
function lang(key) {
|
|
39
|
-
return import_client.i18n.t(key, { ns: NAMESPACE });
|
|
40
|
-
}
|
|
41
|
-
function generateNTemplate(key) {
|
|
42
|
-
return `{{t('${key}', { ns: '${NAMESPACE}' })}}`;
|
|
43
|
-
}
|
|
44
|
-
function useTranslation() {
|
|
45
|
-
return (0, import_react_i18next.useTranslation)(NAMESPACE);
|
|
46
|
-
}
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
NAMESPACE,
|
|
50
|
-
generateNTemplate,
|
|
51
|
-
lang,
|
|
52
|
-
useTranslation
|
|
53
|
-
});
|
package/dist/locale/ko_KR.json
DELETED
package/dist/locale/zh-CN.json
DELETED
package/dist/server/index.d.ts
DELETED
|
@@ -1,9 +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
|
-
export { default } from './server';
|
package/dist/server/index.js
DELETED
|
@@ -1,42 +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 __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var server_exports = {};
|
|
38
|
-
__export(server_exports, {
|
|
39
|
-
default: () => import_server.default
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(server_exports);
|
|
42
|
-
var import_server = __toESM(require("./server"));
|
package/dist/server/server.d.ts
DELETED
|
@@ -1,17 +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
|
-
import { Plugin } from '@nocobase/server';
|
|
10
|
-
import { SwaggerManager } from './swagger';
|
|
11
|
-
export declare class PluginAPIDocServer extends Plugin {
|
|
12
|
-
swagger: SwaggerManager;
|
|
13
|
-
constructor(app: any, options: any);
|
|
14
|
-
beforeLoad(): Promise<void>;
|
|
15
|
-
load(): Promise<void>;
|
|
16
|
-
}
|
|
17
|
-
export default PluginAPIDocServer;
|
package/dist/server/server.js
DELETED
|
@@ -1,83 +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 server_exports = {};
|
|
28
|
-
__export(server_exports, {
|
|
29
|
-
PluginAPIDocServer: () => PluginAPIDocServer,
|
|
30
|
-
default: () => server_default
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(server_exports);
|
|
33
|
-
var import_server = require("@nocobase/server");
|
|
34
|
-
var import_swagger = require("./swagger");
|
|
35
|
-
class PluginAPIDocServer extends import_server.Plugin {
|
|
36
|
-
swagger;
|
|
37
|
-
constructor(app, options) {
|
|
38
|
-
super(app, options);
|
|
39
|
-
this.swagger = new import_swagger.SwaggerManager(this);
|
|
40
|
-
}
|
|
41
|
-
async beforeLoad() {
|
|
42
|
-
}
|
|
43
|
-
async load() {
|
|
44
|
-
this.app.resourcer.define({
|
|
45
|
-
name: "swagger",
|
|
46
|
-
type: "single",
|
|
47
|
-
actions: {
|
|
48
|
-
getUrls: async (ctx, next) => {
|
|
49
|
-
ctx.body = await this.swagger.getUrls();
|
|
50
|
-
await next();
|
|
51
|
-
},
|
|
52
|
-
get: async (ctx, next) => {
|
|
53
|
-
ctx.withoutDataWrapping = true;
|
|
54
|
-
const { ns } = ctx.action.params;
|
|
55
|
-
if (!ns) {
|
|
56
|
-
ctx.body = await this.swagger.getSwagger();
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const [type, index] = ns.split("/");
|
|
60
|
-
if (type === "core") {
|
|
61
|
-
ctx.body = await this.swagger.getCoreSwagger();
|
|
62
|
-
} else if (type === "plugins") {
|
|
63
|
-
ctx.body = await this.swagger.getPluginsSwagger(index);
|
|
64
|
-
} else if (type === "collections") {
|
|
65
|
-
ctx.body = await this.swagger.getCollectionsSwagger(index);
|
|
66
|
-
}
|
|
67
|
-
await next();
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
only: ["get", "getUrls"]
|
|
71
|
-
});
|
|
72
|
-
this.app.acl.allow("swagger", ["get", "getUrls"], "loggedIn");
|
|
73
|
-
this.app.acl.registerSnippet({
|
|
74
|
-
name: ["pm", this.name, "documentation"].join("."),
|
|
75
|
-
actions: ["swagger:*"]
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
var server_default = PluginAPIDocServer;
|
|
80
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
81
|
-
0 && (module.exports = {
|
|
82
|
-
PluginAPIDocServer
|
|
83
|
-
});
|
|
@@ -1,57 +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
|
-
declare const _default: {
|
|
10
|
-
openapi: string;
|
|
11
|
-
info: {
|
|
12
|
-
title: string;
|
|
13
|
-
description: string;
|
|
14
|
-
contact: {
|
|
15
|
-
url: string;
|
|
16
|
-
};
|
|
17
|
-
license: {
|
|
18
|
-
name: string;
|
|
19
|
-
url: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
externalDocs: {
|
|
23
|
-
description: string;
|
|
24
|
-
url: string;
|
|
25
|
-
};
|
|
26
|
-
components: {
|
|
27
|
-
securitySchemes: {
|
|
28
|
-
'api-key': {
|
|
29
|
-
type: string;
|
|
30
|
-
scheme: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
schemas: {
|
|
34
|
-
error: {
|
|
35
|
-
type: string;
|
|
36
|
-
properties: {
|
|
37
|
-
errors: {
|
|
38
|
-
type: string;
|
|
39
|
-
items: {
|
|
40
|
-
type: string;
|
|
41
|
-
properties: {
|
|
42
|
-
message: {
|
|
43
|
-
description: string;
|
|
44
|
-
type: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
security: {
|
|
54
|
-
'api-key': any[];
|
|
55
|
-
}[];
|
|
56
|
-
};
|
|
57
|
-
export default _default;
|
|
@@ -1,81 +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 base_swagger_exports = {};
|
|
28
|
-
__export(base_swagger_exports, {
|
|
29
|
-
default: () => base_swagger_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(base_swagger_exports);
|
|
32
|
-
var base_swagger_default = {
|
|
33
|
-
openapi: "3.0.3",
|
|
34
|
-
info: {
|
|
35
|
-
title: "NocoBase API documentation",
|
|
36
|
-
description: "",
|
|
37
|
-
contact: {
|
|
38
|
-
url: "https://github.com/nocobase/nocobase/issues"
|
|
39
|
-
},
|
|
40
|
-
license: {
|
|
41
|
-
name: "Core packages are Apache 2.0 & Plugins packages are AGPL 3.0 licensed.",
|
|
42
|
-
url: "https://github.com/nocobase/nocobase#license"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
externalDocs: {
|
|
46
|
-
description: "Find out more about NocoBase",
|
|
47
|
-
url: "https://docs.nocobase.com/api/http"
|
|
48
|
-
},
|
|
49
|
-
components: {
|
|
50
|
-
securitySchemes: {
|
|
51
|
-
"api-key": {
|
|
52
|
-
type: "http",
|
|
53
|
-
scheme: "bearer"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
schemas: {
|
|
57
|
-
error: {
|
|
58
|
-
type: "object",
|
|
59
|
-
properties: {
|
|
60
|
-
errors: {
|
|
61
|
-
type: "array",
|
|
62
|
-
items: {
|
|
63
|
-
type: "object",
|
|
64
|
-
properties: {
|
|
65
|
-
message: {
|
|
66
|
-
description: "\u9519\u8BEF\u4FE1\u606F",
|
|
67
|
-
type: "string"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
security: [
|
|
77
|
-
{
|
|
78
|
-
"api-key": []
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
};
|
|
@@ -1,30 +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
|
-
import { Field } from '@nocobase/database';
|
|
10
|
-
declare const fieldTypeMap: {
|
|
11
|
-
bigint: {
|
|
12
|
-
type: string;
|
|
13
|
-
format: string;
|
|
14
|
-
};
|
|
15
|
-
datetime: {
|
|
16
|
-
type: string;
|
|
17
|
-
format: string;
|
|
18
|
-
};
|
|
19
|
-
string: {
|
|
20
|
-
type: string;
|
|
21
|
-
};
|
|
22
|
-
text: {
|
|
23
|
-
type: string;
|
|
24
|
-
};
|
|
25
|
-
jsontype: {
|
|
26
|
-
type: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
declare function getTypeByField(field: Field): any;
|
|
30
|
-
export { fieldTypeMap, getTypeByField };
|
|
@@ -1,66 +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 field_type_map_exports = {};
|
|
28
|
-
__export(field_type_map_exports, {
|
|
29
|
-
fieldTypeMap: () => fieldTypeMap,
|
|
30
|
-
getTypeByField: () => getTypeByField
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(field_type_map_exports);
|
|
33
|
-
const fieldTypeMap = {
|
|
34
|
-
bigint: {
|
|
35
|
-
type: "integer",
|
|
36
|
-
format: "int64"
|
|
37
|
-
},
|
|
38
|
-
datetime: {
|
|
39
|
-
type: "string",
|
|
40
|
-
format: "date-time"
|
|
41
|
-
},
|
|
42
|
-
string: {
|
|
43
|
-
type: "string"
|
|
44
|
-
},
|
|
45
|
-
text: {
|
|
46
|
-
type: "string"
|
|
47
|
-
},
|
|
48
|
-
jsontype: {
|
|
49
|
-
type: "string"
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
function getTypeByField(field) {
|
|
53
|
-
const fieldType = field.dataType.toString().toLowerCase();
|
|
54
|
-
const fieldAttributes = fieldTypeMap[fieldType];
|
|
55
|
-
if (!fieldAttributes) {
|
|
56
|
-
return {
|
|
57
|
-
type: "string"
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
return fieldAttributes;
|
|
61
|
-
}
|
|
62
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
-
0 && (module.exports = {
|
|
64
|
-
fieldTypeMap,
|
|
65
|
-
getTypeByField
|
|
66
|
-
});
|
|
@@ -1,32 +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
|
-
import { Collection } from '@nocobase/database';
|
|
10
|
-
declare const _default: (collection: Collection, options: any) => {
|
|
11
|
-
parameters: {};
|
|
12
|
-
schemas: {
|
|
13
|
-
[x: string]: {
|
|
14
|
-
type: string;
|
|
15
|
-
properties: {};
|
|
16
|
-
allOf?: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
allOf: ({
|
|
19
|
-
$ref: string;
|
|
20
|
-
type?: undefined;
|
|
21
|
-
properties?: undefined;
|
|
22
|
-
} | {
|
|
23
|
-
type: string;
|
|
24
|
-
properties: any;
|
|
25
|
-
$ref?: undefined;
|
|
26
|
-
})[];
|
|
27
|
-
type?: undefined;
|
|
28
|
-
properties?: undefined;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export default _default;
|
|
@@ -1,49 +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 __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var components_exports = {};
|
|
38
|
-
__export(components_exports, {
|
|
39
|
-
default: () => components_default
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(components_exports);
|
|
42
|
-
var import_schemas = __toESM(require("./schemas"));
|
|
43
|
-
var import_parameters = __toESM(require("./parameters"));
|
|
44
|
-
var components_default = (collection, options) => {
|
|
45
|
-
return {
|
|
46
|
-
...(0, import_schemas.default)(collection, options),
|
|
47
|
-
...(0, import_parameters.default)(collection)
|
|
48
|
-
};
|
|
49
|
-
};
|
|
@@ -1,13 +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
|
-
import { Collection } from '@nocobase/database';
|
|
10
|
-
declare const _default: (collection: Collection) => {
|
|
11
|
-
parameters: {};
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|