Skip to content

Commit

Permalink
docs: Admin APIs (#1192)
Browse files Browse the repository at this point in the history
* docs: backend Admin API

* fix(backend): rollback String -> ID

* fix(backend): graphql generate

* docs: auth admin api

* docs: add suggestions

* fix: wording

* chore(auth): capitalize grant states
  • Loading branch information
sabineschaller authored Mar 13, 2023
1 parent 17281ec commit 8955d7e
Show file tree
Hide file tree
Showing 9 changed files with 1,482 additions and 469 deletions.
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'
}

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

0 comments on commit 8955d7e

Please sign in to comment.