@nocobase/plugin-client 2.1.0-alpha.1 → 2.1.0-alpha.10

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.
@@ -0,0 +1,222 @@
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 - Client plugin",
36
+ version: "1.0.0"
37
+ },
38
+ paths: {
39
+ "/roles/{roleName}/desktopRoutes:add": {
40
+ post: {
41
+ tags: ["roles.desktopRoutes"],
42
+ summary: "Add desktop route permissions to a role",
43
+ parameters: [{ $ref: "#/components/parameters/RoleNamePath" }],
44
+ requestBody: {
45
+ required: true,
46
+ content: {
47
+ "application/json": {
48
+ schema: { $ref: "#/components/schemas/RouteIdList" }
49
+ }
50
+ }
51
+ },
52
+ responses: {
53
+ 200: { description: "OK" }
54
+ }
55
+ }
56
+ },
57
+ "/roles/{roleName}/desktopRoutes:remove": {
58
+ post: {
59
+ tags: ["roles.desktopRoutes"],
60
+ summary: "Remove desktop route permissions from a role",
61
+ parameters: [{ $ref: "#/components/parameters/RoleNamePath" }],
62
+ requestBody: {
63
+ required: true,
64
+ content: {
65
+ "application/json": {
66
+ schema: { $ref: "#/components/schemas/RouteIdList" }
67
+ }
68
+ }
69
+ },
70
+ responses: {
71
+ 200: { description: "OK" }
72
+ }
73
+ }
74
+ },
75
+ "/roles/{roleName}/desktopRoutes:set": {
76
+ post: {
77
+ tags: ["roles.desktopRoutes"],
78
+ summary: "Set desktop route permissions for a role",
79
+ parameters: [{ $ref: "#/components/parameters/RoleNamePath" }],
80
+ requestBody: {
81
+ required: true,
82
+ content: {
83
+ "application/json": {
84
+ schema: { $ref: "#/components/schemas/RouteIdList" }
85
+ }
86
+ }
87
+ },
88
+ responses: {
89
+ 200: { description: "OK" }
90
+ }
91
+ }
92
+ },
93
+ "/roles/{roleName}/desktopRoutes:list": {
94
+ get: {
95
+ tags: ["roles.desktopRoutes"],
96
+ summary: "List desktop routes granted to a role",
97
+ parameters: [
98
+ { $ref: "#/components/parameters/RoleNamePath" },
99
+ { $ref: "#/components/parameters/PaginateQuery" },
100
+ { $ref: "#/components/parameters/FilterQuery" }
101
+ ],
102
+ responses: {
103
+ 200: {
104
+ description: "OK",
105
+ content: {
106
+ "application/json": {
107
+ schema: {
108
+ type: "object",
109
+ properties: {
110
+ data: {
111
+ type: "array",
112
+ items: { $ref: "#/components/schemas/DesktopRoute" }
113
+ },
114
+ meta: {
115
+ type: "object",
116
+ additionalProperties: true
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "/desktopRoutes:listAccessible": {
127
+ get: {
128
+ tags: ["desktopRoutes"],
129
+ summary: "List desktop routes accessible to the current user",
130
+ parameters: [
131
+ { $ref: "#/components/parameters/TreeQuery" },
132
+ { $ref: "#/components/parameters/SortScalarQuery" },
133
+ { $ref: "#/components/parameters/FilterQuery" }
134
+ ],
135
+ responses: {
136
+ 200: {
137
+ description: "OK",
138
+ content: {
139
+ "application/json": {
140
+ schema: {
141
+ type: "object",
142
+ properties: {
143
+ data: {
144
+ type: "array",
145
+ items: { $ref: "#/components/schemas/DesktopRoute" }
146
+ },
147
+ meta: {
148
+ type: "object",
149
+ additionalProperties: true
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ },
160
+ components: {
161
+ parameters: {
162
+ RoleNamePath: {
163
+ name: "roleName",
164
+ in: "path",
165
+ description: "Role name.",
166
+ required: true,
167
+ schema: { type: "string" }
168
+ },
169
+ PaginateQuery: {
170
+ name: "paginate",
171
+ in: "query",
172
+ description: "Whether to return paginated result format.",
173
+ required: false,
174
+ schema: { type: "boolean" }
175
+ },
176
+ TreeQuery: {
177
+ name: "tree",
178
+ in: "query",
179
+ description: "Whether to return routes as a tree.",
180
+ required: false,
181
+ schema: { type: "boolean" }
182
+ },
183
+ SortScalarQuery: {
184
+ name: "sort",
185
+ in: "query",
186
+ description: "Sort field, for example `sort`.",
187
+ required: false,
188
+ schema: { type: "string" }
189
+ },
190
+ FilterQuery: {
191
+ name: "filter",
192
+ in: "query",
193
+ description: "JSON filter object.",
194
+ required: false,
195
+ schema: { type: "object", additionalProperties: true }
196
+ }
197
+ },
198
+ schemas: {
199
+ RouteIdList: {
200
+ type: "array",
201
+ description: "Desktop route id list.",
202
+ items: { type: "integer" }
203
+ },
204
+ DesktopRoute: {
205
+ type: "object",
206
+ properties: {
207
+ id: { type: "integer" },
208
+ title: { type: "string" },
209
+ type: { type: "string" },
210
+ path: { type: "string", nullable: true },
211
+ parentId: { type: "integer", nullable: true },
212
+ hidden: { type: "boolean", nullable: true },
213
+ children: {
214
+ type: "array",
215
+ items: { $ref: "#/components/schemas/DesktopRoute" }
216
+ }
217
+ },
218
+ additionalProperties: true
219
+ }
220
+ }
221
+ }
222
+ };
package/package.json CHANGED
@@ -6,9 +6,9 @@
6
6
  "description": "Provides a client interface for the NocoBase server",
7
7
  "description.ru-RU": "Предоставляет клиентский интерфейс для сервера NocoBase",
8
8
  "description.zh-CN": "为 NocoBase 服务端提供客户端界面",
9
- "version": "2.1.0-alpha.1",
9
+ "version": "2.1.0-alpha.10",
10
10
  "main": "./dist/server/index.js",
11
- "license": "AGPL-3.0",
11
+ "license": "Apache-2.0",
12
12
  "devDependencies": {
13
13
  "antd": "5.x",
14
14
  "cronstrue": "^2.11.0",
@@ -23,5 +23,5 @@
23
23
  "@nocobase/test": "2.x",
24
24
  "@nocobase/utils": "2.x"
25
25
  },
26
- "gitHead": "d27baf21569643d6fa83f882233f4e90eb5b89f1"
26
+ "gitHead": "ce790d46c0a5768ca9618c7d0d77ab8300de75c8"
27
27
  }
@@ -1,7 +0,0 @@
1
- {
2
- "openapi": "3.0.2",
3
- "info": {
4
- "title": "NocoBase API - Client plugin"
5
- },
6
- "paths": {}
7
- }