Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
feat: Resource Archive Support (#64)
Browse files Browse the repository at this point in the history
Co-authored-by: Mike Lohmeier <mike.lohmeier@resmed.com>
Co-authored-by: Tim Nguyen <nguyen102@users.noreply.github.com>
  • Loading branch information
3 people authored May 7, 2021
1 parent f56ca09 commit 99d0593
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"local": "node .",
"prepublish": "tsc"
},
"dependencies": {},
"dependencies": {
},
"devDependencies": {
"@types/jest": "^26.0.19",
"@types/node": "^12",
Expand Down
1 change: 1 addition & 0 deletions src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface BatchReadWriteRequest {
id: string;
vid?: string;
resource: any;
ttlInSeconds?: number; // archive timestamp in Unix epoch time format in seconds
// GET requests, only contains the URL of the resource
fullUrl?: string;
references?: Reference[];
Expand Down
3 changes: 3 additions & 0 deletions src/persistence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@ export interface CreateResourceRequest {
resourceType: string;
resource: any;
id?: string;
ttlInSeconds?: number; // archive timestamp in Unix epoch time format in seconds
}

export interface UpdateResourceRequest {
id: string;
resourceType: string;
resource: any;
vid?: string; // used in version aware update
ttlInSeconds?: number; // archive timestamp in Unix epoch time format in seconds
}

export interface PatchResourceRequest {
id: string;
resourceType: string;
resource: any;
vid?: string; // used in version aware patch
ttlInSeconds?: number; // archive timestamp in Unix epoch time format in seconds
}

export interface ReadResourceRequest {
Expand Down

0 comments on commit 99d0593

Please sign in to comment.