@pristine-ts/stripe 0.0.372 → 0.0.374
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/dist/lib/cjs/clients/stripe.client.js +12 -2
- package/dist/lib/cjs/clients/stripe.client.js.map +1 -1
- package/dist/lib/cjs/managers/stripe-webhooks.manager.js +22 -2
- package/dist/lib/cjs/managers/stripe-webhooks.manager.js.map +1 -1
- package/dist/lib/esm/clients/stripe.client.js +12 -2
- package/dist/lib/esm/clients/stripe.client.js.map +1 -1
- package/dist/lib/esm/managers/stripe-webhooks.manager.js +22 -2
- package/dist/lib/esm/managers/stripe-webhooks.manager.js.map +1 -1
- package/package.json +6 -6
|
@@ -60,6 +60,7 @@ let StripeClient = class StripeClient {
|
|
|
60
60
|
* @param stripeSigningEndpointSecret The endpoint secret that stripe uses to sign the request.
|
|
61
61
|
*/
|
|
62
62
|
verifySignature(request, stripeSigningEndpointSecret) {
|
|
63
|
+
var _a;
|
|
63
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
65
|
if (!request.headers || !request.headers['stripe-signature']) {
|
|
65
66
|
throw new stripe_authentication_error_1.StripeAuthenticationError(400, 'Missing headers for stripe signature');
|
|
@@ -68,8 +69,17 @@ let StripeClient = class StripeClient {
|
|
|
68
69
|
try {
|
|
69
70
|
return this.getStripeClient().webhooks.constructEvent(request.rawBody, stripeSignature, stripeSigningEndpointSecret);
|
|
70
71
|
}
|
|
71
|
-
catch (
|
|
72
|
-
this.logHandler.error("StripeClient: Error with stripe signature.", {
|
|
72
|
+
catch (error) {
|
|
73
|
+
this.logHandler.error("StripeClient: Error with stripe signature.", {
|
|
74
|
+
highlights: {
|
|
75
|
+
errorMessage: (_a = error.message) !== null && _a !== void 0 ? _a : "Unknown error",
|
|
76
|
+
requestUrl: `${request.httpMethod} ${request.url}`,
|
|
77
|
+
},
|
|
78
|
+
extra: {
|
|
79
|
+
request,
|
|
80
|
+
error,
|
|
81
|
+
}
|
|
82
|
+
}, stripe_module_keyname_1.StripeModuleKeyname);
|
|
73
83
|
throw new stripe_authentication_error_1.StripeAuthenticationError(400, 'Raw body does not match stripe signature');
|
|
74
84
|
}
|
|
75
85
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.client.js","sourceRoot":"","sources":["../../../../src/clients/stripe.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAE5C,gDAAwC;AAExC,uFAAgF;AAChF,oEAA6D;AAC7D,oDAA4B;AAG5B;;;GAGG;AAGI,IAAM,YAAY,GAAlB,MAAM,YAAY;IAQrB;;;;;OAKG;IACH,YACoD,UAA+B,EACb,YAAoB;QADtC,eAAU,GAAV,UAAU,CAAqB;QACb,iBAAY,GAAZ,YAAY,CAAQ;IAE1F,CAAC;IAED;;OAEG;IACH,eAAe;;QACX,OAAO,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,gBAAM,CAAC,IAAI,CAAC,YAAY,EAAE;YAC9D,UAAU,EAAE,YAAY;SAC3B,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACG,eAAe,CAAC,OAAgB,EAAE,2BAAmC
|
|
1
|
+
{"version":3,"file":"stripe.client.js","sourceRoot":"","sources":["../../../../src/clients/stripe.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAE5C,gDAAwC;AAExC,uFAAgF;AAChF,oEAA6D;AAC7D,oDAA4B;AAG5B;;;GAGG;AAGI,IAAM,YAAY,GAAlB,MAAM,YAAY;IAQrB;;;;;OAKG;IACH,YACoD,UAA+B,EACb,YAAoB;QADtC,eAAU,GAAV,UAAU,CAAqB;QACb,iBAAY,GAAZ,YAAY,CAAQ;IAE1F,CAAC;IAED;;OAEG;IACH,eAAe;;QACX,OAAO,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,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,17 @@ let StripeWebhooksManager = StripeWebhooksManager_1 = class StripeWebhooksManage
|
|
|
54
54
|
const event = yield this.stripeClient.verifySignature(request, stripeSigningEndpointSecret);
|
|
55
55
|
// For the moment we only handle subscription events.
|
|
56
56
|
if (!event.type.startsWith('customer.subscription')) {
|
|
57
|
-
this.logHandler.error("StripeWebhooksManager: Stripe event is not a subscription, make sure to only send subscription events to this webhook.", {
|
|
57
|
+
this.logHandler.error("StripeWebhooksManager: Stripe event is not a subscription, make sure to only send subscription events to this webhook.", {
|
|
58
|
+
highlights: {
|
|
59
|
+
stripeEventId: event.id,
|
|
60
|
+
requestUrl: `${request.httpMethod} ${request.url}`,
|
|
61
|
+
},
|
|
62
|
+
extra: {
|
|
63
|
+
className: StripeWebhooksManager_1.name,
|
|
64
|
+
request,
|
|
65
|
+
event,
|
|
66
|
+
}
|
|
67
|
+
}, stripe_module_keyname_1.StripeModuleKeyname);
|
|
58
68
|
throw new Error("Event is not a subscription");
|
|
59
69
|
}
|
|
60
70
|
const stripeSubscription = event.data.object;
|
|
@@ -86,7 +96,17 @@ let StripeWebhooksManager = StripeWebhooksManager_1 = class StripeWebhooksManage
|
|
|
86
96
|
type = stripe_event_type_enum_1.StripeEventTypeEnum.StripeSubscriptionPendingUpdateExpired;
|
|
87
97
|
break;
|
|
88
98
|
default:
|
|
89
|
-
yield this.logHandler.debug("StripeWebhooksManager: This event type is not supported.", {
|
|
99
|
+
yield this.logHandler.debug("StripeWebhooksManager: This event type is not supported.", {
|
|
100
|
+
highlights: {
|
|
101
|
+
stripeEventId: event.id,
|
|
102
|
+
requestUrl: `${request.httpMethod} ${request.url}`,
|
|
103
|
+
},
|
|
104
|
+
extra: {
|
|
105
|
+
className: StripeWebhooksManager_1.name,
|
|
106
|
+
request,
|
|
107
|
+
event,
|
|
108
|
+
}
|
|
109
|
+
}, stripe_module_keyname_1.StripeModuleKeyname);
|
|
90
110
|
return Promise.resolve();
|
|
91
111
|
}
|
|
92
112
|
// Because we check before and resolve before getting here.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-webhooks.manager.js","sourceRoot":"","sources":["../../../../src/managers/stripe-webhooks.manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAG5C,4CAAyD;AACzD,4EAAoE;AACpE,4DAAsD;AACtD,oEAA6D;AAG7D;;GAEG;AAEI,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAE9B;;;;;OAKG;IACH,YACqB,eAAgC,EAChC,YAA0B,EACK,UAA+B;QAF9D,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QACK,eAAU,GAAV,UAAU,CAAqB;IAChF,CAAC;IAEJ;;;;OAIG;IACG,qBAAqB,CAAC,OAAgB,EAAE,2BAAmC;;YAC7E,sDAAsD;YACtD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,OAAO,EAAE,2BAA2B,CAAC,CAAC;YAE5F,qDAAqD;YACrD,IAAG,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC;gBACjD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,wHAAwH,EAAE,
|
|
1
|
+
{"version":3,"file":"stripe-webhooks.manager.js","sourceRoot":"","sources":["../../../../src/managers/stripe-webhooks.manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAG5C,4CAAyD;AACzD,4EAAoE;AACpE,4DAAsD;AACtD,oEAA6D;AAG7D;;GAEG;AAEI,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAE9B;;;;;OAKG;IACH,YACqB,eAAgC,EAChC,YAA0B,EACK,UAA+B;QAF9D,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QACK,eAAU,GAAV,UAAU,CAAqB;IAChF,CAAC;IAEJ;;;;OAIG;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,4CAAmB,CAAC,8BAA8B,CAAA;oBACzD,MAAM;gBACV,KAAK,8CAA8C;oBAC/C,IAAI,GAAG,4CAAmB,CAAC,sCAAsC,CAAA;oBACjE,MAAM;gBACV,KAAK,8CAA8C;oBAC/C,IAAI,GAAG,4CAAmB,CAAC,sCAAsC,CAAA;oBACjE,MAAM;gBACV;oBACI,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,0DAA0D,EAAE;wBACtF,UAAU,EAAE;4BACV,aAAa,EAAE,KAAK,CAAC,EAAE;4BACvB,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE;yBACnD;wBACD,KAAK,EAAE;4BACL,SAAS,EAAE,uBAAqB,CAAC,IAAI;4BACrC,OAAO;4BACP,KAAK;yBACN;qBACF,EAAE,2CAAmB,CAAC,CAAC;oBACxB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;YACjC,CAAC;YAGD,2DAA2D;YAC3D,oEAAoE;YACpE,MAAM,WAAW,GAAG,IAAI,YAAK,CAAC,IAAK,EAAE,kBAAkB,CAAC,CAAA;YAExD,sBAAsB;YACtB,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;QACpD,CAAC;KAAA;CACJ,CAAA;AA5FY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,qBAAU,GAAE;IAYJ,WAAA,IAAA,iBAAM,EAAC,qBAAqB,CAAC,CAAA;qCAFI,sBAAe;QAClB,4BAAY;GAVtC,qBAAqB,CA4FjC"}
|
|
@@ -54,6 +54,7 @@ let StripeClient = class StripeClient {
|
|
|
54
54
|
* @param stripeSigningEndpointSecret The endpoint secret that stripe uses to sign the request.
|
|
55
55
|
*/
|
|
56
56
|
verifySignature(request, stripeSigningEndpointSecret) {
|
|
57
|
+
var _a;
|
|
57
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
59
|
if (!request.headers || !request.headers['stripe-signature']) {
|
|
59
60
|
throw new StripeAuthenticationError(400, 'Missing headers for stripe signature');
|
|
@@ -62,8 +63,17 @@ let StripeClient = class StripeClient {
|
|
|
62
63
|
try {
|
|
63
64
|
return this.getStripeClient().webhooks.constructEvent(request.rawBody, stripeSignature, stripeSigningEndpointSecret);
|
|
64
65
|
}
|
|
65
|
-
catch (
|
|
66
|
-
this.logHandler.error("StripeClient: Error with stripe signature.", {
|
|
66
|
+
catch (error) {
|
|
67
|
+
this.logHandler.error("StripeClient: Error with stripe signature.", {
|
|
68
|
+
highlights: {
|
|
69
|
+
errorMessage: (_a = error.message) !== null && _a !== void 0 ? _a : "Unknown error",
|
|
70
|
+
requestUrl: `${request.httpMethod} ${request.url}`,
|
|
71
|
+
},
|
|
72
|
+
extra: {
|
|
73
|
+
request,
|
|
74
|
+
error,
|
|
75
|
+
}
|
|
76
|
+
}, StripeModuleKeyname);
|
|
67
77
|
throw new StripeAuthenticationError(400, 'Raw body does not match stripe signature');
|
|
68
78
|
}
|
|
69
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.client.js","sourceRoot":"","sources":["../../../../src/clients/stripe.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAC,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAExC,OAAO,EAAC,yBAAyB,EAAC,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC7D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B;;;GAGG;AAGI,IAAM,YAAY,GAAlB,MAAM,YAAY;IAQrB;;;;;OAKG;IACH,YACoD,UAA+B,EACb,YAAoB;QADtC,eAAU,GAAV,UAAU,CAAqB;QACb,iBAAY,GAAZ,YAAY,CAAQ;IAE1F,CAAC;IAED;;OAEG;IACH,eAAe;;QACX,OAAO,IAAI,CAAC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D,IAAI,CAAC;gBACD,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,eAAe,EAAE,2BAA2B,CAAC,CAAC;YACzH,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBAClB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,4CAA4C,EAAE;oBAChE,UAAU,EAAE;wBACR,YAAY,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,eAAe;wBAC9C,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE;qBACrD;oBACD,KAAK,EAAE;wBACH,OAAO;wBACP,KAAK;qBACR;iBACJ,EAAE,mBAAmB,CAAC,CAAC;gBACxB,MAAM,IAAI,yBAAyB,CAAC,GAAG,EAAE,0CAA0C,CAAC,CAAC;YACzF,CAAC;;KACJ;CACJ,CAAA;AAzDY,YAAY;IAFxB,GAAG,CAAC,uBAAuB,CAAC;IAC5B,UAAU,EAAE;IAgBJ,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAC7B,WAAA,MAAM,CAAC,IAAI,mBAAmB,gBAAgB,CAAC,CAAA;;GAhB3C,YAAY,CAyDxB"}
|
|
@@ -51,7 +51,17 @@ let StripeWebhooksManager = StripeWebhooksManager_1 = class StripeWebhooksManage
|
|
|
51
51
|
const event = yield this.stripeClient.verifySignature(request, stripeSigningEndpointSecret);
|
|
52
52
|
// For the moment we only handle subscription events.
|
|
53
53
|
if (!event.type.startsWith('customer.subscription')) {
|
|
54
|
-
this.logHandler.error("StripeWebhooksManager: Stripe event is not a subscription, make sure to only send subscription events to this webhook.", {
|
|
54
|
+
this.logHandler.error("StripeWebhooksManager: Stripe event is not a subscription, make sure to only send subscription events to this webhook.", {
|
|
55
|
+
highlights: {
|
|
56
|
+
stripeEventId: event.id,
|
|
57
|
+
requestUrl: `${request.httpMethod} ${request.url}`,
|
|
58
|
+
},
|
|
59
|
+
extra: {
|
|
60
|
+
className: StripeWebhooksManager_1.name,
|
|
61
|
+
request,
|
|
62
|
+
event,
|
|
63
|
+
}
|
|
64
|
+
}, StripeModuleKeyname);
|
|
55
65
|
throw new Error("Event is not a subscription");
|
|
56
66
|
}
|
|
57
67
|
const stripeSubscription = event.data.object;
|
|
@@ -83,7 +93,17 @@ let StripeWebhooksManager = StripeWebhooksManager_1 = class StripeWebhooksManage
|
|
|
83
93
|
type = StripeEventTypeEnum.StripeSubscriptionPendingUpdateExpired;
|
|
84
94
|
break;
|
|
85
95
|
default:
|
|
86
|
-
yield this.logHandler.debug("StripeWebhooksManager: This event type is not supported.", {
|
|
96
|
+
yield this.logHandler.debug("StripeWebhooksManager: This event type is not supported.", {
|
|
97
|
+
highlights: {
|
|
98
|
+
stripeEventId: event.id,
|
|
99
|
+
requestUrl: `${request.httpMethod} ${request.url}`,
|
|
100
|
+
},
|
|
101
|
+
extra: {
|
|
102
|
+
className: StripeWebhooksManager_1.name,
|
|
103
|
+
request,
|
|
104
|
+
event,
|
|
105
|
+
}
|
|
106
|
+
}, StripeModuleKeyname);
|
|
87
107
|
return Promise.resolve();
|
|
88
108
|
}
|
|
89
109
|
// Because we check before and resolve before getting here.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-webhooks.manager.js","sourceRoot":"","sources":["../../../../src/managers/stripe-webhooks.manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAG5C,OAAO,EAAC,KAAK,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,mBAAmB,EAAC,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAG7D;;GAEG;AAEI,IAAM,qBAAqB,6BAA3B,MAAM,qBA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AAG,mBAAmB,CAAC,sCAAsC,CAAA;oBACjE,MAAM;gBACV,KAAK,8CAA8C;oBAC/C,IAAI,GAAG,mBAAmB,CAAC,sCAAsC,CAAA;oBACjE,MAAM;gBACV;oBACI,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,0DAA0D,EAAE;wBACtF,UAAU,EAAE;4BACV,aAAa,EAAE,KAAK,CAAC,EAAE;4BACvB,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE;yBACnD;wBACD,KAAK,EAAE;4BACL,SAAS,EAAE,uBAAqB,CAAC,IAAI;4BACrC,OAAO;4BACP,KAAK;yBACN;qBACF,EAAE,mBAAmB,CAAC,CAAC;oBACxB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;YACjC,CAAC;YAGD,2DAA2D;YAC3D,oEAAoE;YACpE,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,IAAK,EAAE,kBAAkB,CAAC,CAAA;YAExD,sBAAsB;YACtB,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;QACpD,CAAC;KAAA;CACJ,CAAA;AA5FY,qBAAqB;IADjC,UAAU,EAAE;IAYJ,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;qCAFI,eAAe;QAClB,YAAY;GAVtC,qBAAqB,CA4FjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pristine-ts/stripe",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.374",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "dist/lib/esm/stripe.module.js",
|
|
6
6
|
"main": "dist/lib/cjs/stripe.module.js",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"test:cov": "jest --coverage"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@pristine-ts/common": "^0.0.
|
|
16
|
-
"@pristine-ts/core": "^0.0.
|
|
17
|
-
"@pristine-ts/logging": "^0.0.
|
|
18
|
-
"@pristine-ts/networking": "^0.0.
|
|
15
|
+
"@pristine-ts/common": "^0.0.374",
|
|
16
|
+
"@pristine-ts/core": "^0.0.374",
|
|
17
|
+
"@pristine-ts/logging": "^0.0.374",
|
|
18
|
+
"@pristine-ts/networking": "^0.0.374",
|
|
19
19
|
"stripe": "^14.2.0"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"src/*.{js,ts}"
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "d553e7687a35c295579f7b09ec68091928d27209"
|
|
64
64
|
}
|