@xsolla/payment-client-core 0.6.1 → 0.7.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 (31) hide show
  1. package/esm2022/lib/core/sdk-payment-systems/apple-pay/instant-flow-check/apple-pay-instant-flow-check.service.mjs +85 -0
  2. package/esm2022/lib/core/sdk-payment-systems/apple-pay/instant-flow-check/check-errors.enum.mjs +9 -0
  3. package/esm2022/lib/core/sdk-payment-systems/apple-pay/instant-flow-check/instant-flow-checker-response.interface.mjs +2 -0
  4. package/esm2022/lib/core/sdk-payment-systems/google-pay/instant-flow-check/check-errors.enum.mjs +6 -0
  5. package/esm2022/lib/core/sdk-payment-systems/google-pay/instant-flow-check/google-pay-instant-flow-check.service.mjs +43 -0
  6. package/esm2022/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-analytics.service.mjs +38 -0
  7. package/esm2022/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-check-name.enum.mjs +8 -0
  8. package/esm2022/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-check-result.interface.mjs +2 -0
  9. package/esm2022/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-check-state.enum.mjs +6 -0
  10. package/esm2022/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-checks.collector.mjs +26 -0
  11. package/esm2022/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-trigger.enum.mjs +6 -0
  12. package/esm2022/lib/core/user-behaviour-analytics/user-behaviour-event-name.enum.mjs +2 -1
  13. package/esm2022/lib/version.mjs +2 -2
  14. package/esm2022/public-api.mjs +12 -1
  15. package/fesm2022/xsolla-payment-client-core.mjs +203 -2
  16. package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
  17. package/lib/core/sdk-payment-systems/apple-pay/instant-flow-check/apple-pay-instant-flow-check.service.d.ts +19 -0
  18. package/lib/core/sdk-payment-systems/apple-pay/instant-flow-check/check-errors.enum.d.ts +7 -0
  19. package/lib/core/sdk-payment-systems/apple-pay/instant-flow-check/instant-flow-checker-response.interface.d.ts +3 -0
  20. package/lib/core/sdk-payment-systems/google-pay/instant-flow-check/check-errors.enum.d.ts +4 -0
  21. package/lib/core/sdk-payment-systems/google-pay/instant-flow-check/google-pay-instant-flow-check.service.d.ts +14 -0
  22. package/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-analytics.service.d.ts +12 -0
  23. package/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-check-name.enum.d.ts +6 -0
  24. package/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-check-result.interface.d.ts +8 -0
  25. package/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-check-state.enum.d.ts +4 -0
  26. package/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-checks.collector.d.ts +10 -0
  27. package/lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-trigger.enum.d.ts +4 -0
  28. package/lib/core/user-behaviour-analytics/user-behaviour-event-name.enum.d.ts +2 -1
  29. package/lib/version.d.ts +1 -1
  30. package/package.json +1 -1
  31. package/public-api.d.ts +11 -0
@@ -0,0 +1,19 @@
1
+ import { SecureApiClient } from '../../../http/secure-api/secure-api.service';
2
+ import { SettingsService } from '../../../settings/settings.service';
3
+ import { LoggerService } from '../../../exceptions-handling/logger/logger.service';
4
+ import { InstantFlowCheckResult } from '../../instant-flow-checks/instant-flow-check-result.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ApplePayInstantFlowCheckService {
7
+ private readonly secureApiClient;
8
+ private readonly settingsService;
9
+ private readonly loggerService;
10
+ private checkPromise;
11
+ constructor(secureApiClient: SecureApiClient, settingsService: SettingsService, loggerService: LoggerService);
12
+ isInstantFlowAvailable(): Promise<InstantFlowCheckResult>;
13
+ private performInstantFlowChecks;
14
+ private checkIntegrationToggle;
15
+ private checkPartnerDomain;
16
+ private checkAppleCertificates;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApplePayInstantFlowCheckService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApplePayInstantFlowCheckService>;
19
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum InstantFlowCheckErrors {
2
+ TOGGLE_TURNED_OFF = "TOGGLE_TURNED_OFF",
3
+ PARTNER_DOMAIN_MISSING = "PARTNER_DOMAIN_MISSING",
4
+ PARTNER_DOMAIN_WRONG_FORMAT = "PARTNER_DOMAIN_WRONG_FORMAT",
5
+ CERTIFICATES_MISSING = "CERTIFICATES_MISSING",
6
+ CERTIFICATES_CHECK_FAILED = "CERTIFICATES_CHECK_FAILED"
7
+ }
@@ -0,0 +1,3 @@
1
+ export interface InstantFlowCheckerResponse {
2
+ isCertificatesExist: boolean;
3
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum GooglePayInstantFlowCheckErrors {
2
+ TOGGLE_TURNED_OFF = "TOGGLE_TURNED_OFF",
3
+ INSTANT_DATA_MISSING = "INSTANT_DATA_MISSING"
4
+ }
@@ -0,0 +1,14 @@
1
+ import { SettingsService } from '../../../settings/settings.service';
2
+ import { PaymentService } from '../../../payment/payment.service';
3
+ import { InstantFlowCheckResult } from '../../instant-flow-checks/instant-flow-check-result.interface';
4
+ import * as i0 from "@angular/core";
5
+ export declare class GooglePayInstantFlowCheckService {
6
+ private readonly settingsService;
7
+ private readonly paymentService;
8
+ constructor(settingsService: SettingsService, paymentService: PaymentService);
9
+ getInstantFlowChecks(): InstantFlowCheckResult;
10
+ private checkIntegrationToggle;
11
+ private checkBackendInstantData;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<GooglePayInstantFlowCheckService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<GooglePayInstantFlowCheckService>;
14
+ }
@@ -0,0 +1,12 @@
1
+ import { UserBehaviourAnalyticsService } from '../../user-behaviour-analytics/user-behaviour-analytics.service';
2
+ import { InstantFlowCheckResult } from './instant-flow-check-result.interface';
3
+ import { InstantFlowTrigger } from './instant-flow-trigger.enum';
4
+ import * as i0 from "@angular/core";
5
+ export declare class InstantFlowAnalyticsService {
6
+ private readonly userBehaviourAnalyticsService;
7
+ constructor(userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
8
+ sendInstantFlowData(instanceId: number, trigger: InstantFlowTrigger, result: InstantFlowCheckResult): void;
9
+ private isSupportedByClient;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<InstantFlowAnalyticsService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<InstantFlowAnalyticsService>;
12
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum InstantFlowCheckName {
2
+ toggle = "toggle",
3
+ partnerDomain = "partner_domain",
4
+ certificates = "certificates",
5
+ backendInstantData = "backend_instant_data"
6
+ }
@@ -0,0 +1,8 @@
1
+ import { InstantFlowCheckName } from './instant-flow-check-name.enum';
2
+ export type InstantFlowChecks = {
3
+ [name in InstantFlowCheckName]?: string;
4
+ };
5
+ export interface InstantFlowCheckResult {
6
+ allowed: boolean;
7
+ checks: InstantFlowChecks;
8
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum InstantFlowCheckState {
2
+ passed = "passed",
3
+ skipped = "skipped"
4
+ }
@@ -0,0 +1,10 @@
1
+ import { InstantFlowCheckName } from './instant-flow-check-name.enum';
2
+ import { InstantFlowCheckResult } from './instant-flow-check-result.interface';
3
+ export declare class InstantFlowChecksCollector {
4
+ private readonly checks;
5
+ private hasFailedChecks;
6
+ add(name: InstantFlowCheckName, error: string | null): void;
7
+ skip(name: InstantFlowCheckName): void;
8
+ isPassing(): boolean;
9
+ getResult(): InstantFlowCheckResult;
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum InstantFlowTrigger {
2
+ paymentForm = "0",
3
+ topButton = "1"
4
+ }
@@ -44,5 +44,6 @@ export declare enum UserBehaviourEventName {
44
44
  applePayAcquirer = "apple-pay-acquirer",
45
45
  googlePayHandleFailedPayment = "google-pay-handle-failed-payment",
46
46
  googlePayHandleSuccessfulPayment = "google-pay-handle-successful-payment",
47
- sysInstantFlowOpen = "sys-instant_flow-open"
47
+ sysInstantFlowOpen = "sys-instant_flow-open",
48
+ sysInstantFlowData = "sys-instant_flow-data"
48
49
  }
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PAYMENT_CLIENT_CORE_VERSION = "0.6.1";
1
+ export declare const PAYMENT_CLIENT_CORE_VERSION = "0.7.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "engines": {
5
5
  "node": ">=16.10.0",
6
6
  "npm": ">=8.11.0"
package/public-api.d.ts CHANGED
@@ -4,9 +4,19 @@ export * from './lib/core-library.module';
4
4
  export * from './lib/core/legal/legal.component.config';
5
5
  export * from './lib/core/sdk-payment-systems/payment-systems/payment-system-processing.service';
6
6
  export * from './lib/core/sdk-payment-systems/google-pay/google-pay.service';
7
+ export * from './lib/core/sdk-payment-systems/google-pay/instant-flow-check/google-pay-instant-flow-check.service';
8
+ export * from './lib/core/sdk-payment-systems/google-pay/instant-flow-check/check-errors.enum';
7
9
  export * from './lib/core/sdk-payment-systems/apple-pay/apple-pay.service';
8
10
  export * from './lib/core/sdk-payment-systems/apple-pay/apple-pay-cart/apple-pay-cart.service';
9
11
  export * from './lib/core/sdk-payment-systems/apple-pay/apple-pay-params.interface';
12
+ export * from './lib/core/sdk-payment-systems/apple-pay/instant-flow-check/apple-pay-instant-flow-check.service';
13
+ export * from './lib/core/sdk-payment-systems/apple-pay/instant-flow-check/check-errors.enum';
14
+ export * from './lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-analytics.service';
15
+ export * from './lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-check-name.enum';
16
+ export * from './lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-check-result.interface';
17
+ export * from './lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-check-state.enum';
18
+ export * from './lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-checks.collector';
19
+ export * from './lib/core/sdk-payment-systems/instant-flow-checks/instant-flow-trigger.enum';
10
20
  export * from './lib/core/user-behaviour-analytics/user-behaviour-event/user-behaviour-event-types';
11
21
  export * from './lib/core/payment/form/control-status.interface';
12
22
  export * from './lib/core/payment/field-names.enum';
@@ -16,6 +26,7 @@ export * from './lib/core/transaction-initiation-type.enum';
16
26
  export * from './lib/core/payment/payment-configurations/types/is-credit-card-settings.guard';
17
27
  export * from './lib/core/payment/payment-configurations/types/credit-card-form-configuration.interface';
18
28
  export * from './lib/core/payment/credit-card-payment-methods-id.variable';
29
+ export * from './lib/core/payment/actions/redirect/ps4-pages/pages-payment-methods-id.const';
19
30
  export * from './lib/core/sdk-payment-systems/google-pay/google-pay-button-color.type';
20
31
  export * from './lib/core/xsolla-number/api/send-instruction/response/send-instruction-response.interface';
21
32
  export * from './lib/core/exceptions-handling/errors';