@cirrobio/sdk 0.4.3 → 0.9.0

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.
Files changed (118) hide show
  1. package/README.md +7 -0
  2. package/dist/index.esm.js +759 -0
  3. package/dist/index.esm.js.map +1 -0
  4. package/dist/index.js +815 -19
  5. package/dist/index.js.map +1 -0
  6. package/dist/types/api/config.d.ts +6 -0
  7. package/dist/{api → types/api}/error-handler.d.ts +0 -4
  8. package/dist/types/api/error.d.ts +4 -0
  9. package/dist/types/api.d.ts +2 -0
  10. package/dist/types/auth/authentication-provider.d.ts +24 -0
  11. package/dist/types/auth/current-user.d.ts +16 -0
  12. package/dist/types/auth/static-token-auth.d.ts +11 -0
  13. package/dist/types/auth.d.ts +3 -0
  14. package/dist/types/data/data.service.d.ts +44 -0
  15. package/dist/types/data.d.ts +1 -0
  16. package/dist/{file → types/file}/calculate-size.d.ts +1 -1
  17. package/dist/{file → types/file}/file.service.d.ts +9 -6
  18. package/dist/types/file/manifest-parser.d.ts +14 -0
  19. package/dist/types/file/models/assets.d.ts +8 -0
  20. package/dist/{file → types/file/models}/file-object.model.d.ts +1 -1
  21. package/dist/types/file/models/file.d.ts +14 -0
  22. package/dist/types/file/models/folder.d.ts +13 -0
  23. package/dist/{file → types/file}/shared.d.ts +1 -1
  24. package/dist/types/file/util/get-parent.fn.d.ts +4 -0
  25. package/dist/{file.d.ts → types/file.d.ts} +5 -2
  26. package/dist/{index.d.ts → types/index.d.ts} +2 -0
  27. package/dist/types/util/get-resource-name.d.ts +1 -0
  28. package/dist/{util.d.ts → types/util.d.ts} +1 -0
  29. package/package.json +20 -15
  30. package/dist/api/error-handler.js +0 -37
  31. package/dist/api.d.ts +0 -1
  32. package/dist/api.js +0 -6
  33. package/dist/file/__test__/s3-utils.test.d.ts +0 -1
  34. package/dist/file/__test__/s3-utils.test.js +0 -16
  35. package/dist/file/actions/delete.fn.js +0 -15
  36. package/dist/file/actions/sign-url.fn.js +0 -27
  37. package/dist/file/actions/upload.fn.js +0 -23
  38. package/dist/file/calculate-size.js +0 -16
  39. package/dist/file/extensions.fn.js +0 -77
  40. package/dist/file/file-object.model.js +0 -8
  41. package/dist/file/file.service.js +0 -81
  42. package/dist/file/project-access-context.js +0 -24
  43. package/dist/file/shared.js +0 -11
  44. package/dist/file/util/credentials-mutex.so.js +0 -32
  45. package/dist/file/util/s3-client.js +0 -19
  46. package/dist/file/util/s3-utils.js +0 -17
  47. package/dist/file.js +0 -43
  48. package/dist/formatters/bytes-to-string.js +0 -30
  49. package/dist/formatters/json-pretty-print.js +0 -12
  50. package/dist/formatters/normalize-date.js +0 -16
  51. package/dist/formatters/normalize-string.js +0 -13
  52. package/dist/formatters/slash.js +0 -19
  53. package/dist/formatters/to-date-format.js +0 -16
  54. package/dist/formatters/to-friendly-name.js +0 -17
  55. package/dist/formatters/to-money.js +0 -16
  56. package/dist/formatters/to-pascal-case.js +0 -12
  57. package/dist/formatters/to-title-case.js +0 -14
  58. package/dist/formatters.js +0 -24
  59. package/dist/util/download.js +0 -22
  60. package/dist/util/extract-from-object.js +0 -15
  61. package/dist/util/handle-promise.js +0 -11
  62. package/dist/util.js +0 -10
  63. package/src/api/error-handler.ts +0 -36
  64. package/src/api.ts +0 -1
  65. package/src/file/__test__/s3-utils.test.ts +0 -17
  66. package/src/file/actions/delete.fn.ts +0 -18
  67. package/src/file/actions/sign-url.fn.ts +0 -36
  68. package/src/file/actions/upload.fn.ts +0 -30
  69. package/src/file/calculate-size.ts +0 -14
  70. package/src/file/extensions.fn.ts +0 -88
  71. package/src/file/file-object.model.ts +0 -57
  72. package/src/file/file.service.ts +0 -86
  73. package/src/file/project-access-context.ts +0 -26
  74. package/src/file/shared.ts +0 -7
  75. package/src/file/util/credentials-mutex.so.ts +0 -33
  76. package/src/file/util/s3-client.ts +0 -17
  77. package/src/file/util/s3-utils.ts +0 -14
  78. package/src/file.ts +0 -13
  79. package/src/formatters/__tests__/formatters.spec.ts +0 -65
  80. package/src/formatters/bytes-to-string.ts +0 -32
  81. package/src/formatters/json-pretty-print.ts +0 -8
  82. package/src/formatters/normalize-date.ts +0 -10
  83. package/src/formatters/normalize-string.ts +0 -8
  84. package/src/formatters/slash.ts +0 -15
  85. package/src/formatters/to-date-format.ts +0 -12
  86. package/src/formatters/to-friendly-name.ts +0 -14
  87. package/src/formatters/to-money.ts +0 -13
  88. package/src/formatters/to-pascal-case.ts +0 -8
  89. package/src/formatters/to-title-case.ts +0 -9
  90. package/src/formatters.ts +0 -10
  91. package/src/index.ts +0 -4
  92. package/src/util/download.ts +0 -18
  93. package/src/util/extract-from-object.ts +0 -11
  94. package/src/util/handle-promise.ts +0 -7
  95. package/src/util.ts +0 -3
  96. package/tsconfig.json +0 -21
  97. /package/dist/{file → types/file}/actions/delete.fn.d.ts +0 -0
  98. /package/dist/{file → types/file}/actions/sign-url.fn.d.ts +0 -0
  99. /package/dist/{file → types/file}/actions/upload.fn.d.ts +0 -0
  100. /package/dist/{file → types/file}/extensions.fn.d.ts +0 -0
  101. /package/dist/{file → types/file}/project-access-context.d.ts +0 -0
  102. /package/dist/{file → types/file}/util/credentials-mutex.so.d.ts +0 -0
  103. /package/dist/{file → types/file}/util/s3-client.d.ts +0 -0
  104. /package/dist/{file → types/file}/util/s3-utils.d.ts +0 -0
  105. /package/dist/{formatters → types/formatters}/bytes-to-string.d.ts +0 -0
  106. /package/dist/{formatters → types/formatters}/json-pretty-print.d.ts +0 -0
  107. /package/dist/{formatters → types/formatters}/normalize-date.d.ts +0 -0
  108. /package/dist/{formatters → types/formatters}/normalize-string.d.ts +0 -0
  109. /package/dist/{formatters → types/formatters}/slash.d.ts +0 -0
  110. /package/dist/{formatters → types/formatters}/to-date-format.d.ts +0 -0
  111. /package/dist/{formatters → types/formatters}/to-friendly-name.d.ts +0 -0
  112. /package/dist/{formatters → types/formatters}/to-money.d.ts +0 -0
  113. /package/dist/{formatters → types/formatters}/to-pascal-case.d.ts +0 -0
  114. /package/dist/{formatters → types/formatters}/to-title-case.d.ts +0 -0
  115. /package/dist/{formatters.d.ts → types/formatters.d.ts} +0 -0
  116. /package/dist/{util → types/util}/download.d.ts +0 -0
  117. /package/dist/{util → types/util}/extract-from-object.d.ts +0 -0
  118. /package/dist/{util → types/util}/handle-promise.d.ts +0 -0
@@ -1,9 +0,0 @@
1
- /**
2
- * Converts a string to Title case.
3
- * Ex., "hello world" -> "Hello world"
4
- * @param value
5
- */
6
- export function toTitleCase(value: string): string {
7
- if (!value) return null;
8
- return value[0].toUpperCase() + value.slice(1).toLowerCase();
9
- }
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
@@ -1,4 +0,0 @@
1
- export * from './file';
2
- export * from './api';
3
- export * from './formatters';
4
- export * from './util';
@@ -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
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * Ignores dangling promise rejections.
3
- * @param err The error to ignore.
4
- */
5
- export function handlePromiseError(err): void {
6
- console.warn(err);
7
- }
package/src/util.ts DELETED
@@ -1,3 +0,0 @@
1
- export { extractFromObject } from './util/extract-from-object'
2
- export { handlePromiseError } from './util/handle-promise'
3
- export { downloadBlob, downloadContent } from './util/download';
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