Skip to content

Commit

Permalink
update docs of exported types
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Aug 12, 2024
1 parent 85ff27d commit 66ca7b7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/api/src/grant-revocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ import type { AgentPermissionsApi, DwnDataEncodedRecordsWriteMessage, DwnRespons
import { DwnInterface } from '@web5/agent';
import { Convert } from '@web5/common';

/**
* Represents the structured data model of a GrantRevocation record, encapsulating the essential fields that define.
*/
export interface GrantRevocationModel {
rawMessage: DwnDataEncodedRecordsWriteMessage;
}

/**
* Represents the options for creating a new GrantRevocation instance.
*/
export interface GrantRevocationOptions {
connectedDid: string;
message: DwnDataEncodedRecordsWriteMessage;
Expand Down
3 changes: 3 additions & 0 deletions packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

export * from './did-api.js';
export * from './dwn-api.js';
export * from './grant-revocation.js';
export * from './permission-grant.js';
export * from './permission-request.js';
export * from './protocol.js';
export * from './record.js';
export * from './vc-api.js';
Expand Down
6 changes: 6 additions & 0 deletions packages/api/src/permission-grant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import {
} from '@web5/agent';
import { PermissionGrantRevocation } from './grant-revocation.js';

/**
* Represents the structured data model of a PermissionGrant record, encapsulating the essential fields that define
*/
export interface PermissionGrantModel {
/**
* The ID of the permission grant, which is the record ID DWN message.
Expand Down Expand Up @@ -67,6 +70,9 @@ export interface PermissionGrantModel {
readonly conditions?: DwnPermissionConditions;
}

/**
* Represents the options for creating a new PermissionGrant instance.
*/
export interface PermissionGrantOptions {
connectedDid: string;
message: DwnDataEncodedRecordsWriteMessage;
Expand Down
2 changes: 0 additions & 2 deletions packages/api/src/permission-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { PermissionGrant } from './permission-grant.js';
/**
* Represents the structured data model of a PermissionsRequest record, encapsulating the essential fields that define
* the request's data and payload within a Decentralized Web Node (DWN).
*
* @beta
*/
export interface PermissionRequestModel {
/**
Expand Down

0 comments on commit 66ca7b7

Please sign in to comment.