gdpr-contracts 0.1.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.
- package/README.md +44 -0
- package/dist/enums/index.d.ts +30 -0
- package/dist/enums/index.d.ts.map +1 -0
- package/dist/enums/index.js +38 -0
- package/dist/enums/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/index.d.ts +3 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +19 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/nats.d.ts +287 -0
- package/dist/schemas/nats.d.ts.map +1 -0
- package/dist/schemas/nats.js +61 -0
- package/dist/schemas/nats.js.map +1 -0
- package/dist/schemas/rest.d.ts +153 -0
- package/dist/schemas/rest.d.ts.map +1 -0
- package/dist/schemas/rest.js +48 -0
- package/dist/schemas/rest.js.map +1 -0
- package/dist/subjects/index.d.ts +12 -0
- package/dist/subjects/index.d.ts.map +1 -0
- package/dist/subjects/index.js +16 -0
- package/dist/subjects/index.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/nats.d.ts +57 -0
- package/dist/types/nats.d.ts.map +1 -0
- package/dist/types/nats.js +3 -0
- package/dist/types/nats.js.map +1 -0
- package/dist/types/rest.d.ts +42 -0
- package/dist/types/rest.d.ts.map +1 -0
- package/dist/types/rest.js +3 -0
- package/dist/types/rest.js.map +1 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# gdpr-contracts
|
|
2
|
+
|
|
3
|
+
Shared contracts for the GDPR Sidecar system. Includes TypeScript types, Zod validation schemas, shared enums, and NATS subject definitions for communication between the GDPR Service and GDPR Sidecar.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install gdpr-contracts
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { /* types, schemas, enums, subjects */ } from 'gdpr-contracts';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Package Contents
|
|
18
|
+
|
|
19
|
+
| Module | Description |
|
|
20
|
+
|--------|-------------|
|
|
21
|
+
| `enums` | Shared enumerations for GDPR operations |
|
|
22
|
+
| `types` | TypeScript type definitions |
|
|
23
|
+
| `schemas` | Zod validation schemas for runtime validation |
|
|
24
|
+
| `subjects` | NATS subject definitions for service communication |
|
|
25
|
+
|
|
26
|
+
## Development
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Install dependencies
|
|
30
|
+
npm install
|
|
31
|
+
|
|
32
|
+
# Build the package
|
|
33
|
+
npm run build
|
|
34
|
+
|
|
35
|
+
# Watch mode for development
|
|
36
|
+
npm run dev
|
|
37
|
+
|
|
38
|
+
# Clean build output
|
|
39
|
+
npm run clean
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
ISC
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare enum GdprAction {
|
|
2
|
+
DELETE = "DELETE",
|
|
3
|
+
EXPORT = "EXPORT"
|
|
4
|
+
}
|
|
5
|
+
export declare enum LegalBasis {
|
|
6
|
+
CONSENT = "CONSENT",
|
|
7
|
+
CONTRACT = "CONTRACT",
|
|
8
|
+
LEGAL_OBLIGATION = "LEGAL_OBLIGATION",
|
|
9
|
+
LEGITIMATE_INTEREST = "LEGITIMATE_INTEREST",
|
|
10
|
+
VITAL_INTEREST = "VITAL_INTEREST",
|
|
11
|
+
PUBLIC_TASK = "PUBLIC_TASK"
|
|
12
|
+
}
|
|
13
|
+
export declare enum DataCategory {
|
|
14
|
+
STANDARD = "STANDARD",
|
|
15
|
+
SPECIAL_CATEGORY = "SPECIAL_CATEGORY"
|
|
16
|
+
}
|
|
17
|
+
export declare enum SidecarStatus {
|
|
18
|
+
NEW = "NEW",
|
|
19
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
20
|
+
COMPLETED = "COMPLETED",
|
|
21
|
+
FAILED = "FAILED"
|
|
22
|
+
}
|
|
23
|
+
export declare enum ProcessStatus {
|
|
24
|
+
NEW = "NEW",
|
|
25
|
+
FORWARDING = "FORWARDING",
|
|
26
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
27
|
+
COMPLETED = "COMPLETED",
|
|
28
|
+
FAILED = "FAILED"
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,gBAAgB,qBAAqB;IACrC,mBAAmB,wBAAwB;IAC3C,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;CAC5B;AAED,oBAAY,YAAY;IACtB,QAAQ,aAAa;IACrB,gBAAgB,qBAAqB;CACtC;AAED,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProcessStatus = exports.SidecarStatus = exports.DataCategory = exports.LegalBasis = exports.GdprAction = void 0;
|
|
4
|
+
var GdprAction;
|
|
5
|
+
(function (GdprAction) {
|
|
6
|
+
GdprAction["DELETE"] = "DELETE";
|
|
7
|
+
GdprAction["EXPORT"] = "EXPORT";
|
|
8
|
+
})(GdprAction || (exports.GdprAction = GdprAction = {}));
|
|
9
|
+
var LegalBasis;
|
|
10
|
+
(function (LegalBasis) {
|
|
11
|
+
LegalBasis["CONSENT"] = "CONSENT";
|
|
12
|
+
LegalBasis["CONTRACT"] = "CONTRACT";
|
|
13
|
+
LegalBasis["LEGAL_OBLIGATION"] = "LEGAL_OBLIGATION";
|
|
14
|
+
LegalBasis["LEGITIMATE_INTEREST"] = "LEGITIMATE_INTEREST";
|
|
15
|
+
LegalBasis["VITAL_INTEREST"] = "VITAL_INTEREST";
|
|
16
|
+
LegalBasis["PUBLIC_TASK"] = "PUBLIC_TASK";
|
|
17
|
+
})(LegalBasis || (exports.LegalBasis = LegalBasis = {}));
|
|
18
|
+
var DataCategory;
|
|
19
|
+
(function (DataCategory) {
|
|
20
|
+
DataCategory["STANDARD"] = "STANDARD";
|
|
21
|
+
DataCategory["SPECIAL_CATEGORY"] = "SPECIAL_CATEGORY";
|
|
22
|
+
})(DataCategory || (exports.DataCategory = DataCategory = {}));
|
|
23
|
+
var SidecarStatus;
|
|
24
|
+
(function (SidecarStatus) {
|
|
25
|
+
SidecarStatus["NEW"] = "NEW";
|
|
26
|
+
SidecarStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
27
|
+
SidecarStatus["COMPLETED"] = "COMPLETED";
|
|
28
|
+
SidecarStatus["FAILED"] = "FAILED";
|
|
29
|
+
})(SidecarStatus || (exports.SidecarStatus = SidecarStatus = {}));
|
|
30
|
+
var ProcessStatus;
|
|
31
|
+
(function (ProcessStatus) {
|
|
32
|
+
ProcessStatus["NEW"] = "NEW";
|
|
33
|
+
ProcessStatus["FORWARDING"] = "FORWARDING";
|
|
34
|
+
ProcessStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
35
|
+
ProcessStatus["COMPLETED"] = "COMPLETED";
|
|
36
|
+
ProcessStatus["FAILED"] = "FAILED";
|
|
37
|
+
})(ProcessStatus || (exports.ProcessStatus = ProcessStatus = {}));
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;AACnB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;IACrB,mDAAqC,CAAA;IACrC,yDAA2C,CAAA;IAC3C,+CAAiC,CAAA;IACjC,yCAA2B,CAAA;AAC7B,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAED,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,qDAAqC,CAAA;AACvC,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,4CAA2B,CAAA;IAC3B,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;AACnB,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAED,IAAY,aAMX;AAND,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,0CAAyB,CAAA;IACzB,4CAA2B,CAAA;IAC3B,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;AACnB,CAAC,EANW,aAAa,6BAAb,aAAa,QAMxB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enums"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./schemas"), exports);
|
|
20
|
+
__exportStar(require("./subjects"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./nats"), exports);
|
|
18
|
+
__exportStar(require("./rest"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GdprAction, LegalBasis, DataCategory } from '../enums';
|
|
3
|
+
export declare const EntityDefinitionSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
stored: z.ZodBoolean;
|
|
6
|
+
processed: z.ZodBoolean;
|
|
7
|
+
dataCategory: z.ZodNativeEnum<typeof DataCategory>;
|
|
8
|
+
personalDataTypes: z.ZodArray<z.ZodString, "many">;
|
|
9
|
+
legalBasis: z.ZodNativeEnum<typeof LegalBasis>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
stored: boolean;
|
|
13
|
+
processed: boolean;
|
|
14
|
+
dataCategory: DataCategory;
|
|
15
|
+
personalDataTypes: string[];
|
|
16
|
+
legalBasis: LegalBasis;
|
|
17
|
+
}, {
|
|
18
|
+
name: string;
|
|
19
|
+
stored: boolean;
|
|
20
|
+
processed: boolean;
|
|
21
|
+
dataCategory: DataCategory;
|
|
22
|
+
personalDataTypes: string[];
|
|
23
|
+
legalBasis: LegalBasis;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const RegistrationMessageSchema: z.ZodObject<{
|
|
26
|
+
serviceName: z.ZodString;
|
|
27
|
+
sidecarVersion: z.ZodString;
|
|
28
|
+
entities: z.ZodArray<z.ZodObject<{
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
stored: z.ZodBoolean;
|
|
31
|
+
processed: z.ZodBoolean;
|
|
32
|
+
dataCategory: z.ZodNativeEnum<typeof DataCategory>;
|
|
33
|
+
personalDataTypes: z.ZodArray<z.ZodString, "many">;
|
|
34
|
+
legalBasis: z.ZodNativeEnum<typeof LegalBasis>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
name: string;
|
|
37
|
+
stored: boolean;
|
|
38
|
+
processed: boolean;
|
|
39
|
+
dataCategory: DataCategory;
|
|
40
|
+
personalDataTypes: string[];
|
|
41
|
+
legalBasis: LegalBasis;
|
|
42
|
+
}, {
|
|
43
|
+
name: string;
|
|
44
|
+
stored: boolean;
|
|
45
|
+
processed: boolean;
|
|
46
|
+
dataCategory: DataCategory;
|
|
47
|
+
personalDataTypes: string[];
|
|
48
|
+
legalBasis: LegalBasis;
|
|
49
|
+
}>, "many">;
|
|
50
|
+
supportedActions: z.ZodArray<z.ZodNativeEnum<typeof GdprAction>, "many">;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
serviceName: string;
|
|
53
|
+
sidecarVersion: string;
|
|
54
|
+
entities: {
|
|
55
|
+
name: string;
|
|
56
|
+
stored: boolean;
|
|
57
|
+
processed: boolean;
|
|
58
|
+
dataCategory: DataCategory;
|
|
59
|
+
personalDataTypes: string[];
|
|
60
|
+
legalBasis: LegalBasis;
|
|
61
|
+
}[];
|
|
62
|
+
supportedActions: GdprAction[];
|
|
63
|
+
}, {
|
|
64
|
+
serviceName: string;
|
|
65
|
+
sidecarVersion: string;
|
|
66
|
+
entities: {
|
|
67
|
+
name: string;
|
|
68
|
+
stored: boolean;
|
|
69
|
+
processed: boolean;
|
|
70
|
+
dataCategory: DataCategory;
|
|
71
|
+
personalDataTypes: string[];
|
|
72
|
+
legalBasis: LegalBasis;
|
|
73
|
+
}[];
|
|
74
|
+
supportedActions: GdprAction[];
|
|
75
|
+
}>;
|
|
76
|
+
export declare const HeartbeatMessageSchema: z.ZodObject<{
|
|
77
|
+
serviceName: z.ZodString;
|
|
78
|
+
timestamp: z.ZodString;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
serviceName: string;
|
|
81
|
+
timestamp: string;
|
|
82
|
+
}, {
|
|
83
|
+
serviceName: string;
|
|
84
|
+
timestamp: string;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const ActionRequestMessageSchema: z.ZodObject<{
|
|
87
|
+
processId: z.ZodString;
|
|
88
|
+
action: z.ZodNativeEnum<typeof GdprAction>;
|
|
89
|
+
userId: z.ZodString;
|
|
90
|
+
uploadUrl: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
processId: string;
|
|
93
|
+
action: GdprAction;
|
|
94
|
+
userId: string;
|
|
95
|
+
uploadUrl?: string | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
processId: string;
|
|
98
|
+
action: GdprAction;
|
|
99
|
+
userId: string;
|
|
100
|
+
uploadUrl?: string | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const DeletedRecordSchema: z.ZodObject<{
|
|
103
|
+
entity: z.ZodString;
|
|
104
|
+
recordCount: z.ZodNumber;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
entity: string;
|
|
107
|
+
recordCount: number;
|
|
108
|
+
}, {
|
|
109
|
+
entity: string;
|
|
110
|
+
recordCount: number;
|
|
111
|
+
}>;
|
|
112
|
+
export declare const RetainedRecordSchema: z.ZodObject<{
|
|
113
|
+
entity: z.ZodString;
|
|
114
|
+
reason: z.ZodString;
|
|
115
|
+
legalBasis: z.ZodNativeEnum<typeof LegalBasis>;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
legalBasis: LegalBasis;
|
|
118
|
+
entity: string;
|
|
119
|
+
reason: string;
|
|
120
|
+
}, {
|
|
121
|
+
legalBasis: LegalBasis;
|
|
122
|
+
entity: string;
|
|
123
|
+
reason: string;
|
|
124
|
+
}>;
|
|
125
|
+
export declare const ActionResultSchema: z.ZodObject<{
|
|
126
|
+
deleted: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
127
|
+
entity: z.ZodString;
|
|
128
|
+
recordCount: z.ZodNumber;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
entity: string;
|
|
131
|
+
recordCount: number;
|
|
132
|
+
}, {
|
|
133
|
+
entity: string;
|
|
134
|
+
recordCount: number;
|
|
135
|
+
}>, "many">>;
|
|
136
|
+
retained: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
137
|
+
entity: z.ZodString;
|
|
138
|
+
reason: z.ZodString;
|
|
139
|
+
legalBasis: z.ZodNativeEnum<typeof LegalBasis>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
legalBasis: LegalBasis;
|
|
142
|
+
entity: string;
|
|
143
|
+
reason: string;
|
|
144
|
+
}, {
|
|
145
|
+
legalBasis: LegalBasis;
|
|
146
|
+
entity: string;
|
|
147
|
+
reason: string;
|
|
148
|
+
}>, "many">>;
|
|
149
|
+
s3Key: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
deleted?: {
|
|
152
|
+
entity: string;
|
|
153
|
+
recordCount: number;
|
|
154
|
+
}[] | undefined;
|
|
155
|
+
retained?: {
|
|
156
|
+
legalBasis: LegalBasis;
|
|
157
|
+
entity: string;
|
|
158
|
+
reason: string;
|
|
159
|
+
}[] | undefined;
|
|
160
|
+
s3Key?: string | undefined;
|
|
161
|
+
}, {
|
|
162
|
+
deleted?: {
|
|
163
|
+
entity: string;
|
|
164
|
+
recordCount: number;
|
|
165
|
+
}[] | undefined;
|
|
166
|
+
retained?: {
|
|
167
|
+
legalBasis: LegalBasis;
|
|
168
|
+
entity: string;
|
|
169
|
+
reason: string;
|
|
170
|
+
}[] | undefined;
|
|
171
|
+
s3Key?: string | undefined;
|
|
172
|
+
}>;
|
|
173
|
+
export declare const ActionReceiptMessageSchema: z.ZodObject<{
|
|
174
|
+
processId: z.ZodString;
|
|
175
|
+
serviceName: z.ZodString;
|
|
176
|
+
action: z.ZodNativeEnum<typeof GdprAction>;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
serviceName: string;
|
|
179
|
+
processId: string;
|
|
180
|
+
action: GdprAction;
|
|
181
|
+
}, {
|
|
182
|
+
serviceName: string;
|
|
183
|
+
processId: string;
|
|
184
|
+
action: GdprAction;
|
|
185
|
+
}>;
|
|
186
|
+
export declare const ActionCompletionMessageSchema: z.ZodObject<{
|
|
187
|
+
processId: z.ZodString;
|
|
188
|
+
serviceName: z.ZodString;
|
|
189
|
+
action: z.ZodNativeEnum<typeof GdprAction>;
|
|
190
|
+
result: z.ZodObject<{
|
|
191
|
+
deleted: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
192
|
+
entity: z.ZodString;
|
|
193
|
+
recordCount: z.ZodNumber;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
entity: string;
|
|
196
|
+
recordCount: number;
|
|
197
|
+
}, {
|
|
198
|
+
entity: string;
|
|
199
|
+
recordCount: number;
|
|
200
|
+
}>, "many">>;
|
|
201
|
+
retained: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
202
|
+
entity: z.ZodString;
|
|
203
|
+
reason: z.ZodString;
|
|
204
|
+
legalBasis: z.ZodNativeEnum<typeof LegalBasis>;
|
|
205
|
+
}, "strip", z.ZodTypeAny, {
|
|
206
|
+
legalBasis: LegalBasis;
|
|
207
|
+
entity: string;
|
|
208
|
+
reason: string;
|
|
209
|
+
}, {
|
|
210
|
+
legalBasis: LegalBasis;
|
|
211
|
+
entity: string;
|
|
212
|
+
reason: string;
|
|
213
|
+
}>, "many">>;
|
|
214
|
+
s3Key: z.ZodOptional<z.ZodString>;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
deleted?: {
|
|
217
|
+
entity: string;
|
|
218
|
+
recordCount: number;
|
|
219
|
+
}[] | undefined;
|
|
220
|
+
retained?: {
|
|
221
|
+
legalBasis: LegalBasis;
|
|
222
|
+
entity: string;
|
|
223
|
+
reason: string;
|
|
224
|
+
}[] | undefined;
|
|
225
|
+
s3Key?: string | undefined;
|
|
226
|
+
}, {
|
|
227
|
+
deleted?: {
|
|
228
|
+
entity: string;
|
|
229
|
+
recordCount: number;
|
|
230
|
+
}[] | undefined;
|
|
231
|
+
retained?: {
|
|
232
|
+
legalBasis: LegalBasis;
|
|
233
|
+
entity: string;
|
|
234
|
+
reason: string;
|
|
235
|
+
}[] | undefined;
|
|
236
|
+
s3Key?: string | undefined;
|
|
237
|
+
}>;
|
|
238
|
+
}, "strip", z.ZodTypeAny, {
|
|
239
|
+
serviceName: string;
|
|
240
|
+
processId: string;
|
|
241
|
+
action: GdprAction;
|
|
242
|
+
result: {
|
|
243
|
+
deleted?: {
|
|
244
|
+
entity: string;
|
|
245
|
+
recordCount: number;
|
|
246
|
+
}[] | undefined;
|
|
247
|
+
retained?: {
|
|
248
|
+
legalBasis: LegalBasis;
|
|
249
|
+
entity: string;
|
|
250
|
+
reason: string;
|
|
251
|
+
}[] | undefined;
|
|
252
|
+
s3Key?: string | undefined;
|
|
253
|
+
};
|
|
254
|
+
}, {
|
|
255
|
+
serviceName: string;
|
|
256
|
+
processId: string;
|
|
257
|
+
action: GdprAction;
|
|
258
|
+
result: {
|
|
259
|
+
deleted?: {
|
|
260
|
+
entity: string;
|
|
261
|
+
recordCount: number;
|
|
262
|
+
}[] | undefined;
|
|
263
|
+
retained?: {
|
|
264
|
+
legalBasis: LegalBasis;
|
|
265
|
+
entity: string;
|
|
266
|
+
reason: string;
|
|
267
|
+
}[] | undefined;
|
|
268
|
+
s3Key?: string | undefined;
|
|
269
|
+
};
|
|
270
|
+
}>;
|
|
271
|
+
export declare const ActionErrorMessageSchema: z.ZodObject<{
|
|
272
|
+
processId: z.ZodString;
|
|
273
|
+
serviceName: z.ZodString;
|
|
274
|
+
action: z.ZodNativeEnum<typeof GdprAction>;
|
|
275
|
+
error: z.ZodString;
|
|
276
|
+
}, "strip", z.ZodTypeAny, {
|
|
277
|
+
serviceName: string;
|
|
278
|
+
processId: string;
|
|
279
|
+
action: GdprAction;
|
|
280
|
+
error: string;
|
|
281
|
+
}, {
|
|
282
|
+
serviceName: string;
|
|
283
|
+
processId: string;
|
|
284
|
+
action: GdprAction;
|
|
285
|
+
error: string;
|
|
286
|
+
}>;
|
|
287
|
+
//# sourceMappingURL=nats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nats.d.ts","sourceRoot":"","sources":["../../src/schemas/nats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEhE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;EAOjC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKpC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;EAKrC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI7B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;EAIrC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;EAKnC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActionErrorMessageSchema = exports.ActionCompletionMessageSchema = exports.ActionReceiptMessageSchema = exports.ActionResultSchema = exports.RetainedRecordSchema = exports.DeletedRecordSchema = exports.ActionRequestMessageSchema = exports.HeartbeatMessageSchema = exports.RegistrationMessageSchema = exports.EntityDefinitionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
exports.EntityDefinitionSchema = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string().min(1),
|
|
8
|
+
stored: zod_1.z.boolean(),
|
|
9
|
+
processed: zod_1.z.boolean(),
|
|
10
|
+
dataCategory: zod_1.z.nativeEnum(enums_1.DataCategory),
|
|
11
|
+
personalDataTypes: zod_1.z.array(zod_1.z.string().min(1)).min(1),
|
|
12
|
+
legalBasis: zod_1.z.nativeEnum(enums_1.LegalBasis),
|
|
13
|
+
});
|
|
14
|
+
exports.RegistrationMessageSchema = zod_1.z.object({
|
|
15
|
+
serviceName: zod_1.z.string().min(1),
|
|
16
|
+
sidecarVersion: zod_1.z.string().min(1),
|
|
17
|
+
entities: zod_1.z.array(exports.EntityDefinitionSchema).min(1),
|
|
18
|
+
supportedActions: zod_1.z.array(zod_1.z.nativeEnum(enums_1.GdprAction)).min(1),
|
|
19
|
+
});
|
|
20
|
+
exports.HeartbeatMessageSchema = zod_1.z.object({
|
|
21
|
+
serviceName: zod_1.z.string().min(1),
|
|
22
|
+
timestamp: zod_1.z.string().datetime(),
|
|
23
|
+
});
|
|
24
|
+
exports.ActionRequestMessageSchema = zod_1.z.object({
|
|
25
|
+
processId: zod_1.z.string().min(1),
|
|
26
|
+
action: zod_1.z.nativeEnum(enums_1.GdprAction),
|
|
27
|
+
userId: zod_1.z.string().min(1),
|
|
28
|
+
uploadUrl: zod_1.z.string().url().optional(),
|
|
29
|
+
});
|
|
30
|
+
exports.DeletedRecordSchema = zod_1.z.object({
|
|
31
|
+
entity: zod_1.z.string().min(1),
|
|
32
|
+
recordCount: zod_1.z.number().int().nonnegative(),
|
|
33
|
+
});
|
|
34
|
+
exports.RetainedRecordSchema = zod_1.z.object({
|
|
35
|
+
entity: zod_1.z.string().min(1),
|
|
36
|
+
reason: zod_1.z.string().min(1),
|
|
37
|
+
legalBasis: zod_1.z.nativeEnum(enums_1.LegalBasis),
|
|
38
|
+
});
|
|
39
|
+
exports.ActionResultSchema = zod_1.z.object({
|
|
40
|
+
deleted: zod_1.z.array(exports.DeletedRecordSchema).optional(),
|
|
41
|
+
retained: zod_1.z.array(exports.RetainedRecordSchema).optional(),
|
|
42
|
+
s3Key: zod_1.z.string().min(1).optional(),
|
|
43
|
+
});
|
|
44
|
+
exports.ActionReceiptMessageSchema = zod_1.z.object({
|
|
45
|
+
processId: zod_1.z.string().min(1),
|
|
46
|
+
serviceName: zod_1.z.string().min(1),
|
|
47
|
+
action: zod_1.z.nativeEnum(enums_1.GdprAction),
|
|
48
|
+
});
|
|
49
|
+
exports.ActionCompletionMessageSchema = zod_1.z.object({
|
|
50
|
+
processId: zod_1.z.string().min(1),
|
|
51
|
+
serviceName: zod_1.z.string().min(1),
|
|
52
|
+
action: zod_1.z.nativeEnum(enums_1.GdprAction),
|
|
53
|
+
result: exports.ActionResultSchema,
|
|
54
|
+
});
|
|
55
|
+
exports.ActionErrorMessageSchema = zod_1.z.object({
|
|
56
|
+
processId: zod_1.z.string().min(1),
|
|
57
|
+
serviceName: zod_1.z.string().min(1),
|
|
58
|
+
action: zod_1.z.nativeEnum(enums_1.GdprAction),
|
|
59
|
+
error: zod_1.z.string().min(1),
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=nats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nats.js","sourceRoot":"","sources":["../../src/schemas/nats.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oCAAgE;AAEnD,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE;IACtB,YAAY,EAAE,OAAC,CAAC,UAAU,CAAC,oBAAY,CAAC;IACxC,iBAAiB,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpD,UAAU,EAAE,OAAC,CAAC,UAAU,CAAC,kBAAU,CAAC;CACrC,CAAC,CAAC;AAEU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,8BAAsB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChD,gBAAgB,EAAE,OAA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asis, DataCategory } from '../enums';
|
|
3
|
+
export declare const RegisterResponseSchema: z.ZodObject<{
|
|
4
|
+
entities: z.ZodArray<z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
stored: z.ZodBoolean;
|
|
7
|
+
processed: z.ZodBoolean;
|
|
8
|
+
dataCategory: z.ZodNativeEnum<typeof DataCategory>;
|
|
9
|
+
personalDataTypes: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
legalBasis: z.ZodNativeEnum<typeof LegalBasis>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
name: string;
|
|
13
|
+
stored: boolean;
|
|
14
|
+
processed: boolean;
|
|
15
|
+
dataCategory: DataCategory;
|
|
16
|
+
personalDataTypes: string[];
|
|
17
|
+
legalBasis: LegalBasis;
|
|
18
|
+
}, {
|
|
19
|
+
name: string;
|
|
20
|
+
stored: boolean;
|
|
21
|
+
processed: boolean;
|
|
22
|
+
dataCategory: DataCategory;
|
|
23
|
+
personalDataTypes: string[];
|
|
24
|
+
legalBasis: LegalBasis;
|
|
25
|
+
}>, "many">;
|
|
26
|
+
supportedActions: z.ZodArray<z.ZodNativeEnum<typeof GdprAction>, "many">;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
entities: {
|
|
29
|
+
name: string;
|
|
30
|
+
stored: boolean;
|
|
31
|
+
processed: boolean;
|
|
32
|
+
dataCategory: DataCategory;
|
|
33
|
+
personalDataTypes: string[];
|
|
34
|
+
legalBasis: LegalBasis;
|
|
35
|
+
}[];
|
|
36
|
+
supportedActions: GdprAction[];
|
|
37
|
+
}, {
|
|
38
|
+
entities: {
|
|
39
|
+
name: string;
|
|
40
|
+
stored: boolean;
|
|
41
|
+
processed: boolean;
|
|
42
|
+
dataCategory: DataCategory;
|
|
43
|
+
personalDataTypes: string[];
|
|
44
|
+
legalBasis: LegalBasis;
|
|
45
|
+
}[];
|
|
46
|
+
supportedActions: GdprAction[];
|
|
47
|
+
}>;
|
|
48
|
+
export declare const HealthResponseSchema: z.ZodObject<{
|
|
49
|
+
status: z.ZodLiteral<"ok">;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
status: "ok";
|
|
52
|
+
}, {
|
|
53
|
+
status: "ok";
|
|
54
|
+
}>;
|
|
55
|
+
export declare const DataResponseSchema: z.ZodObject<{
|
|
56
|
+
userId: z.ZodString;
|
|
57
|
+
data: z.ZodArray<z.ZodObject<{
|
|
58
|
+
entity: z.ZodString;
|
|
59
|
+
records: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
entity: string;
|
|
62
|
+
records: Record<string, unknown>[];
|
|
63
|
+
}, {
|
|
64
|
+
entity: string;
|
|
65
|
+
records: Record<string, unknown>[];
|
|
66
|
+
}>, "many">;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
userId: string;
|
|
69
|
+
data: {
|
|
70
|
+
entity: string;
|
|
71
|
+
records: Record<string, unknown>[];
|
|
72
|
+
}[];
|
|
73
|
+
}, {
|
|
74
|
+
userId: string;
|
|
75
|
+
data: {
|
|
76
|
+
entity: string;
|
|
77
|
+
records: Record<string, unknown>[];
|
|
78
|
+
}[];
|
|
79
|
+
}>;
|
|
80
|
+
export declare const DeleteResponseSchema: z.ZodObject<{
|
|
81
|
+
userId: z.ZodString;
|
|
82
|
+
deleted: z.ZodArray<z.ZodObject<{
|
|
83
|
+
entity: z.ZodString;
|
|
84
|
+
recordCount: z.ZodNumber;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
entity: string;
|
|
87
|
+
recordCount: number;
|
|
88
|
+
}, {
|
|
89
|
+
entity: string;
|
|
90
|
+
recordCount: number;
|
|
91
|
+
}>, "many">;
|
|
92
|
+
retained: z.ZodArray<z.ZodObject<{
|
|
93
|
+
entity: z.ZodString;
|
|
94
|
+
reason: z.ZodString;
|
|
95
|
+
legalBasis: z.ZodNativeEnum<typeof LegalBasis>;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
legalBasis: LegalBasis;
|
|
98
|
+
entity: string;
|
|
99
|
+
reason: string;
|
|
100
|
+
}, {
|
|
101
|
+
legalBasis: LegalBasis;
|
|
102
|
+
entity: string;
|
|
103
|
+
reason: string;
|
|
104
|
+
}>, "many">;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
userId: string;
|
|
107
|
+
deleted: {
|
|
108
|
+
entity: string;
|
|
109
|
+
recordCount: number;
|
|
110
|
+
}[];
|
|
111
|
+
retained: {
|
|
112
|
+
legalBasis: LegalBasis;
|
|
113
|
+
entity: string;
|
|
114
|
+
reason: string;
|
|
115
|
+
}[];
|
|
116
|
+
}, {
|
|
117
|
+
userId: string;
|
|
118
|
+
deleted: {
|
|
119
|
+
entity: string;
|
|
120
|
+
recordCount: number;
|
|
121
|
+
}[];
|
|
122
|
+
retained: {
|
|
123
|
+
legalBasis: LegalBasis;
|
|
124
|
+
entity: string;
|
|
125
|
+
reason: string;
|
|
126
|
+
}[];
|
|
127
|
+
}>;
|
|
128
|
+
export declare const ExportResponseSchema: z.ZodObject<{
|
|
129
|
+
userId: z.ZodString;
|
|
130
|
+
data: z.ZodArray<z.ZodObject<{
|
|
131
|
+
entity: z.ZodString;
|
|
132
|
+
records: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
entity: string;
|
|
135
|
+
records: Record<string, unknown>[];
|
|
136
|
+
}, {
|
|
137
|
+
entity: string;
|
|
138
|
+
records: Record<string, unknown>[];
|
|
139
|
+
}>, "many">;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
userId: string;
|
|
142
|
+
data: {
|
|
143
|
+
entity: string;
|
|
144
|
+
records: Record<string, unknown>[];
|
|
145
|
+
}[];
|
|
146
|
+
}, {
|
|
147
|
+
userId: string;
|
|
148
|
+
data: {
|
|
149
|
+
entity: string;
|
|
150
|
+
records: Record<string, unknown>[];
|
|
151
|
+
}[];
|
|
152
|
+
}>;
|
|
153
|
+
//# sourceMappingURL=rest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rest.d.ts","sourceRoot":"","sources":["../../src/schemas/rest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEhE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcjC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;EAQ/B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportResponseSchema = exports.DeleteResponseSchema = exports.DataResponseSchema = exports.HealthResponseSchema = exports.RegisterResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
exports.RegisterResponseSchema = zod_1.z.object({
|
|
7
|
+
entities: zod_1.z
|
|
8
|
+
.array(zod_1.z.object({
|
|
9
|
+
name: zod_1.z.string().min(1),
|
|
10
|
+
stored: zod_1.z.boolean(),
|
|
11
|
+
processed: zod_1.z.boolean(),
|
|
12
|
+
dataCategory: zod_1.z.nativeEnum(enums_1.DataCategory),
|
|
13
|
+
personalDataTypes: zod_1.z.array(zod_1.z.string().min(1)).min(1),
|
|
14
|
+
legalBasis: zod_1.z.nativeEnum(enums_1.LegalBasis),
|
|
15
|
+
}))
|
|
16
|
+
.min(1),
|
|
17
|
+
supportedActions: zod_1.z.array(zod_1.z.nativeEnum(enums_1.GdprAction)).min(1),
|
|
18
|
+
});
|
|
19
|
+
exports.HealthResponseSchema = zod_1.z.object({
|
|
20
|
+
status: zod_1.z.literal('ok'),
|
|
21
|
+
});
|
|
22
|
+
exports.DataResponseSchema = zod_1.z.object({
|
|
23
|
+
userId: zod_1.z.string().min(1),
|
|
24
|
+
data: zod_1.z.array(zod_1.z.object({
|
|
25
|
+
entity: zod_1.z.string().min(1),
|
|
26
|
+
records: zod_1.z.array(zod_1.z.record(zod_1.z.unknown())),
|
|
27
|
+
})),
|
|
28
|
+
});
|
|
29
|
+
exports.DeleteResponseSchema = zod_1.z.object({
|
|
30
|
+
userId: zod_1.z.string().min(1),
|
|
31
|
+
deleted: zod_1.z.array(zod_1.z.object({
|
|
32
|
+
entity: zod_1.z.string().min(1),
|
|
33
|
+
recordCount: zod_1.z.number().int().nonnegative(),
|
|
34
|
+
})),
|
|
35
|
+
retained: zod_1.z.array(zod_1.z.object({
|
|
36
|
+
entity: zod_1.z.string().min(1),
|
|
37
|
+
reason: zod_1.z.string().min(1),
|
|
38
|
+
legalBasis: zod_1.z.nativeEnum(enums_1.LegalBasis),
|
|
39
|
+
})),
|
|
40
|
+
});
|
|
41
|
+
exports.ExportResponseSchema = zod_1.z.object({
|
|
42
|
+
userId: zod_1.z.string().min(1),
|
|
43
|
+
data: zod_1.z.array(zod_1.z.object({
|
|
44
|
+
entity: zod_1.z.string().min(1),
|
|
45
|
+
records: zod_1.z.array(zod_1.z.record(zod_1.z.unknown())),
|
|
46
|
+
})),
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=rest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rest.js","sourceRoot":"","sources":["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
|
|
4
|
+
readonly REQUEST_REGISTRATION: "gdpr.request-registration";
|
|
5
|
+
readonly action: (serviceName: string) => string;
|
|
6
|
+
readonly processAck: (processId: string) => string;
|
|
7
|
+
readonly processError: (processId: string) => string;
|
|
8
|
+
readonly ACTION_WILDCARD: "gdpr.action.*";
|
|
9
|
+
readonly PROCESS_ACK_WILDCARD: "gdpr.process.*.ack";
|
|
10
|
+
readonly PROCESS_ERROR_WILDCARD: "gdpr.process.*.error";
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/subjects/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;mCAKD,MAAM;qCACJ,MAAM;uCACJ,MAAM;;;;CAMxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NatsSubjects = void 0;
|
|
4
|
+
exports.NatsSubjects = {
|
|
5
|
+
REGISTER: 'gdpr.register',
|
|
6
|
+
HEARTBEAT: 'gdpr.heartbeat',
|
|
7
|
+
REQUEST_REGISTRATION: 'gdpr.request-registration',
|
|
8
|
+
action: (serviceName) => `gdpr.action.${serviceName}`,
|
|
9
|
+
processAck: (processId) => `gdpr.process.${processId}.ack`,
|
|
10
|
+
processError: (processId) => `gdpr.process.${processId}.error`,
|
|
11
|
+
// Wildcard patterns for subscribers
|
|
12
|
+
ACTION_WILDCARD: 'gdpr.action.*',
|
|
13
|
+
PROCESS_ACK_WILDCARD: 'gdpr.process.*.ack',
|
|
14
|
+
PROCESS_ERROR_WILDCARD: 'gdpr.process.*.error',
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/subjects/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,gBAAgB;IAC3B,oBAAoB,EAAE,2BAA2B;IAEjD,MAAM,EAAE,CAAC,WAAmB,EAAE,EAAE,CAAC,eAAe,WAAW,EAAE;IAC7D,UAAU,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,gBAAgB,SAAS,MAAM;IAClE,YAAY,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,gBAAgB,SAAS,QAAQ;IAEtE,oCAAoC;IACpC,eAAe,EAAE,eAAe;IAChC,oBAAoB,EAAE,oBAAoB;IAC1C,sBAAsB,EAAE,sBAAsB;CACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./nats"), exports);
|
|
18
|
+
__exportStar(require("./rest"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { GdprAction, LegalBasis, DataCategory } from '../enums';
|
|
2
|
+
export interface EntityDefinition {
|
|
3
|
+
name: string;
|
|
4
|
+
stored: boolean;
|
|
5
|
+
processed: boolean;
|
|
6
|
+
dataCategory: DataCategory;
|
|
7
|
+
personalDataTypes: string[];
|
|
8
|
+
legalBasis: LegalBasis;
|
|
9
|
+
}
|
|
10
|
+
export interface RegistrationMessage {
|
|
11
|
+
serviceName: string;
|
|
12
|
+
sidecarVersion: string;
|
|
13
|
+
entities: EntityDefinition[];
|
|
14
|
+
supportedActions: GdprAction[];
|
|
15
|
+
}
|
|
16
|
+
export interface HeartbeatMessage {
|
|
17
|
+
serviceName: string;
|
|
18
|
+
timestamp: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ActionRequestMessage {
|
|
21
|
+
processId: string;
|
|
22
|
+
action: GdprAction;
|
|
23
|
+
userId: string;
|
|
24
|
+
uploadUrl?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ActionReceiptMessage {
|
|
27
|
+
processId: string;
|
|
28
|
+
serviceName: string;
|
|
29
|
+
action: GdprAction;
|
|
30
|
+
}
|
|
31
|
+
export interface ActionCompletionMessage {
|
|
32
|
+
processId: string;
|
|
33
|
+
serviceName: string;
|
|
34
|
+
action: GdprAction;
|
|
35
|
+
result: ActionResult;
|
|
36
|
+
}
|
|
37
|
+
export interface ActionResult {
|
|
38
|
+
deleted?: DeletedRecord[];
|
|
39
|
+
retained?: RetainedRecord[];
|
|
40
|
+
s3Key?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface DeletedRecord {
|
|
43
|
+
entity: string;
|
|
44
|
+
recordCount: number;
|
|
45
|
+
}
|
|
46
|
+
export interface RetainedRecord {
|
|
47
|
+
entity: string;
|
|
48
|
+
reason: string;
|
|
49
|
+
legalBasis: LegalBasis;
|
|
50
|
+
}
|
|
51
|
+
export interface ActionErrorMessage {
|
|
52
|
+
processId: string;
|
|
53
|
+
serviceName: string;
|
|
54
|
+
action: GdprAction;
|
|
55
|
+
error: string;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=nats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nats.d.ts","sourceRoot":"","sources":["../../src/types/nats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEhE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,gBAAgB,EAAE,UAAU,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nats.js","sourceRoot":"","sources":["../../src/types/nats.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { GdprAction, LegalBasis, DataCategory } from '../enums';
|
|
2
|
+
export interface RegisterResponse {
|
|
3
|
+
entities: {
|
|
4
|
+
name: string;
|
|
5
|
+
stored: boolean;
|
|
6
|
+
processed: boolean;
|
|
7
|
+
dataCategory: DataCategory;
|
|
8
|
+
personalDataTypes: string[];
|
|
9
|
+
legalBasis: LegalBasis;
|
|
10
|
+
}[];
|
|
11
|
+
supportedActions: GdprAction[];
|
|
12
|
+
}
|
|
13
|
+
export interface HealthResponse {
|
|
14
|
+
status: 'ok';
|
|
15
|
+
}
|
|
16
|
+
export interface DataResponse {
|
|
17
|
+
userId: string;
|
|
18
|
+
data: {
|
|
19
|
+
entity: string;
|
|
20
|
+
records: Record<string, unknown>[];
|
|
21
|
+
}[];
|
|
22
|
+
}
|
|
23
|
+
export interface DeleteResponse {
|
|
24
|
+
userId: string;
|
|
25
|
+
deleted: {
|
|
26
|
+
entity: string;
|
|
27
|
+
recordCount: number;
|
|
28
|
+
}[];
|
|
29
|
+
retained: {
|
|
30
|
+
entity: string;
|
|
31
|
+
reason: string;
|
|
32
|
+
legalBasis: LegalBasis;
|
|
33
|
+
}[];
|
|
34
|
+
}
|
|
35
|
+
export interface ExportResponse {
|
|
36
|
+
userId: string;
|
|
37
|
+
data: {
|
|
38
|
+
entity: string;
|
|
39
|
+
records: Record<string, unknown>[];
|
|
40
|
+
}[];
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=rest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rest.d.ts","sourceRoot":"","sources":["../../src/types/rest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGhE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,OAAO,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,YAAY,EAAE,YAAY,CAAC;QAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;QAC5B,UAAU,EAAE,UAAU,CAAC;KACxB,EAAE,CAAC;IACJ,gBAAgB,EAAE,UAAU,EAAE,CAAC;CAChC;AAGD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,IAAI,CAAC;CACd;AAGD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;KACpC,EAAE,CAAC;CACL;AAGD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;IACJ,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,UAAU,CAAC;KACxB,EAAE,CAAC;CACL;AAGD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;KACpC,EAAE,CAAC;CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rest.js","sourceRoot":"","sources":["../../src/types/rest.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gdpr-contracts",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared contracts for the GDPR Sidecar system. Includes TypeScript types, Zod validation schemas, shared enums, and NATS subject definitions for communication between the GDPR Service and GDPR Sidecar.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsc --watch",
|
|
13
|
+
"clean": "rm -rf dist",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"gdpr",
|
|
18
|
+
"contracts",
|
|
19
|
+
"typescript",
|
|
20
|
+
"zod",
|
|
21
|
+
"nats",
|
|
22
|
+
"schemas"
|
|
23
|
+
],
|
|
24
|
+
"author": "Yanik Peiffer",
|
|
25
|
+
"license": "ISC",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/yanikpei/gdpr-contracts.git"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/yanikpei/gdpr-contracts/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/yanikpei/gdpr-contracts#readme",
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18.0.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"typescript": "^5.3.3"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"zod": "^3.22.4"
|
|
42
|
+
}
|
|
43
|
+
}
|