@xyo-network/rebilly-payment-card-authorization-plugin 2.99.5 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/neutral/index.d.ts +39 -5
  2. package/dist/neutral/index.mjs +34 -54
  3. package/dist/neutral/index.mjs.map +1 -1
  4. package/package.json +19 -37
  5. package/src/Sentinel.ts +2 -1
  6. package/xy.config.ts +4 -5
  7. package/dist/browser/Api/PaymentCardToken/Request.d.cts +0 -38
  8. package/dist/browser/Api/PaymentCardToken/Request.d.cts.map +0 -1
  9. package/dist/browser/Api/PaymentCardToken/Request.d.mts +0 -38
  10. package/dist/browser/Api/PaymentCardToken/Request.d.mts.map +0 -1
  11. package/dist/browser/Api/PaymentCardToken/Request.d.ts +0 -38
  12. package/dist/browser/Api/PaymentCardToken/Request.d.ts.map +0 -1
  13. package/dist/browser/Api/PaymentCardToken/Response.d.cts +0 -36
  14. package/dist/browser/Api/PaymentCardToken/Response.d.cts.map +0 -1
  15. package/dist/browser/Api/PaymentCardToken/Response.d.mts +0 -36
  16. package/dist/browser/Api/PaymentCardToken/Response.d.mts.map +0 -1
  17. package/dist/browser/Api/PaymentCardToken/Response.d.ts +0 -36
  18. package/dist/browser/Api/PaymentCardToken/Response.d.ts.map +0 -1
  19. package/dist/browser/Api/PaymentCardToken/index.d.cts +0 -3
  20. package/dist/browser/Api/PaymentCardToken/index.d.cts.map +0 -1
  21. package/dist/browser/Api/PaymentCardToken/index.d.mts +0 -3
  22. package/dist/browser/Api/PaymentCardToken/index.d.mts.map +0 -1
  23. package/dist/browser/Api/PaymentCardToken/index.d.ts +0 -3
  24. package/dist/browser/Api/PaymentCardToken/index.d.ts.map +0 -1
  25. package/dist/browser/Api/index.d.cts +0 -2
  26. package/dist/browser/Api/index.d.cts.map +0 -1
  27. package/dist/browser/Api/index.d.mts +0 -2
  28. package/dist/browser/Api/index.d.mts.map +0 -1
  29. package/dist/browser/Api/index.d.ts +0 -2
  30. package/dist/browser/Api/index.d.ts.map +0 -1
  31. package/dist/browser/Config.d.cts +0 -8
  32. package/dist/browser/Config.d.cts.map +0 -1
  33. package/dist/browser/Config.d.mts +0 -8
  34. package/dist/browser/Config.d.mts.map +0 -1
  35. package/dist/browser/Config.d.ts +0 -8
  36. package/dist/browser/Config.d.ts.map +0 -1
  37. package/dist/browser/Params.d.cts +0 -7
  38. package/dist/browser/Params.d.cts.map +0 -1
  39. package/dist/browser/Params.d.mts +0 -7
  40. package/dist/browser/Params.d.mts.map +0 -1
  41. package/dist/browser/Params.d.ts +0 -7
  42. package/dist/browser/Params.d.ts.map +0 -1
  43. package/dist/browser/Schema.d.cts +0 -3
  44. package/dist/browser/Schema.d.cts.map +0 -1
  45. package/dist/browser/Schema.d.mts +0 -3
  46. package/dist/browser/Schema.d.mts.map +0 -1
  47. package/dist/browser/Schema.d.ts +0 -3
  48. package/dist/browser/Schema.d.ts.map +0 -1
  49. package/dist/browser/Sentinel.d.cts +0 -24
  50. package/dist/browser/Sentinel.d.cts.map +0 -1
  51. package/dist/browser/Sentinel.d.mts +0 -24
  52. package/dist/browser/Sentinel.d.mts.map +0 -1
  53. package/dist/browser/Sentinel.d.ts +0 -24
  54. package/dist/browser/Sentinel.d.ts.map +0 -1
  55. package/dist/browser/index.cjs +0 -163
  56. package/dist/browser/index.cjs.map +0 -1
  57. package/dist/browser/index.d.cts +0 -5
  58. package/dist/browser/index.d.cts.map +0 -1
  59. package/dist/browser/index.d.mts +0 -5
  60. package/dist/browser/index.d.mts.map +0 -1
  61. package/dist/browser/index.d.ts +0 -5
  62. package/dist/browser/index.d.ts.map +0 -1
  63. package/dist/browser/index.mjs +0 -142
  64. package/dist/browser/index.mjs.map +0 -1
  65. package/dist/browser/util/index.d.cts +0 -2
  66. package/dist/browser/util/index.d.cts.map +0 -1
  67. package/dist/browser/util/index.d.mts +0 -2
  68. package/dist/browser/util/index.d.mts.map +0 -1
  69. package/dist/browser/util/index.d.ts +0 -2
  70. package/dist/browser/util/index.d.ts.map +0 -1
  71. package/dist/browser/util/toTokenRequest.d.cts +0 -4
  72. package/dist/browser/util/toTokenRequest.d.cts.map +0 -1
  73. package/dist/browser/util/toTokenRequest.d.mts +0 -4
  74. package/dist/browser/util/toTokenRequest.d.mts.map +0 -1
  75. package/dist/browser/util/toTokenRequest.d.ts +0 -4
  76. package/dist/browser/util/toTokenRequest.d.ts.map +0 -1
  77. package/dist/neutral/Api/PaymentCardToken/Request.d.cts +0 -38
  78. package/dist/neutral/Api/PaymentCardToken/Request.d.cts.map +0 -1
  79. package/dist/neutral/Api/PaymentCardToken/Request.d.mts +0 -38
  80. package/dist/neutral/Api/PaymentCardToken/Request.d.mts.map +0 -1
  81. package/dist/neutral/Api/PaymentCardToken/Request.d.ts +0 -38
  82. package/dist/neutral/Api/PaymentCardToken/Request.d.ts.map +0 -1
  83. package/dist/neutral/Api/PaymentCardToken/Response.d.cts +0 -36
  84. package/dist/neutral/Api/PaymentCardToken/Response.d.cts.map +0 -1
  85. package/dist/neutral/Api/PaymentCardToken/Response.d.mts +0 -36
  86. package/dist/neutral/Api/PaymentCardToken/Response.d.mts.map +0 -1
  87. package/dist/neutral/Api/PaymentCardToken/Response.d.ts +0 -36
  88. package/dist/neutral/Api/PaymentCardToken/Response.d.ts.map +0 -1
  89. package/dist/neutral/Api/PaymentCardToken/index.d.cts +0 -3
  90. package/dist/neutral/Api/PaymentCardToken/index.d.cts.map +0 -1
  91. package/dist/neutral/Api/PaymentCardToken/index.d.mts +0 -3
  92. package/dist/neutral/Api/PaymentCardToken/index.d.mts.map +0 -1
  93. package/dist/neutral/Api/PaymentCardToken/index.d.ts +0 -3
  94. package/dist/neutral/Api/PaymentCardToken/index.d.ts.map +0 -1
  95. package/dist/neutral/Api/index.d.cts +0 -2
  96. package/dist/neutral/Api/index.d.cts.map +0 -1
  97. package/dist/neutral/Api/index.d.mts +0 -2
  98. package/dist/neutral/Api/index.d.mts.map +0 -1
  99. package/dist/neutral/Api/index.d.ts +0 -2
  100. package/dist/neutral/Api/index.d.ts.map +0 -1
  101. package/dist/neutral/Config.d.cts +0 -8
  102. package/dist/neutral/Config.d.cts.map +0 -1
  103. package/dist/neutral/Config.d.mts +0 -8
  104. package/dist/neutral/Config.d.mts.map +0 -1
  105. package/dist/neutral/Config.d.ts +0 -8
  106. package/dist/neutral/Config.d.ts.map +0 -1
  107. package/dist/neutral/Params.d.cts +0 -7
  108. package/dist/neutral/Params.d.cts.map +0 -1
  109. package/dist/neutral/Params.d.mts +0 -7
  110. package/dist/neutral/Params.d.mts.map +0 -1
  111. package/dist/neutral/Params.d.ts +0 -7
  112. package/dist/neutral/Params.d.ts.map +0 -1
  113. package/dist/neutral/Schema.d.cts +0 -3
  114. package/dist/neutral/Schema.d.cts.map +0 -1
  115. package/dist/neutral/Schema.d.mts +0 -3
  116. package/dist/neutral/Schema.d.mts.map +0 -1
  117. package/dist/neutral/Schema.d.ts +0 -3
  118. package/dist/neutral/Schema.d.ts.map +0 -1
  119. package/dist/neutral/Sentinel.d.cts +0 -24
  120. package/dist/neutral/Sentinel.d.cts.map +0 -1
  121. package/dist/neutral/Sentinel.d.mts +0 -24
  122. package/dist/neutral/Sentinel.d.mts.map +0 -1
  123. package/dist/neutral/Sentinel.d.ts +0 -24
  124. package/dist/neutral/Sentinel.d.ts.map +0 -1
  125. package/dist/neutral/index.cjs +0 -163
  126. package/dist/neutral/index.cjs.map +0 -1
  127. package/dist/neutral/index.d.cts +0 -5
  128. package/dist/neutral/index.d.cts.map +0 -1
  129. package/dist/neutral/index.d.mts +0 -5
  130. package/dist/neutral/index.d.mts.map +0 -1
  131. package/dist/neutral/index.d.ts.map +0 -1
  132. package/dist/neutral/util/index.d.cts +0 -2
  133. package/dist/neutral/util/index.d.cts.map +0 -1
  134. package/dist/neutral/util/index.d.mts +0 -2
  135. package/dist/neutral/util/index.d.mts.map +0 -1
  136. package/dist/neutral/util/index.d.ts +0 -2
  137. package/dist/neutral/util/index.d.ts.map +0 -1
  138. package/dist/neutral/util/toTokenRequest.d.cts +0 -4
  139. package/dist/neutral/util/toTokenRequest.d.cts.map +0 -1
  140. package/dist/neutral/util/toTokenRequest.d.mts +0 -4
  141. package/dist/neutral/util/toTokenRequest.d.mts.map +0 -1
  142. package/dist/neutral/util/toTokenRequest.d.ts +0 -4
  143. package/dist/neutral/util/toTokenRequest.d.ts.map +0 -1
  144. package/dist/node/Api/PaymentCardToken/Request.d.cts +0 -38
  145. package/dist/node/Api/PaymentCardToken/Request.d.cts.map +0 -1
  146. package/dist/node/Api/PaymentCardToken/Request.d.mts +0 -38
  147. package/dist/node/Api/PaymentCardToken/Request.d.mts.map +0 -1
  148. package/dist/node/Api/PaymentCardToken/Request.d.ts +0 -38
  149. package/dist/node/Api/PaymentCardToken/Request.d.ts.map +0 -1
  150. package/dist/node/Api/PaymentCardToken/Response.d.cts +0 -36
  151. package/dist/node/Api/PaymentCardToken/Response.d.cts.map +0 -1
  152. package/dist/node/Api/PaymentCardToken/Response.d.mts +0 -36
  153. package/dist/node/Api/PaymentCardToken/Response.d.mts.map +0 -1
  154. package/dist/node/Api/PaymentCardToken/Response.d.ts +0 -36
  155. package/dist/node/Api/PaymentCardToken/Response.d.ts.map +0 -1
  156. package/dist/node/Api/PaymentCardToken/index.d.cts +0 -3
  157. package/dist/node/Api/PaymentCardToken/index.d.cts.map +0 -1
  158. package/dist/node/Api/PaymentCardToken/index.d.mts +0 -3
  159. package/dist/node/Api/PaymentCardToken/index.d.mts.map +0 -1
  160. package/dist/node/Api/PaymentCardToken/index.d.ts +0 -3
  161. package/dist/node/Api/PaymentCardToken/index.d.ts.map +0 -1
  162. package/dist/node/Api/index.d.cts +0 -2
  163. package/dist/node/Api/index.d.cts.map +0 -1
  164. package/dist/node/Api/index.d.mts +0 -2
  165. package/dist/node/Api/index.d.mts.map +0 -1
  166. package/dist/node/Api/index.d.ts +0 -2
  167. package/dist/node/Api/index.d.ts.map +0 -1
  168. package/dist/node/Config.d.cts +0 -8
  169. package/dist/node/Config.d.cts.map +0 -1
  170. package/dist/node/Config.d.mts +0 -8
  171. package/dist/node/Config.d.mts.map +0 -1
  172. package/dist/node/Config.d.ts +0 -8
  173. package/dist/node/Config.d.ts.map +0 -1
  174. package/dist/node/Params.d.cts +0 -7
  175. package/dist/node/Params.d.cts.map +0 -1
  176. package/dist/node/Params.d.mts +0 -7
  177. package/dist/node/Params.d.mts.map +0 -1
  178. package/dist/node/Params.d.ts +0 -7
  179. package/dist/node/Params.d.ts.map +0 -1
  180. package/dist/node/Schema.d.cts +0 -3
  181. package/dist/node/Schema.d.cts.map +0 -1
  182. package/dist/node/Schema.d.mts +0 -3
  183. package/dist/node/Schema.d.mts.map +0 -1
  184. package/dist/node/Schema.d.ts +0 -3
  185. package/dist/node/Schema.d.ts.map +0 -1
  186. package/dist/node/Sentinel.d.cts +0 -24
  187. package/dist/node/Sentinel.d.cts.map +0 -1
  188. package/dist/node/Sentinel.d.mts +0 -24
  189. package/dist/node/Sentinel.d.mts.map +0 -1
  190. package/dist/node/Sentinel.d.ts +0 -24
  191. package/dist/node/Sentinel.d.ts.map +0 -1
  192. package/dist/node/index.cjs +0 -171
  193. package/dist/node/index.cjs.map +0 -1
  194. package/dist/node/index.d.cts +0 -5
  195. package/dist/node/index.d.cts.map +0 -1
  196. package/dist/node/index.d.mts +0 -5
  197. package/dist/node/index.d.mts.map +0 -1
  198. package/dist/node/index.d.ts +0 -5
  199. package/dist/node/index.d.ts.map +0 -1
  200. package/dist/node/index.mjs +0 -144
  201. package/dist/node/index.mjs.map +0 -1
  202. package/dist/node/util/index.d.cts +0 -2
  203. package/dist/node/util/index.d.cts.map +0 -1
  204. package/dist/node/util/index.d.mts +0 -2
  205. package/dist/node/util/index.d.mts.map +0 -1
  206. package/dist/node/util/index.d.ts +0 -2
  207. package/dist/node/util/index.d.ts.map +0 -1
  208. package/dist/node/util/toTokenRequest.d.cts +0 -4
  209. package/dist/node/util/toTokenRequest.d.cts.map +0 -1
  210. package/dist/node/util/toTokenRequest.d.mts +0 -4
  211. package/dist/node/util/toTokenRequest.d.mts.map +0 -1
  212. package/dist/node/util/toTokenRequest.d.ts +0 -4
  213. package/dist/node/util/toTokenRequest.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Api/PaymentCardToken/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './Request.ts';
2
- export * from './Response.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Api/PaymentCardToken/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './PaymentCardToken/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './PaymentCardToken/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './PaymentCardToken/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA"}
@@ -1,8 +0,0 @@
1
- import { RebillyApiDomainSettings } from '@xyo-network/rebilly-payment-payload-plugin';
2
- import { SentinelConfig } from '@xyo-network/sentinel-model';
3
- export declare const RebillyPaymentCardAuthorizationSentinelConfigSchema = "network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly.config";
4
- export type RebillyPaymentCardAuthorizationSentinelConfigSchema = typeof RebillyPaymentCardAuthorizationSentinelConfigSchema;
5
- export type RebillyPaymentCardAuthorizationSentinelConfig = SentinelConfig<{
6
- schema: RebillyPaymentCardAuthorizationSentinelConfigSchema;
7
- }> & Partial<RebillyApiDomainSettings>;
8
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAI5D,eAAO,MAAM,mDAAmD,uFAA4D,CAAA;AAC5H,MAAM,MAAM,mDAAmD,GAAG,OAAO,mDAAmD,CAAA;AAK5H,MAAM,MAAM,6CAA6C,GAAG,cAAc,CAAC;IAIzE,MAAM,EAAE,mDAAmD,CAAA;CAC5D,CAAC,GACF,OAAO,CAAC,wBAAwB,CAAC,CAAA"}
@@ -1,8 +0,0 @@
1
- import { RebillyApiDomainSettings } from '@xyo-network/rebilly-payment-payload-plugin';
2
- import { SentinelConfig } from '@xyo-network/sentinel-model';
3
- export declare const RebillyPaymentCardAuthorizationSentinelConfigSchema = "network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly.config";
4
- export type RebillyPaymentCardAuthorizationSentinelConfigSchema = typeof RebillyPaymentCardAuthorizationSentinelConfigSchema;
5
- export type RebillyPaymentCardAuthorizationSentinelConfig = SentinelConfig<{
6
- schema: RebillyPaymentCardAuthorizationSentinelConfigSchema;
7
- }> & Partial<RebillyApiDomainSettings>;
8
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAI5D,eAAO,MAAM,mDAAmD,uFAA4D,CAAA;AAC5H,MAAM,MAAM,mDAAmD,GAAG,OAAO,mDAAmD,CAAA;AAK5H,MAAM,MAAM,6CAA6C,GAAG,cAAc,CAAC;IAIzE,MAAM,EAAE,mDAAmD,CAAA;CAC5D,CAAC,GACF,OAAO,CAAC,wBAAwB,CAAC,CAAA"}
@@ -1,8 +0,0 @@
1
- import { RebillyApiDomainSettings } from '@xyo-network/rebilly-payment-payload-plugin';
2
- import { SentinelConfig } from '@xyo-network/sentinel-model';
3
- export declare const RebillyPaymentCardAuthorizationSentinelConfigSchema = "network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly.config";
4
- export type RebillyPaymentCardAuthorizationSentinelConfigSchema = typeof RebillyPaymentCardAuthorizationSentinelConfigSchema;
5
- export type RebillyPaymentCardAuthorizationSentinelConfig = SentinelConfig<{
6
- schema: RebillyPaymentCardAuthorizationSentinelConfigSchema;
7
- }> & Partial<RebillyApiDomainSettings>;
8
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAI5D,eAAO,MAAM,mDAAmD,uFAA4D,CAAA;AAC5H,MAAM,MAAM,mDAAmD,GAAG,OAAO,mDAAmD,CAAA;AAK5H,MAAM,MAAM,6CAA6C,GAAG,cAAc,CAAC;IAIzE,MAAM,EAAE,mDAAmD,CAAA;CAC5D,CAAC,GACF,OAAO,CAAC,wBAAwB,CAAC,CAAA"}
@@ -1,7 +0,0 @@
1
- import { AnyConfigSchema } from '@xyo-network/module-model';
2
- import { RebillyOrganizationSettings, RebillyPublishableApiSettings } from '@xyo-network/rebilly-payment-payload-plugin';
3
- import { SentinelParams } from '@xyo-network/sentinel-model';
4
- import { RebillyPaymentCardAuthorizationSentinelConfig } from './Config.ts';
5
- export type RebillyPaymentCardAuthorizationParams = Partial<RebillyPublishableApiSettings & RebillyOrganizationSettings>;
6
- export type RebillyPaymentCardAuthorizationSentinelParams<TConfig extends AnyConfigSchema<RebillyPaymentCardAuthorizationSentinelConfig> = AnyConfigSchema<RebillyPaymentCardAuthorizationSentinelConfig>, TParams extends RebillyPaymentCardAuthorizationParams = RebillyPaymentCardAuthorizationParams> = SentinelParams<TConfig, TParams>;
7
- //# sourceMappingURL=Params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAA;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,OAAO,EAAE,6CAA6C,EAAE,MAAM,aAAa,CAAA;AAE3E,MAAM,MAAM,qCAAqC,GAAG,OAAO,CAAC,6BAA6B,GAAG,2BAA2B,CAAC,CAAA;AAExH,MAAM,MAAM,6CAA6C,CACvD,OAAO,SAAS,eAAe,CAAC,6CAA6C,CAAC,GAAG,eAAe,CAAC,6CAA6C,CAAC,EAC/I,OAAO,SAAS,qCAAqC,GAAG,qCAAqC,IAC3F,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA"}
@@ -1,7 +0,0 @@
1
- import { AnyConfigSchema } from '@xyo-network/module-model';
2
- import { RebillyOrganizationSettings, RebillyPublishableApiSettings } from '@xyo-network/rebilly-payment-payload-plugin';
3
- import { SentinelParams } from '@xyo-network/sentinel-model';
4
- import { RebillyPaymentCardAuthorizationSentinelConfig } from './Config.ts';
5
- export type RebillyPaymentCardAuthorizationParams = Partial<RebillyPublishableApiSettings & RebillyOrganizationSettings>;
6
- export type RebillyPaymentCardAuthorizationSentinelParams<TConfig extends AnyConfigSchema<RebillyPaymentCardAuthorizationSentinelConfig> = AnyConfigSchema<RebillyPaymentCardAuthorizationSentinelConfig>, TParams extends RebillyPaymentCardAuthorizationParams = RebillyPaymentCardAuthorizationParams> = SentinelParams<TConfig, TParams>;
7
- //# sourceMappingURL=Params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAA;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,OAAO,EAAE,6CAA6C,EAAE,MAAM,aAAa,CAAA;AAE3E,MAAM,MAAM,qCAAqC,GAAG,OAAO,CAAC,6BAA6B,GAAG,2BAA2B,CAAC,CAAA;AAExH,MAAM,MAAM,6CAA6C,CACvD,OAAO,SAAS,eAAe,CAAC,6CAA6C,CAAC,GAAG,eAAe,CAAC,6CAA6C,CAAC,EAC/I,OAAO,SAAS,qCAAqC,GAAG,qCAAqC,IAC3F,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA"}
@@ -1,7 +0,0 @@
1
- import { AnyConfigSchema } from '@xyo-network/module-model';
2
- import { RebillyOrganizationSettings, RebillyPublishableApiSettings } from '@xyo-network/rebilly-payment-payload-plugin';
3
- import { SentinelParams } from '@xyo-network/sentinel-model';
4
- import { RebillyPaymentCardAuthorizationSentinelConfig } from './Config.ts';
5
- export type RebillyPaymentCardAuthorizationParams = Partial<RebillyPublishableApiSettings & RebillyOrganizationSettings>;
6
- export type RebillyPaymentCardAuthorizationSentinelParams<TConfig extends AnyConfigSchema<RebillyPaymentCardAuthorizationSentinelConfig> = AnyConfigSchema<RebillyPaymentCardAuthorizationSentinelConfig>, TParams extends RebillyPaymentCardAuthorizationParams = RebillyPaymentCardAuthorizationParams> = SentinelParams<TConfig, TParams>;
7
- //# sourceMappingURL=Params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAA;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,OAAO,EAAE,6CAA6C,EAAE,MAAM,aAAa,CAAA;AAE3E,MAAM,MAAM,qCAAqC,GAAG,OAAO,CAAC,6BAA6B,GAAG,2BAA2B,CAAC,CAAA;AAExH,MAAM,MAAM,6CAA6C,CACvD,OAAO,SAAS,eAAe,CAAC,6CAA6C,CAAC,GAAG,eAAe,CAAC,6CAA6C,CAAC,EAC/I,OAAO,SAAS,qCAAqC,GAAG,qCAAqC,IAC3F,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const RebillyPaymentCardAuthorizationSentinelSchema = "network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly";
2
- export type RebillyPaymentCardAuthorizationSentinelSchema = typeof RebillyPaymentCardAuthorizationSentinelSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6CAA6C,gFAAgF,CAAA;AAC1I,MAAM,MAAM,6CAA6C,GAAG,OAAO,6CAA6C,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const RebillyPaymentCardAuthorizationSentinelSchema = "network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly";
2
- export type RebillyPaymentCardAuthorizationSentinelSchema = typeof RebillyPaymentCardAuthorizationSentinelSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6CAA6C,gFAAgF,CAAA;AAC1I,MAAM,MAAM,6CAA6C,GAAG,OAAO,6CAA6C,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const RebillyPaymentCardAuthorizationSentinelSchema = "network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly";
2
- export type RebillyPaymentCardAuthorizationSentinelSchema = typeof RebillyPaymentCardAuthorizationSentinelSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6CAA6C,gFAAgF,CAAA;AAC1I,MAAM,MAAM,6CAA6C,GAAG,OAAO,6CAA6C,CAAA"}
@@ -1,24 +0,0 @@
1
- import { AxiosRequestConfig } from '@xylabs/axios';
2
- import { Payload } from '@xyo-network/payload-model';
3
- import { AbstractSentinel } from '@xyo-network/sentinel-abstract';
4
- import { SentinelInstance, SentinelModuleEventData } from '@xyo-network/sentinel-model';
5
- import { RebillyPaymentCardAuthorizationSentinelParams } from './Params.ts';
6
- export declare class RebillyPaymentCardAuthorizationSentinel<TParams extends RebillyPaymentCardAuthorizationSentinelParams = RebillyPaymentCardAuthorizationSentinelParams, TEventData extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>> extends AbstractSentinel<TParams, TEventData> {
7
- static configSchemas: string[];
8
- static defaultConfigSchema: string;
9
- protected _apiRoot: string | undefined;
10
- protected _domain: string | undefined;
11
- protected _headers: AxiosRequestConfig['headers'] | undefined;
12
- protected _organizationId: string | undefined;
13
- protected _publishableApiKey: string | undefined;
14
- protected _tokenEndpoint: string | undefined;
15
- protected get apiRoot(): string;
16
- protected get domain(): string;
17
- protected get headers(): AxiosRequestConfig['headers'];
18
- protected get isSandboxEnvironment(): boolean;
19
- protected get organizationId(): string;
20
- protected get publishableApiKey(): string;
21
- protected get tokenEndpoint(): string;
22
- reportHandler(payloads?: Payload[]): Promise<Payload[]>;
23
- }
24
- //# sourceMappingURL=Sentinel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Sentinel.d.ts","sourceRoot":"","sources":["../../src/Sentinel.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,kBAAkB,EAAkB,MAAM,eAAe,CAAA;AAE7E,OAAO,EAAE,OAAO,EAAe,MAAM,4BAA4B,CAAA;AAGjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAIvF,OAAO,EAAE,6CAA6C,EAAE,MAAM,aAAa,CAAA;AAS3E,qBAAa,uCAAuC,CAClD,OAAO,SAAS,6CAA6C,GAAG,6CAA6C,EAC7G,UAAU,SAAS,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAC1H,SAAQ,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7C,OAAgB,aAAa,WAAwD;IACrF,OAAgB,mBAAmB,SAAsD;IAEzF,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAY;IAClD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAY;IACjD,SAAS,CAAC,QAAQ,EAAE,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAY;IACzE,SAAS,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAY;IACzD,SAAS,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAY;IAC5D,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAY;IAKxD,SAAS,KAAK,OAAO,WAGpB;IAKD,SAAS,KAAK,MAAM,WAGnB;IAKD,SAAS,KAAK,OAAO,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAGrD;IAKD,SAAS,KAAK,oBAAoB,IAAI,OAAO,CAE5C;IAKD,SAAS,KAAK,cAAc,WAO3B;IAKD,SAAS,KAAK,iBAAiB,IAAI,MAAM,CAIxC;IAKD,SAAS,KAAK,aAAa,WAG1B;IAEc,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAsBvE"}
@@ -1,24 +0,0 @@
1
- import { AxiosRequestConfig } from '@xylabs/axios';
2
- import { Payload } from '@xyo-network/payload-model';
3
- import { AbstractSentinel } from '@xyo-network/sentinel-abstract';
4
- import { SentinelInstance, SentinelModuleEventData } from '@xyo-network/sentinel-model';
5
- import { RebillyPaymentCardAuthorizationSentinelParams } from './Params.ts';
6
- export declare class RebillyPaymentCardAuthorizationSentinel<TParams extends RebillyPaymentCardAuthorizationSentinelParams = RebillyPaymentCardAuthorizationSentinelParams, TEventData extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>> extends AbstractSentinel<TParams, TEventData> {
7
- static configSchemas: string[];
8
- static defaultConfigSchema: string;
9
- protected _apiRoot: string | undefined;
10
- protected _domain: string | undefined;
11
- protected _headers: AxiosRequestConfig['headers'] | undefined;
12
- protected _organizationId: string | undefined;
13
- protected _publishableApiKey: string | undefined;
14
- protected _tokenEndpoint: string | undefined;
15
- protected get apiRoot(): string;
16
- protected get domain(): string;
17
- protected get headers(): AxiosRequestConfig['headers'];
18
- protected get isSandboxEnvironment(): boolean;
19
- protected get organizationId(): string;
20
- protected get publishableApiKey(): string;
21
- protected get tokenEndpoint(): string;
22
- reportHandler(payloads?: Payload[]): Promise<Payload[]>;
23
- }
24
- //# sourceMappingURL=Sentinel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Sentinel.d.ts","sourceRoot":"","sources":["../../src/Sentinel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,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAsBvE"}
@@ -1,24 +0,0 @@
1
- import { AxiosRequestConfig } from '@xylabs/axios';
2
- import { Payload } from '@xyo-network/payload-model';
3
- import { AbstractSentinel } from '@xyo-network/sentinel-abstract';
4
- import { SentinelInstance, SentinelModuleEventData } from '@xyo-network/sentinel-model';
5
- import { RebillyPaymentCardAuthorizationSentinelParams } from './Params.ts';
6
- export declare class RebillyPaymentCardAuthorizationSentinel<TParams extends RebillyPaymentCardAuthorizationSentinelParams = RebillyPaymentCardAuthorizationSentinelParams, TEventData extends SentinelModuleEventData<SentinelInstance<TParams>> = SentinelModuleEventData<SentinelInstance<TParams>>> extends AbstractSentinel<TParams, TEventData> {
7
- static configSchemas: string[];
8
- static defaultConfigSchema: string;
9
- protected _apiRoot: string | undefined;
10
- protected _domain: string | undefined;
11
- protected _headers: AxiosRequestConfig['headers'] | undefined;
12
- protected _organizationId: string | undefined;
13
- protected _publishableApiKey: string | undefined;
14
- protected _tokenEndpoint: string | undefined;
15
- protected get apiRoot(): string;
16
- protected get domain(): string;
17
- protected get headers(): AxiosRequestConfig['headers'];
18
- protected get isSandboxEnvironment(): boolean;
19
- protected get organizationId(): string;
20
- protected get publishableApiKey(): string;
21
- protected get tokenEndpoint(): string;
22
- reportHandler(payloads?: Payload[]): Promise<Payload[]>;
23
- }
24
- //# sourceMappingURL=Sentinel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Sentinel.d.ts","sourceRoot":"","sources":["../../src/Sentinel.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,kBAAkB,EAAkB,MAAM,eAAe,CAAA;AAE7E,OAAO,EAAE,OAAO,EAAe,MAAM,4BAA4B,CAAA;AAGjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAIvF,OAAO,EAAE,6CAA6C,EAAE,MAAM,aAAa,CAAA;AAS3E,qBAAa,uCAAuC,CAClD,OAAO,SAAS,6CAA6C,GAAG,6CAA6C,EAC7G,UAAU,SAAS,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAC1H,SAAQ,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7C,OAAgB,aAAa,WAAwD;IACrF,OAAgB,mBAAmB,SAAsD;IAEzF,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAY;IAClD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAY;IACjD,SAAS,CAAC,QAAQ,EAAE,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAY;IACzE,SAAS,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAY;IACzD,SAAS,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAY;IAC5D,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAY;IAKxD,SAAS,KAAK,OAAO,WAGpB;IAKD,SAAS,KAAK,MAAM,WAGnB;IAKD,SAAS,KAAK,OAAO,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAGrD;IAKD,SAAS,KAAK,oBAAoB,IAAI,OAAO,CAE5C;IAKD,SAAS,KAAK,cAAc,WAO3B;IAKD,SAAS,KAAK,iBAAiB,IAAI,MAAM,CAIxC;IAKD,SAAS,KAAK,aAAa,WAG1B;IAEc,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAsBvE"}
@@ -1,163 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- RebillyPaymentCardAuthorizationSentinel: () => RebillyPaymentCardAuthorizationSentinel,
25
- RebillyPaymentCardAuthorizationSentinelConfigSchema: () => RebillyPaymentCardAuthorizationSentinelConfigSchema,
26
- RebillyPaymentCardAuthorizationSentinelSchema: () => RebillyPaymentCardAuthorizationSentinelSchema
27
- });
28
- module.exports = __toCommonJS(src_exports);
29
-
30
- // src/Schema.ts
31
- var RebillyPaymentCardAuthorizationSentinelSchema = "network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly";
32
-
33
- // src/Config.ts
34
- var RebillyPaymentCardAuthorizationSentinelConfigSchema = `${RebillyPaymentCardAuthorizationSentinelSchema}.config`;
35
-
36
- // src/Sentinel.ts
37
- var import_assert = require("@xylabs/assert");
38
- var import_axios = require("@xylabs/axios");
39
- var import_payload_builder = require("@xyo-network/payload-builder");
40
- var import_payment_payload_plugins = require("@xyo-network/payment-payload-plugins");
41
- var import_rebilly_payment_payload_plugin = require("@xyo-network/rebilly-payment-payload-plugin");
42
- var import_sentinel_abstract = require("@xyo-network/sentinel-abstract");
43
-
44
- // src/util/toTokenRequest.ts
45
- var toTokenRequest = /* @__PURE__ */ __name((paymentCard, billingAddress) => {
46
- const { cvv, expMonth, expYear, cardNumber } = paymentCard;
47
- const { schema: _, ...fields } = billingAddress;
48
- return {
49
- billingAddress: {
50
- ...fields
51
- },
52
- method: "payment-card",
53
- paymentInstrument: {
54
- cvv,
55
- expMonth,
56
- expYear,
57
- pan: cardNumber
58
- }
59
- };
60
- }, "toTokenRequest");
61
-
62
- // src/Sentinel.ts
63
- var removePrefix = /* @__PURE__ */ __name((str, prefix) => {
64
- const regex = new RegExp(`^${prefix}`);
65
- return str.replace(regex, "");
66
- }, "removePrefix");
67
- var moduleName = "RebillyPaymentCardAuthorizationSentinel";
68
- var RebillyPaymentCardAuthorizationSentinel = class extends import_sentinel_abstract.AbstractSentinel {
69
- static {
70
- __name(this, "RebillyPaymentCardAuthorizationSentinel");
71
- }
72
- static configSchemas = [
73
- RebillyPaymentCardAuthorizationSentinelConfigSchema
74
- ];
75
- static defaultConfigSchema = RebillyPaymentCardAuthorizationSentinelConfigSchema;
76
- _apiRoot = void 0;
77
- _domain = void 0;
78
- _headers = void 0;
79
- _organizationId = void 0;
80
- _publishableApiKey = void 0;
81
- _tokenEndpoint = void 0;
82
- /**
83
- * The Rebilly Organization API root endpoint
84
- */
85
- get apiRoot() {
86
- if (!this._apiRoot) this._apiRoot = `${this.domain}/organizations/${this.organizationId}`;
87
- return this._apiRoot;
88
- }
89
- /**
90
- * The Rebilly domain
91
- */
92
- get domain() {
93
- if (!this._domain) this._domain = (0, import_assert.assertEx)(this.params.domain ?? this.config.domain, () => `${moduleName}: Missing domain in params/config`);
94
- return this._domain;
95
- }
96
- /**
97
- * The headers to be included in the request for each request
98
- */
99
- get headers() {
100
- if (!this._headers) this._headers = {
101
- Authorization: this.publishableApiKey
102
- };
103
- return this._headers;
104
- }
105
- /**
106
- * True if the environment is sandbox (testing), false otherwise
107
- */
108
- get isSandboxEnvironment() {
109
- return this.domain.includes("sandbox");
110
- }
111
- /**
112
- * The Rebilly organization ID
113
- */
114
- get organizationId() {
115
- if (!this._organizationId) this._organizationId = removePrefix((0, import_assert.assertEx)(this.params.organizationId, () => `${moduleName}: Missing organizationId in params`), "org_");
116
- return this._organizationId;
117
- }
118
- /**
119
- * The Rebilly Publishable API key
120
- */
121
- get publishableApiKey() {
122
- if (!this._publishableApiKey) this._publishableApiKey = (0, import_assert.assertEx)(this.params.publishableApiKey, () => `${moduleName}: Missing publishableApiKey in params`);
123
- return this._publishableApiKey;
124
- }
125
- /**
126
- * The Rebilly Organization token creation endpoint
127
- */
128
- get tokenEndpoint() {
129
- if (!this._tokenEndpoint) this._tokenEndpoint = `${this.apiRoot}/tokens`;
130
- return this._tokenEndpoint;
131
- }
132
- async reportHandler(payloads) {
133
- await this.started("throw");
134
- const results = [];
135
- if (!payloads || payloads.length === 0) return results;
136
- const paymentCard = payloads?.find(import_payment_payload_plugins.isPaymentCard);
137
- if (!paymentCard) return results;
138
- const billingAddress = payloads?.find(import_payment_payload_plugins.isBillingAddress);
139
- if (!billingAddress) return results;
140
- const axios = new import_axios.AxiosJson({
141
- headers: this.headers
142
- });
143
- try {
144
- const data = toTokenRequest(paymentCard, billingAddress);
145
- const response = await axios.post(this.tokenEndpoint, data);
146
- (0, import_assert.assertEx)(response.status === import_axios.HttpStatusCode.Created, () => `Failed to tokenize payment card: ${response.status}`);
147
- const { id } = response.data;
148
- const sources = await import_payload_builder.PayloadBuilder.dataHashes([
149
- paymentCard,
150
- billingAddress
151
- ]);
152
- results.push({
153
- id,
154
- schema: import_rebilly_payment_payload_plugin.RebillyPaymentAuthorizationTokenSchema,
155
- sources
156
- });
157
- } catch (error) {
158
- this.logger?.error?.(`${moduleName}: Error creating payment token: ${error}`);
159
- }
160
- return results;
161
- }
162
- };
163
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Schema.ts","../../src/Config.ts","../../src/Sentinel.ts","../../src/util/toTokenRequest.ts"],"sourcesContent":["export * from './Config.ts'\nexport * from './Params.ts'\nexport * from './Schema.ts'\nexport * from './Sentinel.ts'\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.ts'\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}> &\nPartial<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/index.ts'\nimport { RebillyPaymentCardAuthorizationSentinelConfigSchema } from './Config.ts'\nimport { RebillyPaymentCardAuthorizationSentinelParams } from './Params.ts'\nimport { toTokenRequest } from './util/index.ts'\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/index.ts'\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;;;;;;;;;ACAO,IAAMA,gDAAgD;;;ACKtD,IAAMC,sDAAsD,GAAGC,6CAAAA;;;ACLtE,oBAAyB;AACzB,mBAA8D;AAC9D,6BAA+B;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GnD,UAAAA,mCAA6CmD,KAAAA,EAAO;IAC9E;AACA,WAAOvB;EACT;AACF;","names":["RebillyPaymentCardAuthorizationSentinelSchema","RebillyPaymentCardAuthorizationSentinelConfigSchema","RebillyPaymentCardAuthorizationSentinelSchema","toTokenRequest","paymentCard","billingAddress","cvv","expMonth","expYear","cardNumber","schema","_","fields","method","paymentInstrument","pan","removePrefix","str","prefix","regex","RegExp","replace","moduleName","RebillyPaymentCardAuthorizationSentinel","AbstractSentinel","configSchemas","RebillyPaymentCardAuthorizationSentinelConfigSchema","defaultConfigSchema","_apiRoot","undefined","_domain","_headers","_organizationId","_publishableApiKey","_tokenEndpoint","apiRoot","domain","organizationId","assertEx","params","config","headers","Authorization","publishableApiKey","isSandboxEnvironment","includes","tokenEndpoint","reportHandler","payloads","started","results","length","paymentCard","find","isPaymentCard","billingAddress","isBillingAddress","axios","AxiosJson","data","toTokenRequest","response","post","status","HttpStatusCode","Created","id","sources","PayloadBuilder","dataHashes","push","schema","RebillyPaymentAuthorizationTokenSchema","error","logger"]}
@@ -1,5 +0,0 @@
1
- export * from './Config.ts';
2
- export * from './Params.ts';
3
- export * from './Schema.ts';
4
- export * from './Sentinel.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
@@ -1,5 +0,0 @@
1
- export * from './Config.ts';
2
- export * from './Params.ts';
3
- export * from './Schema.ts';
4
- export * from './Sentinel.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
@@ -1,5 +0,0 @@
1
- export * from './Config.ts';
2
- export * from './Params.ts';
3
- export * from './Schema.ts';
4
- export * from './Sentinel.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
@@ -1,142 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/Schema.ts
5
- var RebillyPaymentCardAuthorizationSentinelSchema = "network.xyo.sentinel.payments.payment.instrument.card.authorization.rebilly";
6
-
7
- // src/Config.ts
8
- var RebillyPaymentCardAuthorizationSentinelConfigSchema = `${RebillyPaymentCardAuthorizationSentinelSchema}.config`;
9
-
10
- // src/Sentinel.ts
11
- import { assertEx } from "@xylabs/assert";
12
- import { AxiosJson, HttpStatusCode } from "@xylabs/axios";
13
- import { PayloadBuilder } from "@xyo-network/payload-builder";
14
- import { isBillingAddress, isPaymentCard } from "@xyo-network/payment-payload-plugins";
15
- import { RebillyPaymentAuthorizationTokenSchema } from "@xyo-network/rebilly-payment-payload-plugin";
16
- import { AbstractSentinel } from "@xyo-network/sentinel-abstract";
17
-
18
- // src/util/toTokenRequest.ts
19
- var toTokenRequest = /* @__PURE__ */ __name((paymentCard, billingAddress) => {
20
- const { cvv, expMonth, expYear, cardNumber } = paymentCard;
21
- const { schema: _, ...fields } = billingAddress;
22
- return {
23
- billingAddress: {
24
- ...fields
25
- },
26
- method: "payment-card",
27
- paymentInstrument: {
28
- cvv,
29
- expMonth,
30
- expYear,
31
- pan: cardNumber
32
- }
33
- };
34
- }, "toTokenRequest");
35
-
36
- // src/Sentinel.ts
37
- var removePrefix = /* @__PURE__ */ __name((str, prefix) => {
38
- const regex = new RegExp(`^${prefix}`);
39
- return str.replace(regex, "");
40
- }, "removePrefix");
41
- var moduleName = "RebillyPaymentCardAuthorizationSentinel";
42
- var RebillyPaymentCardAuthorizationSentinel = class extends AbstractSentinel {
43
- static {
44
- __name(this, "RebillyPaymentCardAuthorizationSentinel");
45
- }
46
- static configSchemas = [
47
- RebillyPaymentCardAuthorizationSentinelConfigSchema
48
- ];
49
- static defaultConfigSchema = RebillyPaymentCardAuthorizationSentinelConfigSchema;
50
- _apiRoot = void 0;
51
- _domain = void 0;
52
- _headers = void 0;
53
- _organizationId = void 0;
54
- _publishableApiKey = void 0;
55
- _tokenEndpoint = void 0;
56
- /**
57
- * The Rebilly Organization API root endpoint
58
- */
59
- get apiRoot() {
60
- if (!this._apiRoot) this._apiRoot = `${this.domain}/organizations/${this.organizationId}`;
61
- return this._apiRoot;
62
- }
63
- /**
64
- * The Rebilly domain
65
- */
66
- get domain() {
67
- if (!this._domain) this._domain = assertEx(this.params.domain ?? this.config.domain, () => `${moduleName}: Missing domain in params/config`);
68
- return this._domain;
69
- }
70
- /**
71
- * The headers to be included in the request for each request
72
- */
73
- get headers() {
74
- if (!this._headers) this._headers = {
75
- Authorization: this.publishableApiKey
76
- };
77
- return this._headers;
78
- }
79
- /**
80
- * True if the environment is sandbox (testing), false otherwise
81
- */
82
- get isSandboxEnvironment() {
83
- return this.domain.includes("sandbox");
84
- }
85
- /**
86
- * The Rebilly organization ID
87
- */
88
- get organizationId() {
89
- if (!this._organizationId) this._organizationId = removePrefix(assertEx(this.params.organizationId, () => `${moduleName}: Missing organizationId in params`), "org_");
90
- return this._organizationId;
91
- }
92
- /**
93
- * The Rebilly Publishable API key
94
- */
95
- get publishableApiKey() {
96
- if (!this._publishableApiKey) this._publishableApiKey = assertEx(this.params.publishableApiKey, () => `${moduleName}: Missing publishableApiKey in params`);
97
- return this._publishableApiKey;
98
- }
99
- /**
100
- * The Rebilly Organization token creation endpoint
101
- */
102
- get tokenEndpoint() {
103
- if (!this._tokenEndpoint) this._tokenEndpoint = `${this.apiRoot}/tokens`;
104
- return this._tokenEndpoint;
105
- }
106
- async reportHandler(payloads) {
107
- await this.started("throw");
108
- const results = [];
109
- if (!payloads || payloads.length === 0) return results;
110
- const paymentCard = payloads?.find(isPaymentCard);
111
- if (!paymentCard) return results;
112
- const billingAddress = payloads?.find(isBillingAddress);
113
- if (!billingAddress) return results;
114
- const axios = new AxiosJson({
115
- headers: this.headers
116
- });
117
- try {
118
- const data = toTokenRequest(paymentCard, billingAddress);
119
- const response = await axios.post(this.tokenEndpoint, data);
120
- assertEx(response.status === HttpStatusCode.Created, () => `Failed to tokenize payment card: ${response.status}`);
121
- const { id } = response.data;
122
- const sources = await PayloadBuilder.dataHashes([
123
- paymentCard,
124
- billingAddress
125
- ]);
126
- results.push({
127
- id,
128
- schema: RebillyPaymentAuthorizationTokenSchema,
129
- sources
130
- });
131
- } catch (error) {
132
- this.logger?.error?.(`${moduleName}: Error creating payment token: ${error}`);
133
- }
134
- return results;
135
- }
136
- };
137
- export {
138
- RebillyPaymentCardAuthorizationSentinel,
139
- RebillyPaymentCardAuthorizationSentinelConfigSchema,
140
- RebillyPaymentCardAuthorizationSentinelSchema
141
- };
142
- //# sourceMappingURL=index.mjs.map