@nocobase/plugin-api-doc 0.13.0-alpha.4 → 0.13.0-alpha.5

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.
@@ -1,10 +1,28 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var collection = require('../collection');
6
- var index = require('../index');
7
-
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var multiple_association_exports = {};
19
+ __export(multiple_association_exports, {
20
+ appendCollectionIndexParams: () => appendCollectionIndexParams,
21
+ default: () => multiple_association_default
22
+ });
23
+ module.exports = __toCommonJS(multiple_association_exports);
24
+ var import_collection = require("../collection");
25
+ var import__ = require("../index");
8
26
  function appendCollectionIndexParams(apiDef) {
9
27
  for (const action of Object.keys(apiDef)) {
10
28
  const parameters = apiDef[action]["parameters"];
@@ -17,31 +35,31 @@ function appendCollectionIndexParams(apiDef) {
17
35
  }
18
36
  return apiDef;
19
37
  }
20
- var multiple_association_default = (collection$1, relationField) => {
38
+ var multiple_association_default = (collection, relationField) => {
21
39
  const options = {
22
- collection: collection$1,
40
+ collection,
23
41
  relationField
24
42
  };
25
- collection$1.db.getCollection(relationField.target);
43
+ const targetCollection = collection.db.getCollection(relationField.target);
26
44
  const paths = {
27
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:list`]: appendCollectionIndexParams(
28
- collection.ListActionTemplate(options)
45
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:list`]: appendCollectionIndexParams(
46
+ (0, import_collection.ListActionTemplate)(options)
29
47
  ),
30
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:get`]: appendCollectionIndexParams(
31
- collection.GetActionTemplate(options)
48
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:get`]: appendCollectionIndexParams(
49
+ (0, import_collection.GetActionTemplate)(options)
32
50
  ),
33
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:create`]: appendCollectionIndexParams(
34
- collection.CreateActionTemplate(options)
51
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:create`]: appendCollectionIndexParams(
52
+ (0, import_collection.CreateActionTemplate)(options)
35
53
  ),
36
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:update`]: appendCollectionIndexParams(
37
- collection.UpdateActionTemplate(options)
54
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:update`]: appendCollectionIndexParams(
55
+ (0, import_collection.UpdateActionTemplate)(options)
38
56
  ),
39
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:destroy`]: appendCollectionIndexParams(
40
- collection.DestroyActionTemplate(options)
57
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:destroy`]: appendCollectionIndexParams(
58
+ (0, import_collection.DestroyActionTemplate)(options)
41
59
  ),
42
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:set`]: appendCollectionIndexParams({
60
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:set`]: appendCollectionIndexParams({
43
61
  post: {
44
- tags: [`${collection$1.name}.${relationField.name}`],
62
+ tags: [`${collection.name}.${relationField.name}`],
45
63
  summary: "Set or reset associations",
46
64
  parameters: [
47
65
  {
@@ -58,9 +76,9 @@ var multiple_association_default = (collection$1, relationField) => {
58
76
  }
59
77
  }
60
78
  }),
61
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:remove`]: appendCollectionIndexParams({
79
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:remove`]: appendCollectionIndexParams({
62
80
  post: {
63
- tags: [`${collection$1.name}.${relationField.name}`],
81
+ tags: [`${collection.name}.${relationField.name}`],
64
82
  summary: "Detach record",
65
83
  parameters: [
66
84
  {
@@ -77,9 +95,9 @@ var multiple_association_default = (collection$1, relationField) => {
77
95
  }
78
96
  }
79
97
  }),
80
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:toggle`]: appendCollectionIndexParams({
98
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:toggle`]: appendCollectionIndexParams({
81
99
  post: {
82
- tags: [`${collection$1.name}.${relationField.name}`],
100
+ tags: [`${collection.name}.${relationField.name}`],
83
101
  summary: "Attach or detach record",
84
102
  parameters: [
85
103
  {
@@ -94,13 +112,14 @@ var multiple_association_default = (collection$1, relationField) => {
94
112
  }
95
113
  })
96
114
  };
97
- if (index.hasSortField(collection$1)) {
98
- paths[`/${collection$1.name}/{collectionIndex}/${relationField.name}:move`] = appendCollectionIndexParams(
99
- collection.MoveActionTemplate(options)
115
+ if ((0, import__.hasSortField)(collection)) {
116
+ paths[`/${collection.name}/{collectionIndex}/${relationField.name}:move`] = appendCollectionIndexParams(
117
+ (0, import_collection.MoveActionTemplate)(options)
100
118
  );
101
119
  }
102
120
  return paths;
103
121
  };
104
-
105
- exports.appendCollectionIndexParams = appendCollectionIndexParams;
106
- exports.default = multiple_association_default;
122
+ // Annotate the CommonJS export names for ESM import in node:
123
+ 0 && (module.exports = {
124
+ appendCollectionIndexParams
125
+ });
@@ -1,8 +1,27 @@
1
- 'use strict';
2
-
3
- var multipleAssociation = require('./multiple-association');
4
- var collection = require('../collection');
5
-
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var single_association_exports = {};
19
+ __export(single_association_exports, {
20
+ default: () => single_association_default
21
+ });
22
+ module.exports = __toCommonJS(single_association_exports);
23
+ var import_multiple_association = require("./multiple-association");
24
+ var import_collection = require("../collection");
6
25
  function removeFilterByTkParams(apiDoc) {
7
26
  for (const action of Object.values(apiDoc)) {
8
27
  if (action.parameters) {
@@ -32,18 +51,18 @@ function filterSingleAssociationParams(apiDoc) {
32
51
  }
33
52
  return apiDoc;
34
53
  }
35
- var single_association_default = (collection$1, relationField) => {
54
+ var single_association_default = (collection, relationField) => {
36
55
  const options = {
37
- collection: collection$1,
56
+ collection,
38
57
  relationField
39
58
  };
40
59
  return {
41
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:get`]: removeFilterByTkParams(
42
- filterSingleAssociationParams(multipleAssociation.appendCollectionIndexParams(collection.GetActionTemplate(options)))
60
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:get`]: removeFilterByTkParams(
61
+ filterSingleAssociationParams((0, import_multiple_association.appendCollectionIndexParams)((0, import_collection.GetActionTemplate)(options)))
43
62
  ),
44
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:set`]: multipleAssociation.appendCollectionIndexParams({
63
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:set`]: (0, import_multiple_association.appendCollectionIndexParams)({
45
64
  post: {
46
- tags: [`${collection$1.name}.${relationField.name}`],
65
+ tags: [`${collection.name}.${relationField.name}`],
47
66
  summary: "Associate a record",
48
67
  parameters: [
49
68
  {
@@ -62,9 +81,9 @@ var single_association_default = (collection$1, relationField) => {
62
81
  }
63
82
  }
64
83
  }),
65
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:remove`]: multipleAssociation.appendCollectionIndexParams({
84
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:remove`]: (0, import_multiple_association.appendCollectionIndexParams)({
66
85
  post: {
67
- tags: [`${collection$1.name}.${relationField.name}`],
86
+ tags: [`${collection.name}.${relationField.name}`],
68
87
  summary: "Disassociate the relationship record",
69
88
  responses: {
70
89
  "200": {
@@ -73,16 +92,14 @@ var single_association_default = (collection$1, relationField) => {
73
92
  }
74
93
  }
75
94
  }),
76
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:update`]: removeFilterByTkParams(
77
- filterSingleAssociationParams(multipleAssociation.appendCollectionIndexParams(collection.UpdateActionTemplate(options)))
95
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:update`]: removeFilterByTkParams(
96
+ filterSingleAssociationParams((0, import_multiple_association.appendCollectionIndexParams)((0, import_collection.UpdateActionTemplate)(options)))
78
97
  ),
79
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:create`]: removeFilterByTkParams(
80
- filterSingleAssociationParams(multipleAssociation.appendCollectionIndexParams(collection.CreateActionTemplate(options)))
98
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:create`]: removeFilterByTkParams(
99
+ filterSingleAssociationParams((0, import_multiple_association.appendCollectionIndexParams)((0, import_collection.CreateActionTemplate)(options)))
81
100
  ),
82
- [`/${collection$1.name}/{collectionIndex}/${relationField.name}:destroy`]: removeFilterByTkParams(
83
- filterSingleAssociationParams(multipleAssociation.appendCollectionIndexParams(collection.DestroyActionTemplate(options)))
101
+ [`/${collection.name}/{collectionIndex}/${relationField.name}:destroy`]: removeFilterByTkParams(
102
+ filterSingleAssociationParams((0, import_multiple_association.appendCollectionIndexParams)((0, import_collection.DestroyActionTemplate)(options)))
84
103
  )
85
104
  };
86
105
  };
87
-
88
- module.exports = single_association_default;
@@ -1,9 +1,33 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var index = require('./index');
6
-
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var collection_exports = {};
19
+ __export(collection_exports, {
20
+ CreateActionTemplate: () => CreateActionTemplate,
21
+ DestroyActionTemplate: () => DestroyActionTemplate,
22
+ GetActionTemplate: () => GetActionTemplate,
23
+ ListActionTemplate: () => ListActionTemplate,
24
+ MoveActionTemplate: () => MoveActionTemplate,
25
+ UpdateActionTemplate: () => UpdateActionTemplate,
26
+ default: () => collection_default,
27
+ relationTypeToString: () => relationTypeToString
28
+ });
29
+ module.exports = __toCommonJS(collection_exports);
30
+ var import_index = require("./index");
7
31
  function relationTypeToString(field) {
8
32
  return {
9
33
  belongsTo: "Many to one",
@@ -312,22 +336,27 @@ var collection_default = (collection) => {
312
336
  const options = { collection };
313
337
  const apiDoc = {
314
338
  [`/${collection.name}:list`]: ListActionTemplate(options),
315
- [`/${collection.name}:get`]: GetActionTemplate(options),
316
- [`/${collection.name}:create`]: CreateActionTemplate(options),
317
- [`/${collection.name}:update`]: UpdateActionTemplate(options),
318
- [`/${collection.name}:destroy`]: DestroyActionTemplate(options)
339
+ [`/${collection.name}:get`]: GetActionTemplate(options)
319
340
  };
320
- if (index.hasSortField(collection)) {
341
+ if (!(0, import_index.readOnlyCollection)(collection)) {
342
+ Object.assign(apiDoc, {
343
+ [`/${collection.name}:create`]: CreateActionTemplate(options),
344
+ [`/${collection.name}:update`]: UpdateActionTemplate(options),
345
+ [`/${collection.name}:destroy`]: DestroyActionTemplate(options)
346
+ });
347
+ }
348
+ if ((0, import_index.hasSortField)(collection)) {
321
349
  apiDoc[`/${collection.name}:move`] = MoveActionTemplate(options);
322
350
  }
323
351
  return apiDoc;
324
352
  };
325
-
326
- exports.CreateActionTemplate = CreateActionTemplate;
327
- exports.DestroyActionTemplate = DestroyActionTemplate;
328
- exports.GetActionTemplate = GetActionTemplate;
329
- exports.ListActionTemplate = ListActionTemplate;
330
- exports.MoveActionTemplate = MoveActionTemplate;
331
- exports.UpdateActionTemplate = UpdateActionTemplate;
332
- exports.default = collection_default;
333
- exports.relationTypeToString = relationTypeToString;
353
+ // Annotate the CommonJS export names for ESM import in node:
354
+ 0 && (module.exports = {
355
+ CreateActionTemplate,
356
+ DestroyActionTemplate,
357
+ GetActionTemplate,
358
+ ListActionTemplate,
359
+ MoveActionTemplate,
360
+ UpdateActionTemplate,
361
+ relationTypeToString
362
+ });
@@ -2,3 +2,5 @@ import { Collection } from '@nocobase/database';
2
2
  declare const _default: (collection: Collection, options: any) => any;
3
3
  export default _default;
4
4
  export declare function hasSortField(collection: Collection): boolean;
5
+ export declare function readOnlyCollection(collection: Collection): boolean;
6
+ export declare function isViewCollection(collection: Collection): boolean;
@@ -1,19 +1,44 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var list = require('./collection');
6
- var associations = require('./associations');
7
-
8
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
-
10
- var list__default = /*#__PURE__*/_interopDefault(list);
11
- var associations__default = /*#__PURE__*/_interopDefault(associations);
12
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var paths_exports = {};
29
+ __export(paths_exports, {
30
+ default: () => paths_default,
31
+ hasSortField: () => hasSortField,
32
+ isViewCollection: () => isViewCollection,
33
+ readOnlyCollection: () => readOnlyCollection
34
+ });
35
+ module.exports = __toCommonJS(paths_exports);
36
+ var import_collection = __toESM(require("./collection"));
37
+ var import_associations = __toESM(require("./associations"));
13
38
  var paths_default = (collection, options) => {
14
- const paths = list__default.default(collection);
15
- if (options.withAssociation) {
16
- Object.assign(paths, associations__default.default(collection));
39
+ const paths = (0, import_collection.default)(collection);
40
+ if (options.withAssociation && !isViewCollection(collection)) {
41
+ Object.assign(paths, (0, import_associations.default)(collection));
17
42
  }
18
43
  return paths;
19
44
  };
@@ -25,6 +50,16 @@ function hasSortField(collection) {
25
50
  }
26
51
  return false;
27
52
  }
28
-
29
- exports.default = paths_default;
30
- exports.hasSortField = hasSortField;
53
+ function readOnlyCollection(collection) {
54
+ var _a;
55
+ return isViewCollection(collection) && ((_a = collection.options) == null ? void 0 : _a.writableView) == false;
56
+ }
57
+ function isViewCollection(collection) {
58
+ return collection.isView();
59
+ }
60
+ // Annotate the CommonJS export names for ESM import in node:
61
+ 0 && (module.exports = {
62
+ hasSortField,
63
+ isViewCollection,
64
+ readOnlyCollection
65
+ });
@@ -1,26 +1,43 @@
1
- 'use strict';
2
-
3
- var associations = require('../paths/associations');
4
- var collection = require('../paths/collection');
5
-
6
- var tags_default = (collection$1, options) => {
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var tags_exports = {};
19
+ __export(tags_exports, {
20
+ default: () => tags_default
21
+ });
22
+ module.exports = __toCommonJS(tags_exports);
23
+ var import_associations = require("../paths/associations");
24
+ var import_collection = require("../paths/collection");
25
+ var tags_default = (collection, options) => {
7
26
  var _a, _b, _c, _d;
8
- const associations$1 = associations.associationFields(collection$1);
27
+ const associations = (0, import_associations.associationFields)(collection);
9
28
  const tags = [
10
29
  {
11
- name: collection$1.name,
12
- description: ((_a = collection$1.options) == null ? void 0 : _a.title) || collection$1.name
30
+ name: collection.name,
31
+ description: ((_a = collection.options) == null ? void 0 : _a.title) || collection.name
13
32
  }
14
33
  ];
15
34
  if (options.withAssociation) {
16
- for (const field of associations$1) {
35
+ for (const field of associations) {
17
36
  tags.push({
18
- name: `${collection$1.name}.${field.name}`,
19
- description: `${collection.relationTypeToString(field)} relationship, ${((_b = collection$1.options) == null ? void 0 : _b.title) || collection$1.name}/${((_d = (_c = field.options) == null ? void 0 : _c.uiSchema) == null ? void 0 : _d.title) || field.name}`
37
+ name: `${collection.name}.${field.name}`,
38
+ description: `${(0, import_collection.relationTypeToString)(field)} relationship, ${((_b = collection.options) == null ? void 0 : _b.title) || collection.name}/${((_d = (_c = field.options) == null ? void 0 : _c.uiSchema) == null ? void 0 : _d.title) || field.name}`
20
39
  });
21
40
  }
22
41
  }
23
42
  return tags;
24
43
  };
25
-
26
- module.exports = tags_default;
@@ -1,5 +1,25 @@
1
- 'use strict';
2
-
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var constants_exports = {};
19
+ __export(constants_exports, {
20
+ SchemaTypeMapping: () => SchemaTypeMapping
21
+ });
22
+ module.exports = __toCommonJS(constants_exports);
3
23
  const SchemaTypeMapping = {
4
24
  uid: "string",
5
25
  json: "object",
@@ -10,5 +30,7 @@ const SchemaTypeMapping = {
10
30
  context: "string",
11
31
  set: "array"
12
32
  };
13
-
14
- exports.SchemaTypeMapping = SchemaTypeMapping;
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ SchemaTypeMapping
36
+ });
@@ -1,5 +1,26 @@
1
- 'use strict';
2
-
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var helpers_exports = {};
19
+ __export(helpers_exports, {
20
+ createDefaultActionSwagger: () => createDefaultActionSwagger,
21
+ getInterfaceCollection: () => getInterfaceCollection
22
+ });
23
+ module.exports = __toCommonJS(helpers_exports);
3
24
  const createDefaultActionSwagger = ({ collection }) => {
4
25
  const responses = {
5
26
  default: {
@@ -106,6 +127,8 @@ const getInterfaceCollection = (options) => {
106
127
  };
107
128
  return single;
108
129
  };
109
-
110
- exports.createDefaultActionSwagger = createDefaultActionSwagger;
111
- exports.getInterfaceCollection = getInterfaceCollection;
130
+ // Annotate the CommonJS export names for ESM import in node:
131
+ 0 && (module.exports = {
132
+ createDefaultActionSwagger,
133
+ getInterfaceCollection
134
+ });