Skip to content
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

feat(transaction): add second party #1861

Merged
merged 6 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.table('transactions', function (table) {
table.string('secondParty').nullable()
})
}

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = function (knex) {
return knex.schema.table('transactions', function (table) {
table.dropColumn('secondParty')
})
}
85 changes: 51 additions & 34 deletions packages/wallet/backend/src/rafiki/auth/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,108 +18,122 @@ export type Scalars = {

export type Access = Model & {
__typename?: 'Access';
/** Access action (create, read, list or complete) */
/** Actions allowed with this access. */
actions: Array<Maybe<Scalars['String']['output']>>;
/** Date-time of creation */
/** The date and time when the access was created. */
createdAt: Scalars['String']['output'];
/** Access id */
/** Unique identifier of the access object. */
id: Scalars['ID']['output'];
/** Wallet address of a sub-resource (incoming payment, outgoing payment, or quote) */
/** Wallet address of the sub-resource (incoming payment, outgoing payment, or quote). */
identifier?: Maybe<Scalars['String']['output']>;
/** Payment limits */
/** Limits for an outgoing payment associated with this access. */
limits?: Maybe<LimitData>;
/** Access type (incoming payment, outgoing payment, or quote) */
/** Type of access (incoming payment, outgoing payment, or quote). */
type: Scalars['String']['output'];
};

export type FilterFinalizationReason = {
/** List of finalization reasons to include in the filter. */
in?: InputMaybe<Array<GrantFinalization>>;
/** List of finalization reasons to exclude in the filter. */
notIn?: InputMaybe<Array<GrantFinalization>>;
};

export type FilterGrantState = {
/** List of states to include in the filter. */
in?: InputMaybe<Array<GrantState>>;
/** List of states to exclude in the filter. */
notIn?: InputMaybe<Array<GrantState>>;
};

export type FilterString = {
/** Array of strings to filter by. */
in?: InputMaybe<Array<Scalars['String']['input']>>;
};

export type Grant = Model & {
__typename?: 'Grant';
/** Access details */
/** Details of the access provided by the grant. */
access: Array<Access>;
/** Wallet address of the grantee's account */
/** Wallet address of the grantee's account. */
client: Scalars['String']['output'];
/** Date-time of creation */
/** The date and time when the grant was created. */
createdAt: Scalars['String']['output'];
/** Reason a grant was finalized */
/** Specific outcome of a finalized grant, indicating whether the grant was issued, revoked, or rejected. */
finalizationReason?: Maybe<GrantFinalization>;
/** Grant id */
/** Unique identifier of the grant. */
id: Scalars['ID']['output'];
/** State of the grant */
/** Current state of the grant. */
state: GrantState;
};

export type GrantEdge = {
__typename?: 'GrantEdge';
/** A cursor for paginating through the grants. */
cursor: Scalars['String']['output'];
/** A grant node in the list. */
node: Grant;
};

export type GrantFilter = {
/** Filter grants by their finalization reason. */
finalizationReason?: InputMaybe<FilterFinalizationReason>;
/** Filter grants by their unique identifier. */
identifier?: InputMaybe<FilterString>;
/** Filter grants by their state. */
state?: InputMaybe<FilterGrantState>;
};

export enum GrantFinalization {
/** grant was issued */
/** The grant was issued successfully. */
Issued = 'ISSUED',
/** grant was rejected */
/** The grant request was rejected. */
Rejected = 'REJECTED',
/** grant was revoked */
/** The grant was revoked. */
Revoked = 'REVOKED'
}

export enum GrantState {
/** grant was approved */
/** The grant request has been approved. */
Approved = 'APPROVED',
/** grant was finalized and no more access tokens or interactions can be made on it */
/** The grant request has been finalized, and no more access tokens or interactions can be made. */
Finalized = 'FINALIZED',
/** grant request is awaiting interaction */
/** The grant request is awaiting interaction. */
Pending = 'PENDING',
/** grant request is determining what state to enter next */
/** The grant request is processing. */
Processing = 'PROCESSING'
}

export type GrantsConnection = {
__typename?: 'GrantsConnection';
/** A list of edges representing grants and cursors for pagination. */
edges: Array<GrantEdge>;
/** Information to aid in pagination. */
pageInfo: PageInfo;
};

export type LimitData = {
__typename?: 'LimitData';
/** Amount to debit */
/** Amount to debit. */
debitAmount?: Maybe<PaymentAmount>;
/** Interval between payments */
/** Interval between payments. */
interval?: Maybe<Scalars['String']['output']>;
/** Amount to receive */
/** Amount to receive. */
receiveAmount?: Maybe<PaymentAmount>;
/** Wallet address URL of the receiver */
/** Wallet address URL of the receiver. */
receiver?: Maybe<Scalars['String']['output']>;
};

export type Model = {
/** The date and time when the model was created. */
createdAt: Scalars['String']['output'];
/** Unique identifier for the model. */
id: Scalars['ID']['output'];
};

export type Mutation = {
__typename?: 'Mutation';
/** Revoke Grant */
/** Revoke an existing grant. */
revokeGrant: RevokeGrantMutationResponse;
};

Expand All @@ -130,30 +144,31 @@ export type MutationRevokeGrantArgs = {

export type PageInfo = {
__typename?: 'PageInfo';
/** Paginating forwards: the cursor to continue. */
/** The cursor used to fetch the next page when paginating forward. */
endCursor?: Maybe<Scalars['String']['output']>;
/** Paginating forwards: Are there more pages? */
/** Indicates if there are more pages when paginating forward. */
hasNextPage: Scalars['Boolean']['output'];
/** Paginating backwards: Are there more pages? */
/** Indicates if there are more pages when paginating backward. */
hasPreviousPage: Scalars['Boolean']['output'];
/** Paginating backwards: the cursor to continue. */
/** The cursor used to fetch the next page when paginating backward. */
startCursor?: Maybe<Scalars['String']['output']>;
};

export type PaymentAmount = {
__typename?: 'PaymentAmount';
/** [ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217), e.g. `USD` */
/** Should be an ISO 4217 currency code whenever possible, e.g. `USD`. For more information, refer to [assets](https://rafiki.dev/overview/concepts/accounting/#assets). */
assetCode: Scalars['String']['output'];
/** Difference in orders of magnitude between the standard unit of an asset and a corresponding fractional unit */
/** Difference in orders of magnitude between the standard unit of an asset and a corresponding fractional unit. */
assetScale: Scalars['UInt8']['output'];
/** The value of the payment amount. */
value: Scalars['BigInt']['output'];
};

export type Query = {
__typename?: 'Query';
/** Fetch a grant */
/** Fetch a specific grant by its ID. */
grant: Grant;
/** Fetch a page of grants. */
/** Fetch a paginated list of grants. */
grants: GrantsConnection;
};

Expand All @@ -173,18 +188,20 @@ export type QueryGrantsArgs = {
};

export type RevokeGrantInput = {
/** Unique identifier of the grant to revoke. */
grantId: Scalars['String']['input'];
};

export type RevokeGrantMutationResponse = {
__typename?: 'RevokeGrantMutationResponse';
/** Unique identifier of the revoked grant. */
id: Scalars['ID']['output'];
};

export enum SortOrder {
/** Choose ascending order for results. */
/** Sort the results in ascending order. */
Asc = 'ASC',
/** Choose descending order for results. */
/** Sort the results in descending order. */
Desc = 'DESC'
}

Expand Down
Loading
Loading