@pristine-ts/stripe 0.0.173 → 0.0.177
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.map +1 -1
- package/dist/lib/cjs/managers/stripe-webhooks.manager.js +3 -3
- package/dist/lib/cjs/managers/stripe-webhooks.manager.js.map +1 -1
- package/dist/lib/cjs/stripe.module.js +4 -1
- package/dist/lib/cjs/stripe.module.js.map +1 -1
- package/dist/lib/esm/clients/stripe.client.js.map +1 -1
- package/dist/lib/esm/managers/stripe-webhooks.manager.js +1 -1
- package/dist/lib/esm/managers/stripe-webhooks.manager.js.map +1 -1
- package/dist/lib/esm/stripe.module.js +4 -1
- package/dist/lib/esm/stripe.module.js.map +1 -1
- package/dist/types/clients/stripe.client.d.ts +2 -2
- package/dist/types/interfaces/stripe-client.interface.d.ts +2 -2
- package/dist/types/managers/stripe-webhooks.manager.d.ts +3 -3
- package/package.json +6 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.client.js","sourceRoot":"","sources":["../../../../src/clients/stripe.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAE5C,
|
|
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;AAK5B,IAAa,YAAY,GAAzB,MAAa,YAAY;IAIrB,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;;YACvE,IAAG,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE;gBACzD,MAAM,IAAI,uDAAyB,CAAC,GAAG,EAAE,sCAAsC,CAAC,CAAC;aACpF;YAED,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;YAE5D,IAAI;gBACA,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,eAAe,EAAE,2BAA2B,CAAC,CAAC;aACxH;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAC,EAAE,2CAAmB,CAAC,CAAC;gBACjG,MAAM,IAAI,uDAAyB,CAAC,GAAG,EAAE,0CAA0C,CAAC,CAAC;aACxF;QACL,CAAC;KAAA;CACJ,CAAA;AAtCY,YAAY;IAFxB,YAAG,CAAC,uBAAuB,CAAC;IAC5B,qBAAU,EAAE;IAMJ,WAAA,iBAAM,CAAC,qBAAqB,CAAC,CAAA;IAC7B,WAAA,iBAAM,CAAC,IAAI,2CAAmB,gBAAgB,CAAC,CAAA;;GAN3C,YAAY,CAsCxB;AAtCY,oCAAY"}
|
|
@@ -24,7 +24,7 @@ var StripeWebhooksManager_1;
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.StripeWebhooksManager = void 0;
|
|
26
26
|
const tsyringe_1 = require("tsyringe");
|
|
27
|
-
const
|
|
27
|
+
const core_1 = require("@pristine-ts/core");
|
|
28
28
|
const stripe_event_type_enum_1 = require("../enums/stripe-event-type.enum");
|
|
29
29
|
const stripe_client_1 = require("../clients/stripe.client");
|
|
30
30
|
const stripe_module_keyname_1 = require("../stripe.module.keyname");
|
|
@@ -62,7 +62,7 @@ let StripeWebhooksManager = StripeWebhooksManager_1 = class StripeWebhooksManage
|
|
|
62
62
|
yield this.logHandler.debug("This event type is not supported", { event, className: StripeWebhooksManager_1.name }, stripe_module_keyname_1.StripeModuleKeyname);
|
|
63
63
|
return Promise.resolve();
|
|
64
64
|
}
|
|
65
|
-
const parsedEvent = new
|
|
65
|
+
const parsedEvent = new core_1.Event(type, stripeSubscription);
|
|
66
66
|
yield this.eventDispatcher.dispatch(parsedEvent);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
@@ -70,7 +70,7 @@ let StripeWebhooksManager = StripeWebhooksManager_1 = class StripeWebhooksManage
|
|
|
70
70
|
StripeWebhooksManager = StripeWebhooksManager_1 = __decorate([
|
|
71
71
|
tsyringe_1.injectable(),
|
|
72
72
|
__param(2, tsyringe_1.inject("LogHandlerInterface")),
|
|
73
|
-
__metadata("design:paramtypes", [
|
|
73
|
+
__metadata("design:paramtypes", [core_1.EventDispatcher,
|
|
74
74
|
stripe_client_1.StripeClient, Object])
|
|
75
75
|
], StripeWebhooksManager);
|
|
76
76
|
exports.StripeWebhooksManager = StripeWebhooksManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe-webhooks.manager.js","sourceRoot":"","sources":["../../../../src/managers/stripe-webhooks.manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAG5C,
|
|
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;AAI7D,IAAa,qBAAqB,6BAAlC,MAAa,qBAAqB;IAC9B,YACqB,eAAgC,EAChC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AC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;QACpD,CAAC;KAAA;CACJ,CAAA;AA3CY,qBAAqB;IADjC,qBAAU,EAAE;IAKJ,WAAA,iBAAM,CAAC,qBAAqB,CAAC,CAAA;qCAFI,sBAAe;QAClB,4BAAY;GAHtC,qBAAqB,CA2CjC;AA3CY,sDAAqB"}
|
|
@@ -12,6 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.StripeModule = void 0;
|
|
14
14
|
const stripe_module_keyname_1 = require("./stripe.module.keyname");
|
|
15
|
+
const networking_1 = require("@pristine-ts/networking");
|
|
15
16
|
__exportStar(require("./clients/clients"), exports);
|
|
16
17
|
__exportStar(require("./enums/enums"), exports);
|
|
17
18
|
__exportStar(require("./errors/errors"), exports);
|
|
@@ -26,6 +27,8 @@ exports.StripeModule = {
|
|
|
26
27
|
isRequired: true,
|
|
27
28
|
}
|
|
28
29
|
],
|
|
29
|
-
importModules: [
|
|
30
|
+
importModules: [
|
|
31
|
+
networking_1.NetworkingModule,
|
|
32
|
+
],
|
|
30
33
|
};
|
|
31
34
|
//# sourceMappingURL=stripe.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.module.js","sourceRoot":"","sources":["../../../src/stripe.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,mEAA4D;
|
|
1
|
+
{"version":3,"file":"stripe.module.js","sourceRoot":"","sources":["../../../src/stripe.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,mEAA4D;AAC5D,wDAAyD;AAEzD,oDAAkC;AAClC,gDAA8B;AAC9B,kDAAgC;AAChC,0DAAwC;AACxC,sDAAoC;AACpC,0DAAwC;AAE3B,QAAA,YAAY,GAAoB;IACzC,OAAO,EAAE,2CAAmB;IAC5B,wBAAwB,EAAE;QACtB;YACI,aAAa,EAAE,2CAAmB,GAAG,eAAe;YACpD,UAAU,EAAE,IAAI;SACnB;KACJ;IACD,aAAa,EAAE;QACX,6BAAgB;KACnB;CACJ,CAAA"}
|
|
@@ -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,
|
|
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;AAK5B,IAAa,YAAY,GAAzB,MAAa,YAAY;IAIrB,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,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE;YAC9D,UAAU,EAAE,YAAY;SAC3B,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACG,eAAe,CAAC,OAAgB,EAAE,2BAAmC;;YACvE,IAAG,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE;gBACzD,MAAM,IAAI,yBAAyB,CAAC,GAAG,EAAE,sCAAsC,CAAC,CAAC;aACpF;YAED,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;YAE5D,IAAI;gBACA,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,eAAe,EAAE,2BAA2B,CAAC,CAAC;aACxH;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAC,EAAE,mBAAmB,CAAC,CAAC;gBACjG,MAAM,IAAI,yBAAyB,CAAC,GAAG,EAAE,0CAA0C,CAAC,CAAC;aACxF;QACL,CAAC;KAAA;CACJ,CAAA;AAtCY,YAAY;IAFxB,GAAG,CAAC,uBAAuB,CAAC;IAC5B,UAAU,EAAE;IAMJ,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;IAC7B,WAAA,MAAM,CAAC,IAAI,mBAAmB,gBAAgB,CAAC,CAAA;;GAN3C,YAAY,CAsCxB;SAtCY,YAAY"}
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
};
|
|
22
22
|
var StripeWebhooksManager_1;
|
|
23
23
|
import { inject, injectable } from "tsyringe";
|
|
24
|
-
import { Event, EventDispatcher } from "@pristine-ts/
|
|
24
|
+
import { Event, EventDispatcher } from "@pristine-ts/core";
|
|
25
25
|
import { StripeEventTypeEnum } from "../enums/stripe-event-type.enum";
|
|
26
26
|
import { StripeClient } from "../clients/stripe.client";
|
|
27
27
|
import { StripeModuleKeyname } from "../stripe.module.keyname";
|
|
@@ -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;AAG5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;oBAChC,IAAI,GAAG,mBAAmB,CAAC,yBAAyB,CAAA;oBACpD,MAAM;gBACV,KAAK,+BAA+B;oBAChC,IAAI,GAAG,mBAAmB,CAAC,yBAAyB,CAAA;oBACpD,MAAM;gBACV,KAAK,+BAA+B;oBAChC,IAAI,GAAG,mBAAmB,CAAC,yBAAyB,CAAA;oBACpD,MAAM;gBACV;oBACI,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,kCAAkC,EAAE,EAAC,KAAK,EAAE,SAAS,EAAE,uBAAqB,CAAC,IAAI,EAAC,EAAE,mBAAmB,CAAC,CAAC;oBACrI,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;aAChC;YAED,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,IAAK,EAAE,kBAAkB,CAAC,CAAA;YAExD,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;QACpD,CAAC;KAAA;CACJ,CAAA;AA3CY,qBAAqB;IADjC,UAAU,EAAE;IAKJ,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;qCAFI,eAAe;QAClB,YAAY;GAHtC,qBAAqB,CA2CjC;SA3CY,qBAAqB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StripeModuleKeyname } from "./stripe.module.keyname";
|
|
2
|
+
import { NetworkingModule } from "@pristine-ts/networking";
|
|
2
3
|
export * from './clients/clients';
|
|
3
4
|
export * from './enums/enums';
|
|
4
5
|
export * from './errors/errors';
|
|
@@ -13,6 +14,8 @@ export const StripeModule = {
|
|
|
13
14
|
isRequired: true,
|
|
14
15
|
}
|
|
15
16
|
],
|
|
16
|
-
importModules: [
|
|
17
|
+
importModules: [
|
|
18
|
+
NetworkingModule,
|
|
19
|
+
],
|
|
17
20
|
};
|
|
18
21
|
//# sourceMappingURL=stripe.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.module.js","sourceRoot":"","sources":["../../../src/stripe.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"stripe.module.js","sourceRoot":"","sources":["../../../src/stripe.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAEzD,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AAExC,MAAM,CAAC,MAAM,YAAY,GAAoB;IACzC,OAAO,EAAE,mBAAmB;IAC5B,wBAAwB,EAAE;QACtB;YACI,aAAa,EAAE,mBAAmB,GAAG,eAAe;YACpD,UAAU,EAAE,IAAI;SACnB;KACJ;IACD,aAAa,EAAE;QACX,gBAAgB;KACnB;CACJ,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogHandlerInterface } from "@pristine-ts/logging";
|
|
2
|
-
import { RequestInterface } from "@pristine-ts/common";
|
|
3
2
|
import { StripeClientInterface } from "../interfaces/stripe-client.interface";
|
|
4
3
|
import Stripe from "stripe";
|
|
4
|
+
import { Request } from "@pristine-ts/common";
|
|
5
5
|
export declare class StripeClient implements StripeClientInterface {
|
|
6
6
|
private readonly logHandler;
|
|
7
7
|
private readonly stripeApiKey;
|
|
@@ -16,5 +16,5 @@ export declare class StripeClient implements StripeClientInterface {
|
|
|
16
16
|
* @param request The whole request received to the endpoint.
|
|
17
17
|
* @param stripeSigningEndpointSecret The endpoint secret that stripe uses to sign the request.
|
|
18
18
|
*/
|
|
19
|
-
verifySignature(request:
|
|
19
|
+
verifySignature(request: Request, stripeSigningEndpointSecret: string): Promise<Stripe.Event>;
|
|
20
20
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Stripe from "stripe";
|
|
2
|
-
import {
|
|
2
|
+
import { Request } from "@pristine-ts/common";
|
|
3
3
|
export interface StripeClientInterface {
|
|
4
4
|
/**
|
|
5
5
|
* Returns the Stripe client of the Stripe library with the api version '2020-08-27'
|
|
@@ -10,5 +10,5 @@ export interface StripeClientInterface {
|
|
|
10
10
|
* @param request The whole request received to the endpoint.
|
|
11
11
|
* @param stripeSigningEndpointSecret The endpoint secret that stripe uses to sign the request.
|
|
12
12
|
*/
|
|
13
|
-
verifySignature(request:
|
|
13
|
+
verifySignature(request: Request, stripeSigningEndpointSecret: string): Promise<Stripe.Event>;
|
|
14
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogHandlerInterface } from "@pristine-ts/logging";
|
|
2
|
-
import { EventDispatcher } from "@pristine-ts/
|
|
3
|
-
import { RequestInterface } from "@pristine-ts/common";
|
|
2
|
+
import { EventDispatcher } from "@pristine-ts/core";
|
|
4
3
|
import { StripeClient } from "../clients/stripe.client";
|
|
4
|
+
import { Request } from "@pristine-ts/common";
|
|
5
5
|
export declare class StripeWebhooksManager {
|
|
6
6
|
private readonly eventDispatcher;
|
|
7
7
|
private readonly stripeClient;
|
|
@@ -12,5 +12,5 @@ export declare class StripeWebhooksManager {
|
|
|
12
12
|
* @param request
|
|
13
13
|
* @param stripeSigningEndpointSecret
|
|
14
14
|
*/
|
|
15
|
-
emitSubscriptionEvent(request:
|
|
15
|
+
emitSubscriptionEvent(request: Request, stripeSigningEndpointSecret: string): Promise<void>;
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pristine-ts/stripe",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.177",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "dist/lib/esm/stripe.module.js",
|
|
6
6
|
"main": "dist/lib/cjs/stripe.module.js",
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
"test": "jest"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@pristine-ts/common": "^0.0.
|
|
15
|
-
"@pristine-ts/
|
|
16
|
-
"@pristine-ts/logging": "^0.0.
|
|
14
|
+
"@pristine-ts/common": "^0.0.177",
|
|
15
|
+
"@pristine-ts/core": "^0.0.177",
|
|
16
|
+
"@pristine-ts/logging": "^0.0.177",
|
|
17
|
+
"@pristine-ts/networking": "^0.0.177",
|
|
17
18
|
"stripe": "^8.161.0"
|
|
18
19
|
},
|
|
19
20
|
"files": [
|
|
@@ -58,5 +59,5 @@
|
|
|
58
59
|
"src/*.{js,ts}"
|
|
59
60
|
]
|
|
60
61
|
},
|
|
61
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "814886bbf3c28c5588cbd5f7bb9a2d5e323d6850"
|
|
62
63
|
}
|