@redocly/config 0.41.2 → 0.41.4

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.
@@ -4,6 +4,7 @@ exports.entityFileDefaultSchema = exports.entityFileSchema = exports.entityBaseP
4
4
  const constants_1 = require("./constants");
5
5
  exports.userMetadataSchema = {
6
6
  type: 'object',
7
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.USER_ENTITY_METADATA,
7
8
  properties: {
8
9
  email: {
9
10
  type: 'string',
@@ -15,6 +16,7 @@ exports.userMetadataSchema = {
15
16
  };
16
17
  exports.apiDescriptionMetadataSchema = {
17
18
  type: 'object',
19
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.API_DESCRIPTION_METADATA,
18
20
  properties: {
19
21
  specType: {
20
22
  type: 'string',
@@ -31,6 +33,7 @@ exports.apiDescriptionMetadataSchema = {
31
33
  };
32
34
  exports.apiOperationMetadataSchema = {
33
35
  type: 'object',
36
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.API_OPERATION_METADATA,
34
37
  properties: {
35
38
  method: {
36
39
  type: 'string',
@@ -61,6 +64,7 @@ exports.apiOperationMetadataSchema = {
61
64
  };
62
65
  exports.dataSchemaMetadataSchema = {
63
66
  type: 'object',
67
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.DATA_SCHEMA_METADATA,
64
68
  properties: {
65
69
  specType: {
66
70
  type: 'string',
@@ -81,37 +85,33 @@ exports.dataSchemaMetadataSchema = {
81
85
  };
82
86
  exports.defaultMetadataSchema = {
83
87
  type: 'object',
88
+ properties: {},
89
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.ENTITY_METADATA,
84
90
  additionalProperties: true,
85
91
  };
86
92
  exports.slackChannelFileSchema = {
87
93
  type: 'object',
94
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.SLACK_CHANNEL,
88
95
  properties: {
89
96
  name: {
90
97
  type: 'string',
91
98
  minLength: 2,
92
99
  maxLength: 150,
93
100
  },
101
+ url: {
102
+ type: 'string',
103
+ },
94
104
  },
95
105
  required: ['name'],
96
106
  additionalProperties: false,
97
107
  };
98
108
  exports.slackContactFileSchema = {
99
109
  type: 'object',
110
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.SLACK_CONTACT,
100
111
  properties: {
101
112
  channels: {
102
113
  type: 'array',
103
- items: {
104
- type: 'object',
105
- properties: {
106
- name: {
107
- type: 'string',
108
- minLength: 2,
109
- maxLength: 150,
110
- },
111
- },
112
- required: ['name'],
113
- additionalProperties: false,
114
- },
114
+ items: exports.slackChannelFileSchema,
115
115
  },
116
116
  },
117
117
  required: ['channels'],
@@ -119,37 +119,15 @@ exports.slackContactFileSchema = {
119
119
  };
120
120
  exports.entityContactFileSchema = {
121
121
  type: 'object',
122
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.ENTITY_CONTACT,
122
123
  properties: {
123
- slack: {
124
- type: 'object',
125
- properties: {
126
- channels: {
127
- type: 'array',
128
- items: {
129
- type: 'object',
130
- properties: {
131
- name: {
132
- type: 'string',
133
- minLength: 2,
134
- maxLength: 150,
135
- },
136
- url: {
137
- type: 'string',
138
- },
139
- },
140
- required: ['name'],
141
- additionalProperties: false,
142
- },
143
- },
144
- },
145
- required: ['channels'],
146
- additionalProperties: false,
147
- },
124
+ slack: exports.slackContactFileSchema,
148
125
  },
149
126
  additionalProperties: false,
150
127
  };
151
128
  exports.entityLinkFileSchema = {
152
129
  type: 'object',
130
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.ENTITY_LINK,
153
131
  properties: {
154
132
  label: {
155
133
  type: 'string',
@@ -165,6 +143,7 @@ exports.entityLinkFileSchema = {
165
143
  };
166
144
  exports.entityRelationFileSchema = {
167
145
  type: 'object',
146
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.ENTITY_RELATION,
168
147
  properties: {
169
148
  type: {
170
149
  type: 'string',
@@ -227,16 +206,15 @@ exports.entityBaseProperties = {
227
206
  contact: exports.entityContactFileSchema,
228
207
  links: {
229
208
  type: 'array',
209
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.ENTITY_LINK_LIST,
230
210
  items: exports.entityLinkFileSchema,
231
211
  },
232
212
  relations: {
233
213
  type: 'array',
214
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.ENTITY_RELATION_LIST,
234
215
  items: exports.entityRelationFileSchema,
235
216
  },
236
- metadata: {
237
- type: 'object',
238
- additionalProperties: true,
239
- },
217
+ metadata: exports.defaultMetadataSchema,
240
218
  };
241
219
  exports.entityFileSchema = {
242
220
  type: 'object',
@@ -249,39 +227,46 @@ exports.entityFileSchema = {
249
227
  properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'user' }, metadata: exports.userMetadataSchema }),
250
228
  required: ['key', 'title', 'type', 'metadata'],
251
229
  additionalProperties: false,
230
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.USER_ENTITY,
252
231
  },
253
232
  {
254
233
  type: 'object',
234
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.API_OPERATION_ENTITY,
255
235
  properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'api-operation' }, metadata: exports.apiOperationMetadataSchema }),
256
236
  required: ['key', 'title', 'type', 'metadata'],
257
237
  additionalProperties: false,
258
238
  },
259
239
  {
260
240
  type: 'object',
241
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.DATA_SCHEMA_ENTITY,
261
242
  properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'data-schema' }, metadata: exports.dataSchemaMetadataSchema }),
262
243
  required: ['key', 'title', 'type', 'metadata'],
263
244
  additionalProperties: false,
264
245
  },
265
246
  {
266
247
  type: 'object',
248
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.API_DESCRIPTION_ENTITY,
267
249
  properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'api-description' }, metadata: exports.apiDescriptionMetadataSchema }),
268
250
  required: ['key', 'title', 'type', 'metadata'],
269
251
  additionalProperties: false,
270
252
  },
271
253
  {
272
254
  type: 'object',
255
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.SERVICE_ENTITY,
273
256
  properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'service' } }),
274
257
  required: ['key', 'title', 'type'],
275
258
  additionalProperties: false,
276
259
  },
277
260
  {
278
261
  type: 'object',
262
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.DOMAIN_ENTITY,
279
263
  properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'domain' } }),
280
264
  required: ['key', 'title', 'type'],
281
265
  additionalProperties: false,
282
266
  },
283
267
  {
284
268
  type: 'object',
269
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.TEAM_ENTITY,
285
270
  properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'team' } }),
286
271
  required: ['key', 'title', 'type'],
287
272
  additionalProperties: false,
@@ -290,6 +275,7 @@ exports.entityFileSchema = {
290
275
  };
291
276
  exports.entityFileDefaultSchema = {
292
277
  type: 'object',
278
+ nodeTypeName: constants_1.NODE_TYPE_NAMES.ENTITY,
293
279
  properties: Object.assign({}, exports.entityBaseProperties),
294
280
  required: ['key', 'title', 'type'],
295
281
  additionalProperties: false,
package/lib/index.d.ts CHANGED
@@ -3,5 +3,5 @@ export { rbacConfigSchema, rootRedoclyConfigSchema } from './root-config-schema'
3
3
  export { redocConfigSchema } from './redoc-config-schema';
4
4
  export * from './types';
5
5
  export * from './common';
6
- export { ApigeeDevOnboardingIntegrationAuthType, AuthProviderType, DEFAULT_TEAM_CLAIM_NAME, LayoutVariant, REDOCLY_TEAMS_RBAC, REDOCLY_ROUTE_RBAC, ENTITY_RELATION_TYPES, } from './constants';
6
+ export { ApigeeDevOnboardingIntegrationAuthType, AuthProviderType, DEFAULT_TEAM_CLAIM_NAME, LayoutVariant, REDOCLY_TEAMS_RBAC, REDOCLY_ROUTE_RBAC, ENTITY_RELATION_TYPES, NODE_TYPE_NAMES, } from './constants';
7
7
  export * from './entities-catalog-entity-file-schema';
package/lib/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.ENTITY_RELATION_TYPES = exports.REDOCLY_ROUTE_RBAC = exports.REDOCLY_TEAMS_RBAC = exports.LayoutVariant = exports.DEFAULT_TEAM_CLAIM_NAME = exports.AuthProviderType = exports.ApigeeDevOnboardingIntegrationAuthType = exports.redocConfigSchema = exports.rootRedoclyConfigSchema = exports.rbacConfigSchema = exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = void 0;
17
+ exports.NODE_TYPE_NAMES = exports.ENTITY_RELATION_TYPES = exports.REDOCLY_ROUTE_RBAC = exports.REDOCLY_TEAMS_RBAC = exports.LayoutVariant = exports.DEFAULT_TEAM_CLAIM_NAME = exports.AuthProviderType = exports.ApigeeDevOnboardingIntegrationAuthType = exports.redocConfigSchema = exports.rootRedoclyConfigSchema = exports.rbacConfigSchema = exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = void 0;
18
18
  var product_override_schema_1 = require("./product-override-schema");
19
19
  Object.defineProperty(exports, "productThemeOverrideSchema", { enumerable: true, get: function () { return product_override_schema_1.productThemeOverrideSchema; } });
20
20
  Object.defineProperty(exports, "productConfigOverrideSchema", { enumerable: true, get: function () { return product_override_schema_1.productConfigOverrideSchema; } });
@@ -33,5 +33,6 @@ Object.defineProperty(exports, "LayoutVariant", { enumerable: true, get: functio
33
33
  Object.defineProperty(exports, "REDOCLY_TEAMS_RBAC", { enumerable: true, get: function () { return constants_1.REDOCLY_TEAMS_RBAC; } });
34
34
  Object.defineProperty(exports, "REDOCLY_ROUTE_RBAC", { enumerable: true, get: function () { return constants_1.REDOCLY_ROUTE_RBAC; } });
35
35
  Object.defineProperty(exports, "ENTITY_RELATION_TYPES", { enumerable: true, get: function () { return constants_1.ENTITY_RELATION_TYPES; } });
36
+ Object.defineProperty(exports, "NODE_TYPE_NAMES", { enumerable: true, get: function () { return constants_1.NODE_TYPE_NAMES; } });
36
37
  __exportStar(require("./entities-catalog-entity-file-schema"), exports);
37
38
  //# sourceMappingURL=index.js.map