@lilaquadrat/interfaces 1.21.0 → 1.22.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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
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.22.0](https://github.com/lilaquadrat/interfaces/compare/v1.21.1...v1.22.0) (2025-03-27)
6
+
7
+
8
+ ### Features
9
+
10
+ * **listsparticipants & customers:** extended for structures ([c222a3f](https://github.com/lilaquadrat/interfaces/commit/c222a3f5ece6e49b054b0c8063821a486dbb55d2))
11
+
12
+ ### [1.21.1](https://github.com/lilaquadrat/interfaces/compare/v1.21.0...v1.21.1) (2025-03-25)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **genericdatadistributed:** added structure ([73d8b37](https://github.com/lilaquadrat/interfaces/commit/73d8b3770f11a5892ff32e34d5b877d4e360f4ef))
18
+
5
19
  ## [1.21.0](https://github.com/lilaquadrat/interfaces/compare/v1.20.0...v1.21.0) (2025-03-21)
6
20
 
7
21
 
@@ -1,4 +1,5 @@
1
- export interface CustomerBase {
1
+ import { WithStructures } from "./WithStructures";
2
+ export interface CustomerBase extends WithStructures {
2
3
  type?: 'person' | 'company';
3
4
  id?: string;
4
5
  email?: string;
@@ -4,9 +4,10 @@ import { Customers } from "./Customers";
4
4
  import { CompatibleGenericDataType } from "./GenericData";
5
5
  import { List } from "./List";
6
6
  import { Media } from "./Media";
7
+ import { Structure } from "./Structure";
7
8
  type GenericDataDistributed = {
8
- [key in CompatibleGenericDataType]: (BasicData<List>['_id'] | BasicData<Content>['_id'] | BasicData<Customers>['_id'])[];
9
+ [key in CompatibleGenericDataType]: (BasicData<List>['_id'] | BasicData<Content>['_id'] | BasicData<Customers>['_id'] | BasicData<Structure>['_id'])[];
9
10
  } & {
10
- data: Record<string, BasicData<Content | List | Customers | Media>>;
11
+ data: Record<string, BasicData<Content | List | Customers | Media | Structure>>;
11
12
  };
12
13
  export { GenericDataDistributed };
@@ -1,6 +1,7 @@
1
1
  import { ObjectId } from "mongodb";
2
2
  import { AgreementResponse } from "./AgreementResponse";
3
- export interface ListParticipants {
3
+ import { WithStructures } from "./WithStructures";
4
+ export interface ListParticipants extends WithStructures {
4
5
  _id?: ObjectId;
5
6
  list: ObjectId;
6
7
  company: string;
@@ -0,0 +1,19 @@
1
+ import { Structure } from "./Structure";
2
+ /**
3
+ * A utility type that can be extended by any interface to support
4
+ * dynamic properties with keys prefixed with 's-'
5
+ *
6
+ * @example
7
+ * interface MyInterface extends WithDynamicProperties {
8
+ * name: string;
9
+ * // MyInterface now supports s- prefixed dynamic properties
10
+ * }
11
+ */
12
+ export interface WithStructures {
13
+ /**
14
+ * Dynamic properties with s- prefix
15
+ * Allows for custom properties like s-color, s-count, s-items, etc.
16
+ */
17
+ [key: `s-${string}`]: string | boolean | number | Array<string>;
18
+ structures?: Structure[];
19
+ }
@@ -147,4 +147,5 @@ export * from './UserAppOptionsRequired';
147
147
  export * from './UserAppWithOptions';
148
148
  export * from './VersionInfo';
149
149
  export * from './WebhookCall';
150
- export * from './WildcardCertificates';
150
+ export * from './WildcardCertificates';
151
+ export * from './WithStructures';
@@ -1,4 +1,5 @@
1
- export interface CustomerBase {
1
+ import { WithStructures } from "./WithStructures";
2
+ export interface CustomerBase extends WithStructures {
2
3
  type?: 'person' | 'company';
3
4
  id?: string;
4
5
  email?: string;
@@ -4,9 +4,10 @@ import { Customers } from "./Customers";
4
4
  import { CompatibleGenericDataType } from "./GenericData";
5
5
  import { List } from "./List";
6
6
  import { Media } from "./Media";
7
+ import { Structure } from "./Structure";
7
8
  type GenericDataDistributed = {
8
- [key in CompatibleGenericDataType]: (BasicData<List>['_id'] | BasicData<Content>['_id'] | BasicData<Customers>['_id'])[];
9
+ [key in CompatibleGenericDataType]: (BasicData<List>['_id'] | BasicData<Content>['_id'] | BasicData<Customers>['_id'] | BasicData<Structure>['_id'])[];
9
10
  } & {
10
- data: Record<string, BasicData<Content | List | Customers | Media>>;
11
+ data: Record<string, BasicData<Content | List | Customers | Media | Structure>>;
11
12
  };
12
13
  export { GenericDataDistributed };
@@ -1,6 +1,7 @@
1
1
  import { ObjectId } from "mongodb";
2
2
  import { AgreementResponse } from "./AgreementResponse";
3
- export interface ListParticipants {
3
+ import { WithStructures } from "./WithStructures";
4
+ export interface ListParticipants extends WithStructures {
4
5
  _id?: ObjectId;
5
6
  list: ObjectId;
6
7
  company: string;
@@ -0,0 +1,19 @@
1
+ import { Structure } from "./Structure";
2
+ /**
3
+ * A utility type that can be extended by any interface to support
4
+ * dynamic properties with keys prefixed with 's-'
5
+ *
6
+ * @example
7
+ * interface MyInterface extends WithDynamicProperties {
8
+ * name: string;
9
+ * // MyInterface now supports s- prefixed dynamic properties
10
+ * }
11
+ */
12
+ export interface WithStructures {
13
+ /**
14
+ * Dynamic properties with s- prefix
15
+ * Allows for custom properties like s-color, s-count, s-items, etc.
16
+ */
17
+ [key: `s-${string}`]: string | boolean | number | Array<string>;
18
+ structures?: Structure[];
19
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=WithStructures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithStructures.js","sourceRoot":"","sources":["../../src/WithStructures.ts"],"names":[],"mappings":""}
@@ -147,4 +147,5 @@ export * from './UserAppOptionsRequired';
147
147
  export * from './UserAppWithOptions';
148
148
  export * from './VersionInfo';
149
149
  export * from './WebhookCall';
150
- export * from './WildcardCertificates';
150
+ export * from './WildcardCertificates';
151
+ export * from './WithStructures';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/interfaces",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "description": "interfaces in context of lilaquadrat STUDIO",
5
5
  "author": {
6
6
  "email": "m.schuebel@lila2.de",
@@ -1,4 +1,6 @@
1
- export interface CustomerBase {
1
+ import { WithStructures } from "./WithStructures"
2
+
3
+ export interface CustomerBase extends WithStructures {
2
4
 
3
5
  type?: 'person' | 'company'
4
6
 
@@ -4,11 +4,12 @@ import { Customers } from "./Customers";
4
4
  import { CompatibleGenericDataType } from "./GenericData";
5
5
  import { List } from "./List";
6
6
  import { Media } from "./Media";
7
+ import { Structure } from "./Structure";
7
8
 
8
9
  type GenericDataDistributed = {
9
- [key in CompatibleGenericDataType]: (BasicData<List>['_id']|BasicData<Content>['_id']|BasicData<Customers>['_id'])[]
10
+ [key in CompatibleGenericDataType]: (BasicData<List>['_id']|BasicData<Content>['_id']|BasicData<Customers>['_id']|BasicData<Structure>['_id'])[]
10
11
  } & {
11
- data: Record<string, BasicData<Content | List | Customers | Media>>;
12
+ data: Record<string, BasicData<Content | List | Customers | Media | Structure>>;
12
13
  }
13
14
 
14
15
  export { GenericDataDistributed };
@@ -1,7 +1,8 @@
1
1
  import { ObjectId } from "mongodb"
2
- import {AgreementResponse} from "./AgreementResponse"
2
+ import { AgreementResponse } from "./AgreementResponse"
3
+ import { WithStructures } from "./WithStructures"
3
4
 
4
- export interface ListParticipants {
5
+ export interface ListParticipants extends WithStructures {
5
6
  _id?: ObjectId
6
7
 
7
8
  list: ObjectId
@@ -67,5 +68,4 @@ export interface ListParticipants {
67
68
  * if the participants came from a payment webhook paid will have the amount of the whole payment
68
69
  */
69
70
  payment?: ObjectId
70
-
71
71
  }
@@ -0,0 +1,20 @@
1
+ import { Structure } from "./Structure";
2
+
3
+ /**
4
+ * A utility type that can be extended by any interface to support
5
+ * dynamic properties with keys prefixed with 's-'
6
+ *
7
+ * @example
8
+ * interface MyInterface extends WithDynamicProperties {
9
+ * name: string;
10
+ * // MyInterface now supports s- prefixed dynamic properties
11
+ * }
12
+ */
13
+ export interface WithStructures {
14
+ /**
15
+ * Dynamic properties with s- prefix
16
+ * Allows for custom properties like s-color, s-count, s-items, etc.
17
+ */
18
+ [key: `s-${string}`]: string | boolean | number | Array<string>;
19
+ structures?: Structure[]
20
+ }