@unchainedshop/core-payment 3.0.0-alpha3 → 3.0.0-alpha5
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UnchainedCore } from '@unchainedshop/core';
|
|
2
2
|
import { PaymentCredentialsModules } from './configurePaymentCredentialsModule.js';
|
|
3
3
|
import { PaymentProvidersModules } from './configurePaymentProvidersModule.js';
|
|
4
4
|
import { PaymentSettingsOptions } from '../payment-settings.js';
|
|
5
5
|
import { PaymentContext, PaymentCredentials as PaymentCredentialsType } from '../types.js';
|
|
6
|
+
import { ModuleInput } from '@unchainedshop/mongodb';
|
|
6
7
|
export type PaymentModule = {
|
|
7
8
|
registerCredentials: (paymentProviderId: string, paymentContext: PaymentContext, unchainedAPI: UnchainedCore) => Promise<PaymentCredentialsType>;
|
|
8
9
|
paymentProviders: PaymentProvidersModules;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurePaymentModule.d.ts","sourceRoot":"","sources":["../../src/module/configurePaymentModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"configurePaymentModule.d.ts","sourceRoot":"","sources":["../../src/module/configurePaymentModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAEL,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,uBAAuB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAmB,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG;IAK1B,mBAAmB,EAAE,CACnB,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,aAAa,KACxB,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAErC,gBAAgB,EAAE,uBAAuB,CAAC;IAM1C,kBAAkB,EAAE,yBAAyB,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,sBAAsB,qCAGhC,WAAW,CAAC,sBAAsB,CAAC,KAAG,OAAO,CAAC,aAAa,CAwC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurePaymentModule.js","sourceRoot":"","sources":["../../src/module/configurePaymentModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EACL,iCAAiC,GAElC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,+BAA+B,GAEhC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,eAAe,EAA0B,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"configurePaymentModule.js","sourceRoot":"","sources":["../../src/module/configurePaymentModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EACL,iCAAiC,GAElC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,+BAA+B,GAEhC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,eAAe,EAA0B,MAAM,wBAAwB,CAAC;AAuBjF,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EAAE,EAC3C,EAAE,EACF,OAAO,EAAE,cAAc,GAAG,EAAE,GACQ,EAA0B,EAAE;IAChE,MAAM,gBAAgB,GAAG,MAAM,0BAA0B,CAAC,EAAE,CAAC,CAAC;IAC9D,MAAM,kBAAkB,GAAG,MAAM,4BAA4B,CAAC,EAAE,CAAC,CAAC;IAElE,eAAe,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAElD,MAAM,gBAAgB,GAAG,+BAA+B,CAAC,gBAAgB,CAAC,CAAC;IAC3E,MAAM,kBAAkB,GAAG,iCAAiC,CAAC,kBAAkB,CAAC,CAAC;IAEjF,MAAM,mBAAmB,GAAyC,KAAK,EACrE,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,EAAE;QACF,MAAM,YAAY,GAAG,MAAM,gBAAgB,CAAC,QAAQ,CAClD,iBAAiB,EACjB,cAAc,EACd,YAAY,CACb,CAAC;QAEF,IAAI,CAAC,YAAY;YAAE,OAAO,IAAI,CAAC;QAE/B,MAAM,oBAAoB,GAAG,MAAM,kBAAkB,CAAC,iBAAiB,CAAC;YACtE,MAAM,EAAE,cAAc,CAAC,MAAM;YAC7B,iBAAiB;YACjB,GAAG,YAAY;SAChB,CAAC,CAAC;QAEH,OAAO,kBAAkB,CAAC,qBAAqB,CAAC;YAC9C,oBAAoB;YACpB,MAAM,EAAE,cAAc,CAAC,MAAM;YAC7B,iBAAiB;SAClB,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACL,gBAAgB;QAChB,kBAAkB;QAClB,mBAAmB;KACpB,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-payment",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-alpha5",
|
|
4
4
|
"main": "lib/payment-index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./lib/payment-index.js",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@unchainedshop/events": "^3.0.0-
|
|
35
|
-
"@unchainedshop/logger": "^3.0.0-
|
|
36
|
-
"@unchainedshop/utils": "^3.0.0-
|
|
34
|
+
"@unchainedshop/events": "^3.0.0-alpha4",
|
|
35
|
+
"@unchainedshop/logger": "^3.0.0-alpha4",
|
|
36
|
+
"@unchainedshop/utils": "^3.0.0-alpha4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^22.
|
|
39
|
+
"@types/node": "^22.8.1",
|
|
40
40
|
"jest": "^29.7.0",
|
|
41
41
|
"ts-jest": "^29.2.5",
|
|
42
|
-
"typescript": "^5.6.
|
|
42
|
+
"typescript": "^5.6.3"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UnchainedCore } from '@unchainedshop/core';
|
|
2
2
|
import { PaymentCredentialsCollection } from '../db/PaymentCredentialsCollection.js';
|
|
3
3
|
import { PaymentProvidersCollection } from '../db/PaymentProvidersCollection.js';
|
|
4
4
|
import {
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from './configurePaymentProvidersModule.js';
|
|
12
12
|
import { paymentSettings, PaymentSettingsOptions } from '../payment-settings.js';
|
|
13
13
|
import { PaymentContext, PaymentCredentials as PaymentCredentialsType } from '../types.js';
|
|
14
|
+
import { ModuleInput } from '@unchainedshop/mongodb';
|
|
14
15
|
export type PaymentModule = {
|
|
15
16
|
/*
|
|
16
17
|
* Payment Providers Module
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { PaymentProviderType } from
|
|
2
|
-
import { buildFindSelector } from
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { PaymentProviderType } from '../payment-index.js';
|
|
2
|
+
import { buildFindSelector } from './configurePaymentProvidersModule.js';
|
|
5
3
|
|
|
6
4
|
describe('Payment', () => {
|
|
7
5
|
describe('buildFindSelector', () => {
|
|
8
|
-
it('Return correct filter object when passed no argument',
|
|
9
|
-
expect(buildFindSelector({})).toEqual({ deleted: null })
|
|
6
|
+
it('Return correct filter object when passed no argument', () => {
|
|
7
|
+
expect(buildFindSelector({})).toEqual({ deleted: null });
|
|
10
8
|
});
|
|
11
9
|
|
|
12
|
-
it('Return correct filter object when passed no argument',
|
|
13
|
-
expect(buildFindSelector({type: PaymentProviderType.GENERIC})).toEqual({
|
|
10
|
+
it('Return correct filter object when passed no argument', () => {
|
|
11
|
+
expect(buildFindSelector({ type: PaymentProviderType.GENERIC })).toEqual({
|
|
12
|
+
type: 'GENERIC',
|
|
13
|
+
deleted: null,
|
|
14
|
+
});
|
|
14
15
|
});
|
|
15
|
-
})
|
|
16
|
-
|
|
16
|
+
});
|
|
17
17
|
});
|