@cirrobio/sdk 0.4.3 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/index.esm.js +759 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +815 -19
- package/dist/index.js.map +1 -0
- package/dist/types/api/config.d.ts +6 -0
- package/dist/{api → types/api}/error-handler.d.ts +0 -4
- package/dist/types/api/error.d.ts +4 -0
- package/dist/types/api.d.ts +2 -0
- package/dist/types/auth/authentication-provider.d.ts +24 -0
- package/dist/types/auth/current-user.d.ts +16 -0
- package/dist/types/auth/static-token-auth.d.ts +11 -0
- package/dist/types/auth.d.ts +3 -0
- package/dist/types/data/data.service.d.ts +44 -0
- package/dist/types/data.d.ts +1 -0
- package/dist/{file → types/file}/calculate-size.d.ts +1 -1
- package/dist/{file → types/file}/file.service.d.ts +9 -6
- package/dist/types/file/manifest-parser.d.ts +14 -0
- package/dist/types/file/models/assets.d.ts +8 -0
- package/dist/{file → types/file/models}/file-object.model.d.ts +1 -1
- package/dist/types/file/models/file.d.ts +14 -0
- package/dist/types/file/models/folder.d.ts +13 -0
- package/dist/{file → types/file}/shared.d.ts +1 -1
- package/dist/types/file/util/get-parent.fn.d.ts +4 -0
- package/dist/{file.d.ts → types/file.d.ts} +5 -2
- package/dist/{index.d.ts → types/index.d.ts} +2 -0
- package/dist/types/util/get-resource-name.d.ts +1 -0
- package/dist/{util.d.ts → types/util.d.ts} +1 -0
- package/package.json +20 -15
- package/dist/api/error-handler.js +0 -37
- package/dist/api.d.ts +0 -1
- package/dist/api.js +0 -6
- package/dist/file/__test__/s3-utils.test.d.ts +0 -1
- package/dist/file/__test__/s3-utils.test.js +0 -16
- package/dist/file/actions/delete.fn.js +0 -15
- package/dist/file/actions/sign-url.fn.js +0 -27
- package/dist/file/actions/upload.fn.js +0 -23
- package/dist/file/calculate-size.js +0 -16
- package/dist/file/extensions.fn.js +0 -77
- package/dist/file/file-object.model.js +0 -8
- package/dist/file/file.service.js +0 -81
- package/dist/file/project-access-context.js +0 -24
- package/dist/file/shared.js +0 -11
- package/dist/file/util/credentials-mutex.so.js +0 -32
- package/dist/file/util/s3-client.js +0 -19
- package/dist/file/util/s3-utils.js +0 -17
- package/dist/file.js +0 -43
- package/dist/formatters/bytes-to-string.js +0 -30
- package/dist/formatters/json-pretty-print.js +0 -12
- package/dist/formatters/normalize-date.js +0 -16
- package/dist/formatters/normalize-string.js +0 -13
- package/dist/formatters/slash.js +0 -19
- package/dist/formatters/to-date-format.js +0 -16
- package/dist/formatters/to-friendly-name.js +0 -17
- package/dist/formatters/to-money.js +0 -16
- package/dist/formatters/to-pascal-case.js +0 -12
- package/dist/formatters/to-title-case.js +0 -14
- package/dist/formatters.js +0 -24
- package/dist/util/download.js +0 -22
- package/dist/util/extract-from-object.js +0 -15
- package/dist/util/handle-promise.js +0 -11
- package/dist/util.js +0 -10
- package/src/api/error-handler.ts +0 -36
- package/src/api.ts +0 -1
- package/src/file/__test__/s3-utils.test.ts +0 -17
- package/src/file/actions/delete.fn.ts +0 -18
- package/src/file/actions/sign-url.fn.ts +0 -36
- package/src/file/actions/upload.fn.ts +0 -30
- package/src/file/calculate-size.ts +0 -14
- package/src/file/extensions.fn.ts +0 -88
- package/src/file/file-object.model.ts +0 -57
- package/src/file/file.service.ts +0 -86
- package/src/file/project-access-context.ts +0 -26
- package/src/file/shared.ts +0 -7
- package/src/file/util/credentials-mutex.so.ts +0 -33
- package/src/file/util/s3-client.ts +0 -17
- package/src/file/util/s3-utils.ts +0 -14
- package/src/file.ts +0 -13
- package/src/formatters/__tests__/formatters.spec.ts +0 -65
- package/src/formatters/bytes-to-string.ts +0 -32
- package/src/formatters/json-pretty-print.ts +0 -8
- package/src/formatters/normalize-date.ts +0 -10
- package/src/formatters/normalize-string.ts +0 -8
- package/src/formatters/slash.ts +0 -15
- package/src/formatters/to-date-format.ts +0 -12
- package/src/formatters/to-friendly-name.ts +0 -14
- package/src/formatters/to-money.ts +0 -13
- package/src/formatters/to-pascal-case.ts +0 -8
- package/src/formatters/to-title-case.ts +0 -9
- package/src/formatters.ts +0 -10
- package/src/index.ts +0 -4
- package/src/util/download.ts +0 -18
- package/src/util/extract-from-object.ts +0 -11
- package/src/util/handle-promise.ts +0 -7
- package/src/util.ts +0 -3
- package/tsconfig.json +0 -21
- /package/dist/{file → types/file}/actions/delete.fn.d.ts +0 -0
- /package/dist/{file → types/file}/actions/sign-url.fn.d.ts +0 -0
- /package/dist/{file → types/file}/actions/upload.fn.d.ts +0 -0
- /package/dist/{file → types/file}/extensions.fn.d.ts +0 -0
- /package/dist/{file → types/file}/project-access-context.d.ts +0 -0
- /package/dist/{file → types/file}/util/credentials-mutex.so.d.ts +0 -0
- /package/dist/{file → types/file}/util/s3-client.d.ts +0 -0
- /package/dist/{file → types/file}/util/s3-utils.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/bytes-to-string.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/json-pretty-print.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/normalize-date.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/normalize-string.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/slash.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/to-date-format.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/to-friendly-name.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/to-money.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/to-pascal-case.d.ts +0 -0
- /package/dist/{formatters → types/formatters}/to-title-case.d.ts +0 -0
- /package/dist/{formatters.d.ts → types/formatters.d.ts} +0 -0
- /package/dist/{util → types/util}/download.d.ts +0 -0
- /package/dist/{util → types/util}/extract-from-object.d.ts +0 -0
- /package/dist/{util → types/util}/handle-promise.d.ts +0 -0
package/src/formatters.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { jsonPrettyPrint } from './formatters/json-pretty-print';
|
|
2
|
-
export { bytesToString } from './formatters/bytes-to-string';
|
|
3
|
-
export { normalizeDate } from './formatters/normalize-date';
|
|
4
|
-
export { normalizeString } from './formatters/normalize-string';
|
|
5
|
-
export { removeStartingSlash, removeEndingSlash } from './formatters/slash';
|
|
6
|
-
export { toDateFormat } from './formatters/to-date-format';
|
|
7
|
-
export { toFriendlyName } from './formatters/to-friendly-name';
|
|
8
|
-
export { toMoney } from './formatters/to-money';
|
|
9
|
-
export { toPascalCase } from './formatters/to-pascal-case';
|
|
10
|
-
export { toTitleCase } from './formatters/to-title-case';
|
package/src/index.ts
DELETED
package/src/util/download.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Download a blob as a file with the specified file name.
|
|
3
|
-
*/
|
|
4
|
-
export function downloadBlob(blob: Blob, fileName: string): void {
|
|
5
|
-
const url = window.URL.createObjectURL(blob);
|
|
6
|
-
const a = document.createElement('a');
|
|
7
|
-
a.href = url;
|
|
8
|
-
a.download = fileName;
|
|
9
|
-
a.click();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Downloads the specified content as a file with the specified file name and type.
|
|
14
|
-
*/
|
|
15
|
-
export function downloadContent(content: any, fileName: string, fileType = 'text/plain'): void {
|
|
16
|
-
const blob = new Blob([content], { type: fileType });
|
|
17
|
-
downloadBlob(blob, fileName);
|
|
18
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts a value from an object using the json path notation, i.e. $.test.id
|
|
3
|
-
* @param path JSON path to the value
|
|
4
|
-
* @param obj Object to extract the value from
|
|
5
|
-
*/
|
|
6
|
-
export function extractFromObject(path: string, obj: object): any {
|
|
7
|
-
const pathParts = path.slice(2).split('.')
|
|
8
|
-
return pathParts.reduce(function(o, k) {
|
|
9
|
-
return o && o[k];
|
|
10
|
-
}, obj);
|
|
11
|
-
}
|
package/src/util.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"target": "es2018",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"outDir": "dist",
|
|
8
|
-
"lib": [
|
|
9
|
-
"es2018",
|
|
10
|
-
"dom"
|
|
11
|
-
],
|
|
12
|
-
"typeRoots": [
|
|
13
|
-
"node_modules/@types"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
"exclude": [
|
|
17
|
-
"dist",
|
|
18
|
-
"node_modules",
|
|
19
|
-
"src/**/*.spec.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|