Skip to content

Commit

Permalink
Add resource_id
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 11, 2024
1 parent 8933bc0 commit d1b7c92
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/engine/src/providers/gocardless/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export const transformAccount = ({
enrollment_id: null,
balance: transformAccountBalance(balance),
institution: transformInstitution(institution),
resource_id: account.resourceId,
};
};

Expand Down
1 change: 1 addition & 0 deletions apps/engine/src/providers/gocardless/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export type GetAccountsResponse = {
account: Account;
balance?: GetBalanceRequest;
institution: Institution;
resourceId?: string;
}[];

export type GetTransactionsRequest = {
Expand Down
1 change: 1 addition & 0 deletions apps/engine/src/providers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export type Account = {
institution: Institution;
balance: Balance;
enrollment_id: string | null; // Teller
resource_id: string | null; // GoCardLess
};

export type ConnectionStatus = {
Expand Down
8 changes: 8 additions & 0 deletions apps/engine/src/routes/accounts/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,17 @@ export const AccountSchema = z
enrollment_id: z
.string()
.openapi({
description: "Teller/Plaid enrollment id",
example: "add29d44-1b36-4bcc-b317-b2cbc73ab8e7",
})
.nullable(),
resource_id: z
.string()
.openapi({
description: "GoCardLess reference id",
example: "GBRGZX62Y8",
})
.nullable(),
})
.openapi("AccountSchema");

Expand Down

0 comments on commit d1b7c92

Please sign in to comment.