@xsolla/payment-client-core 0.0.1 → 0.0.3-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 +8 -11
- package/esm2020/lib/core/boolean-number.enum.mjs +6 -0
- package/esm2020/lib/core/country/country.service.mjs +27 -0
- package/esm2020/lib/core/deep-readonly.type.mjs +2 -0
- package/esm2020/lib/core/exceptions-handling/errors/api-error.interface.mjs +2 -0
- package/esm2020/lib/core/exceptions-handling/errors/app-error.class.mjs +6 -0
- package/esm2020/lib/core/exceptions-handling/errors/http-error.class.mjs +40 -0
- package/esm2020/lib/core/exceptions-handling/errors/response-error.class.mjs +7 -0
- package/esm2020/lib/core/exceptions-handling/http-interceptor/http-error-data.interface.mjs +2 -0
- package/esm2020/lib/core/exceptions-handling/http-interceptor/http-error-response-data.interface.mjs +2 -0
- package/esm2020/lib/core/exceptions-handling/http-interceptor/http-exceptions.interceptor.mjs +22 -0
- package/esm2020/lib/core/extended-window.interface.mjs +2 -0
- package/esm2020/lib/core/http/secure-api/api-url.const.mjs +3 -0
- package/esm2020/lib/core/http/secure-api/options.interface.mjs +2 -0
- package/esm2020/lib/core/http/secure-api/secure-api.service.mjs +55 -0
- package/esm2020/lib/core/legal/legal.component.config.mjs +2 -0
- package/esm2020/lib/core/legal/legal.service.mjs +30 -0
- package/esm2020/lib/core/legal/refund-policy.service.mjs +30 -0
- package/esm2020/lib/core/payment-methods/payment-method-api.interface.mjs +2 -0
- package/esm2020/lib/core/payment-methods/payment-method.interface.mjs +2 -0
- package/esm2020/lib/core/payment-methods/payment-methods-api.interface.mjs +2 -0
- package/esm2020/lib/core/payment-methods/payment-methods-request-params.interface.mjs +2 -0
- package/esm2020/lib/core/payment-methods/payment-methods-response.class.mjs +26 -0
- package/esm2020/lib/core/payment-methods/payment-methods-response.interface.mjs +2 -0
- package/esm2020/lib/core/payment-methods/payment-methods-response.token.mjs +8 -0
- package/esm2020/lib/core/payment-methods/payment-methods.service.mjs +58 -0
- package/esm2020/lib/core/saved-methods/saved-method-api.interface.mjs +2 -0
- package/esm2020/lib/core/saved-methods/saved-method.interface.mjs +2 -0
- package/esm2020/lib/core/saved-methods/saved-methods-request-params.interface.mjs +2 -0
- package/esm2020/lib/core/saved-methods/saved-methods-response.class.mjs +24 -0
- package/esm2020/lib/core/saved-methods/saved-methods-response.interface.mjs +2 -0
- package/esm2020/lib/core/saved-methods/saved-methods-response.token.mjs +8 -0
- package/esm2020/lib/core/saved-methods/saved-methods.service.mjs +53 -0
- package/esm2020/lib/core/settings/auto-redirect-on-status.mjs +14 -0
- package/esm2020/lib/core/settings/balance.interface.mjs +2 -0
- package/esm2020/lib/core/settings/bonus.interface.mjs +2 -0
- package/esm2020/lib/core/settings/configuration.interface.mjs +2 -0
- package/esm2020/lib/core/settings/empty-utils-response.error.mjs +7 -0
- package/esm2020/lib/core/settings/header-type.enum.mjs +6 -0
- package/esm2020/lib/core/settings/offer.interface.mjs +2 -0
- package/esm2020/lib/core/settings/project.interface.mjs +2 -0
- package/esm2020/lib/core/settings/purchase.interface.mjs +2 -0
- package/esm2020/lib/core/settings/settings-mode.enum.mjs +5 -0
- package/esm2020/lib/core/settings/settings.interface.mjs +2 -0
- package/esm2020/lib/core/settings/settings.service.mjs +85 -0
- package/esm2020/lib/core/settings/status-back-show.mjs +16 -0
- package/esm2020/lib/core/settings/tracking-info.interface.mjs +2 -0
- package/esm2020/lib/core/settings/user.interface.mjs +2 -0
- package/esm2020/lib/core/settings/utils-response.interface.mjs +2 -0
- package/esm2020/lib/core/user-balance/user-balance-api.interface.mjs +2 -0
- package/esm2020/lib/core/user-balance/user-balance-request-params.interface.mjs +2 -0
- package/esm2020/lib/core/user-balance/user-balance-response.class.mjs +8 -0
- package/esm2020/lib/core/user-balance/user-balance-response.token.mjs +8 -0
- package/esm2020/lib/core/user-balance/user-balance.service.mjs +50 -0
- package/esm2020/lib/core/window.token.mjs +3 -0
- package/esm2020/lib/core-library.module.mjs +31 -7
- package/esm2020/lib/core-library.service.mjs +32 -3
- package/esm2020/public-api.mjs +2 -2
- package/fesm2015/xsolla-payment-client-core.mjs +582 -16
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +554 -16
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/boolean-number.enum.d.ts +4 -0
- package/lib/core/country/country.service.d.ts +12 -0
- package/lib/core/deep-readonly.type.d.ts +3 -0
- package/lib/core/exceptions-handling/errors/api-error.interface.d.ts +4 -0
- package/lib/core/exceptions-handling/errors/app-error.class.d.ts +3 -0
- package/lib/core/exceptions-handling/errors/http-error.class.d.ts +10 -0
- package/lib/core/exceptions-handling/errors/response-error.class.d.ts +4 -0
- package/lib/core/exceptions-handling/http-interceptor/http-error-data.interface.d.ts +20 -0
- package/lib/core/exceptions-handling/http-interceptor/http-error-response-data.interface.d.ts +7 -0
- package/lib/core/exceptions-handling/http-interceptor/http-exceptions.interceptor.d.ts +11 -0
- package/lib/core/extended-window.interface.d.ts +1 -0
- package/lib/core/http/secure-api/api-url.const.d.ts +2 -0
- package/lib/core/http/secure-api/options.interface.d.ts +14 -0
- package/lib/core/http/secure-api/secure-api.service.d.ts +20 -0
- package/lib/core/legal/legal.component.config.d.ts +5 -0
- package/lib/core/legal/legal.service.d.ts +14 -0
- package/lib/core/legal/refund-policy.service.d.ts +11 -0
- package/lib/core/payment-methods/payment-method-api.interface.d.ts +11 -0
- package/lib/core/payment-methods/payment-method.interface.d.ts +11 -0
- package/lib/core/payment-methods/payment-methods-api.interface.d.ts +10 -0
- package/lib/core/payment-methods/payment-methods-request-params.interface.d.ts +4 -0
- package/lib/core/payment-methods/payment-methods-response.class.d.ts +13 -0
- package/lib/core/payment-methods/payment-methods-response.interface.d.ts +4 -0
- package/lib/core/payment-methods/payment-methods-response.token.d.ts +7 -0
- package/lib/core/payment-methods/payment-methods.service.d.ts +20 -0
- package/lib/core/saved-methods/saved-method-api.interface.d.ts +22 -0
- package/lib/core/saved-methods/saved-method.interface.d.ts +21 -0
- package/lib/core/saved-methods/saved-methods-request-params.interface.d.ts +3 -0
- package/lib/core/saved-methods/saved-methods-response.class.d.ts +7 -0
- package/lib/core/saved-methods/saved-methods-response.interface.d.ts +4 -0
- package/lib/core/saved-methods/saved-methods-response.token.d.ts +7 -0
- package/lib/core/saved-methods/saved-methods.service.d.ts +19 -0
- package/lib/core/settings/auto-redirect-on-status.d.ts +12 -0
- package/lib/core/settings/balance.interface.d.ts +4 -0
- package/lib/core/settings/bonus.interface.d.ts +10 -0
- package/lib/core/settings/configuration.interface.d.ts +5 -0
- package/lib/core/settings/empty-utils-response.error.d.ts +4 -0
- package/lib/core/settings/header-type.enum.d.ts +4 -0
- package/lib/core/settings/offer.interface.d.ts +6 -0
- package/lib/core/settings/project.interface.d.ts +32 -0
- package/lib/core/settings/purchase.interface.d.ts +47 -0
- package/lib/core/settings/settings-mode.enum.d.ts +3 -0
- package/lib/core/settings/settings.interface.d.ts +45 -0
- package/lib/core/settings/settings.service.d.ts +30 -0
- package/lib/core/settings/status-back-show.d.ts +14 -0
- package/lib/core/settings/tracking-info.interface.d.ts +5 -0
- package/lib/core/settings/user.interface.d.ts +23 -0
- package/lib/core/settings/utils-response.interface.d.ts +16 -0
- package/lib/core/user-balance/user-balance-api.interface.d.ts +4 -0
- package/lib/core/user-balance/user-balance-request-params.interface.d.ts +3 -0
- package/lib/core/user-balance/user-balance-response.class.d.ts +6 -0
- package/lib/core/user-balance/user-balance-response.token.d.ts +7 -0
- package/lib/core/user-balance/user-balance.service.d.ts +17 -0
- package/lib/core/window.token.d.ts +3 -0
- package/lib/core-library.module.d.ts +2 -2
- package/lib/core-library.service.d.ts +27 -0
- package/package.json +4 -3
- package/public-api.d.ts +1 -1
- package/xsolla-payment-client-core-0.0.3-1.tgz +0 -0
- package/esm2020/lib/core-library.component.mjs +0 -11
- package/lib/core-library.component.d.ts +0 -5
- package/xsolla-payment-client-core-0.0.1.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xsolla-payment-client-core.mjs","sources":["../../../packages/payment-client-core/src/lib/core-library.service.ts","../../../packages/payment-client-core/src/lib/core-library.component.ts","../../../packages/payment-client-core/src/lib/core-library.module.ts","../../../packages/payment-client-core/src/public-api.ts","../../../packages/payment-client-core/src/xsolla-payment-client-core.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CoreLibraryService {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'x-payment-client-core',\n template: ` <p>core-library works!</p> `,\n styles: [],\n})\nexport class CoreLibraryComponent {}\n","import { NgModule } from '@angular/core';\nimport { CoreLibraryComponent } from './core-library.component';\n\n@NgModule({\n declarations: [CoreLibraryComponent],\n imports: [],\n exports: [CoreLibraryComponent],\n})\nexport class CoreLibraryModule {}\n","/*\n * Public API Surface of core-library\n */\n\nexport * from './lib/core-library.service';\nexport * from './lib/core-library.component';\nexport * from './lib/core-library.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,kBAAkB,CAAA;;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,kBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;2FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MCGY,oBAAoB,CAAA;;iHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,6DAHrB,CAA8B,4BAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAG7B,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,YACvB,CAA8B,4BAAA,CAAA,EAAA,CAAA;;;MCI7B,iBAAiB,CAAA;;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CAJb,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAEzB,oBAAoB,CAAA,EAAA,CAAA,CAAA;+GAEnB,iBAAiB,EAAA,CAAA,CAAA;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA,CAAA;;;ACPD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"xsolla-payment-client-core.mjs","sources":["../../../packages/payment-client-core/src/lib/core/exceptions-handling/errors/app-error.class.ts","../../../packages/payment-client-core/src/lib/core/settings/empty-utils-response.error.ts","../../../packages/payment-client-core/src/lib/core/window.token.ts","../../../packages/payment-client-core/src/lib/core/http/secure-api/api-url.const.ts","../../../packages/payment-client-core/src/lib/core/http/secure-api/secure-api.service.ts","../../../packages/payment-client-core/src/lib/core/settings/settings.service.ts","../../../packages/payment-client-core/src/lib/core/country/country.service.ts","../../../packages/payment-client-core/src/lib/core/exceptions-handling/errors/response-error.class.ts","../../../packages/payment-client-core/src/lib/core/boolean-number.enum.ts","../../../packages/payment-client-core/src/lib/core/payment-methods/payment-methods-response.class.ts","../../../packages/payment-client-core/src/lib/core/payment-methods/payment-methods-response.token.ts","../../../packages/payment-client-core/src/lib/core/payment-methods/payment-methods.service.ts","../../../packages/payment-client-core/src/lib/core/saved-methods/saved-methods-response.class.ts","../../../packages/payment-client-core/src/lib/core/saved-methods/saved-methods-response.token.ts","../../../packages/payment-client-core/src/lib/core/saved-methods/saved-methods.service.ts","../../../packages/payment-client-core/src/lib/core/user-balance/user-balance-response.class.ts","../../../packages/payment-client-core/src/lib/core/user-balance/user-balance-response.token.ts","../../../packages/payment-client-core/src/lib/core/user-balance/user-balance.service.ts","../../../packages/payment-client-core/src/lib/core/legal/refund-policy.service.ts","../../../packages/payment-client-core/src/lib/core/legal/legal.service.ts","../../../packages/payment-client-core/src/lib/core-library.service.ts","../../../packages/payment-client-core/src/lib/core/exceptions-handling/errors/http-error.class.ts","../../../packages/payment-client-core/src/lib/core/exceptions-handling/http-interceptor/http-exceptions.interceptor.ts","../../../packages/payment-client-core/src/lib/core-library.module.ts","../../../packages/payment-client-core/src/public-api.ts","../../../packages/payment-client-core/src/xsolla-payment-client-core.ts"],"sourcesContent":["export class AppError extends Error {\n public constructor(message: string) {\n super(message);\n }\n}\n","import { AppError } from '../exceptions-handling/errors/app-error.class';\n\nexport class EmptyUtilsResponseError extends AppError {\n public constructor() {\n super('Utils response is empty or not requested. Check your token.');\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { ExtendedWindow } from './extended-window.interface';\n\nexport const windowToken: InjectionToken<ExtendedWindow> = new InjectionToken(\n 'window'\n);\n","export const defaultApiUrl = 'https://secure.xsolla.com/paystation2/api/';\nexport const sandboxApiUrl =\n 'https://sandbox-secure.xsolla.com/paystation2/api/';\n","import { Observable } from 'rxjs';\nimport { Inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { windowToken } from '../../window.token';\nimport { ExtendedWindow } from '../../extended-window.interface';\nimport { RequestOptions } from './options.interface';\nimport { defaultApiUrl, sandboxApiUrl } from './api-url.const';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SecureApiClient {\n private isSandboxMode = false;\n\n public constructor(\n private readonly httpClient: HttpClient,\n @Inject(windowToken)\n private readonly window: ExtendedWindow\n ) {}\n\n public setSandboxMode(isSandboxMode: boolean): void {\n this.isSandboxMode = isSandboxMode;\n }\n\n public get<T>(url: string, options?: RequestOptions): Observable<T> {\n return this.httpClient.get<T>(`${this.baseUrl}${url}`, options);\n }\n\n public post<T>(\n url: string,\n body: unknown | null,\n options?: RequestOptions\n ): Observable<T> {\n return this.httpClient.post<T>(`${this.baseUrl}${url}`, body, options);\n }\n\n public patch<T>(\n url: string,\n body: unknown | null,\n options?: RequestOptions\n ): Observable<T> {\n return this.httpClient.patch<T>(`${this.baseUrl}${url}`, body, options);\n }\n\n public put<T>(\n url: string,\n body: unknown | null,\n options?: RequestOptions\n ): Observable<T> {\n return this.httpClient.put<T>(`${this.baseUrl}${url}`, body, options);\n }\n\n public delete<T>(url: string, options?: RequestOptions): Observable<T> {\n return this.httpClient.delete<T>(`${this.baseUrl}${url}`, options);\n }\n\n public get baseUrl(): string {\n let predefinedBaseUrl: string | null = null;\n\n try {\n predefinedBaseUrl = this.window.localStorage.getItem('devApiUrl');\n } catch (e: unknown) {\n console.warn('localStorage is not available');\n }\n\n if (predefinedBaseUrl) {\n return predefinedBaseUrl;\n }\n\n return this.isSandboxMode ? sandboxApiUrl : defaultApiUrl;\n }\n}\n","import { firstValueFrom } from 'rxjs';\nimport { Injectable } from '@angular/core';\nimport { HttpParams } from '@angular/common/http';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { DeepReadonly } from '../deep-readonly.type';\nimport { InitConfiguration } from './configuration.interface';\nimport { EmptyUtilsResponseError } from './empty-utils-response.error';\nimport { User } from './user.interface';\nimport { Settings } from './settings.interface';\nimport { Purchase } from './purchase.interface';\nimport { Project } from './project.interface';\nimport { UtilsResponse } from './utils-response.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SettingsService {\n public get project(): DeepReadonly<Project> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response.project;\n }\n\n public get purchase(): DeepReadonly<Purchase> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response.purchase;\n }\n\n public get settings(): DeepReadonly<Settings> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n if (this.response?.purchase_external_id) {\n return {\n ...this.response.settings,\n purchase_external_id: this.response.purchase_external_id,\n };\n }\n\n return this.response?.settings;\n }\n\n public get user(): DeepReadonly<User> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response.user;\n }\n\n public get utilsResponse(): DeepReadonly<UtilsResponse> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response;\n }\n\n public get isEmpty(): boolean {\n return !this.response;\n }\n\n public get token(): string {\n return this._token;\n }\n\n public get hasResponse(): boolean {\n return !!this.response;\n }\n\n public isInitialized = false;\n\n private response!: DeepReadonly<UtilsResponse> | undefined;\n\n private _token = '';\n\n private sandboxMode = false;\n\n public constructor(private readonly secureApi: SecureApiClient) {}\n\n public async init(configuration: InitConfiguration): Promise<void> {\n if (!configuration.token) {\n return Promise.reject('token is missing');\n }\n\n this._token = configuration.token;\n this.sandboxMode = !!configuration.sandbox;\n\n await this.sendRequest(this.token);\n\n this.isInitialized = true;\n }\n\n public isSandboxMode(): boolean {\n return this.sandboxMode;\n }\n\n private async sendRequest(token: string): Promise<void> {\n const params = new HttpParams().set('access_token', token);\n\n this.secureApi.setSandboxMode(this.isSandboxMode());\n\n this.response = await firstValueFrom(\n this.secureApi.get<UtilsResponse>('utils', { params })\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SettingsService } from '../settings/settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CountryService {\n private userDefinedCountry: string | null = null;\n\n public constructor(private readonly settingsService: SettingsService) {}\n\n public setCountry(country: string): void {\n this.userDefinedCountry = country;\n }\n\n public getCountry(): string {\n return this.userDefinedCountry ?? this.getTokenCountry();\n }\n\n private getTokenCountry(): string {\n return this.settingsService.user.country.value;\n }\n}\n","import { AppError } from './app-error.class';\n\nexport class ResponseError extends AppError {\n public constructor(message?: string) {\n super('Response failed' + (message ? `: \"${message}\".` : '.'));\n }\n}\n","export enum BooleanNumber {\n false = 0,\n true = 1,\n}\n","import { BooleanNumber } from '../boolean-number.enum';\nimport { PaymentMethodApi } from './payment-method-api.interface';\nimport { PaymentMethod } from './payment-method.interface';\nimport { PaymentMethodsApi } from './payment-methods-api.interface';\n\nexport class PaymentMethodsResponse {\n public readonly top: PaymentMethod[];\n public readonly especial: PaymentMethod[];\n public readonly remained: PaymentMethod[];\n public readonly remainedCount: { total: number; visible: number };\n\n public constructor(paymentMethods: PaymentMethodsApi) {\n this.especial = paymentMethods.especial.map((method) =>\n this.mapPaymentMethod(method)\n );\n this.top = paymentMethods.top.map((method) =>\n this.mapPaymentMethod(method)\n );\n this.remained = paymentMethods.remained.map((method) =>\n this.mapPaymentMethod(method)\n );\n this.remainedCount = {\n total: paymentMethods.remained_count.total,\n visible: paymentMethods.remained_count.visible,\n };\n }\n\n private mapPaymentMethod(method: PaymentMethodApi): PaymentMethod {\n return {\n id: method.id,\n rank: method.rank,\n name: method.name,\n aliases: method.aliases,\n categories: method.cat,\n isVisible: method.is_visible,\n recommended: method.recommended === BooleanNumber.true,\n enabledSaveAccount: method.enabled_save_account,\n iconName: method.switch_icon_name,\n };\n }\n}\n","import { InjectionToken, ValueProvider } from '@angular/core';\nimport { PaymentMethodsResponse } from './payment-methods-response.class';\n\ntype ResponseParameters = ConstructorParameters<typeof PaymentMethodsResponse>;\n\nexport type PaymentMethodsResponseFactory = (\n ...args: ResponseParameters\n) => PaymentMethodsResponse;\n\nexport const paymentMethodsResponseFactoryToken: InjectionToken<PaymentMethodsResponseFactory> =\n new InjectionToken<PaymentMethodsResponseFactory>('PaymentMethodsResponse');\n\nexport const paymentMethodsResponseFactoryProvider: ValueProvider = {\n provide: paymentMethodsResponseFactoryToken,\n useValue: (...args: ResponseParameters) =>\n new PaymentMethodsResponse(...args),\n};\n","import { HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { lastValueFrom, map } from 'rxjs';\nimport { CountryService } from '../country/country.service';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport { PaymentMethod } from './payment-method.interface';\nimport { PaymentMethodsRequestParams } from './payment-methods-request-params.interface';\nimport { PaymentMethodsResponse } from './payment-methods-response.class';\nimport { PaymentMethodsResponseApi } from './payment-methods-response.interface';\nimport {\n PaymentMethodsResponseFactory,\n paymentMethodsResponseFactoryToken,\n} from './payment-methods-response.token';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentMethodsService {\n private readonly apiRoute = 'remained_payment_methods';\n\n private readonly cache = new Map<string, Promise<PaymentMethodsResponse>>();\n\n public constructor(\n @Inject(paymentMethodsResponseFactoryToken)\n private readonly responseFactory: PaymentMethodsResponseFactory,\n private readonly settingsService: SettingsService,\n private readonly countryService: CountryService,\n private readonly secureApi: SecureApiClient\n ) {}\n\n public async getList(): Promise<PaymentMethod[]> {\n const response = await this.request();\n return response.remained;\n }\n\n public async getQuickMethods(): Promise<PaymentMethod[]> {\n const response = await this.request();\n return response.especial;\n }\n\n private async request(): Promise<PaymentMethodsResponse> {\n const requestParams: PaymentMethodsRequestParams = {\n access_token: this.settingsService.token,\n country: this.countryService.getCountry(),\n };\n const cacheKey = JSON.stringify(requestParams);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n lastValueFrom(\n this.secureApi\n .post<PaymentMethodsResponseApi>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n .pipe(\n map((response) => this.responseFactory(response.payment_methods))\n )\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n })\n );\n }\n\n // @ts-expect-error the map already has the cache with key\n return this.cache.get(cacheKey);\n }\n}\n","import { SavedMethodsResponseApi } from './saved-methods-response.interface';\nimport { SavedMethodApi } from './saved-method-api.interface';\nimport { SavedMethod } from './saved-method.interface';\n\nexport class SavedMethodsResponse {\n public readonly list: SavedMethod[];\n\n public constructor(savedMethods: SavedMethodsResponseApi) {\n this.list = savedMethods.list.map((method) => this.mapSavedMethod(method));\n }\n\n private mapSavedMethod(method: SavedMethodApi): SavedMethod {\n return {\n currency: method.currency,\n form: method.form,\n id: method.id,\n isSelected: method.isSelected,\n isBabkaPay: method.is_babka_pay,\n name: method.name,\n pid: method.pid,\n psName: method.psName,\n recurrentType: method.recurrent_type,\n replaced: method.replaced,\n type: method.type,\n cardExpiryDate: method.card_expiry_date,\n iconName: method.switch_icon_name,\n partner: method.partner,\n };\n }\n}\n","import { InjectionToken, ValueProvider } from '@angular/core';\nimport { SavedMethodsResponse } from './saved-methods-response.class';\n\ntype ResponseParameters = ConstructorParameters<typeof SavedMethodsResponse>;\n\nexport type SavedMethodsResponseFactory = (\n ...args: ResponseParameters\n) => SavedMethodsResponse;\n\nexport const savedMethodsResponseFactoryToken: InjectionToken<SavedMethodsResponseFactory> =\n new InjectionToken<SavedMethodsResponseFactory>('SavedMethodsResponse');\n\nexport const savedMethodsResponseFactoryProvider: ValueProvider = {\n provide: savedMethodsResponseFactoryToken,\n useValue: (...args: ResponseParameters) => new SavedMethodsResponse(...args),\n};\n","import { HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { lastValueFrom, map } from 'rxjs';\nimport { CountryService } from '../country/country.service';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport { SavedMethodsRequestParams } from './saved-methods-request-params.interface';\nimport { SavedMethodsResponseApi } from './saved-methods-response.interface';\nimport {\n SavedMethodsResponseFactory,\n savedMethodsResponseFactoryToken,\n} from './saved-methods-response.token';\nimport { SavedMethodsResponse } from './saved-methods-response.class';\nimport { SavedMethod } from './saved-method.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SavedMethodsService {\n private readonly apiRoute = 'savedmethods';\n\n private readonly cache = new Map<string, Promise<SavedMethodsResponse>>();\n\n public constructor(\n @Inject(savedMethodsResponseFactoryToken)\n private readonly responseFactory: SavedMethodsResponseFactory,\n private readonly settingsService: SettingsService,\n private readonly countryService: CountryService,\n private readonly secureApi: SecureApiClient\n ) {}\n\n public async getList(): Promise<SavedMethod[]> {\n const response = await this.request();\n return response.list;\n }\n\n private async request(): Promise<SavedMethodsResponse> {\n const requestParams: SavedMethodsRequestParams = {\n access_token: this.settingsService.token,\n };\n const cacheKey = JSON.stringify(requestParams);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n lastValueFrom(\n this.secureApi\n .post<SavedMethodsResponseApi>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n .pipe(map((response) => this.responseFactory(response)))\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n })\n );\n }\n\n // @ts-expect-error the map already has the cache with key\n return this.cache.get(cacheKey);\n }\n}\n","import { UserBalanceApi } from './user-balance-api.interface';\n\nexport class UserBalanceResponse {\n public readonly isEnoughUserBalance: boolean;\n public readonly isEnoughUserRecurrentBalance: boolean;\n\n public constructor(userBalance: UserBalanceApi) {\n this.isEnoughUserBalance = userBalance.is_enough_user_balance ?? false;\n this.isEnoughUserRecurrentBalance =\n userBalance.is_enough_user_recurrent_balance ?? false;\n }\n}\n","import { InjectionToken, ValueProvider } from '@angular/core';\nimport { UserBalanceResponse } from './user-balance-response.class';\n\ntype ResponseParameters = ConstructorParameters<typeof UserBalanceResponse>;\n\nexport type UserBalanceResponseFactory = (\n ...args: ResponseParameters\n) => UserBalanceResponse;\n\nexport const userBalanceResponseFactoryToken: InjectionToken<UserBalanceResponseFactory> =\n new InjectionToken<UserBalanceResponseFactory>('UserBalanceResponse');\n\nexport const userBalanceResponseFactoryProvider: ValueProvider = {\n provide: userBalanceResponseFactoryToken,\n useValue: (...args: ResponseParameters) => new UserBalanceResponse(...args),\n};\n","import { HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { lastValueFrom, map } from 'rxjs';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport {\n UserBalanceResponseFactory,\n userBalanceResponseFactoryToken,\n} from './user-balance-response.token';\nimport { UserBalanceResponse } from './user-balance-response.class';\nimport { UserBalanceRequestParams } from './user-balance-request-params.interface';\nimport { UserBalanceApi } from './user-balance-api.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserBalanceService {\n private readonly apiRoute = 'balance/sufficiency';\n\n private readonly cache = new Map<string, Promise<UserBalanceResponse>>();\n\n public constructor(\n @Inject(userBalanceResponseFactoryToken)\n private readonly responseFactory: UserBalanceResponseFactory,\n private readonly settingsService: SettingsService,\n private readonly secureApi: SecureApiClient\n ) {}\n\n public async getUserBalance(): Promise<UserBalanceResponse> {\n return this.request();\n }\n\n private async request(): Promise<UserBalanceResponse> {\n const requestParams: UserBalanceRequestParams = {\n access_token: this.settingsService.token,\n };\n const cacheKey = JSON.stringify(requestParams);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n lastValueFrom(\n this.secureApi\n .post<UserBalanceApi>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n .pipe(map((response) => this.responseFactory(response)))\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n })\n );\n }\n\n // @ts-expect-error the map already has the cache with key\n return this.cache.get(cacheKey);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SettingsService } from '../../core/settings/settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RefundPolicyService {\n public readonly defaultVersionId = 2;\n public readonly defaultUrl = 'https://xsolla.com/refund-policy-ps';\n\n public constructor(private readonly settingsService: SettingsService) {}\n\n public get url(): string {\n if (!this.settingsService.token) {\n return 'https://xsolla.com/refundpolicy/en-us';\n }\n const language = this.settingsService.user.local ?? 'en';\n const versionId =\n this.settingsService.project.refundPolicySettings?.policy_version_id ??\n this.defaultVersionId;\n const countryIso = this.settingsService.user.country.value ?? '';\n const projectId = this.settingsService.project.id;\n return `${this.defaultUrl}?policy_version_id=${versionId}&language=${language}&country=${countryIso}&project_id=${projectId}`;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { LegalComponentConfig } from './legal.component.config';\nimport { SettingsService } from '../settings/settings.service';\nimport { RefundPolicyService } from './refund-policy.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LegalService {\n public readonly sctlPolicyUrl = 'https://xsolla.com/sctl';\n\n private get isJapanUser(): boolean {\n return this.settingsService.user?.local === 'ja';\n }\n\n public constructor(\n private readonly settingsService: SettingsService,\n private readonly refundPolicyService: RefundPolicyService\n ) {}\n\n public getLegalComponentConfig(): LegalComponentConfig {\n return {\n isJapanUser: this.isJapanUser,\n refundPolicyUrl: this.refundPolicyService.url,\n sctlPolicyUrl: this.sctlPolicyUrl,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { InitConfiguration } from './core/settings/configuration.interface';\nimport { SettingsService } from './core/settings/settings.service';\nimport { CountryService } from './core/country/country.service';\nimport { PaymentMethodsService } from './core/payment-methods/payment-methods.service';\nimport { PaymentMethod } from './core/payment-methods/payment-method.interface';\nimport { SavedMethodsService } from './core/saved-methods/saved-methods.service';\nimport { SavedMethod } from './core/saved-methods/saved-method.interface';\nimport { UserBalanceResponse } from './core/user-balance/user-balance-response.class';\nimport { UserBalanceService } from './core/user-balance/user-balance.service';\nimport { LegalService } from './core/legal/legal.service';\nimport { LegalComponentConfig } from './core/legal/legal.component.config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CoreLibraryService {\n public paymentMethods = {\n getList: async (): Promise<PaymentMethod[]> =>\n this.paymentMethodsService.getList(),\n\n getQuickMethods: async (): Promise<PaymentMethod[]> =>\n this.paymentMethodsService.getQuickMethods(),\n getSavedMethods: async (): Promise<SavedMethod[]> =>\n this.savedMethodsService.getList(),\n getUserBalance: async (): Promise<UserBalanceResponse> =>\n this.userBalanceService.getUserBalance(),\n };\n\n public constructor(\n private readonly settingsService: SettingsService,\n private readonly countryService: CountryService,\n private readonly paymentMethodsService: PaymentMethodsService,\n private readonly savedMethodsService: SavedMethodsService,\n private readonly userBalanceService: UserBalanceService,\n private readonly legalService: LegalService\n ) {}\n\n public async init(configuration: InitConfiguration): Promise<void> {\n return this.settingsService.init(configuration);\n }\n\n public setCountry(country: string): void {\n this.countryService.setCountry(country);\n }\n\n public getLegalComponentConfig(): LegalComponentConfig {\n return this.legalService.getLegalComponentConfig();\n }\n}\n","import { HttpErrorResponse, HttpRequest } from '@angular/common/http';\nimport { AppError } from './app-error.class';\nimport { HttpErrorData } from '../http-interceptor/http-error-data.interface';\nimport { HttpErrorResponseData } from '../http-interceptor/http-error-response-data.interface';\n\nexport class HttpError extends AppError {\n private readonly RESTRICTED_KEYS_REGEXP = new RegExp(\n '.*(card_number|number|cvv|cvn|month|year|cardholdername|client_data|dfp|password).*',\n 'i'\n );\n private readonly httpErrorData!: HttpErrorData;\n\n public constructor(error: HttpErrorResponse, req: HttpRequest<unknown>) {\n super(error.message);\n\n this.httpErrorData = {\n request: {\n url: req.url,\n method: req.method,\n headers: req.headers,\n },\n response: {\n status: error.status,\n headers: error.headers,\n },\n };\n\n if (req.body) {\n this.httpErrorData.request.data = this.cleanPersonalData(\n req.body as { [key: string]: unknown }\n );\n }\n\n if (error.statusText) {\n const errorData = error.error as HttpErrorResponseData;\n\n this.httpErrorData.response.data = {\n statusText: error.statusText,\n errors: errorData?.errors ?? [],\n };\n }\n }\n\n public getHttpErrorData(): HttpErrorData {\n return this.httpErrorData;\n }\n\n private cleanPersonalData(data: { [key: string]: unknown }): {\n [key: string]: unknown;\n } {\n return Object.entries(data).reduce((acc, [key, val]) => {\n return {\n ...acc,\n [key]: this.RESTRICTED_KEYS_REGEXP.test(key) ? '***' : val,\n };\n }, {});\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest,\n} from '@angular/common/http';\n\nimport { catchError } from 'rxjs/operators';\nimport { Router } from '@angular/router';\nimport { Observable, throwError } from 'rxjs';\nimport { HttpError } from '../errors/http-error.class';\n@Injectable()\nexport class HttpExceptionsInterceptor implements HttpInterceptor {\n public constructor(public router: Router) {}\n\n public intercept(\n req: HttpRequest<unknown>,\n next: HttpHandler\n ): Observable<HttpEvent<unknown>> {\n return next.handle(req).pipe(\n catchError((error: HttpErrorResponse) => {\n return throwError(() => new HttpError(error, req));\n })\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport { HttpExceptionsInterceptor } from './core/exceptions-handling/http-interceptor/http-exceptions.interceptor';\nimport { windowToken } from './core/window.token';\nimport { paymentMethodsResponseFactoryProvider } from './core/payment-methods/payment-methods-response.token';\nimport { savedMethodsResponseFactoryProvider } from './core/saved-methods/saved-methods-response.token';\nimport { userBalanceResponseFactoryProvider } from './core/user-balance/user-balance-response.token';\n\n@NgModule({\n imports: [HttpClientModule],\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: HttpExceptionsInterceptor,\n multi: true,\n },\n { provide: windowToken, useValue: window },\n paymentMethodsResponseFactoryProvider,\n savedMethodsResponseFactoryProvider,\n userBalanceResponseFactoryProvider,\n ],\n})\nexport class CoreLibraryModule {}\n","/*\n * Public API Surface of core-library\n */\n\nexport * from './lib/core-library.service';\nexport * from './lib/core-library.module';\nexport * from './lib/core/legal/legal.component.config';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SecureApiClient","i1.SettingsService","i2.CountryService","i3.SecureApiClient","i2.SecureApiClient","i2.RefundPolicyService","i3.PaymentMethodsService","i4.SavedMethodsService","i5.UserBalanceService","i6.LegalService","i1"],"mappings":";;;;;;;;AAAM,MAAO,QAAS,SAAQ,KAAK,CAAA;AACjC,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;KAChB;AACF;;ACFK,MAAO,uBAAwB,SAAQ,QAAQ,CAAA;AACnD,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,6DAA6D,CAAC,CAAC;KACtE;AACF;;ACHM,MAAM,WAAW,GAAmC,IAAI,cAAc,CAC3E,QAAQ,CACT;;ACLM,MAAM,aAAa,GAAG,4CAA4C,CAAC;AACnE,MAAM,aAAa,GACxB,oDAAoD;;MCSzC,eAAe,CAAA;IAG1B,WACmB,CAAA,UAAsB,EAEtB,MAAsB,EAAA;QAFtB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QAEtB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAgB;QALjC,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;KAM1B;AAEG,IAAA,cAAc,CAAC,aAAsB,EAAA;AAC1C,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;KACpC;IAEM,GAAG,CAAI,GAAW,EAAE,OAAwB,EAAA;AACjD,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,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AO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE;QAC1C,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;AACnC,KAAA,EAAA,OAAA,EAAA,CAXS,gBAAgB,CAAA,EAAA,CAAA,CAAA;2FAaf,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAd7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,yBAAyB;AACnC,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE;wBAC1C,qCAAqC;wBACrC,mCAAmC;wBACnC,kCAAkC;AACnC,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SettingsService } from '../settings/settings.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CountryService {
|
|
4
|
+
private readonly settingsService;
|
|
5
|
+
private userDefinedCountry;
|
|
6
|
+
constructor(settingsService: SettingsService);
|
|
7
|
+
setCountry(country: string): void;
|
|
8
|
+
getCountry(): string;
|
|
9
|
+
private getTokenCountry;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CountryService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CountryService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpErrorResponse, HttpRequest } from '@angular/common/http';
|
|
2
|
+
import { AppError } from './app-error.class';
|
|
3
|
+
import { HttpErrorData } from '../http-interceptor/http-error-data.interface';
|
|
4
|
+
export declare class HttpError extends AppError {
|
|
5
|
+
private readonly RESTRICTED_KEYS_REGEXP;
|
|
6
|
+
private readonly httpErrorData;
|
|
7
|
+
constructor(error: HttpErrorResponse, req: HttpRequest<unknown>);
|
|
8
|
+
getHttpErrorData(): HttpErrorData;
|
|
9
|
+
private cleanPersonalData;
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HttpHeaders, HttpStatusCode } from '@angular/common/http';
|
|
2
|
+
import { ApiError } from '../errors/api-error.interface';
|
|
3
|
+
export interface HttpErrorData {
|
|
4
|
+
request: {
|
|
5
|
+
url: string;
|
|
6
|
+
method: string;
|
|
7
|
+
headers: HttpHeaders;
|
|
8
|
+
data?: {
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
response: {
|
|
13
|
+
status: HttpStatusCode;
|
|
14
|
+
headers: HttpHeaders;
|
|
15
|
+
data?: {
|
|
16
|
+
statusText: string;
|
|
17
|
+
errors: ApiError[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class HttpExceptionsInterceptor implements HttpInterceptor {
|
|
6
|
+
router: Router;
|
|
7
|
+
constructor(router: Router);
|
|
8
|
+
intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpExceptionsInterceptor, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HttpExceptionsInterceptor>;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ExtendedWindow = Window;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpContext, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
|
+
export interface RequestOptions {
|
|
3
|
+
headers?: HttpHeaders | {
|
|
4
|
+
[header: string]: string | string[];
|
|
5
|
+
};
|
|
6
|
+
context?: HttpContext;
|
|
7
|
+
observe?: 'body';
|
|
8
|
+
params?: HttpParams | {
|
|
9
|
+
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
10
|
+
};
|
|
11
|
+
reportProgress?: boolean;
|
|
12
|
+
responseType?: 'json';
|
|
13
|
+
withCredentials?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { ExtendedWindow } from '../../extended-window.interface';
|
|
4
|
+
import { RequestOptions } from './options.interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SecureApiClient {
|
|
7
|
+
private readonly httpClient;
|
|
8
|
+
private readonly window;
|
|
9
|
+
private isSandboxMode;
|
|
10
|
+
constructor(httpClient: HttpClient, window: ExtendedWindow);
|
|
11
|
+
setSandboxMode(isSandboxMode: boolean): void;
|
|
12
|
+
get<T>(url: string, options?: RequestOptions): Observable<T>;
|
|
13
|
+
post<T>(url: string, body: unknown | null, options?: RequestOptions): Observable<T>;
|
|
14
|
+
patch<T>(url: string, body: unknown | null, options?: RequestOptions): Observable<T>;
|
|
15
|
+
put<T>(url: string, body: unknown | null, options?: RequestOptions): Observable<T>;
|
|
16
|
+
delete<T>(url: string, options?: RequestOptions): Observable<T>;
|
|
17
|
+
get baseUrl(): string;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SecureApiClient, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SecureApiClient>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LegalComponentConfig } from './legal.component.config';
|
|
2
|
+
import { SettingsService } from '../settings/settings.service';
|
|
3
|
+
import { RefundPolicyService } from './refund-policy.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LegalService {
|
|
6
|
+
private readonly settingsService;
|
|
7
|
+
private readonly refundPolicyService;
|
|
8
|
+
readonly sctlPolicyUrl = "https://xsolla.com/sctl";
|
|
9
|
+
private get isJapanUser();
|
|
10
|
+
constructor(settingsService: SettingsService, refundPolicyService: RefundPolicyService);
|
|
11
|
+
getLegalComponentConfig(): LegalComponentConfig;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LegalService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LegalService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SettingsService } from '../../core/settings/settings.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class RefundPolicyService {
|
|
4
|
+
private readonly settingsService;
|
|
5
|
+
readonly defaultVersionId = 2;
|
|
6
|
+
readonly defaultUrl = "https://xsolla.com/refund-policy-ps";
|
|
7
|
+
constructor(settingsService: SettingsService);
|
|
8
|
+
get url(): string;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RefundPolicyService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RefundPolicyService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PaymentMethodApi } from './payment-method-api.interface';
|
|
2
|
+
export interface PaymentMethodsApi {
|
|
3
|
+
top: PaymentMethodApi[];
|
|
4
|
+
especial: PaymentMethodApi[];
|
|
5
|
+
remained: PaymentMethodApi[];
|
|
6
|
+
remained_count: {
|
|
7
|
+
total: number;
|
|
8
|
+
visible: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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 {};
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -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,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,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
|
+
}
|
|
@@ -0,0 +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
|
+
}
|