@reeboot/strapi-payment-plugin 0.0.0 → 0.0.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/README.md +82 -9
- package/dist/_chunks/{App-DoUUpjp-.mjs → App-DD7GyuRr.mjs} +572 -297
- package/dist/_chunks/{App-BGle38NN.js → App-KZVBFRwo.js} +569 -294
- package/dist/admin/index.js +2 -2
- package/dist/admin/index.mjs +2 -2
- package/dist/admin/src/pluginId.d.ts +1 -1
- package/dist/server/index.js +952 -6988
- package/dist/server/index.mjs +951 -6987
- package/dist/server/src/bootstrap.d.ts +11 -5
- package/dist/server/src/config/index.d.ts +2 -0
- package/dist/server/src/content-types/index.d.ts +123 -1
- package/dist/server/src/content-types/product.d.ts +63 -0
- package/dist/server/src/content-types/subscription.d.ts +60 -0
- package/dist/server/src/controllers/controller.d.ts +5 -1
- package/dist/server/src/controllers/index.d.ts +29 -29
- package/dist/server/src/controllers/product.d.ts +18 -0
- package/dist/server/src/controllers/subscription.d.ts +16 -0
- package/dist/server/src/controllers/webhook.d.ts +10 -0
- package/dist/server/src/index.d.ts +177 -65
- package/dist/server/src/routes/index.d.ts +4 -15
- package/dist/server/src/routes/product.d.ts +2 -0
- package/dist/server/src/routes/subscription.d.ts +5 -0
- package/dist/server/src/routes/{product-routes.d.ts → webhook.d.ts} +3 -1
- package/dist/server/src/services/index.d.ts +17 -16
- package/dist/server/src/services/paypalDriver.d.ts +44 -4
- package/dist/server/src/services/product.d.ts +7 -0
- package/dist/server/src/services/service.d.ts +7 -14
- package/dist/server/src/services/stripeDriver.d.ts +31 -0
- package/dist/server/src/services/subscription.d.ts +9 -0
- package/dist/server/src/services/sync.d.ts +13 -0
- package/package.json +4 -3
- package/dist/server/controllers/product.d.ts +0 -12
- package/dist/server/controllers/subscription.d.ts +0 -12
- package/dist/server/services/product.d.ts +0 -7
- package/dist/server/services/subscription.d.ts +0 -7
- package/dist/server/src/controllers/productController.d.ts +0 -9
- package/dist/server/src/controllers/subscriptionController.d.ts +0 -9
- package/dist/server/src/routes/subscription-routes.d.ts +0 -13
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* An asynchronous bootstrap function that runs before
|
|
3
|
+
* your application gets started.
|
|
4
|
+
*
|
|
5
|
+
* This gives you an opportunity to set up your data
|
|
6
|
+
* model, run jobs, or perform some special logic.
|
|
7
|
+
*/
|
|
8
|
+
declare const _default: ({ strapi }: {
|
|
9
|
+
strapi: any;
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
export default _default;
|
|
@@ -1,2 +1,124 @@
|
|
|
1
|
-
declare const _default: {
|
|
1
|
+
declare const _default: {
|
|
2
|
+
product: {
|
|
3
|
+
schema: {
|
|
4
|
+
kind: string;
|
|
5
|
+
collectionName: string;
|
|
6
|
+
info: {
|
|
7
|
+
singularName: string;
|
|
8
|
+
pluralName: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
options: {
|
|
13
|
+
draftAndPublish: boolean;
|
|
14
|
+
};
|
|
15
|
+
pluginOptions: {
|
|
16
|
+
"content-manager": {
|
|
17
|
+
visible: boolean;
|
|
18
|
+
};
|
|
19
|
+
"content-type-builder": {
|
|
20
|
+
visible: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
attributes: {
|
|
24
|
+
name: {
|
|
25
|
+
type: string;
|
|
26
|
+
required: boolean;
|
|
27
|
+
};
|
|
28
|
+
description: {
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
price: {
|
|
32
|
+
type: string;
|
|
33
|
+
required: boolean;
|
|
34
|
+
};
|
|
35
|
+
currency: {
|
|
36
|
+
type: string;
|
|
37
|
+
required: boolean;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
isSubscription: {
|
|
41
|
+
type: string;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
subscriptionInterval: {
|
|
45
|
+
type: string;
|
|
46
|
+
enum: string[];
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
stripeProductId: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
paypalProductId: {
|
|
53
|
+
type: string;
|
|
54
|
+
};
|
|
55
|
+
createdAt: {
|
|
56
|
+
type: string;
|
|
57
|
+
};
|
|
58
|
+
updatedAt: {
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
subscription: {
|
|
65
|
+
schema: {
|
|
66
|
+
kind: string;
|
|
67
|
+
collectionName: string;
|
|
68
|
+
info: {
|
|
69
|
+
singularName: string;
|
|
70
|
+
pluralName: string;
|
|
71
|
+
displayName: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
options: {
|
|
75
|
+
draftAndPublish: boolean;
|
|
76
|
+
};
|
|
77
|
+
pluginOptions: {
|
|
78
|
+
"content-manager": {
|
|
79
|
+
visible: boolean;
|
|
80
|
+
};
|
|
81
|
+
"content-type-builder": {
|
|
82
|
+
visible: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
attributes: {
|
|
86
|
+
user: {
|
|
87
|
+
type: string;
|
|
88
|
+
relation: string;
|
|
89
|
+
target: string;
|
|
90
|
+
};
|
|
91
|
+
product: {
|
|
92
|
+
type: string;
|
|
93
|
+
relation: string;
|
|
94
|
+
target: string;
|
|
95
|
+
};
|
|
96
|
+
status: {
|
|
97
|
+
type: string;
|
|
98
|
+
enum: string[];
|
|
99
|
+
default: string;
|
|
100
|
+
};
|
|
101
|
+
startDate: {
|
|
102
|
+
type: string;
|
|
103
|
+
required: boolean;
|
|
104
|
+
};
|
|
105
|
+
endDate: {
|
|
106
|
+
type: string;
|
|
107
|
+
};
|
|
108
|
+
stripeSubscriptionId: {
|
|
109
|
+
type: string;
|
|
110
|
+
};
|
|
111
|
+
paypalSubscriptionId: {
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
createdAt: {
|
|
115
|
+
type: string;
|
|
116
|
+
};
|
|
117
|
+
updatedAt: {
|
|
118
|
+
type: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
2
124
|
export default _default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
schema: {
|
|
3
|
+
kind: string;
|
|
4
|
+
collectionName: string;
|
|
5
|
+
info: {
|
|
6
|
+
singularName: string;
|
|
7
|
+
pluralName: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
options: {
|
|
12
|
+
draftAndPublish: boolean;
|
|
13
|
+
};
|
|
14
|
+
pluginOptions: {
|
|
15
|
+
"content-manager": {
|
|
16
|
+
visible: boolean;
|
|
17
|
+
};
|
|
18
|
+
"content-type-builder": {
|
|
19
|
+
visible: boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
attributes: {
|
|
23
|
+
name: {
|
|
24
|
+
type: string;
|
|
25
|
+
required: boolean;
|
|
26
|
+
};
|
|
27
|
+
description: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
price: {
|
|
31
|
+
type: string;
|
|
32
|
+
required: boolean;
|
|
33
|
+
};
|
|
34
|
+
currency: {
|
|
35
|
+
type: string;
|
|
36
|
+
required: boolean;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
isSubscription: {
|
|
40
|
+
type: string;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
subscriptionInterval: {
|
|
44
|
+
type: string;
|
|
45
|
+
enum: string[];
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
stripeProductId: {
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
paypalProductId: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
createdAt: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
updatedAt: {
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
schema: {
|
|
3
|
+
kind: string;
|
|
4
|
+
collectionName: string;
|
|
5
|
+
info: {
|
|
6
|
+
singularName: string;
|
|
7
|
+
pluralName: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
options: {
|
|
12
|
+
draftAndPublish: boolean;
|
|
13
|
+
};
|
|
14
|
+
pluginOptions: {
|
|
15
|
+
"content-manager": {
|
|
16
|
+
visible: boolean;
|
|
17
|
+
};
|
|
18
|
+
"content-type-builder": {
|
|
19
|
+
visible: boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
attributes: {
|
|
23
|
+
user: {
|
|
24
|
+
type: string;
|
|
25
|
+
relation: string;
|
|
26
|
+
target: string;
|
|
27
|
+
};
|
|
28
|
+
product: {
|
|
29
|
+
type: string;
|
|
30
|
+
relation: string;
|
|
31
|
+
target: string;
|
|
32
|
+
};
|
|
33
|
+
status: {
|
|
34
|
+
type: string;
|
|
35
|
+
enum: string[];
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
startDate: {
|
|
39
|
+
type: string;
|
|
40
|
+
required: boolean;
|
|
41
|
+
};
|
|
42
|
+
endDate: {
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
stripeSubscriptionId: {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
paypalSubscriptionId: {
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
createdAt: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
updatedAt: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
declare const _default: {
|
|
1
|
+
declare const _default: ({ strapi }: {
|
|
2
|
+
strapi: any;
|
|
3
|
+
}) => {
|
|
2
4
|
initiatePayment(ctx: any): Promise<void>;
|
|
3
5
|
processWebhook(ctx: any): Promise<void>;
|
|
4
6
|
refundPayment(ctx: any): Promise<void>;
|
|
@@ -6,5 +8,7 @@ declare const _default: {
|
|
|
6
8
|
getTransactions(ctx: any): Promise<void>;
|
|
7
9
|
saveConfiguration(ctx: any): Promise<void>;
|
|
8
10
|
getConfigStatus(ctx: any): Promise<void>;
|
|
11
|
+
testPayment(ctx: any): Promise<void>;
|
|
12
|
+
testPaymentWithRedirect(ctx: any): Promise<void>;
|
|
9
13
|
};
|
|
10
14
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="koa" />
|
|
2
2
|
declare const _default: {
|
|
3
|
-
controller: {
|
|
3
|
+
controller: ({ strapi }: {
|
|
4
|
+
strapi: any;
|
|
5
|
+
}) => {
|
|
4
6
|
initiatePayment(ctx: any): Promise<void>;
|
|
5
7
|
processWebhook(ctx: any): Promise<void>;
|
|
6
8
|
refundPayment(ctx: any): Promise<void>;
|
|
@@ -8,34 +10,32 @@ declare const _default: {
|
|
|
8
10
|
getTransactions(ctx: any): Promise<void>;
|
|
9
11
|
saveConfiguration(ctx: any): Promise<void>;
|
|
10
12
|
getConfigStatus(ctx: any): Promise<void>;
|
|
13
|
+
testPayment(ctx: any): Promise<void>;
|
|
14
|
+
testPaymentWithRedirect(ctx: any): Promise<void>;
|
|
11
15
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
create(ctx: import("koa").Context)
|
|
16
|
-
update(ctx: import("koa").Context)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
create(ctx: import("koa").Context): Promise<void>;
|
|
37
|
-
update(ctx: import("koa").Context): Promise<void>;
|
|
38
|
-
delete(ctx: import("koa").Context): Promise<void>;
|
|
39
|
-
};
|
|
16
|
+
product: ({ strapi, }: {
|
|
17
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
18
|
+
}) => {
|
|
19
|
+
create: (ctx: import("koa").Context) => Promise<void>;
|
|
20
|
+
update: (ctx: import("koa").Context) => Promise<void>;
|
|
21
|
+
find: (ctx: import("koa").Context) => Promise<void>;
|
|
22
|
+
findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
23
|
+
delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
24
|
+
sync: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
25
|
+
getStripeProducts: (ctx: import("koa").Context) => Promise<void>;
|
|
26
|
+
importFromStripe: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
27
|
+
createPaymentLink: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
28
|
+
} & import("@strapi/types/dist/core/core-api/controller").Base;
|
|
29
|
+
subscription: ({ strapi, }: {
|
|
30
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
31
|
+
}) => {
|
|
32
|
+
create: (ctx: import("koa").Context) => Promise<void>;
|
|
33
|
+
update: (ctx: import("koa").Context) => Promise<void>;
|
|
34
|
+
find: (ctx: import("koa").Context) => Promise<void>;
|
|
35
|
+
findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
36
|
+
delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
37
|
+
sync: (ctx: import("koa").Context) => Promise<void>;
|
|
38
|
+
cancel: (ctx: import("koa").Context) => Promise<void>;
|
|
39
|
+
} & import("@strapi/types/dist/core/core-api/controller").Base;
|
|
40
40
|
};
|
|
41
41
|
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* controller
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="koa" />
|
|
5
|
+
declare const _default: ({ strapi, }: {
|
|
6
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
7
|
+
}) => {
|
|
8
|
+
create: (ctx: import("koa").Context) => Promise<void>;
|
|
9
|
+
update: (ctx: import("koa").Context) => Promise<void>;
|
|
10
|
+
find: (ctx: import("koa").Context) => Promise<void>;
|
|
11
|
+
findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
12
|
+
delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
13
|
+
sync: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
14
|
+
getStripeProducts: (ctx: import("koa").Context) => Promise<void>;
|
|
15
|
+
importFromStripe: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
16
|
+
createPaymentLink: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
17
|
+
} & import("@strapi/types/dist/core/core-api/controller").Base;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* controller
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="koa" />
|
|
5
|
+
declare const _default: ({ strapi, }: {
|
|
6
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
7
|
+
}) => {
|
|
8
|
+
create: (ctx: import("koa").Context) => Promise<void>;
|
|
9
|
+
update: (ctx: import("koa").Context) => Promise<void>;
|
|
10
|
+
find: (ctx: import("koa").Context) => Promise<void>;
|
|
11
|
+
findOne: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
12
|
+
delete: (ctx: import("koa").Context) => Promise<import("koa").Context>;
|
|
13
|
+
sync: (ctx: import("koa").Context) => Promise<void>;
|
|
14
|
+
cancel: (ctx: import("koa").Context) => Promise<void>;
|
|
15
|
+
} & import("@strapi/types/dist/core/core-api/controller").Base;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* webhook controller
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="koa" />
|
|
5
|
+
declare const _default: ({ strapi, }: {
|
|
6
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
7
|
+
}) => {
|
|
8
|
+
process: (ctx: import("koa").Context) => Promise<void>;
|
|
9
|
+
} & import("@strapi/types/dist/core/core-api/controller").Base;
|
|
10
|
+
export default _default;
|