@daffodil/payment 0.88.1 → 0.90.0

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.
Files changed (75) hide show
  1. package/driver/in-memory/index.d.ts +69 -1
  2. package/driver/index.d.ts +36 -1
  3. package/driver/testing/index.d.ts +33 -1
  4. package/fesm2022/daffodil-payment-driver-in-memory.mjs +10 -10
  5. package/fesm2022/daffodil-payment-driver-in-memory.mjs.map +1 -1
  6. package/fesm2022/daffodil-payment-driver-testing.mjs +7 -7
  7. package/fesm2022/daffodil-payment-driver-testing.mjs.map +1 -1
  8. package/fesm2022/daffodil-payment-driver.mjs.map +1 -1
  9. package/fesm2022/daffodil-payment-state-testing.mjs +7 -7
  10. package/fesm2022/daffodil-payment-state-testing.mjs.map +1 -1
  11. package/fesm2022/daffodil-payment-state.mjs +7 -7
  12. package/fesm2022/daffodil-payment-state.mjs.map +1 -1
  13. package/fesm2022/daffodil-payment-testing.mjs +13 -13
  14. package/fesm2022/daffodil-payment-testing.mjs.map +1 -1
  15. package/index.d.ts +30 -1
  16. package/package.json +1 -1
  17. package/state/index.d.ts +204 -1
  18. package/state/testing/index.d.ts +29 -1
  19. package/testing/index.d.ts +64 -1
  20. package/driver/errors/invalid-api-response.d.ts +0 -10
  21. package/driver/errors/map.d.ts +0 -7
  22. package/driver/errors/public_api.d.ts +0 -2
  23. package/driver/in-memory/backend/payment.service.d.ts +0 -35
  24. package/driver/in-memory/collection-name.const.d.ts +0 -1
  25. package/driver/in-memory/driver/payment-driver.module.d.ts +0 -13
  26. package/driver/in-memory/driver/payment.service.d.ts +0 -19
  27. package/driver/in-memory/public_api.d.ts +0 -3
  28. package/driver/interfaces/payment-service.interface.d.ts +0 -12
  29. package/driver/public_api.d.ts +0 -2
  30. package/driver/testing/drivers/payment-driver.module.d.ts +0 -12
  31. package/driver/testing/drivers/payment.service.d.ts +0 -18
  32. package/driver/testing/drivers/public_api.d.ts +0 -2
  33. package/driver/testing/public_api.d.ts +0 -1
  34. package/models/public_api.d.ts +0 -2
  35. package/models/request.type.d.ts +0 -13
  36. package/models/response.type.d.ts +0 -14
  37. package/public_api.d.ts +0 -1
  38. package/state/actions/payment.actions.d.ts +0 -43
  39. package/state/facades/payment/facade.d.ts +0 -21
  40. package/state/facades/payment/interface.d.ts +0 -16
  41. package/state/facades/public_api.d.ts +0 -2
  42. package/state/injection-tokens/available-processors.token.d.ts +0 -2
  43. package/state/injection-tokens/error-matcher.token.d.ts +0 -2
  44. package/state/injection-tokens/processor-collection.token.d.ts +0 -2
  45. package/state/injection-tokens/public_api.d.ts +0 -3
  46. package/state/models/available-processor.type.d.ts +0 -21
  47. package/state/models/processor-collection.type.d.ts +0 -5
  48. package/state/models/public_api.d.ts +0 -2
  49. package/state/payment.module.d.ts +0 -10
  50. package/state/public_api.d.ts +0 -7
  51. package/state/reducers/payment/adapter.d.ts +0 -21
  52. package/state/reducers/payment/initial-state.d.ts +0 -5
  53. package/state/reducers/payment/interface.d.ts +0 -15
  54. package/state/reducers/payment/public_api.d.ts +0 -4
  55. package/state/reducers/payment/reducer.d.ts +0 -7
  56. package/state/reducers/public_api.d.ts +0 -4
  57. package/state/reducers/reducers.interface.d.ts +0 -14
  58. package/state/reducers/store-feature-key.d.ts +0 -4
  59. package/state/reducers/token/extra.token.d.ts +0 -3
  60. package/state/reducers/token/public_api.d.ts +0 -1
  61. package/state/reducers/token/reducers.token.d.ts +0 -3
  62. package/state/selectors/feature.selector.d.ts +0 -9
  63. package/state/selectors/payment.selector.d.ts +0 -17
  64. package/state/selectors/public_api.d.ts +0 -1
  65. package/state/testing/mock-payment-facade.d.ts +0 -17
  66. package/state/testing/payment-testing.module.d.ts +0 -9
  67. package/state/testing/public_api.d.ts +0 -2
  68. package/testing/factories/kind.factory.d.ts +0 -18
  69. package/testing/factories/payment-request.factory.d.ts +0 -17
  70. package/testing/factories/payment-response.factory.d.ts +0 -17
  71. package/testing/factories/public_api.d.ts +0 -3
  72. package/testing/injection-tokens/factories/kind.token.d.ts +0 -3
  73. package/testing/injection-tokens/public_api.d.ts +0 -1
  74. package/testing/public_api.d.ts +0 -3
  75. package/testing/testing.module.d.ts +0 -9
@@ -1,2 +0,0 @@
1
- import { DaffPaymentProcessorCollection } from '../models/public_api';
2
- export declare const DAFF_PAYMENT_PROCESSOR_COLLECTION: import("@angular/core").InjectionToken<DaffPaymentProcessorCollection>, provideDaffPaymentProcessorCollection: <R extends DaffPaymentProcessorCollection = DaffPaymentProcessorCollection>(value: R) => import("@angular/core").ValueProvider;
@@ -1,3 +0,0 @@
1
- export { DAFF_PAYMENT_AVAILABLE_PROCESSORS, daffPaymentProvideAvailableProcessors, } from './available-processors.token';
2
- export { DAFF_PAYMENT_PROCESSOR_COLLECTION } from './processor-collection.token';
3
- export * from './error-matcher.token';
@@ -1,21 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { DaffPaymentRequest } from '@daffodil/payment';
3
- import { DaffPaymentDriverInterface } from '@daffodil/payment/driver';
4
- /**
5
- * A representation of an available payment processor.
6
- */
7
- export interface DaffPaymentAvailableProcessor {
8
- /**
9
- * The processor kind.
10
- */
11
- kind: DaffPaymentRequest['kind'];
12
- /**
13
- * The action type string that triggers token generation.
14
- */
15
- action: string;
16
- /**
17
- * An injection token of the driver that can perform token generation
18
- * for this specific payment processor.
19
- */
20
- driver: InjectionToken<DaffPaymentDriverInterface>;
21
- }
@@ -1,5 +0,0 @@
1
- import { DaffPaymentAvailableProcessor } from './available-processor.type';
2
- /**
3
- * A collection of {@link DaffPaymentAvailableProcessor}s.
4
- */
5
- export type DaffPaymentProcessorCollection = Record<DaffPaymentAvailableProcessor['kind'], DaffPaymentAvailableProcessor>;
@@ -1,2 +0,0 @@
1
- export { DaffPaymentAvailableProcessor } from './available-processor.type';
2
- export { DaffPaymentProcessorCollection } from './processor-collection.type';
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@ngrx/store";
3
- /**
4
- * Creates the payment feature store.
5
- */
6
- export declare class DaffPaymentStateModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffPaymentStateModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffPaymentStateModule, never, [typeof i1.StoreFeatureModule], never>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffPaymentStateModule>;
10
- }
@@ -1,7 +0,0 @@
1
- export * from './actions/payment.actions';
2
- export * from './reducers/public_api';
3
- export * from './selectors/public_api';
4
- export * from './facades/public_api';
5
- export * from './injection-tokens/public_api';
6
- export * from './models/public_api';
7
- export * from './payment.module';
@@ -1,21 +0,0 @@
1
- import { DaffStateError } from '@daffodil/core/state';
2
- import { DaffPaymentReducerState } from './interface';
3
- /**
4
- * Manages {@link DaffPaymentReducerState}.
5
- */
6
- export declare class DaffPaymentStateReducerAdapter {
7
- /**
8
- * Begins the payment operation flow.
9
- * Sets loading to true.
10
- */
11
- generateToken(state: DaffPaymentReducerState): DaffPaymentReducerState;
12
- /**
13
- * Sets loading to false and resets errors.
14
- */
15
- tokenGenerated(state: DaffPaymentReducerState): DaffPaymentReducerState;
16
- /**
17
- * Stores the from a failed payment.
18
- * Also sets loading to false.
19
- */
20
- storeError(errors: DaffStateError[], state: DaffPaymentReducerState): DaffPaymentReducerState;
21
- }
@@ -1,5 +0,0 @@
1
- import { DaffPaymentReducerState } from './interface';
2
- /**
3
- * The initial state for the main payment state, see {@link DaffPaymentReducerState}.
4
- */
5
- export declare const daffPaymentInitialState: DaffPaymentReducerState;
@@ -1,15 +0,0 @@
1
- import { DaffStateError } from '@daffodil/core/state';
2
- /**
3
- * The main payment state.
4
- * Contains info about the current or most recent payment operation.
5
- */
6
- export interface DaffPaymentReducerState {
7
- /**
8
- * Whether there is a pending payment operation.
9
- */
10
- loading: boolean;
11
- /**
12
- * A list of payment errors, if any.
13
- */
14
- errors: DaffStateError[];
15
- }
@@ -1,4 +0,0 @@
1
- export { DaffPaymentStateReducerAdapter } from './adapter';
2
- export { DaffPaymentReducerState } from './interface';
3
- export { daffPaymentInitialState } from './initial-state';
4
- export { daffPaymentReducerFactory } from './reducer';
@@ -1,7 +0,0 @@
1
- import { DaffPaymentResponse } from '@daffodil/payment';
2
- import { DaffPaymentReducerState } from './interface';
3
- import { DaffPaymentGenerateToken, DaffPaymentActions } from '../../actions/payment.actions';
4
- /**
5
- * The reducer for the payment page state, see {@link DaffPaymentReducerState}.
6
- */
7
- export declare const daffPaymentReducerFactory: <T extends DaffPaymentResponse = DaffPaymentResponse<unknown>>(actions: DaffPaymentGenerateToken["type"][]) => (state: DaffPaymentReducerState, action: DaffPaymentActions<T>) => DaffPaymentReducerState;
@@ -1,4 +0,0 @@
1
- export { DaffPaymentReducersState, DaffPaymentStateRootSlice, } from './reducers.interface';
2
- export { DAFF_PAYMENT_STORE_FEATURE_KEY } from './store-feature-key';
3
- export * from './token/public_api';
4
- export * from './payment/public_api';
@@ -1,14 +0,0 @@
1
- import { DaffPaymentReducerState } from './payment/public_api';
2
- import { DAFF_PAYMENT_STORE_FEATURE_KEY } from './store-feature-key';
3
- /**
4
- * The feature state for payment.
5
- */
6
- export interface DaffPaymentReducersState {
7
- payment: DaffPaymentReducerState;
8
- }
9
- /**
10
- * The footprint of payment feature state in the root application state.
11
- */
12
- export interface DaffPaymentStateRootSlice {
13
- [DAFF_PAYMENT_STORE_FEATURE_KEY]: DaffPaymentReducersState;
14
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * The key under which the payment feature state will be stored.
3
- */
4
- export declare const DAFF_PAYMENT_STORE_FEATURE_KEY = "daffPayment";
@@ -1,3 +0,0 @@
1
- import { ActionReducer } from '@ngrx/store';
2
- import { DaffPaymentReducersState } from '../reducers.interface';
3
- export declare const DAFF_PAYMENT_EXTRA_REDUCERS: import("@angular/core").InjectionToken<ActionReducer<DaffPaymentReducersState, import("@ngrx/store").Action<string>>[]>, daffPaymentProvideExtraReducers: <R extends ActionReducer<DaffPaymentReducersState, import("@ngrx/store").Action<string>> = ActionReducer<DaffPaymentReducersState, import("@ngrx/store").Action<string>>>(...values: R[]) => Array<import("@angular/core").ValueProvider>;
@@ -1 +0,0 @@
1
- export { daffPaymentProvideExtraReducers, DAFF_PAYMENT_EXTRA_REDUCERS, } from './extra.token';
@@ -1,3 +0,0 @@
1
- import { ActionReducer } from '@ngrx/store';
2
- import { DaffPaymentReducersState } from '../reducers.interface';
3
- export declare const DAFF_PAYMENT_REDUCERS: import("@angular/core").InjectionToken<ActionReducer<DaffPaymentReducersState, import("@ngrx/store").Action<string>>>, provideDaffPaymentReducers: <R extends ActionReducer<DaffPaymentReducersState, import("@ngrx/store").Action<string>> = ActionReducer<DaffPaymentReducersState, import("@ngrx/store").Action<string>>>(value: R) => import("@angular/core").ValueProvider;
@@ -1,9 +0,0 @@
1
- import { MemoizedSelector } from '@ngrx/store';
2
- import { DaffPaymentStateRootSlice, DaffPaymentReducersState } from '../reducers/public_api';
3
- /**
4
- * Selector for the payment feature state.
5
- */
6
- export interface DaffPaymentFeatureSelector {
7
- selectPaymentFeatureState: MemoizedSelector<DaffPaymentStateRootSlice, DaffPaymentReducersState>;
8
- }
9
- export declare const getDaffPaymentReducersStateSelector: () => DaffPaymentFeatureSelector;
@@ -1,17 +0,0 @@
1
- import { MemoizedSelector } from '@ngrx/store';
2
- import { DaffStateError } from '@daffodil/core/state';
3
- import { DaffPaymentStateRootSlice } from '../reducers/public_api';
4
- /**
5
- * Selectors for the main part of payment state.
6
- */
7
- export interface DaffPaymentSelectors {
8
- /**
9
- * Selects whether there is a pending payment operation.
10
- */
11
- selectPaymentLoading: MemoizedSelector<DaffPaymentStateRootSlice, boolean>;
12
- /**
13
- * Selects the list of payment errors, if any.
14
- */
15
- selectPaymentErrors: MemoizedSelector<DaffPaymentStateRootSlice, DaffStateError[]>;
16
- }
17
- export declare const daffPaymentGetSelectors: () => DaffPaymentSelectors;
@@ -1 +0,0 @@
1
- export * from './payment.selector';
@@ -1,17 +0,0 @@
1
- import { Action } from '@ngrx/store';
2
- import { BehaviorSubject } from 'rxjs';
3
- import { DaffStateError } from '@daffodil/core/state';
4
- import { DaffPaymentPageFacadeInterface } from '@daffodil/payment/state';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * Mocks out facade fields and methods for testing purposes.
8
- *
9
- * @inheritdoc
10
- */
11
- export declare class MockDaffPaymentPageFacade implements DaffPaymentPageFacadeInterface {
12
- loading$: BehaviorSubject<boolean>;
13
- errors$: BehaviorSubject<DaffStateError[]>;
14
- dispatch(action: Action): void;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffPaymentPageFacade, never>;
16
- static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffPaymentPageFacade>;
17
- }
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * Provides the {@link MockDaffPaymentPageFacade} for {@link DaffPaymentPageFacade}.
4
- */
5
- export declare class DaffPaymentStateTestingModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffPaymentStateTestingModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<DaffPaymentStateTestingModule, never, never, never>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<DaffPaymentStateTestingModule>;
9
- }
@@ -1,2 +0,0 @@
1
- export { MockDaffPaymentPageFacade } from './mock-payment-facade';
2
- export { DaffPaymentStateTestingModule } from './payment-testing.module';
@@ -1,18 +0,0 @@
1
- import { DaffModelFactory } from '@daffodil/core/testing';
2
- import { DaffPaymentResponse } from '@daffodil/payment';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Factory for creating DaffPaymentResponses.
6
- * This will create a payment response of random kind.
7
- */
8
- export declare class DaffPaymentResponseKindFactory extends DaffModelFactory<DaffPaymentResponse> {
9
- private kindFactories;
10
- constructor(kindFactories: DaffModelFactory<DaffPaymentResponse>[]);
11
- private get _randomFactory();
12
- /**
13
- * Creates a payment result of random kind.
14
- */
15
- create(partial?: {}): DaffPaymentResponse;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffPaymentResponseKindFactory, never>;
17
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffPaymentResponseKindFactory>;
18
- }
@@ -1,17 +0,0 @@
1
- import { DaffModelFactory } from '@daffodil/core/testing';
2
- import { DaffPaymentRequest } from '@daffodil/payment';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Mock class for {@link DaffPaymentRequest}.
6
- */
7
- export declare class MockPaymentRequest implements DaffPaymentRequest {
8
- kind: string;
9
- }
10
- /**
11
- * Model factory for {@link DaffPaymentRequest}.
12
- */
13
- export declare class DaffPaymentRequestFactory extends DaffModelFactory<DaffPaymentRequest> {
14
- constructor();
15
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffPaymentRequestFactory, never>;
16
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffPaymentRequestFactory>;
17
- }
@@ -1,17 +0,0 @@
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: string;
9
- }
10
- /**
11
- * Model factory for {@link DaffPaymentResponse}.
12
- */
13
- export declare class DaffPaymentResponseFactory extends DaffModelFactory<DaffPaymentResponse, typeof MockPaymentResponse> {
14
- constructor();
15
- static ɵfac: i0.ɵɵFactoryDeclaration<DaffPaymentResponseFactory, never>;
16
- static ɵprov: i0.ɵɵInjectableDeclaration<DaffPaymentResponseFactory>;
17
- }
@@ -1,3 +0,0 @@
1
- export * from './payment-response.factory';
2
- export * from './payment-request.factory';
3
- export * from './kind.factory';
@@ -1,3 +0,0 @@
1
- import { DaffModelFactory } from '@daffodil/core/testing';
2
- import { DaffPaymentResponse } from '@daffodil/payment';
3
- export declare const DAFF_PAYMENT_RESPONSE_KIND_FACTORIES: import("@angular/core").InjectionToken<DaffModelFactory<DaffPaymentResponse<unknown>, import("@daffodil/core").Constructable<DaffPaymentResponse<unknown>>>[]>, provideDaffPaymentResponseKindFactories: <R extends DaffModelFactory<DaffPaymentResponse<unknown>, import("@daffodil/core").Constructable<DaffPaymentResponse<unknown>>> = DaffModelFactory<DaffPaymentResponse<unknown>, import("@daffodil/core").Constructable<DaffPaymentResponse<unknown>>>>(...classes: import("@angular/core").Type<R>[]) => Array<import("@angular/core").ExistingProvider>;
@@ -1 +0,0 @@
1
- export { DAFF_PAYMENT_RESPONSE_KIND_FACTORIES, provideDaffPaymentResponseKindFactories, } from './factories/kind.token';
@@ -1,3 +0,0 @@
1
- export * from './factories/public_api';
2
- export * from './injection-tokens/public_api';
3
- export { DaffPaymentTestingModule } from './testing.module';
@@ -1,9 +0,0 @@
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
- }