@lilaquadrat/interfaces 1.14.1 → 1.16.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 +14 -0
- package/lib/cjs/CustomerMinimal.d.ts +7 -0
- package/lib/cjs/ListParticipantWithUser.d.ts +7 -8
- package/lib/cjs/ListParticipants.d.ts +1 -3
- package/lib/cjs/Payment.d.ts +15 -0
- package/lib/cjs/PaymentProvider.d.ts +5 -0
- package/lib/cjs/PaymentProviderShopify .d.ts +5 -0
- package/lib/cjs/PaymentWithCustomer.d.ts +16 -0
- package/lib/cjs/Project.d.ts +2 -0
- package/lib/cjs/ShopifyProjectSettings.d.ts +3 -0
- package/lib/cjs/WebhookCall.d.ts +29 -0
- package/lib/cjs/index.d.ts +7 -0
- package/lib/esm/CustomerMinimal.d.ts +7 -0
- package/lib/esm/CustomerMinimal.js +2 -0
- package/lib/esm/CustomerMinimal.js.map +1 -0
- package/lib/esm/ListParticipantWithUser.d.ts +7 -8
- package/lib/esm/ListParticipants.d.ts +1 -3
- package/lib/esm/Payment.d.ts +15 -0
- package/lib/esm/Payment.js +2 -0
- package/lib/esm/Payment.js.map +1 -0
- package/lib/esm/PaymentProvider.d.ts +5 -0
- package/lib/esm/PaymentProvider.js +2 -0
- package/lib/esm/PaymentProvider.js.map +1 -0
- package/lib/esm/PaymentProviderShopify .d.ts +5 -0
- package/lib/esm/PaymentProviderShopify .js +2 -0
- package/lib/esm/PaymentProviderShopify .js.map +1 -0
- package/lib/esm/PaymentWithCustomer.d.ts +16 -0
- package/lib/esm/PaymentWithCustomer.js +2 -0
- package/lib/esm/PaymentWithCustomer.js.map +1 -0
- package/lib/esm/Project.d.ts +2 -0
- package/lib/esm/ShopifyProjectSettings.d.ts +3 -0
- package/lib/esm/ShopifyProjectSettings.js +2 -0
- package/lib/esm/ShopifyProjectSettings.js.map +1 -0
- package/lib/esm/WebhookCall.d.ts +29 -0
- package/lib/esm/WebhookCall.js +2 -0
- package/lib/esm/WebhookCall.js.map +1 -0
- package/lib/esm/index.d.ts +7 -0
- package/package.json +2 -2
- package/src/CustomerMinimal.ts +8 -0
- package/src/ListParticipantWithUser.ts +12 -10
- package/src/ListParticipants.ts +1 -3
- package/src/Payment.ts +16 -0
- package/src/PaymentProvider.ts +10 -0
- package/src/PaymentProviderShopify .ts +9 -0
- package/src/PaymentWithCustomer.ts +17 -0
- package/src/Project.ts +2 -0
- package/src/ShopifyProjectSettings.ts +5 -0
- package/src/WebhookCall.ts +34 -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.16.0](https://github.com/lilaquadrat/interfaces/compare/v1.15.0...v1.16.0) (2025-01-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **paymentprovider:** added paymentProviders interfaced and updated mongodb ([0437ae9](https://github.com/lilaquadrat/interfaces/commit/0437ae97d4a0c737564219868d495e23fbfe5d1b))
|
|
11
|
+
|
|
12
|
+
## [1.15.0](https://github.com/lilaquadrat/interfaces/compare/v1.14.1...v1.15.0) (2025-01-03)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **customerminimal & payment:** added customerMinimal and payment ([2d34012](https://github.com/lilaquadrat/interfaces/commit/2d340121c04579d593729239d4708e0e5e2cf717))
|
|
18
|
+
|
|
5
19
|
### [1.14.1](https://github.com/lilaquadrat/interfaces/compare/v1.14.0...v1.14.1) (2024-12-28)
|
|
6
20
|
|
|
7
21
|
## [1.14.0](https://github.com/lilaquadrat/interfaces/compare/v1.13.0...v1.14.0) (2024-12-17)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ObjectId } from "mongodb";
|
|
2
1
|
import { ListParticipants } from "./ListParticipants";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { Payment } from "./Payment";
|
|
3
|
+
import { BasicData } from "./BasicData";
|
|
4
|
+
import { CustomerMinimal } from "./CustomerMinimal";
|
|
5
|
+
export type ListParticipantWithCustomerAndPayment = BasicData<ListParticipants> & {
|
|
6
|
+
user: CustomerMinimal;
|
|
7
|
+
} & {
|
|
8
|
+
payment?: Pick<BasicData<Payment>, '_id' | 'state' | 'items' | 'provider' | 'currency' | 'amount'>;
|
|
10
9
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ObjectId } from "mongodb";
|
|
2
2
|
import { AgreementResponse } from "./AgreementResponse";
|
|
3
|
-
import { ListItem } from "./ListItem";
|
|
4
3
|
export interface ListParticipants {
|
|
5
4
|
_id?: ObjectId;
|
|
6
5
|
list: ObjectId;
|
|
@@ -56,9 +55,8 @@ export interface ListParticipants {
|
|
|
56
55
|
*/
|
|
57
56
|
state: 'unchecked' | 'paid' | 'notuseful' | 'confirmed' | 'enlisted' | 'reserved' | 'waiting' | 'blocked' | 'finalized';
|
|
58
57
|
agreements: AgreementResponse[];
|
|
59
|
-
items?: ListItem[];
|
|
60
58
|
/**
|
|
61
59
|
* if the participants came from a payment webhook paid will have the amount of the whole payment
|
|
62
60
|
*/
|
|
63
|
-
|
|
61
|
+
payment?: ObjectId;
|
|
64
62
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ObjectId } from "mongodb";
|
|
2
|
+
import { ListItem } from "./ListItem";
|
|
3
|
+
export interface Payment {
|
|
4
|
+
company: string;
|
|
5
|
+
project: string;
|
|
6
|
+
test?: boolean;
|
|
7
|
+
body?: Record<string, any>;
|
|
8
|
+
provider: string;
|
|
9
|
+
state: 'waiting' | 'failed' | 'paid';
|
|
10
|
+
amount: number;
|
|
11
|
+
currency: string;
|
|
12
|
+
customer: ObjectId;
|
|
13
|
+
webhook?: ObjectId;
|
|
14
|
+
items?: ListItem[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ObjectId } from "mongodb";
|
|
2
|
+
import { ListItem } from "./ListItem";
|
|
3
|
+
import { CustomerMinimal } from "./CustomerMinimal";
|
|
4
|
+
export interface PaymentWithCustomer {
|
|
5
|
+
company: string;
|
|
6
|
+
project: string;
|
|
7
|
+
test?: boolean;
|
|
8
|
+
body?: Record<string, any>;
|
|
9
|
+
provider: string;
|
|
10
|
+
state: 'waiting' | 'failed' | 'paid';
|
|
11
|
+
amount: number;
|
|
12
|
+
currency: string;
|
|
13
|
+
customer: CustomerMinimal;
|
|
14
|
+
webhook?: ObjectId;
|
|
15
|
+
items?: ListItem[];
|
|
16
|
+
}
|
package/lib/cjs/Project.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Auth0ProjectSettings from "./Auth0ProjectSettings";
|
|
2
|
+
import ShopifyProjectSettings from "./ShopifyProjectSettings";
|
|
2
3
|
export interface Project {
|
|
3
4
|
name: string;
|
|
4
5
|
description?: string;
|
|
@@ -7,4 +8,5 @@ export interface Project {
|
|
|
7
8
|
tags?: string[];
|
|
8
9
|
apps?: string[];
|
|
9
10
|
auth0?: Auth0ProjectSettings;
|
|
11
|
+
shopify?: ShopifyProjectSettings;
|
|
10
12
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a webhook call with details about the company, project, and other relevant information.
|
|
3
|
+
*/
|
|
4
|
+
export interface WebhookCall {
|
|
5
|
+
/**
|
|
6
|
+
* The name of the company associated with the webhook call.
|
|
7
|
+
*/
|
|
8
|
+
company: string;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the project associated with the webhook call.
|
|
11
|
+
*/
|
|
12
|
+
project: string;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether the webhook call is a test.
|
|
15
|
+
*/
|
|
16
|
+
test?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The body of the webhook call, containing the payload data.
|
|
19
|
+
*/
|
|
20
|
+
body: Record<string, any>;
|
|
21
|
+
/**
|
|
22
|
+
* The type of the webhook call.
|
|
23
|
+
*/
|
|
24
|
+
type: string;
|
|
25
|
+
/**
|
|
26
|
+
* The provider of the webhook service.
|
|
27
|
+
*/
|
|
28
|
+
provider: string;
|
|
29
|
+
}
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from './CreateResult';
|
|
|
36
36
|
export * from './CustomerAccounts';
|
|
37
37
|
export * from './CustomerBase';
|
|
38
38
|
export * from './CustomerCompany';
|
|
39
|
+
export * from './CustomerMinimal';
|
|
39
40
|
export * from './CustomerPerson';
|
|
40
41
|
export * from './CustomerPersonWithAddress';
|
|
41
42
|
export * from './CustomerPersonWithEmail';
|
|
@@ -98,6 +99,10 @@ export * from './MulterFile';
|
|
|
98
99
|
export * from './ObjectIdString';
|
|
99
100
|
export * from './Options';
|
|
100
101
|
export * from './Partner';
|
|
102
|
+
export * from './Payment';
|
|
103
|
+
export * from './PaymentProvider';
|
|
104
|
+
export * from './PaymentProviderShopify ';
|
|
105
|
+
export * from './PaymentWithCustomer';
|
|
101
106
|
export * from './Permissions';
|
|
102
107
|
export * from './PermissionsWithScope';
|
|
103
108
|
export * from './Price';
|
|
@@ -120,6 +125,7 @@ export * from './Secret';
|
|
|
120
125
|
export * from './Settings';
|
|
121
126
|
export * from './ShareClient';
|
|
122
127
|
export * from './ShareClientOptions';
|
|
128
|
+
export * from './ShopifyProjectSettings';
|
|
123
129
|
export * from './SkipLimitSort';
|
|
124
130
|
export * from './StudioIframeMessage';
|
|
125
131
|
export * from './SystemDomain';
|
|
@@ -131,4 +137,5 @@ export * from './UserApp';
|
|
|
131
137
|
export * from './UserAppOptionsRequired';
|
|
132
138
|
export * from './UserAppWithOptions';
|
|
133
139
|
export * from './VersionInfo';
|
|
140
|
+
export * from './WebhookCall';
|
|
134
141
|
export * from './WildcardCertificates';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomerMinimal.js","sourceRoot":"","sources":["../../src/CustomerMinimal.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ObjectId } from "mongodb";
|
|
2
1
|
import { ListParticipants } from "./ListParticipants";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { Payment } from "./Payment";
|
|
3
|
+
import { BasicData } from "./BasicData";
|
|
4
|
+
import { CustomerMinimal } from "./CustomerMinimal";
|
|
5
|
+
export type ListParticipantWithCustomerAndPayment = BasicData<ListParticipants> & {
|
|
6
|
+
user: CustomerMinimal;
|
|
7
|
+
} & {
|
|
8
|
+
payment?: Pick<BasicData<Payment>, '_id' | 'state' | 'items' | 'provider' | 'currency' | 'amount'>;
|
|
10
9
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ObjectId } from "mongodb";
|
|
2
2
|
import { AgreementResponse } from "./AgreementResponse";
|
|
3
|
-
import { ListItem } from "./ListItem";
|
|
4
3
|
export interface ListParticipants {
|
|
5
4
|
_id?: ObjectId;
|
|
6
5
|
list: ObjectId;
|
|
@@ -56,9 +55,8 @@ export interface ListParticipants {
|
|
|
56
55
|
*/
|
|
57
56
|
state: 'unchecked' | 'paid' | 'notuseful' | 'confirmed' | 'enlisted' | 'reserved' | 'waiting' | 'blocked' | 'finalized';
|
|
58
57
|
agreements: AgreementResponse[];
|
|
59
|
-
items?: ListItem[];
|
|
60
58
|
/**
|
|
61
59
|
* if the participants came from a payment webhook paid will have the amount of the whole payment
|
|
62
60
|
*/
|
|
63
|
-
|
|
61
|
+
payment?: ObjectId;
|
|
64
62
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ObjectId } from "mongodb";
|
|
2
|
+
import { ListItem } from "./ListItem";
|
|
3
|
+
export interface Payment {
|
|
4
|
+
company: string;
|
|
5
|
+
project: string;
|
|
6
|
+
test?: boolean;
|
|
7
|
+
body?: Record<string, any>;
|
|
8
|
+
provider: string;
|
|
9
|
+
state: 'waiting' | 'failed' | 'paid';
|
|
10
|
+
amount: number;
|
|
11
|
+
currency: string;
|
|
12
|
+
customer: ObjectId;
|
|
13
|
+
webhook?: ObjectId;
|
|
14
|
+
items?: ListItem[];
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Payment.js","sourceRoot":"","sources":["../../src/Payment.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentProvider.js","sourceRoot":"","sources":["../../src/PaymentProvider.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentProviderShopify .js","sourceRoot":"","sources":["../../src/PaymentProviderShopify .ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ObjectId } from "mongodb";
|
|
2
|
+
import { ListItem } from "./ListItem";
|
|
3
|
+
import { CustomerMinimal } from "./CustomerMinimal";
|
|
4
|
+
export interface PaymentWithCustomer {
|
|
5
|
+
company: string;
|
|
6
|
+
project: string;
|
|
7
|
+
test?: boolean;
|
|
8
|
+
body?: Record<string, any>;
|
|
9
|
+
provider: string;
|
|
10
|
+
state: 'waiting' | 'failed' | 'paid';
|
|
11
|
+
amount: number;
|
|
12
|
+
currency: string;
|
|
13
|
+
customer: CustomerMinimal;
|
|
14
|
+
webhook?: ObjectId;
|
|
15
|
+
items?: ListItem[];
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentWithCustomer.js","sourceRoot":"","sources":["../../src/PaymentWithCustomer.ts"],"names":[],"mappings":""}
|
package/lib/esm/Project.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Auth0ProjectSettings from "./Auth0ProjectSettings";
|
|
2
|
+
import ShopifyProjectSettings from "./ShopifyProjectSettings";
|
|
2
3
|
export interface Project {
|
|
3
4
|
name: string;
|
|
4
5
|
description?: string;
|
|
@@ -7,4 +8,5 @@ export interface Project {
|
|
|
7
8
|
tags?: string[];
|
|
8
9
|
apps?: string[];
|
|
9
10
|
auth0?: Auth0ProjectSettings;
|
|
11
|
+
shopify?: ShopifyProjectSettings;
|
|
10
12
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShopifyProjectSettings.js","sourceRoot":"","sources":["../../src/ShopifyProjectSettings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a webhook call with details about the company, project, and other relevant information.
|
|
3
|
+
*/
|
|
4
|
+
export interface WebhookCall {
|
|
5
|
+
/**
|
|
6
|
+
* The name of the company associated with the webhook call.
|
|
7
|
+
*/
|
|
8
|
+
company: string;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the project associated with the webhook call.
|
|
11
|
+
*/
|
|
12
|
+
project: string;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether the webhook call is a test.
|
|
15
|
+
*/
|
|
16
|
+
test?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The body of the webhook call, containing the payload data.
|
|
19
|
+
*/
|
|
20
|
+
body: Record<string, any>;
|
|
21
|
+
/**
|
|
22
|
+
* The type of the webhook call.
|
|
23
|
+
*/
|
|
24
|
+
type: string;
|
|
25
|
+
/**
|
|
26
|
+
* The provider of the webhook service.
|
|
27
|
+
*/
|
|
28
|
+
provider: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebhookCall.js","sourceRoot":"","sources":["../../src/WebhookCall.ts"],"names":[],"mappings":""}
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from './CreateResult';
|
|
|
36
36
|
export * from './CustomerAccounts';
|
|
37
37
|
export * from './CustomerBase';
|
|
38
38
|
export * from './CustomerCompany';
|
|
39
|
+
export * from './CustomerMinimal';
|
|
39
40
|
export * from './CustomerPerson';
|
|
40
41
|
export * from './CustomerPersonWithAddress';
|
|
41
42
|
export * from './CustomerPersonWithEmail';
|
|
@@ -98,6 +99,10 @@ export * from './MulterFile';
|
|
|
98
99
|
export * from './ObjectIdString';
|
|
99
100
|
export * from './Options';
|
|
100
101
|
export * from './Partner';
|
|
102
|
+
export * from './Payment';
|
|
103
|
+
export * from './PaymentProvider';
|
|
104
|
+
export * from './PaymentProviderShopify ';
|
|
105
|
+
export * from './PaymentWithCustomer';
|
|
101
106
|
export * from './Permissions';
|
|
102
107
|
export * from './PermissionsWithScope';
|
|
103
108
|
export * from './Price';
|
|
@@ -120,6 +125,7 @@ export * from './Secret';
|
|
|
120
125
|
export * from './Settings';
|
|
121
126
|
export * from './ShareClient';
|
|
122
127
|
export * from './ShareClientOptions';
|
|
128
|
+
export * from './ShopifyProjectSettings';
|
|
123
129
|
export * from './SkipLimitSort';
|
|
124
130
|
export * from './StudioIframeMessage';
|
|
125
131
|
export * from './SystemDomain';
|
|
@@ -131,4 +137,5 @@ export * from './UserApp';
|
|
|
131
137
|
export * from './UserAppOptionsRequired';
|
|
132
138
|
export * from './UserAppWithOptions';
|
|
133
139
|
export * from './VersionInfo';
|
|
140
|
+
export * from './WebhookCall';
|
|
134
141
|
export * from './WildcardCertificates';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lilaquadrat/interfaces",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
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": "^
|
|
34
|
+
"mongodb": "^6.12.0",
|
|
35
35
|
"standard-version": "^9.5.0"
|
|
36
36
|
},
|
|
37
37
|
"config": {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { ObjectId } from "mongodb";
|
|
2
1
|
import { ListParticipants } from "./ListParticipants";
|
|
2
|
+
import { Payment } from "./Payment";
|
|
3
|
+
import { BasicData } from "./BasicData";
|
|
4
|
+
import { CustomerMinimal } from "./CustomerMinimal";
|
|
3
5
|
|
|
4
|
-
export type
|
|
5
|
-
&
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
6
|
+
export type ListParticipantWithCustomerAndPayment = BasicData<ListParticipants>
|
|
7
|
+
&
|
|
8
|
+
{
|
|
9
|
+
user: CustomerMinimal
|
|
10
|
+
}
|
|
11
|
+
&
|
|
12
|
+
{
|
|
13
|
+
payment?: Pick<BasicData<Payment>, '_id' | 'state' | 'items' | 'provider' | 'currency' | 'amount'>;
|
|
14
|
+
}
|
package/src/ListParticipants.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ObjectId } from "mongodb"
|
|
2
2
|
import {AgreementResponse} from "./AgreementResponse"
|
|
3
|
-
import { ListItem } from "./ListItem"
|
|
4
3
|
|
|
5
4
|
export interface ListParticipants {
|
|
6
5
|
_id?: ObjectId
|
|
@@ -64,10 +63,9 @@ export interface ListParticipants {
|
|
|
64
63
|
*/
|
|
65
64
|
state: 'unchecked' | 'paid' | 'notuseful' | 'confirmed' | 'enlisted' | 'reserved' | 'waiting' | 'blocked' | 'finalized'
|
|
66
65
|
agreements: AgreementResponse[]
|
|
67
|
-
items?: ListItem[]
|
|
68
66
|
/**
|
|
69
67
|
* if the participants came from a payment webhook paid will have the amount of the whole payment
|
|
70
68
|
*/
|
|
71
|
-
|
|
69
|
+
payment?: ObjectId
|
|
72
70
|
|
|
73
71
|
}
|
package/src/Payment.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ObjectId } from "mongodb"
|
|
2
|
+
import { ListItem } from "./ListItem"
|
|
3
|
+
|
|
4
|
+
export interface Payment {
|
|
5
|
+
company: string
|
|
6
|
+
project: string
|
|
7
|
+
test?: boolean
|
|
8
|
+
body?: Record<string, any>
|
|
9
|
+
provider: string
|
|
10
|
+
state: 'waiting' | 'failed' | 'paid'
|
|
11
|
+
amount: number
|
|
12
|
+
currency: string
|
|
13
|
+
customer: ObjectId
|
|
14
|
+
webhook?: ObjectId
|
|
15
|
+
items?: ListItem[]
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ObjectId } from "mongodb"
|
|
2
|
+
import { ListItem } from "./ListItem"
|
|
3
|
+
import { CustomerMinimal } from "./CustomerMinimal"
|
|
4
|
+
|
|
5
|
+
export interface PaymentWithCustomer {
|
|
6
|
+
company: string
|
|
7
|
+
project: string
|
|
8
|
+
test?: boolean
|
|
9
|
+
body?: Record<string, any>
|
|
10
|
+
provider: string
|
|
11
|
+
state: 'waiting' | 'failed' | 'paid'
|
|
12
|
+
amount: number
|
|
13
|
+
currency: string
|
|
14
|
+
customer: CustomerMinimal
|
|
15
|
+
webhook?: ObjectId
|
|
16
|
+
items?: ListItem[]
|
|
17
|
+
}
|
package/src/Project.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Auth0ProjectSettings from "./Auth0ProjectSettings"
|
|
2
|
+
import ShopifyProjectSettings from "./ShopifyProjectSettings"
|
|
2
3
|
|
|
3
4
|
export interface Project {
|
|
4
5
|
|
|
@@ -10,5 +11,6 @@ export interface Project {
|
|
|
10
11
|
apps?: string[]
|
|
11
12
|
|
|
12
13
|
auth0?: Auth0ProjectSettings
|
|
14
|
+
shopify?: ShopifyProjectSettings
|
|
13
15
|
|
|
14
16
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a webhook call with details about the company, project, and other relevant information.
|
|
3
|
+
*/
|
|
4
|
+
export interface WebhookCall {
|
|
5
|
+
/**
|
|
6
|
+
* The name of the company associated with the webhook call.
|
|
7
|
+
*/
|
|
8
|
+
company: string
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The name of the project associated with the webhook call.
|
|
12
|
+
*/
|
|
13
|
+
project: string
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Indicates whether the webhook call is a test.
|
|
17
|
+
*/
|
|
18
|
+
test?: boolean
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The body of the webhook call, containing the payload data.
|
|
22
|
+
*/
|
|
23
|
+
body: Record<string, any>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The type of the webhook call.
|
|
27
|
+
*/
|
|
28
|
+
type: string
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The provider of the webhook service.
|
|
32
|
+
*/
|
|
33
|
+
provider: string
|
|
34
|
+
}
|