@vertexvis/api-client-node 0.20.9 → 0.21.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.
- package/dist/cjs/api.d.ts +43 -1
- package/dist/cjs/api.js +176 -88
- package/dist/cjs/client/helpers/scene-items.d.ts +21 -0
- package/dist/cjs/client/helpers/scene-items.js +40 -1
- package/dist/cjs/client/helpers/scenes.d.ts +21 -38
- package/dist/cjs/client/helpers/scenes.js +231 -192
- package/dist/cjs/client/utils.d.ts +8 -1
- package/dist/cjs/client/utils.js +21 -2
- package/dist/cjs/client/version.d.ts +1 -1
- package/dist/cjs/client/version.js +1 -1
- package/dist/esm/api.d.ts +43 -1
- package/dist/esm/api.js +176 -88
- package/dist/esm/client/helpers/scene-items.d.ts +21 -0
- package/dist/esm/client/helpers/scene-items.js +38 -1
- package/dist/esm/client/helpers/scenes.d.ts +21 -38
- package/dist/esm/client/helpers/scenes.js +229 -188
- package/dist/esm/client/utils.d.ts +8 -1
- package/dist/esm/client/utils.js +18 -1
- package/dist/esm/client/version.d.ts +1 -1
- package/dist/esm/client/version.js +1 -1
- package/package.json +1 -1
package/dist/esm/client/utils.js
CHANGED
|
@@ -195,7 +195,11 @@ export function isEncoded(s) {
|
|
|
195
195
|
}
|
|
196
196
|
export function isApiError(error) {
|
|
197
197
|
const ae = error;
|
|
198
|
-
return defined(ae.
|
|
198
|
+
return defined(ae.status) && defined(ae.code);
|
|
199
|
+
}
|
|
200
|
+
export function isSceneItemRelationship(data) {
|
|
201
|
+
const rd = data;
|
|
202
|
+
return defined(rd.id) && defined(rd.type) && rd.type === 'scene-item';
|
|
199
203
|
}
|
|
200
204
|
export function isFailure(obj) {
|
|
201
205
|
const f = obj;
|
|
@@ -391,3 +395,16 @@ export function isWebhookValid(body, secret, signature) {
|
|
|
391
395
|
function arrayLenEq(a, b) {
|
|
392
396
|
return Array.isArray(a) && Array.isArray(b) && a.length === b.length;
|
|
393
397
|
}
|
|
398
|
+
/**
|
|
399
|
+
* Formats a number in seconds as a time formatted string.
|
|
400
|
+
* @param seconds number of seconds to be formatted
|
|
401
|
+
* @returns `string` in the form of HH:MM:SS based on input
|
|
402
|
+
*/
|
|
403
|
+
export function formatTime(seconds) {
|
|
404
|
+
const h = Math.floor(seconds / 3600);
|
|
405
|
+
const m = Math.floor((seconds % 3600) / 60);
|
|
406
|
+
const s = Math.round(seconds % 60);
|
|
407
|
+
return [h, m > 9 ? m : h ? '0' + m : m || '0', s > 9 ? s : '0' + s]
|
|
408
|
+
.filter(Boolean)
|
|
409
|
+
.join(':');
|
|
410
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "0.21.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.
|
|
1
|
+
export const version = '0.21.0';
|
package/package.json
CHANGED