@daffodil/payment 0.47.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 +11 -0
- package/daffodil-payment.d.ts +5 -0
- package/driver/daffodil-payment-driver.d.ts +5 -0
- package/driver/errors/invalid-api-response.d.ts +10 -0
- package/driver/errors/map.d.ts +7 -0
- package/driver/errors/public_api.d.ts +2 -0
- package/driver/in-memory/backend/payment.service.d.ts +33 -0
- package/driver/in-memory/daffodil-payment-driver-in-memory.d.ts +5 -0
- package/driver/in-memory/driver/payment-driver.module.d.ts +13 -0
- package/driver/in-memory/driver/payment.service.d.ts +21 -0
- package/driver/in-memory/index.d.ts +1 -0
- package/driver/in-memory/package.json +10 -0
- package/driver/in-memory/public_api.d.ts +3 -0
- package/driver/index.d.ts +1 -0
- package/driver/interfaces/payment-service.interface.d.ts +16 -0
- package/driver/package.json +10 -0
- package/driver/public_api.d.ts +2 -0
- package/driver/testing/daffodil-payment-driver-testing.d.ts +5 -0
- package/driver/testing/drivers/payment-driver.module.d.ts +12 -0
- package/driver/testing/drivers/payment.service.d.ts +18 -0
- package/driver/testing/drivers/public_api.d.ts +2 -0
- package/driver/testing/index.d.ts +1 -0
- package/driver/testing/package.json +10 -0
- package/driver/testing/public_api.d.ts +1 -0
- package/esm2020/daffodil-payment.mjs +5 -0
- package/esm2020/driver/daffodil-payment-driver.mjs +5 -0
- package/esm2020/driver/errors/invalid-api-response.mjs +13 -0
- package/esm2020/driver/errors/map.mjs +8 -0
- package/esm2020/driver/errors/public_api.mjs +3 -0
- package/esm2020/driver/in-memory/backend/payment.service.mjs +52 -0
- package/esm2020/driver/in-memory/daffodil-payment-driver-in-memory.mjs +5 -0
- package/esm2020/driver/in-memory/driver/payment-driver.module.mjs +39 -0
- package/esm2020/driver/in-memory/driver/payment.service.mjs +30 -0
- package/esm2020/driver/in-memory/index.mjs +2 -0
- package/esm2020/driver/in-memory/public_api.mjs +4 -0
- package/esm2020/driver/index.mjs +2 -0
- package/esm2020/driver/interfaces/payment-service.interface.mjs +6 -0
- package/esm2020/driver/public_api.mjs +3 -0
- package/esm2020/driver/testing/daffodil-payment-driver-testing.mjs +5 -0
- package/esm2020/driver/testing/drivers/payment-driver.module.mjs +35 -0
- package/esm2020/driver/testing/drivers/payment.service.mjs +28 -0
- package/esm2020/driver/testing/drivers/public_api.mjs +3 -0
- package/esm2020/driver/testing/index.mjs +2 -0
- package/esm2020/driver/testing/public_api.mjs +2 -0
- package/esm2020/index.mjs +2 -0
- package/esm2020/injection-tokens/error-matcher.token.mjs +8 -0
- package/esm2020/injection-tokens/public_api.mjs +2 -0
- package/esm2020/models/public_api.mjs +2 -0
- package/esm2020/models/request.type.mjs +2 -0
- package/esm2020/models/response.type.mjs +2 -0
- package/esm2020/public_api.mjs +3 -0
- package/esm2020/state/actions/payment.actions.mjs +27 -0
- package/esm2020/state/daffodil-payment-state.mjs +5 -0
- package/esm2020/state/facades/payment/facade.mjs +31 -0
- package/esm2020/state/facades/payment/interface.mjs +2 -0
- package/esm2020/state/facades/public_api.mjs +2 -0
- package/esm2020/state/index.mjs +2 -0
- package/esm2020/state/injection-tokens/available-processors.token.mjs +19 -0
- package/esm2020/state/injection-tokens/processor-collection.token.mjs +13 -0
- package/esm2020/state/injection-tokens/public_api.mjs +3 -0
- package/esm2020/state/models/available-processor.type.mjs +2 -0
- package/esm2020/state/models/processor-collection.type.mjs +2 -0
- package/esm2020/state/models/public_api.mjs +2 -0
- package/esm2020/state/payment.module.mjs +25 -0
- package/esm2020/state/public_api.mjs +8 -0
- package/esm2020/state/reducers/payment/adapter.mjs +40 -0
- package/esm2020/state/reducers/payment/initial-state.mjs +8 -0
- package/esm2020/state/reducers/payment/interface.mjs +2 -0
- package/esm2020/state/reducers/payment/public_api.mjs +4 -0
- package/esm2020/state/reducers/payment/reducer.mjs +20 -0
- package/esm2020/state/reducers/public_api.mjs +4 -0
- package/esm2020/state/reducers/reducers.interface.mjs +2 -0
- package/esm2020/state/reducers/store-feature-key.mjs +5 -0
- package/esm2020/state/reducers/token/extra.token.mjs +30 -0
- package/esm2020/state/reducers/token/public_api.mjs +2 -0
- package/esm2020/state/reducers/token/reducers.token.mjs +22 -0
- package/esm2020/state/selectors/feature.selector.mjs +9 -0
- package/esm2020/state/selectors/payment.selector.mjs +20 -0
- package/esm2020/state/selectors/public_api.mjs +2 -0
- package/esm2020/state/testing/daffodil-payment-state-testing.mjs +5 -0
- package/esm2020/state/testing/index.mjs +2 -0
- package/esm2020/state/testing/mock-payment-facade.mjs +23 -0
- package/esm2020/state/testing/payment-testing.module.mjs +23 -0
- package/esm2020/state/testing/public_api.mjs +3 -0
- package/esm2020/testing/daffodil-payment-testing.mjs +5 -0
- package/esm2020/testing/factories/kind.factory.mjs +37 -0
- package/esm2020/testing/factories/payment-request.factory.mjs +31 -0
- package/esm2020/testing/factories/payment-response.factory.mjs +31 -0
- package/esm2020/testing/factories/public_api.mjs +4 -0
- package/esm2020/testing/index.mjs +2 -0
- package/esm2020/testing/injection-tokens/factories/kind.token.mjs +30 -0
- package/esm2020/testing/injection-tokens/public_api.mjs +2 -0
- package/esm2020/testing/public_api.mjs +4 -0
- package/esm2020/testing/testing.module.mjs +31 -0
- package/fesm2015/daffodil-payment-driver-in-memory.mjs +121 -0
- package/fesm2015/daffodil-payment-driver-in-memory.mjs.map +1 -0
- package/fesm2015/daffodil-payment-driver-testing.mjs +66 -0
- package/fesm2015/daffodil-payment-driver-testing.mjs.map +1 -0
- package/fesm2015/daffodil-payment-driver.mjs +33 -0
- package/fesm2015/daffodil-payment-driver.mjs.map +1 -0
- package/fesm2015/daffodil-payment-state-testing.mjs +50 -0
- package/fesm2015/daffodil-payment-state-testing.mjs.map +1 -0
- package/fesm2015/daffodil-payment-state.mjs +242 -0
- package/fesm2015/daffodil-payment-state.mjs.map +1 -0
- package/fesm2015/daffodil-payment-testing.mjs +154 -0
- package/fesm2015/daffodil-payment-testing.mjs.map +1 -0
- package/fesm2015/daffodil-payment.mjs +15 -0
- package/fesm2015/daffodil-payment.mjs.map +1 -0
- package/fesm2020/daffodil-payment-driver-in-memory.mjs +121 -0
- package/fesm2020/daffodil-payment-driver-in-memory.mjs.map +1 -0
- package/fesm2020/daffodil-payment-driver-testing.mjs +66 -0
- package/fesm2020/daffodil-payment-driver-testing.mjs.map +1 -0
- package/fesm2020/daffodil-payment-driver.mjs +33 -0
- package/fesm2020/daffodil-payment-driver.mjs.map +1 -0
- package/fesm2020/daffodil-payment-state-testing.mjs +50 -0
- package/fesm2020/daffodil-payment-state-testing.mjs.map +1 -0
- package/fesm2020/daffodil-payment-state.mjs +253 -0
- package/fesm2020/daffodil-payment-state.mjs.map +1 -0
- package/fesm2020/daffodil-payment-testing.mjs +152 -0
- package/fesm2020/daffodil-payment-testing.mjs.map +1 -0
- package/fesm2020/daffodil-payment.mjs +15 -0
- package/fesm2020/daffodil-payment.mjs.map +1 -0
- package/index.d.ts +1 -0
- package/injection-tokens/error-matcher.token.d.ts +7 -0
- package/injection-tokens/public_api.d.ts +1 -0
- package/models/public_api.d.ts +2 -0
- package/models/request.type.d.ts +13 -0
- package/models/response.type.d.ts +14 -0
- package/package.json +100 -0
- package/public_api.d.ts +2 -0
- package/state/actions/payment.actions.d.ts +40 -0
- package/state/daffodil-payment-state.d.ts +5 -0
- package/state/facades/payment/facade.d.ts +21 -0
- package/state/facades/payment/interface.d.ts +16 -0
- package/state/facades/public_api.d.ts +2 -0
- package/state/index.d.ts +1 -0
- package/state/injection-tokens/available-processors.token.d.ts +12 -0
- package/state/injection-tokens/processor-collection.token.d.ts +6 -0
- package/state/injection-tokens/public_api.d.ts +2 -0
- package/state/models/available-processor.type.d.ts +21 -0
- package/state/models/processor-collection.type.d.ts +5 -0
- package/state/models/public_api.d.ts +2 -0
- package/state/package.json +10 -0
- package/state/payment.module.d.ts +10 -0
- package/state/public_api.d.ts +7 -0
- package/state/reducers/payment/adapter.d.ts +21 -0
- package/state/reducers/payment/initial-state.d.ts +5 -0
- package/state/reducers/payment/interface.d.ts +15 -0
- package/state/reducers/payment/public_api.d.ts +4 -0
- package/state/reducers/payment/reducer.d.ts +7 -0
- package/state/reducers/public_api.d.ts +4 -0
- package/state/reducers/reducers.interface.d.ts +14 -0
- package/state/reducers/store-feature-key.d.ts +4 -0
- package/state/reducers/token/extra.token.d.ts +22 -0
- package/state/reducers/token/public_api.d.ts +1 -0
- package/state/reducers/token/reducers.token.d.ts +10 -0
- package/state/selectors/feature.selector.d.ts +9 -0
- package/state/selectors/payment.selector.d.ts +17 -0
- package/state/selectors/public_api.d.ts +1 -0
- package/state/testing/daffodil-payment-state-testing.d.ts +5 -0
- package/state/testing/index.d.ts +1 -0
- package/state/testing/mock-payment-facade.d.ts +17 -0
- package/state/testing/package.json +10 -0
- package/state/testing/payment-testing.module.d.ts +9 -0
- package/state/testing/public_api.d.ts +2 -0
- package/testing/daffodil-payment-testing.d.ts +5 -0
- package/testing/factories/kind.factory.d.ts +18 -0
- package/testing/factories/payment-request.factory.d.ts +18 -0
- package/testing/factories/payment-response.factory.d.ts +18 -0
- package/testing/factories/public_api.d.ts +3 -0
- package/testing/index.d.ts +1 -0
- package/testing/injection-tokens/factories/kind.token.d.ts +24 -0
- package/testing/injection-tokens/public_api.d.ts +1 -0
- package/testing/package.json +10 -0
- package/testing/public_api.d.ts +3 -0
- package/testing/testing.module.d.ts +9 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
|
+
import { DaffPaymentResponse } from '@daffodil/payment';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Mock class for {@link DaffPaymentResponse}.
|
|
6
|
+
*/
|
|
7
|
+
export declare class MockPaymentResponse implements DaffPaymentResponse {
|
|
8
|
+
method: any;
|
|
9
|
+
data: any;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Model factory for {@link DaffPaymentResponse}.
|
|
13
|
+
*/
|
|
14
|
+
export declare class DaffPaymentResponseFactory extends DaffModelFactory<DaffPaymentResponse> {
|
|
15
|
+
constructor();
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffPaymentResponseFactory, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffPaymentResponseFactory>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public_api';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { InjectionToken, Provider, Type } from '@angular/core';
|
|
2
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
3
|
+
import { DaffPaymentResponse } from '@daffodil/payment';
|
|
4
|
+
/**
|
|
5
|
+
* A multi-provider injection token for providing extra payment result kind factories.
|
|
6
|
+
* These factories correspond to different types of payment results that may be added by other packages.
|
|
7
|
+
* This is useful for backend mocks (such as the testing driver) to generate an accurate representation
|
|
8
|
+
* of the variety of results that an application can receive in production.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DAFF_PAYMENT_RESPONSE_KIND_FACTORIES: InjectionToken<DaffModelFactory<DaffPaymentResponse<unknown>>[]>;
|
|
11
|
+
/**
|
|
12
|
+
* Provides extra payment result factory kinds.
|
|
13
|
+
*
|
|
14
|
+
* See {@link DAFF_PAYMENT_RESPONSE_KIND_FACTORIES}.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* providers: [
|
|
18
|
+
* ...daffProvidePaymentResponseKindFactories(
|
|
19
|
+
* MyPaymentResponseFactory
|
|
20
|
+
* )
|
|
21
|
+
* ]
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function daffProvidePaymentResponseKindFactories<T extends DaffPaymentResponse = DaffPaymentResponse>(...factoryTypes: Type<DaffModelFactory<T>>[]): Provider[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DAFF_PAYMENT_RESPONSE_KIND_FACTORIES, daffProvidePaymentResponseKindFactories, } from './factories/kind.token';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@daffodil/payment/testing",
|
|
3
|
+
"module": "../fesm2015/daffodil-payment-testing.mjs",
|
|
4
|
+
"es2020": "../fesm2020/daffodil-payment-testing.mjs",
|
|
5
|
+
"esm2020": "../esm2020/testing/daffodil-payment-testing.mjs",
|
|
6
|
+
"fesm2020": "../fesm2020/daffodil-payment-testing.mjs",
|
|
7
|
+
"fesm2015": "../fesm2015/daffodil-payment-testing.mjs",
|
|
8
|
+
"typings": "daffodil-payment-testing.d.ts",
|
|
9
|
+
"sideEffects": false
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Provides the default payment result factory as a payment result type factory.
|
|
4
|
+
*/
|
|
5
|
+
export declare class DaffPaymentTestingModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffPaymentTestingModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffPaymentTestingModule, never, never, never>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffPaymentTestingModule>;
|
|
9
|
+
}
|