-
Notifications
You must be signed in to change notification settings - Fork 102
feat(backend): publish webhooks to POS service if applicable #3596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f73107a
feat: created the backbone for the card service (#3508)
oana-lolea bc90760
feat: Integrate Redis client in Card Service for (requestId, posServi…
zeppelin44 577737a
feat(point-of-sale): added route for registering a POS device (#3555)
oana-lolea 835792b
feat(backend): publish webhooks to POS service if applicable
njlie a13554c
feat: add column to incoming payment
njlie 5f6c6f4
fix: tests
njlie 4dead86
feat: add warn log
njlie 4f39c13
fix: better logger requirements for finalizing webhook recipients
njlie 344940d
fix: make open payments default reason for incoming payment initializ…
njlie c0c5fee
fix: improve optional env var function
njlie d764336
fix: warn log, better optional env, backfill migration, tests
njlie ce10fb4
fix: rebase bugs
njlie 30bba90
chore: regenerate lockfile
njlie f544270
chore: regenerate gql
njlie 85475ac
fix: tests
njlie c302b30
fix: remove metadata; better tests
njlie f6cdd19
fix: build errors
njlie dcc856a
fix: tests, add type file
njlie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
packages/backend/migrations/20250807210658_add_metadata_to_webhooks.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /** | ||
| * @param { import("knex").Knex } knex | ||
| * @returns { Promise<void> } | ||
| */ | ||
| exports.up = function (knex) { | ||
| return knex.schema.alterTable('webhooks', function (table) { | ||
| table.jsonb('metadata').nullable() | ||
| }) | ||
| } | ||
|
|
||
| /** | ||
| * @param { import("knex").Knex } knex | ||
| * @returns { Promise<void> } | ||
| */ | ||
| exports.down = function (knex) { | ||
| return knex.schema.alterTable('webhooks', function (table) { | ||
| table.dropColumn('metadata') | ||
| }) | ||
| } |
35 changes: 35 additions & 0 deletions
35
packages/backend/migrations/20250814213541_add_intiated_by_to_incoming_payment.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /** | ||
| * @param { import("knex").Knex } knex | ||
| * @returns { Promise<void> } | ||
| */ | ||
| exports.up = function (knex) { | ||
| return knex.schema | ||
| .alterTable('incomingPayments', function (table) { | ||
| table.enum('initiatedBy', ['CARD', 'OPEN_PAYMENTS', 'ADMIN']) | ||
| }) | ||
| .then(() => { | ||
| return Promise.all([ | ||
| knex.raw( | ||
| `UPDATE "incomingPayments" SET "initiatedBy" = 'OPEN_PAYMENTS' WHERE "client" IS NOT NULL` | ||
| ), | ||
| knex.raw( | ||
| `UPDATE "incomingPayments" SET "initiatedBy" = 'ADMIN' WHERE "client" IS NULL` | ||
| ) | ||
| ]) | ||
| }) | ||
| .then(() => { | ||
| return knex.raw( | ||
| `ALTER TABLE "incomingPayments" ALTER COLUMN "initiatedBy" SET NOT NULL` | ||
| ) | ||
| }) | ||
| } | ||
|
|
||
| /** | ||
| * @param { import("knex").Knex } knex | ||
| * @returns { Promise<void> } | ||
| */ | ||
| exports.down = function (knex) { | ||
| return knex.schema.alterTable('incomingPayments', function (table) { | ||
| table.dropColumn('initiatedBy') | ||
| }) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/backend/src/graphql/generated/graphql.schema.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.