@lilaquadrat/interfaces 1.21.1 → 1.23.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/lib/cjs/Cart.d.ts +12 -0
  3. package/lib/cjs/CartItem.d.ts +5 -0
  4. package/lib/cjs/CustomerBase.d.ts +2 -1
  5. package/lib/cjs/ListCategory.d.ts +3 -1
  6. package/lib/cjs/ListItem.d.ts +2 -1
  7. package/lib/cjs/ListParticipants.d.ts +2 -1
  8. package/lib/cjs/Payment.d.ts +1 -0
  9. package/lib/cjs/PaymentProvider.d.ts +1 -1
  10. package/lib/cjs/PaymentProviderStripe.d.ts +6 -0
  11. package/lib/cjs/WithStructures.d.ts +21 -0
  12. package/lib/cjs/index.d.ts +6 -2
  13. package/lib/esm/Cart.d.ts +12 -0
  14. package/lib/esm/Cart.js +2 -0
  15. package/lib/esm/Cart.js.map +1 -0
  16. package/lib/esm/CartItem.d.ts +5 -0
  17. package/lib/esm/CartItem.js +2 -0
  18. package/lib/esm/CartItem.js.map +1 -0
  19. package/lib/esm/CustomerBase.d.ts +2 -1
  20. package/lib/esm/ListCategory.d.ts +3 -1
  21. package/lib/esm/ListItem.d.ts +2 -1
  22. package/lib/esm/ListParticipants.d.ts +2 -1
  23. package/lib/esm/Payment.d.ts +1 -0
  24. package/lib/esm/PaymentProvider.d.ts +1 -1
  25. package/lib/esm/PaymentProviderShopify.js +2 -0
  26. package/lib/esm/PaymentProviderShopify.js.map +1 -0
  27. package/lib/esm/PaymentProviderStripe.d.ts +6 -0
  28. package/lib/esm/PaymentProviderStripe.js +2 -0
  29. package/lib/esm/PaymentProviderStripe.js.map +1 -0
  30. package/lib/esm/WithStructures.d.ts +21 -0
  31. package/lib/esm/WithStructures.js +2 -0
  32. package/lib/esm/WithStructures.js.map +1 -0
  33. package/lib/esm/index.d.ts +6 -2
  34. package/package.json +1 -1
  35. package/src/Cart.ts +20 -0
  36. package/src/CartItem.ts +8 -0
  37. package/src/CustomerBase.ts +3 -1
  38. package/src/ListCategory.ts +3 -1
  39. package/src/ListItem.ts +2 -1
  40. package/src/ListParticipants.ts +3 -3
  41. package/src/Payment.ts +1 -0
  42. package/src/PaymentProvider.ts +1 -1
  43. package/src/PaymentProviderStripe.ts +10 -0
  44. package/src/WithStructures.ts +22 -0
  45. package/lib/esm/PaymentProviderShopify .js +0 -2
  46. package/lib/esm/PaymentProviderShopify .js.map +0 -1
  47. /package/lib/cjs/{PaymentProviderShopify .d.ts → PaymentProviderShopify.d.ts} +0 -0
  48. /package/lib/esm/{PaymentProviderShopify .d.ts → PaymentProviderShopify.d.ts} +0 -0
  49. /package/src/{PaymentProviderShopify .ts → PaymentProviderShopify.ts} +0 -0
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.23.0](https://github.com/lilaquadrat/interfaces/compare/v1.22.0...v1.23.0) (2025-04-01)
6
+
7
+
8
+ ### Features
9
+
10
+ * **cart:** add Cart and CartItem interfaces; update ListCategory and ListItem structures ([bb17d2e](https://github.com/lilaquadrat/interfaces/commit/bb17d2e9ffc841ea12faddc87f86b8646cafe07b))
11
+
12
+ ## [1.22.0](https://github.com/lilaquadrat/interfaces/compare/v1.21.1...v1.22.0) (2025-03-27)
13
+
14
+
15
+ ### Features
16
+
17
+ * **listsparticipants & customers:** extended for structures ([c222a3f](https://github.com/lilaquadrat/interfaces/commit/c222a3f5ece6e49b054b0c8063821a486dbb55d2))
18
+
5
19
  ### [1.21.1](https://github.com/lilaquadrat/interfaces/compare/v1.21.0...v1.21.1) (2025-03-25)
6
20
 
7
21
 
@@ -0,0 +1,12 @@
1
+ import { CartItem } from "./CartItem";
2
+ export interface Cart {
3
+ items?: CartItem[];
4
+ state: 'open' | 'closed' | 'checkout';
5
+ company: string;
6
+ project: string;
7
+ attributes?: {
8
+ [key: string]: string;
9
+ };
10
+ modified?: Date;
11
+ checkoutUrl?: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ import { ListCategory } from "./ListCategory";
2
+ export interface CartItem extends ListCategory {
3
+ id: string;
4
+ quantity: number;
5
+ }
@@ -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;
@@ -1,8 +1,10 @@
1
+ import { ObjectId } from "mongodb";
1
2
  import Price from "./Price";
2
3
  export interface ListCategory {
3
- id: string;
4
+ _id: ObjectId;
4
5
  name: string;
5
6
  description?: string;
7
+ externalId?: string;
6
8
  amount?: number;
7
9
  disabled?: boolean;
8
10
  price?: Price;
@@ -1,5 +1,6 @@
1
1
  export interface ListItem {
2
- id: string;
2
+ id?: string;
3
+ _id?: string;
3
4
  name: string;
4
5
  price?: number;
5
6
  currency?: string;
@@ -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;
@@ -12,4 +12,5 @@ export interface Payment {
12
12
  customer: ObjectId;
13
13
  webhook?: ObjectId;
14
14
  items?: ListItem[];
15
+ additionalData?: Record<string, string>;
15
16
  }
@@ -1,5 +1,5 @@
1
1
  export interface PaymentProvider {
2
- type: 'shopify';
2
+ type: 'shopify' | 'stripe';
3
3
  active: boolean;
4
4
  label: string;
5
5
  }
@@ -0,0 +1,6 @@
1
+ import { PaymentProvider } from "./PaymentProvider";
2
+ export interface PaymentProviderStripe extends PaymentProvider {
3
+ type: 'stripe';
4
+ token: string;
5
+ validationKey: string;
6
+ }
@@ -0,0 +1,21 @@
1
+ import { Structure } from "./Structure";
2
+ /**
3
+ * Base interface containing only the standard properties
4
+ */
5
+ interface BaseWithStructures {
6
+ structures?: Structure[];
7
+ }
8
+ /**
9
+ * A utility type that can be extended by any interface to support
10
+ * dynamic properties with keys prefixed with 's-'
11
+ *
12
+ * @example
13
+ * interface MyInterface extends WithStructures {
14
+ * name: string;
15
+ * // MyInterface now supports s- prefixed dynamic properties
16
+ * }
17
+ */
18
+ export type WithStructures = BaseWithStructures & Partial<{
19
+ [key: `s-${string}`]: string | boolean | number | Array<string>;
20
+ }>;
21
+ export {};
@@ -18,6 +18,8 @@ export * from './BaseFilterOptions';
18
18
  export * from './BasicData';
19
19
  export * from './BasicDataDatabase';
20
20
  export * from './CallResponse';
21
+ export * from './Cart';
22
+ export * from './CartItem';
21
23
  export * from './CategoryStructure';
22
24
  export * from './CategoryStructureWithRequired';
23
25
  export * from './Certificate';
@@ -108,7 +110,8 @@ export * from './Options';
108
110
  export * from './Partner';
109
111
  export * from './Payment';
110
112
  export * from './PaymentProvider';
111
- export * from './PaymentProviderShopify ';
113
+ export * from './PaymentProviderShopify';
114
+ export * from './PaymentProviderStripe';
112
115
  export * from './PaymentWithCustomer';
113
116
  export * from './Permissions';
114
117
  export * from './PermissionsWithScope';
@@ -147,4 +150,5 @@ export * from './UserAppOptionsRequired';
147
150
  export * from './UserAppWithOptions';
148
151
  export * from './VersionInfo';
149
152
  export * from './WebhookCall';
150
- export * from './WildcardCertificates';
153
+ export * from './WildcardCertificates';
154
+ export * from './WithStructures';
@@ -0,0 +1,12 @@
1
+ import { CartItem } from "./CartItem";
2
+ export interface Cart {
3
+ items?: CartItem[];
4
+ state: 'open' | 'closed' | 'checkout';
5
+ company: string;
6
+ project: string;
7
+ attributes?: {
8
+ [key: string]: string;
9
+ };
10
+ modified?: Date;
11
+ checkoutUrl?: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Cart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cart.js","sourceRoot":"","sources":["../../src/Cart.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { ListCategory } from "./ListCategory";
2
+ export interface CartItem extends ListCategory {
3
+ id: string;
4
+ quantity: number;
5
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CartItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CartItem.js","sourceRoot":"","sources":["../../src/CartItem.ts"],"names":[],"mappings":""}
@@ -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;
@@ -1,8 +1,10 @@
1
+ import { ObjectId } from "mongodb";
1
2
  import Price from "./Price";
2
3
  export interface ListCategory {
3
- id: string;
4
+ _id: ObjectId;
4
5
  name: string;
5
6
  description?: string;
7
+ externalId?: string;
6
8
  amount?: number;
7
9
  disabled?: boolean;
8
10
  price?: Price;
@@ -1,5 +1,6 @@
1
1
  export interface ListItem {
2
- id: string;
2
+ id?: string;
3
+ _id?: string;
3
4
  name: string;
4
5
  price?: number;
5
6
  currency?: string;
@@ -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;
@@ -12,4 +12,5 @@ export interface Payment {
12
12
  customer: ObjectId;
13
13
  webhook?: ObjectId;
14
14
  items?: ListItem[];
15
+ additionalData?: Record<string, string>;
15
16
  }
@@ -1,5 +1,5 @@
1
1
  export interface PaymentProvider {
2
- type: 'shopify';
2
+ type: 'shopify' | 'stripe';
3
3
  active: boolean;
4
4
  label: string;
5
5
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PaymentProviderShopify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentProviderShopify.js","sourceRoot":"","sources":["../../src/PaymentProviderShopify.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { PaymentProvider } from "./PaymentProvider";
2
+ export interface PaymentProviderStripe extends PaymentProvider {
3
+ type: 'stripe';
4
+ token: string;
5
+ validationKey: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PaymentProviderStripe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentProviderStripe.js","sourceRoot":"","sources":["../../src/PaymentProviderStripe.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { Structure } from "./Structure";
2
+ /**
3
+ * Base interface containing only the standard properties
4
+ */
5
+ interface BaseWithStructures {
6
+ structures?: Structure[];
7
+ }
8
+ /**
9
+ * A utility type that can be extended by any interface to support
10
+ * dynamic properties with keys prefixed with 's-'
11
+ *
12
+ * @example
13
+ * interface MyInterface extends WithStructures {
14
+ * name: string;
15
+ * // MyInterface now supports s- prefixed dynamic properties
16
+ * }
17
+ */
18
+ export type WithStructures = BaseWithStructures & Partial<{
19
+ [key: `s-${string}`]: string | boolean | number | Array<string>;
20
+ }>;
21
+ export {};
@@ -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":""}
@@ -18,6 +18,8 @@ export * from './BaseFilterOptions';
18
18
  export * from './BasicData';
19
19
  export * from './BasicDataDatabase';
20
20
  export * from './CallResponse';
21
+ export * from './Cart';
22
+ export * from './CartItem';
21
23
  export * from './CategoryStructure';
22
24
  export * from './CategoryStructureWithRequired';
23
25
  export * from './Certificate';
@@ -108,7 +110,8 @@ export * from './Options';
108
110
  export * from './Partner';
109
111
  export * from './Payment';
110
112
  export * from './PaymentProvider';
111
- export * from './PaymentProviderShopify ';
113
+ export * from './PaymentProviderShopify';
114
+ export * from './PaymentProviderStripe';
112
115
  export * from './PaymentWithCustomer';
113
116
  export * from './Permissions';
114
117
  export * from './PermissionsWithScope';
@@ -147,4 +150,5 @@ export * from './UserAppOptionsRequired';
147
150
  export * from './UserAppWithOptions';
148
151
  export * from './VersionInfo';
149
152
  export * from './WebhookCall';
150
- export * from './WildcardCertificates';
153
+ export * from './WildcardCertificates';
154
+ export * from './WithStructures';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/interfaces",
3
- "version": "1.21.1",
3
+ "version": "1.23.0",
4
4
  "description": "interfaces in context of lilaquadrat STUDIO",
5
5
  "author": {
6
6
  "email": "m.schuebel@lila2.de",
package/src/Cart.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { CartItem } from "./CartItem"
2
+
3
+ export interface Cart {
4
+
5
+ items?: CartItem[]
6
+
7
+ state: 'open' | 'closed' | 'checkout'
8
+
9
+ company: string
10
+ project: string
11
+
12
+ attributes?: {
13
+ [key: string]: string
14
+ }
15
+
16
+ modified?: Date
17
+
18
+ checkoutUrl?: string
19
+
20
+ }
@@ -0,0 +1,8 @@
1
+ import { ListCategory } from "./ListCategory"
2
+
3
+ export interface CartItem extends ListCategory {
4
+
5
+ id: string
6
+ quantity: number
7
+
8
+ }
@@ -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
 
@@ -1,10 +1,12 @@
1
+ import { ObjectId } from "mongodb";
1
2
  import Price from "./Price";
2
3
 
3
4
  export interface ListCategory {
4
5
 
5
- id: string;
6
+ _id: ObjectId;
6
7
  name: string
7
8
  description?: string
9
+ externalId?: string
8
10
  amount?: number
9
11
  disabled?: boolean
10
12
  price?: Price
package/src/ListItem.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export interface ListItem {
2
2
 
3
- id: string
3
+ id?: string
4
+ _id?: string
4
5
  name: string
5
6
  price?: number
6
7
  currency?: string
@@ -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
  }
package/src/Payment.ts CHANGED
@@ -13,4 +13,5 @@ export interface Payment {
13
13
  customer: ObjectId
14
14
  webhook?: ObjectId
15
15
  items?: ListItem[]
16
+ additionalData?: Record<string, string>
16
17
  }
@@ -1,7 +1,7 @@
1
1
 
2
2
  export interface PaymentProvider {
3
3
 
4
- type: 'shopify'
4
+ type: 'shopify' | 'stripe'
5
5
 
6
6
  active: boolean
7
7
 
@@ -0,0 +1,10 @@
1
+ import { PaymentProvider } from "./PaymentProvider";
2
+
3
+ export interface PaymentProviderStripe extends PaymentProvider {
4
+
5
+ type: 'stripe'
6
+
7
+ token: string
8
+ validationKey: string
9
+
10
+ }
@@ -0,0 +1,22 @@
1
+ import { Structure } from "./Structure";
2
+
3
+ /**
4
+ * Base interface containing only the standard properties
5
+ */
6
+ interface BaseWithStructures {
7
+ structures?: Structure[]
8
+ }
9
+
10
+ /**
11
+ * A utility type that can be extended by any interface to support
12
+ * dynamic properties with keys prefixed with 's-'
13
+ *
14
+ * @example
15
+ * interface MyInterface extends WithStructures {
16
+ * name: string;
17
+ * // MyInterface now supports s- prefixed dynamic properties
18
+ * }
19
+ */
20
+ export type WithStructures = BaseWithStructures & Partial<{
21
+ [key: `s-${string}`]: string | boolean | number | Array<string>;
22
+ }>
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=PaymentProviderShopify%20.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentProviderShopify .js","sourceRoot":"","sources":["../../src/PaymentProviderShopify .ts"],"names":[],"mappings":""}