@lilaquadrat/interfaces 1.13.0 → 1.14.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.14.1](https://github.com/lilaquadrat/interfaces/compare/v1.14.0...v1.14.1) (2024-12-28)
6
+
7
+ ## [1.14.0](https://github.com/lilaquadrat/interfaces/compare/v1.13.0...v1.14.0) (2024-12-17)
8
+
9
+
10
+ ### Features
11
+
12
+ * **design customs & list:** design Custom Modules, Design Event, extended Lists ([1d079fe](https://github.com/lilaquadrat/interfaces/commit/1d079fec690f7c0fdede51c2b290968c1ecc77ae))
13
+
5
14
  ## [1.13.0](https://github.com/lilaquadrat/interfaces/compare/v1.12.0...v1.13.0) (2024-10-15)
6
15
 
7
16
 
@@ -0,0 +1,10 @@
1
+ export interface DesignCustomModule {
2
+ hint: string;
3
+ module: string;
4
+ name?: string;
5
+ description?: string;
6
+ additionalData?: {
7
+ name?: string;
8
+ description?: string;
9
+ };
10
+ }
@@ -0,0 +1,5 @@
1
+ export interface DesignEvent {
2
+ name: string;
3
+ description?: string;
4
+ additionalData?: string;
5
+ }
package/lib/cjs/List.d.ts CHANGED
@@ -9,10 +9,10 @@ export interface List {
9
9
  project: string;
10
10
  name: string;
11
11
  description?: string;
12
- mode: 'contact' | 'content' | 'reservation';
12
+ mode: 'contact' | 'content' | 'reservation' | 'shopping';
13
13
  start?: Date;
14
14
  end?: Date;
15
- payment: 'optional' | 'required' | 'free';
15
+ payment?: 'optional' | 'required' | 'free';
16
16
  participants?: {
17
17
  max?: number;
18
18
  confirmed?: number;
@@ -20,10 +20,11 @@ export interface List {
20
20
  available?: number;
21
21
  unique?: boolean;
22
22
  addressRequired?: boolean;
23
+ totalPaid?: number;
23
24
  };
24
25
  state: 'open' | 'closed' | 'waiting';
25
26
  agreements: Agreement[];
26
- categories: ListCategory[];
27
- content: ListContent;
27
+ categories?: ListCategory[];
28
+ content?: ListContent;
28
29
  emails: EmailsContent;
29
30
  }
@@ -4,4 +4,5 @@ export interface ListContent {
4
4
  waiting: string;
5
5
  active: string;
6
6
  post: string;
7
+ paid: string;
7
8
  }
@@ -0,0 +1,7 @@
1
+ export interface ListItem {
2
+ id: string;
3
+ name: string;
4
+ price?: number;
5
+ currency?: string;
6
+ quantity: number;
7
+ }
@@ -1,5 +1,6 @@
1
1
  import { ObjectId } from "mongodb";
2
2
  import { AgreementResponse } from "./AgreementResponse";
3
+ import { ListItem } from "./ListItem";
3
4
  export interface ListParticipants {
4
5
  _id?: ObjectId;
5
6
  list: ObjectId;
@@ -16,6 +17,48 @@ export interface ListParticipants {
16
17
  note?: string;
17
18
  category?: string;
18
19
  explanation?: string;
19
- state: 'unchecked' | 'notuseful' | 'confirmed' | 'enlisted' | 'reserved' | 'waiting' | 'blocked' | 'finalized';
20
+ /**
21
+ ```enlisted```
22
+
23
+ customer has joined the list, but the owner did not confirm it
24
+
25
+ ```confirmed```
26
+
27
+ customer has joined the list and the owner did confirm it or the list does not required confirmation
28
+
29
+ ```reserved```
30
+
31
+ It implies that the customer has successfully secured a place on the list and is awaiting further instructions or actions.
32
+
33
+ ```waiting```
34
+
35
+ customer has joined the list and waits on action from the owner
36
+
37
+ ```blocked```
38
+
39
+ customer is not part of the list and cant join it
40
+
41
+ ```finalized```
42
+
43
+ the list entry has fulfilled his purpose and no further action is required
44
+
45
+ ```notuseful```
46
+
47
+ spam check has failed
48
+
49
+ ```unchecked```
50
+
51
+ spam check not concluded
52
+
53
+ ```paid```
54
+
55
+ payment webhook confirmed
56
+ */
57
+ state: 'unchecked' | 'paid' | 'notuseful' | 'confirmed' | 'enlisted' | 'reserved' | 'waiting' | 'blocked' | 'finalized';
20
58
  agreements: AgreementResponse[];
59
+ items?: ListItem[];
60
+ /**
61
+ * if the participants came from a payment webhook paid will have the amount of the whole payment
62
+ */
63
+ paid?: number;
21
64
  }
@@ -45,6 +45,8 @@ export * from './DataObject';
45
45
  export * from './DatabaseQuery';
46
46
  export * from './DatabaseQueryOptions';
47
47
  export * from './DatabaseQuerySites';
48
+ export * from './DesignCustomModule';
49
+ export * from './DesignEvent';
48
50
  export * from './DesignModule';
49
51
  export * from './Domain';
50
52
  export * from './DomainConf';
@@ -72,6 +74,7 @@ export * from './List';
72
74
  export * from './ListCategory';
73
75
  export * from './ListContent';
74
76
  export * from './ListCustomQueries';
77
+ export * from './ListItem';
75
78
  export * from './ListOfModels';
76
79
  export * from './ListParticipantWithUser';
77
80
  export * from './ListParticipants';
@@ -0,0 +1,10 @@
1
+ export interface DesignCustomModule {
2
+ hint: string;
3
+ module: string;
4
+ name?: string;
5
+ description?: string;
6
+ additionalData?: {
7
+ name?: string;
8
+ description?: string;
9
+ };
10
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DesignCustomModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DesignCustomModule.js","sourceRoot":"","sources":["../../src/DesignCustomModule.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface DesignEvent {
2
+ name: string;
3
+ description?: string;
4
+ additionalData?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DesignEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DesignEvent.js","sourceRoot":"","sources":["../../src/DesignEvent.ts"],"names":[],"mappings":""}
package/lib/esm/List.d.ts CHANGED
@@ -9,10 +9,10 @@ export interface List {
9
9
  project: string;
10
10
  name: string;
11
11
  description?: string;
12
- mode: 'contact' | 'content' | 'reservation';
12
+ mode: 'contact' | 'content' | 'reservation' | 'shopping';
13
13
  start?: Date;
14
14
  end?: Date;
15
- payment: 'optional' | 'required' | 'free';
15
+ payment?: 'optional' | 'required' | 'free';
16
16
  participants?: {
17
17
  max?: number;
18
18
  confirmed?: number;
@@ -20,10 +20,11 @@ export interface List {
20
20
  available?: number;
21
21
  unique?: boolean;
22
22
  addressRequired?: boolean;
23
+ totalPaid?: number;
23
24
  };
24
25
  state: 'open' | 'closed' | 'waiting';
25
26
  agreements: Agreement[];
26
- categories: ListCategory[];
27
- content: ListContent;
27
+ categories?: ListCategory[];
28
+ content?: ListContent;
28
29
  emails: EmailsContent;
29
30
  }
@@ -4,4 +4,5 @@ export interface ListContent {
4
4
  waiting: string;
5
5
  active: string;
6
6
  post: string;
7
+ paid: string;
7
8
  }
@@ -0,0 +1,7 @@
1
+ export interface ListItem {
2
+ id: string;
3
+ name: string;
4
+ price?: number;
5
+ currency?: string;
6
+ quantity: number;
7
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ListItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../src/ListItem.ts"],"names":[],"mappings":""}
@@ -1,5 +1,6 @@
1
1
  import { ObjectId } from "mongodb";
2
2
  import { AgreementResponse } from "./AgreementResponse";
3
+ import { ListItem } from "./ListItem";
3
4
  export interface ListParticipants {
4
5
  _id?: ObjectId;
5
6
  list: ObjectId;
@@ -16,6 +17,48 @@ export interface ListParticipants {
16
17
  note?: string;
17
18
  category?: string;
18
19
  explanation?: string;
19
- state: 'unchecked' | 'notuseful' | 'confirmed' | 'enlisted' | 'reserved' | 'waiting' | 'blocked' | 'finalized';
20
+ /**
21
+ ```enlisted```
22
+
23
+ customer has joined the list, but the owner did not confirm it
24
+
25
+ ```confirmed```
26
+
27
+ customer has joined the list and the owner did confirm it or the list does not required confirmation
28
+
29
+ ```reserved```
30
+
31
+ It implies that the customer has successfully secured a place on the list and is awaiting further instructions or actions.
32
+
33
+ ```waiting```
34
+
35
+ customer has joined the list and waits on action from the owner
36
+
37
+ ```blocked```
38
+
39
+ customer is not part of the list and cant join it
40
+
41
+ ```finalized```
42
+
43
+ the list entry has fulfilled his purpose and no further action is required
44
+
45
+ ```notuseful```
46
+
47
+ spam check has failed
48
+
49
+ ```unchecked```
50
+
51
+ spam check not concluded
52
+
53
+ ```paid```
54
+
55
+ payment webhook confirmed
56
+ */
57
+ state: 'unchecked' | 'paid' | 'notuseful' | 'confirmed' | 'enlisted' | 'reserved' | 'waiting' | 'blocked' | 'finalized';
20
58
  agreements: AgreementResponse[];
59
+ items?: ListItem[];
60
+ /**
61
+ * if the participants came from a payment webhook paid will have the amount of the whole payment
62
+ */
63
+ paid?: number;
21
64
  }
@@ -45,6 +45,8 @@ export * from './DataObject';
45
45
  export * from './DatabaseQuery';
46
46
  export * from './DatabaseQueryOptions';
47
47
  export * from './DatabaseQuerySites';
48
+ export * from './DesignCustomModule';
49
+ export * from './DesignEvent';
48
50
  export * from './DesignModule';
49
51
  export * from './Domain';
50
52
  export * from './DomainConf';
@@ -72,6 +74,7 @@ export * from './List';
72
74
  export * from './ListCategory';
73
75
  export * from './ListContent';
74
76
  export * from './ListCustomQueries';
77
+ export * from './ListItem';
75
78
  export * from './ListOfModels';
76
79
  export * from './ListParticipantWithUser';
77
80
  export * from './ListParticipants';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/interfaces",
3
- "version": "1.13.0",
3
+ "version": "1.14.1",
4
4
  "description": "interfaces in context of lilaquadrat STUDIO",
5
5
  "author": {
6
6
  "email": "m.schuebel@lila2.de",
@@ -31,7 +31,7 @@
31
31
  "@types/node": "^20.11.9",
32
32
  "ajv": "^8.12.0",
33
33
  "cz-conventional-changelog": "^3.3.0",
34
- "mongodb": "^5.7.0",
34
+ "mongodb": "^5.9.2",
35
35
  "standard-version": "^9.5.0"
36
36
  },
37
37
  "config": {
@@ -0,0 +1,12 @@
1
+ export interface DesignCustomModule {
2
+
3
+ hint: string
4
+ module: string
5
+ name?: string
6
+ description?: string
7
+ additionalData?: {
8
+ name?: string
9
+ description?: string
10
+ }
11
+
12
+ }
@@ -0,0 +1,7 @@
1
+ export interface DesignEvent {
2
+
3
+ name: string
4
+ description?: string
5
+ additionalData?: string
6
+
7
+ }
package/src/List.ts CHANGED
@@ -12,12 +12,12 @@ export interface List {
12
12
 
13
13
  name: string
14
14
  description?: string
15
- mode: 'contact' | 'content' | 'reservation'
15
+ mode: 'contact' | 'content' | 'reservation' | 'shopping'
16
16
 
17
17
  start?: Date
18
18
  end?: Date
19
19
 
20
- payment: 'optional' | 'required' | 'free'
20
+ payment?: 'optional' | 'required' | 'free'
21
21
 
22
22
  participants?: {
23
23
  max?: number
@@ -26,15 +26,16 @@ export interface List {
26
26
  available?: number
27
27
  unique?: boolean
28
28
  addressRequired?: boolean
29
+ totalPaid?: number
29
30
  }
30
31
 
31
32
  state: 'open' | 'closed' | 'waiting'
32
33
 
33
34
  agreements: Agreement[]
34
35
 
35
- categories: ListCategory[]
36
+ categories?: ListCategory[]
36
37
 
37
- content: ListContent
38
+ content?: ListContent
38
39
 
39
40
  emails: EmailsContent
40
41
  }
@@ -14,4 +14,7 @@ export interface ListContent {
14
14
 
15
15
  // the usage/event is fulfilled
16
16
  post: string
17
+
18
+ // the uses has paid via paymeny provider
19
+ paid: string
17
20
  }
@@ -0,0 +1,9 @@
1
+ export interface ListItem {
2
+
3
+ id: string
4
+ name: string
5
+ price?: number
6
+ currency?: string
7
+ quantity: number
8
+
9
+ }
@@ -1,5 +1,6 @@
1
1
  import { ObjectId } from "mongodb"
2
2
  import {AgreementResponse} from "./AgreementResponse"
3
+ import { ListItem } from "./ListItem"
3
4
 
4
5
  export interface ListParticipants {
5
6
  _id?: ObjectId
@@ -24,15 +25,49 @@ export interface ListParticipants {
24
25
 
25
26
  explanation?: string
26
27
 
27
- /*
28
- enlisted = customer has joined the list, but the owner did not confirm it
29
- confirmed = customer has joined the list and the owner did confirm it or the list does not required confirmation
30
- reserved = It implies that the customer has successfully secured a place on the list and is awaiting further instructions or actions.
31
- waiting = customer has joined the list and waits on action from the owner
32
- blocked = customer is not part of the list and cant join it
33
- finalized = the list entry has fulfilled his purpose and no further action is required
28
+ /**
29
+ ```enlisted```
30
+
31
+ customer has joined the list, but the owner did not confirm it
32
+
33
+ ```confirmed```
34
+
35
+ customer has joined the list and the owner did confirm it or the list does not required confirmation
36
+
37
+ ```reserved```
38
+
39
+ It implies that the customer has successfully secured a place on the list and is awaiting further instructions or actions.
40
+
41
+ ```waiting```
42
+
43
+ customer has joined the list and waits on action from the owner
44
+
45
+ ```blocked```
46
+
47
+ customer is not part of the list and cant join it
48
+
49
+ ```finalized```
50
+
51
+ the list entry has fulfilled his purpose and no further action is required
52
+
53
+ ```notuseful```
54
+
55
+ spam check has failed
56
+
57
+ ```unchecked```
58
+
59
+ spam check not concluded
60
+
61
+ ```paid```
62
+
63
+ payment webhook confirmed
34
64
  */
35
- state: 'unchecked' | 'notuseful' | 'confirmed' | 'enlisted' | 'reserved' | 'waiting' | 'blocked' | 'finalized'
65
+ state: 'unchecked' | 'paid' | 'notuseful' | 'confirmed' | 'enlisted' | 'reserved' | 'waiting' | 'blocked' | 'finalized'
36
66
  agreements: AgreementResponse[]
67
+ items?: ListItem[]
68
+ /**
69
+ * if the participants came from a payment webhook paid will have the amount of the whole payment
70
+ */
71
+ paid?: number
37
72
 
38
73
  }