@redocly/config 0.41.2 → 0.41.3

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
@@ -12344,6 +12344,9 @@ export declare const redoclyConfigSchema: {
12344
12344
  readonly name: {
12345
12345
  readonly type: "string";
12346
12346
  };
12347
+ readonly key: {
12348
+ readonly type: "string";
12349
+ };
12347
12350
  readonly description: {
12348
12351
  readonly type: "string";
12349
12352
  };
@@ -12873,7 +12876,7 @@ export declare const redoclyConfigSchema: {
12873
12876
  }];
12874
12877
  };
12875
12878
  };
12876
- readonly required: readonly ["name", "entities", "levels"];
12879
+ readonly required: readonly ["name", "key", "entities", "levels"];
12877
12880
  readonly additionalProperties: false;
12878
12881
  };
12879
12882
  };
@@ -18873,6 +18876,9 @@ export declare const redoclyConfigSchema: {
18873
18876
  readonly name: {
18874
18877
  readonly type: "string";
18875
18878
  };
18879
+ readonly key: {
18880
+ readonly type: "string";
18881
+ };
18876
18882
  readonly description: {
18877
18883
  readonly type: "string";
18878
18884
  };
@@ -19402,7 +19408,7 @@ export declare const redoclyConfigSchema: {
19402
19408
  }];
19403
19409
  };
19404
19410
  };
19405
- readonly required: readonly ["name", "entities", "levels"];
19411
+ readonly required: readonly ["name", "key", "entities", "levels"];
19406
19412
  readonly additionalProperties: false;
19407
19413
  };
19408
19414
  };
@@ -29076,6 +29082,9 @@ export declare const rootRedoclyConfigSchema: {
29076
29082
  description: {
29077
29083
  type: "string";
29078
29084
  };
29085
+ key: {
29086
+ type: "string";
29087
+ };
29079
29088
  entities: {
29080
29089
  oneOf: ({
29081
29090
  items: {
@@ -29171,7 +29180,7 @@ export declare const rootRedoclyConfigSchema: {
29171
29180
  };
29172
29181
  additionalProperties: false;
29173
29182
  type: "object";
29174
- required: ("name" | "entities" | "levels")[];
29183
+ required: ("name" | "key" | "entities" | "levels")[];
29175
29184
  };
29176
29185
  type: "array";
29177
29186
  };
@@ -35089,6 +35098,9 @@ export declare const rootRedoclyConfigSchema: {
35089
35098
  description: {
35090
35099
  type: "string";
35091
35100
  };
35101
+ key: {
35102
+ type: "string";
35103
+ };
35092
35104
  entities: {
35093
35105
  oneOf: ({
35094
35106
  items: {
@@ -35249,7 +35261,7 @@ export declare const rootRedoclyConfigSchema: {
35249
35261
  };
35250
35262
  additionalProperties: false;
35251
35263
  type: "object";
35252
- required: ("name" | "entities" | "levels")[];
35264
+ required: ("name" | "key" | "entities" | "levels")[];
35253
35265
  };
35254
35266
  type: "array";
35255
35267
  };
@@ -44063,6 +44075,9 @@ export declare const rootRedoclyConfigSchema: {
44063
44075
  readonly name: {
44064
44076
  readonly type: "string";
44065
44077
  };
44078
+ readonly key: {
44079
+ readonly type: "string";
44080
+ };
44066
44081
  readonly description: {
44067
44082
  readonly type: "string";
44068
44083
  };
@@ -44592,7 +44607,7 @@ export declare const rootRedoclyConfigSchema: {
44592
44607
  }];
44593
44608
  };
44594
44609
  };
44595
- readonly required: readonly ["name", "entities", "levels"];
44610
+ readonly required: readonly ["name", "key", "entities", "levels"];
44596
44611
  readonly additionalProperties: false;
44597
44612
  };
44598
44613
  };
@@ -50592,6 +50607,9 @@ export declare const rootRedoclyConfigSchema: {
50592
50607
  readonly name: {
50593
50608
  readonly type: "string";
50594
50609
  };
50610
+ readonly key: {
50611
+ readonly type: "string";
50612
+ };
50595
50613
  readonly description: {
50596
50614
  readonly type: "string";
50597
50615
  };
@@ -51121,7 +51139,7 @@ export declare const rootRedoclyConfigSchema: {
51121
51139
  }];
51122
51140
  };
51123
51141
  };
51124
- readonly required: readonly ["name", "entities", "levels"];
51142
+ readonly required: readonly ["name", "key", "entities", "levels"];
51125
51143
  readonly additionalProperties: false;
51126
51144
  };
51127
51145
  };
@@ -4,6 +4,9 @@ export declare const scorecardSchema: {
4
4
  readonly name: {
5
5
  readonly type: "string";
6
6
  };
7
+ readonly key: {
8
+ readonly type: "string";
9
+ };
7
10
  readonly description: {
8
11
  readonly type: "string";
9
12
  };
@@ -533,7 +536,7 @@ export declare const scorecardSchema: {
533
536
  }];
534
537
  };
535
538
  };
536
- readonly required: readonly ["name", "entities", "levels"];
539
+ readonly required: readonly ["name", "key", "entities", "levels"];
537
540
  readonly additionalProperties: false;
538
541
  };
539
542
  export declare const scorecardsConfigSchema: {
@@ -544,6 +547,9 @@ export declare const scorecardsConfigSchema: {
544
547
  readonly name: {
545
548
  readonly type: "string";
546
549
  };
550
+ readonly key: {
551
+ readonly type: "string";
552
+ };
547
553
  readonly description: {
548
554
  readonly type: "string";
549
555
  };
@@ -1073,7 +1079,7 @@ export declare const scorecardsConfigSchema: {
1073
1079
  }];
1074
1080
  };
1075
1081
  };
1076
- readonly required: readonly ["name", "entities", "levels"];
1082
+ readonly required: readonly ["name", "key", "entities", "levels"];
1077
1083
  readonly additionalProperties: false;
1078
1084
  };
1079
1085
  };
@@ -208,6 +208,7 @@ exports.scorecardSchema = {
208
208
  type: 'object',
209
209
  properties: {
210
210
  name: { type: 'string' },
211
+ key: { type: 'string' },
211
212
  description: { type: 'string' },
212
213
  entities: {
213
214
  oneOf: [
@@ -230,7 +231,7 @@ exports.scorecardSchema = {
230
231
  },
231
232
  trigger: triggerSchema,
232
233
  },
233
- required: ['name', 'entities', 'levels'],
234
+ required: ['name', 'key', 'entities', 'levels'],
234
235
  additionalProperties: false,
235
236
  };
236
237
  exports.scorecardsConfigSchema = {
@@ -14,3 +14,25 @@ export declare enum LayoutVariant {
14
14
  THREE_PANEL = "three-panel"
15
15
  }
16
16
  export declare const ENTITY_RELATION_TYPES: readonly ["partOf", "hasParts", "creates", "createdBy", "owns", "ownedBy", "implements", "implementedBy", "dependsOn", "dependencyOf", "uses", "usedBy", "produces", "consumes", "linksTo", "supersedes", "supersededBy", "compatibleWith", "extends", "extendedBy", "relatesTo", "hasMember", "memberOf", "triggers", "triggeredBy", "returns", "returnedBy"];
17
+ export declare const NODE_TYPE_NAMES: {
18
+ readonly USER_ENTITY: "UserEntity";
19
+ readonly USER_ENTITY_METADATA: "UserEntityMetadata";
20
+ readonly API_DESCRIPTION_ENTITY: "ApiDescriptionEntity";
21
+ readonly API_DESCRIPTION_METADATA: "ApiDescriptionEntityMetadata";
22
+ readonly API_OPERATION_ENTITY: "ApiOperationEntity";
23
+ readonly API_OPERATION_METADATA: "ApiOperationEntityMetadata";
24
+ readonly DATA_SCHEMA_ENTITY: "DataSchemaEntity";
25
+ readonly DATA_SCHEMA_METADATA: "DataSchemaEntityMetadata";
26
+ readonly SERVICE_ENTITY: "ServiceEntity";
27
+ readonly DOMAIN_ENTITY: "DomainEntity";
28
+ readonly TEAM_ENTITY: "TeamEntity";
29
+ readonly ENTITY: "Entity";
30
+ readonly ENTITY_METADATA: "EntityMetadata";
31
+ readonly ENTITY_LINK_LIST: "EntityLinkList";
32
+ readonly ENTITY_LINK: "EntityLink";
33
+ readonly ENTITY_RELATION: "EntityRelation";
34
+ readonly ENTITY_RELATION_LIST: "EntityRelationList";
35
+ readonly ENTITY_CONTACT: "EntityContact";
36
+ readonly SLACK_CONTACT: "EntitySlackContact";
37
+ readonly SLACK_CHANNEL: "EntitySlackChannel";
38
+ };
@@ -45,4 +45,26 @@ export const ENTITY_RELATION_TYPES = [
45
45
  'returns',
46
46
  'returnedBy',
47
47
  ];
48
+ export const NODE_TYPE_NAMES = {
49
+ USER_ENTITY: 'UserEntity',
50
+ USER_ENTITY_METADATA: 'UserEntityMetadata',
51
+ API_DESCRIPTION_ENTITY: 'ApiDescriptionEntity',
52
+ API_DESCRIPTION_METADATA: 'ApiDescriptionEntityMetadata',
53
+ API_OPERATION_ENTITY: 'ApiOperationEntity',
54
+ API_OPERATION_METADATA: 'ApiOperationEntityMetadata',
55
+ DATA_SCHEMA_ENTITY: 'DataSchemaEntity',
56
+ DATA_SCHEMA_METADATA: 'DataSchemaEntityMetadata',
57
+ SERVICE_ENTITY: 'ServiceEntity',
58
+ DOMAIN_ENTITY: 'DomainEntity',
59
+ TEAM_ENTITY: 'TeamEntity',
60
+ ENTITY: 'Entity',
61
+ ENTITY_METADATA: 'EntityMetadata',
62
+ ENTITY_LINK_LIST: 'EntityLinkList',
63
+ ENTITY_LINK: 'EntityLink',
64
+ ENTITY_RELATION: 'EntityRelation',
65
+ ENTITY_RELATION_LIST: 'EntityRelationList',
66
+ ENTITY_CONTACT: 'EntityContact',
67
+ SLACK_CONTACT: 'EntitySlackContact',
68
+ SLACK_CHANNEL: 'EntitySlackChannel',
69
+ };
48
70
  //# sourceMappingURL=constants.js.map
@@ -5615,6 +5615,9 @@ export declare const themeConfigSchema: {
5615
5615
  readonly name: {
5616
5616
  readonly type: "string";
5617
5617
  };
5618
+ readonly key: {
5619
+ readonly type: "string";
5620
+ };
5618
5621
  readonly description: {
5619
5622
  readonly type: "string";
5620
5623
  };
@@ -6144,7 +6147,7 @@ export declare const themeConfigSchema: {
6144
6147
  }];
6145
6148
  };
6146
6149
  };
6147
- readonly required: readonly ["name", "entities", "levels"];
6150
+ readonly required: readonly ["name", "key", "entities", "levels"];
6148
6151
  readonly additionalProperties: false;
6149
6152
  };
6150
6153
  };