From a1423715c3b45ae2b9fd591da268f2c25091a3e7 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 10:13:18 -0500 Subject: [PATCH 01/10] Rebilly payment authorization plugin --- .../rebilly/packages/authorization/.npmignore | 21 +++ .../rebilly/packages/authorization/LICENSE | 165 ++++++++++++++++++ .../rebilly/packages/authorization/README.md | 13 ++ .../packages/authorization/package.json | 71 ++++++++ .../packages/authorization/src/Schema.ts | 2 + .../packages/authorization/src/index.ts | 1 + .../packages/authorization/tsconfig.json | 11 ++ .../authorization/tsconfig.typedoc.json | 5 + .../packages/authorization/typedoc.json | 5 + 9 files changed, 294 insertions(+) create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/.npmignore create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/LICENSE create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/README.md create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/package.json create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Schema.ts create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.json create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.typedoc.json create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/typedoc.json diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/.npmignore b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/.npmignore new file mode 100644 index 000000000..0430e8967 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/.npmignore @@ -0,0 +1,21 @@ +.* +.env +.eslintcache +.example.env +tsconfig* +jest.config.js +rollup.config.ts +yarn.lock +**/*.spec.ts +**/*.snap + +.github +docs +.pnp.* +.vscode +.yarn/* +coverage +cspell.json +node_modules +swagger.json +packages \ No newline at end of file diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/LICENSE b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/LICENSE new file mode 100644 index 000000000..0a041280b --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/README.md b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/README.md new file mode 100644 index 000000000..04d7c668c --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/README.md @@ -0,0 +1,13 @@ +[![logo][]](https://xyo.network) + +Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js) + +## License + +> See the [LICENSE](LICENSE) file for license details + +## Credits + +[Made with 🔥 and ❄️ by XYO](https://xyo.network) + +[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png \ No newline at end of file diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/package.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/package.json new file mode 100644 index 000000000..8d7d52e2b --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/package.json @@ -0,0 +1,71 @@ +{ + "name": "@xyo-network/rebilly-payment-authorization-payload-plugin", + "author": { + "email": "support@xyo.network", + "name": "XYO Development Team", + "url": "https://xyo.network" + }, + "bugs": { + "email": "support@xyo.network", + "url": "https://github.com/XYOracleNetwork/plugins/issues" + }, + "dependencies": { + "@xylabs/assert": "^3.1.11", + "@xylabs/crypto": "^3.1.11", + "@xylabs/hex": "^3.1.11", + "@xyo-network/account-model": "^2.99.1", + "@xyo-network/boundwitness-builder": "^2.99.1", + "@xyo-network/boundwitness-model": "^2.99.1", + "@xyo-network/boundwitness-validator": "^2.99.1", + "@xyo-network/diviner-hash-lease": "^2.99.1", + "@xyo-network/id-payload-plugin": "^2.99.1", + "@xyo-network/module-model": "^2.99.1", + "@xyo-network/payload-model": "^2.99.1" + }, + "devDependencies": { + "@xylabs/ts-scripts-yarn3": "^3.9.1", + "@xylabs/tsconfig": "^3.9.1", + "typescript": "^5.4.5" + }, + "description": "Typescript/Javascript Plugins for XYO Platform", + "exports": { + ".": { + "browser": { + "require": { + "types": "./dist/browser/index.d.cts", + "default": "./dist/browser/index.cjs" + }, + "import": { + "types": "./dist/browser/index.d.mts", + "default": "./dist/browser/index.js" + } + }, + "node": { + "require": { + "types": "./dist/node/index.d.cts", + "default": "./dist/node/index.cjs" + }, + "import": { + "types": "./dist/node/index.d.mts", + "default": "./dist/node/index.js" + } + } + }, + "./package.json": "./package.json" + }, + "main": "dist/node/index.cjs", + "module": "dist/node/index.js", + "types": "dist/node/index.d.ts", + "homepage": "https://xyo.network", + "license": "LGPL-3.0-only", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/XYOracleNetwork/plugins.git" + }, + "sideEffects": false, + "version": "2.94.1", + "type": "module" +} diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Schema.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Schema.ts new file mode 100644 index 000000000..d6328136e --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Schema.ts @@ -0,0 +1,2 @@ +export const PaymentsSchema = 'network.xyo.payments' +export type PaymentsSchema = typeof PaymentsSchema diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts new file mode 100644 index 000000000..ecd0219fb --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts @@ -0,0 +1 @@ +export * from './Schema' diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.json new file mode 100644 index 000000000..f493b8ad3 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "incremental": false, + "typeRoots": [] + }, + + "extends": "@xylabs/tsconfig" +} + diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.typedoc.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.typedoc.json new file mode 100644 index 000000000..0919ecb67 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.typedoc.json @@ -0,0 +1,5 @@ +{ + "exclude": ["**/spec/*", "**/*.spec.*", "**/packages/*", "dist"], + "extends": "./tsconfig.json" +} + diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/typedoc.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/typedoc.json new file mode 100644 index 000000000..a1ff9f91c --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["./src/index.ts"], + "tsconfig": "./tsconfig.typedoc.json" +} \ No newline at end of file From 587972d865127e45413b700566f38a6a47c2cb40 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 14:53:37 -0500 Subject: [PATCH 02/10] Add payment token interface --- .../packages/authorization/src/Schema.ts | 2 -- .../authorization/src/Token/Payload.ts | 35 +++++++++++++++++++ .../packages/authorization/src/Token/index.ts | 1 + .../packages/authorization/src/index.ts | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) delete mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Schema.ts create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/Payload.ts create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/index.ts diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Schema.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Schema.ts deleted file mode 100644 index d6328136e..000000000 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Schema.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const PaymentsSchema = 'network.xyo.payments' -export type PaymentsSchema = typeof PaymentsSchema diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/Payload.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/Payload.ts new file mode 100644 index 000000000..26d476d23 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/Payload.ts @@ -0,0 +1,35 @@ +import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model' + +export const RebillyPaymentAuthorizationTokenSchema = 'network.xyo.payments.payment.authorization.token.rebilly' +export type RebillyPaymentAuthorizationTokenSchema = typeof RebillyPaymentAuthorizationTokenSchema + +/** + * A payment authorization token + */ +export interface RebillyPaymentAuthorizationTokenFields { + id: string +} + +/** + * A payment authorization token payload + */ +export type RebillyPaymentAuthorizationToken = Payload + +/** + * Identity function for RebillyPaymentAuthorizationToken payload + */ +export const isRebillyPaymentAuthorizationToken = isPayloadOfSchemaType(RebillyPaymentAuthorizationTokenSchema) + +/** + * Identity function for RebillyPaymentAuthorizationToken payload with sources + */ +export const isRebillyPaymentAuthorizationTokenWithSources = isPayloadOfSchemaTypeWithSources( + RebillyPaymentAuthorizationTokenSchema, +) + +/** + * Identity function for RebillyPaymentAuthorizationToken payload with meta + */ +export const isRebillyPaymentAuthorizationTokenWithMeta = isPayloadOfSchemaTypeWithMeta( + RebillyPaymentAuthorizationTokenSchema, +) diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/index.ts new file mode 100644 index 000000000..90b164e3f --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/index.ts @@ -0,0 +1 @@ +export * from './Payload' diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts index ecd0219fb..9945bb726 100644 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts @@ -1 +1 @@ -export * from './Schema' +export * from './Token' From 28b4ceeacc74b8efe9a78794422b1a774e8d5f61 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 14:55:09 -0500 Subject: [PATCH 03/10] Add new project --- yarn.lock | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/yarn.lock b/yarn.lock index 187636d7e..c6f91f44b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6717,6 +6717,27 @@ __metadata: languageName: node linkType: hard +"@xyo-network/rebilly-payment-authorization-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization": + version: 0.0.0-use.local + resolution: "@xyo-network/rebilly-payment-authorization-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization" + dependencies: + "@xylabs/assert": "npm:^3.1.11" + "@xylabs/crypto": "npm:^3.1.11" + "@xylabs/hex": "npm:^3.1.11" + "@xylabs/ts-scripts-yarn3": "npm:^3.9.1" + "@xylabs/tsconfig": "npm:^3.9.1" + "@xyo-network/account-model": "npm:^2.99.1" + "@xyo-network/boundwitness-builder": "npm:^2.99.1" + "@xyo-network/boundwitness-model": "npm:^2.99.1" + "@xyo-network/boundwitness-validator": "npm:^2.99.1" + "@xyo-network/diviner-hash-lease": "npm:^2.99.1" + "@xyo-network/id-payload-plugin": "npm:^2.99.1" + "@xyo-network/module-model": "npm:^2.99.1" + "@xyo-network/payload-model": "npm:^2.99.1" + typescript: "npm:^5.4.5" + languageName: unknown + linkType: soft + "@xyo-network/rebilly-payment-card-authorization-plugin@workspace:packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card": version: 0.0.0-use.local resolution: "@xyo-network/rebilly-payment-card-authorization-plugin@workspace:packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card" From 5423b194edbcf094ac9eb303729886b29a10099f Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 14:58:05 -0500 Subject: [PATCH 04/10] Add Rebilly-payment-payload-plugin --- .../providers/packages/rebilly/.npmignore | 21 +++ .../providers/packages/rebilly/LICENSE | 165 ++++++++++++++++++ .../providers/packages/rebilly/README.md | 13 ++ .../providers/packages/rebilly/package.json | 71 ++++++++ .../RebillyApiSettings.ts | 23 +++ .../RebillyAuthSettings.ts | 15 ++ .../RebillyOrganizationSettings.ts | 9 + .../src/RebillyProviderSettings/index.ts | 3 + .../providers/packages/rebilly/src/index.ts | 1 + .../providers/packages/rebilly/tsconfig.json | 11 ++ .../packages/rebilly/tsconfig.typedoc.json | 5 + .../providers/packages/rebilly/typedoc.json | 5 + yarn.lock | 21 +++ 13 files changed, 363 insertions(+) create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/.npmignore create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/LICENSE create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/README.md create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/package.json create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyApiSettings.ts create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyAuthSettings.ts create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyOrganizationSettings.ts create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/index.ts create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/tsconfig.json create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/tsconfig.typedoc.json create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/typedoc.json diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/.npmignore b/packages/payload/packages/payments/packages/providers/packages/rebilly/.npmignore new file mode 100644 index 000000000..0430e8967 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/.npmignore @@ -0,0 +1,21 @@ +.* +.env +.eslintcache +.example.env +tsconfig* +jest.config.js +rollup.config.ts +yarn.lock +**/*.spec.ts +**/*.snap + +.github +docs +.pnp.* +.vscode +.yarn/* +coverage +cspell.json +node_modules +swagger.json +packages \ No newline at end of file diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/LICENSE b/packages/payload/packages/payments/packages/providers/packages/rebilly/LICENSE new file mode 100644 index 000000000..0a041280b --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/README.md b/packages/payload/packages/payments/packages/providers/packages/rebilly/README.md new file mode 100644 index 000000000..04d7c668c --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/README.md @@ -0,0 +1,13 @@ +[![logo][]](https://xyo.network) + +Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js) + +## License + +> See the [LICENSE](LICENSE) file for license details + +## Credits + +[Made with 🔥 and ❄️ by XYO](https://xyo.network) + +[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png \ No newline at end of file diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/package.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/package.json new file mode 100644 index 000000000..19989d236 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/package.json @@ -0,0 +1,71 @@ +{ + "name": "@xyo-network/rebilly-payment-payload-plugin", + "author": { + "email": "support@xyo.network", + "name": "XYO Development Team", + "url": "https://xyo.network" + }, + "bugs": { + "email": "support@xyo.network", + "url": "https://github.com/XYOracleNetwork/plugins/issues" + }, + "dependencies": { + "@xylabs/assert": "^3.1.11", + "@xylabs/crypto": "^3.1.11", + "@xylabs/hex": "^3.1.11", + "@xyo-network/account-model": "^2.99.1", + "@xyo-network/boundwitness-builder": "^2.99.1", + "@xyo-network/boundwitness-model": "^2.99.1", + "@xyo-network/boundwitness-validator": "^2.99.1", + "@xyo-network/diviner-hash-lease": "^2.99.1", + "@xyo-network/id-payload-plugin": "^2.99.1", + "@xyo-network/module-model": "^2.99.1", + "@xyo-network/payload-model": "^2.99.1" + }, + "devDependencies": { + "@xylabs/ts-scripts-yarn3": "^3.9.1", + "@xylabs/tsconfig": "^3.9.1", + "typescript": "^5.4.5" + }, + "description": "Typescript/Javascript Plugins for XYO Platform", + "exports": { + ".": { + "browser": { + "require": { + "types": "./dist/browser/index.d.cts", + "default": "./dist/browser/index.cjs" + }, + "import": { + "types": "./dist/browser/index.d.mts", + "default": "./dist/browser/index.js" + } + }, + "node": { + "require": { + "types": "./dist/node/index.d.cts", + "default": "./dist/node/index.cjs" + }, + "import": { + "types": "./dist/node/index.d.mts", + "default": "./dist/node/index.js" + } + } + }, + "./package.json": "./package.json" + }, + "main": "dist/node/index.cjs", + "module": "dist/node/index.js", + "types": "dist/node/index.d.ts", + "homepage": "https://xyo.network", + "license": "LGPL-3.0-only", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/XYOracleNetwork/plugins.git" + }, + "sideEffects": false, + "version": "2.94.1", + "type": "module" +} diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyApiSettings.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyApiSettings.ts new file mode 100644 index 000000000..d20002e6e --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyApiSettings.ts @@ -0,0 +1,23 @@ +export interface RebillyApiDomainSettings { + /** + * The Rebilly domain (https://api-sandbox.rebilly.com, https://api.rebilly.com) + */ + domain: 'https://api-sandbox.rebilly.com' | 'https://api.rebilly.com' +} + +export interface RebillyApiKeySettings extends RebillyApiDomainSettings { + /* + * The Rebilly API key + */ + apiKey: string +} +export interface RebillyApiSettings extends RebillyApiDomainSettings, RebillyApiKeySettings {} + +export interface RebillyPublishableApiKeySettings extends RebillyApiDomainSettings { + /* + * The Rebilly Publishable API key + */ + publishableApiKey: string +} + +export interface RebillyPublishableApiSettings extends RebillyApiDomainSettings, RebillyPublishableApiKeySettings {} diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyAuthSettings.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyAuthSettings.ts new file mode 100644 index 000000000..4b0a201db --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyAuthSettings.ts @@ -0,0 +1,15 @@ +export interface RebillyUserEmailSettings { + /** + * Email associated with Rebilly account + */ + email: string +} + +export interface RebillyUserPasswordSettings extends RebillyUserEmailSettings { + /** + * Password associated with Rebilly account + */ + password: string +} + +export interface RebillyAuthSettings extends RebillyUserEmailSettings, RebillyUserPasswordSettings {} diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyOrganizationSettings.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyOrganizationSettings.ts new file mode 100644 index 000000000..ad0aebe6d --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyOrganizationSettings.ts @@ -0,0 +1,9 @@ +/** + * Rebilly organization settings + */ +export interface RebillyOrganizationSettings { + /** + * The Rebilly organization ID + */ + organizationId: string +} diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/index.ts new file mode 100644 index 000000000..9974c525e --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/index.ts @@ -0,0 +1,3 @@ +export * from './RebillyApiSettings' +export * from './RebillyAuthSettings' +export * from './RebillyOrganizationSettings' diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts new file mode 100644 index 000000000..76f6fb707 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts @@ -0,0 +1 @@ +export * from './RebillyProviderSettings' diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/tsconfig.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/tsconfig.json new file mode 100644 index 000000000..f493b8ad3 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "incremental": false, + "typeRoots": [] + }, + + "extends": "@xylabs/tsconfig" +} + diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/tsconfig.typedoc.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/tsconfig.typedoc.json new file mode 100644 index 000000000..0919ecb67 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/tsconfig.typedoc.json @@ -0,0 +1,5 @@ +{ + "exclude": ["**/spec/*", "**/*.spec.*", "**/packages/*", "dist"], + "extends": "./tsconfig.json" +} + diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/typedoc.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/typedoc.json new file mode 100644 index 000000000..a1ff9f91c --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["./src/index.ts"], + "tsconfig": "./tsconfig.typedoc.json" +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index c6f91f44b..ff6911b64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6759,6 +6759,27 @@ __metadata: languageName: unknown linkType: soft +"@xyo-network/rebilly-payment-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly": + version: 0.0.0-use.local + resolution: "@xyo-network/rebilly-payment-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly" + dependencies: + "@xylabs/assert": "npm:^3.1.11" + "@xylabs/crypto": "npm:^3.1.11" + "@xylabs/hex": "npm:^3.1.11" + "@xylabs/ts-scripts-yarn3": "npm:^3.9.1" + "@xylabs/tsconfig": "npm:^3.9.1" + "@xyo-network/account-model": "npm:^2.99.1" + "@xyo-network/boundwitness-builder": "npm:^2.99.1" + "@xyo-network/boundwitness-model": "npm:^2.99.1" + "@xyo-network/boundwitness-validator": "npm:^2.99.1" + "@xyo-network/diviner-hash-lease": "npm:^2.99.1" + "@xyo-network/id-payload-plugin": "npm:^2.99.1" + "@xyo-network/module-model": "npm:^2.99.1" + "@xyo-network/payload-model": "npm:^2.99.1" + typescript: "npm:^5.4.5" + languageName: unknown + linkType: soft + "@xyo-network/schema-name-validator@npm:^2.99.1, @xyo-network/schema-name-validator@npm:~2.99.1": version: 2.99.1 resolution: "@xyo-network/schema-name-validator@npm:2.99.1" From 13b11f8137ac60494536f8e6768e4124fecf1ca8 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 14:59:25 -0500 Subject: [PATCH 05/10] Hoist common types to shared lib --- .../authorization/packages/card/package.json | 1 + .../authorization/packages/card/src/Config.ts | 2 +- .../RebillyApiSettings.ts | 23 ------------------- .../RebillyAuthSettings.ts | 15 ------------ .../RebillyOrganizationSettings.ts | 9 -------- .../card/src/RebillyProviderSettings/index.ts | 3 --- yarn.lock | 3 ++- 7 files changed, 4 insertions(+), 52 deletions(-) delete mode 100644 packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyApiSettings.ts delete mode 100644 packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyAuthSettings.ts delete mode 100644 packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyOrganizationSettings.ts delete mode 100644 packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/index.ts diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json index f51642d5b..f8c76eb23 100644 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json @@ -17,6 +17,7 @@ "@xyo-network/payload-builder": "^2.99.1", "@xyo-network/payload-model": "^2.99.1", "@xyo-network/payment-payload-plugins": "workspace:~", + "@xyo-network/rebilly-payment-payload-plugin": "workspace:~", "@xyo-network/sentinel-abstract": "^2.99.1", "@xyo-network/sentinel-model": "^2.99.1" }, diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Config.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Config.ts index d0006c133..8c98ba310 100644 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Config.ts +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Config.ts @@ -1,6 +1,6 @@ +import { RebillyApiDomainSettings } from '@xyo-network/rebilly-payment-payload-plugin' import { SentinelConfig } from '@xyo-network/sentinel-model' -import { RebillyApiDomainSettings } from './RebillyProviderSettings' import { RebillyPaymentCardAuthorizationSentinelSchema } from './Schema' export const RebillyPaymentCardAuthorizationSentinelConfigSchema = `${RebillyPaymentCardAuthorizationSentinelSchema}.config` diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyApiSettings.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyApiSettings.ts deleted file mode 100644 index d20002e6e..000000000 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyApiSettings.ts +++ /dev/null @@ -1,23 +0,0 @@ -export interface RebillyApiDomainSettings { - /** - * The Rebilly domain (https://api-sandbox.rebilly.com, https://api.rebilly.com) - */ - domain: 'https://api-sandbox.rebilly.com' | 'https://api.rebilly.com' -} - -export interface RebillyApiKeySettings extends RebillyApiDomainSettings { - /* - * The Rebilly API key - */ - apiKey: string -} -export interface RebillyApiSettings extends RebillyApiDomainSettings, RebillyApiKeySettings {} - -export interface RebillyPublishableApiKeySettings extends RebillyApiDomainSettings { - /* - * The Rebilly Publishable API key - */ - publishableApiKey: string -} - -export interface RebillyPublishableApiSettings extends RebillyApiDomainSettings, RebillyPublishableApiKeySettings {} diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyAuthSettings.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyAuthSettings.ts deleted file mode 100644 index 4b0a201db..000000000 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyAuthSettings.ts +++ /dev/null @@ -1,15 +0,0 @@ -export interface RebillyUserEmailSettings { - /** - * Email associated with Rebilly account - */ - email: string -} - -export interface RebillyUserPasswordSettings extends RebillyUserEmailSettings { - /** - * Password associated with Rebilly account - */ - password: string -} - -export interface RebillyAuthSettings extends RebillyUserEmailSettings, RebillyUserPasswordSettings {} diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyOrganizationSettings.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyOrganizationSettings.ts deleted file mode 100644 index ad0aebe6d..000000000 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/RebillyOrganizationSettings.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Rebilly organization settings - */ -export interface RebillyOrganizationSettings { - /** - * The Rebilly organization ID - */ - organizationId: string -} diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/index.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/index.ts deleted file mode 100644 index 9974c525e..000000000 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/RebillyProviderSettings/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './RebillyApiSettings' -export * from './RebillyAuthSettings' -export * from './RebillyOrganizationSettings' diff --git a/yarn.lock b/yarn.lock index ff6911b64..47b497a3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6753,13 +6753,14 @@ __metadata: "@xyo-network/payload-builder": "npm:^2.99.1" "@xyo-network/payload-model": "npm:^2.99.1" "@xyo-network/payment-payload-plugins": "workspace:~" + "@xyo-network/rebilly-payment-payload-plugin": "workspace:~" "@xyo-network/sentinel-abstract": "npm:^2.99.1" "@xyo-network/sentinel-model": "npm:^2.99.1" typescript: "npm:^5.4.5" languageName: unknown linkType: soft -"@xyo-network/rebilly-payment-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly": +"@xyo-network/rebilly-payment-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly, @xyo-network/rebilly-payment-payload-plugin@workspace:~": version: 0.0.0-use.local resolution: "@xyo-network/rebilly-payment-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly" dependencies: From 2a4f51f935056157a91dcd1978288dd04fedcaef Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 15:00:17 -0500 Subject: [PATCH 06/10] Use types from shared lib --- .../rebilly/packages/authorization/packages/card/src/Params.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Params.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Params.ts index c4850dd96..877bb7500 100644 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Params.ts +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Params.ts @@ -1,8 +1,8 @@ import { AnyConfigSchema } from '@xyo-network/module-model' +import { RebillyOrganizationSettings, RebillyPublishableApiSettings } from '@xyo-network/rebilly-payment-payload-plugin' import { SentinelParams } from '@xyo-network/sentinel-model' import { RebillyPaymentCardAuthorizationSentinelConfig } from './Config' -import { RebillyOrganizationSettings, RebillyPublishableApiSettings } from './RebillyProviderSettings' export type RebillyPaymentCardAuthorizationParams = Partial From 10b8354d9fa4773cb0bf550b03460b5c009f5c2f Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 15:14:55 -0500 Subject: [PATCH 07/10] Replace IdPayload with Token --- .../authorization/packages/card/package.json | 2 +- .../authorization/packages/card/src/Sentinel.ts | 8 ++++---- .../packages/card/src/spec/Sentinel.spec.ts | 14 +++++++------- yarn.lock | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json index f8c76eb23..8e33cb948 100644 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json @@ -12,11 +12,11 @@ "dependencies": { "@xylabs/assert": "^3.1.11", "@xylabs/axios": "^3.1.11", - "@xyo-network/id-payload-plugin": "^2.99.1", "@xyo-network/module-model": "^2.99.1", "@xyo-network/payload-builder": "^2.99.1", "@xyo-network/payload-model": "^2.99.1", "@xyo-network/payment-payload-plugins": "workspace:~", + "@xyo-network/rebilly-payment-authorization-payload-plugin": "workspace:~", "@xyo-network/rebilly-payment-payload-plugin": "workspace:~", "@xyo-network/sentinel-abstract": "^2.99.1", "@xyo-network/sentinel-model": "^2.99.1" diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Sentinel.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Sentinel.ts index 1814da9a7..438e41430 100644 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Sentinel.ts +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Sentinel.ts @@ -1,9 +1,9 @@ import { assertEx } from '@xylabs/assert' import { AxiosJson, AxiosRequestConfig, HttpStatusCode } from '@xylabs/axios' -import { IdPayload, IdSchema } from '@xyo-network/id-payload-plugin' import { PayloadBuilder } from '@xyo-network/payload-builder' import { Payload, WithSources } from '@xyo-network/payload-model' import { isBillingAddress, isPaymentCard } from '@xyo-network/payment-payload-plugins' +import { RebillyPaymentAuthorizationToken, RebillyPaymentAuthorizationTokenSchema } from '@xyo-network/rebilly-payment-authorization-payload-plugin' import { AbstractSentinel } from '@xyo-network/sentinel-abstract' import { SentinelInstance, SentinelModuleEventData } from '@xyo-network/sentinel-model' @@ -94,7 +94,7 @@ export class RebillyPaymentCardAuthorizationSentinel< override async reportHandler(payloads?: Payload[]): Promise { await this.started('throw') - const results: WithSources[] = [] + const results: WithSources[] = [] // Verify necessary inputs and if nothing meets our criteria, bail early if (!payloads || payloads.length === 0) return results const paymentCard = payloads?.find(isPaymentCard) @@ -106,9 +106,9 @@ export class RebillyPaymentCardAuthorizationSentinel< const data = toTokenRequest(paymentCard, billingAddress) const response = await axios.post(this.tokenEndpoint, data) assertEx(response.status === HttpStatusCode.Created, () => `Failed to tokenize payment card: ${response.status}`) - const token = response.data + const { id } = response.data const sources = await PayloadBuilder.dataHashes([paymentCard, billingAddress]) - results.push({ salt: token.id, schema: IdSchema, sources }) + results.push({ id, schema: RebillyPaymentAuthorizationTokenSchema, sources }) } catch (error) { this.logger?.error?.(`${moduleName}: Error creating payment token: ${error}`) } diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/spec/Sentinel.spec.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/spec/Sentinel.spec.ts index fd9bc2c20..589dba806 100644 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/spec/Sentinel.spec.ts +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/spec/Sentinel.spec.ts @@ -4,6 +4,7 @@ import { BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model' import { isIdWithSources } from '@xyo-network/id-payload-plugin' import { PayloadBuilder } from '@xyo-network/payload-builder' import { BillingAddress, BillingAddressSchema, PaymentCard, PaymentCardSchema } from '@xyo-network/payment-payload-plugins' +import { isRebillyPaymentAuthorizationTokenWithSources } from '@xyo-network/rebilly-payment-authorization-payload-plugin' import { RebillyPaymentCardAuthorizationSentinelConfigSchema } from '../Config' import { RebillyPaymentCardAuthorizationSentinel } from '../Sentinel' @@ -73,13 +74,12 @@ describeIf(process.env.REB_PUB_APIKEY)('RebillyPaymentCardAuthorizationSentinel' expect(payloads).toBeArray() expect(payloads.length).toBeGreaterThanOrEqual(1) - const id = payloads.find(isIdWithSources) - expect(id).toBeDefined() - const payment = assertEx(id) - expect(payment.salt).toBeString() - expect(payment.salt).not.toBeEmpty() - expect(payment.sources).toBeArrayOfSize(2) - expect(payment.sources).toEqual(await PayloadBuilder.dataHashes([paymentCard, billingAddress])) + const payload = payloads.find(isRebillyPaymentAuthorizationTokenWithSources) + expect(payload).toBeDefined() + const token = assertEx(payload) + expect(token.id).toBeString() + expect(token.sources).toBeArrayOfSize(2) + expect(token.sources).toEqual(await PayloadBuilder.dataHashes([paymentCard, billingAddress])) }) }) }) diff --git a/yarn.lock b/yarn.lock index 47b497a3e..480d7e20d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6717,7 +6717,7 @@ __metadata: languageName: node linkType: hard -"@xyo-network/rebilly-payment-authorization-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization": +"@xyo-network/rebilly-payment-authorization-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization, @xyo-network/rebilly-payment-authorization-payload-plugin@workspace:~": version: 0.0.0-use.local resolution: "@xyo-network/rebilly-payment-authorization-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization" dependencies: @@ -6748,11 +6748,11 @@ __metadata: "@xylabs/ts-scripts-yarn3": "npm:^3.9.1" "@xylabs/tsconfig": "npm:^3.9.1" "@xyo-network/boundwitness-model": "npm:^2.99.1" - "@xyo-network/id-payload-plugin": "npm:^2.99.1" "@xyo-network/module-model": "npm:^2.99.1" "@xyo-network/payload-builder": "npm:^2.99.1" "@xyo-network/payload-model": "npm:^2.99.1" "@xyo-network/payment-payload-plugins": "workspace:~" + "@xyo-network/rebilly-payment-authorization-payload-plugin": "workspace:~" "@xyo-network/rebilly-payment-payload-plugin": "workspace:~" "@xyo-network/sentinel-abstract": "npm:^2.99.1" "@xyo-network/sentinel-model": "npm:^2.99.1" From 8d311ec0cbd0181f10b905f98756adf796c3cdd8 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 15:18:22 -0500 Subject: [PATCH 08/10] Condense packages --- .../rebilly/packages/authorization/.npmignore | 21 --- .../rebilly/packages/authorization/LICENSE | 165 ------------------ .../rebilly/packages/authorization/README.md | 13 -- .../packages/authorization/package.json | 71 -------- .../packages/authorization/src/index.ts | 1 - .../packages/authorization/tsconfig.json | 11 -- .../authorization/tsconfig.typedoc.json | 5 - .../packages/authorization/typedoc.json | 5 - .../authorization => }/src/Token/Payload.ts | 0 .../authorization => }/src/Token/index.ts | 0 .../providers/packages/rebilly/src/index.ts | 1 + .../authorization/packages/card/package.json | 1 - .../packages/card/src/Sentinel.ts | 2 +- .../packages/card/src/spec/Sentinel.spec.ts | 3 +- yarn.lock | 22 --- 15 files changed, 3 insertions(+), 318 deletions(-) delete mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/.npmignore delete mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/LICENSE delete mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/README.md delete mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/package.json delete mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts delete mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.json delete mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.typedoc.json delete mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/typedoc.json rename packages/payload/packages/payments/packages/providers/packages/rebilly/{packages/authorization => }/src/Token/Payload.ts (100%) rename packages/payload/packages/payments/packages/providers/packages/rebilly/{packages/authorization => }/src/Token/index.ts (100%) diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/.npmignore b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/.npmignore deleted file mode 100644 index 0430e8967..000000000 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/.npmignore +++ /dev/null @@ -1,21 +0,0 @@ -.* -.env -.eslintcache -.example.env -tsconfig* -jest.config.js -rollup.config.ts -yarn.lock -**/*.spec.ts -**/*.snap - -.github -docs -.pnp.* -.vscode -.yarn/* -coverage -cspell.json -node_modules -swagger.json -packages \ No newline at end of file diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/LICENSE b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/LICENSE deleted file mode 100644 index 0a041280b..000000000 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/LICENSE +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/README.md b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/README.md deleted file mode 100644 index 04d7c668c..000000000 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/README.md +++ /dev/null @@ -1,13 +0,0 @@ -[![logo][]](https://xyo.network) - -Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js) - -## License - -> See the [LICENSE](LICENSE) file for license details - -## Credits - -[Made with 🔥 and ❄️ by XYO](https://xyo.network) - -[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png \ No newline at end of file diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/package.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/package.json deleted file mode 100644 index 8d7d52e2b..000000000 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "@xyo-network/rebilly-payment-authorization-payload-plugin", - "author": { - "email": "support@xyo.network", - "name": "XYO Development Team", - "url": "https://xyo.network" - }, - "bugs": { - "email": "support@xyo.network", - "url": "https://github.com/XYOracleNetwork/plugins/issues" - }, - "dependencies": { - "@xylabs/assert": "^3.1.11", - "@xylabs/crypto": "^3.1.11", - "@xylabs/hex": "^3.1.11", - "@xyo-network/account-model": "^2.99.1", - "@xyo-network/boundwitness-builder": "^2.99.1", - "@xyo-network/boundwitness-model": "^2.99.1", - "@xyo-network/boundwitness-validator": "^2.99.1", - "@xyo-network/diviner-hash-lease": "^2.99.1", - "@xyo-network/id-payload-plugin": "^2.99.1", - "@xyo-network/module-model": "^2.99.1", - "@xyo-network/payload-model": "^2.99.1" - }, - "devDependencies": { - "@xylabs/ts-scripts-yarn3": "^3.9.1", - "@xylabs/tsconfig": "^3.9.1", - "typescript": "^5.4.5" - }, - "description": "Typescript/Javascript Plugins for XYO Platform", - "exports": { - ".": { - "browser": { - "require": { - "types": "./dist/browser/index.d.cts", - "default": "./dist/browser/index.cjs" - }, - "import": { - "types": "./dist/browser/index.d.mts", - "default": "./dist/browser/index.js" - } - }, - "node": { - "require": { - "types": "./dist/node/index.d.cts", - "default": "./dist/node/index.cjs" - }, - "import": { - "types": "./dist/node/index.d.mts", - "default": "./dist/node/index.js" - } - } - }, - "./package.json": "./package.json" - }, - "main": "dist/node/index.cjs", - "module": "dist/node/index.js", - "types": "dist/node/index.d.ts", - "homepage": "https://xyo.network", - "license": "LGPL-3.0-only", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/XYOracleNetwork/plugins.git" - }, - "sideEffects": false, - "version": "2.94.1", - "type": "module" -} diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts deleted file mode 100644 index 9945bb726..000000000 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Token' diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.json deleted file mode 100644 index f493b8ad3..000000000 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "incremental": false, - "typeRoots": [] - }, - - "extends": "@xylabs/tsconfig" -} - diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.typedoc.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.typedoc.json deleted file mode 100644 index 0919ecb67..000000000 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/tsconfig.typedoc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "exclude": ["**/spec/*", "**/*.spec.*", "**/packages/*", "dist"], - "extends": "./tsconfig.json" -} - diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/typedoc.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/typedoc.json deleted file mode 100644 index a1ff9f91c..000000000 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/typedoc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["./src/index.ts"], - "tsconfig": "./tsconfig.typedoc.json" -} \ No newline at end of file diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/Payload.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/Token/Payload.ts similarity index 100% rename from packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/Payload.ts rename to packages/payload/packages/payments/packages/providers/packages/rebilly/src/Token/Payload.ts diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/Token/index.ts similarity index 100% rename from packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization/src/Token/index.ts rename to packages/payload/packages/payments/packages/providers/packages/rebilly/src/Token/index.ts diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts index 76f6fb707..fa9c2c658 100644 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts @@ -1 +1,2 @@ export * from './RebillyProviderSettings' +export * from './Token' diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json index 8e33cb948..c53d72eb9 100644 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/package.json @@ -16,7 +16,6 @@ "@xyo-network/payload-builder": "^2.99.1", "@xyo-network/payload-model": "^2.99.1", "@xyo-network/payment-payload-plugins": "workspace:~", - "@xyo-network/rebilly-payment-authorization-payload-plugin": "workspace:~", "@xyo-network/rebilly-payment-payload-plugin": "workspace:~", "@xyo-network/sentinel-abstract": "^2.99.1", "@xyo-network/sentinel-model": "^2.99.1" diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Sentinel.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Sentinel.ts index 438e41430..f679f2597 100644 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Sentinel.ts +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/Sentinel.ts @@ -3,7 +3,7 @@ import { AxiosJson, AxiosRequestConfig, HttpStatusCode } from '@xylabs/axios' import { PayloadBuilder } from '@xyo-network/payload-builder' import { Payload, WithSources } from '@xyo-network/payload-model' import { isBillingAddress, isPaymentCard } from '@xyo-network/payment-payload-plugins' -import { RebillyPaymentAuthorizationToken, RebillyPaymentAuthorizationTokenSchema } from '@xyo-network/rebilly-payment-authorization-payload-plugin' +import { RebillyPaymentAuthorizationToken, RebillyPaymentAuthorizationTokenSchema } from '@xyo-network/rebilly-payment-payload-plugin' import { AbstractSentinel } from '@xyo-network/sentinel-abstract' import { SentinelInstance, SentinelModuleEventData } from '@xyo-network/sentinel-model' diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/spec/Sentinel.spec.ts b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/spec/Sentinel.spec.ts index 589dba806..e8c5373e9 100644 --- a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/spec/Sentinel.spec.ts +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/src/spec/Sentinel.spec.ts @@ -1,10 +1,9 @@ import { assertEx } from '@xylabs/assert' import { describeIf } from '@xylabs/jest-helpers' import { BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model' -import { isIdWithSources } from '@xyo-network/id-payload-plugin' import { PayloadBuilder } from '@xyo-network/payload-builder' import { BillingAddress, BillingAddressSchema, PaymentCard, PaymentCardSchema } from '@xyo-network/payment-payload-plugins' -import { isRebillyPaymentAuthorizationTokenWithSources } from '@xyo-network/rebilly-payment-authorization-payload-plugin' +import { isRebillyPaymentAuthorizationTokenWithSources } from '@xyo-network/rebilly-payment-payload-plugin' import { RebillyPaymentCardAuthorizationSentinelConfigSchema } from '../Config' import { RebillyPaymentCardAuthorizationSentinel } from '../Sentinel' diff --git a/yarn.lock b/yarn.lock index 480d7e20d..109197511 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6717,27 +6717,6 @@ __metadata: languageName: node linkType: hard -"@xyo-network/rebilly-payment-authorization-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization, @xyo-network/rebilly-payment-authorization-payload-plugin@workspace:~": - version: 0.0.0-use.local - resolution: "@xyo-network/rebilly-payment-authorization-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly/packages/authorization" - dependencies: - "@xylabs/assert": "npm:^3.1.11" - "@xylabs/crypto": "npm:^3.1.11" - "@xylabs/hex": "npm:^3.1.11" - "@xylabs/ts-scripts-yarn3": "npm:^3.9.1" - "@xylabs/tsconfig": "npm:^3.9.1" - "@xyo-network/account-model": "npm:^2.99.1" - "@xyo-network/boundwitness-builder": "npm:^2.99.1" - "@xyo-network/boundwitness-model": "npm:^2.99.1" - "@xyo-network/boundwitness-validator": "npm:^2.99.1" - "@xyo-network/diviner-hash-lease": "npm:^2.99.1" - "@xyo-network/id-payload-plugin": "npm:^2.99.1" - "@xyo-network/module-model": "npm:^2.99.1" - "@xyo-network/payload-model": "npm:^2.99.1" - typescript: "npm:^5.4.5" - languageName: unknown - linkType: soft - "@xyo-network/rebilly-payment-card-authorization-plugin@workspace:packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card": version: 0.0.0-use.local resolution: "@xyo-network/rebilly-payment-card-authorization-plugin@workspace:packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card" @@ -6752,7 +6731,6 @@ __metadata: "@xyo-network/payload-builder": "npm:^2.99.1" "@xyo-network/payload-model": "npm:^2.99.1" "@xyo-network/payment-payload-plugins": "workspace:~" - "@xyo-network/rebilly-payment-authorization-payload-plugin": "workspace:~" "@xyo-network/rebilly-payment-payload-plugin": "workspace:~" "@xyo-network/sentinel-abstract": "npm:^2.99.1" "@xyo-network/sentinel-model": "npm:^2.99.1" From d01c6bcdaddff626020cf0cd8709408547739dca Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 15:23:58 -0500 Subject: [PATCH 09/10] Add deps --- .../packages/providers/packages/rebilly/package.json | 10 ---------- .../packages/authorization/packages/card/.depcheckrc | 3 +++ yarn.lock | 10 ---------- 3 files changed, 3 insertions(+), 20 deletions(-) create mode 100644 packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/.depcheckrc diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/package.json b/packages/payload/packages/payments/packages/providers/packages/rebilly/package.json index 19989d236..1542e4569 100644 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/package.json +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/package.json @@ -10,16 +10,6 @@ "url": "https://github.com/XYOracleNetwork/plugins/issues" }, "dependencies": { - "@xylabs/assert": "^3.1.11", - "@xylabs/crypto": "^3.1.11", - "@xylabs/hex": "^3.1.11", - "@xyo-network/account-model": "^2.99.1", - "@xyo-network/boundwitness-builder": "^2.99.1", - "@xyo-network/boundwitness-model": "^2.99.1", - "@xyo-network/boundwitness-validator": "^2.99.1", - "@xyo-network/diviner-hash-lease": "^2.99.1", - "@xyo-network/id-payload-plugin": "^2.99.1", - "@xyo-network/module-model": "^2.99.1", "@xyo-network/payload-model": "^2.99.1" }, "devDependencies": { diff --git a/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/.depcheckrc b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/.depcheckrc new file mode 100644 index 000000000..e65712127 --- /dev/null +++ b/packages/payloadset/packages/payments/packages/providers/packages/rebilly/packages/authorization/packages/card/.depcheckrc @@ -0,0 +1,3 @@ +ignores: [ + "jest" +] \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 109197511..04d5a3d83 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6742,18 +6742,8 @@ __metadata: version: 0.0.0-use.local resolution: "@xyo-network/rebilly-payment-payload-plugin@workspace:packages/payload/packages/payments/packages/providers/packages/rebilly" dependencies: - "@xylabs/assert": "npm:^3.1.11" - "@xylabs/crypto": "npm:^3.1.11" - "@xylabs/hex": "npm:^3.1.11" "@xylabs/ts-scripts-yarn3": "npm:^3.9.1" "@xylabs/tsconfig": "npm:^3.9.1" - "@xyo-network/account-model": "npm:^2.99.1" - "@xyo-network/boundwitness-builder": "npm:^2.99.1" - "@xyo-network/boundwitness-model": "npm:^2.99.1" - "@xyo-network/boundwitness-validator": "npm:^2.99.1" - "@xyo-network/diviner-hash-lease": "npm:^2.99.1" - "@xyo-network/id-payload-plugin": "npm:^2.99.1" - "@xyo-network/module-model": "npm:^2.99.1" "@xyo-network/payload-model": "npm:^2.99.1" typescript: "npm:^5.4.5" languageName: unknown From b38c74ffc8384ff5a7884736196df6400f81e8c8 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Fri, 26 Apr 2024 15:25:50 -0500 Subject: [PATCH 10/10] Rename/nest modules according to schema --- .../packages/rebilly/src/{ => Authorization}/Token/Payload.ts | 0 .../packages/rebilly/src/{ => Authorization}/Token/index.ts | 0 .../providers/packages/rebilly/src/Authorization/index.ts | 1 + .../RebillyApiSettings.ts | 0 .../RebillyAuthSettings.ts | 0 .../RebillyOrganizationSettings.ts | 0 .../{RebillyProviderSettings => ProviderSettings}/index.ts | 0 .../payments/packages/providers/packages/rebilly/src/index.ts | 4 ++-- 8 files changed, 3 insertions(+), 2 deletions(-) rename packages/payload/packages/payments/packages/providers/packages/rebilly/src/{ => Authorization}/Token/Payload.ts (100%) rename packages/payload/packages/payments/packages/providers/packages/rebilly/src/{ => Authorization}/Token/index.ts (100%) create mode 100644 packages/payload/packages/payments/packages/providers/packages/rebilly/src/Authorization/index.ts rename packages/payload/packages/payments/packages/providers/packages/rebilly/src/{RebillyProviderSettings => ProviderSettings}/RebillyApiSettings.ts (100%) rename packages/payload/packages/payments/packages/providers/packages/rebilly/src/{RebillyProviderSettings => ProviderSettings}/RebillyAuthSettings.ts (100%) rename packages/payload/packages/payments/packages/providers/packages/rebilly/src/{RebillyProviderSettings => ProviderSettings}/RebillyOrganizationSettings.ts (100%) rename packages/payload/packages/payments/packages/providers/packages/rebilly/src/{RebillyProviderSettings => ProviderSettings}/index.ts (100%) diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/Token/Payload.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/Authorization/Token/Payload.ts similarity index 100% rename from packages/payload/packages/payments/packages/providers/packages/rebilly/src/Token/Payload.ts rename to packages/payload/packages/payments/packages/providers/packages/rebilly/src/Authorization/Token/Payload.ts diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/Token/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/Authorization/Token/index.ts similarity index 100% rename from packages/payload/packages/payments/packages/providers/packages/rebilly/src/Token/index.ts rename to packages/payload/packages/payments/packages/providers/packages/rebilly/src/Authorization/Token/index.ts diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/Authorization/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/Authorization/index.ts new file mode 100644 index 000000000..9945bb726 --- /dev/null +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/Authorization/index.ts @@ -0,0 +1 @@ +export * from './Token' diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyApiSettings.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/ProviderSettings/RebillyApiSettings.ts similarity index 100% rename from packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyApiSettings.ts rename to packages/payload/packages/payments/packages/providers/packages/rebilly/src/ProviderSettings/RebillyApiSettings.ts diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyAuthSettings.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/ProviderSettings/RebillyAuthSettings.ts similarity index 100% rename from packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyAuthSettings.ts rename to packages/payload/packages/payments/packages/providers/packages/rebilly/src/ProviderSettings/RebillyAuthSettings.ts diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyOrganizationSettings.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/ProviderSettings/RebillyOrganizationSettings.ts similarity index 100% rename from packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/RebillyOrganizationSettings.ts rename to packages/payload/packages/payments/packages/providers/packages/rebilly/src/ProviderSettings/RebillyOrganizationSettings.ts diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/ProviderSettings/index.ts similarity index 100% rename from packages/payload/packages/payments/packages/providers/packages/rebilly/src/RebillyProviderSettings/index.ts rename to packages/payload/packages/payments/packages/providers/packages/rebilly/src/ProviderSettings/index.ts diff --git a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts index fa9c2c658..2e2dc5883 100644 --- a/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts +++ b/packages/payload/packages/payments/packages/providers/packages/rebilly/src/index.ts @@ -1,2 +1,2 @@ -export * from './RebillyProviderSettings' -export * from './Token' +export * from './Authorization' +export * from './ProviderSettings'