@xsolla/payment-client-core 0.0.2 → 0.0.3-2

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 (127) hide show
  1. package/esm2020/lib/core/boolean-number.enum.mjs +5 -5
  2. package/esm2020/lib/core/country/country.service.mjs +26 -26
  3. package/esm2020/lib/core/deep-readonly.type.mjs +1 -1
  4. package/esm2020/lib/core/exceptions-handling/errors/api-error.interface.mjs +1 -1
  5. package/esm2020/lib/core/exceptions-handling/errors/app-error.class.mjs +5 -5
  6. package/esm2020/lib/core/exceptions-handling/errors/http-error.class.mjs +39 -39
  7. package/esm2020/lib/core/exceptions-handling/errors/response-error.class.mjs +6 -6
  8. package/esm2020/lib/core/exceptions-handling/http-interceptor/http-error-data.interface.mjs +1 -1
  9. package/esm2020/lib/core/exceptions-handling/http-interceptor/http-error-response-data.interface.mjs +1 -1
  10. package/esm2020/lib/core/exceptions-handling/http-interceptor/http-exceptions.interceptor.mjs +21 -21
  11. package/esm2020/lib/core/extended-window.interface.mjs +1 -1
  12. package/esm2020/lib/core/http/secure-api/api-url.const.mjs +2 -2
  13. package/esm2020/lib/core/http/secure-api/options.interface.mjs +1 -1
  14. package/esm2020/lib/core/http/secure-api/secure-api.service.mjs +54 -54
  15. package/esm2020/lib/core/legal/disclaimer.service.mjs +16 -0
  16. package/esm2020/lib/core/legal/legal.component.config.mjs +2 -0
  17. package/esm2020/lib/core/legal/legal.service.mjs +39 -0
  18. package/esm2020/lib/core/legal/refund-policy.service.mjs +30 -0
  19. package/esm2020/lib/core/legal/secure-connection.service.mjs +31 -0
  20. package/esm2020/lib/core/payment-methods/payment-method-api.interface.mjs +1 -1
  21. package/esm2020/lib/core/payment-methods/payment-method.interface.mjs +1 -1
  22. package/esm2020/lib/core/payment-methods/payment-methods-api.interface.mjs +1 -1
  23. package/esm2020/lib/core/payment-methods/payment-methods-request-params.interface.mjs +1 -1
  24. package/esm2020/lib/core/payment-methods/payment-methods-response.class.mjs +25 -25
  25. package/esm2020/lib/core/payment-methods/payment-methods-response.interface.mjs +1 -1
  26. package/esm2020/lib/core/payment-methods/payment-methods-response.token.mjs +7 -7
  27. package/esm2020/lib/core/payment-methods/payment-methods.service.mjs +57 -57
  28. package/esm2020/lib/core/saved-methods/saved-method-api.interface.mjs +2 -0
  29. package/esm2020/lib/core/saved-methods/saved-method.interface.mjs +2 -0
  30. package/esm2020/lib/core/saved-methods/saved-methods-request-params.interface.mjs +2 -0
  31. package/esm2020/lib/core/saved-methods/saved-methods-response.class.mjs +24 -0
  32. package/esm2020/lib/core/saved-methods/saved-methods-response.interface.mjs +2 -0
  33. package/esm2020/lib/core/saved-methods/saved-methods-response.token.mjs +8 -0
  34. package/esm2020/lib/core/saved-methods/saved-methods.service.mjs +53 -0
  35. package/esm2020/lib/core/settings/auto-redirect-on-status.mjs +13 -13
  36. package/esm2020/lib/core/settings/balance.interface.mjs +1 -1
  37. package/esm2020/lib/core/settings/bonus.interface.mjs +1 -1
  38. package/esm2020/lib/core/settings/configuration.interface.mjs +1 -1
  39. package/esm2020/lib/core/settings/empty-utils-response.error.mjs +6 -6
  40. package/esm2020/lib/core/settings/header-type.enum.mjs +5 -5
  41. package/esm2020/lib/core/settings/offer.interface.mjs +1 -1
  42. package/esm2020/lib/core/settings/project.interface.mjs +1 -1
  43. package/esm2020/lib/core/settings/purchase.interface.mjs +1 -1
  44. package/esm2020/lib/core/settings/settings-mode.enum.mjs +4 -4
  45. package/esm2020/lib/core/settings/settings.interface.mjs +1 -1
  46. package/esm2020/lib/core/settings/settings.service.mjs +84 -84
  47. package/esm2020/lib/core/settings/status-back-show.mjs +15 -15
  48. package/esm2020/lib/core/settings/tracking-info.interface.mjs +1 -1
  49. package/esm2020/lib/core/settings/user.interface.mjs +1 -1
  50. package/esm2020/lib/core/settings/utils-response.interface.mjs +1 -1
  51. package/esm2020/lib/core/user-balance/user-balance-api.interface.mjs +2 -0
  52. package/esm2020/lib/core/user-balance/user-balance-request-params.interface.mjs +2 -0
  53. package/esm2020/lib/core/user-balance/user-balance-response.class.mjs +8 -0
  54. package/esm2020/lib/core/user-balance/user-balance-response.token.mjs +8 -0
  55. package/esm2020/lib/core/user-balance/user-balance.service.mjs +50 -0
  56. package/esm2020/lib/core/window.token.mjs +2 -2
  57. package/esm2020/lib/core-library.module.mjs +41 -35
  58. package/esm2020/lib/core-library.service.mjs +42 -31
  59. package/esm2020/public-api.mjs +7 -6
  60. package/esm2020/xsolla-payment-client-core.mjs +4 -4
  61. package/fesm2015/xsolla-payment-client-core.mjs +618 -358
  62. package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
  63. package/fesm2020/xsolla-payment-client-core.mjs +589 -345
  64. package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
  65. package/index.d.ts +5 -5
  66. package/lib/core/boolean-number.enum.d.ts +4 -4
  67. package/lib/core/country/country.service.d.ts +12 -12
  68. package/lib/core/deep-readonly.type.d.ts +3 -3
  69. package/lib/core/exceptions-handling/errors/api-error.interface.d.ts +4 -4
  70. package/lib/core/exceptions-handling/errors/app-error.class.d.ts +3 -3
  71. package/lib/core/exceptions-handling/errors/http-error.class.d.ts +10 -10
  72. package/lib/core/exceptions-handling/errors/response-error.class.d.ts +4 -4
  73. package/lib/core/exceptions-handling/http-interceptor/http-error-data.interface.d.ts +20 -20
  74. package/lib/core/exceptions-handling/http-interceptor/http-error-response-data.interface.d.ts +7 -7
  75. package/lib/core/exceptions-handling/http-interceptor/http-exceptions.interceptor.d.ts +11 -11
  76. package/lib/core/extended-window.interface.d.ts +1 -1
  77. package/lib/core/http/secure-api/api-url.const.d.ts +2 -2
  78. package/lib/core/http/secure-api/options.interface.d.ts +14 -14
  79. package/lib/core/http/secure-api/secure-api.service.d.ts +20 -20
  80. package/lib/core/legal/disclaimer.service.d.ts +6 -0
  81. package/lib/core/legal/legal.component.config.d.ts +10 -0
  82. package/lib/core/legal/legal.service.d.ts +18 -0
  83. package/lib/core/legal/refund-policy.service.d.ts +11 -0
  84. package/lib/core/legal/secure-connection.service.d.ts +13 -0
  85. package/lib/core/payment-methods/payment-method-api.interface.d.ts +11 -11
  86. package/lib/core/payment-methods/payment-method.interface.d.ts +11 -11
  87. package/lib/core/payment-methods/payment-methods-api.interface.d.ts +10 -10
  88. package/lib/core/payment-methods/payment-methods-request-params.interface.d.ts +4 -4
  89. package/lib/core/payment-methods/payment-methods-response.class.d.ts +13 -13
  90. package/lib/core/payment-methods/payment-methods-response.interface.d.ts +4 -4
  91. package/lib/core/payment-methods/payment-methods-response.token.d.ts +7 -7
  92. package/lib/core/payment-methods/payment-methods.service.d.ts +20 -20
  93. package/lib/core/saved-methods/saved-method-api.interface.d.ts +22 -0
  94. package/lib/core/saved-methods/saved-method.interface.d.ts +21 -0
  95. package/lib/core/saved-methods/saved-methods-request-params.interface.d.ts +3 -0
  96. package/lib/core/saved-methods/saved-methods-response.class.d.ts +7 -0
  97. package/lib/core/saved-methods/saved-methods-response.interface.d.ts +4 -0
  98. package/lib/core/saved-methods/saved-methods-response.token.d.ts +7 -0
  99. package/lib/core/saved-methods/saved-methods.service.d.ts +19 -0
  100. package/lib/core/settings/auto-redirect-on-status.d.ts +12 -12
  101. package/lib/core/settings/balance.interface.d.ts +4 -4
  102. package/lib/core/settings/bonus.interface.d.ts +10 -10
  103. package/lib/core/settings/configuration.interface.d.ts +5 -5
  104. package/lib/core/settings/empty-utils-response.error.d.ts +4 -4
  105. package/lib/core/settings/header-type.enum.d.ts +4 -4
  106. package/lib/core/settings/offer.interface.d.ts +6 -6
  107. package/lib/core/settings/project.interface.d.ts +32 -32
  108. package/lib/core/settings/purchase.interface.d.ts +47 -47
  109. package/lib/core/settings/settings-mode.enum.d.ts +3 -3
  110. package/lib/core/settings/settings.interface.d.ts +45 -45
  111. package/lib/core/settings/settings.service.d.ts +30 -30
  112. package/lib/core/settings/status-back-show.d.ts +14 -14
  113. package/lib/core/settings/tracking-info.interface.d.ts +5 -5
  114. package/lib/core/settings/user.interface.d.ts +23 -23
  115. package/lib/core/settings/utils-response.interface.d.ts +16 -16
  116. package/lib/core/user-balance/user-balance-api.interface.d.ts +4 -0
  117. package/lib/core/user-balance/user-balance-request-params.interface.d.ts +3 -0
  118. package/lib/core/user-balance/user-balance-response.class.d.ts +6 -0
  119. package/lib/core/user-balance/user-balance-response.token.d.ts +7 -0
  120. package/lib/core/user-balance/user-balance.service.d.ts +17 -0
  121. package/lib/core/window.token.d.ts +3 -3
  122. package/lib/core-library.module.d.ts +7 -7
  123. package/lib/core-library.service.d.ts +32 -20
  124. package/package.json +1 -1
  125. package/public-api.d.ts +3 -2
  126. package/xsolla-payment-client-core-0.0.3-2.tgz +0 -0
  127. package/xsolla-payment-client-core-0.0.2.tgz +0 -0
@@ -1,4 +1,4 @@
1
- export interface PaymentMethodsRequestParams {
2
- access_token: string;
3
- country: string;
4
- }
1
+ export interface PaymentMethodsRequestParams {
2
+ access_token: string;
3
+ country: string;
4
+ }
@@ -1,13 +1,13 @@
1
- import { PaymentMethod } from './payment-method.interface';
2
- import { PaymentMethodsApi } from './payment-methods-api.interface';
3
- export declare class PaymentMethodsResponse {
4
- readonly top: PaymentMethod[];
5
- readonly especial: PaymentMethod[];
6
- readonly remained: PaymentMethod[];
7
- readonly remainedCount: {
8
- total: number;
9
- visible: number;
10
- };
11
- constructor(paymentMethods: PaymentMethodsApi);
12
- private mapPaymentMethod;
13
- }
1
+ import { PaymentMethod } from './payment-method.interface';
2
+ import { PaymentMethodsApi } from './payment-methods-api.interface';
3
+ export declare class PaymentMethodsResponse {
4
+ readonly top: PaymentMethod[];
5
+ readonly especial: PaymentMethod[];
6
+ readonly remained: PaymentMethod[];
7
+ readonly remainedCount: {
8
+ total: number;
9
+ visible: number;
10
+ };
11
+ constructor(paymentMethods: PaymentMethodsApi);
12
+ private mapPaymentMethod;
13
+ }
@@ -1,4 +1,4 @@
1
- import { PaymentMethodsApi } from './payment-methods-api.interface';
2
- export interface PaymentMethodsResponseApi {
3
- payment_methods: PaymentMethodsApi;
4
- }
1
+ import { PaymentMethodsApi } from './payment-methods-api.interface';
2
+ export interface PaymentMethodsResponseApi {
3
+ payment_methods: PaymentMethodsApi;
4
+ }
@@ -1,7 +1,7 @@
1
- import { InjectionToken, ValueProvider } from '@angular/core';
2
- import { PaymentMethodsResponse } from './payment-methods-response.class';
3
- type ResponseParameters = ConstructorParameters<typeof PaymentMethodsResponse>;
4
- export type PaymentMethodsResponseFactory = (...args: ResponseParameters) => PaymentMethodsResponse;
5
- export declare const paymentMethodsResponseFactoryToken: InjectionToken<PaymentMethodsResponseFactory>;
6
- export declare const paymentMethodsResponseFactoryProvider: ValueProvider;
7
- export {};
1
+ import { InjectionToken, ValueProvider } from '@angular/core';
2
+ import { PaymentMethodsResponse } from './payment-methods-response.class';
3
+ type ResponseParameters = ConstructorParameters<typeof PaymentMethodsResponse>;
4
+ export type PaymentMethodsResponseFactory = (...args: ResponseParameters) => PaymentMethodsResponse;
5
+ export declare const paymentMethodsResponseFactoryToken: InjectionToken<PaymentMethodsResponseFactory>;
6
+ export declare const paymentMethodsResponseFactoryProvider: ValueProvider;
7
+ export {};
@@ -1,20 +1,20 @@
1
- import { CountryService } from '../country/country.service';
2
- import { SecureApiClient } from '../http/secure-api/secure-api.service';
3
- import { SettingsService } from '../settings/settings.service';
4
- import { PaymentMethod } from './payment-method.interface';
5
- import { PaymentMethodsResponseFactory } from './payment-methods-response.token';
6
- import * as i0 from "@angular/core";
7
- export declare class PaymentMethodsService {
8
- private readonly responseFactory;
9
- private readonly settingsService;
10
- private readonly countryService;
11
- private readonly secureApi;
12
- private readonly apiRoute;
13
- private readonly cache;
14
- constructor(responseFactory: PaymentMethodsResponseFactory, settingsService: SettingsService, countryService: CountryService, secureApi: SecureApiClient);
15
- getList(): Promise<PaymentMethod[]>;
16
- getQuickMethods(): Promise<PaymentMethod[]>;
17
- private request;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<PaymentMethodsService, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<PaymentMethodsService>;
20
- }
1
+ import { CountryService } from '../country/country.service';
2
+ import { SecureApiClient } from '../http/secure-api/secure-api.service';
3
+ import { SettingsService } from '../settings/settings.service';
4
+ import { PaymentMethod } from './payment-method.interface';
5
+ import { PaymentMethodsResponseFactory } from './payment-methods-response.token';
6
+ import * as i0 from "@angular/core";
7
+ export declare class PaymentMethodsService {
8
+ private readonly responseFactory;
9
+ private readonly settingsService;
10
+ private readonly countryService;
11
+ private readonly secureApi;
12
+ private readonly apiRoute;
13
+ private readonly cache;
14
+ constructor(responseFactory: PaymentMethodsResponseFactory, settingsService: SettingsService, countryService: CountryService, secureApi: SecureApiClient);
15
+ getList(): Promise<PaymentMethod[]>;
16
+ getQuickMethods(): Promise<PaymentMethod[]>;
17
+ private request;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<PaymentMethodsService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<PaymentMethodsService>;
20
+ }
@@ -0,0 +1,22 @@
1
+ export interface SavedMethodApi {
2
+ currency: string;
3
+ form: {
4
+ paymentSid: string;
5
+ };
6
+ iconSrc?: string;
7
+ id: number;
8
+ isSelected?: boolean;
9
+ is_babka_pay: boolean;
10
+ name: string;
11
+ pid: number;
12
+ psName: string;
13
+ recurrent_type: string;
14
+ replaced: boolean;
15
+ type: string;
16
+ card_expiry_date?: {
17
+ month: string;
18
+ year: string;
19
+ };
20
+ switch_icon_name: string | null;
21
+ partner?: string | null;
22
+ }
@@ -0,0 +1,21 @@
1
+ export interface SavedMethod {
2
+ currency: string;
3
+ form: {
4
+ paymentSid: string;
5
+ };
6
+ id: number;
7
+ isSelected?: boolean;
8
+ isBabkaPay: boolean;
9
+ name: string;
10
+ pid: number;
11
+ psName: string;
12
+ recurrentType: string;
13
+ replaced: boolean;
14
+ type: string;
15
+ cardExpiryDate?: {
16
+ month: string;
17
+ year: string;
18
+ };
19
+ iconName: string | null;
20
+ partner?: string | null;
21
+ }
@@ -0,0 +1,3 @@
1
+ export interface SavedMethodsRequestParams {
2
+ access_token: string;
3
+ }
@@ -0,0 +1,7 @@
1
+ import { SavedMethodsResponseApi } from './saved-methods-response.interface';
2
+ import { SavedMethod } from './saved-method.interface';
3
+ export declare class SavedMethodsResponse {
4
+ readonly list: SavedMethod[];
5
+ constructor(savedMethods: SavedMethodsResponseApi);
6
+ private mapSavedMethod;
7
+ }
@@ -0,0 +1,4 @@
1
+ import { SavedMethodApi } from './saved-method-api.interface';
2
+ export interface SavedMethodsResponseApi {
3
+ list: SavedMethodApi[];
4
+ }
@@ -0,0 +1,7 @@
1
+ import { InjectionToken, ValueProvider } from '@angular/core';
2
+ import { SavedMethodsResponse } from './saved-methods-response.class';
3
+ type ResponseParameters = ConstructorParameters<typeof SavedMethodsResponse>;
4
+ export type SavedMethodsResponseFactory = (...args: ResponseParameters) => SavedMethodsResponse;
5
+ export declare const savedMethodsResponseFactoryToken: InjectionToken<SavedMethodsResponseFactory>;
6
+ export declare const savedMethodsResponseFactoryProvider: ValueProvider;
7
+ export {};
@@ -0,0 +1,19 @@
1
+ import { CountryService } from '../country/country.service';
2
+ import { SecureApiClient } from '../http/secure-api/secure-api.service';
3
+ import { SettingsService } from '../settings/settings.service';
4
+ import { SavedMethodsResponseFactory } from './saved-methods-response.token';
5
+ import { SavedMethod } from './saved-method.interface';
6
+ import * as i0 from "@angular/core";
7
+ export declare class SavedMethodsService {
8
+ private readonly responseFactory;
9
+ private readonly settingsService;
10
+ private readonly countryService;
11
+ private readonly secureApi;
12
+ private readonly apiRoute;
13
+ private readonly cache;
14
+ constructor(responseFactory: SavedMethodsResponseFactory, settingsService: SettingsService, countryService: CountryService, secureApi: SecureApiClient);
15
+ getList(): Promise<SavedMethod[]>;
16
+ private request;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<SavedMethodsService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<SavedMethodsService>;
19
+ }
@@ -1,12 +1,12 @@
1
- /**
2
- * none (ни один из статусов),
3
- * done (статус done),
4
- * final (статусы done, cancel),
5
- * all (все статусы)
6
- */
7
- export declare enum AutoRedirectOnStatus {
8
- none = "none",
9
- done = "done",
10
- final = "final",
11
- all = "all"
12
- }
1
+ /**
2
+ * none (ни один из статусов),
3
+ * done (статус done),
4
+ * final (статусы done, cancel),
5
+ * all (все статусы)
6
+ */
7
+ export declare enum AutoRedirectOnStatus {
8
+ none = "none",
9
+ done = "done",
10
+ final = "final",
11
+ all = "all"
12
+ }
@@ -1,4 +1,4 @@
1
- export interface Balance {
2
- amount: number;
3
- currency: string;
4
- }
1
+ export interface Balance {
2
+ amount: number;
3
+ currency: string;
4
+ }
@@ -1,10 +1,10 @@
1
- import { Offer } from './offer.interface';
2
- export interface Bonus {
3
- enabled: boolean;
4
- name?: string;
5
- description?: string;
6
- offers?: readonly Offer[];
7
- seconds?: number | null;
8
- has_sales?: boolean;
9
- label?: string;
10
- }
1
+ import { Offer } from './offer.interface';
2
+ export interface Bonus {
3
+ enabled: boolean;
4
+ name?: string;
5
+ description?: string;
6
+ offers?: readonly Offer[];
7
+ seconds?: number | null;
8
+ has_sales?: boolean;
9
+ label?: string;
10
+ }
@@ -1,5 +1,5 @@
1
- export interface InitConfiguration {
2
- token: string;
3
- isWebview?: boolean;
4
- sandbox?: boolean;
5
- }
1
+ export interface InitConfiguration {
2
+ token: string;
3
+ isWebview?: boolean;
4
+ sandbox?: boolean;
5
+ }
@@ -1,4 +1,4 @@
1
- import { AppError } from '../exceptions-handling/errors/app-error.class';
2
- export declare class EmptyUtilsResponseError extends AppError {
3
- constructor();
4
- }
1
+ import { AppError } from '../exceptions-handling/errors/app-error.class';
2
+ export declare class EmptyUtilsResponseError extends AppError {
3
+ constructor();
4
+ }
@@ -1,4 +1,4 @@
1
- export declare enum HeaderType {
2
- normal = "normal",
3
- compact = "compact"
4
- }
1
+ export declare enum HeaderType {
2
+ normal = "normal",
3
+ compact = "compact"
4
+ }
@@ -1,6 +1,6 @@
1
- export interface Offer {
2
- caption: string;
3
- offerType: string;
4
- percent: string;
5
- pid: number;
6
- }
1
+ export interface Offer {
2
+ caption: string;
3
+ offerType: string;
4
+ percent: string;
5
+ pid: number;
6
+ }
@@ -1,32 +1,32 @@
1
- import { TrackingInfo } from './tracking-info.interface';
2
- export interface Project {
3
- id: number;
4
- returnUrl: string;
5
- merchantId: number;
6
- canRepeatPayment: boolean;
7
- projectUrl: string;
8
- components: {
9
- [key: string]: {
10
- enabled: boolean;
11
- };
12
- };
13
- refundPolicySettings?: {
14
- policy_type: string;
15
- policy_version_id: number;
16
- is_policy_visible: boolean;
17
- };
18
- virtualCurrencyName?: string;
19
- name: string;
20
- logo: string | null;
21
- isBabkaChatEnabled?: boolean;
22
- isBabkaWalletEnabled: boolean;
23
- isBabkaPayCheckboxEnabled: boolean;
24
- isBabkaPayBlackListCheckEnabled: boolean;
25
- payouts: {
26
- serviceTermsUrl: string;
27
- isPayoutsMerchant: boolean;
28
- };
29
- isMerchantManageSavedMethods?: boolean;
30
- trackingInfo: TrackingInfo[] | [];
31
- isSubtotalVisibleByDefault?: boolean;
32
- }
1
+ import { TrackingInfo } from './tracking-info.interface';
2
+ export interface Project {
3
+ id: number;
4
+ returnUrl: string;
5
+ merchantId: number;
6
+ canRepeatPayment: boolean;
7
+ projectUrl: string;
8
+ components: {
9
+ [key: string]: {
10
+ enabled: boolean;
11
+ };
12
+ };
13
+ refundPolicySettings?: {
14
+ policy_type: string;
15
+ policy_version_id: number;
16
+ is_policy_visible: boolean;
17
+ };
18
+ virtualCurrencyName?: string;
19
+ name: string;
20
+ logo: string | null;
21
+ isBabkaChatEnabled?: boolean;
22
+ isBabkaWalletEnabled: boolean;
23
+ isBabkaPayCheckboxEnabled: boolean;
24
+ isBabkaPayBlackListCheckEnabled: boolean;
25
+ payouts: {
26
+ serviceTermsUrl: string;
27
+ isPayoutsMerchant: boolean;
28
+ };
29
+ isMerchantManageSavedMethods?: boolean;
30
+ trackingInfo: TrackingInfo[] | [];
31
+ isSubtotalVisibleByDefault?: boolean;
32
+ }
@@ -1,47 +1,47 @@
1
- export interface Purchase {
2
- purchase_type: 'virtual_currency' | 'pay2play' | 'subscription';
3
- checkout?: {
4
- amount: number;
5
- currency: string;
6
- };
7
- virtual_items?: {
8
- currency: string;
9
- items: Array<{
10
- amount: number;
11
- sku: string;
12
- }>;
13
- };
14
- virtual_currency?: {
15
- quantity: number;
16
- currency: string;
17
- };
18
- subscription?: {
19
- allow_modify: boolean;
20
- currency: string;
21
- description: string;
22
- external_id: string;
23
- name: string;
24
- plan_id: string;
25
- trial_days: null;
26
- };
27
- payment_system?: {
28
- id: number;
29
- allow_modify: boolean;
30
- allow_recurrent: boolean;
31
- allow_repayment: boolean;
32
- };
33
- order?: {
34
- id: number;
35
- currency: string;
36
- lineitems: Array<{
37
- id: number;
38
- amount: string;
39
- price: {
40
- amount: string;
41
- };
42
- quantity: number;
43
- sku: string;
44
- tax_category: string;
45
- }>;
46
- };
47
- }
1
+ export interface Purchase {
2
+ purchase_type: 'virtual_currency' | 'pay2play' | 'subscription';
3
+ checkout?: {
4
+ amount: number;
5
+ currency: string;
6
+ };
7
+ virtual_items?: {
8
+ currency: string;
9
+ items: Array<{
10
+ amount: number;
11
+ sku: string;
12
+ }>;
13
+ };
14
+ virtual_currency?: {
15
+ quantity: number;
16
+ currency: string;
17
+ };
18
+ subscription?: {
19
+ allow_modify: boolean;
20
+ currency: string;
21
+ description: string;
22
+ external_id: string;
23
+ name: string;
24
+ plan_id: string;
25
+ trial_days: null;
26
+ };
27
+ payment_system?: {
28
+ id: number;
29
+ allow_modify: boolean;
30
+ allow_recurrent: boolean;
31
+ allow_repayment: boolean;
32
+ };
33
+ order?: {
34
+ id: number;
35
+ currency: string;
36
+ lineitems: Array<{
37
+ id: number;
38
+ amount: string;
39
+ price: {
40
+ amount: string;
41
+ };
42
+ quantity: number;
43
+ sku: string;
44
+ tax_category: string;
45
+ }>;
46
+ };
47
+ }
@@ -1,3 +1,3 @@
1
- export declare enum SettingsMode {
2
- userAccount = "user_account"
3
- }
1
+ export declare enum SettingsMode {
2
+ userAccount = "user_account"
3
+ }
@@ -1,45 +1,45 @@
1
- import { AutoRedirectOnStatus } from './auto-redirect-on-status';
2
- import { StatusBackShow } from './status-back-show';
3
- import { HeaderType } from './header-type.enum';
4
- import { SettingsMode } from './settings-mode.enum';
5
- export interface Settings {
6
- cdnUrl: string;
7
- apiURL: string;
8
- currency?: string;
9
- theme?: string;
10
- white_label?: boolean;
11
- payment_system?: number | null;
12
- version?: string;
13
- desktop?: {
14
- header?: {
15
- is_visible?: boolean;
16
- visible_logo?: boolean;
17
- visible_name?: boolean;
18
- type?: HeaderType;
19
- close_button?: boolean;
20
- };
21
- };
22
- mobile?: {
23
- header?: {
24
- close_button?: boolean;
25
- };
26
- };
27
- mode?: SettingsMode;
28
- user_account?: {
29
- payment_accounts?: {
30
- enable?: boolean;
31
- };
32
- };
33
- disable_saved_methods?: boolean;
34
- is_independent_windows?: boolean;
35
- purchase_external_id?: string;
36
- paystation2: {
37
- autoredirect_on_status?: AutoRedirectOnStatus;
38
- autoredirect_on_time?: string;
39
- status_back_show?: StatusBackShow;
40
- status_back_link?: string;
41
- manual_redirection_action?: string;
42
- };
43
- is_prevent_external_link_open?: boolean;
44
- is_payment_methods_list_mode?: boolean;
45
- }
1
+ import { AutoRedirectOnStatus } from './auto-redirect-on-status';
2
+ import { StatusBackShow } from './status-back-show';
3
+ import { HeaderType } from './header-type.enum';
4
+ import { SettingsMode } from './settings-mode.enum';
5
+ export interface Settings {
6
+ cdnUrl: string;
7
+ apiURL: string;
8
+ currency?: string;
9
+ theme?: string;
10
+ white_label?: boolean;
11
+ payment_system?: number | null;
12
+ version?: string;
13
+ desktop?: {
14
+ header?: {
15
+ is_visible?: boolean;
16
+ visible_logo?: boolean;
17
+ visible_name?: boolean;
18
+ type?: HeaderType;
19
+ close_button?: boolean;
20
+ };
21
+ };
22
+ mobile?: {
23
+ header?: {
24
+ close_button?: boolean;
25
+ };
26
+ };
27
+ mode?: SettingsMode;
28
+ user_account?: {
29
+ payment_accounts?: {
30
+ enable?: boolean;
31
+ };
32
+ };
33
+ disable_saved_methods?: boolean;
34
+ is_independent_windows?: boolean;
35
+ purchase_external_id?: string;
36
+ paystation2: {
37
+ autoredirect_on_status?: AutoRedirectOnStatus;
38
+ autoredirect_on_time?: string;
39
+ status_back_show?: StatusBackShow;
40
+ status_back_link?: string;
41
+ manual_redirection_action?: string;
42
+ };
43
+ is_prevent_external_link_open?: boolean;
44
+ is_payment_methods_list_mode?: boolean;
45
+ }
@@ -1,30 +1,30 @@
1
- import { SecureApiClient } from '../http/secure-api/secure-api.service';
2
- import { DeepReadonly } from '../deep-readonly.type';
3
- import { InitConfiguration } from './configuration.interface';
4
- import { User } from './user.interface';
5
- import { Settings } from './settings.interface';
6
- import { Purchase } from './purchase.interface';
7
- import { Project } from './project.interface';
8
- import { UtilsResponse } from './utils-response.interface';
9
- import * as i0 from "@angular/core";
10
- export declare class SettingsService {
11
- private readonly secureApi;
12
- get project(): DeepReadonly<Project>;
13
- get purchase(): DeepReadonly<Purchase>;
14
- get settings(): DeepReadonly<Settings>;
15
- get user(): DeepReadonly<User>;
16
- get utilsResponse(): DeepReadonly<UtilsResponse>;
17
- get isEmpty(): boolean;
18
- get token(): string;
19
- get hasResponse(): boolean;
20
- isInitialized: boolean;
21
- private response;
22
- private _token;
23
- private sandboxMode;
24
- constructor(secureApi: SecureApiClient);
25
- init(configuration: InitConfiguration): Promise<void>;
26
- isSandboxMode(): boolean;
27
- private sendRequest;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<SettingsService, never>;
29
- static ɵprov: i0.ɵɵInjectableDeclaration<SettingsService>;
30
- }
1
+ import { SecureApiClient } from '../http/secure-api/secure-api.service';
2
+ import { DeepReadonly } from '../deep-readonly.type';
3
+ import { InitConfiguration } from './configuration.interface';
4
+ import { User } from './user.interface';
5
+ import { Settings } from './settings.interface';
6
+ import { Purchase } from './purchase.interface';
7
+ import { Project } from './project.interface';
8
+ import { UtilsResponse } from './utils-response.interface';
9
+ import * as i0 from "@angular/core";
10
+ export declare class SettingsService {
11
+ private readonly secureApi;
12
+ get project(): DeepReadonly<Project>;
13
+ get purchase(): DeepReadonly<Purchase>;
14
+ get settings(): DeepReadonly<Settings>;
15
+ get user(): DeepReadonly<User>;
16
+ get utilsResponse(): DeepReadonly<UtilsResponse>;
17
+ get isEmpty(): boolean;
18
+ get token(): string;
19
+ get hasResponse(): boolean;
20
+ isInitialized: boolean;
21
+ private response;
22
+ private _token;
23
+ private sandboxMode;
24
+ constructor(secureApi: SecureApiClient);
25
+ init(configuration: InitConfiguration): Promise<void>;
26
+ isSandboxMode(): boolean;
27
+ private sendRequest;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<SettingsService, never>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<SettingsService>;
30
+ }
@@ -1,14 +1,14 @@
1
- /**
2
- * none (ни один из статусов),
3
- * done (статус done),
4
- * final (статусы done, cancel),
5
- * virtual_operation (статус оплаты виртуальной валютой)
6
- * all (все статусы)
7
- */
8
- export declare enum StatusBackShow {
9
- none = "none",
10
- done = "done",
11
- final = "final",
12
- virtual_operation = "virtual_operation",
13
- all = "all"
14
- }
1
+ /**
2
+ * none (ни один из статусов),
3
+ * done (статус done),
4
+ * final (статусы done, cancel),
5
+ * virtual_operation (статус оплаты виртуальной валютой)
6
+ * all (все статусы)
7
+ */
8
+ export declare enum StatusBackShow {
9
+ none = "none",
10
+ done = "done",
11
+ final = "final",
12
+ virtual_operation = "virtual_operation",
13
+ all = "all"
14
+ }