@xyo-network/rebilly-payment-card-authorization-plugin 2.94.1 → 2.94.3
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/dist/browser/Api/PaymentCardToken/Request.d.cts +1 -1
- package/dist/browser/Api/PaymentCardToken/Request.d.cts.map +1 -1
- package/dist/browser/Api/PaymentCardToken/Request.d.mts +1 -1
- package/dist/browser/Api/PaymentCardToken/Request.d.mts.map +1 -1
- package/dist/browser/Api/PaymentCardToken/Request.d.ts +1 -1
- package/dist/browser/Api/PaymentCardToken/Request.d.ts.map +1 -1
- package/dist/browser/Config.d.cts +1 -1
- package/dist/browser/Config.d.cts.map +1 -1
- package/dist/browser/Config.d.mts +1 -1
- package/dist/browser/Config.d.mts.map +1 -1
- package/dist/browser/Config.d.ts +1 -1
- package/dist/browser/Config.d.ts.map +1 -1
- package/dist/browser/Params.d.cts +1 -1
- package/dist/browser/Params.d.cts.map +1 -1
- package/dist/browser/Params.d.mts +1 -1
- package/dist/browser/Params.d.mts.map +1 -1
- package/dist/browser/Params.d.ts +1 -1
- package/dist/browser/Params.d.ts.map +1 -1
- package/dist/browser/Sentinel.d.cts.map +1 -1
- package/dist/browser/Sentinel.d.mts.map +1 -1
- package/dist/browser/Sentinel.d.ts.map +1 -1
- package/dist/browser/index.cjs +3 -3
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/node/Api/PaymentCardToken/Request.d.cts +1 -1
- package/dist/node/Api/PaymentCardToken/Request.d.cts.map +1 -1
- package/dist/node/Api/PaymentCardToken/Request.d.mts +1 -1
- package/dist/node/Api/PaymentCardToken/Request.d.mts.map +1 -1
- package/dist/node/Api/PaymentCardToken/Request.d.ts +1 -1
- package/dist/node/Api/PaymentCardToken/Request.d.ts.map +1 -1
- package/dist/node/Config.d.cts +1 -1
- package/dist/node/Config.d.cts.map +1 -1
- package/dist/node/Config.d.mts +1 -1
- package/dist/node/Config.d.mts.map +1 -1
- package/dist/node/Config.d.ts +1 -1
- package/dist/node/Config.d.ts.map +1 -1
- package/dist/node/Params.d.cts +1 -1
- package/dist/node/Params.d.cts.map +1 -1
- package/dist/node/Params.d.mts +1 -1
- package/dist/node/Params.d.mts.map +1 -1
- package/dist/node/Params.d.ts +1 -1
- package/dist/node/Params.d.ts.map +1 -1
- package/dist/node/Sentinel.d.cts.map +1 -1
- package/dist/node/Sentinel.d.mts.map +1 -1
- package/dist/node/Sentinel.d.ts.map +1 -1
- package/dist/node/index.cjs +3 -3
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/index.js.map +1 -1
- package/package.json +3 -3
- package/src/Api/PaymentCardToken/Request.ts +1 -1
- package/src/Config.ts +1 -1
- package/src/Params.ts +1 -1
- package/src/Sentinel.ts +4 -4
- package/dist/browser/RebillyProviderSettings/RebillyApiSettings.d.cts +0 -17
- package/dist/browser/RebillyProviderSettings/RebillyApiSettings.d.cts.map +0 -1
- package/dist/browser/RebillyProviderSettings/RebillyApiSettings.d.mts +0 -17
- package/dist/browser/RebillyProviderSettings/RebillyApiSettings.d.mts.map +0 -1
- package/dist/browser/RebillyProviderSettings/RebillyApiSettings.d.ts +0 -17
- package/dist/browser/RebillyProviderSettings/RebillyApiSettings.d.ts.map +0 -1
- package/dist/browser/RebillyProviderSettings/RebillyAuthSettings.d.cts +0 -15
- package/dist/browser/RebillyProviderSettings/RebillyAuthSettings.d.cts.map +0 -1
- package/dist/browser/RebillyProviderSettings/RebillyAuthSettings.d.mts +0 -15
- package/dist/browser/RebillyProviderSettings/RebillyAuthSettings.d.mts.map +0 -1
- package/dist/browser/RebillyProviderSettings/RebillyAuthSettings.d.ts +0 -15
- package/dist/browser/RebillyProviderSettings/RebillyAuthSettings.d.ts.map +0 -1
- package/dist/browser/RebillyProviderSettings/RebillyOrganizationSettings.d.cts +0 -10
- package/dist/browser/RebillyProviderSettings/RebillyOrganizationSettings.d.cts.map +0 -1
- package/dist/browser/RebillyProviderSettings/RebillyOrganizationSettings.d.mts +0 -10
- package/dist/browser/RebillyProviderSettings/RebillyOrganizationSettings.d.mts.map +0 -1
- package/dist/browser/RebillyProviderSettings/RebillyOrganizationSettings.d.ts +0 -10
- package/dist/browser/RebillyProviderSettings/RebillyOrganizationSettings.d.ts.map +0 -1
- package/dist/browser/RebillyProviderSettings/index.d.cts +0 -4
- package/dist/browser/RebillyProviderSettings/index.d.cts.map +0 -1
- package/dist/browser/RebillyProviderSettings/index.d.mts +0 -4
- package/dist/browser/RebillyProviderSettings/index.d.mts.map +0 -1
- package/dist/browser/RebillyProviderSettings/index.d.ts +0 -4
- package/dist/browser/RebillyProviderSettings/index.d.ts.map +0 -1
- package/dist/node/RebillyProviderSettings/RebillyApiSettings.d.cts +0 -17
- package/dist/node/RebillyProviderSettings/RebillyApiSettings.d.cts.map +0 -1
- package/dist/node/RebillyProviderSettings/RebillyApiSettings.d.mts +0 -17
- package/dist/node/RebillyProviderSettings/RebillyApiSettings.d.mts.map +0 -1
- package/dist/node/RebillyProviderSettings/RebillyApiSettings.d.ts +0 -17
- package/dist/node/RebillyProviderSettings/RebillyApiSettings.d.ts.map +0 -1
- package/dist/node/RebillyProviderSettings/RebillyAuthSettings.d.cts +0 -15
- package/dist/node/RebillyProviderSettings/RebillyAuthSettings.d.cts.map +0 -1
- package/dist/node/RebillyProviderSettings/RebillyAuthSettings.d.mts +0 -15
- package/dist/node/RebillyProviderSettings/RebillyAuthSettings.d.mts.map +0 -1
- package/dist/node/RebillyProviderSettings/RebillyAuthSettings.d.ts +0 -15
- package/dist/node/RebillyProviderSettings/RebillyAuthSettings.d.ts.map +0 -1
- package/dist/node/RebillyProviderSettings/RebillyOrganizationSettings.d.cts +0 -10
- package/dist/node/RebillyProviderSettings/RebillyOrganizationSettings.d.cts.map +0 -1
- package/dist/node/RebillyProviderSettings/RebillyOrganizationSettings.d.mts +0 -10
- package/dist/node/RebillyProviderSettings/RebillyOrganizationSettings.d.mts.map +0 -1
- package/dist/node/RebillyProviderSettings/RebillyOrganizationSettings.d.ts +0 -10
- package/dist/node/RebillyProviderSettings/RebillyOrganizationSettings.d.ts.map +0 -1
- package/dist/node/RebillyProviderSettings/index.d.cts +0 -4
- package/dist/node/RebillyProviderSettings/index.d.cts.map +0 -1
- package/dist/node/RebillyProviderSettings/index.d.mts +0 -4
- package/dist/node/RebillyProviderSettings/index.d.mts.map +0 -1
- package/dist/node/RebillyProviderSettings/index.d.ts +0 -4
- package/dist/node/RebillyProviderSettings/index.d.ts.map +0 -1
- package/src/RebillyProviderSettings/RebillyApiSettings.ts +0 -23
- package/src/RebillyProviderSettings/RebillyAuthSettings.ts +0 -15
- package/src/RebillyProviderSettings/RebillyOrganizationSettings.ts +0 -9
- package/src/RebillyProviderSettings/index.ts +0 -3
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Schema.ts","../../src/Config.ts","../../src/Sentinel.ts","../../src/util/toTokenRequest.ts"],"sourcesContent":["export * from './Config'\nexport * from './Params'\nexport * from './Schema'\nexport * from './Sentinel'\n","export const RebillyPaymentCardAuthorizationSentinelSchema = 'network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly'\nexport type RebillyPaymentCardAuthorizationSentinelSchema = typeof RebillyPaymentCardAuthorizationSentinelSchema\n","import {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Schema.ts","../../src/Config.ts","../../src/Sentinel.ts","../../src/util/toTokenRequest.ts"],"sourcesContent":["export * from './Config'\nexport * from './Params'\nexport * from './Schema'\nexport * from './Sentinel'\n","export const RebillyPaymentCardAuthorizationSentinelSchema = 'network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly'\nexport type RebillyPaymentCardAuthorizationSentinelSchema = typeof RebillyPaymentCardAuthorizationSentinelSchema\n","import { RebillyApiDomainSettings } from '@xyo-network/rebilly-payment-payload-plugin'\nimport { SentinelConfig } from '@xyo-network/sentinel-model'\n\nimport { RebillyPaymentCardAuthorizationSentinelSchema } from './Schema'\n\nexport const RebillyPaymentCardAuthorizationSentinelConfigSchema = `${RebillyPaymentCardAuthorizationSentinelSchema}.config`\nexport type RebillyPaymentCardAuthorizationSentinelConfigSchema = typeof RebillyPaymentCardAuthorizationSentinelConfigSchema\n\n/*\n * The Rebilly Payment Card Authorization Sentinel Config\n */\nexport type RebillyPaymentCardAuthorizationSentinelConfig = SentinelConfig<{\n /**\n * The config schema\n */\n schema: RebillyPaymentCardAuthorizationSentinelConfigSchema\n}> &\n Partial<RebillyApiDomainSettings>\n","import { assertEx } from '@xylabs/assert'\nimport { AxiosJson, AxiosRequestConfig, HttpStatusCode } from '@xylabs/axios'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, WithSources } from '@xyo-network/payload-model'\nimport { isBillingAddress, isPaymentCard } from '@xyo-network/payment-payload-plugins'\nimport { RebillyPaymentAuthorizationToken, RebillyPaymentAuthorizationTokenSchema } from '@xyo-network/rebilly-payment-payload-plugin'\nimport { AbstractSentinel } from '@xyo-network/sentinel-abstract'\nimport { SentinelInstance, SentinelModuleEventData } from '@xyo-network/sentinel-model'\n\nimport { CreateTokenResponse } from './Api'\nimport { RebillyPaymentCardAuthorizationSentinelConfigSchema } from './Config'\nimport { RebillyPaymentCardAuthorizationSentinelParams } from './Params'\nimport { toTokenRequest } from './util'\n\nconst removePrefix = (str: string, prefix: string) => {\n const regex = new RegExp(`^${prefix}`)\n return str.replace(regex, '')\n}\n\nconst moduleName = 'RebillyPaymentCardAuthorizationSentinel'\nexport class RebillyPaymentCardAuthorizationSentinel<\n TParams extends RebillyPaymentCardAuthorizationSentinelParams = RebillyPaymentCardAuthorizationSentinelParams,\n TEventData extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>,\n> extends AbstractSentinel<TParams, TEventData> {\n static override configSchemas = [RebillyPaymentCardAuthorizationSentinelConfigSchema]\n static override defaultConfigSchema = RebillyPaymentCardAuthorizationSentinelConfigSchema\n\n protected _apiRoot: string | undefined = undefined\n protected _domain: string | undefined = undefined\n protected _headers: AxiosRequestConfig['headers'] | undefined = undefined\n protected _organizationId: string | undefined = undefined\n protected _publishableApiKey: string | undefined = undefined\n protected _tokenEndpoint: string | undefined = undefined\n\n /**\n * The Rebilly Organization API root endpoint\n */\n protected get apiRoot() {\n if (!this._apiRoot) this._apiRoot = `${this.domain}/organizations/${this.organizationId}`\n return this._apiRoot\n }\n\n /**\n * The Rebilly domain\n */\n protected get domain() {\n if (!this._domain) this._domain = assertEx(this.params.domain ?? this.config.domain, () => `${moduleName}: Missing domain in params/config`)\n return this._domain\n }\n\n /**\n * The headers to be included in the request for each request\n */\n protected get headers(): AxiosRequestConfig['headers'] {\n if (!this._headers) this._headers = { Authorization: this.publishableApiKey }\n return this._headers\n }\n\n /**\n * True if the environment is sandbox (testing), false otherwise\n */\n protected get isSandboxEnvironment(): boolean {\n return this.domain.includes('sandbox')\n }\n\n /**\n * The Rebilly organization ID\n */\n protected get organizationId() {\n if (!this._organizationId)\n this._organizationId = removePrefix(\n assertEx(this.params.organizationId, () => `${moduleName}: Missing organizationId in params`),\n 'org_',\n )\n return this._organizationId\n }\n\n /**\n * The Rebilly Publishable API key\n */\n protected get publishableApiKey(): string {\n if (!this._publishableApiKey)\n this._publishableApiKey = assertEx(this.params.publishableApiKey, () => `${moduleName}: Missing publishableApiKey in params`)\n return this._publishableApiKey\n }\n\n /**\n * The Rebilly Organization token creation endpoint\n */\n protected get tokenEndpoint() {\n if (!this._tokenEndpoint) this._tokenEndpoint = `${this.apiRoot}/tokens`\n return this._tokenEndpoint\n }\n\n override async reportHandler(payloads?: Payload[]): Promise<Payload[]> {\n await this.started('throw')\n const results: WithSources<RebillyPaymentAuthorizationToken>[] = []\n // Verify necessary inputs and if nothing meets our criteria, bail early\n if (!payloads || payloads.length === 0) return results\n const paymentCard = payloads?.find(isPaymentCard)\n if (!paymentCard) return results\n const billingAddress = payloads?.find(isBillingAddress)\n if (!billingAddress) return results\n const axios = new AxiosJson({ headers: this.headers })\n try {\n const data = toTokenRequest(paymentCard, billingAddress)\n const response = await axios.post<CreateTokenResponse>(this.tokenEndpoint, data)\n assertEx(response.status === HttpStatusCode.Created, () => `Failed to tokenize payment card: ${response.status}`)\n const { id } = response.data\n const sources = await PayloadBuilder.dataHashes([paymentCard, billingAddress])\n results.push({ id, schema: RebillyPaymentAuthorizationTokenSchema, sources })\n } catch (error) {\n this.logger?.error?.(`${moduleName}: Error creating payment token: ${error}`)\n }\n return results\n }\n}\n","import { BillingAddress, PaymentCard } from '@xyo-network/payment-payload-plugins'\n\nimport { CreatePaymentTokenRequest } from '../Api'\n\n/**\n * Converts a payment card and billing address to a token request\n * @param paymentCard The payment card\n * @param billingAddress The billing address\n * @returns The token request\n */\nexport const toTokenRequest = (paymentCard: PaymentCard, billingAddress: BillingAddress): CreatePaymentTokenRequest => {\n const { cvv, expMonth, expYear, cardNumber } = paymentCard\n // NOTE: We are destructuring all but the schema and passing it along to the billingAddress. This\n // is to allow for missing fields to be omitted rather than set to undefined and for any new fields\n // that might be added later to be automatically picked up on. It is fine to pass this along since\n // the user is supplying this data about themselves.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { schema: _, ...fields } = billingAddress\n return {\n billingAddress: { ...fields },\n method: 'payment-card',\n paymentInstrument: { cvv, expMonth, expYear, pan: cardNumber },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,gDAAgD;;;ACKtD,IAAM,sDAAsD,GAAG,6CAA6C;;;ACLnH,oBAAyB;AACzB,mBAA8D;AAC9D,6BAA+B;AAE/B,qCAAgD;AAChD,4CAAyF;AACzF,+BAAiC;;;ACI1B,IAAM,iBAAiB,CAAC,aAA0B,mBAA8D;AACrH,QAAM,EAAE,KAAK,UAAU,SAAS,WAAW,IAAI;AAM/C,QAAM,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|
package/dist/node/index.js
CHANGED
|
@@ -7,9 +7,9 @@ var RebillyPaymentCardAuthorizationSentinelConfigSchema = `${RebillyPaymentCardA
|
|
|
7
7
|
// src/Sentinel.ts
|
|
8
8
|
import { assertEx } from "@xylabs/assert";
|
|
9
9
|
import { AxiosJson, HttpStatusCode } from "@xylabs/axios";
|
|
10
|
-
import { IdSchema } from "@xyo-network/id-payload-plugin";
|
|
11
10
|
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
12
11
|
import { isBillingAddress, isPaymentCard } from "@xyo-network/payment-payload-plugins";
|
|
12
|
+
import { RebillyPaymentAuthorizationTokenSchema } from "@xyo-network/rebilly-payment-payload-plugin";
|
|
13
13
|
import { AbstractSentinel } from "@xyo-network/sentinel-abstract";
|
|
14
14
|
|
|
15
15
|
// src/util/toTokenRequest.ts
|
|
@@ -112,9 +112,9 @@ var RebillyPaymentCardAuthorizationSentinel = class extends AbstractSentinel {
|
|
|
112
112
|
const data = toTokenRequest(paymentCard, billingAddress);
|
|
113
113
|
const response = await axios.post(this.tokenEndpoint, data);
|
|
114
114
|
assertEx(response.status === HttpStatusCode.Created, () => `Failed to tokenize payment card: ${response.status}`);
|
|
115
|
-
const
|
|
115
|
+
const { id } = response.data;
|
|
116
116
|
const sources = await PayloadBuilder.dataHashes([paymentCard, billingAddress]);
|
|
117
|
-
results.push({
|
|
117
|
+
results.push({ id, schema: RebillyPaymentAuthorizationTokenSchema, sources });
|
|
118
118
|
} catch (error) {
|
|
119
119
|
(_b = (_a = this.logger) == null ? void 0 : _a.error) == null ? void 0 : _b.call(_a, `${moduleName}: Error creating payment token: ${error}`);
|
|
120
120
|
}
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Schema.ts","../../src/Config.ts","../../src/Sentinel.ts","../../src/util/toTokenRequest.ts"],"sourcesContent":["export const RebillyPaymentCardAuthorizationSentinelSchema = 'network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly'\nexport type RebillyPaymentCardAuthorizationSentinelSchema = typeof RebillyPaymentCardAuthorizationSentinelSchema\n","import {
|
|
1
|
+
{"version":3,"sources":["../../src/Schema.ts","../../src/Config.ts","../../src/Sentinel.ts","../../src/util/toTokenRequest.ts"],"sourcesContent":["export const RebillyPaymentCardAuthorizationSentinelSchema = 'network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly'\nexport type RebillyPaymentCardAuthorizationSentinelSchema = typeof RebillyPaymentCardAuthorizationSentinelSchema\n","import { RebillyApiDomainSettings } from '@xyo-network/rebilly-payment-payload-plugin'\nimport { SentinelConfig } from '@xyo-network/sentinel-model'\n\nimport { RebillyPaymentCardAuthorizationSentinelSchema } from './Schema'\n\nexport const RebillyPaymentCardAuthorizationSentinelConfigSchema = `${RebillyPaymentCardAuthorizationSentinelSchema}.config`\nexport type RebillyPaymentCardAuthorizationSentinelConfigSchema = typeof RebillyPaymentCardAuthorizationSentinelConfigSchema\n\n/*\n * The Rebilly Payment Card Authorization Sentinel Config\n */\nexport type RebillyPaymentCardAuthorizationSentinelConfig = SentinelConfig<{\n /**\n * The config schema\n */\n schema: RebillyPaymentCardAuthorizationSentinelConfigSchema\n}> &\n Partial<RebillyApiDomainSettings>\n","import { assertEx } from '@xylabs/assert'\nimport { AxiosJson, AxiosRequestConfig, HttpStatusCode } from '@xylabs/axios'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload, WithSources } from '@xyo-network/payload-model'\nimport { isBillingAddress, isPaymentCard } from '@xyo-network/payment-payload-plugins'\nimport { RebillyPaymentAuthorizationToken, RebillyPaymentAuthorizationTokenSchema } from '@xyo-network/rebilly-payment-payload-plugin'\nimport { AbstractSentinel } from '@xyo-network/sentinel-abstract'\nimport { SentinelInstance, SentinelModuleEventData } from '@xyo-network/sentinel-model'\n\nimport { CreateTokenResponse } from './Api'\nimport { RebillyPaymentCardAuthorizationSentinelConfigSchema } from './Config'\nimport { RebillyPaymentCardAuthorizationSentinelParams } from './Params'\nimport { toTokenRequest } from './util'\n\nconst removePrefix = (str: string, prefix: string) => {\n const regex = new RegExp(`^${prefix}`)\n return str.replace(regex, '')\n}\n\nconst moduleName = 'RebillyPaymentCardAuthorizationSentinel'\nexport class RebillyPaymentCardAuthorizationSentinel<\n TParams extends RebillyPaymentCardAuthorizationSentinelParams = RebillyPaymentCardAuthorizationSentinelParams,\n TEventData extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>,\n> extends AbstractSentinel<TParams, TEventData> {\n static override configSchemas = [RebillyPaymentCardAuthorizationSentinelConfigSchema]\n static override defaultConfigSchema = RebillyPaymentCardAuthorizationSentinelConfigSchema\n\n protected _apiRoot: string | undefined = undefined\n protected _domain: string | undefined = undefined\n protected _headers: AxiosRequestConfig['headers'] | undefined = undefined\n protected _organizationId: string | undefined = undefined\n protected _publishableApiKey: string | undefined = undefined\n protected _tokenEndpoint: string | undefined = undefined\n\n /**\n * The Rebilly Organization API root endpoint\n */\n protected get apiRoot() {\n if (!this._apiRoot) this._apiRoot = `${this.domain}/organizations/${this.organizationId}`\n return this._apiRoot\n }\n\n /**\n * The Rebilly domain\n */\n protected get domain() {\n if (!this._domain) this._domain = assertEx(this.params.domain ?? this.config.domain, () => `${moduleName}: Missing domain in params/config`)\n return this._domain\n }\n\n /**\n * The headers to be included in the request for each request\n */\n protected get headers(): AxiosRequestConfig['headers'] {\n if (!this._headers) this._headers = { Authorization: this.publishableApiKey }\n return this._headers\n }\n\n /**\n * True if the environment is sandbox (testing), false otherwise\n */\n protected get isSandboxEnvironment(): boolean {\n return this.domain.includes('sandbox')\n }\n\n /**\n * The Rebilly organization ID\n */\n protected get organizationId() {\n if (!this._organizationId)\n this._organizationId = removePrefix(\n assertEx(this.params.organizationId, () => `${moduleName}: Missing organizationId in params`),\n 'org_',\n )\n return this._organizationId\n }\n\n /**\n * The Rebilly Publishable API key\n */\n protected get publishableApiKey(): string {\n if (!this._publishableApiKey)\n this._publishableApiKey = assertEx(this.params.publishableApiKey, () => `${moduleName}: Missing publishableApiKey in params`)\n return this._publishableApiKey\n }\n\n /**\n * The Rebilly Organization token creation endpoint\n */\n protected get tokenEndpoint() {\n if (!this._tokenEndpoint) this._tokenEndpoint = `${this.apiRoot}/tokens`\n return this._tokenEndpoint\n }\n\n override async reportHandler(payloads?: Payload[]): Promise<Payload[]> {\n await this.started('throw')\n const results: WithSources<RebillyPaymentAuthorizationToken>[] = []\n // Verify necessary inputs and if nothing meets our criteria, bail early\n if (!payloads || payloads.length === 0) return results\n const paymentCard = payloads?.find(isPaymentCard)\n if (!paymentCard) return results\n const billingAddress = payloads?.find(isBillingAddress)\n if (!billingAddress) return results\n const axios = new AxiosJson({ headers: this.headers })\n try {\n const data = toTokenRequest(paymentCard, billingAddress)\n const response = await axios.post<CreateTokenResponse>(this.tokenEndpoint, data)\n assertEx(response.status === HttpStatusCode.Created, () => `Failed to tokenize payment card: ${response.status}`)\n const { id } = response.data\n const sources = await PayloadBuilder.dataHashes([paymentCard, billingAddress])\n results.push({ id, schema: RebillyPaymentAuthorizationTokenSchema, sources })\n } catch (error) {\n this.logger?.error?.(`${moduleName}: Error creating payment token: ${error}`)\n }\n return results\n }\n}\n","import { BillingAddress, PaymentCard } from '@xyo-network/payment-payload-plugins'\n\nimport { CreatePaymentTokenRequest } from '../Api'\n\n/**\n * Converts a payment card and billing address to a token request\n * @param paymentCard The payment card\n * @param billingAddress The billing address\n * @returns The token request\n */\nexport const toTokenRequest = (paymentCard: PaymentCard, billingAddress: BillingAddress): CreatePaymentTokenRequest => {\n const { cvv, expMonth, expYear, cardNumber } = paymentCard\n // NOTE: We are destructuring all but the schema and passing it along to the billingAddress. This\n // is to allow for missing fields to be omitted rather than set to undefined and for any new fields\n // that might be added later to be automatically picked up on. It is fine to pass this along since\n // the user is supplying this data about themselves.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { schema: _, ...fields } = billingAddress\n return {\n billingAddress: { ...fields },\n method: 'payment-card',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E,eAAS,SAAS,WAAW,eAAe,SAAS,MAAM,oCAAoC,SAAS,MAAM,EAAE;AAChH,YAAM,EAAE,GAAG,IAAI,SAAS;AACxB,YAAM,UAAU,MAAM,eAAe,WAAW,CAAC,aAAa,cAAc,CAAC;AAC7E,cAAQ,KAAK,EAAE,IAAI,QAAQ,wCAAwC,QAAQ,CAAC;AAAA,IAC9E,SAAS,OAAO;AACd,uBAAK,WAAL,mBAAa,UAAb,4BAAqB,GAAG,UAAU,mCAAmC,KAAK;AAAA,IAC5E;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@xylabs/assert": "^3.1.11",
|
|
14
14
|
"@xylabs/axios": "^3.1.11",
|
|
15
|
-
"@xyo-network/id-payload-plugin": "^2.99.1",
|
|
16
15
|
"@xyo-network/module-model": "^2.99.1",
|
|
17
16
|
"@xyo-network/payload-builder": "^2.99.1",
|
|
18
17
|
"@xyo-network/payload-model": "^2.99.1",
|
|
19
|
-
"@xyo-network/payment-payload-plugins": "~2.94.
|
|
18
|
+
"@xyo-network/payment-payload-plugins": "~2.94.3",
|
|
19
|
+
"@xyo-network/rebilly-payment-payload-plugin": "~2.94.3",
|
|
20
20
|
"@xyo-network/sentinel-abstract": "^2.99.1",
|
|
21
21
|
"@xyo-network/sentinel-model": "^2.99.1"
|
|
22
22
|
},
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
67
67
|
},
|
|
68
68
|
"sideEffects": false,
|
|
69
|
-
"version": "2.94.
|
|
69
|
+
"version": "2.94.3",
|
|
70
70
|
"type": "module"
|
|
71
71
|
}
|
package/src/Config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { RebillyApiDomainSettings } from '@xyo-network/rebilly-payment-payload-plugin'
|
|
1
2
|
import { SentinelConfig } from '@xyo-network/sentinel-model'
|
|
2
3
|
|
|
3
|
-
import { RebillyApiDomainSettings } from './RebillyProviderSettings'
|
|
4
4
|
import { RebillyPaymentCardAuthorizationSentinelSchema } from './Schema'
|
|
5
5
|
|
|
6
6
|
export const RebillyPaymentCardAuthorizationSentinelConfigSchema = `${RebillyPaymentCardAuthorizationSentinelSchema}.config`
|
package/src/Params.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
2
|
+
import { RebillyOrganizationSettings, RebillyPublishableApiSettings } from '@xyo-network/rebilly-payment-payload-plugin'
|
|
2
3
|
import { SentinelParams } from '@xyo-network/sentinel-model'
|
|
3
4
|
|
|
4
5
|
import { RebillyPaymentCardAuthorizationSentinelConfig } from './Config'
|
|
5
|
-
import { RebillyOrganizationSettings, RebillyPublishableApiSettings } from './RebillyProviderSettings'
|
|
6
6
|
|
|
7
7
|
export type RebillyPaymentCardAuthorizationParams = Partial<RebillyPublishableApiSettings & RebillyOrganizationSettings>
|
|
8
8
|
|
package/src/Sentinel.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
2
|
import { AxiosJson, AxiosRequestConfig, HttpStatusCode } from '@xylabs/axios'
|
|
3
|
-
import { IdPayload, IdSchema } from '@xyo-network/id-payload-plugin'
|
|
4
3
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
5
4
|
import { Payload, WithSources } from '@xyo-network/payload-model'
|
|
6
5
|
import { isBillingAddress, isPaymentCard } from '@xyo-network/payment-payload-plugins'
|
|
6
|
+
import { RebillyPaymentAuthorizationToken, RebillyPaymentAuthorizationTokenSchema } from '@xyo-network/rebilly-payment-payload-plugin'
|
|
7
7
|
import { AbstractSentinel } from '@xyo-network/sentinel-abstract'
|
|
8
8
|
import { SentinelInstance, SentinelModuleEventData } from '@xyo-network/sentinel-model'
|
|
9
9
|
|
|
@@ -94,7 +94,7 @@ export class RebillyPaymentCardAuthorizationSentinel<
|
|
|
94
94
|
|
|
95
95
|
override async reportHandler(payloads?: Payload[]): Promise<Payload[]> {
|
|
96
96
|
await this.started('throw')
|
|
97
|
-
const results: WithSources<
|
|
97
|
+
const results: WithSources<RebillyPaymentAuthorizationToken>[] = []
|
|
98
98
|
// Verify necessary inputs and if nothing meets our criteria, bail early
|
|
99
99
|
if (!payloads || payloads.length === 0) return results
|
|
100
100
|
const paymentCard = payloads?.find(isPaymentCard)
|
|
@@ -106,9 +106,9 @@ export class RebillyPaymentCardAuthorizationSentinel<
|
|
|
106
106
|
const data = toTokenRequest(paymentCard, billingAddress)
|
|
107
107
|
const response = await axios.post<CreateTokenResponse>(this.tokenEndpoint, data)
|
|
108
108
|
assertEx(response.status === HttpStatusCode.Created, () => `Failed to tokenize payment card: ${response.status}`)
|
|
109
|
-
const
|
|
109
|
+
const { id } = response.data
|
|
110
110
|
const sources = await PayloadBuilder.dataHashes([paymentCard, billingAddress])
|
|
111
|
-
results.push({
|
|
111
|
+
results.push({ id, schema: RebillyPaymentAuthorizationTokenSchema, sources })
|
|
112
112
|
} catch (error) {
|
|
113
113
|
this.logger?.error?.(`${moduleName}: Error creating payment token: ${error}`)
|
|
114
114
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface RebillyApiDomainSettings {
|
|
2
|
-
/**
|
|
3
|
-
* The Rebilly domain (https://api-sandbox.rebilly.com, https://api.rebilly.com)
|
|
4
|
-
*/
|
|
5
|
-
domain: 'https://api-sandbox.rebilly.com' | 'https://api.rebilly.com';
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyApiKeySettings extends RebillyApiDomainSettings {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
}
|
|
10
|
-
export interface RebillyApiSettings extends RebillyApiDomainSettings, RebillyApiKeySettings {
|
|
11
|
-
}
|
|
12
|
-
export interface RebillyPublishableApiKeySettings extends RebillyApiDomainSettings {
|
|
13
|
-
publishableApiKey: string;
|
|
14
|
-
}
|
|
15
|
-
export interface RebillyPublishableApiSettings extends RebillyApiDomainSettings, RebillyPublishableApiKeySettings {
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=RebillyApiSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyApiSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyApiSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,iCAAiC,GAAG,yBAAyB,CAAA;CACtE;AAED,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB;IAIrE,MAAM,EAAE,MAAM,CAAA;CACf;AACD,MAAM,WAAW,kBAAmB,SAAQ,wBAAwB,EAAE,qBAAqB;CAAG;AAE9F,MAAM,WAAW,gCAAiC,SAAQ,wBAAwB;IAIhF,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,gCAAgC;CAAG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface RebillyApiDomainSettings {
|
|
2
|
-
/**
|
|
3
|
-
* The Rebilly domain (https://api-sandbox.rebilly.com, https://api.rebilly.com)
|
|
4
|
-
*/
|
|
5
|
-
domain: 'https://api-sandbox.rebilly.com' | 'https://api.rebilly.com';
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyApiKeySettings extends RebillyApiDomainSettings {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
}
|
|
10
|
-
export interface RebillyApiSettings extends RebillyApiDomainSettings, RebillyApiKeySettings {
|
|
11
|
-
}
|
|
12
|
-
export interface RebillyPublishableApiKeySettings extends RebillyApiDomainSettings {
|
|
13
|
-
publishableApiKey: string;
|
|
14
|
-
}
|
|
15
|
-
export interface RebillyPublishableApiSettings extends RebillyApiDomainSettings, RebillyPublishableApiKeySettings {
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=RebillyApiSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyApiSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyApiSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,iCAAiC,GAAG,yBAAyB,CAAA;CACtE;AAED,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB;IAIrE,MAAM,EAAE,MAAM,CAAA;CACf;AACD,MAAM,WAAW,kBAAmB,SAAQ,wBAAwB,EAAE,qBAAqB;CAAG;AAE9F,MAAM,WAAW,gCAAiC,SAAQ,wBAAwB;IAIhF,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,gCAAgC;CAAG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface RebillyApiDomainSettings {
|
|
2
|
-
/**
|
|
3
|
-
* The Rebilly domain (https://api-sandbox.rebilly.com, https://api.rebilly.com)
|
|
4
|
-
*/
|
|
5
|
-
domain: 'https://api-sandbox.rebilly.com' | 'https://api.rebilly.com';
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyApiKeySettings extends RebillyApiDomainSettings {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
}
|
|
10
|
-
export interface RebillyApiSettings extends RebillyApiDomainSettings, RebillyApiKeySettings {
|
|
11
|
-
}
|
|
12
|
-
export interface RebillyPublishableApiKeySettings extends RebillyApiDomainSettings {
|
|
13
|
-
publishableApiKey: string;
|
|
14
|
-
}
|
|
15
|
-
export interface RebillyPublishableApiSettings extends RebillyApiDomainSettings, RebillyPublishableApiKeySettings {
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=RebillyApiSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyApiSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyApiSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,iCAAiC,GAAG,yBAAyB,CAAA;CACtE;AAED,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB;IAIrE,MAAM,EAAE,MAAM,CAAA;CACf;AACD,MAAM,WAAW,kBAAmB,SAAQ,wBAAwB,EAAE,qBAAqB;CAAG;AAE9F,MAAM,WAAW,gCAAiC,SAAQ,wBAAwB;IAIhF,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,gCAAgC;CAAG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface RebillyUserEmailSettings {
|
|
2
|
-
/**
|
|
3
|
-
* Email associated with Rebilly account
|
|
4
|
-
*/
|
|
5
|
-
email: string;
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyUserPasswordSettings extends RebillyUserEmailSettings {
|
|
8
|
-
/**
|
|
9
|
-
* Password associated with Rebilly account
|
|
10
|
-
*/
|
|
11
|
-
password: string;
|
|
12
|
-
}
|
|
13
|
-
export interface RebillyAuthSettings extends RebillyUserEmailSettings, RebillyUserPasswordSettings {
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=RebillyAuthSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyAuthSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyAuthSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;IAC3E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB,EAAE,2BAA2B;CAAG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface RebillyUserEmailSettings {
|
|
2
|
-
/**
|
|
3
|
-
* Email associated with Rebilly account
|
|
4
|
-
*/
|
|
5
|
-
email: string;
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyUserPasswordSettings extends RebillyUserEmailSettings {
|
|
8
|
-
/**
|
|
9
|
-
* Password associated with Rebilly account
|
|
10
|
-
*/
|
|
11
|
-
password: string;
|
|
12
|
-
}
|
|
13
|
-
export interface RebillyAuthSettings extends RebillyUserEmailSettings, RebillyUserPasswordSettings {
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=RebillyAuthSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyAuthSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyAuthSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;IAC3E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB,EAAE,2BAA2B;CAAG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface RebillyUserEmailSettings {
|
|
2
|
-
/**
|
|
3
|
-
* Email associated with Rebilly account
|
|
4
|
-
*/
|
|
5
|
-
email: string;
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyUserPasswordSettings extends RebillyUserEmailSettings {
|
|
8
|
-
/**
|
|
9
|
-
* Password associated with Rebilly account
|
|
10
|
-
*/
|
|
11
|
-
password: string;
|
|
12
|
-
}
|
|
13
|
-
export interface RebillyAuthSettings extends RebillyUserEmailSettings, RebillyUserPasswordSettings {
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=RebillyAuthSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyAuthSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyAuthSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;IAC3E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB,EAAE,2BAA2B;CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyOrganizationSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyOrganizationSettings.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyOrganizationSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyOrganizationSettings.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyOrganizationSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyOrganizationSettings.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface RebillyApiDomainSettings {
|
|
2
|
-
/**
|
|
3
|
-
* The Rebilly domain (https://api-sandbox.rebilly.com, https://api.rebilly.com)
|
|
4
|
-
*/
|
|
5
|
-
domain: 'https://api-sandbox.rebilly.com' | 'https://api.rebilly.com';
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyApiKeySettings extends RebillyApiDomainSettings {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
}
|
|
10
|
-
export interface RebillyApiSettings extends RebillyApiDomainSettings, RebillyApiKeySettings {
|
|
11
|
-
}
|
|
12
|
-
export interface RebillyPublishableApiKeySettings extends RebillyApiDomainSettings {
|
|
13
|
-
publishableApiKey: string;
|
|
14
|
-
}
|
|
15
|
-
export interface RebillyPublishableApiSettings extends RebillyApiDomainSettings, RebillyPublishableApiKeySettings {
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=RebillyApiSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyApiSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyApiSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,iCAAiC,GAAG,yBAAyB,CAAA;CACtE;AAED,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB;IAIrE,MAAM,EAAE,MAAM,CAAA;CACf;AACD,MAAM,WAAW,kBAAmB,SAAQ,wBAAwB,EAAE,qBAAqB;CAAG;AAE9F,MAAM,WAAW,gCAAiC,SAAQ,wBAAwB;IAIhF,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,gCAAgC;CAAG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface RebillyApiDomainSettings {
|
|
2
|
-
/**
|
|
3
|
-
* The Rebilly domain (https://api-sandbox.rebilly.com, https://api.rebilly.com)
|
|
4
|
-
*/
|
|
5
|
-
domain: 'https://api-sandbox.rebilly.com' | 'https://api.rebilly.com';
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyApiKeySettings extends RebillyApiDomainSettings {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
}
|
|
10
|
-
export interface RebillyApiSettings extends RebillyApiDomainSettings, RebillyApiKeySettings {
|
|
11
|
-
}
|
|
12
|
-
export interface RebillyPublishableApiKeySettings extends RebillyApiDomainSettings {
|
|
13
|
-
publishableApiKey: string;
|
|
14
|
-
}
|
|
15
|
-
export interface RebillyPublishableApiSettings extends RebillyApiDomainSettings, RebillyPublishableApiKeySettings {
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=RebillyApiSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyApiSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyApiSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,iCAAiC,GAAG,yBAAyB,CAAA;CACtE;AAED,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB;IAIrE,MAAM,EAAE,MAAM,CAAA;CACf;AACD,MAAM,WAAW,kBAAmB,SAAQ,wBAAwB,EAAE,qBAAqB;CAAG;AAE9F,MAAM,WAAW,gCAAiC,SAAQ,wBAAwB;IAIhF,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,gCAAgC;CAAG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface RebillyApiDomainSettings {
|
|
2
|
-
/**
|
|
3
|
-
* The Rebilly domain (https://api-sandbox.rebilly.com, https://api.rebilly.com)
|
|
4
|
-
*/
|
|
5
|
-
domain: 'https://api-sandbox.rebilly.com' | 'https://api.rebilly.com';
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyApiKeySettings extends RebillyApiDomainSettings {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
}
|
|
10
|
-
export interface RebillyApiSettings extends RebillyApiDomainSettings, RebillyApiKeySettings {
|
|
11
|
-
}
|
|
12
|
-
export interface RebillyPublishableApiKeySettings extends RebillyApiDomainSettings {
|
|
13
|
-
publishableApiKey: string;
|
|
14
|
-
}
|
|
15
|
-
export interface RebillyPublishableApiSettings extends RebillyApiDomainSettings, RebillyPublishableApiKeySettings {
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=RebillyApiSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyApiSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyApiSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,iCAAiC,GAAG,yBAAyB,CAAA;CACtE;AAED,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB;IAIrE,MAAM,EAAE,MAAM,CAAA;CACf;AACD,MAAM,WAAW,kBAAmB,SAAQ,wBAAwB,EAAE,qBAAqB;CAAG;AAE9F,MAAM,WAAW,gCAAiC,SAAQ,wBAAwB;IAIhF,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,gCAAgC;CAAG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface RebillyUserEmailSettings {
|
|
2
|
-
/**
|
|
3
|
-
* Email associated with Rebilly account
|
|
4
|
-
*/
|
|
5
|
-
email: string;
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyUserPasswordSettings extends RebillyUserEmailSettings {
|
|
8
|
-
/**
|
|
9
|
-
* Password associated with Rebilly account
|
|
10
|
-
*/
|
|
11
|
-
password: string;
|
|
12
|
-
}
|
|
13
|
-
export interface RebillyAuthSettings extends RebillyUserEmailSettings, RebillyUserPasswordSettings {
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=RebillyAuthSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyAuthSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyAuthSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;IAC3E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB,EAAE,2BAA2B;CAAG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface RebillyUserEmailSettings {
|
|
2
|
-
/**
|
|
3
|
-
* Email associated with Rebilly account
|
|
4
|
-
*/
|
|
5
|
-
email: string;
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyUserPasswordSettings extends RebillyUserEmailSettings {
|
|
8
|
-
/**
|
|
9
|
-
* Password associated with Rebilly account
|
|
10
|
-
*/
|
|
11
|
-
password: string;
|
|
12
|
-
}
|
|
13
|
-
export interface RebillyAuthSettings extends RebillyUserEmailSettings, RebillyUserPasswordSettings {
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=RebillyAuthSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyAuthSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyAuthSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;IAC3E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB,EAAE,2BAA2B;CAAG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface RebillyUserEmailSettings {
|
|
2
|
-
/**
|
|
3
|
-
* Email associated with Rebilly account
|
|
4
|
-
*/
|
|
5
|
-
email: string;
|
|
6
|
-
}
|
|
7
|
-
export interface RebillyUserPasswordSettings extends RebillyUserEmailSettings {
|
|
8
|
-
/**
|
|
9
|
-
* Password associated with Rebilly account
|
|
10
|
-
*/
|
|
11
|
-
password: string;
|
|
12
|
-
}
|
|
13
|
-
export interface RebillyAuthSettings extends RebillyUserEmailSettings, RebillyUserPasswordSettings {
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=RebillyAuthSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyAuthSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyAuthSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;IAC3E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB,EAAE,2BAA2B;CAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyOrganizationSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyOrganizationSettings.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyOrganizationSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyOrganizationSettings.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RebillyOrganizationSettings.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/RebillyOrganizationSettings.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RebillyProviderSettings/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA"}
|