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

docs: Admin APIs #1192

Merged
merged 8 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
986 changes: 761 additions & 225 deletions docs/admin-api.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/auth/src/grant/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export enum FinishMethod {
}

export enum GrantState {
Pending = 'pending',
Granted = 'granted',
Revoked = 'revoked',
Rejected = 'rejected'
Pending = 'PENDING',
Granted = 'GRANTED',
Revoked = 'REVOKED',
Rejected = 'REJECTED'
Comment on lines +20 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we should edit 20220504161932_create_grants_table migration to change state to be an enum but there are more places that are guilty of this, so we can hold off for now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we stop being allowed to edit migrations after we tag v1?

}

export class Grant extends BaseModel {
Expand Down
57 changes: 46 additions & 11 deletions packages/auth/src/graphql/generated/graphql.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 23 additions & 2 deletions packages/auth/src/graphql/generated/graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion packages/auth/src/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,26 @@ interface Model {
}

type Grant implements Model {
"Grant id"
id: ID!
"Payment pointer of the resource owner's account"
identifier: String!
"Payment pointer of the grantee's account"
client: String!
"Access details"
access: [Access!]!
state: String!
"State of the grant"
state: GrantState!
"Date-time of creation"
createdAt: String!
}

type Access implements Model {
"Access id"
id: ID!
"Payment pointer of a sub-resource (incoming payment, outgoing payment, or quote)"
identifier: String
"Date-time of creation"
createdAt: String!
}

Expand All @@ -75,3 +84,14 @@ interface MutationResponse {
success: Boolean!
message: String!
}

enum GrantState {
"grant request was created but grant was not approved yet"
PENDING
"grant was approved"
GRANTED
"grant was revoked"
REVOKED
"grant was rejected"
REJECTED
}
Loading