@experian-ecs/connected-api-sdk 1.0.2 → 1.1.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.
- package/README.md +24 -0
- package/dist/esm/index.mjs +193 -167
- package/dist/esm/index.mjs.map +1 -1
- package/dist/index.d.ts +73 -24
- package/dist/umd/index.umd.js +1 -1
- package/dist/umd/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/lib/Error.ts","../../src/globals.ts","../../src/lib/ApiClient/ApiClient.ts","../../src/resources/CreditScores/CreditScores.ts","../../src/resources/Entitlements/Entitlements.ts","../../src/resources/CreditAttributes/CreditAttributes.ts","../../src/resources/CreditScoreSimulator/CreditScoreSimulator.ts","../../src/resources/CreditScorePlanner/CreditScorePlanner.ts","../../src/resources/Alerts/Alerts.ts","../../src/resources/CreditReports/CreditReports.ts","../../src/resources/Customers/Customers.ts","../../src/resources/CustomerAuth/CustomerAuth.ts","../../src/resources/Registrations/Registrations.ts","../../src/resources/ProductConfigs/ProductConfigs.ts","../../src/utils.ts","../../src/lib/AuthClient/AuthClient.ts","../../src/lib/SDKClient/SDKClient.ts","../../src/resources/CreditScorePlanner/typeGuards.ts","../../src/resources/CreditScoreSimulator/typeGuards.ts"],"sourcesContent":["export type ConnectedSolutionsAPIErrorData = {\n dev_url: string;\n code: string;\n message: string;\n};\n\nexport type ConnectedSolutionsSDKErrorTypes =\n | 'api_error'\n | 'auth_error'\n | 'sdk_error'\n | 'unknown_error';\n\nexport type ConnectedSolutionsClientRawError = {\n message: string;\n type: ConnectedSolutionsSDKErrorTypes;\n status?: number;\n data?: ConnectedSolutionsAPIErrorData;\n};\n\nfunction generateError(rawError: ConnectedSolutionsClientRawError) {\n switch (rawError.type) {\n case 'api_error':\n return new ConnectedSolutionsClientApiError(rawError);\n case 'auth_error':\n return new ConnectedSolutionsClientAuthError(rawError);\n case 'sdk_error':\n return new ConnectedSolutionsClientSDKError(rawError);\n default:\n return new ConnectedSolutionsClientUnknownError(rawError);\n }\n}\n\nexport class ConnectedSolutionsClientError extends Error {\n readonly message: string;\n readonly data?: ConnectedSolutionsAPIErrorData;\n readonly status?: number;\n\n constructor(raw: ConnectedSolutionsClientRawError) {\n super(raw.message);\n this.message = raw.data?.message || raw.message || '';\n this.data = raw.data;\n this.status = raw.status;\n }\n\n static generateError = generateError;\n}\n\nexport class ConnectedSolutionsClientApiError extends ConnectedSolutionsClientError {\n constructor(args: ConnectedSolutionsClientRawError) {\n super(args);\n this.name = 'ConnectedSolutionsClientApiError';\n }\n}\n\nexport class ConnectedSolutionsClientAuthError extends ConnectedSolutionsClientError {\n constructor(args: ConnectedSolutionsClientRawError) {\n super(args);\n this.name = 'ConnectedSolutionsClientAuthError';\n }\n}\n\nexport class ConnectedSolutionsClientUnknownError extends ConnectedSolutionsClientError {\n constructor(args: ConnectedSolutionsClientRawError) {\n super(args);\n this.name = 'ConnectedSolutionsClientUnknownError';\n }\n}\n\nexport class ConnectedSolutionsClientSDKError extends ConnectedSolutionsClientError {\n constructor(args: ConnectedSolutionsClientRawError) {\n super(args);\n this.name = 'ConnectedSolutionsClientSDKError';\n }\n}\n","export const ENVIRONMENT_URLS = {\n PRODUCTION: 'https://connected-api.experian.com',\n SANDBOX: 'https://sandbox.connected-api.experian.com',\n UAT: 'https://uat-api.ecs.experian.com',\n INTEGRATION: 'https://integration-api.ecs.experian.com',\n DEVELOPMENT: 'https://dev-api.ecs.experian.com'\n};\n\nexport const CONTENTSTACK_URLS = {\n PRODUCTION:\n 'https://unity-contentstack.integration.us-exp-api.experiancs.com',\n SANDBOX: 'https://unity-contentstack.dev.us-exp-api.experiancs.com',\n UAT: 'https://unity-contentstack.dev.us-exp-api.experiancs.com',\n INTEGRATION: 'https://unity-contentstack.dev.us-exp-api.experiancs.com',\n DEVELOPMENT: 'https://unity-contentstack.dev.us-exp-api.experiancs.com'\n};\n","import {\n type ConnectedSolutionsClientApiError,\n type ConnectedSolutionsClientAuthError,\n ConnectedSolutionsClientError,\n type ConnectedSolutionsClientRawError,\n type ConnectedSolutionsClientSDKError,\n type ConnectedSolutionsClientUnknownError,\n type ConnectedSolutionsAPIErrorData\n} from 'lib/Error';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\nimport { CONTENTSTACK_URLS, ENVIRONMENT_URLS } from 'globals';\n\nexport type ConnectedSolutionsClientMeta = {\n status: number;\n statusText: string;\n};\n\nexport type ConnectedSolutionsClientErrors =\n | ConnectedSolutionsClientApiError\n | ConnectedSolutionsClientAuthError\n | ConnectedSolutionsClientUnknownError\n | ConnectedSolutionsClientSDKError;\n\nexport type ApiClientResponse<DataType = Record<string, unknown>> =\n | {\n data: DataType;\n error: undefined;\n meta: ConnectedSolutionsClientMeta;\n }\n | {\n data: undefined;\n error: ConnectedSolutionsClientErrors;\n meta: ConnectedSolutionsClientMeta;\n };\n\nexport class ApiClient {\n config: ConnectedSolutionsSDKConfig;\n baseUrl = '';\n contentstackUrl = '';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n const defaultEnvironement = 'PRODUCTION';\n const environment = config.environment ?? defaultEnvironement;\n\n this.config = config;\n this.baseUrl = ENVIRONMENT_URLS[environment];\n this.contentstackUrl = CONTENTSTACK_URLS[environment];\n }\n\n #validateConfig(): void {\n if (!this.config.token) {\n const error: ConnectedSolutionsClientRawError = {\n type: 'sdk_error',\n message:\n 'You must first obtain and set a token before using an SDK method'\n };\n\n throw ConnectedSolutionsClientError.generateError(error);\n }\n }\n\n #isJsonResponse(response: Response) {\n return (\n response?.headers.get('content-type')?.includes('application/json') ||\n response?.headers\n .get('content-type')\n ?.includes('application/octet-stream')\n );\n }\n\n public setConfig(partialConfig: Partial<ConnectedSolutionsSDKConfig>) {\n if ('environment' in partialConfig) {\n this.config.environment = partialConfig.environment;\n }\n\n if ('token' in partialConfig) {\n this.config.token = partialConfig.token;\n }\n }\n\n public async fetchWithAuth<DataType>(\n input: RequestInfo,\n init?: RequestInit\n ): Promise<ApiClientResponse<DataType>> {\n try {\n this.#validateConfig();\n const headers =\n typeof Headers !== 'undefined' && new Headers(init?.headers);\n\n // biome-ignore lint/complexity/useLiteralKeys: works\n if (headers && !headers['Authorization']) {\n headers.set('Authorization', `Bearer ${this.config.token}`);\n }\n\n const options = {\n ...init,\n headers: headers ? headers : init?.headers || {}\n };\n\n const response = await this.fetchRequest<DataType>(input, options);\n\n return response;\n } catch (error) {\n const e = error as ConnectedSolutionsClientErrors;\n return {\n data: undefined,\n error: e,\n meta: {\n status: e.status ?? 500,\n statusText: e.message ?? ''\n }\n };\n }\n }\n\n public async fetchRequest<DataType>(\n input: RequestInfo,\n init?: RequestInit\n ): Promise<ApiClientResponse<DataType>> {\n try {\n this.#validateConfig();\n\n const response = await fetch(input, init);\n\n if (!response?.ok) {\n let err: ConnectedSolutionsClientRawError;\n\n const apiError: ConnectedSolutionsClientRawError = {\n type: 'api_error',\n status: response?.status,\n message: response?.statusText\n };\n\n if (\n response?.headers.get('content-type')?.includes('application/json')\n ) {\n const errorResponseClone = response.clone();\n const errorJson = (await errorResponseClone.json()) as {\n error: ConnectedSolutionsAPIErrorData;\n };\n apiError.data = errorJson.error;\n }\n\n if (response?.status === 401) {\n err = {\n ...apiError,\n type: 'auth_error'\n };\n } else {\n err = {\n ...apiError,\n type: 'api_error'\n };\n }\n\n throw ConnectedSolutionsClientError.generateError(err);\n }\n\n if (!this.#isJsonResponse(response)) {\n return {\n data: undefined,\n error: undefined,\n meta: {\n status: response.status,\n statusText: response.statusText\n }\n } as ApiClientResponse<DataType>;\n }\n\n const responseClone = response.clone();\n const json = await responseClone.json();\n\n return {\n data: json,\n error: undefined,\n meta: {\n status: response.status,\n statusText: response.statusText\n }\n };\n } catch (error) {\n const e = error as ConnectedSolutionsClientErrors;\n return {\n data: undefined,\n error: e,\n meta: {\n status: e.status ?? 500,\n statusText: e.message\n }\n };\n }\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { CreditScore } from 'resources/CreditScores/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class CreditScoresService extends ApiClient {\n static #basePath = '/v1/credit/scores';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getCreditScores(\n options?: {\n product_config_id?: string;\n include_factors?: boolean;\n include_ingredients?: boolean;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScore[]>> {\n const searchOptions: {\n product_config_id?: string;\n include_factors?: string;\n include_ingredients?: string;\n } = {\n ...(options?.product_config_id\n ? { product_config_id: options.product_config_id }\n : {}),\n ...(options?.include_factors\n ? { include_factors: options.include_factors.toString() }\n : {}),\n ...(options?.include_ingredients\n ? { include_ingredients: options.include_ingredients.toString() }\n : {})\n };\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScoresService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async orderCreditScore(\n requestOptions: {\n product_config_id: string;\n include_factors?: boolean;\n include_ingredients?: boolean;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScore>> {\n const searchOptions: {\n include_factors?: string;\n include_ingredients?: string;\n } = {\n ...(requestOptions?.include_factors\n ? { include_factors: requestOptions.include_factors.toString() }\n : {}),\n ...(requestOptions?.include_ingredients\n ? { include_ingredients: requestOptions.include_ingredients.toString() }\n : {})\n };\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScoresService.#basePath}?${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n product_config_id: requestOptions.product_config_id\n }),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient/ApiClient';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\nimport type {\n Entitlement,\n Entitlements,\n ProductEligibility,\n EntitleCustomerResponse\n} from 'resources/Entitlements/types';\n\nexport class EntitlementsService extends ApiClient {\n static #basePath = '/v1/entitlements';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getEntitlements(\n requestOptions: { customer_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlements>> {\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}?customer_id=${requestOptions.customer_id}`,\n fetchOptions\n );\n }\n\n async getEntitlementById(\n { entitlement_id }: { entitlement_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}`,\n fetchOptions\n );\n }\n\n async createEntitlement(\n requestOptions: {\n name: string;\n description: string;\n product_config_ids: string[];\n customer_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}`,\n {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestOptions),\n ...(fetchOptions ?? {})\n }\n );\n }\n\n async updateEntitlement(\n requestOptions: {\n entitlement_id: string;\n product_config_ids: string[];\n customer_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n const { entitlement_id, ...body } = requestOptions;\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}`,\n {\n method: 'PUT',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(body),\n ...(fetchOptions ?? {})\n }\n );\n }\n\n async deleteEntitlement(\n { entitlement_id }: { entitlement_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse> {\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}`,\n {\n method: 'DELETE',\n ...(fetchOptions ?? {})\n }\n );\n }\n\n async activateEntitlement(\n { entitlement_id }: { entitlement_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}/activate`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n ...(fetchOptions ?? {})\n });\n }\n\n async entitleCustomerToNewProduct(\n requestOptions: {\n product_config_id: string;\n entitlement_id: string;\n customer_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<EntitleCustomerResponse>> {\n const { product_config_id, entitlement_id, customer_id } = requestOptions;\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}/products/${product_config_id}/activate`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n ...(fetchOptions ?? {}),\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'X-Customer-ID': customer_id\n }\n });\n }\n\n async activateProduct(\n requestOptions: {\n product_config_id: string;\n entitlement_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n const { product_config_id, entitlement_id } = requestOptions;\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}/products/${product_config_id}/activate`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n ...(fetchOptions ?? {})\n });\n }\n\n async getProductEligibility(\n requestOptions: { product_config_id: string; customer_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ProductEligibility>> {\n const search = new URLSearchParams(requestOptions).toString();\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/eligibility?${search}`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { CreditAttributes } from 'resources/CreditAttributes/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class CreditAttributesService extends ApiClient {\n /**\n * Update the path below to the endpoint of the service you are adding\n */\n static #basePath = '/v1/credit/attributes';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getCreditAttributes(\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditAttributes[]>> {\n const endpoint = `${this.baseUrl}${CreditAttributesService.#basePath}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type {\n CreditScoreSimulator,\n CreditScoreSimulatorPostRequest,\n CreditScoreSimulatorPostResponse,\n SimulationCategoryType\n} from 'resources/CreditScoreSimulator/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class CreditScoreSimulatorService extends ApiClient {\n static #basePath = '/v1/credit/tools/simulator';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getSimulations(\n requestOptions: {\n product_config_id: string;\n run_all?: boolean;\n cateogory?: SimulationCategoryType;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScoreSimulator>> {\n const searchOptions = {\n ...requestOptions,\n ...(requestOptions?.run_all\n ? { run_all: requestOptions.run_all.toString() }\n : {})\n } as Record<string, string>;\n\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScoreSimulatorService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async simulateScenario(\n requestOptions: CreditScoreSimulatorPostRequest & {\n product_config_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScoreSimulatorPostResponse>> {\n const { product_config_id, ...requestBody } = requestOptions;\n const query = new URLSearchParams({ product_config_id }).toString();\n const queryString = query ? `?${query}` : '';\n return this.fetchWithAuth(\n `${this.baseUrl}${CreditScoreSimulatorService.#basePath}${queryString}`,\n {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestBody),\n ...(fetchOptions ?? {})\n }\n );\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type {\n CreditScorePlan,\n ScorePlanCreateResponse,\n ScorePlanRevision,\n ScorePlanRevisionsRequest\n} from 'resources/CreditScorePlanner/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class CreditScorePlannerService extends ApiClient {\n static #basePath = '/v1/credit/tools/planners';\n static #revisionPath = '/revisions';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getCreditScorePlan(\n requestOptions: { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScorePlan>> {\n const query = new URLSearchParams(requestOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScorePlannerService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n ...(fetchOptions ?? {})\n });\n }\n\n async createCreditScorePlan(\n requestOptions: ScorePlanRevision & { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ScorePlanCreateResponse>> {\n const { product_config_id, ...requestBody } = requestOptions;\n const query = new URLSearchParams({ product_config_id }).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScorePlannerService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestBody),\n ...(fetchOptions ?? {})\n });\n }\n\n async deleteCreditScorePlan(\n requestOptions: { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<void>> {\n const query = new URLSearchParams(requestOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScorePlannerService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'DELETE',\n ...(fetchOptions ?? {})\n });\n }\n\n async getCreditScorePlanRevisions(\n requestOptions: ScorePlanRevisionsRequest & { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ScorePlanRevision[]>> {\n const { product_config_id, ...requestBody } = requestOptions;\n const query = new URLSearchParams({ product_config_id }).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScorePlannerService.#basePath}${CreditScorePlannerService.#revisionPath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n body: JSON.stringify(requestBody),\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { Alert, Alerts, TotalAlertCounts } from 'resources/Alerts/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class AlertsService extends ApiClient {\n static #basePath = '/v1/events-alerts';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getAlerts(\n requestOptions?: {\n page_limit: number;\n next_page_token: string | null;\n disposition_status?: 'READ' | 'UNREAD';\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Alerts>> {\n const options = {\n page_limit: '10',\n next_page_token: '',\n ...(requestOptions ?? {})\n } as Record<string, string>;\n\n const query = new URLSearchParams(options).toString();\n\n const endpoint = `${this.baseUrl}${AlertsService.#basePath}?${query}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async getAlertById(\n { id }: { id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Alert>> {\n const endpoint = `${this.baseUrl}${AlertsService.#basePath}/${id}`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async markAlertAsRead(\n { id }: { id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Alert>> {\n const endpoint = `${this.baseUrl}${AlertsService.#basePath}/${id}/dispose`;\n return this.fetchWithAuth(endpoint, {\n method: 'PATCH',\n ...(fetchOptions ?? {})\n });\n }\n\n async getAlertCounts(\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<TotalAlertCounts>> {\n const endpoint = `${this.baseUrl}${AlertsService.#basePath}/counts`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\nimport type {\n CreditReportMeta,\n CreditReport\n} from 'resources/CreditReports/types';\n\nexport class CreditReportsService extends ApiClient {\n static #basePath = '/v1/credit/reports';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getReports(\n requestOptions?: {\n product_config_id?: string;\n include_fields?: string;\n report_date?: string;\n report_between?: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReport[]>> {\n const query = new URLSearchParams(requestOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async getReportById(\n requestOptions: {\n id: string;\n include_fields?: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReport>> {\n const { id, ...searchOptions } = requestOptions;\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}/${requestOptions.id}${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async getReportsMeta(\n requestOptions?: {\n product_config_id?: string;\n report_date?: string;\n report_between?: string;\n latest_only?: boolean;\n report_read?: boolean;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReportMeta[]>> {\n const { latest_only, report_read, ...options } = requestOptions ?? {};\n\n const searchOptions: {\n product_config_id?: string;\n report_date?: string;\n report_between?: string;\n latest_only?: string;\n report_read?: string;\n } = {\n ...(options ?? {}),\n ...(latest_only ? { latest_only: latest_only.toString() } : {}),\n ...(report_read ? { report_read: report_read.toString() } : {})\n };\n\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}/meta${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async getReportMetaById(\n requestOptions: {\n id: string;\n product_config_id?: string;\n include_fields?: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReportMeta>> {\n const { id, ...searchOptions } = requestOptions;\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}/${id}/meta${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async markReportAsRead(\n requestOptions: {\n id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse> {\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}/${requestOptions.id}/read`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'PUT',\n ...(fetchOptions ?? {})\n });\n }\n\n async orderReport(\n requestOptions: {\n product_config_id: string;\n include_fields?: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReport>> {\n const searchOptions = {\n ...(requestOptions.include_fields\n ? { include_fields: requestOptions.include_fields.toString() }\n : {})\n };\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n product_config_id: requestOptions.product_config_id\n }),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\nimport type {\n CreateCustomerOptions,\n Customer,\n CustomerSearchOptions,\n CustomerSearchResults\n} from 'resources/Customers/types';\n\nexport class CustomersService extends ApiClient {\n static #basePath = '/v1/customers';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getCustomerById(\n requestOptions: { customer_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Customer>> {\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}/${requestOptions.customer_id}`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async updateCustomer(\n requestOptions: Pick<Customer, 'customer_id'> &\n Partial<Omit<Customer, 'customer_id'>>,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Customer>> {\n const { customer_id, ...updates } = requestOptions;\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}/${customer_id}`;\n return this.fetchWithAuth(endpoint, {\n method: 'PATCH',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(updates ?? {}),\n ...(fetchOptions ?? {})\n });\n }\n\n async deleteCustomer(\n requestOptions: { customer_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse> {\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}/${requestOptions.customer_id}`;\n return this.fetchWithAuth(endpoint, {\n method: 'DELETE',\n ...(fetchOptions ?? {})\n });\n }\n\n async createCustomer(\n requestOptions: CreateCustomerOptions,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Customer>> {\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestOptions ?? {}),\n ...(fetchOptions ?? {})\n });\n }\n\n async searchCustomers(\n requestOptions: CustomerSearchOptions,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CustomerSearchResults>> {\n const { next_cursor = '', ...searchOptions } = requestOptions;\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}/search`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ next_cursor, ...(searchOptions ?? {}) }),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient } from 'lib/ApiClient';\nimport type {\n ApiClientResponse,\n ConnectedSolutionsSDKConfig\n} from 'lib/SDKClient/types';\nimport type {\n AuthAnswersRequest,\n AuthQuestions\n} from 'resources/CustomerAuth/types';\n\nexport class CustomerAuthService extends ApiClient {\n static #basePath = '/v1/authentication';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getAuthQuestions(\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<AuthQuestions>> {\n const endpoint = `${this.baseUrl}${CustomerAuthService.#basePath}/questions`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async submitAuthAnswers(\n answers: AuthAnswersRequest,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse> {\n const endpoint = `${this.baseUrl}${CustomerAuthService.#basePath}/questions`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(answers),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nimport type {\n CreateRegistrationsRequest,\n CreateRegistrationsResponse\n} from 'resources/Registrations/types';\n\nexport class RegistrationsService extends ApiClient {\n static #basePath = '/v1/registrations';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async createRegistration(\n requestOptions: CreateRegistrationsRequest,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreateRegistrationsResponse>> {\n const endpoint = `${this.baseUrl}${RegistrationsService.#basePath}`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestOptions ?? {}),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type {\n ProductConfig,\n ProductConfigs\n} from 'resources/ProductConfigs/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class ProductConfigsService extends ApiClient {\n static #basePath = '/v1/product-configs';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getProductConfigs(\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ProductConfigs>> {\n const endpoint = `${this.baseUrl}${ProductConfigsService.#basePath}`;\n\n return this.fetchWithAuth(endpoint, {\n ...(fetchOptions ? fetchOptions : {})\n });\n }\n\n async getProductConfigById(\n requestOptions: { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ProductConfig>> {\n const endpoint = `${this.baseUrl}${ProductConfigsService.#basePath}/${requestOptions.product_config_id}`;\n\n return this.fetchWithAuth(endpoint, {\n ...(fetchOptions ?? {})\n });\n }\n}\n","export function pascalToCamelCase(name: string): string {\n const result = `${name[0].toLowerCase()}${name.substring(1)}`.replace(\n 'Service',\n ''\n );\n\n return result;\n}\n\nexport const isNode =\n typeof process !== 'undefined' &&\n process.versions &&\n process.versions.node &&\n typeof window === 'undefined';\n","import {\n ConnectedSolutionsClientError,\n type ConnectedSolutionsClientRawError,\n type ConnectedSolutionsAPIErrorData\n} from 'lib/Error';\nimport { ENVIRONMENT_URLS } from 'src/globals';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient';\nimport { isNode } from 'utils';\n\nexport type BearerToken = {\n access_token: string;\n token_type: string;\n expires_in: number;\n expires: string;\n};\n\nexport type AuthCredentials = {\n grantType: 'client_credentials' | 'trusted_partner';\n clientId: string;\n clientSecret: string;\n customerId?: string;\n};\n\nexport type AuthServiceConfig = Omit<ConnectedSolutionsSDKConfig, 'token'>;\n\nexport class AuthService {\n config: AuthServiceConfig;\n #cache: Map<string, Promise<Response>>;\n #ttl: number | null = null;\n baseUrl = '';\n\n static #basePath = '/v1/oauth2/token';\n\n constructor(config: AuthServiceConfig) {\n this.config = config;\n this.baseUrl = ENVIRONMENT_URLS[config.environment ?? 'PRODUCTION'];\n this.#cache = new Map();\n }\n\n public async getAccessToken(credentials: AuthCredentials) {\n const isBrowser = !isNode;\n\n if (isBrowser) {\n throw ConnectedSolutionsClientError.generateError({\n type: 'sdk_error',\n message: 'getAccessToken is not supported in browser'\n });\n }\n\n try {\n const response = await this.#fetchToken(credentials);\n\n return {\n data: response,\n errors: undefined,\n meta: {\n status: 200,\n statusText: 'OK'\n }\n };\n } catch (e) {\n // don't cache errors\n this.clearCache();\n return {\n data: undefined,\n error: e,\n meta: {\n status: e.status,\n statusText: e.message\n }\n };\n }\n }\n\n public getCacheLength() {\n return this.#cache.size;\n }\n\n public clearCache(): void {\n const endpoint = `${this.baseUrl}${AuthService.#basePath}`;\n\n const cacheKeys = Array.from(this.#cache.keys()).filter((key) =>\n key.includes(endpoint)\n );\n\n for (const key of cacheKeys) {\n this.#cache.delete(key);\n }\n }\n\n async #fetchToken({\n grantType,\n clientId,\n clientSecret,\n customerId\n }: AuthCredentials) {\n this.#checkTokenExpiry();\n\n const endpoint = `${this.baseUrl}${AuthService.#basePath}`;\n\n const options = {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n credentials: 'include' as RequestCredentials,\n body: JSON.stringify({\n grant_type: grantType,\n client_id: clientId,\n client_secret: clientSecret,\n partner_customer_id: customerId ?? ''\n })\n };\n\n const tokenRequest = await this.#executeRequest(endpoint, options);\n\n if (tokenRequest?.ok) {\n const tokenRequestClone = tokenRequest.clone();\n const accessToken = (await tokenRequestClone.json()) as BearerToken;\n\n if (this.#ttl === null) {\n this.#setTTL(accessToken.expires_in);\n }\n\n return accessToken;\n }\n\n // response was not ok\n let err: ConnectedSolutionsClientRawError;\n\n const errorMeta = {\n status: tokenRequest?.status,\n message: tokenRequest?.statusText || '',\n data: undefined\n };\n\n if (tokenRequest?.status === 401) {\n err = {\n type: 'auth_error',\n ...errorMeta\n };\n } else {\n err = {\n type: 'api_error',\n ...errorMeta\n };\n }\n\n if (\n tokenRequest?.headers.get('content-type')?.includes('application/json')\n ) {\n const errorResponseClone = tokenRequest.clone();\n const errorJson = (await errorResponseClone.json()) as {\n error: ConnectedSolutionsAPIErrorData;\n };\n err.data = errorJson.error;\n }\n\n throw ConnectedSolutionsClientError.generateError(err);\n }\n\n #setTTL(value: number | null) {\n const now = new Date().getTime();\n const oneHourInMilliseconds = 60 * 60 * 1000;\n const nextTimestamp = now + oneHourInMilliseconds;\n const nextState =\n value === null ? value : new Date(nextTimestamp).valueOf();\n\n this.#ttl = nextState;\n }\n\n #checkTokenExpiry() {\n const now = new Date(Date.now());\n const expires = new Date(this.#ttl ?? Number.NaN);\n const isTokenExpired = isAfter(now, expires);\n\n if (isTokenExpired) {\n this.#setTTL(null);\n this.#cache.clear();\n }\n }\n\n async #executeRequest(\n input: RequestInfo,\n init?: RequestInit\n ): Promise<Response | undefined> {\n const cacheKey = `${input}${JSON.stringify(init || {})}`;\n\n if (!this.#cache.has(cacheKey)) {\n const promise = fetch(input, init ?? {});\n this.#cache.set(cacheKey, promise);\n }\n\n return await this.#cache.get(cacheKey);\n }\n}\n\nfunction isAfter(date1: Date, date2: Date) {\n return date1 > date2;\n}\n","import * as resources from 'resources';\nimport { pascalToCamelCase } from 'utils';\nimport type { CreditScoresService } from 'resources/CreditScores';\nimport type { EntitlementsService } from 'resources/Entitlements';\nimport type {\n ConnectedSolutionsSDK,\n ConnectedSolutionsSDKConfig\n} from 'lib/SDKClient/types';\nimport type { CreditScoreSimulatorService } from 'resources/CreditScoreSimulator/CreditScoreSimulator';\nimport type { CreditScorePlannerService } from 'resources/CreditScorePlanner';\nimport type { CreditAttributesService } from 'resources/CreditAttributes/CreditAttributes';\nimport { AuthService } from 'lib/AuthClient/AuthClient';\nimport { ApiClient } from 'lib/ApiClient';\nimport type { AlertsService } from 'resources/Alerts';\nimport type { CreditReportsService } from 'resources/CreditReports';\nimport type { CustomersService } from 'resources/Customers';\nimport type { CustomerAuthService } from 'resources/CustomerAuth';\nimport type { RegistrationsService } from 'resources/Registrations';\nimport type { ProductConfigsService } from 'resources/ProductConfigs';\n// new service imports go here\n\nexport class SDKClient extends ApiClient implements ConnectedSolutionsSDK {\n static #instance: SDKClient | null = null;\n alerts: AlertsService;\n auth: AuthService;\n creditReports: CreditReportsService;\n creditScores: CreditScoresService;\n creditAttributes: CreditAttributesService;\n creditScorePlanner: CreditScorePlannerService;\n creditScoreSimulator: CreditScoreSimulatorService;\n customerAuth: CustomerAuthService;\n customers: CustomersService;\n entitlements: EntitlementsService;\n productConfigs: ProductConfigsService;\n registrations: RegistrationsService;\n // new services go here\n\n // The method is static as we need to access the method only through the class here\n static getInstance(config: ConnectedSolutionsSDKConfig): SDKClient {\n // if instance is already created return that otherwise create it\n if (SDKClient.#instance) {\n return SDKClient.#instance;\n }\n\n SDKClient.#instance = new SDKClient(config);\n return SDKClient.#instance;\n }\n\n static clearInstance() {\n SDKClient.#instance = null;\n }\n\n // constructor is private so that no other class can access it.\n private constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n for (const name in resources) {\n if (typeof resources[name] === 'function') {\n this[pascalToCamelCase(name)] = new resources[name](config);\n }\n }\n\n this.auth = new AuthService({\n environment: config.environment\n });\n }\n}\n\nexport function createSDK(userConfig: ConnectedSolutionsSDKConfig) {\n return SDKClient.getInstance(userConfig);\n}\n","import type {\n CreditScorePlan,\n FicoCreditScorePlanCompleted,\n VantageCreditScorePlanCompleted,\n FicoCreditScorePlanSet,\n VantageCreditScorePlanSet,\n VantageCreditScorePlan,\n FicoCreditScorePlan,\n ScorePlanRevisionsRequest,\n FicoScorePlanRevisionsRequest,\n VantageScorePlanRevisionsRequest,\n ScorePlanRevision,\n FicoScorePlanRevision,\n VantageScorePlanRevision\n} from 'resources/CreditScorePlanner/types';\n\nexport function isPlanCompleted(\n plan: CreditScorePlan\n): plan is FicoCreditScorePlanCompleted | VantageCreditScorePlanCompleted {\n return (\n plan.progress_status === 'TARGET_NOT_MET' ||\n plan.progress_status === 'COMPLETED'\n );\n}\n\nexport function isPlanSet(\n plan: CreditScorePlan\n): plan is\n | FicoCreditScorePlanCompleted\n | FicoCreditScorePlanSet\n | VantageCreditScorePlanCompleted\n | VantageCreditScorePlanSet {\n return (\n isPlanCompleted(plan) ||\n plan.progress_status === 'TARGET_SCORE_AND_PLAN_SET' ||\n plan.progress_status === 'ON_TRACK' ||\n plan.progress_status === 'OFF_TRACK'\n );\n}\n\nexport function isVantagePlan(\n plan: CreditScorePlan\n): plan is VantageCreditScorePlan {\n return plan.score_model.includes('VANTAGE');\n}\n\nexport function isFicoPlan(plan: CreditScorePlan): plan is FicoCreditScorePlan {\n return plan.score_model.includes('FICO');\n}\n\nexport function isFicoRevisionsRequest(\n request: ScorePlanRevisionsRequest\n): request is FicoScorePlanRevisionsRequest {\n return (request as FicoScorePlanRevisionsRequest).target_score !== undefined;\n}\n\nexport function isVantageRevisionsRequest(\n request: ScorePlanRevisionsRequest\n): request is VantageScorePlanRevisionsRequest {\n return (\n (request as VantageScorePlanRevisionsRequest).max_actions_per_plan !==\n undefined\n );\n}\n\nexport function isFicoRevision(\n revision: ScorePlanRevision\n): revision is FicoScorePlanRevision {\n return revision.score_model.includes('FICO');\n}\n\nexport function isVantageRevision(\n revision: ScorePlanRevision\n): revision is VantageScorePlanRevision {\n return revision.score_model.includes('VANTAGE');\n}\n","import type {\n CreditScoreSimulator,\n FicoScenario,\n FicoScenarioVariation,\n FicoScoreSimulator,\n Scenario,\n ScenarioVariation,\n VantageScenario,\n VantageScenarioVariation\n} from 'resources/CreditScoreSimulator/types';\n\nexport function isFicoSimulator(\n data?: CreditScoreSimulator\n): data is FicoScoreSimulator {\n return Boolean(data && 'best_action' in data);\n}\n\nexport function isVantageScenario(\n scenario?: Scenario\n): scenario is VantageScenario {\n return Boolean(scenario && 'simulated_score' in scenario);\n}\n\nexport function isFicoScenario(scenario: Scenario): scenario is FicoScenario {\n return !('simulated_score' in scenario);\n}\n\nexport function isFicoScenarioVariation(\n variation?: ScenarioVariation\n): variation is FicoScenarioVariation {\n return Boolean(\n variation &&\n 'slider_min_value' in variation &&\n 'slider_max_value' in variation\n );\n}\n\nexport function isVantageScenarioVariation(\n variation?: ScenarioVariation\n): variation is VantageScenarioVariation {\n return Boolean(\n variation && 'value' in variation && 'simulated_score' in variation\n );\n}\n"],"names":["generateError","rawError","ConnectedSolutionsClientApiError","ConnectedSolutionsClientAuthError","ConnectedSolutionsClientSDKError","ConnectedSolutionsClientUnknownError","ConnectedSolutionsClientError","raw","_a","__publicField","args","ENVIRONMENT_URLS","CONTENTSTACK_URLS","_ApiClient_instances","validateConfig_fn","isJsonResponse_fn","ApiClient","config","__privateAdd","environment","partialConfig","input","init","__privateMethod","headers","options","error","e","response","err","apiError","errorJson","_b","_basePath","_CreditScoresService","fetchOptions","searchOptions","query","queryString","endpoint","__privateGet","requestOptions","CreditScoresService","_EntitlementsService","entitlement_id","body","product_config_id","customer_id","search","EntitlementsService","_CreditAttributesService","CreditAttributesService","_CreditScoreSimulatorService","requestBody","CreditScoreSimulatorService","_revisionPath","_CreditScorePlannerService","CreditScorePlannerService","_AlertsService","id","AlertsService","_CreditReportsService","latest_only","report_read","CreditReportsService","_CustomersService","updates","next_cursor","CustomersService","_CustomerAuthService","answers","CustomerAuthService","_RegistrationsService","RegistrationsService","_ProductConfigsService","ProductConfigsService","pascalToCamelCase","name","isNode","_cache","_ttl","_AuthService_instances","fetchToken_fn","setTTL_fn","checkTokenExpiry_fn","executeRequest_fn","_AuthService","__privateSet","credentials","cacheKeys","key","grantType","clientId","clientSecret","customerId","tokenRequest","accessToken","errorMeta","value","now","oneHourInMilliseconds","nextTimestamp","nextState","expires","isAfter","cacheKey","promise","AuthService","date1","date2","_instance","_SDKClient","resources","SDKClient","createSDK","userConfig","isPlanCompleted","plan","isPlanSet","isVantagePlan","isFicoPlan","isFicoRevisionsRequest","request","isVantageRevisionsRequest","isFicoRevision","revision","isVantageRevision","isFicoSimulator","data","isVantageScenario","scenario","isFicoScenario","isFicoScenarioVariation","variation","isVantageScenarioVariation"],"mappings":";;;;;;;AAmBA,SAASA,GAAcC,GAA4C;AACjE,UAAQA,EAAS,MAAM;AAAA,IACrB,KAAK;AACI,aAAA,IAAIC,GAAiCD,CAAQ;AAAA,IACtD,KAAK;AACI,aAAA,IAAIE,GAAkCF,CAAQ;AAAA,IACvD,KAAK;AACI,aAAA,IAAIG,GAAiCH,CAAQ;AAAA,IACtD;AACS,aAAA,IAAII,GAAqCJ,CAAQ;AAAA,EAAA;AAE9D;AAEO,MAAMK,UAAsC,MAAM;AAAA,EAKvD,YAAYC,GAAuC;AAlBrD,QAAAC;AAmBI,UAAMD,EAAI,OAAO;AALV,IAAAE,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAIP,SAAK,YAAUD,IAAAD,EAAI,SAAJ,gBAAAC,EAAU,YAAWD,EAAI,WAAW,IACnD,KAAK,OAAOA,EAAI,MAChB,KAAK,SAASA,EAAI;AAAA,EAAA;AAItB;AADEE,EAZWH,GAYJ,iBAAgBN;AAGlB,MAAME,WAAyCI,EAA8B;AAAA,EAClF,YAAYI,GAAwC;AAClD,UAAMA,CAAI,GACV,KAAK,OAAO;AAAA,EAAA;AAEhB;AAEO,MAAMP,WAA0CG,EAA8B;AAAA,EACnF,YAAYI,GAAwC;AAClD,UAAMA,CAAI,GACV,KAAK,OAAO;AAAA,EAAA;AAEhB;AAEO,MAAML,WAA6CC,EAA8B;AAAA,EACtF,YAAYI,GAAwC;AACl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AChD;AChEO,SAASE,GACdC,GAC4B;AACrB,SAAA,GAAQA,KAAQ,iBAAiBA;AAC1C;AAEO,SAASC,GACdC,GAC6B;AACtB,SAAA,GAAQA,KAAY,qBAAqBA;AAClD;AAEO,SAASC,GAAeD,GAA8C;AAC3E,SAAO,EAAE,qBAAqBA;AAChC;AAEO,SAASE,GACdC,GACoC;AAC7B,SAAA,GACLA,KACE,sBAAsBA,KACtB,sBAAsBA;AAE5B;AAEO,SAASC,GACdD,GACuC;AAChC,SAAA,GACLA,KAAa,WAAWA,KAAa,qBAAqBA;AAE9D;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/lib/Error.ts","../../src/globals.ts","../../src/lib/ApiClient/ApiClient.ts","../../src/resources/CreditScores/CreditScores.ts","../../src/resources/Entitlements/Entitlements.ts","../../src/resources/CreditAttributes/CreditAttributes.ts","../../src/resources/CreditScoreSimulator/CreditScoreSimulator.ts","../../src/resources/CreditScorePlanner/CreditScorePlanner.ts","../../src/resources/Alerts/Alerts.ts","../../src/resources/CreditReports/CreditReports.ts","../../src/resources/Customers/Customers.ts","../../src/resources/CustomerAuth/CustomerAuth.ts","../../src/resources/Registrations/Registrations.ts","../../src/resources/ProductConfigs/ProductConfigs.ts","../../src/utils.ts","../../src/lib/AuthClient/AuthClient.ts","../../src/lib/SDKClient/SDKClient.ts","../../src/resources/CreditScorePlanner/typeGuards.ts","../../src/resources/CreditScoreSimulator/typeGuards.ts"],"sourcesContent":["export type ConnectedSolutionsAPIErrorData = {\n dev_url: string;\n code: string;\n message: string;\n};\n\nexport type ConnectedSolutionsSDKErrorTypes =\n | 'api_error'\n | 'auth_error'\n | 'sdk_error'\n | 'unknown_error';\n\nexport type ConnectedSolutionsClientRawError = {\n message: string;\n type: ConnectedSolutionsSDKErrorTypes;\n status?: number;\n data?: ConnectedSolutionsAPIErrorData;\n};\n\nfunction generateError(rawError: ConnectedSolutionsClientRawError) {\n switch (rawError.type) {\n case 'api_error':\n return new ConnectedSolutionsClientApiError(rawError);\n case 'auth_error':\n return new ConnectedSolutionsClientAuthError(rawError);\n case 'sdk_error':\n return new ConnectedSolutionsClientSDKError(rawError);\n default:\n return new ConnectedSolutionsClientUnknownError(rawError);\n }\n}\n\nexport class ConnectedSolutionsClientError extends Error {\n readonly message: string;\n readonly data?: ConnectedSolutionsAPIErrorData;\n readonly status?: number;\n\n constructor(raw: ConnectedSolutionsClientRawError) {\n super(raw.message);\n this.message = raw.data?.message || raw.message || '';\n this.data = raw.data;\n this.status = raw.status;\n }\n\n static generateError = generateError;\n}\n\nexport class ConnectedSolutionsClientApiError extends ConnectedSolutionsClientError {\n constructor(args: ConnectedSolutionsClientRawError) {\n super(args);\n this.name = 'ConnectedSolutionsClientApiError';\n }\n}\n\nexport class ConnectedSolutionsClientAuthError extends ConnectedSolutionsClientError {\n constructor(args: ConnectedSolutionsClientRawError) {\n super(args);\n this.name = 'ConnectedSolutionsClientAuthError';\n }\n}\n\nexport class ConnectedSolutionsClientUnknownError extends ConnectedSolutionsClientError {\n constructor(args: ConnectedSolutionsClientRawError) {\n super(args);\n this.name = 'ConnectedSolutionsClientUnknownError';\n }\n}\n\nexport class ConnectedSolutionsClientSDKError extends ConnectedSolutionsClientError {\n constructor(args: ConnectedSolutionsClientRawError) {\n super(args);\n this.name = 'ConnectedSolutionsClientSDKError';\n }\n}\n","export const ENVIRONMENT_URLS = {\n PRODUCTION: 'https://connected-api.experian.com',\n SANDBOX: 'https://sandbox.connected-api.experian.com',\n UAT: 'https://uat-api.ecs.experian.com',\n INTEGRATION: 'https://integration-api.ecs.experian.com',\n DEVELOPMENT: 'https://dev-api.ecs.experian.com'\n};\n\nexport const CONTENTSTACK_URLS = {\n PRODUCTION:\n 'https://unity-contentstack.integration.us-exp-api.experiancs.com',\n SANDBOX: 'https://unity-contentstack.dev.us-exp-api.experiancs.com',\n UAT: 'https://unity-contentstack.dev.us-exp-api.experiancs.com',\n INTEGRATION: 'https://unity-contentstack.dev.us-exp-api.experiancs.com',\n DEVELOPMENT: 'https://unity-contentstack.dev.us-exp-api.experiancs.com'\n};\n","import {\n type ConnectedSolutionsClientApiError,\n type ConnectedSolutionsClientAuthError,\n ConnectedSolutionsClientError,\n type ConnectedSolutionsClientRawError,\n type ConnectedSolutionsClientSDKError,\n type ConnectedSolutionsClientUnknownError,\n type ConnectedSolutionsAPIErrorData\n} from 'lib/Error';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\nimport { CONTENTSTACK_URLS, ENVIRONMENT_URLS } from 'globals';\n\nexport type ConnectedSolutionsClientMeta = {\n status: number;\n statusText: string;\n};\n\nexport type ConnectedSolutionsClientErrors =\n | ConnectedSolutionsClientApiError\n | ConnectedSolutionsClientAuthError\n | ConnectedSolutionsClientUnknownError\n | ConnectedSolutionsClientSDKError;\n\nexport type ApiClientResponse<DataType = Record<string, unknown>> =\n | {\n data: DataType;\n error: undefined;\n meta: ConnectedSolutionsClientMeta;\n }\n | {\n data: undefined;\n error: ConnectedSolutionsClientErrors;\n meta: ConnectedSolutionsClientMeta;\n };\n\nexport class ApiClient {\n config: ConnectedSolutionsSDKConfig;\n baseUrl = '';\n contentstackUrl = '';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n const defaultEnvironement = 'PRODUCTION';\n const environment = config.environment ?? defaultEnvironement;\n\n this.config = config;\n this.baseUrl = ENVIRONMENT_URLS[environment];\n this.contentstackUrl = CONTENTSTACK_URLS[environment];\n }\n\n #validateConfig(): void {\n if (!this.config.token) {\n const error: ConnectedSolutionsClientRawError = {\n type: 'sdk_error',\n message:\n 'You must first obtain and set a token before using an SDK method'\n };\n\n throw ConnectedSolutionsClientError.generateError(error);\n }\n }\n\n #isJsonResponse(response: Response) {\n return (\n response?.headers.get('content-type')?.includes('application/json') ||\n response?.headers\n .get('content-type')\n ?.includes('application/octet-stream')\n );\n }\n\n public setConfig(partialConfig: Partial<ConnectedSolutionsSDKConfig>) {\n if ('environment' in partialConfig) {\n this.config.environment = partialConfig.environment;\n }\n\n if ('token' in partialConfig) {\n this.config.token = partialConfig.token;\n }\n }\n\n public async fetchWithAuth<DataType>(\n input: RequestInfo,\n init?: RequestInit\n ): Promise<ApiClientResponse<DataType>> {\n try {\n this.#validateConfig();\n const headers =\n typeof Headers !== 'undefined' && new Headers(init?.headers);\n\n // biome-ignore lint/complexity/useLiteralKeys: works\n if (headers && !headers['Authorization']) {\n headers.set('Authorization', `Bearer ${this.config.token}`);\n }\n\n const options = {\n ...init,\n headers: headers ? headers : init?.headers || {}\n };\n\n const response = await this.fetchRequest<DataType>(input, options);\n\n return response;\n } catch (error) {\n const e = error as ConnectedSolutionsClientErrors;\n return {\n data: undefined,\n error: e,\n meta: {\n status: e.status ?? 500,\n statusText: e.message ?? ''\n }\n };\n }\n }\n\n public async fetchRequest<DataType>(\n input: RequestInfo,\n init?: RequestInit\n ): Promise<ApiClientResponse<DataType>> {\n try {\n this.#validateConfig();\n\n const response = await fetch(input, init);\n\n if (!response?.ok) {\n let err: ConnectedSolutionsClientRawError;\n\n const apiError: ConnectedSolutionsClientRawError = {\n type: 'api_error',\n status: response?.status,\n message: response?.statusText\n };\n\n if (\n response?.headers.get('content-type')?.includes('application/json')\n ) {\n const errorResponseClone = response.clone();\n const errorJson = (await errorResponseClone.json()) as {\n error: ConnectedSolutionsAPIErrorData;\n };\n apiError.data = errorJson.error;\n }\n\n if (response?.status === 401) {\n err = {\n ...apiError,\n type: 'auth_error'\n };\n } else {\n err = {\n ...apiError,\n type: 'api_error'\n };\n }\n\n throw ConnectedSolutionsClientError.generateError(err);\n }\n\n if (!this.#isJsonResponse(response)) {\n return {\n data: undefined,\n error: undefined,\n meta: {\n status: response.status,\n statusText: response.statusText\n }\n } as ApiClientResponse<DataType>;\n }\n\n const responseClone = response.clone();\n const json = await responseClone.json();\n\n return {\n data: json,\n error: undefined,\n meta: {\n status: response.status,\n statusText: response.statusText\n }\n };\n } catch (error) {\n const e = error as ConnectedSolutionsClientErrors;\n return {\n data: undefined,\n error: e,\n meta: {\n status: e.status ?? 500,\n statusText: e.message\n }\n };\n }\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { CreditScore } from 'resources/CreditScores/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class CreditScoresService extends ApiClient {\n static #basePath = '/v1/credit/scores';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getCreditScores(\n options?: {\n product_config_id?: string;\n include_factors?: boolean;\n include_ingredients?: boolean;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScore[]>> {\n const searchOptions: {\n product_config_id?: string;\n include_factors?: string;\n include_ingredients?: string;\n } = {\n ...(options?.product_config_id\n ? { product_config_id: options.product_config_id }\n : {}),\n ...(options?.include_factors\n ? { include_factors: options.include_factors.toString() }\n : {}),\n ...(options?.include_ingredients\n ? { include_ingredients: options.include_ingredients.toString() }\n : {})\n };\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScoresService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async orderCreditScore(\n requestOptions: {\n product_config_id: string;\n include_factors?: boolean;\n include_ingredients?: boolean;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScore>> {\n const searchOptions: {\n include_factors?: string;\n include_ingredients?: string;\n } = {\n ...(requestOptions?.include_factors\n ? { include_factors: requestOptions.include_factors.toString() }\n : {}),\n ...(requestOptions?.include_ingredients\n ? { include_ingredients: requestOptions.include_ingredients.toString() }\n : {})\n };\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScoresService.#basePath}?${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n product_config_id: requestOptions.product_config_id\n }),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient/ApiClient';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\nimport type {\n Entitlement,\n Entitlements,\n ProductEligibility,\n EntitleCustomerResponse\n} from 'resources/Entitlements/types';\n\nexport class EntitlementsService extends ApiClient {\n static #basePath = '/v1/entitlements';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getEntitlements(\n requestOptions: { customer_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlements>> {\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}?customer_id=${requestOptions.customer_id}`,\n fetchOptions\n );\n }\n\n async getEntitlementById(\n { entitlement_id }: { entitlement_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}`,\n fetchOptions\n );\n }\n\n async createEntitlement(\n requestOptions: {\n name: string;\n description: string;\n product_config_ids: string[];\n customer_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}`,\n {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestOptions),\n ...(fetchOptions ?? {})\n }\n );\n }\n\n async updateEntitlement(\n requestOptions: {\n entitlement_id: string;\n product_config_ids: string[];\n customer_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n const { entitlement_id, ...body } = requestOptions;\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}`,\n {\n method: 'PUT',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(body),\n ...(fetchOptions ?? {})\n }\n );\n }\n\n async deleteEntitlement(\n { entitlement_id }: { entitlement_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse> {\n return this.fetchWithAuth(\n `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}`,\n {\n method: 'DELETE',\n ...(fetchOptions ?? {})\n }\n );\n }\n\n async activateEntitlement(\n { entitlement_id }: { entitlement_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}/activate`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n ...(fetchOptions ?? {})\n });\n }\n\n async deactivateEntitlement(\n { entitlement_id }: { entitlement_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}/deactivate`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n ...(fetchOptions ?? {})\n });\n }\n\n async entitleCustomerToNewProduct(\n requestOptions: {\n product_config_id: string;\n entitlement_id: string;\n customer_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<EntitleCustomerResponse>> {\n const { product_config_id, entitlement_id, customer_id } = requestOptions;\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}/products/${product_config_id}/activate`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n ...(fetchOptions ?? {}),\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'X-Customer-ID': customer_id\n }\n });\n }\n\n async activateProduct(\n requestOptions: {\n product_config_id: string;\n entitlement_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n const { product_config_id, entitlement_id } = requestOptions;\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}/products/${product_config_id}/activate`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n ...(fetchOptions ?? {})\n });\n }\n\n async deactivateProduct(\n requestOptions: {\n product_config_id: string;\n entitlement_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n const { product_config_id, entitlement_id } = requestOptions;\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}/products/${product_config_id}/deactivate`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n ...(fetchOptions ?? {})\n });\n }\n\n async removeProductFromEntitlement(\n requestOptions: {\n product_config_id: string;\n entitlement_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Entitlement>> {\n const { product_config_id, entitlement_id } = requestOptions;\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/${entitlement_id}/products/${product_config_id}`;\n return this.fetchWithAuth(endpoint, {\n method: 'DELETE',\n ...(fetchOptions ?? {})\n });\n }\n\n async getProductEligibility(\n requestOptions: { product_config_id: string; customer_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ProductEligibility>> {\n const search = new URLSearchParams(requestOptions).toString();\n const endpoint = `${this.baseUrl}${EntitlementsService.#basePath}/eligibility?${search}`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { CreditAttributes } from 'resources/CreditAttributes/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class CreditAttributesService extends ApiClient {\n /**\n * Update the path below to the endpoint of the service you are adding\n */\n static #basePath = '/v1/credit/attributes';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getCreditAttributes(\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditAttributes[]>> {\n const endpoint = `${this.baseUrl}${CreditAttributesService.#basePath}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type {\n CreditScoreSimulator,\n CreditScoreSimulatorPostRequest,\n CreditScoreSimulatorPostResponse,\n SimulationCategoryType\n} from 'resources/CreditScoreSimulator/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class CreditScoreSimulatorService extends ApiClient {\n static #basePath = '/v1/credit/tools/simulator';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getSimulations(\n requestOptions: {\n product_config_id: string;\n run_all?: boolean;\n cateogory?: SimulationCategoryType;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScoreSimulator>> {\n const searchOptions = {\n ...requestOptions,\n ...(requestOptions?.run_all\n ? { run_all: requestOptions.run_all.toString() }\n : {})\n } as Record<string, string>;\n\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScoreSimulatorService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async simulateScenario(\n requestOptions: CreditScoreSimulatorPostRequest & {\n product_config_id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScoreSimulatorPostResponse>> {\n const { product_config_id, ...requestBody } = requestOptions;\n const query = new URLSearchParams({ product_config_id }).toString();\n const queryString = query ? `?${query}` : '';\n return this.fetchWithAuth(\n `${this.baseUrl}${CreditScoreSimulatorService.#basePath}${queryString}`,\n {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestBody),\n ...(fetchOptions ?? {})\n }\n );\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type {\n CreditScorePlan,\n ScorePlanCreateResponse,\n ScorePlanRevision,\n ScorePlanRevisionsRequest\n} from 'resources/CreditScorePlanner/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class CreditScorePlannerService extends ApiClient {\n static #basePath = '/v1/credit/tools/planners';\n static #revisionPath = '/revisions';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getCreditScorePlan(\n requestOptions: { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditScorePlan>> {\n const query = new URLSearchParams(requestOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScorePlannerService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n ...(fetchOptions ?? {})\n });\n }\n\n async createCreditScorePlan(\n requestOptions: ScorePlanRevision & { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ScorePlanCreateResponse>> {\n const { product_config_id, ...requestBody } = requestOptions;\n const query = new URLSearchParams({ product_config_id }).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScorePlannerService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestBody),\n ...(fetchOptions ?? {})\n });\n }\n\n async deleteCreditScorePlan(\n requestOptions: { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<void>> {\n const query = new URLSearchParams(requestOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScorePlannerService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'DELETE',\n ...(fetchOptions ?? {})\n });\n }\n\n async getCreditScorePlanRevisions(\n requestOptions: ScorePlanRevisionsRequest & { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ScorePlanRevision[]>> {\n const { product_config_id, ...requestBody } = requestOptions;\n const query = new URLSearchParams({ product_config_id }).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditScorePlannerService.#basePath}${CreditScorePlannerService.#revisionPath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n body: JSON.stringify(requestBody),\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { Alert, Alerts, TotalAlertCounts } from 'resources/Alerts/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class AlertsService extends ApiClient {\n static #basePath = '/v1/events-alerts';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getAlerts(\n requestOptions?: {\n page_limit: number;\n next_page_token: string | null;\n disposition_status?: 'READ' | 'UNREAD';\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Alerts>> {\n const options = {\n page_limit: '10',\n next_page_token: '',\n ...(requestOptions ?? {})\n } as Record<string, string>;\n\n const query = new URLSearchParams(options).toString();\n\n const endpoint = `${this.baseUrl}${AlertsService.#basePath}?${query}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async getAlertById(\n { id }: { id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Alert>> {\n const endpoint = `${this.baseUrl}${AlertsService.#basePath}/${id}`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async markAlertAsRead(\n { id }: { id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Alert>> {\n const endpoint = `${this.baseUrl}${AlertsService.#basePath}/${id}/dispose`;\n return this.fetchWithAuth(endpoint, {\n method: 'PATCH',\n ...(fetchOptions ?? {})\n });\n }\n\n async getAlertCounts(\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<TotalAlertCounts>> {\n const endpoint = `${this.baseUrl}${AlertsService.#basePath}/counts`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\nimport type {\n CreditReportMeta,\n CreditReport\n} from 'resources/CreditReports/types';\n\nexport class CreditReportsService extends ApiClient {\n static #basePath = '/v1/credit/reports';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getReports(\n requestOptions?: {\n product_config_id?: string;\n include_fields?: string;\n report_date?: string;\n report_between?: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReport[]>> {\n const query = new URLSearchParams(requestOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async getReportById(\n requestOptions: {\n id: string;\n include_fields?: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReport>> {\n const { id, ...searchOptions } = requestOptions;\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}/${requestOptions.id}${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async getReportsMeta(\n requestOptions?: {\n product_config_id?: string;\n report_date?: string;\n report_between?: string;\n latest_only?: boolean;\n report_read?: boolean;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReportMeta[]>> {\n const { latest_only, report_read, ...options } = requestOptions ?? {};\n\n const searchOptions: {\n product_config_id?: string;\n report_date?: string;\n report_between?: string;\n latest_only?: string;\n report_read?: string;\n } = {\n ...(options ?? {}),\n ...(latest_only ? { latest_only: latest_only.toString() } : {}),\n ...(report_read ? { report_read: report_read.toString() } : {})\n };\n\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}/meta${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async getReportMetaById(\n requestOptions: {\n id: string;\n product_config_id?: string;\n include_fields?: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReportMeta>> {\n const { id, ...searchOptions } = requestOptions;\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}/${id}/meta${queryString}`;\n\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async markReportAsRead(\n requestOptions: {\n id: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse> {\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}/${requestOptions.id}/read`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'PUT',\n ...(fetchOptions ?? {})\n });\n }\n\n async orderReport(\n requestOptions: {\n product_config_id: string;\n include_fields?: string;\n },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreditReport>> {\n const searchOptions = {\n ...(requestOptions.include_fields\n ? { include_fields: requestOptions.include_fields.toString() }\n : {})\n };\n const query = new URLSearchParams(searchOptions).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${CreditReportsService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n product_config_id: requestOptions.product_config_id\n }),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\nimport type {\n CreateCustomerOptions,\n Customer,\n CustomerSearchOptions,\n CustomerSearchResults\n} from 'resources/Customers/types';\n\nexport class CustomersService extends ApiClient {\n static #basePath = '/v1/customers';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getCustomerById(\n requestOptions: { customer_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Customer>> {\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}/${requestOptions.customer_id}`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async updateCustomer(\n requestOptions: Pick<Customer, 'customer_id'> &\n Partial<Omit<Customer, 'customer_id'>>,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Customer>> {\n const { customer_id, ...updates } = requestOptions;\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}/${customer_id}`;\n return this.fetchWithAuth(endpoint, {\n method: 'PATCH',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(updates ?? {}),\n ...(fetchOptions ?? {})\n });\n }\n\n async deleteCustomer(\n requestOptions: { customer_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse> {\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}/${requestOptions.customer_id}`;\n return this.fetchWithAuth(endpoint, {\n method: 'DELETE',\n ...(fetchOptions ?? {})\n });\n }\n\n async createCustomer(\n requestOptions: CreateCustomerOptions,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<Customer>> {\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestOptions ?? {}),\n ...(fetchOptions ?? {})\n });\n }\n\n async searchCustomers(\n requestOptions: CustomerSearchOptions,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CustomerSearchResults>> {\n const { next_cursor = '', ...searchOptions } = requestOptions;\n const endpoint = `${this.baseUrl}${CustomersService.#basePath}/search`;\n\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ next_cursor, ...(searchOptions ?? {}) }),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient } from 'lib/ApiClient';\nimport type {\n ApiClientResponse,\n ConnectedSolutionsSDKConfig\n} from 'lib/SDKClient/types';\nimport type {\n AuthAnswersRequest,\n AuthQuestions\n} from 'resources/CustomerAuth/types';\n\nexport class CustomerAuthService extends ApiClient {\n static #basePath = '/v1/authentication';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getAuthQuestions(\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<AuthQuestions>> {\n const endpoint = `${this.baseUrl}${CustomerAuthService.#basePath}/questions`;\n return this.fetchWithAuth(endpoint, fetchOptions);\n }\n\n async submitAuthAnswers(\n answers: AuthAnswersRequest,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse> {\n const endpoint = `${this.baseUrl}${CustomerAuthService.#basePath}/questions`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(answers),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nimport type {\n CreateRegistrationsRequest,\n CreateRegistrationsResponse\n} from 'resources/Registrations/types';\n\nexport class RegistrationsService extends ApiClient {\n static #basePath = '/v1/registrations';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async createRegistration(\n requestOptions: CreateRegistrationsRequest,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<CreateRegistrationsResponse>> {\n const endpoint = `${this.baseUrl}${RegistrationsService.#basePath}`;\n return this.fetchWithAuth(endpoint, {\n method: 'POST',\n headers: {\n ...(fetchOptions?.headers ?? {}),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(requestOptions ?? {}),\n ...(fetchOptions ?? {})\n });\n }\n}\n","import { ApiClient, type ApiClientResponse } from 'lib/ApiClient';\n\nimport type {\n ProductConfig,\n ProductConfigsSearchOptions,\n ProductConfigs\n} from 'resources/ProductConfigs/types';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient/types';\n\nexport class ProductConfigsService extends ApiClient {\n static #basePath = '/v1/product-configs';\n\n constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n }\n\n async getProductConfigs(\n searchOptions: ProductConfigsSearchOptions,\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ProductConfigs>> {\n const { fromEntries, entries } = Object;\n const { isArray } = Array;\n\n const options = fromEntries(\n entries(searchOptions)\n .filter(([_, value]) => value !== undefined && value !== null)\n .map(([key, value]) => [\n key,\n isArray(value) ? value.join(',') : value.toString()\n ])\n );\n const query = new URLSearchParams(options).toString();\n const queryString = query ? `?${query}` : '';\n const endpoint = `${this.baseUrl}${ProductConfigsService.#basePath}${queryString}`;\n\n return this.fetchWithAuth(endpoint, {\n ...(fetchOptions ? fetchOptions : {})\n });\n }\n\n async getProductConfigById(\n requestOptions: { product_config_id: string },\n fetchOptions?: RequestInit\n ): Promise<ApiClientResponse<ProductConfig>> {\n const endpoint = `${this.baseUrl}${ProductConfigsService.#basePath}/${requestOptions.product_config_id}`;\n\n return this.fetchWithAuth(endpoint, {\n ...(fetchOptions ?? {})\n });\n }\n}\n","export function pascalToCamelCase(name: string): string {\n const result = `${name[0].toLowerCase()}${name.substring(1)}`.replace(\n 'Service',\n ''\n );\n\n return result;\n}\n\nexport const isNode =\n typeof process !== 'undefined' &&\n process.versions &&\n process.versions.node &&\n typeof window === 'undefined';\n","import {\n ConnectedSolutionsClientError,\n type ConnectedSolutionsClientRawError,\n type ConnectedSolutionsAPIErrorData\n} from 'lib/Error';\nimport { ENVIRONMENT_URLS } from 'src/globals';\nimport type { ConnectedSolutionsSDKConfig } from 'lib/SDKClient';\nimport { isNode } from 'utils';\n\nexport type BearerToken = {\n access_token: string;\n token_type: string;\n expires_in: number;\n expires: string;\n};\n\nexport type AuthCredentials = {\n grantType: 'client_credentials' | 'trusted_partner';\n clientId: string;\n clientSecret: string;\n customerId?: string;\n};\n\nexport type AuthServiceConfig = Omit<ConnectedSolutionsSDKConfig, 'token'>;\n\nexport class AuthService {\n config: AuthServiceConfig;\n #cache: Map<string, Promise<Response>>;\n #ttl: number | null = null;\n baseUrl = '';\n\n static #basePath = '/v1/oauth2/token';\n\n constructor(config: AuthServiceConfig) {\n this.config = config;\n this.baseUrl = ENVIRONMENT_URLS[config.environment ?? 'PRODUCTION'];\n this.#cache = new Map();\n }\n\n public async getAccessToken(credentials: AuthCredentials) {\n const isBrowser = !isNode;\n\n if (isBrowser) {\n throw ConnectedSolutionsClientError.generateError({\n type: 'sdk_error',\n message: 'getAccessToken is not supported in browser'\n });\n }\n\n try {\n const response = await this.#fetchToken(credentials);\n\n return {\n data: response,\n errors: undefined,\n meta: {\n status: 200,\n statusText: 'OK'\n }\n };\n } catch (e) {\n // don't cache errors\n this.clearCache();\n return {\n data: undefined,\n error: e,\n meta: {\n status: e.status,\n statusText: e.message\n }\n };\n }\n }\n\n public getCacheLength() {\n return this.#cache.size;\n }\n\n public clearCache(): void {\n const endpoint = `${this.baseUrl}${AuthService.#basePath}`;\n\n const cacheKeys = Array.from(this.#cache.keys()).filter((key) =>\n key.includes(endpoint)\n );\n\n for (const key of cacheKeys) {\n this.#cache.delete(key);\n }\n }\n\n async #fetchToken({\n grantType,\n clientId,\n clientSecret,\n customerId\n }: AuthCredentials) {\n this.#checkTokenExpiry();\n\n const endpoint = `${this.baseUrl}${AuthService.#basePath}`;\n\n const options = {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n credentials: 'include' as RequestCredentials,\n body: JSON.stringify({\n grant_type: grantType,\n client_id: clientId,\n client_secret: clientSecret,\n partner_customer_id: customerId ?? ''\n })\n };\n\n const tokenRequest = await this.#executeRequest(endpoint, options);\n\n if (tokenRequest?.ok) {\n const tokenRequestClone = tokenRequest.clone();\n const accessToken = (await tokenRequestClone.json()) as BearerToken;\n\n if (this.#ttl === null) {\n this.#setTTL(accessToken.expires_in);\n }\n\n return accessToken;\n }\n\n // response was not ok\n let err: ConnectedSolutionsClientRawError;\n\n const errorMeta = {\n status: tokenRequest?.status,\n message: tokenRequest?.statusText || '',\n data: undefined\n };\n\n if (tokenRequest?.status === 401) {\n err = {\n type: 'auth_error',\n ...errorMeta\n };\n } else {\n err = {\n type: 'api_error',\n ...errorMeta\n };\n }\n\n if (\n tokenRequest?.headers.get('content-type')?.includes('application/json')\n ) {\n const errorResponseClone = tokenRequest.clone();\n const errorJson = (await errorResponseClone.json()) as {\n error: ConnectedSolutionsAPIErrorData;\n };\n err.data = errorJson.error;\n }\n\n throw ConnectedSolutionsClientError.generateError(err);\n }\n\n #setTTL(value: number | null) {\n const now = new Date().getTime();\n const oneHourInMilliseconds = 60 * 60 * 1000;\n const nextTimestamp = now + oneHourInMilliseconds;\n const nextState =\n value === null ? value : new Date(nextTimestamp).valueOf();\n\n this.#ttl = nextState;\n }\n\n #checkTokenExpiry() {\n const now = new Date(Date.now());\n const expires = new Date(this.#ttl ?? Number.NaN);\n const isTokenExpired = isAfter(now, expires);\n\n if (isTokenExpired) {\n this.#setTTL(null);\n this.#cache.clear();\n }\n }\n\n async #executeRequest(\n input: RequestInfo,\n init?: RequestInit\n ): Promise<Response | undefined> {\n const cacheKey = `${input}${JSON.stringify(init || {})}`;\n\n if (!this.#cache.has(cacheKey)) {\n const promise = fetch(input, init ?? {});\n this.#cache.set(cacheKey, promise);\n }\n\n return await this.#cache.get(cacheKey);\n }\n}\n\nfunction isAfter(date1: Date, date2: Date) {\n return date1 > date2;\n}\n","import * as resources from 'resources';\nimport { pascalToCamelCase } from 'utils';\nimport type { CreditScoresService } from 'resources/CreditScores';\nimport type { EntitlementsService } from 'resources/Entitlements';\nimport type {\n ConnectedSolutionsSDK,\n ConnectedSolutionsSDKConfig\n} from 'lib/SDKClient/types';\nimport type { CreditScoreSimulatorService } from 'resources/CreditScoreSimulator/CreditScoreSimulator';\nimport type { CreditScorePlannerService } from 'resources/CreditScorePlanner';\nimport type { CreditAttributesService } from 'resources/CreditAttributes/CreditAttributes';\nimport { AuthService } from 'lib/AuthClient/AuthClient';\nimport { ApiClient } from 'lib/ApiClient';\nimport type { AlertsService } from 'resources/Alerts';\nimport type { CreditReportsService } from 'resources/CreditReports';\nimport type { CustomersService } from 'resources/Customers';\nimport type { CustomerAuthService } from 'resources/CustomerAuth';\nimport type { RegistrationsService } from 'resources/Registrations';\nimport type { ProductConfigsService } from 'resources/ProductConfigs';\n// new service imports go here\n\nexport class SDKClient extends ApiClient implements ConnectedSolutionsSDK {\n static #instance: SDKClient | null = null;\n alerts: AlertsService;\n auth: AuthService;\n creditReports: CreditReportsService;\n creditScores: CreditScoresService;\n creditAttributes: CreditAttributesService;\n creditScorePlanner: CreditScorePlannerService;\n creditScoreSimulator: CreditScoreSimulatorService;\n customerAuth: CustomerAuthService;\n customers: CustomersService;\n entitlements: EntitlementsService;\n productConfigs: ProductConfigsService;\n registrations: RegistrationsService;\n // new services go here\n\n // The method is static as we need to access the method only through the class here\n static getInstance(config: ConnectedSolutionsSDKConfig): SDKClient {\n // if instance is already created return that otherwise create it\n if (SDKClient.#instance) {\n return SDKClient.#instance;\n }\n\n SDKClient.#instance = new SDKClient(config);\n return SDKClient.#instance;\n }\n\n static clearInstance() {\n SDKClient.#instance = null;\n }\n\n // constructor is private so that no other class can access it.\n private constructor(config: ConnectedSolutionsSDKConfig) {\n super(config);\n for (const name in resources) {\n if (typeof resources[name] === 'function') {\n this[pascalToCamelCase(name)] = new resources[name](config);\n }\n }\n\n this.auth = new AuthService({\n environment: config.environment\n });\n }\n}\n\nexport function createSDK(userConfig: ConnectedSolutionsSDKConfig) {\n return SDKClient.getInstance(userConfig);\n}\n","import type {\n CreditScorePlan,\n FicoCreditScorePlanCompleted,\n VantageCreditScorePlanCompleted,\n FicoCreditScorePlanSet,\n VantageCreditScorePlanSet,\n VantageCreditScorePlan,\n FicoCreditScorePlan,\n ScorePlanRevisionsRequest,\n FicoScorePlanRevisionsRequest,\n VantageScorePlanRevisionsRequest,\n ScorePlanRevision,\n FicoScorePlanRevision,\n VantageScorePlanRevision\n} from 'resources/CreditScorePlanner/types';\n\nexport function isPlanCompleted(\n plan: CreditScorePlan\n): plan is FicoCreditScorePlanCompleted | VantageCreditScorePlanCompleted {\n return (\n plan.progress_status === 'TARGET_NOT_MET' ||\n plan.progress_status === 'COMPLETED'\n );\n}\n\nexport function isPlanSet(\n plan: CreditScorePlan\n): plan is\n | FicoCreditScorePlanCompleted\n | FicoCreditScorePlanSet\n | VantageCreditScorePlanCompleted\n | VantageCreditScorePlanSet {\n return (\n isPlanCompleted(plan) ||\n plan.progress_status === 'TARGET_SCORE_AND_PLAN_SET' ||\n plan.progress_status === 'ON_TRACK' ||\n plan.progress_status === 'OFF_TRACK'\n );\n}\n\nexport function isVantagePlan(\n plan: CreditScorePlan\n): plan is VantageCreditScorePlan {\n return plan.score_model.includes('VANTAGE');\n}\n\nexport function isFicoPlan(plan: CreditScorePlan): plan is FicoCreditScorePlan {\n return plan.score_model.includes('FICO');\n}\n\nexport function isFicoRevisionsRequest(\n request: ScorePlanRevisionsRequest\n): request is FicoScorePlanRevisionsRequest {\n return (request as FicoScorePlanRevisionsRequest).target_score !== undefined;\n}\n\nexport function isVantageRevisionsRequest(\n request: ScorePlanRevisionsRequest\n): request is VantageScorePlanRevisionsRequest {\n return (\n (request as VantageScorePlanRevisionsRequest).max_actions_per_plan !==\n undefined\n );\n}\n\nexport function isFicoRevision(\n revision: ScorePlanRevision\n): revision is FicoScorePlanRevision {\n return revision.score_model.includes('FICO');\n}\n\nexport function isVantageRevision(\n revision: ScorePlanRevision\n): revision is VantageScorePlanRevision {\n return revision.score_model.includes('VANTAGE');\n}\n","import type {\n CreditScoreSimulator,\n FicoScenario,\n FicoScenarioVariation,\n FicoScoreSimulator,\n Scenario,\n ScenarioVariation,\n VantageScenario,\n VantageScenarioVariation\n} from 'resources/CreditScoreSimulator/types';\n\nexport function isFicoSimulator(\n data?: CreditScoreSimulator\n): data is FicoScoreSimulator {\n return Boolean(data && 'best_action' in data);\n}\n\nexport function isVantageScenario(\n scenario?: Scenario\n): scenario is VantageScenario {\n return Boolean(scenario && 'simulated_score' in scenario);\n}\n\nexport function isFicoScenario(scenario: Scenario): scenario is FicoScenario {\n return !('simulated_score' in scenario);\n}\n\nexport function isFicoScenarioVariation(\n variation?: ScenarioVariation\n): variation is FicoScenarioVariation {\n return Boolean(\n variation &&\n 'slider_min_value' in variation &&\n 'slider_max_value' in variation\n );\n}\n\nexport function isVantageScenarioVariation(\n variation?: ScenarioVariation\n): variation is VantageScenarioVariation {\n return Boolean(\n variation && 'value' in variation && 'simulated_score' in variation\n );\n}\n"],"names":["generateError","rawError","ConnectedSolutionsClientApiError","ConnectedSolutionsClientAuthError","ConnectedSolutionsClientSDKError","ConnectedSolutionsClientUnknownError","ConnectedSolutionsClientError","raw","_a","__publicField","args","ENVIRONMENT_URLS","CONTENTSTACK_URLS","_ApiClient_instances","validateConfig_fn","isJsonResponse_fn","ApiClient","config","__privateAdd","environment","partialConfig","input","init","__privateMethod","headers","options","error","e","response","err","apiError","errorJson","_b","_basePath","_CreditScoresService","fetchOptions","searchOptions","query","queryString","endpoint","__privateGet","requestOptions","CreditScoresService","_EntitlementsService","entitlement_id","body","product_config_id","customer_id","search","EntitlementsService","_CreditAttributesService","CreditAttributesService","_CreditScoreSimulatorService","requestBody","CreditScoreSimulatorService","_revisionPath","_CreditScorePlannerService","CreditScorePlannerService","_AlertsService","id","AlertsService","_CreditReportsService","latest_only","report_read","CreditReportsService","_CustomersService","updates","next_cursor","CustomersService","_CustomerAuthService","answers","CustomerAuthService","_RegistrationsService","RegistrationsService","_ProductConfigsService","fromEntries","entries","isArray","value","key","ProductConfigsService","pascalToCamelCase","name","isNode","_cache","_ttl","_AuthService_instances","fetchToken_fn","setTTL_fn","checkTokenExpiry_fn","executeRequest_fn","_AuthService","__privateSet","credentials","cacheKeys","grantType","clientId","clientSecret","customerId","tokenRequest","accessToken","errorMeta","now","oneHourInMilliseconds","nextTimestamp","nextState","expires","isAfter","cacheKey","promise","AuthService","date1","date2","_instance","_SDKClient","resources","SDKClient","createSDK","userConfig","isPlanCompleted","plan","isPlanSet","isVantagePlan","isFicoPlan","isFicoRevisionsRequest","request","isVantageRevisionsRequest","isFicoRevision","revision","isVantageRevision","isFicoSimulator","data","isVantageScenario","scenario","isFicoScenario","isFicoScenarioVariation","variation","isVantageScenarioVariation"],"mappings":";;;;;;;AAmBA,SAASA,GAAcC,GAA4C;AACjE,UAAQA,EAAS,MAAM;AAAA,IACrB,KAAK;AACI,aAAA,IAAIC,GAAiCD,CAAQ;AAAA,IACtD,KAAK;AACI,aAAA,IAAIE,GAAkCF,CAAQ;AAAA,IACvD,KAAK;AACI,aAAA,IAAIG,GAAiCH,CAAQ;AAAA,IACtD;AACS,aAAA,IAAII,GAAqCJ,CAAQ;AAAA,EAAA;AAE9D;AAEO,MAAMK,UAAsC,MAAM;AAAA,EAKvD,YAAYC,GAAuC;AAlBrD,QAAAC;AAmBI,UAAMD,EAAI,OAAO;AALV,IAAAE,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAIP,SAAK,YAAUD,IAAAD,EAAI,SAAJ,gBAAAC,EAAU,YAAWD,EAAI,WAAW,IACnD,KAAK,OAAOA,EAAI,MAChB,KAAK,SAASA,EAAI;AAAA,EAAA;AAItB;AADEE,EAZWH,GAYJ,iBAAgBN;AAGlB,MAAME,WAAyCI,EAA8B;AAAA,EAClF,YAAYI,GAAwC;AAClD,UAAMA,CAAI,GACV,KAAK,OAAO;AAAA,EAAA;AAEhB;AAEO,MAAMP,WAA0CG,EAA8B;AAAA,EACnF,YAAYI,GAAwC;AAClD,UAAMA,CAAI,GACV,KAAK,OAAO;AAAA,EAAA;AAEhB;AAEO,MAAML,WAA6CC,EAA8B;AAAA,EACtF,YAAYI,GAAwC;AAClD,UAAMA,CAAI,GACV,KAAK,OAAO;AAAA,EAAA;AAEhB;AAEO,MAAMN,WAAyCE,EAA8B;AAAA,EAClF,YAAYI,GAAwC;AAClD,UAAMA,CAAI,GACV,KAAK,OAAO;AAAA,EAAA;AAEhB;ACzEO,MAAMC,KAAmB;AAA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ClD;AAEO,SAASC,GAAeD,GAA8C;AAC3E,SAAO,EAAE,qBAAqBA;AAChC;AAEO,SAASE,GACdC,GACoC;AAC7B,SAAA,GACLA,KACE,sBAAsBA,KACtB,sBAAsBA;AAE5B;AAEO,SAASC,GACdD,GACuC;AAChC,SAAA,GACLA,KAAa,WAAWA,KAAa,qBAAqBA;AAE9D;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -145,6 +145,9 @@ declare class EntitlementsService extends ApiClient {
|
|
|
145
145
|
activateEntitlement({ entitlement_id }: {
|
|
146
146
|
entitlement_id: string;
|
|
147
147
|
}, fetchOptions?: RequestInit): Promise<ApiClientResponse<Entitlement>>;
|
|
148
|
+
deactivateEntitlement({ entitlement_id }: {
|
|
149
|
+
entitlement_id: string;
|
|
150
|
+
}, fetchOptions?: RequestInit): Promise<ApiClientResponse<Entitlement>>;
|
|
148
151
|
entitleCustomerToNewProduct(requestOptions: {
|
|
149
152
|
product_config_id: string;
|
|
150
153
|
entitlement_id: string;
|
|
@@ -154,6 +157,14 @@ declare class EntitlementsService extends ApiClient {
|
|
|
154
157
|
product_config_id: string;
|
|
155
158
|
entitlement_id: string;
|
|
156
159
|
}, fetchOptions?: RequestInit): Promise<ApiClientResponse<Entitlement>>;
|
|
160
|
+
deactivateProduct(requestOptions: {
|
|
161
|
+
product_config_id: string;
|
|
162
|
+
entitlement_id: string;
|
|
163
|
+
}, fetchOptions?: RequestInit): Promise<ApiClientResponse<Entitlement>>;
|
|
164
|
+
removeProductFromEntitlement(requestOptions: {
|
|
165
|
+
product_config_id: string;
|
|
166
|
+
entitlement_id: string;
|
|
167
|
+
}, fetchOptions?: RequestInit): Promise<ApiClientResponse<Entitlement>>;
|
|
157
168
|
getProductEligibility(requestOptions: {
|
|
158
169
|
product_config_id: string;
|
|
159
170
|
customer_id: string;
|
|
@@ -164,14 +175,14 @@ interface CreditScore {
|
|
|
164
175
|
score_id: string;
|
|
165
176
|
bureau: Bureau;
|
|
166
177
|
score_model: ScoreModel;
|
|
167
|
-
score_range: ScoreRange;
|
|
178
|
+
score_range: ScoreRange | null;
|
|
168
179
|
score_change: number;
|
|
169
180
|
score: number;
|
|
170
|
-
score_rating: ScoreRating;
|
|
181
|
+
score_rating: ScoreRating | null;
|
|
171
182
|
score_date: string;
|
|
172
183
|
frequency: ScoreUpdateFrequency;
|
|
173
184
|
next_score_date: string;
|
|
174
|
-
|
|
185
|
+
score_factors?: ScoreFactor[];
|
|
175
186
|
score_ingredients?: ScoreIngredient[];
|
|
176
187
|
}
|
|
177
188
|
type Bureau = 'EXPERIAN' | 'EQUIFAX' | 'TRANSUNION';
|
|
@@ -198,14 +209,17 @@ interface ScoreUpdateFrequency {
|
|
|
198
209
|
time_period: 'MONTHLY' | 'YEARLY' | 'WEEKLY' | 'DAILY' | 'SEMI-ANNUALLY' | 'ANNUALLY';
|
|
199
210
|
number_of_units_allowed: number;
|
|
200
211
|
}
|
|
201
|
-
interface CreditScoreFactor {
|
|
202
|
-
factors: ScoreFactor[] | null;
|
|
203
|
-
}
|
|
204
212
|
interface ScoreFactor {
|
|
205
|
-
code
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
213
|
+
code?: string;
|
|
214
|
+
is_positive: boolean;
|
|
215
|
+
short_description: string;
|
|
216
|
+
long_description: string;
|
|
217
|
+
data_points?: ScoreFactorDataPoint[];
|
|
218
|
+
}
|
|
219
|
+
interface ScoreFactorDataPoint {
|
|
220
|
+
label: string;
|
|
221
|
+
data: string;
|
|
222
|
+
comparison: string;
|
|
209
223
|
}
|
|
210
224
|
interface CreditScoreIngredient {
|
|
211
225
|
ingredientType: ScoreIngredientType;
|
|
@@ -522,8 +536,6 @@ type AlertMetadata = {
|
|
|
522
536
|
alert_id: string;
|
|
523
537
|
customer_id: string;
|
|
524
538
|
bureau: string;
|
|
525
|
-
alert_type: string;
|
|
526
|
-
alert_subtype: string;
|
|
527
539
|
event_key: string;
|
|
528
540
|
schema_version: string;
|
|
529
541
|
tenant_id: string;
|
|
@@ -877,14 +889,6 @@ type Alerts = {
|
|
|
877
889
|
pagination_token?: string;
|
|
878
890
|
alerts: Alert[];
|
|
879
891
|
};
|
|
880
|
-
type DeserializedAlertsPaginationToken = {
|
|
881
|
-
exAlertId: {
|
|
882
|
-
S: string;
|
|
883
|
-
};
|
|
884
|
-
exCustomerId: {
|
|
885
|
-
S: string;
|
|
886
|
-
};
|
|
887
|
-
};
|
|
888
892
|
type AlertCount = {
|
|
889
893
|
total: number;
|
|
890
894
|
read: number;
|
|
@@ -1245,8 +1249,15 @@ type ProductConfig = {
|
|
|
1245
1249
|
description: string;
|
|
1246
1250
|
product_type: string;
|
|
1247
1251
|
delivery: {
|
|
1248
|
-
type:
|
|
1249
|
-
cadence?:
|
|
1252
|
+
type: ProductConfigDeliveryType;
|
|
1253
|
+
cadence?: ProductConfigCadenceType;
|
|
1254
|
+
units?: number;
|
|
1255
|
+
on_hold_days?: number;
|
|
1256
|
+
};
|
|
1257
|
+
disclosure?: {
|
|
1258
|
+
score_model?: ScoreModelVersion;
|
|
1259
|
+
short_form: string;
|
|
1260
|
+
long_form: string;
|
|
1250
1261
|
};
|
|
1251
1262
|
created_at: string;
|
|
1252
1263
|
updated_at: string;
|
|
@@ -1256,11 +1267,49 @@ type ProductConfigs = {
|
|
|
1256
1267
|
next_cursor: string;
|
|
1257
1268
|
items: ProductConfig[];
|
|
1258
1269
|
};
|
|
1270
|
+
type ProductConfigDeliveryType = 'ON_DEMAND' | 'ON_SCHEDULE' | 'MONITORING' | 'ON_ACTIVATION' | 'AD_HOC';
|
|
1271
|
+
type ProductConfigCadenceType = 'DAILY' | 'WEEKLY' | 'BI_WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'YEARLY';
|
|
1272
|
+
type ProductConfigsSearchOptions = {
|
|
1273
|
+
/**
|
|
1274
|
+
* @description The cursor for the current page.
|
|
1275
|
+
*/
|
|
1276
|
+
cursor: string;
|
|
1277
|
+
/**
|
|
1278
|
+
* @description The number of records to be returned in the response. This parameter is used for pagination purposes to limit the number of records retrieved in a single request.
|
|
1279
|
+
*/
|
|
1280
|
+
count?: number;
|
|
1281
|
+
/**
|
|
1282
|
+
* @description A filter on the list based on an exact match of the product name.
|
|
1283
|
+
*/
|
|
1284
|
+
product_name?: string;
|
|
1285
|
+
/**
|
|
1286
|
+
* @description A filter on the list based on an exact match of the overriden product name.
|
|
1287
|
+
*/
|
|
1288
|
+
custom_name?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* @description A filter on the list based on a product configuration's delivery type matching one of the values in the array.
|
|
1291
|
+
*
|
|
1292
|
+
* Pattern: Array of strings equal to ON_DEMAND | ON_SCHEDULE | MONITORING | ON_ACTIVATION | AD_HOC
|
|
1293
|
+
*/
|
|
1294
|
+
delivery_type_in?: ProductConfigDeliveryType[];
|
|
1295
|
+
/**
|
|
1296
|
+
* @description A filter on the list based on a product configuration's cadence matching one of the values in the array.
|
|
1297
|
+
*
|
|
1298
|
+
* Pattern: Array of strings equal to DAILY | WEEKLY | BI_WEEKLY | MONTHLY | QUARTERLY | YEARLY
|
|
1299
|
+
*/
|
|
1300
|
+
cadence_in?: ProductConfigCadenceType[];
|
|
1301
|
+
/**
|
|
1302
|
+
* @description A filter on the list based on the product configuration's created date that falls between the date/time provided (inclusive).
|
|
1303
|
+
*
|
|
1304
|
+
* Pattern: ^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[\+-]\d{2}:\d{2})?)$
|
|
1305
|
+
*/
|
|
1306
|
+
created_between?: [string, string];
|
|
1307
|
+
};
|
|
1259
1308
|
|
|
1260
1309
|
declare class ProductConfigsService extends ApiClient {
|
|
1261
1310
|
#private;
|
|
1262
1311
|
constructor(config: ConnectedSolutionsSDKConfig);
|
|
1263
|
-
getProductConfigs(fetchOptions?: RequestInit): Promise<ApiClientResponse<ProductConfigs>>;
|
|
1312
|
+
getProductConfigs(searchOptions: ProductConfigsSearchOptions, fetchOptions?: RequestInit): Promise<ApiClientResponse<ProductConfigs>>;
|
|
1264
1313
|
getProductConfigById(requestOptions: {
|
|
1265
1314
|
product_config_id: string;
|
|
1266
1315
|
}, fetchOptions?: RequestInit): Promise<ApiClientResponse<ProductConfig>>;
|
|
@@ -1361,4 +1410,4 @@ declare function isFicoScenario(scenario: Scenario): scenario is FicoScenario;
|
|
|
1361
1410
|
declare function isFicoScenarioVariation(variation?: ScenarioVariation): variation is FicoScenarioVariation;
|
|
1362
1411
|
declare function isVantageScenarioVariation(variation?: ScenarioVariation): variation is VantageScenarioVariation;
|
|
1363
1412
|
|
|
1364
|
-
export { type Account, type AccountClosedDetails, type AccountCurrentDetails, type AccountImprovedDetails, type AccountInBankruptcyDetails, type AccountPaidDetails, type Action, type ActivationRule, type Address, type Alert, type AlertCount, type AlertData, type AlertDetails, type AlertDisposition, type AlertMetadata, type Alerts, type ApiClientResponse, type AttributeCategoryImpact, type AttributeCategoryName, type AttributeCategoryRating, type AttributeCategoryRatingName, type AttributeCategoryRatingScale, type AttributeCategoryRatingScaleType, type AttributeCategoryRatingScaleValue, type AttributeCategoryRatingScaleValueName, type AttributeHardInquiry, type AttributeHighCreditUtilizationAccount, type AttributeOldestOpenAccount, type AttributeRelevantScoreFactor, type AuthAnswer, type AuthAnswersRequest, type AuthCredentials, type AuthQuestion, type AuthQuestions, type AuthServiceConfig, type BearerToken, type Bureau, type CardOverLimitDetails, type ClosedAccountDetails, type CollectionAccount, type CollectionDetails, type Company, type ConnectedSolutionsAPIErrorData, ConnectedSolutionsClientApiError, ConnectedSolutionsClientAuthError, ConnectedSolutionsClientError, type ConnectedSolutionsClientErrors, type ConnectedSolutionsClientMeta, type ConnectedSolutionsClientRawError, ConnectedSolutionsClientSDKError, ConnectedSolutionsClientUnknownError, type ConnectedSolutionsSDK, type ConnectedSolutionsSDKConfig, type ConnectedSolutionsSDKConfigInternal, type ConnectedSolutionsSDKErrorTypes, type ContactInfo, type CreateCustomerOptions, type CreateRegistrationsRequest, type CreateRegistrationsResponse, type CreditAttribute, type CreditAttributeCategory, type CreditAttributes, type CreditBalanceDecreaseDetails, type CreditBalanceIncreaseDetails, type CreditInquiry, type CreditLimitDecreaseDetails, type CreditLimitIncreaseDetails, type CreditReport, type CreditReportMeta, type CreditReportScoreDetail, type CreditReportScoreRating, type CreditReportType, type CreditScore, type CreditScoreBelowGoalDetails, type CreditScoreDecreaseDetails, type
|
|
1413
|
+
export { type Account, type AccountClosedDetails, type AccountCurrentDetails, type AccountImprovedDetails, type AccountInBankruptcyDetails, type AccountPaidDetails, type Action, type ActivationRule, type Address, type Alert, type AlertCount, type AlertData, type AlertDetails, type AlertDisposition, type AlertMetadata, type Alerts, type ApiClientResponse, type AttributeCategoryImpact, type AttributeCategoryName, type AttributeCategoryRating, type AttributeCategoryRatingName, type AttributeCategoryRatingScale, type AttributeCategoryRatingScaleType, type AttributeCategoryRatingScaleValue, type AttributeCategoryRatingScaleValueName, type AttributeHardInquiry, type AttributeHighCreditUtilizationAccount, type AttributeOldestOpenAccount, type AttributeRelevantScoreFactor, type AuthAnswer, type AuthAnswersRequest, type AuthCredentials, type AuthQuestion, type AuthQuestions, type AuthServiceConfig, type BearerToken, type Bureau, type CardOverLimitDetails, type ClosedAccountDetails, type CollectionAccount, type CollectionDetails, type Company, type ConnectedSolutionsAPIErrorData, ConnectedSolutionsClientApiError, ConnectedSolutionsClientAuthError, ConnectedSolutionsClientError, type ConnectedSolutionsClientErrors, type ConnectedSolutionsClientMeta, type ConnectedSolutionsClientRawError, ConnectedSolutionsClientSDKError, ConnectedSolutionsClientUnknownError, type ConnectedSolutionsSDK, type ConnectedSolutionsSDKConfig, type ConnectedSolutionsSDKConfigInternal, type ConnectedSolutionsSDKErrorTypes, type ContactInfo, type CreateCustomerOptions, type CreateRegistrationsRequest, type CreateRegistrationsResponse, type CreditAttribute, type CreditAttributeCategory, type CreditAttributes, type CreditBalanceDecreaseDetails, type CreditBalanceIncreaseDetails, type CreditInquiry, type CreditLimitDecreaseDetails, type CreditLimitIncreaseDetails, type CreditReport, type CreditReportMeta, type CreditReportScoreDetail, type CreditReportScoreRating, type CreditReportType, type CreditScore, type CreditScoreBelowGoalDetails, type CreditScoreDecreaseDetails, type CreditScoreFeaturePreferences, type CreditScoreGoalAchievedDetails, type CreditScoreIncreaseDetails, type CreditScoreIngredient, type CreditScorePlan, type CreditScorePostRequest, type CreditScoreRatingDecreaseDetails, type CreditScoreRatingIncreaseDetails, type CreditScoreSimulator, type CreditScoreSimulatorPostRequest, type CreditScoreSimulatorPostResponse, type CreditScoreTriggerReasons, type CreditUsageDecreaseDetails, type CreditUsageIncreaseDetails, type CreditorAddress, type Customer, type CustomerAddress, type CustomerDisclosure, type CustomerEmail, type CustomerId, type CustomerPhone, type CustomerSearchOptions, type CustomerSearchResults, type DeceasedDetails, type DerogatoryDetails, type DormantAccountDetails, type EntitleCustomerResponse, type EntitledProduct, type EntitledProductStatus, type Entitlement, type EntitlementId, type EntitlementNextAction, type Entitlements, type FicoCreditScorePlan, type FicoCreditScorePlanCompleted, type FicoCreditScorePlanNotSet, type FicoCreditScorePlanSet, type FicoScenario, type FicoScenarioVariation, type FicoScoreModelVersion, type FicoScorePlanCompleted, type FicoScorePlanCreateResponse, type FicoScorePlanRevision, type FicoScorePlanRevisionsRequest, type FicoScorePlanSet, type FicoScoreSimulator, type FicoStatement, type GlobalProductId, type Impact, type ImpactType, type LostOrStolenCardDetails, type MappedScoreModelVersion, type Month, type Name, type NewAccountDetails, type NewAddressDetails, type NewInquiryDetails, type OnDemandEligibility, type PastDueDetails, type PaymentHistoryCode, type PaymentSummary, type PersonalAddress, type PlanCompletedProgressStatus, type PlanNotSetProgressStatus, type PlanSetProgressStatus, type ProductConfigId, type ProductDeliveryCadence, type ProductEligibility, type PublicRecord, type PublicRecordBankruptcyDetails, type ReportDisplay, type ReportDisplayScoreDetails, type Scenario, type ScenarioVariation, type ScoreFactor, type ScoreFactorDataPoint, type ScoreIngredient, type ScoreIngredientAttribute, type ScoreIngredientAttributeSubValueType, type ScoreIngredientAttributeValueType, type ScoreIngredientImpact, type ScoreIngredientType, type ScoreModel, type ScoreModelVersion, type ScorePlanCompleted, type ScorePlanCreateResponse, type ScorePlanRevision, type ScorePlanRevisionsRequest, type ScorePlanSet, type ScoreRange, type ScoreRating, type ScoreUpdateFrequency, type SettlementDetails, type SimulationCategoryType, type SkipCannotLocateDetails, type SpecialCommentsDetails, type Statement, type Supcontent, type TotalAlertCounts, type VantageCreditScorePlan, type VantageCreditScorePlanCompleted, type VantageCreditScorePlanNotSet, type VantageCreditScorePlanSet, type VantageScenario, type VantageScenarioVariation, type VantageScoreModelVersion, type VantageScorePlanCompleted, type VantageScorePlanCreateResponse, type VantageScorePlanRevision, type VantageScorePlanRevisionsRequest, type VantageScorePlanSet, type VantageScoreSimulator, type VantageStatement, createSDK, createSDK as default, isFicoPlan, isFicoRevision, isFicoRevisionsRequest, isFicoScenario, isFicoScenarioVariation, isFicoSimulator, isPlanCompleted, isPlanSet, isVantagePlan, isVantageRevision, isVantageRevisionsRequest, isVantageScenario, isVantageScenarioVariation };
|