@scoutflo/topology-contracts 0.1.0 → 0.3.0

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,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.topologyApiErrorEnvelopeSchema = exports.topologyApiErrorCodeSchema = exports.credentialSourceBulkResponseSchema = exports.credentialSourceBulkRequestSchema = exports.credentialSourceBulkRequestItemSchema = exports.credentialSourceSingleResponseSchema = exports.credentialSourceResultItemSchema = exports.credentialSourceErrorSchema = exports.credentialSourceExternalRefSchema = exports.credentialResolutionModeSchema = exports.credentialSourceEntityTypeSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../source-sync/common");
6
+ exports.credentialSourceEntityTypeSchema = zod_1.z.enum(['service', 'resource']);
7
+ exports.credentialResolutionModeSchema = zod_1.z.enum([
8
+ 'root_refs',
9
+ 'bfs',
10
+ 'not_found',
11
+ 'not_attempted',
12
+ ]);
13
+ exports.credentialSourceExternalRefSchema = zod_1.z.object({
14
+ provider: common_1.nonEmptyStringSchema.optional(),
15
+ external_id: common_1.nonEmptyStringSchema.optional(),
16
+ region: common_1.nonEmptyStringSchema.optional(),
17
+ account_id: common_1.nonEmptyStringSchema.optional(),
18
+ source_collection: common_1.nonEmptyStringSchema.optional(),
19
+ source_document_id: common_1.nonEmptyStringSchema.optional(),
20
+ }).passthrough();
21
+ exports.credentialSourceErrorSchema = zod_1.z.object({
22
+ code: common_1.nonEmptyStringSchema,
23
+ message: common_1.nonEmptyStringSchema,
24
+ }).passthrough();
25
+ exports.credentialSourceResultItemSchema = zod_1.z.object({
26
+ found: zod_1.z.boolean(),
27
+ entity_id: common_1.nonEmptyStringSchema,
28
+ entity_type: exports.credentialSourceEntityTypeSchema.optional(),
29
+ root_type: common_1.nonEmptyStringSchema.optional(),
30
+ source_resource_id: common_1.nonEmptyStringSchema.nullable().optional(),
31
+ externalRef: exports.credentialSourceExternalRefSchema.nullable().optional(),
32
+ resolution_mode: exports.credentialResolutionModeSchema,
33
+ reason_codes: zod_1.z.array(common_1.nonEmptyStringSchema),
34
+ traversal_path: zod_1.z.array(common_1.nonEmptyStringSchema).optional(),
35
+ error: exports.credentialSourceErrorSchema.nullable().optional(),
36
+ }).passthrough();
37
+ exports.credentialSourceSingleResponseSchema = zod_1.z.object({
38
+ status: zod_1.z.literal('success'),
39
+ data: exports.credentialSourceResultItemSchema,
40
+ }).passthrough();
41
+ exports.credentialSourceBulkRequestItemSchema = zod_1.z.object({
42
+ entity_type: exports.credentialSourceEntityTypeSchema,
43
+ entity_id: common_1.nonEmptyStringSchema,
44
+ root_type: common_1.nonEmptyStringSchema,
45
+ }).passthrough();
46
+ exports.credentialSourceBulkRequestSchema = zod_1.z.object({
47
+ requests: zod_1.z.array(exports.credentialSourceBulkRequestItemSchema).min(1).max(50),
48
+ }).passthrough();
49
+ exports.credentialSourceBulkResponseSchema = zod_1.z.object({
50
+ status: zod_1.z.enum(['success', 'partial_success']),
51
+ results: zod_1.z.array(exports.credentialSourceResultItemSchema),
52
+ }).passthrough();
53
+ exports.topologyApiErrorCodeSchema = common_1.nonEmptyStringSchema;
54
+ exports.topologyApiErrorEnvelopeSchema = zod_1.z.object({
55
+ status: zod_1.z.literal('error'),
56
+ correlation_id: common_1.nonEmptyStringSchema,
57
+ timestamp: common_1.dateTimeStringSchema,
58
+ error: zod_1.z.object({
59
+ code: exports.topologyApiErrorCodeSchema,
60
+ message: common_1.nonEmptyStringSchema,
61
+ details: common_1.recordSchema.nullable().optional(),
62
+ retry_after_seconds: zod_1.z.number().min(0).nullable().optional(),
63
+ }).passthrough(),
64
+ }).passthrough();
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/credential-source/index.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAI+B;AAElB,QAAA,gCAAgC,GAAG,OAAC,C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MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;KAC7D,CAAC,CAAC,WAAW,EAAE;CACjB,CAAC,CAAC,WAAW,EAAE,CAAC"}
@@ -5,4 +5,6 @@ export * from './families';
5
5
  export * from './source-sync';
6
6
  export * from './correlation';
7
7
  export * from './topology';
8
+ export * from './investigation';
9
+ export * from './credential-source';
8
10
  export * from './schemas';
package/dist/src/index.js CHANGED
@@ -44,5 +44,7 @@ __exportStar(require("./families"), exports);
44
44
  __exportStar(require("./source-sync"), exports);
45
45
  __exportStar(require("./correlation"), exports);
46
46
  __exportStar(require("./topology"), exports);
47
+ __exportStar(require("./investigation"), exports);
48
+ __exportStar(require("./credential-source"), exports);
47
49
  __exportStar(require("./schemas"), exports);
48
50
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAa,QAAA,0BAA0B,GAAG,8BAA8B,CAAC;AAEzE,8EAA8D;AAE9D,8CAA4B;AAC5B,6CAA2B;AAC3B,gDAA8B;AAC9B,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAa,QAAA,0BAA0B,GAAG,8BAA8B,CAAC;AAEzE,8EAA8D;AAE9D,8CAA4B;AAC5B,6CAA2B;AAC3B,gDAA8B;AAC9B,gDAA8B;AAC9B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,4CAA0B"}