@eventcatalog/sdk 0.0.3 → 0.0.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.
@@ -1,20 +1,61 @@
1
- type Badge = {
2
- content: string;
3
- backgroundColor: string;
4
- textColor: string;
5
- };
6
-
7
- type Event = {
1
+ // Base type for all resources (domains, services and messages)
2
+ interface BaseSchema {
8
3
  id: string;
9
4
  name: string;
5
+ summary?: string;
10
6
  version: string;
11
- summary: string;
12
- owners?: string[];
13
7
  badges?: Badge[];
14
- // Path to the schema file.
8
+ owners?: string[];
15
9
  schemaPath?: string;
16
- // Markdown content of the event
17
10
  markdown: string;
11
+ }
12
+
13
+ type ResourcePointer = {
14
+ id: string;
15
+ version: string;
18
16
  };
19
17
 
20
- export type { Badge, Event };
18
+ type Message = Event | Command;
19
+
20
+ interface Event extends BaseSchema {}
21
+ interface Command extends BaseSchema {}
22
+
23
+ interface Service extends BaseSchema {
24
+ sends?: ResourcePointer[];
25
+ receives?: ResourcePointer[];
26
+ }
27
+
28
+ interface Team {
29
+ id: string;
30
+ name: string;
31
+ summary?: string;
32
+ email?: string;
33
+ hidden?: boolean;
34
+ slackDirectMessageUrl?: string;
35
+ members?: User[];
36
+ ownedCommands?: Command[];
37
+ ownedServices?: Service[];
38
+ ownedEvents?: Event[];
39
+ }
40
+
41
+ interface User {
42
+ id: string;
43
+ name: string;
44
+ avatarUrl: string;
45
+ role?: string;
46
+ hidden?: boolean;
47
+ email?: string;
48
+ slackDirectMessageUrl?: string;
49
+ ownedServices?: Service[];
50
+ ownedEvents?: Event[];
51
+ ownedCommands?: Command[];
52
+ associatedTeams?: Team[];
53
+ }
54
+
55
+ interface Badge {
56
+ content: string;
57
+ backgroundColor: string;
58
+ textColor: string;
59
+ }
60
+
61
+ export type { Badge, BaseSchema, Command, Event, Message, ResourcePointer, Service, Team, User };
package/dist/types.d.d.ts CHANGED
@@ -1,20 +1,61 @@
1
- type Badge = {
2
- content: string;
3
- backgroundColor: string;
4
- textColor: string;
5
- };
6
-
7
- type Event = {
1
+ // Base type for all resources (domains, services and messages)
2
+ interface BaseSchema {
8
3
  id: string;
9
4
  name: string;
5
+ summary?: string;
10
6
  version: string;
11
- summary: string;
12
- owners?: string[];
13
7
  badges?: Badge[];
14
- // Path to the schema file.
8
+ owners?: string[];
15
9
  schemaPath?: string;
16
- // Markdown content of the event
17
10
  markdown: string;
11
+ }
12
+
13
+ type ResourcePointer = {
14
+ id: string;
15
+ version: string;
18
16
  };
19
17
 
20
- export type { Badge, Event };
18
+ type Message = Event | Command;
19
+
20
+ interface Event extends BaseSchema {}
21
+ interface Command extends BaseSchema {}
22
+
23
+ interface Service extends BaseSchema {
24
+ sends?: ResourcePointer[];
25
+ receives?: ResourcePointer[];
26
+ }
27
+
28
+ interface Team {
29
+ id: string;
30
+ name: string;
31
+ summary?: string;
32
+ email?: string;
33
+ hidden?: boolean;
34
+ slackDirectMessageUrl?: string;
35
+ members?: User[];
36
+ ownedCommands?: Command[];
37
+ ownedServices?: Service[];
38
+ ownedEvents?: Event[];
39
+ }
40
+
41
+ interface User {
42
+ id: string;
43
+ name: string;
44
+ avatarUrl: string;
45
+ role?: string;
46
+ hidden?: boolean;
47
+ email?: string;
48
+ slackDirectMessageUrl?: string;
49
+ ownedServices?: Service[];
50
+ ownedEvents?: Event[];
51
+ ownedCommands?: Command[];
52
+ associatedTeams?: Team[];
53
+ }
54
+
55
+ interface Badge {
56
+ content: string;
57
+ backgroundColor: string;
58
+ textColor: string;
59
+ }
60
+
61
+ export type { Badge, BaseSchema, Command, Event, Message, ResourcePointer, Service, Team, User };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.d.ts"],"sourcesContent":["export type Badge = {\n content: string;\n backgroundColor: string;\n textColor: string;\n};\n\nexport type Event = {\n id: string;\n name: string;\n version: string;\n summary: string;\n owners?: string[];\n badges?: Badge[];\n // Path to the schema file.\n schemaPath?: string;\n // Markdown content of the event\n markdown: string;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/types.d.ts"],"sourcesContent":["// Base type for all resources (domains, services and messages)\nexport interface BaseSchema {\n id: string;\n name: string;\n summary?: string;\n version: string;\n badges?: Badge[];\n owners?: string[];\n schemaPath?: string;\n markdown: string;\n}\n\nexport type ResourcePointer = {\n id: string;\n version: string;\n};\n\nexport type Message = Event | Command;\n\nexport interface Event extends BaseSchema {}\nexport interface Command extends BaseSchema {}\n\nexport interface Service extends BaseSchema {\n sends?: ResourcePointer[];\n receives?: ResourcePointer[];\n}\n\nexport interface Team {\n id: string;\n name: string;\n summary?: string;\n email?: string;\n hidden?: boolean;\n slackDirectMessageUrl?: string;\n members?: User[];\n ownedCommands?: Command[];\n ownedServices?: Service[];\n ownedEvents?: Event[];\n}\n\nexport interface User {\n id: string;\n name: string;\n avatarUrl: string;\n role?: string;\n hidden?: boolean;\n email?: string;\n slackDirectMessageUrl?: string;\n ownedServices?: Service[];\n ownedEvents?: Event[];\n ownedCommands?: Command[];\n associatedTeams?: Team[];\n}\n\nexport interface Badge {\n content: string;\n backgroundColor: string;\n textColor: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventcatalog/sdk",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "SDK to integrate with EventCatalog",
5
5
  "publishConfig": {
6
6
  "access": "public"