-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from nextcloud-libraries/enh/provide-ocs-result
- Loading branch information
Showing
5 changed files
with
78 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export interface OCSResponse<T = any> { | ||
ocs: { | ||
meta: { | ||
/** | ||
* Request success or failure state | ||
*/ | ||
status: 'ok' | 'failure' | ||
|
||
/** | ||
* Status code defaults to 100, but often HTTP status codes are used | ||
*/ | ||
statuscode: number | ||
|
||
/** | ||
* Message text | ||
*/ | ||
message: string | undefined | ||
|
||
/** | ||
* Optionally the total number of items available | ||
*/ | ||
totalitems: number | undefined | ||
/** | ||
* Optionally the the number of items per page | ||
*/ | ||
itemsperpage: number | undefined | ||
} | ||
data: T | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "commonjs", | ||
"declaration": true, | ||
"outDir": "./dist", | ||
"strict": true, | ||
"lib": [ | ||
"es6", | ||
"dom" | ||
] | ||
}, | ||
"include": [ | ||
"lib" | ||
], | ||
"exclude": [ | ||
"dist", | ||
"node_modules", | ||
"test" | ||
] | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"declaration": true, | ||
"moduleResolution": "Node", | ||
"outDir": "./dist", | ||
"strict": true, | ||
"lib": [ | ||
"ESNext", | ||
"DOM" | ||
] | ||
}, | ||
"include": [ | ||
"lib" | ||
], | ||
"exclude": [ | ||
"dist", | ||
"node_modules", | ||
"test" | ||
] | ||
} |