From 7b7cd07745665cffbef9f4bd7457bd180317217a Mon Sep 17 00:00:00 2001 From: dazzatronus <181476274+dazzatronus@users.noreply.github.com> Date: Wed, 8 Apr 2026 05:56:59 +0000 Subject: [PATCH] chore: regenerate SDK from @shotstack/schemas v1.10.6 --- .oas-version | 2 +- package-lock.json | 21 +- package.json | 5 +- src/ApiClient.js | 740 ------------- src/api/CreateApi.js | 127 --- src/api/EditApi.js | 424 -------- src/api/EndpointsApi.js | 157 --- src/api/IngestApi.js | 237 ----- src/api/ServeApi.js | 210 ---- src/index.js | 951 ----------------- src/model/Asset.js | 376 ------- src/model/AssetRenderResponse.js | 153 --- src/model/AssetResponse.js | 134 --- src/model/AssetResponseAttributes.js | 464 --------- src/model/AssetResponseData.js | 169 --- src/model/AudioAsset.js | 319 ------ src/model/AudioAssetVolume.js | 136 --- src/model/AudioEnhancement.js | 138 --- src/model/CaptionAsset.js | 327 ------ src/model/CaptionBackground.js | 199 ---- src/model/CaptionFont.js | 294 ------ src/model/CaptionMargin.js | 166 --- src/model/ChromaKey.js | 174 ---- src/model/Clip.js | 718 ------------- src/model/ClipLength.js | 135 --- src/model/ClipOpacity.js | 140 --- src/model/ClipStart.js | 135 --- src/model/Crop.js | 203 ---- src/model/DIDGeneratedAsset.js | 183 ---- src/model/DIDGeneratedAssetOptions.js | 149 --- src/model/DIDTextToAvatarOptions.js | 284 ----- src/model/Destinations.js | 11 - src/model/DolbyEnhancement.js | 170 --- src/model/DolbyEnhancementOptions.js | 188 ---- src/model/Edit.js | 303 ------ src/model/ElevenLabsGeneratedAsset.js | 183 ---- src/model/ElevenLabsGeneratedAssetOptions.js | 143 --- src/model/ElevenLabsTextToSpeechOptions.js | 271 ----- src/model/Enhancements.js | 111 -- src/model/FlipTransformation.js | 137 --- src/model/Font.js | 135 --- src/model/GeneratedAsset.js | 218 ---- src/model/GeneratedAssetErrorResponse.js | 153 --- src/model/GeneratedAssetErrorResponseData.js | 205 ---- src/model/GeneratedAssetResponse.js | 134 --- src/model/GeneratedAssetResponseAttributes.js | 422 -------- src/model/GeneratedAssetResponseData.js | 204 ---- src/model/GoogleCloudStorageDestination.js | 168 --- .../GoogleCloudStorageDestinationOptions.js | 201 ---- src/model/GoogleDriveDestination.js | 170 --- src/model/GoogleDriveDestinationOptions.js | 168 --- src/model/HeyGenGeneratedAsset.js | 183 ---- src/model/HeyGenGeneratedAssetOptions.js | 173 ---- src/model/HeyGenTextToAvatarOptions.js | 978 ------------------ src/model/HtmlAsset.js | 381 ------- src/model/ImageAsset.js | 203 ---- src/model/IngestErrorResponse.js | 153 --- src/model/IngestErrorResponseData.js | 205 ---- src/model/LumaAsset.js | 200 ---- src/model/MergeField.js | 166 --- src/model/MuxDestination.js | 168 --- src/model/MuxDestinationOptions.js | 163 --- src/model/Offset.js | 143 --- src/model/OffsetX.js | 136 --- src/model/OffsetY.js | 136 --- src/model/OpenAiGeneratedAsset.js | 183 ---- src/model/OpenAiGeneratedAssetOptions.js | 150 --- src/model/OpenAiTextGeneratorOptions.js | 270 ----- src/model/Output.js | 771 -------------- src/model/Outputs.js | 165 --- src/model/OutputsResponse.js | 133 --- src/model/Poster.js | 131 --- src/model/ProbeResponse.js | 197 ---- src/model/QueuedResponse.js | 200 ---- src/model/QueuedResponseData.js | 170 --- src/model/QueuedSourceResponse.js | 134 --- src/model/QueuedSourceResponseData.js | 170 --- src/model/Range.js | 139 --- src/model/RenderResponse.js | 200 ---- src/model/RenderResponseData.js | 564 ---------- src/model/Rendition.js | 653 ------------ src/model/RenditionResponseAttributes.js | 416 -------- src/model/RotateTransformation.js | 111 -- src/model/RotateTransformationAngle.js | 143 --- src/model/S3Destination.js | 168 --- src/model/S3DestinationOptions.js | 269 ----- src/model/ShotstackDestination.js | 165 --- src/model/ShotstackGeneratedAsset.js | 183 ---- src/model/ShotstackGeneratedAssetOptions.js | 244 ----- src/model/ShotstackImageToVideoOptions.js | 244 ----- src/model/ShotstackTextGeneratorOptions.js | 184 ---- src/model/ShotstackTextToImageOptions.js | 246 ----- src/model/ShotstackTextToSpeechOptions.js | 729 ------------- src/model/Size.js | 141 --- src/model/SkewTransformation.js | 143 --- src/model/SkewTransformationX.js | 136 --- src/model/SkewTransformationY.js | 136 --- src/model/Soundtrack.js | 220 ---- src/model/Source.js | 209 ---- src/model/SourceListResponse.js | 153 --- src/model/SourceResponse.js | 134 --- src/model/SourceResponseAttributes.js | 525 ---------- src/model/SourceResponseData.js | 204 ---- src/model/Speed.js | 139 --- src/model/StabilityAiGeneratedAsset.js | 183 ---- src/model/StabilityAiGeneratedAssetOptions.js | 184 ---- src/model/StabilityAiTextToImageOptions.js | 529 ---------- src/model/Template.js | 167 --- src/model/TemplateDataResponse.js | 200 ---- src/model/TemplateDataResponseData.js | 239 ----- src/model/TemplateListResponse.js | 200 ---- src/model/TemplateListResponseData.js | 188 ---- src/model/TemplateListResponseItem.js | 236 ----- src/model/TemplateRender.js | 186 ---- src/model/TemplateResponse.js | 200 ---- src/model/TemplateResponseData.js | 170 --- src/model/TextAlignment.js | 191 ---- src/model/TextAsset.js | 325 ------ src/model/TextBackground.js | 112 -- src/model/TextFont.js | 261 ----- src/model/Thumbnail.js | 164 --- src/model/Timeline.js | 298 ------ src/model/TitleAsset.js | 522 ---------- src/model/Track.js | 153 --- src/model/Transcription.js | 130 --- src/model/Transfer.js | 223 ---- src/model/TransferResponse.js | 134 --- src/model/TransferResponseAttributes.js | 229 ---- src/model/TransferResponseData.js | 144 --- src/model/Transformation.js | 175 ---- src/model/Transition.js | 771 -------------- src/model/Tween.js | 246 ----- src/model/UploadResponse.js | 134 --- src/model/UploadResponseAttributes.js | 205 ---- src/model/UploadResponseData.js | 204 ---- src/model/VideoAsset.js | 383 ------- src/model/VideoAssetVolume.js | 136 --- src/model/VimeoDestination.js | 168 --- src/model/VimeoDestinationOptions.js | 177 ---- src/model/VimeoDestinationPrivacyOptions.js | 257 ----- 140 files changed, 24 insertions(+), 32825 deletions(-) delete mode 100644 src/ApiClient.js delete mode 100644 src/api/CreateApi.js delete mode 100644 src/api/EditApi.js delete mode 100644 src/api/EndpointsApi.js delete mode 100644 src/api/IngestApi.js delete mode 100644 src/api/ServeApi.js delete mode 100644 src/index.js delete mode 100644 src/model/Asset.js delete mode 100644 src/model/AssetRenderResponse.js delete mode 100644 src/model/AssetResponse.js delete mode 100644 src/model/AssetResponseAttributes.js delete mode 100644 src/model/AssetResponseData.js delete mode 100644 src/model/AudioAsset.js delete mode 100644 src/model/AudioAssetVolume.js delete mode 100644 src/model/AudioEnhancement.js delete mode 100644 src/model/CaptionAsset.js delete mode 100644 src/model/CaptionBackground.js delete mode 100644 src/model/CaptionFont.js delete mode 100644 src/model/CaptionMargin.js delete mode 100644 src/model/ChromaKey.js delete mode 100644 src/model/Clip.js delete mode 100644 src/model/ClipLength.js delete mode 100644 src/model/ClipOpacity.js delete mode 100644 src/model/ClipStart.js delete mode 100644 src/model/Crop.js delete mode 100644 src/model/DIDGeneratedAsset.js delete mode 100644 src/model/DIDGeneratedAssetOptions.js delete mode 100644 src/model/DIDTextToAvatarOptions.js delete mode 100644 src/model/Destinations.js delete mode 100644 src/model/DolbyEnhancement.js delete mode 100644 src/model/DolbyEnhancementOptions.js delete mode 100644 src/model/Edit.js delete mode 100644 src/model/ElevenLabsGeneratedAsset.js delete mode 100644 src/model/ElevenLabsGeneratedAssetOptions.js delete mode 100644 src/model/ElevenLabsTextToSpeechOptions.js delete mode 100644 src/model/Enhancements.js delete mode 100644 src/model/FlipTransformation.js delete mode 100644 src/model/Font.js delete mode 100644 src/model/GeneratedAsset.js delete mode 100644 src/model/GeneratedAssetErrorResponse.js delete mode 100644 src/model/GeneratedAssetErrorResponseData.js delete mode 100644 src/model/GeneratedAssetResponse.js delete mode 100644 src/model/GeneratedAssetResponseAttributes.js delete mode 100644 src/model/GeneratedAssetResponseData.js delete mode 100644 src/model/GoogleCloudStorageDestination.js delete mode 100644 src/model/GoogleCloudStorageDestinationOptions.js delete mode 100644 src/model/GoogleDriveDestination.js delete mode 100644 src/model/GoogleDriveDestinationOptions.js delete mode 100644 src/model/HeyGenGeneratedAsset.js delete mode 100644 src/model/HeyGenGeneratedAssetOptions.js delete mode 100644 src/model/HeyGenTextToAvatarOptions.js delete mode 100644 src/model/HtmlAsset.js delete mode 100644 src/model/ImageAsset.js delete mode 100644 src/model/IngestErrorResponse.js delete mode 100644 src/model/IngestErrorResponseData.js delete mode 100644 src/model/LumaAsset.js delete mode 100644 src/model/MergeField.js delete mode 100644 src/model/MuxDestination.js delete mode 100644 src/model/MuxDestinationOptions.js delete mode 100644 src/model/Offset.js delete mode 100644 src/model/OffsetX.js delete mode 100644 src/model/OffsetY.js delete mode 100644 src/model/OpenAiGeneratedAsset.js delete mode 100644 src/model/OpenAiGeneratedAssetOptions.js delete mode 100644 src/model/OpenAiTextGeneratorOptions.js delete mode 100644 src/model/Output.js delete mode 100644 src/model/Outputs.js delete mode 100644 src/model/OutputsResponse.js delete mode 100644 src/model/Poster.js delete mode 100644 src/model/ProbeResponse.js delete mode 100644 src/model/QueuedResponse.js delete mode 100644 src/model/QueuedResponseData.js delete mode 100644 src/model/QueuedSourceResponse.js delete mode 100644 src/model/QueuedSourceResponseData.js delete mode 100644 src/model/Range.js delete mode 100644 src/model/RenderResponse.js delete mode 100644 src/model/RenderResponseData.js delete mode 100644 src/model/Rendition.js delete mode 100644 src/model/RenditionResponseAttributes.js delete mode 100644 src/model/RotateTransformation.js delete mode 100644 src/model/RotateTransformationAngle.js delete mode 100644 src/model/S3Destination.js delete mode 100644 src/model/S3DestinationOptions.js delete mode 100644 src/model/ShotstackDestination.js delete mode 100644 src/model/ShotstackGeneratedAsset.js delete mode 100644 src/model/ShotstackGeneratedAssetOptions.js delete mode 100644 src/model/ShotstackImageToVideoOptions.js delete mode 100644 src/model/ShotstackTextGeneratorOptions.js delete mode 100644 src/model/ShotstackTextToImageOptions.js delete mode 100644 src/model/ShotstackTextToSpeechOptions.js delete mode 100644 src/model/Size.js delete mode 100644 src/model/SkewTransformation.js delete mode 100644 src/model/SkewTransformationX.js delete mode 100644 src/model/SkewTransformationY.js delete mode 100644 src/model/Soundtrack.js delete mode 100644 src/model/Source.js delete mode 100644 src/model/SourceListResponse.js delete mode 100644 src/model/SourceResponse.js delete mode 100644 src/model/SourceResponseAttributes.js delete mode 100644 src/model/SourceResponseData.js delete mode 100644 src/model/Speed.js delete mode 100644 src/model/StabilityAiGeneratedAsset.js delete mode 100644 src/model/StabilityAiGeneratedAssetOptions.js delete mode 100644 src/model/StabilityAiTextToImageOptions.js delete mode 100644 src/model/Template.js delete mode 100644 src/model/TemplateDataResponse.js delete mode 100644 src/model/TemplateDataResponseData.js delete mode 100644 src/model/TemplateListResponse.js delete mode 100644 src/model/TemplateListResponseData.js delete mode 100644 src/model/TemplateListResponseItem.js delete mode 100644 src/model/TemplateRender.js delete mode 100644 src/model/TemplateResponse.js delete mode 100644 src/model/TemplateResponseData.js delete mode 100644 src/model/TextAlignment.js delete mode 100644 src/model/TextAsset.js delete mode 100644 src/model/TextBackground.js delete mode 100644 src/model/TextFont.js delete mode 100644 src/model/Thumbnail.js delete mode 100644 src/model/Timeline.js delete mode 100644 src/model/TitleAsset.js delete mode 100644 src/model/Track.js delete mode 100644 src/model/Transcription.js delete mode 100644 src/model/Transfer.js delete mode 100644 src/model/TransferResponse.js delete mode 100644 src/model/TransferResponseAttributes.js delete mode 100644 src/model/TransferResponseData.js delete mode 100644 src/model/Transformation.js delete mode 100644 src/model/Transition.js delete mode 100644 src/model/Tween.js delete mode 100644 src/model/UploadResponse.js delete mode 100644 src/model/UploadResponseAttributes.js delete mode 100644 src/model/UploadResponseData.js delete mode 100644 src/model/VideoAsset.js delete mode 100644 src/model/VideoAssetVolume.js delete mode 100644 src/model/VimeoDestination.js delete mode 100644 src/model/VimeoDestinationOptions.js delete mode 100644 src/model/VimeoDestinationPrivacyOptions.js diff --git a/.oas-version b/.oas-version index 18b3114..7b4d9a4 100644 --- a/.oas-version +++ b/.oas-version @@ -1 +1 @@ -1.10.4 +1.10.6 diff --git a/package-lock.json b/package-lock.json index 05c64f8..39ab549 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,19 @@ { "name": "shotstack-sdk", - "version": "1.10.4", + "version": "1.10.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "shotstack-sdk", - "version": "1.10.4", + "version": "1.10.6", "license": "MIT", "dependencies": { "@babel/cli": "^7.0.0", "superagent": "^5.3.0" + }, + "devDependencies": { + "typescript": "^5.7.0" } }, "node_modules/@ampproject/remapping": { @@ -1333,6 +1336,20 @@ "node": ">=8.0" } }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.15", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz", diff --git a/package.json b/package.json index 6b0721a..2a8c3b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shotstack-sdk", - "version": "1.10.4", + "version": "1.10.6", "description": "Official Node SDK for the Shotstack Cloud Video Editing API", "license": "MIT", "main": "src/index.js", @@ -23,5 +23,8 @@ "dependencies": { "@babel/cli": "^7.0.0", "superagent": "^5.3.0" + }, + "devDependencies": { + "typescript": "^5.7.0" } } diff --git a/src/ApiClient.js b/src/ApiClient.js deleted file mode 100644 index 8372258..0000000 --- a/src/ApiClient.js +++ /dev/null @@ -1,740 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _superagent = _interopRequireDefault(require("superagent")); -var _querystring = _interopRequireDefault(require("querystring")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** -* @module ApiClient -* @version 0.2.9 -*/ -/** -* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an -* application to use this class directly - the *Api and model classes provide the public API for the service. The -* contents of this file should be regarded as internal but are documented for completeness. -* @alias module:ApiClient -* @class -*/ -var ApiClient = /*#__PURE__*/function () { - /** - * The base URL against which to resolve every API call's (relative) path. - * Overrides the default value set in spec file if present - * @param {String} basePath - */ - function ApiClient() { - var basePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'https://api.shotstack.io/edit/v1'; - _classCallCheck(this, ApiClient); - /** - * The base URL against which to resolve every API call's (relative) path. - * @type {String} - * @default https://api.shotstack.io/edit/v1 - */ - this.basePath = basePath.replace(/\/+$/, ''); - - /** - * The authentication methods to be included for all API calls. - * @type {Array.} - */ - this.authentications = { - 'DeveloperKey': { - type: 'apiKey', - 'in': 'header', - name: 'x-api-key' - } - }; - - /** - * The default HTTP headers to be included for all API calls. - * @type {Array.} - * @default {} - */ - this.defaultHeaders = { - 'User-Agent': 'OpenAPI-Generator/0.2.9/Javascript' - }; - - /** - * The default HTTP timeout for all API calls. - * @type {Number} - * @default 60000 - */ - this.timeout = 60000; - - /** - * If set to false an additional timestamp parameter is added to all API GET calls to - * prevent browser caching - * @type {Boolean} - * @default true - */ - this.cache = true; - - /** - * If set to true, the client will save the cookies from each server - * response, and return them in the next request. - * @default false - */ - this.enableCookies = false; - - /* - * Used to save and return cookies in a node.js (non-browser) setting, - * if this.enableCookies is set to true. - */ - if (typeof window === 'undefined') { - this.agent = new _superagent["default"].agent(); - } - - /* - * Allow user to override superagent agent - */ - this.requestAgent = null; - - /* - * Allow user to add superagent plugins - */ - this.plugins = null; - } - - /** - * Returns a string representation for an actual parameter. - * @param param The actual parameter. - * @returns {String} The string representation of param. - */ - return _createClass(ApiClient, [{ - key: "paramToString", - value: function paramToString(param) { - if (param == undefined || param == null) { - return ''; - } - if (param instanceof Date) { - return param.toJSON(); - } - if (ApiClient.canBeJsonified(param)) { - return JSON.stringify(param); - } - return param.toString(); - } - - /** - * Returns a boolean indicating if the parameter could be JSON.stringified - * @param param The actual parameter - * @returns {Boolean} Flag indicating if param can be JSON.stringified - */ - }, { - key: "buildUrl", - value: - /** - * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. - * NOTE: query parameters are not handled here. - * @param {String} path The path to append to the base URL. - * @param {Object} pathParams The parameter values to append. - * @param {String} apiBasePath Base path defined in the path, operation level to override the default one - * @returns {String} The encoded path with parameter values substituted. - */ - function buildUrl(path, pathParams, apiBasePath) { - var _this = this; - if (!path.match(/^\//)) { - path = '/' + path; - } - var url = this.basePath + path; - - // use API (operation, path) base path if defined - if (apiBasePath !== null && apiBasePath !== undefined) { - url = apiBasePath + path; - } - url = url.replace(/\{([\w-\.#]+)\}/g, function (fullMatch, key) { - var value; - if (pathParams.hasOwnProperty(key)) { - value = _this.paramToString(pathParams[key]); - } else { - value = fullMatch; - } - return encodeURIComponent(value); - }); - return url; - } - - /** - * Checks whether the given content type represents JSON.
- * JSON content type examples:
- * - * @param {String} contentType The MIME content type to check. - * @returns {Boolean} true if contentType represents JSON, otherwise false. - */ - }, { - key: "isJsonMime", - value: function isJsonMime(contentType) { - return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); - } - - /** - * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. - * @param {Array.} contentTypes - * @returns {String} The chosen content type, preferring JSON. - */ - }, { - key: "jsonPreferredMime", - value: function jsonPreferredMime(contentTypes) { - for (var i = 0; i < contentTypes.length; i++) { - if (this.isJsonMime(contentTypes[i])) { - return contentTypes[i]; - } - } - return contentTypes[0]; - } - - /** - * Checks whether the given parameter value represents file-like content. - * @param param The parameter to check. - * @returns {Boolean} true if param represents a file. - */ - }, { - key: "isFileParam", - value: function isFileParam(param) { - // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) - if (typeof require === 'function') { - var fs; - try { - fs = require('fs'); - } catch (err) {} - if (fs && fs.ReadStream && param instanceof fs.ReadStream) { - return true; - } - } - - // Buffer in Node.js - if (typeof Buffer === 'function' && param instanceof Buffer) { - return true; - } - - // Blob in browser - if (typeof Blob === 'function' && param instanceof Blob) { - return true; - } - - // File in browser (it seems File object is also instance of Blob, but keep this for safe) - if (typeof File === 'function' && param instanceof File) { - return true; - } - return false; - } - - /** - * Normalizes parameter values: - *
    - *
  • remove nils
  • - *
  • keep files and arrays
  • - *
  • format to string with `paramToString` for other cases
  • - *
- * @param {Object.} params The parameters as object properties. - * @returns {Object.} normalized parameters. - */ - }, { - key: "normalizeParams", - value: function normalizeParams(params) { - var newParams = {}; - for (var key in params) { - if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { - var value = params[key]; - if (this.isFileParam(value) || Array.isArray(value)) { - newParams[key] = value; - } else { - newParams[key] = this.paramToString(value); - } - } - } - return newParams; - } - - /** - * Builds a string representation of an array-type actual parameter, according to the given collection format. - * @param {Array} param An array parameter. - * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. - * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns - * param as is if collectionFormat is multi. - */ - }, { - key: "buildCollectionParam", - value: function buildCollectionParam(param, collectionFormat) { - if (param == null) { - return null; - } - switch (collectionFormat) { - case 'csv': - return param.map(this.paramToString, this).join(','); - case 'ssv': - return param.map(this.paramToString, this).join(' '); - case 'tsv': - return param.map(this.paramToString, this).join('\t'); - case 'pipes': - return param.map(this.paramToString, this).join('|'); - case 'multi': - //return the array directly as SuperAgent will handle it as expected - return param.map(this.paramToString, this); - case 'passthrough': - return param; - default: - throw new Error('Unknown collection format: ' + collectionFormat); - } - } - - /** - * Applies authentication headers to the request. - * @param {Object} request The request object created by a superagent() call. - * @param {Array.} authNames An array of authentication method names. - */ - }, { - key: "applyAuthToRequest", - value: function applyAuthToRequest(request, authNames) { - var _this2 = this; - authNames.forEach(function (authName) { - var auth = _this2.authentications[authName]; - switch (auth.type) { - case 'basic': - if (auth.username || auth.password) { - request.auth(auth.username || '', auth.password || ''); - } - break; - case 'bearer': - if (auth.accessToken) { - var localVarBearerToken = typeof auth.accessToken === 'function' ? auth.accessToken() : auth.accessToken; - request.set({ - 'Authorization': 'Bearer ' + localVarBearerToken - }); - } - break; - case 'apiKey': - if (auth.apiKey) { - var data = {}; - if (auth.apiKeyPrefix) { - data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; - } else { - data[auth.name] = auth.apiKey; - } - if (auth['in'] === 'header') { - request.set(data); - } else { - request.query(data); - } - } - break; - case 'oauth2': - if (auth.accessToken) { - request.set({ - 'Authorization': 'Bearer ' + auth.accessToken - }); - } - break; - default: - throw new Error('Unknown authentication type: ' + auth.type); - } - }); - } - - /** - * Deserializes an HTTP response body into a value of the specified type. - * @param {Object} response A SuperAgent response object. - * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns A value of the specified type. - */ - }, { - key: "deserialize", - value: function deserialize(response, returnType) { - if (response == null || returnType == null || response.status == 204) { - return null; - } - - // Rely on SuperAgent for parsing response body. - // See http://visionmedia.github.io/superagent/#parsing-response-bodies - var data = response.body; - if (data == null || _typeof(data) === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length) { - // SuperAgent does not always produce a body; use the unparsed response as a fallback - data = response.text; - } - return ApiClient.convertToType(data, returnType); - } - - /** - * Invokes the REST service using the supplied settings and parameters. - * @param {String} path The base URL to invoke. - * @param {String} httpMethod The HTTP method to use. - * @param {Object.} pathParams A map of path parameters and their values. - * @param {Object.} queryParams A map of query parameters and their values. - * @param {Object.} headerParams A map of header parameters and their values. - * @param {Object.} formParams A map of form parameters and their values. - * @param {Object} bodyParam The value to pass as the request body. - * @param {Array.} authNames An array of authentication type names. - * @param {Array.} contentTypes An array of request MIME types. - * @param {Array.} accepts An array of acceptable response MIME types. - * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the - * constructor for a complex type. - * @param {String} apiBasePath base path defined in the operation/path level to override the default one - * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object. - */ - }, { - key: "callApi", - value: function callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, apiBasePath) { - var _this3 = this; - var url = this.buildUrl(path, pathParams, apiBasePath); - var request = (0, _superagent["default"])(httpMethod, url); - if (this.plugins !== null) { - for (var index in this.plugins) { - if (this.plugins.hasOwnProperty(index)) { - request.use(this.plugins[index]); - } - } - } - - // apply authentications - this.applyAuthToRequest(request, authNames); - - // set query parameters - if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { - queryParams['_'] = new Date().getTime(); - } - request.query(this.normalizeParams(queryParams)); - - // set header parameters - request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - - // set requestAgent if it is set by user - if (this.requestAgent) { - request.agent(this.requestAgent); - } - - // set request timeout - request.timeout(this.timeout); - var contentType = this.jsonPreferredMime(contentTypes); - if (contentType) { - // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) - if (contentType != 'multipart/form-data') { - request.type(contentType); - } - } - if (contentType === 'application/x-www-form-urlencoded') { - request.send(_querystring["default"].stringify(this.normalizeParams(formParams))); - } else if (contentType == 'multipart/form-data') { - var _formParams = this.normalizeParams(formParams); - for (var key in _formParams) { - if (_formParams.hasOwnProperty(key)) { - var _formParamsValue = _formParams[key]; - if (this.isFileParam(_formParamsValue)) { - // file field - request.attach(key, _formParamsValue); - } else if (Array.isArray(_formParamsValue) && _formParamsValue.length && this.isFileParam(_formParamsValue[0])) { - // multiple files - _formParamsValue.forEach(function (file) { - return request.attach(key, file); - }); - } else { - request.field(key, _formParamsValue); - } - } - } - } else if (bodyParam !== null && bodyParam !== undefined) { - if (!request.header['Content-Type']) { - request.type('application/json'); - } - request.send(bodyParam); - } - var accept = this.jsonPreferredMime(accepts); - if (accept) { - request.accept(accept); - } - if (returnType === 'Blob') { - request.responseType('blob'); - } else if (returnType === 'String') { - request.responseType('text'); - } - - // Attach previously saved cookies, if enabled - if (this.enableCookies) { - if (typeof window === 'undefined') { - this.agent._attachCookies(request); - } else { - request.withCredentials(); - } - } - return new Promise(function (resolve, reject) { - request.end(function (error, response) { - if (error) { - var err = {}; - if (response) { - err.status = response.status; - err.statusText = response.statusText; - err.body = response.body; - err.response = response; - } - err.error = error; - reject(err); - } else { - try { - var data = _this3.deserialize(response, returnType); - if (_this3.enableCookies && typeof window === 'undefined') { - _this3.agent._saveCookies(response); - } - resolve({ - data: data, - response: response - }); - } catch (err) { - reject(err); - } - } - }); - }); - } - - /** - * Parses an ISO-8601 string representation or epoch representation of a date value. - * @param {String} str The date value as a string. - * @returns {Date} The parsed date object. - */ - }, { - key: "hostSettings", - value: - /** - * Gets an array of host settings - * @returns An array of host settings - */ - function hostSettings() { - return [{ - 'url': "https://api.shotstack.io/edit/{version}", - 'description': "No description provided", - 'variables': { - version: { - 'description': "Set the stage to **v1** for production usage without watermarks. Set to **stage** to use the development sandbox.", - 'default_value': "v1", - 'enum_values': ["v1", "stage"] - } - } - }, { - 'url': "https://api.shotstack.io/serve/{version}", - 'description': "No description provided", - 'variables': { - version: { - 'description': "Set the stage to **v1** for production usage. Set to **stage** to use the development sandbox.", - 'default_value': "v1", - 'enum_values': ["v1", "stage"] - } - } - }, { - 'url': "https://api.shotstack.io/ingest/{version}", - 'description': "No description provided", - 'variables': { - version: { - 'description': "Set the stage to **v1** for production usage. Set to **stage** to use the development sandbox.", - 'default_value': "v1", - 'enum_values': ["v1", "stage"] - } - } - }, { - 'url': "https://api.shotstack.io/create/{version}", - 'description': "No description provided", - 'variables': { - version: { - 'description': "Set the stage to **v1** for production usage. Set to **stage** to use the development sandbox.", - 'default_value': "v1", - 'enum_values': ["v1", "stage"] - } - } - }]; - } - }, { - key: "getBasePathFromSettings", - value: function getBasePathFromSettings(index) { - var variables = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var servers = this.hostSettings(); - - // check array index out of bound - if (index < 0 || index >= servers.length) { - throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length); - } - var server = servers[index]; - var url = server['url']; - - // go through variable and assign a value - for (var variable_name in server['variables']) { - if (variable_name in variables) { - var variable = server['variables'][variable_name]; - if (!('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name])) { - url = url.replace("{" + variable_name + "}", variables[variable_name]); - } else { - throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + "."); - } - } else { - // use default value - url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']); - } - } - return url; - } - - /** - * Constructs a new map or array model from REST data. - * @param data {Object|Array} The REST data. - * @param obj {Object|Array} The target object or array. - */ - }], [{ - key: "canBeJsonified", - value: function canBeJsonified(str) { - if (typeof str !== 'string' && _typeof(str) !== 'object') return false; - try { - var type = str.toString(); - return type === '[object Object]' || type === '[object Array]'; - } catch (err) { - return false; - } - } - }, { - key: "parseDate", - value: function parseDate(str) { - if (isNaN(str)) { - return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); - } - return new Date(+str); - } - - /** - * Converts a value to the specified type. - * @param {(String|Object)} data The data to convert, as a string or object. - * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns An instance of the specified type or null or undefined if data is null or undefined. - */ - }, { - key: "convertToType", - value: function convertToType(data, type) { - if (data === null || data === undefined) return data; - switch (type) { - case 'Boolean': - return Boolean(data); - case 'Integer': - return parseInt(data, 10); - case 'Number': - return parseFloat(data); - case 'String': - return String(data); - case 'Date': - return ApiClient.parseDate(String(data)); - case 'Blob': - return data; - default: - if (type === Object) { - // generic object, return directly - return data; - } else if (typeof type.constructFromObject === 'function') { - // for model type like User and enum class - return type.constructFromObject(data); - } else if (Array.isArray(type)) { - // for array type like: ['String'] - var itemType = type[0]; - return data.map(function (item) { - return ApiClient.convertToType(item, itemType); - }); - } else if (_typeof(type) === 'object') { - // for plain object type like: {'String': 'Integer'} - var keyType, valueType; - for (var k in type) { - if (type.hasOwnProperty(k)) { - keyType = k; - valueType = type[k]; - break; - } - } - var result = {}; - for (var k in data) { - if (data.hasOwnProperty(k)) { - var key = ApiClient.convertToType(k, keyType); - var value = ApiClient.convertToType(data[k], valueType); - result[key] = value; - } - } - return result; - } else { - // for unknown type, return the data directly - return data; - } - } - } - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj, itemType) { - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - if (data.hasOwnProperty(i)) obj[i] = ApiClient.convertToType(data[i], itemType); - } - } else { - for (var k in data) { - if (data.hasOwnProperty(k)) obj[k] = ApiClient.convertToType(data[k], itemType); - } - } - } - }]); -}(); -/** - * Enumeration of collection format separator strategies. - * @enum {String} - * @readonly - */ -ApiClient.CollectionFormatEnum = { - /** - * Comma-separated values. Value: csv - * @const - */ - CSV: ',', - /** - * Space-separated values. Value: ssv - * @const - */ - SSV: ' ', - /** - * Tab-separated values. Value: tsv - * @const - */ - TSV: '\t', - /** - * Pipe(|)-separated values. Value: pipes - * @const - */ - PIPES: '|', - /** - * Native array. Value: multi - * @const - */ - MULTI: 'multi' -}; - -/** -* The default API client implementation. -* @type {module:ApiClient} -*/ -ApiClient.instance = new ApiClient(); -var _default = exports["default"] = ApiClient; \ No newline at end of file diff --git a/src/api/CreateApi.js b/src/api/CreateApi.js deleted file mode 100644 index fbe870f..0000000 --- a/src/api/CreateApi.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _GeneratedAsset = _interopRequireDefault(require("../model/GeneratedAsset")); -var _GeneratedAssetErrorResponse = _interopRequireDefault(require("../model/GeneratedAssetErrorResponse")); -var _GeneratedAssetResponse = _interopRequireDefault(require("../model/GeneratedAssetResponse")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** -* Create service. -* @module api/CreateApi -* @version 0.2.9 -*/ -var CreateApi = exports["default"] = /*#__PURE__*/function () { - /** - * Constructs a new CreateApi. - * @alias module:api/CreateApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - function CreateApi(apiClient) { - _classCallCheck(this, CreateApi); - this.apiClient = apiClient || _ApiClient["default"].instance; - } - - /** - * Get Generated Asset - * Get the generated assets status, url and details by ID. **Base URL:** https://api.shotstack.io/create/{version} - * @param {String} id The id of the source file in [KSUID](https://github.com/segmentio/ksuid#what-is-a-ksuid) format. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GeneratedAssetResponse} and HTTP response - */ - return _createClass(CreateApi, [{ - key: "getGeneratedAssetWithHttpInfo", - value: function getGeneratedAssetWithHttpInfo(id) { - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getGeneratedAsset"); - } - var pathParams = { - 'id': id - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _GeneratedAssetResponse["default"]; - return this.apiClient.callApi('/assets/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Get Generated Asset - * Get the generated assets status, url and details by ID. **Base URL:** https://api.shotstack.io/create/{version} - * @param {String} id The id of the source file in [KSUID](https://github.com/segmentio/ksuid#what-is-a-ksuid) format. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GeneratedAssetResponse} - */ - }, { - key: "getGeneratedAsset", - value: function getGeneratedAsset(id) { - return this.getGeneratedAssetWithHttpInfo(id).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Generate Asset - * Generate an asset using a Shotstack or third party provider. Chose the provider, type of asset and provide prompts, inputs and options to generate the asset. Once generated the asset can be used with the [Edit](#tocs_edit) API or downloaded. **Base URL:** https://api.shotstack.io/create/{version} - * @param {module:model/GeneratedAsset} generatedAsset Generate an asset using the specified provider, type and options. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GeneratedAssetResponse} and HTTP response - */ - }, { - key: "postGenerateAssetWithHttpInfo", - value: function postGenerateAssetWithHttpInfo(generatedAsset) { - var postBody = generatedAsset; - // verify the required parameter 'generatedAsset' is set - if (generatedAsset === undefined || generatedAsset === null) { - throw new Error("Missing the required parameter 'generatedAsset' when calling postGenerateAsset"); - } - var pathParams = {}; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = ['application/json']; - var accepts = ['application/json']; - var returnType = _GeneratedAssetResponse["default"]; - return this.apiClient.callApi('/assets', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Generate Asset - * Generate an asset using a Shotstack or third party provider. Chose the provider, type of asset and provide prompts, inputs and options to generate the asset. Once generated the asset can be used with the [Edit](#tocs_edit) API or downloaded. **Base URL:** https://api.shotstack.io/create/{version} - * @param {module:model/GeneratedAsset} generatedAsset Generate an asset using the specified provider, type and options. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GeneratedAssetResponse} - */ - }, { - key: "postGenerateAsset", - value: function postGenerateAsset(generatedAsset) { - return this.postGenerateAssetWithHttpInfo(generatedAsset).then(function (response_and_data) { - return response_and_data.data; - }); - } - }]); -}(); \ No newline at end of file diff --git a/src/api/EditApi.js b/src/api/EditApi.js deleted file mode 100644 index 01e45d0..0000000 --- a/src/api/EditApi.js +++ /dev/null @@ -1,424 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Edit = _interopRequireDefault(require("../model/Edit")); -var _ProbeResponse = _interopRequireDefault(require("../model/ProbeResponse")); -var _QueuedResponse = _interopRequireDefault(require("../model/QueuedResponse")); -var _RenderResponse = _interopRequireDefault(require("../model/RenderResponse")); -var _Template = _interopRequireDefault(require("../model/Template")); -var _TemplateDataResponse = _interopRequireDefault(require("../model/TemplateDataResponse")); -var _TemplateListResponse = _interopRequireDefault(require("../model/TemplateListResponse")); -var _TemplateRender = _interopRequireDefault(require("../model/TemplateRender")); -var _TemplateResponse = _interopRequireDefault(require("../model/TemplateResponse")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** -* Edit service. -* @module api/EditApi -* @version 0.2.9 -*/ -var EditApi = exports["default"] = /*#__PURE__*/function () { - /** - * Constructs a new EditApi. - * @alias module:api/EditApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - function EditApi(apiClient) { - _classCallCheck(this, EditApi); - this.apiClient = apiClient || _ApiClient["default"].instance; - } - - /** - * Delete Template - * Delete a template by its template id. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} id The id of the template in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response - */ - return _createClass(EditApi, [{ - key: "deleteTemplateWithHttpInfo", - value: function deleteTemplateWithHttpInfo(id) { - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteTemplate"); - } - var pathParams = { - 'id': id - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = []; - var returnType = null; - return this.apiClient.callApi('/templates/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Delete Template - * Delete a template by its template id. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} id The id of the template in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise} - */ - }, { - key: "deleteTemplate", - value: function deleteTemplate(id) { - return this.deleteTemplateWithHttpInfo(id).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Get Render Status - * Get the rendering status, temporary asset url and details of a render by ID. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} id The id of the timeline render task in UUID format - * @param {Object} opts Optional parameters - * @param {Boolean} [data] Include the data parameter in the response. The data parameter includes the original timeline, output and other settings sent to the API.

Note: the default is currently `true`, this is deprecated and the default will soon be `false`. If you rely on the data being returned in the response you should explicitly set the parameter to `true`. - * @param {Boolean} [merged] Used when data is set to true, it will show the [merge fields](#tocs_mergefield) merged in to the data response. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RenderResponse} and HTTP response - */ - }, { - key: "getRenderWithHttpInfo", - value: function getRenderWithHttpInfo(id, opts) { - opts = opts || {}; - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getRender"); - } - var pathParams = { - 'id': id - }; - var queryParams = { - 'data': opts['data'], - 'merged': opts['merged'] - }; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _RenderResponse["default"]; - return this.apiClient.callApi('/render/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Get Render Status - * Get the rendering status, temporary asset url and details of a render by ID. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} id The id of the timeline render task in UUID format - * @param {Object} opts Optional parameters - * @param {Boolean} opts.data Include the data parameter in the response. The data parameter includes the original timeline, output and other settings sent to the API.

Note: the default is currently `true`, this is deprecated and the default will soon be `false`. If you rely on the data being returned in the response you should explicitly set the parameter to `true`. - * @param {Boolean} opts.merged Used when data is set to true, it will show the [merge fields](#tocs_mergefield) merged in to the data response. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RenderResponse} - */ - }, { - key: "getRender", - value: function getRender(id, opts) { - return this.getRenderWithHttpInfo(id, opts).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Retrieve Template - * Retrieve a template by template id. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} id The id of the template in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateDataResponse} and HTTP response - */ - }, { - key: "getTemplateWithHttpInfo", - value: function getTemplateWithHttpInfo(id) { - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getTemplate"); - } - var pathParams = { - 'id': id - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _TemplateDataResponse["default"]; - return this.apiClient.callApi('/templates/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Retrieve Template - * Retrieve a template by template id. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} id The id of the template in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateDataResponse} - */ - }, { - key: "getTemplate", - value: function getTemplate(id) { - return this.getTemplateWithHttpInfo(id).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * List Templates - * Retrieve a list of templates stored against a users account and stage. **Base URL:** https://api.shotstack.io/edit/{version} - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateListResponse} and HTTP response - */ - }, { - key: "getTemplatesWithHttpInfo", - value: function getTemplatesWithHttpInfo() { - var postBody = null; - var pathParams = {}; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _TemplateListResponse["default"]; - return this.apiClient.callApi('/templates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * List Templates - * Retrieve a list of templates stored against a users account and stage. **Base URL:** https://api.shotstack.io/edit/{version} - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateListResponse} - */ - }, { - key: "getTemplates", - value: function getTemplates() { - return this.getTemplatesWithHttpInfo().then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Render Asset - * Queue and render the contents of an [Edit](#tocs_edit) as a video, image or audio file. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {module:model/Edit} edit The video, image or audio edit specified using JSON. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueuedResponse} and HTTP response - */ - }, { - key: "postRenderWithHttpInfo", - value: function postRenderWithHttpInfo(edit) { - var postBody = edit; - // verify the required parameter 'edit' is set - if (edit === undefined || edit === null) { - throw new Error("Missing the required parameter 'edit' when calling postRender"); - } - var pathParams = {}; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = ['application/json']; - var accepts = ['application/json']; - var returnType = _QueuedResponse["default"]; - return this.apiClient.callApi('/render', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Render Asset - * Queue and render the contents of an [Edit](#tocs_edit) as a video, image or audio file. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {module:model/Edit} edit The video, image or audio edit specified using JSON. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueuedResponse} - */ - }, { - key: "postRender", - value: function postRender(edit) { - return this.postRenderWithHttpInfo(edit).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Create Template - * Save an [Edit](#tocs_edit) as a re-usable template. Templates can be retrieved and modified in your application before being rendered. [Merge fields](#tocs_mergefield) can be also used to merge data in to a template and [render](#render-template) it in a single request. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {module:model/Template} template Create a template with a name and [Edit](#tocs_edit). - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateResponse} and HTTP response - */ - }, { - key: "postTemplateWithHttpInfo", - value: function postTemplateWithHttpInfo(template) { - var postBody = template; - // verify the required parameter 'template' is set - if (template === undefined || template === null) { - throw new Error("Missing the required parameter 'template' when calling postTemplate"); - } - var pathParams = {}; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = ['application/json']; - var accepts = ['application/json']; - var returnType = _TemplateResponse["default"]; - return this.apiClient.callApi('/templates', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Create Template - * Save an [Edit](#tocs_edit) as a re-usable template. Templates can be retrieved and modified in your application before being rendered. [Merge fields](#tocs_mergefield) can be also used to merge data in to a template and [render](#render-template) it in a single request. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {module:model/Template} template Create a template with a name and [Edit](#tocs_edit). - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateResponse} - */ - }, { - key: "postTemplate", - value: function postTemplate(template) { - return this.postTemplateWithHttpInfo(template).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Render Template - * Render an asset from a template id and optional merge fields. Merge fields can be used to replace placeholder variables within the [Edit](#tocs_edit). **Base URL:** https://api.shotstack.io/edit/{version} - * @param {module:model/TemplateRender} templateRender Render a template by template id. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueuedResponse} and HTTP response - */ - }, { - key: "postTemplateRenderWithHttpInfo", - value: function postTemplateRenderWithHttpInfo(templateRender) { - var postBody = templateRender; - // verify the required parameter 'templateRender' is set - if (templateRender === undefined || templateRender === null) { - throw new Error("Missing the required parameter 'templateRender' when calling postTemplateRender"); - } - var pathParams = {}; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = ['application/json']; - var accepts = ['application/json']; - var returnType = _QueuedResponse["default"]; - return this.apiClient.callApi('/templates/render', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Render Template - * Render an asset from a template id and optional merge fields. Merge fields can be used to replace placeholder variables within the [Edit](#tocs_edit). **Base URL:** https://api.shotstack.io/edit/{version} - * @param {module:model/TemplateRender} templateRender Render a template by template id. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueuedResponse} - */ - }, { - key: "postTemplateRender", - value: function postTemplateRender(templateRender) { - return this.postTemplateRenderWithHttpInfo(templateRender).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Inspect Media - * Inspects any media asset (image, video, audio) on the internet using a hosted version of [FFprobe](https://ffmpeg.org/ffprobe.html). The probe endpoint returns useful information about an asset such as width, height, duration, rotation, framerate, etc... **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} url The URL of the media to inspect, must be **URL encoded**. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ProbeResponse} and HTTP response - */ - }, { - key: "probeWithHttpInfo", - value: function probeWithHttpInfo(url) { - var postBody = null; - // verify the required parameter 'url' is set - if (url === undefined || url === null) { - throw new Error("Missing the required parameter 'url' when calling probe"); - } - var pathParams = { - 'url': url - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _ProbeResponse["default"]; - return this.apiClient.callApi('/probe/{url}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Inspect Media - * Inspects any media asset (image, video, audio) on the internet using a hosted version of [FFprobe](https://ffmpeg.org/ffprobe.html). The probe endpoint returns useful information about an asset such as width, height, duration, rotation, framerate, etc... **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} url The URL of the media to inspect, must be **URL encoded**. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ProbeResponse} - */ - }, { - key: "probe", - value: function probe(url) { - return this.probeWithHttpInfo(url).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Update Template - * Update an existing template by template id. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} id The id of the template in UUID format - * @param {module:model/Template} template Update an individual templates name and [Edit](#tocs_edit). Both template name and template must be provided. If the template parameter is omitted a blank template will be saved. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateResponse} and HTTP response - */ - }, { - key: "putTemplateWithHttpInfo", - value: function putTemplateWithHttpInfo(id, template) { - var postBody = template; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling putTemplate"); - } - // verify the required parameter 'template' is set - if (template === undefined || template === null) { - throw new Error("Missing the required parameter 'template' when calling putTemplate"); - } - var pathParams = { - 'id': id - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = ['application/json']; - var accepts = ['application/json']; - var returnType = _TemplateResponse["default"]; - return this.apiClient.callApi('/templates/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Update Template - * Update an existing template by template id. **Base URL:** https://api.shotstack.io/edit/{version} - * @param {String} id The id of the template in UUID format - * @param {module:model/Template} template Update an individual templates name and [Edit](#tocs_edit). Both template name and template must be provided. If the template parameter is omitted a blank template will be saved. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateResponse} - */ - }, { - key: "putTemplate", - value: function putTemplate(id, template) { - return this.putTemplateWithHttpInfo(id, template).then(function (response_and_data) { - return response_and_data.data; - }); - } - }]); -}(); \ No newline at end of file diff --git a/src/api/EndpointsApi.js b/src/api/EndpointsApi.js deleted file mode 100644 index 1bf6f0c..0000000 --- a/src/api/EndpointsApi.js +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Shotstack - * The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation. - * - * The version of the OpenAPI document: v1 - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * - * OpenAPI Generator version: 5.0.0 - * - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['ApiClient', 'model/Edit', 'model/QueuedResponse', 'model/RenderResponse'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('../model/Edit'), require('../model/QueuedResponse'), require('../model/RenderResponse')); - } else { - // Browser globals (root is window) - if (!root.ShotstackSdk) { - root.ShotstackSdk = {}; - } - root.ShotstackSdk.EndpointsApi = factory(root.ShotstackSdk.ApiClient, root.ShotstackSdk.Edit, root.ShotstackSdk.QueuedResponse, root.ShotstackSdk.RenderResponse); - } -}(this, function(ApiClient, Edit, QueuedResponse, RenderResponse) { - 'use strict'; - - /** - * Endpoints service. - * @module api/EndpointsApi - * @version v1 - */ - - /** - * Constructs a new EndpointsApi. - * @alias module:api/EndpointsApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - var exports = function(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - - - - /** - * Get Render Status - * Get the rendering status, video url and details of a timeline by ID. - * @param {String} id The id of the timeline render task in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RenderResponse} and HTTP response - */ - this.getRenderWithHttpInfo = function(id) { - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getRender"); - } - - var pathParams = { - 'id': id - }; - var queryParams = { - }; - var collectionQueryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = RenderResponse; - return this.apiClient.callApi( - '/render/{id}', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Get Render Status - * Get the rendering status, video url and details of a timeline by ID. - * @param {String} id The id of the timeline render task in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RenderResponse} - */ - this.getRender = function(id) { - return this.getRenderWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Render Video - * Queue and render the contents of a timeline as a video file. - * @param {module:model/Edit} edit The video edit specified using JSON. - * @param {Object} opts Optional parameters - * @param {String} opts.xApiQueueId The id of a dedicated queue (enterprise customers only). - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueuedResponse} and HTTP response - */ - this.postRenderWithHttpInfo = function(edit, opts) { - opts = opts || {}; - var postBody = edit; - // verify the required parameter 'edit' is set - if (edit === undefined || edit === null) { - throw new Error("Missing the required parameter 'edit' when calling postRender"); - } - - var pathParams = { - }; - var queryParams = { - }; - var collectionQueryParams = { - }; - var headerParams = { - 'x-api-queue-id': opts['xApiQueueId'] - }; - var formParams = { - }; - - var authNames = ['DeveloperKey']; - var contentTypes = ['application/json']; - var accepts = ['application/json']; - var returnType = QueuedResponse; - return this.apiClient.callApi( - '/render', 'POST', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Render Video - * Queue and render the contents of a timeline as a video file. - * @param {module:model/Edit} edit The video edit specified using JSON. - * @param {Object} opts Optional parameters - * @param {String} opts.xApiQueueId The id of a dedicated queue (enterprise customers only). - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueuedResponse} - */ - this.postRender = function(edit, opts) { - return this.postRenderWithHttpInfo(edit, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - }; - - return exports; -})); diff --git a/src/api/IngestApi.js b/src/api/IngestApi.js deleted file mode 100644 index 0ef8136..0000000 --- a/src/api/IngestApi.js +++ /dev/null @@ -1,237 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _IngestErrorResponse = _interopRequireDefault(require("../model/IngestErrorResponse")); -var _QueuedSourceResponse = _interopRequireDefault(require("../model/QueuedSourceResponse")); -var _Source = _interopRequireDefault(require("../model/Source")); -var _SourceListResponse = _interopRequireDefault(require("../model/SourceListResponse")); -var _SourceResponse = _interopRequireDefault(require("../model/SourceResponse")); -var _UploadResponse = _interopRequireDefault(require("../model/UploadResponse")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** -* Ingest service. -* @module api/IngestApi -* @version 0.2.9 -*/ -var IngestApi = exports["default"] = /*#__PURE__*/function () { - /** - * Constructs a new IngestApi. - * @alias module:api/IngestApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - function IngestApi(apiClient) { - _classCallCheck(this, IngestApi); - this.apiClient = apiClient || _ApiClient["default"].instance; - } - - /** - * Delete Source - * Delete an ingested source file by its id. **Base URL:** https://api.shotstack.io/ingest/{version} - * @param {String} id The id of the source file in [KSUID](https://github.com/segmentio/ksuid#what-is-a-ksuid) format. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response - */ - return _createClass(IngestApi, [{ - key: "deleteSourceWithHttpInfo", - value: function deleteSourceWithHttpInfo(id) { - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteSource"); - } - var pathParams = { - 'id': id - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = []; - var returnType = null; - return this.apiClient.callApi('/sources/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Delete Source - * Delete an ingested source file by its id. **Base URL:** https://api.shotstack.io/ingest/{version} - * @param {String} id The id of the source file in [KSUID](https://github.com/segmentio/ksuid#what-is-a-ksuid) format. - * @return {Promise} a {@link https://www.promisejs.org/|Promise} - */ - }, { - key: "deleteSource", - value: function deleteSource(id) { - return this.deleteSourceWithHttpInfo(id).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Get Source - * Fetch a source file details and status by its id. **Base URL:** https://api.shotstack.io/ingest/{version} - * @param {String} id The id of the source file in [KSUID](https://github.com/segmentio/ksuid#what-is-a-ksuid) format. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SourceResponse} and HTTP response - */ - }, { - key: "getSourceWithHttpInfo", - value: function getSourceWithHttpInfo(id) { - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getSource"); - } - var pathParams = { - 'id': id - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _SourceResponse["default"]; - return this.apiClient.callApi('/sources/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Get Source - * Fetch a source file details and status by its id. **Base URL:** https://api.shotstack.io/ingest/{version} - * @param {String} id The id of the source file in [KSUID](https://github.com/segmentio/ksuid#what-is-a-ksuid) format. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SourceResponse} - */ - }, { - key: "getSource", - value: function getSource(id) { - return this.getSourceWithHttpInfo(id).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * List Sources - * Retrieve a list of ingested source files stored against a users account and stage. **Base URL:** https://api.shotstack.io/ingest/{version} - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SourceListResponse} and HTTP response - */ - }, { - key: "getSourcesWithHttpInfo", - value: function getSourcesWithHttpInfo() { - var postBody = null; - var pathParams = {}; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _SourceListResponse["default"]; - return this.apiClient.callApi('/sources', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * List Sources - * Retrieve a list of ingested source files stored against a users account and stage. **Base URL:** https://api.shotstack.io/ingest/{version} - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SourceListResponse} - */ - }, { - key: "getSources", - value: function getSources() { - return this.getSourcesWithHttpInfo().then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Direct Upload - * Request a signed URL to upload a file to. The response returns a signed URL that you use to upload the file to. The signed URL looks similar to: https://shotstack-ingest-api-stage-sources.s3.ap-southeast-2.amazonaws.com/5ca6hu7s9k/zzytey4v-32km-kq1z-aftr-3kcuqi0brad2/source?AWSAccessKeyId=ASIAWJV7UWDMGTZLHTXP&Expires=1677209777&Signature=PKR4dGDDdOuMTAQmDASzLGmLOeo%3D&x-amz-acl=public-read&x-amz-security-token=IQoJb3JpZ2luX2VjEGMaDmFwLX......56osBGByztm7WZdbmXzO09KR In a separate API call, use this signed URL to send a PUT request with the binary file. Using cURL you can use a command like: `curl -X PUT -T video.mp4 {data.attributes.url}` Where **video.mp4** is the file you want to upload and **{data.attributes.url}** is the signed URL returned in the response. The request must be a PUT type. The SDK does not currently support the PUT request. You can use the SDK to make the request for the signed URL and then use cURL to make the PUT request. **Base URL:** https://api.shotstack.io/ingest/{version} - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UploadResponse} and HTTP response - */ - }, { - key: "getUploadSignedUrlWithHttpInfo", - value: function getUploadSignedUrlWithHttpInfo() { - var postBody = null; - var pathParams = {}; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _UploadResponse["default"]; - return this.apiClient.callApi('/upload', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Direct Upload - * Request a signed URL to upload a file to. The response returns a signed URL that you use to upload the file to. The signed URL looks similar to: https://shotstack-ingest-api-stage-sources.s3.ap-southeast-2.amazonaws.com/5ca6hu7s9k/zzytey4v-32km-kq1z-aftr-3kcuqi0brad2/source?AWSAccessKeyId=ASIAWJV7UWDMGTZLHTXP&Expires=1677209777&Signature=PKR4dGDDdOuMTAQmDASzLGmLOeo%3D&x-amz-acl=public-read&x-amz-security-token=IQoJb3JpZ2luX2VjEGMaDmFwLX......56osBGByztm7WZdbmXzO09KR In a separate API call, use this signed URL to send a PUT request with the binary file. Using cURL you can use a command like: `curl -X PUT -T video.mp4 {data.attributes.url}` Where **video.mp4** is the file you want to upload and **{data.attributes.url}** is the signed URL returned in the response. The request must be a PUT type. The SDK does not currently support the PUT request. You can use the SDK to make the request for the signed URL and then use cURL to make the PUT request. **Base URL:** https://api.shotstack.io/ingest/{version} - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UploadResponse} - */ - }, { - key: "getUploadSignedUrl", - value: function getUploadSignedUrl() { - return this.getUploadSignedUrlWithHttpInfo().then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Fetch Source - * Queue a source file to be fetched from a URL and stored by Shotstack. Source files can be videos, images, audio files and fonts. Once ingested, new [output renditions](#tocs_outputs) can be created from the source file. **Base URL:** https://api.shotstack.io/ingest/{version} - * @param {module:model/Source} source Ingest a video, image, audio or font file from the provided URL. Optionally provide a list of output renditions. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueuedSourceResponse} and HTTP response - */ - }, { - key: "postSourceWithHttpInfo", - value: function postSourceWithHttpInfo(source) { - var postBody = source; - // verify the required parameter 'source' is set - if (source === undefined || source === null) { - throw new Error("Missing the required parameter 'source' when calling postSource"); - } - var pathParams = {}; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = ['application/json']; - var accepts = ['application/json']; - var returnType = _QueuedSourceResponse["default"]; - return this.apiClient.callApi('/sources', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Fetch Source - * Queue a source file to be fetched from a URL and stored by Shotstack. Source files can be videos, images, audio files and fonts. Once ingested, new [output renditions](#tocs_outputs) can be created from the source file. **Base URL:** https://api.shotstack.io/ingest/{version} - * @param {module:model/Source} source Ingest a video, image, audio or font file from the provided URL. Optionally provide a list of output renditions. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueuedSourceResponse} - */ - }, { - key: "postSource", - value: function postSource(source) { - return this.postSourceWithHttpInfo(source).then(function (response_and_data) { - return response_and_data.data; - }); - } - }]); -}(); \ No newline at end of file diff --git a/src/api/ServeApi.js b/src/api/ServeApi.js deleted file mode 100644 index a2d76e6..0000000 --- a/src/api/ServeApi.js +++ /dev/null @@ -1,210 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _AssetRenderResponse = _interopRequireDefault(require("../model/AssetRenderResponse")); -var _AssetResponse = _interopRequireDefault(require("../model/AssetResponse")); -var _Transfer = _interopRequireDefault(require("../model/Transfer")); -var _TransferResponse = _interopRequireDefault(require("../model/TransferResponse")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** -* Serve service. -* @module api/ServeApi -* @version 0.2.9 -*/ -var ServeApi = exports["default"] = /*#__PURE__*/function () { - /** - * Constructs a new ServeApi. - * @alias module:api/ServeApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - function ServeApi(apiClient) { - _classCallCheck(this, ServeApi); - this.apiClient = apiClient || _ApiClient["default"].instance; - } - - /** - * Delete Asset - * Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **Base URL:** https://api.shotstack.io/serve/{version} - * @param {String} id The id of the asset in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response - */ - return _createClass(ServeApi, [{ - key: "deleteAssetWithHttpInfo", - value: function deleteAssetWithHttpInfo(id) { - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteAsset"); - } - var pathParams = { - 'id': id - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = []; - var returnType = null; - return this.apiClient.callApi('/assets/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Delete Asset - * Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **Base URL:** https://api.shotstack.io/serve/{version} - * @param {String} id The id of the asset in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise} - */ - }, { - key: "deleteAsset", - value: function deleteAsset(id) { - return this.deleteAssetWithHttpInfo(id).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Get Asset - * The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **Base URL:** https://api.shotstack.io/serve/{version} - * @param {String} id The id of the asset in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AssetResponse} and HTTP response - */ - }, { - key: "getAssetWithHttpInfo", - value: function getAssetWithHttpInfo(id) { - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getAsset"); - } - var pathParams = { - 'id': id - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _AssetResponse["default"]; - return this.apiClient.callApi('/assets/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Get Asset - * The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **Base URL:** https://api.shotstack.io/serve/{version} - * @param {String} id The id of the asset in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AssetResponse} - */ - }, { - key: "getAsset", - value: function getAsset(id) { - return this.getAssetWithHttpInfo(id).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Get Asset by Render ID - * A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **Base URL:** https://api.shotstack.io/serve/{version} - * @param {String} id The render id associated with the asset in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AssetRenderResponse} and HTTP response - */ - }, { - key: "getAssetByRenderIdWithHttpInfo", - value: function getAssetByRenderIdWithHttpInfo(id) { - var postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getAssetByRenderId"); - } - var pathParams = { - 'id': id - }; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = []; - var accepts = ['application/json']; - var returnType = _AssetRenderResponse["default"]; - return this.apiClient.callApi('/assets/render/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Get Asset by Render ID - * A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **Base URL:** https://api.shotstack.io/serve/{version} - * @param {String} id The render id associated with the asset in UUID format - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AssetRenderResponse} - */ - }, { - key: "getAssetByRenderId", - value: function getAssetByRenderId(id) { - return this.getAssetByRenderIdWithHttpInfo(id).then(function (response_and_data) { - return response_and_data.data; - }); - } - - /** - * Transfer Asset - * Transfer a file from any publicly available URL to one or more Serve API [destinations](#tocs_destinations). **Base URL:** https://api.shotstack.io/serve/{version} - * @param {module:model/Transfer} transfer Fetch an asset from a URL and send it to one or more destinations. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TransferResponse} and HTTP response - */ - }, { - key: "postServeAssetWithHttpInfo", - value: function postServeAssetWithHttpInfo(transfer) { - var postBody = transfer; - // verify the required parameter 'transfer' is set - if (transfer === undefined || transfer === null) { - throw new Error("Missing the required parameter 'transfer' when calling postServeAsset"); - } - var pathParams = {}; - var queryParams = {}; - var headerParams = {}; - var formParams = {}; - var authNames = ['DeveloperKey']; - var contentTypes = ['application/json']; - var accepts = ['application/json']; - var returnType = _TransferResponse["default"]; - return this.apiClient.callApi('/assets', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null); - } - - /** - * Transfer Asset - * Transfer a file from any publicly available URL to one or more Serve API [destinations](#tocs_destinations). **Base URL:** https://api.shotstack.io/serve/{version} - * @param {module:model/Transfer} transfer Fetch an asset from a URL and send it to one or more destinations. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TransferResponse} - */ - }, { - key: "postServeAsset", - value: function postServeAsset(transfer) { - return this.postServeAssetWithHttpInfo(transfer).then(function (response_and_data) { - return response_and_data.data; - }); - } - }]); -}(); \ No newline at end of file diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 6909664..0000000 --- a/src/index.js +++ /dev/null @@ -1,951 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "ApiClient", { - enumerable: true, - get: function get() { - return _ApiClient["default"]; - } -}); -Object.defineProperty(exports, "Asset", { - enumerable: true, - get: function get() { - return _Asset["default"]; - } -}); -Object.defineProperty(exports, "AssetRenderResponse", { - enumerable: true, - get: function get() { - return _AssetRenderResponse["default"]; - } -}); -Object.defineProperty(exports, "AssetResponse", { - enumerable: true, - get: function get() { - return _AssetResponse["default"]; - } -}); -Object.defineProperty(exports, "AssetResponseAttributes", { - enumerable: true, - get: function get() { - return _AssetResponseAttributes["default"]; - } -}); -Object.defineProperty(exports, "AssetResponseData", { - enumerable: true, - get: function get() { - return _AssetResponseData["default"]; - } -}); -Object.defineProperty(exports, "AudioAsset", { - enumerable: true, - get: function get() { - return _AudioAsset["default"]; - } -}); -Object.defineProperty(exports, "AudioAssetVolume", { - enumerable: true, - get: function get() { - return _AudioAssetVolume["default"]; - } -}); -Object.defineProperty(exports, "AudioEnhancement", { - enumerable: true, - get: function get() { - return _AudioEnhancement["default"]; - } -}); -Object.defineProperty(exports, "CaptionAsset", { - enumerable: true, - get: function get() { - return _CaptionAsset["default"]; - } -}); -Object.defineProperty(exports, "CaptionBackground", { - enumerable: true, - get: function get() { - return _CaptionBackground["default"]; - } -}); -Object.defineProperty(exports, "CaptionFont", { - enumerable: true, - get: function get() { - return _CaptionFont["default"]; - } -}); -Object.defineProperty(exports, "CaptionMargin", { - enumerable: true, - get: function get() { - return _CaptionMargin["default"]; - } -}); -Object.defineProperty(exports, "ChromaKey", { - enumerable: true, - get: function get() { - return _ChromaKey["default"]; - } -}); -Object.defineProperty(exports, "Clip", { - enumerable: true, - get: function get() { - return _Clip["default"]; - } -}); -Object.defineProperty(exports, "ClipLength", { - enumerable: true, - get: function get() { - return _ClipLength["default"]; - } -}); -Object.defineProperty(exports, "ClipOpacity", { - enumerable: true, - get: function get() { - return _ClipOpacity["default"]; - } -}); -Object.defineProperty(exports, "ClipStart", { - enumerable: true, - get: function get() { - return _ClipStart["default"]; - } -}); -Object.defineProperty(exports, "CreateApi", { - enumerable: true, - get: function get() { - return _CreateApi["default"]; - } -}); -Object.defineProperty(exports, "Crop", { - enumerable: true, - get: function get() { - return _Crop["default"]; - } -}); -Object.defineProperty(exports, "DIDGeneratedAsset", { - enumerable: true, - get: function get() { - return _DIDGeneratedAsset["default"]; - } -}); -Object.defineProperty(exports, "DIDGeneratedAssetOptions", { - enumerable: true, - get: function get() { - return _DIDGeneratedAssetOptions["default"]; - } -}); -Object.defineProperty(exports, "DIDTextToAvatarOptions", { - enumerable: true, - get: function get() { - return _DIDTextToAvatarOptions["default"]; - } -}); -Object.defineProperty(exports, "Destinations", { - enumerable: true, - get: function get() { - return _Destinations["default"]; - } -}); -Object.defineProperty(exports, "DolbyEnhancement", { - enumerable: true, - get: function get() { - return _DolbyEnhancement["default"]; - } -}); -Object.defineProperty(exports, "DolbyEnhancementOptions", { - enumerable: true, - get: function get() { - return _DolbyEnhancementOptions["default"]; - } -}); -Object.defineProperty(exports, "Edit", { - enumerable: true, - get: function get() { - return _Edit["default"]; - } -}); -Object.defineProperty(exports, "EditApi", { - enumerable: true, - get: function get() { - return _EditApi["default"]; - } -}); -Object.defineProperty(exports, "ElevenLabsGeneratedAsset", { - enumerable: true, - get: function get() { - return _ElevenLabsGeneratedAsset["default"]; - } -}); -Object.defineProperty(exports, "ElevenLabsGeneratedAssetOptions", { - enumerable: true, - get: function get() { - return _ElevenLabsGeneratedAssetOptions["default"]; - } -}); -Object.defineProperty(exports, "ElevenLabsTextToSpeechOptions", { - enumerable: true, - get: function get() { - return _ElevenLabsTextToSpeechOptions["default"]; - } -}); -Object.defineProperty(exports, "Enhancements", { - enumerable: true, - get: function get() { - return _Enhancements["default"]; - } -}); -Object.defineProperty(exports, "FlipTransformation", { - enumerable: true, - get: function get() { - return _FlipTransformation["default"]; - } -}); -Object.defineProperty(exports, "Font", { - enumerable: true, - get: function get() { - return _Font["default"]; - } -}); -Object.defineProperty(exports, "GeneratedAsset", { - enumerable: true, - get: function get() { - return _GeneratedAsset["default"]; - } -}); -Object.defineProperty(exports, "GeneratedAssetErrorResponse", { - enumerable: true, - get: function get() { - return _GeneratedAssetErrorResponse["default"]; - } -}); -Object.defineProperty(exports, "GeneratedAssetErrorResponseData", { - enumerable: true, - get: function get() { - return _GeneratedAssetErrorResponseData["default"]; - } -}); -Object.defineProperty(exports, "GeneratedAssetResponse", { - enumerable: true, - get: function get() { - return _GeneratedAssetResponse["default"]; - } -}); -Object.defineProperty(exports, "GeneratedAssetResponseAttributes", { - enumerable: true, - get: function get() { - return _GeneratedAssetResponseAttributes["default"]; - } -}); -Object.defineProperty(exports, "GeneratedAssetResponseData", { - enumerable: true, - get: function get() { - return _GeneratedAssetResponseData["default"]; - } -}); -Object.defineProperty(exports, "GoogleCloudStorageDestination", { - enumerable: true, - get: function get() { - return _GoogleCloudStorageDestination["default"]; - } -}); -Object.defineProperty(exports, "GoogleCloudStorageDestinationOptions", { - enumerable: true, - get: function get() { - return _GoogleCloudStorageDestinationOptions["default"]; - } -}); -Object.defineProperty(exports, "GoogleDriveDestination", { - enumerable: true, - get: function get() { - return _GoogleDriveDestination["default"]; - } -}); -Object.defineProperty(exports, "GoogleDriveDestinationOptions", { - enumerable: true, - get: function get() { - return _GoogleDriveDestinationOptions["default"]; - } -}); -Object.defineProperty(exports, "HeyGenGeneratedAsset", { - enumerable: true, - get: function get() { - return _HeyGenGeneratedAsset["default"]; - } -}); -Object.defineProperty(exports, "HeyGenGeneratedAssetOptions", { - enumerable: true, - get: function get() { - return _HeyGenGeneratedAssetOptions["default"]; - } -}); -Object.defineProperty(exports, "HeyGenTextToAvatarOptions", { - enumerable: true, - get: function get() { - return _HeyGenTextToAvatarOptions["default"]; - } -}); -Object.defineProperty(exports, "HtmlAsset", { - enumerable: true, - get: function get() { - return _HtmlAsset["default"]; - } -}); -Object.defineProperty(exports, "ImageAsset", { - enumerable: true, - get: function get() { - return _ImageAsset["default"]; - } -}); -Object.defineProperty(exports, "IngestApi", { - enumerable: true, - get: function get() { - return _IngestApi["default"]; - } -}); -Object.defineProperty(exports, "IngestErrorResponse", { - enumerable: true, - get: function get() { - return _IngestErrorResponse["default"]; - } -}); -Object.defineProperty(exports, "IngestErrorResponseData", { - enumerable: true, - get: function get() { - return _IngestErrorResponseData["default"]; - } -}); -Object.defineProperty(exports, "LumaAsset", { - enumerable: true, - get: function get() { - return _LumaAsset["default"]; - } -}); -Object.defineProperty(exports, "MergeField", { - enumerable: true, - get: function get() { - return _MergeField["default"]; - } -}); -Object.defineProperty(exports, "MuxDestination", { - enumerable: true, - get: function get() { - return _MuxDestination["default"]; - } -}); -Object.defineProperty(exports, "MuxDestinationOptions", { - enumerable: true, - get: function get() { - return _MuxDestinationOptions["default"]; - } -}); -Object.defineProperty(exports, "Offset", { - enumerable: true, - get: function get() { - return _Offset["default"]; - } -}); -Object.defineProperty(exports, "OffsetX", { - enumerable: true, - get: function get() { - return _OffsetX["default"]; - } -}); -Object.defineProperty(exports, "OffsetY", { - enumerable: true, - get: function get() { - return _OffsetY["default"]; - } -}); -Object.defineProperty(exports, "OpenAiGeneratedAsset", { - enumerable: true, - get: function get() { - return _OpenAiGeneratedAsset["default"]; - } -}); -Object.defineProperty(exports, "OpenAiGeneratedAssetOptions", { - enumerable: true, - get: function get() { - return _OpenAiGeneratedAssetOptions["default"]; - } -}); -Object.defineProperty(exports, "OpenAiTextGeneratorOptions", { - enumerable: true, - get: function get() { - return _OpenAiTextGeneratorOptions["default"]; - } -}); -Object.defineProperty(exports, "Output", { - enumerable: true, - get: function get() { - return _Output["default"]; - } -}); -Object.defineProperty(exports, "Outputs", { - enumerable: true, - get: function get() { - return _Outputs["default"]; - } -}); -Object.defineProperty(exports, "OutputsResponse", { - enumerable: true, - get: function get() { - return _OutputsResponse["default"]; - } -}); -Object.defineProperty(exports, "Poster", { - enumerable: true, - get: function get() { - return _Poster["default"]; - } -}); -Object.defineProperty(exports, "ProbeResponse", { - enumerable: true, - get: function get() { - return _ProbeResponse["default"]; - } -}); -Object.defineProperty(exports, "QueuedResponse", { - enumerable: true, - get: function get() { - return _QueuedResponse["default"]; - } -}); -Object.defineProperty(exports, "QueuedResponseData", { - enumerable: true, - get: function get() { - return _QueuedResponseData["default"]; - } -}); -Object.defineProperty(exports, "QueuedSourceResponse", { - enumerable: true, - get: function get() { - return _QueuedSourceResponse["default"]; - } -}); -Object.defineProperty(exports, "QueuedSourceResponseData", { - enumerable: true, - get: function get() { - return _QueuedSourceResponseData["default"]; - } -}); -Object.defineProperty(exports, "Range", { - enumerable: true, - get: function get() { - return _Range["default"]; - } -}); -Object.defineProperty(exports, "RenderResponse", { - enumerable: true, - get: function get() { - return _RenderResponse["default"]; - } -}); -Object.defineProperty(exports, "RenderResponseData", { - enumerable: true, - get: function get() { - return _RenderResponseData["default"]; - } -}); -Object.defineProperty(exports, "Rendition", { - enumerable: true, - get: function get() { - return _Rendition["default"]; - } -}); -Object.defineProperty(exports, "RenditionResponseAttributes", { - enumerable: true, - get: function get() { - return _RenditionResponseAttributes["default"]; - } -}); -Object.defineProperty(exports, "RotateTransformation", { - enumerable: true, - get: function get() { - return _RotateTransformation["default"]; - } -}); -Object.defineProperty(exports, "RotateTransformationAngle", { - enumerable: true, - get: function get() { - return _RotateTransformationAngle["default"]; - } -}); -Object.defineProperty(exports, "S3Destination", { - enumerable: true, - get: function get() { - return _S3Destination["default"]; - } -}); -Object.defineProperty(exports, "S3DestinationOptions", { - enumerable: true, - get: function get() { - return _S3DestinationOptions["default"]; - } -}); -Object.defineProperty(exports, "ServeApi", { - enumerable: true, - get: function get() { - return _ServeApi["default"]; - } -}); -Object.defineProperty(exports, "ShotstackDestination", { - enumerable: true, - get: function get() { - return _ShotstackDestination["default"]; - } -}); -Object.defineProperty(exports, "ShotstackGeneratedAsset", { - enumerable: true, - get: function get() { - return _ShotstackGeneratedAsset["default"]; - } -}); -Object.defineProperty(exports, "ShotstackGeneratedAssetOptions", { - enumerable: true, - get: function get() { - return _ShotstackGeneratedAssetOptions["default"]; - } -}); -Object.defineProperty(exports, "ShotstackImageToVideoOptions", { - enumerable: true, - get: function get() { - return _ShotstackImageToVideoOptions["default"]; - } -}); -Object.defineProperty(exports, "ShotstackTextGeneratorOptions", { - enumerable: true, - get: function get() { - return _ShotstackTextGeneratorOptions["default"]; - } -}); -Object.defineProperty(exports, "ShotstackTextToImageOptions", { - enumerable: true, - get: function get() { - return _ShotstackTextToImageOptions["default"]; - } -}); -Object.defineProperty(exports, "ShotstackTextToSpeechOptions", { - enumerable: true, - get: function get() { - return _ShotstackTextToSpeechOptions["default"]; - } -}); -Object.defineProperty(exports, "Size", { - enumerable: true, - get: function get() { - return _Size["default"]; - } -}); -Object.defineProperty(exports, "SkewTransformation", { - enumerable: true, - get: function get() { - return _SkewTransformation["default"]; - } -}); -Object.defineProperty(exports, "SkewTransformationX", { - enumerable: true, - get: function get() { - return _SkewTransformationX["default"]; - } -}); -Object.defineProperty(exports, "SkewTransformationY", { - enumerable: true, - get: function get() { - return _SkewTransformationY["default"]; - } -}); -Object.defineProperty(exports, "Soundtrack", { - enumerable: true, - get: function get() { - return _Soundtrack["default"]; - } -}); -Object.defineProperty(exports, "Source", { - enumerable: true, - get: function get() { - return _Source["default"]; - } -}); -Object.defineProperty(exports, "SourceListResponse", { - enumerable: true, - get: function get() { - return _SourceListResponse["default"]; - } -}); -Object.defineProperty(exports, "SourceResponse", { - enumerable: true, - get: function get() { - return _SourceResponse["default"]; - } -}); -Object.defineProperty(exports, "SourceResponseAttributes", { - enumerable: true, - get: function get() { - return _SourceResponseAttributes["default"]; - } -}); -Object.defineProperty(exports, "SourceResponseData", { - enumerable: true, - get: function get() { - return _SourceResponseData["default"]; - } -}); -Object.defineProperty(exports, "Speed", { - enumerable: true, - get: function get() { - return _Speed["default"]; - } -}); -Object.defineProperty(exports, "StabilityAiGeneratedAsset", { - enumerable: true, - get: function get() { - return _StabilityAiGeneratedAsset["default"]; - } -}); -Object.defineProperty(exports, "StabilityAiGeneratedAssetOptions", { - enumerable: true, - get: function get() { - return _StabilityAiGeneratedAssetOptions["default"]; - } -}); -Object.defineProperty(exports, "StabilityAiTextToImageOptions", { - enumerable: true, - get: function get() { - return _StabilityAiTextToImageOptions["default"]; - } -}); -Object.defineProperty(exports, "Template", { - enumerable: true, - get: function get() { - return _Template["default"]; - } -}); -Object.defineProperty(exports, "TemplateDataResponse", { - enumerable: true, - get: function get() { - return _TemplateDataResponse["default"]; - } -}); -Object.defineProperty(exports, "TemplateDataResponseData", { - enumerable: true, - get: function get() { - return _TemplateDataResponseData["default"]; - } -}); -Object.defineProperty(exports, "TemplateListResponse", { - enumerable: true, - get: function get() { - return _TemplateListResponse["default"]; - } -}); -Object.defineProperty(exports, "TemplateListResponseData", { - enumerable: true, - get: function get() { - return _TemplateListResponseData["default"]; - } -}); -Object.defineProperty(exports, "TemplateListResponseItem", { - enumerable: true, - get: function get() { - return _TemplateListResponseItem["default"]; - } -}); -Object.defineProperty(exports, "TemplateRender", { - enumerable: true, - get: function get() { - return _TemplateRender["default"]; - } -}); -Object.defineProperty(exports, "TemplateResponse", { - enumerable: true, - get: function get() { - return _TemplateResponse["default"]; - } -}); -Object.defineProperty(exports, "TemplateResponseData", { - enumerable: true, - get: function get() { - return _TemplateResponseData["default"]; - } -}); -Object.defineProperty(exports, "TextAlignment", { - enumerable: true, - get: function get() { - return _TextAlignment["default"]; - } -}); -Object.defineProperty(exports, "TextAsset", { - enumerable: true, - get: function get() { - return _TextAsset["default"]; - } -}); -Object.defineProperty(exports, "TextBackground", { - enumerable: true, - get: function get() { - return _TextBackground["default"]; - } -}); -Object.defineProperty(exports, "TextFont", { - enumerable: true, - get: function get() { - return _TextFont["default"]; - } -}); -Object.defineProperty(exports, "Thumbnail", { - enumerable: true, - get: function get() { - return _Thumbnail["default"]; - } -}); -Object.defineProperty(exports, "Timeline", { - enumerable: true, - get: function get() { - return _Timeline["default"]; - } -}); -Object.defineProperty(exports, "TitleAsset", { - enumerable: true, - get: function get() { - return _TitleAsset["default"]; - } -}); -Object.defineProperty(exports, "Track", { - enumerable: true, - get: function get() { - return _Track["default"]; - } -}); -Object.defineProperty(exports, "Transcription", { - enumerable: true, - get: function get() { - return _Transcription["default"]; - } -}); -Object.defineProperty(exports, "Transfer", { - enumerable: true, - get: function get() { - return _Transfer["default"]; - } -}); -Object.defineProperty(exports, "TransferResponse", { - enumerable: true, - get: function get() { - return _TransferResponse["default"]; - } -}); -Object.defineProperty(exports, "TransferResponseAttributes", { - enumerable: true, - get: function get() { - return _TransferResponseAttributes["default"]; - } -}); -Object.defineProperty(exports, "TransferResponseData", { - enumerable: true, - get: function get() { - return _TransferResponseData["default"]; - } -}); -Object.defineProperty(exports, "Transformation", { - enumerable: true, - get: function get() { - return _Transformation["default"]; - } -}); -Object.defineProperty(exports, "Transition", { - enumerable: true, - get: function get() { - return _Transition["default"]; - } -}); -Object.defineProperty(exports, "Tween", { - enumerable: true, - get: function get() { - return _Tween["default"]; - } -}); -Object.defineProperty(exports, "UploadResponse", { - enumerable: true, - get: function get() { - return _UploadResponse["default"]; - } -}); -Object.defineProperty(exports, "UploadResponseAttributes", { - enumerable: true, - get: function get() { - return _UploadResponseAttributes["default"]; - } -}); -Object.defineProperty(exports, "UploadResponseData", { - enumerable: true, - get: function get() { - return _UploadResponseData["default"]; - } -}); -Object.defineProperty(exports, "VideoAsset", { - enumerable: true, - get: function get() { - return _VideoAsset["default"]; - } -}); -Object.defineProperty(exports, "VideoAssetVolume", { - enumerable: true, - get: function get() { - return _VideoAssetVolume["default"]; - } -}); -Object.defineProperty(exports, "VimeoDestination", { - enumerable: true, - get: function get() { - return _VimeoDestination["default"]; - } -}); -Object.defineProperty(exports, "VimeoDestinationOptions", { - enumerable: true, - get: function get() { - return _VimeoDestinationOptions["default"]; - } -}); -Object.defineProperty(exports, "VimeoDestinationPrivacyOptions", { - enumerable: true, - get: function get() { - return _VimeoDestinationPrivacyOptions["default"]; - } -}); -var _ApiClient = _interopRequireDefault(require("./ApiClient")); -var _Asset = _interopRequireDefault(require("./model/Asset")); -var _AssetRenderResponse = _interopRequireDefault(require("./model/AssetRenderResponse")); -var _AssetResponse = _interopRequireDefault(require("./model/AssetResponse")); -var _AssetResponseAttributes = _interopRequireDefault(require("./model/AssetResponseAttributes")); -var _AssetResponseData = _interopRequireDefault(require("./model/AssetResponseData")); -var _AudioAsset = _interopRequireDefault(require("./model/AudioAsset")); -var _AudioAssetVolume = _interopRequireDefault(require("./model/AudioAssetVolume")); -var _AudioEnhancement = _interopRequireDefault(require("./model/AudioEnhancement")); -var _CaptionAsset = _interopRequireDefault(require("./model/CaptionAsset")); -var _CaptionBackground = _interopRequireDefault(require("./model/CaptionBackground")); -var _CaptionFont = _interopRequireDefault(require("./model/CaptionFont")); -var _CaptionMargin = _interopRequireDefault(require("./model/CaptionMargin")); -var _ChromaKey = _interopRequireDefault(require("./model/ChromaKey")); -var _Clip = _interopRequireDefault(require("./model/Clip")); -var _ClipLength = _interopRequireDefault(require("./model/ClipLength")); -var _ClipOpacity = _interopRequireDefault(require("./model/ClipOpacity")); -var _ClipStart = _interopRequireDefault(require("./model/ClipStart")); -var _Crop = _interopRequireDefault(require("./model/Crop")); -var _DIDGeneratedAsset = _interopRequireDefault(require("./model/DIDGeneratedAsset")); -var _DIDGeneratedAssetOptions = _interopRequireDefault(require("./model/DIDGeneratedAssetOptions")); -var _DIDTextToAvatarOptions = _interopRequireDefault(require("./model/DIDTextToAvatarOptions")); -var _Destinations = _interopRequireDefault(require("./model/Destinations")); -var _DolbyEnhancement = _interopRequireDefault(require("./model/DolbyEnhancement")); -var _DolbyEnhancementOptions = _interopRequireDefault(require("./model/DolbyEnhancementOptions")); -var _Edit = _interopRequireDefault(require("./model/Edit")); -var _ElevenLabsGeneratedAsset = _interopRequireDefault(require("./model/ElevenLabsGeneratedAsset")); -var _ElevenLabsGeneratedAssetOptions = _interopRequireDefault(require("./model/ElevenLabsGeneratedAssetOptions")); -var _ElevenLabsTextToSpeechOptions = _interopRequireDefault(require("./model/ElevenLabsTextToSpeechOptions")); -var _Enhancements = _interopRequireDefault(require("./model/Enhancements")); -var _FlipTransformation = _interopRequireDefault(require("./model/FlipTransformation")); -var _Font = _interopRequireDefault(require("./model/Font")); -var _GeneratedAsset = _interopRequireDefault(require("./model/GeneratedAsset")); -var _GeneratedAssetErrorResponse = _interopRequireDefault(require("./model/GeneratedAssetErrorResponse")); -var _GeneratedAssetErrorResponseData = _interopRequireDefault(require("./model/GeneratedAssetErrorResponseData")); -var _GeneratedAssetResponse = _interopRequireDefault(require("./model/GeneratedAssetResponse")); -var _GeneratedAssetResponseAttributes = _interopRequireDefault(require("./model/GeneratedAssetResponseAttributes")); -var _GeneratedAssetResponseData = _interopRequireDefault(require("./model/GeneratedAssetResponseData")); -var _GoogleCloudStorageDestination = _interopRequireDefault(require("./model/GoogleCloudStorageDestination")); -var _GoogleCloudStorageDestinationOptions = _interopRequireDefault(require("./model/GoogleCloudStorageDestinationOptions")); -var _GoogleDriveDestination = _interopRequireDefault(require("./model/GoogleDriveDestination")); -var _GoogleDriveDestinationOptions = _interopRequireDefault(require("./model/GoogleDriveDestinationOptions")); -var _HeyGenGeneratedAsset = _interopRequireDefault(require("./model/HeyGenGeneratedAsset")); -var _HeyGenGeneratedAssetOptions = _interopRequireDefault(require("./model/HeyGenGeneratedAssetOptions")); -var _HeyGenTextToAvatarOptions = _interopRequireDefault(require("./model/HeyGenTextToAvatarOptions")); -var _HtmlAsset = _interopRequireDefault(require("./model/HtmlAsset")); -var _ImageAsset = _interopRequireDefault(require("./model/ImageAsset")); -var _IngestErrorResponse = _interopRequireDefault(require("./model/IngestErrorResponse")); -var _IngestErrorResponseData = _interopRequireDefault(require("./model/IngestErrorResponseData")); -var _LumaAsset = _interopRequireDefault(require("./model/LumaAsset")); -var _MergeField = _interopRequireDefault(require("./model/MergeField")); -var _MuxDestination = _interopRequireDefault(require("./model/MuxDestination")); -var _MuxDestinationOptions = _interopRequireDefault(require("./model/MuxDestinationOptions")); -var _Offset = _interopRequireDefault(require("./model/Offset")); -var _OffsetX = _interopRequireDefault(require("./model/OffsetX")); -var _OffsetY = _interopRequireDefault(require("./model/OffsetY")); -var _OpenAiGeneratedAsset = _interopRequireDefault(require("./model/OpenAiGeneratedAsset")); -var _OpenAiGeneratedAssetOptions = _interopRequireDefault(require("./model/OpenAiGeneratedAssetOptions")); -var _OpenAiTextGeneratorOptions = _interopRequireDefault(require("./model/OpenAiTextGeneratorOptions")); -var _Output = _interopRequireDefault(require("./model/Output")); -var _Outputs = _interopRequireDefault(require("./model/Outputs")); -var _OutputsResponse = _interopRequireDefault(require("./model/OutputsResponse")); -var _Poster = _interopRequireDefault(require("./model/Poster")); -var _ProbeResponse = _interopRequireDefault(require("./model/ProbeResponse")); -var _QueuedResponse = _interopRequireDefault(require("./model/QueuedResponse")); -var _QueuedResponseData = _interopRequireDefault(require("./model/QueuedResponseData")); -var _QueuedSourceResponse = _interopRequireDefault(require("./model/QueuedSourceResponse")); -var _QueuedSourceResponseData = _interopRequireDefault(require("./model/QueuedSourceResponseData")); -var _Range = _interopRequireDefault(require("./model/Range")); -var _RenderResponse = _interopRequireDefault(require("./model/RenderResponse")); -var _RenderResponseData = _interopRequireDefault(require("./model/RenderResponseData")); -var _Rendition = _interopRequireDefault(require("./model/Rendition")); -var _RenditionResponseAttributes = _interopRequireDefault(require("./model/RenditionResponseAttributes")); -var _RotateTransformation = _interopRequireDefault(require("./model/RotateTransformation")); -var _RotateTransformationAngle = _interopRequireDefault(require("./model/RotateTransformationAngle")); -var _S3Destination = _interopRequireDefault(require("./model/S3Destination")); -var _S3DestinationOptions = _interopRequireDefault(require("./model/S3DestinationOptions")); -var _ShotstackDestination = _interopRequireDefault(require("./model/ShotstackDestination")); -var _ShotstackGeneratedAsset = _interopRequireDefault(require("./model/ShotstackGeneratedAsset")); -var _ShotstackGeneratedAssetOptions = _interopRequireDefault(require("./model/ShotstackGeneratedAssetOptions")); -var _ShotstackImageToVideoOptions = _interopRequireDefault(require("./model/ShotstackImageToVideoOptions")); -var _ShotstackTextGeneratorOptions = _interopRequireDefault(require("./model/ShotstackTextGeneratorOptions")); -var _ShotstackTextToImageOptions = _interopRequireDefault(require("./model/ShotstackTextToImageOptions")); -var _ShotstackTextToSpeechOptions = _interopRequireDefault(require("./model/ShotstackTextToSpeechOptions")); -var _Size = _interopRequireDefault(require("./model/Size")); -var _SkewTransformation = _interopRequireDefault(require("./model/SkewTransformation")); -var _SkewTransformationX = _interopRequireDefault(require("./model/SkewTransformationX")); -var _SkewTransformationY = _interopRequireDefault(require("./model/SkewTransformationY")); -var _Soundtrack = _interopRequireDefault(require("./model/Soundtrack")); -var _Source = _interopRequireDefault(require("./model/Source")); -var _SourceListResponse = _interopRequireDefault(require("./model/SourceListResponse")); -var _SourceResponse = _interopRequireDefault(require("./model/SourceResponse")); -var _SourceResponseAttributes = _interopRequireDefault(require("./model/SourceResponseAttributes")); -var _SourceResponseData = _interopRequireDefault(require("./model/SourceResponseData")); -var _Speed = _interopRequireDefault(require("./model/Speed")); -var _StabilityAiGeneratedAsset = _interopRequireDefault(require("./model/StabilityAiGeneratedAsset")); -var _StabilityAiGeneratedAssetOptions = _interopRequireDefault(require("./model/StabilityAiGeneratedAssetOptions")); -var _StabilityAiTextToImageOptions = _interopRequireDefault(require("./model/StabilityAiTextToImageOptions")); -var _Template = _interopRequireDefault(require("./model/Template")); -var _TemplateDataResponse = _interopRequireDefault(require("./model/TemplateDataResponse")); -var _TemplateDataResponseData = _interopRequireDefault(require("./model/TemplateDataResponseData")); -var _TemplateListResponse = _interopRequireDefault(require("./model/TemplateListResponse")); -var _TemplateListResponseData = _interopRequireDefault(require("./model/TemplateListResponseData")); -var _TemplateListResponseItem = _interopRequireDefault(require("./model/TemplateListResponseItem")); -var _TemplateRender = _interopRequireDefault(require("./model/TemplateRender")); -var _TemplateResponse = _interopRequireDefault(require("./model/TemplateResponse")); -var _TemplateResponseData = _interopRequireDefault(require("./model/TemplateResponseData")); -var _TextAlignment = _interopRequireDefault(require("./model/TextAlignment")); -var _TextAsset = _interopRequireDefault(require("./model/TextAsset")); -var _TextBackground = _interopRequireDefault(require("./model/TextBackground")); -var _TextFont = _interopRequireDefault(require("./model/TextFont")); -var _Thumbnail = _interopRequireDefault(require("./model/Thumbnail")); -var _Timeline = _interopRequireDefault(require("./model/Timeline")); -var _TitleAsset = _interopRequireDefault(require("./model/TitleAsset")); -var _Track = _interopRequireDefault(require("./model/Track")); -var _Transcription = _interopRequireDefault(require("./model/Transcription")); -var _Transfer = _interopRequireDefault(require("./model/Transfer")); -var _TransferResponse = _interopRequireDefault(require("./model/TransferResponse")); -var _TransferResponseAttributes = _interopRequireDefault(require("./model/TransferResponseAttributes")); -var _TransferResponseData = _interopRequireDefault(require("./model/TransferResponseData")); -var _Transformation = _interopRequireDefault(require("./model/Transformation")); -var _Transition = _interopRequireDefault(require("./model/Transition")); -var _Tween = _interopRequireDefault(require("./model/Tween")); -var _UploadResponse = _interopRequireDefault(require("./model/UploadResponse")); -var _UploadResponseAttributes = _interopRequireDefault(require("./model/UploadResponseAttributes")); -var _UploadResponseData = _interopRequireDefault(require("./model/UploadResponseData")); -var _VideoAsset = _interopRequireDefault(require("./model/VideoAsset")); -var _VideoAssetVolume = _interopRequireDefault(require("./model/VideoAssetVolume")); -var _VimeoDestination = _interopRequireDefault(require("./model/VimeoDestination")); -var _VimeoDestinationOptions = _interopRequireDefault(require("./model/VimeoDestinationOptions")); -var _VimeoDestinationPrivacyOptions = _interopRequireDefault(require("./model/VimeoDestinationPrivacyOptions")); -var _CreateApi = _interopRequireDefault(require("./api/CreateApi")); -var _EditApi = _interopRequireDefault(require("./api/EditApi")); -var _IngestApi = _interopRequireDefault(require("./api/IngestApi")); -var _ServeApi = _interopRequireDefault(require("./api/ServeApi")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } \ No newline at end of file diff --git a/src/model/Asset.js b/src/model/Asset.js deleted file mode 100644 index 30aee2c..0000000 --- a/src/model/Asset.js +++ /dev/null @@ -1,376 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _AudioAsset = _interopRequireDefault(require("./AudioAsset")); -var _AudioAssetVolume = _interopRequireDefault(require("./AudioAssetVolume")); -var _CaptionAsset = _interopRequireDefault(require("./CaptionAsset")); -var _CaptionFont = _interopRequireDefault(require("./CaptionFont")); -var _CaptionMargin = _interopRequireDefault(require("./CaptionMargin")); -var _ChromaKey = _interopRequireDefault(require("./ChromaKey")); -var _Crop = _interopRequireDefault(require("./Crop")); -var _HtmlAsset = _interopRequireDefault(require("./HtmlAsset")); -var _ImageAsset = _interopRequireDefault(require("./ImageAsset")); -var _LumaAsset = _interopRequireDefault(require("./LumaAsset")); -var _Offset = _interopRequireDefault(require("./Offset")); -var _TextAlignment = _interopRequireDefault(require("./TextAlignment")); -var _TextAsset = _interopRequireDefault(require("./TextAsset")); -var _TitleAsset = _interopRequireDefault(require("./TitleAsset")); -var _VideoAsset = _interopRequireDefault(require("./VideoAsset")); -var _Asset; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Asset model module. - * @module model/Asset - * @version 0.2.9 - */ -var Asset = /*#__PURE__*/function () { - /** - * Constructs a new Asset. - * The type of asset to display for the duration of the Clip, i.e. a video clip or an image. Choose from one of the available asset types below. - * @alias module:model/Asset - * @param {(module:model/AudioAsset|module:model/CaptionAsset|module:model/HtmlAsset|module:model/ImageAsset|module:model/LumaAsset|module:model/TextAsset|module:model/TitleAsset|module:model/VideoAsset)} instance The actual instance to initialize Asset. - */ - function Asset() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, Asset); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - try { - if (typeof instance === "VideoAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _VideoAsset["default"].validateJSON(instance); // throw an exception if no match - // create VideoAsset from JS object - this.actualInstance = _VideoAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into VideoAsset - errorMessages.push("Failed to construct VideoAsset: " + err); - } - try { - if (typeof instance === "ImageAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _ImageAsset["default"].validateJSON(instance); // throw an exception if no match - // create ImageAsset from JS object - this.actualInstance = _ImageAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into ImageAsset - errorMessages.push("Failed to construct ImageAsset: " + err); - } - try { - if (typeof instance === "TextAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _TextAsset["default"].validateJSON(instance); // throw an exception if no match - // create TextAsset from JS object - this.actualInstance = _TextAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into TextAsset - errorMessages.push("Failed to construct TextAsset: " + err); - } - try { - if (typeof instance === "AudioAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _AudioAsset["default"].validateJSON(instance); // throw an exception if no match - // create AudioAsset from JS object - this.actualInstance = _AudioAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into AudioAsset - errorMessages.push("Failed to construct AudioAsset: " + err); - } - try { - if (typeof instance === "LumaAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _LumaAsset["default"].validateJSON(instance); // throw an exception if no match - // create LumaAsset from JS object - this.actualInstance = _LumaAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into LumaAsset - errorMessages.push("Failed to construct LumaAsset: " + err); - } - try { - if (typeof instance === "CaptionAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _CaptionAsset["default"].validateJSON(instance); // throw an exception if no match - // create CaptionAsset from JS object - this.actualInstance = _CaptionAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into CaptionAsset - errorMessages.push("Failed to construct CaptionAsset: " + err); - } - try { - if (typeof instance === "HtmlAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _HtmlAsset["default"].validateJSON(instance); // throw an exception if no match - // create HtmlAsset from JS object - this.actualInstance = _HtmlAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into HtmlAsset - errorMessages.push("Failed to construct HtmlAsset: " + err); - } - try { - if (typeof instance === "TitleAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _TitleAsset["default"].validateJSON(instance); // throw an exception if no match - // create TitleAsset from JS object - this.actualInstance = _TitleAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into TitleAsset - errorMessages.push("Failed to construct TitleAsset: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `Asset` with oneOf schemas AudioAsset, CaptionAsset, HtmlAsset, ImageAsset, LumaAsset, TextAsset, TitleAsset, VideoAsset. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `Asset` with oneOf schemas AudioAsset, CaptionAsset, HtmlAsset, ImageAsset, LumaAsset, TextAsset, TitleAsset, VideoAsset. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a Asset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Asset} obj Optional instance to populate. - * @return {module:model/Asset} The populated Asset instance. - */ - return _createClass(Asset, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be AudioAsset, CaptionAsset, HtmlAsset, ImageAsset, LumaAsset, TextAsset, TitleAsset, VideoAsset. - * @return {(module:model/AudioAsset|module:model/CaptionAsset|module:model/HtmlAsset|module:model/ImageAsset|module:model/LumaAsset|module:model/TextAsset|module:model/TitleAsset|module:model/VideoAsset)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be AudioAsset, CaptionAsset, HtmlAsset, ImageAsset, LumaAsset, TextAsset, TitleAsset, VideoAsset. - * @param {(module:model/AudioAsset|module:model/CaptionAsset|module:model/HtmlAsset|module:model/ImageAsset|module:model/LumaAsset|module:model/TextAsset|module:model/TitleAsset|module:model/VideoAsset)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = Asset.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new Asset(data); - } - }]); -}(); -/** - * The type of asset - set to `title` for titles. - * @member {String} type - * @default 'title' - */ -_Asset = Asset; -/** - * Create an instance of Asset from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/Asset} An instance of Asset. - */ -_defineProperty(Asset, "fromJSON", function (json_string) { - return _Asset.constructFromObject(JSON.parse(json_string)); -}); -Asset.prototype['type'] = 'title'; - -/** - * The URL to an SRT or VTT subtitles file. The URL must be publicly accessible or include credentials. - * @member {String} src - */ -Asset.prototype['src'] = undefined; - -/** - * The start trim point of the captions, in seconds (defaults to 0). Remove the trim length from teh start of the captions and allow it to be synced with video or audio. The captions will play until the file ends or the Clip length is reached. - * @member {Number} trim - */ -Asset.prototype['trim'] = undefined; - -/** - * @member {module:model/AudioAssetVolume} volume - */ -Asset.prototype['volume'] = undefined; - -/** - * Preset volume effects to apply to the video asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @member {module:model/Asset.VolumeEffectEnum} volumeEffect - */ -Asset.prototype['volumeEffect'] = undefined; - -/** - * Adjust the playback speed of the captions between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire captions (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire captions (i.e. original length / 2). - * @member {Number} speed - */ -Asset.prototype['speed'] = undefined; - -/** - * @member {module:model/Crop} crop - */ -Asset.prototype['crop'] = undefined; - -/** - * @member {module:model/ChromaKey} chromaKey - */ -Asset.prototype['chromaKey'] = undefined; - -/** - * The title text string - i.e. \"My Title\". - * @member {String} text - */ -Asset.prototype['text'] = undefined; - -/** - * Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box. - * @member {Number} width - */ -Asset.prototype['width'] = undefined; - -/** - * Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box. - * @member {Number} height - */ -Asset.prototype['height'] = undefined; - -/** - * @member {module:model/CaptionFont} font - */ -Asset.prototype['font'] = undefined; - -/** - * Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. Omit to use transparent background. - * @member {String} background - */ -Asset.prototype['background'] = undefined; - -/** - * @member {module:model/TextAlignment} alignment - */ -Asset.prototype['alignment'] = undefined; - -/** - * The effect to apply to the audio asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @member {module:model/Asset.EffectEnum} effect - */ -Asset.prototype['effect'] = undefined; - -/** - * @member {module:model/CaptionMargin} margin - */ -Asset.prototype['margin'] = undefined; - -/** - * The HTML text string. See list of [supported HTML tags](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-html-tags). - * @member {String} html - */ -Asset.prototype['html'] = undefined; - -/** - * The CSS text string to apply styling to the HTML. See list of [support CSS properties](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-css-properties). - * @member {String} css - */ -Asset.prototype['css'] = undefined; - -/** - * Place the title in one of nine predefined positions of the viewport.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @member {module:model/Asset.PositionEnum} position - */ -Asset.prototype['position'] = undefined; - -/** - * Uses a preset to apply font properties and styling to the title.
  • `minimal`
  • `blockbuster`
  • `vogue`
  • `sketchy`
  • `skinny`
  • `chunk`
  • `chunkLight`
  • `marker`
  • `future`
  • `subtitle`
- * @member {module:model/Asset.StyleEnum} style - */ -Asset.prototype['style'] = undefined; - -/** - * Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. - * @member {String} color - */ -Asset.prototype['color'] = undefined; - -/** - * Set the relative size of the text using predefined sizes from xx-small to xx-large.
  • `xx-small`
  • `x-small`
  • `small`
  • `medium`
  • `large`
  • `x-large`
  • `xx-large`
- * @member {module:model/Asset.SizeEnum} size - */ -Asset.prototype['size'] = undefined; - -/** - * @member {module:model/Offset} offset - */ -Asset.prototype['offset'] = undefined; -Asset.OneOf = ["AudioAsset", "CaptionAsset", "HtmlAsset", "ImageAsset", "LumaAsset", "TextAsset", "TitleAsset", "VideoAsset"]; -var _default = exports["default"] = Asset; \ No newline at end of file diff --git a/src/model/AssetRenderResponse.js b/src/model/AssetRenderResponse.js deleted file mode 100644 index 533c7e3..0000000 --- a/src/model/AssetRenderResponse.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _AssetResponseData = _interopRequireDefault(require("./AssetResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The AssetRenderResponse model module. - * @module model/AssetRenderResponse - * @version 0.2.9 - */ -var AssetRenderResponse = /*#__PURE__*/function () { - /** - * Constructs a new AssetRenderResponse. - * The response returned by the Serve API [get asset by render id](#get-asset-by-render-id) request. The response is an array of asset resources, including video, image, audio, thumbnail and poster image. The response follows the [json:api](https://jsonapi.org/) specification. - * @alias module:model/AssetRenderResponse - * @param data {Array.} An array of asset resources grouped by render id. - */ - function AssetRenderResponse(data) { - _classCallCheck(this, AssetRenderResponse); - AssetRenderResponse.initialize(this, data); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(AssetRenderResponse, [{ - key: "getData", - value: - /** - * Returns An array of asset resources grouped by render id. - * @return {Array.} - */ - function getData() { - return this.data; - } - - /** - * Sets An array of asset resources grouped by render id. - * @param {Array.} data An array of asset resources grouped by render id. - */ - }, { - key: "setData", - value: function setData(data) { - this['data'] = data; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, data) { - obj['data'] = data; - } - - /** - * Constructs a AssetRenderResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AssetRenderResponse} obj Optional instance to populate. - * @return {module:model/AssetRenderResponse} The populated AssetRenderResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new AssetRenderResponse(); - if (data.hasOwnProperty('data')) { - obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AssetResponseData["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to AssetRenderResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to AssetRenderResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(AssetRenderResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['data']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['data'])) { - throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']); - } - // validate the optional field `data` (array) - var _iterator2 = _createForOfIteratorHelper(data['data']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _AssetResponseData["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - return true; - } - }]); -}(); -AssetRenderResponse.RequiredProperties = ["data"]; - -/** - * An array of asset resources grouped by render id. - * @member {Array.} data - */ -AssetRenderResponse.prototype['data'] = undefined; -var _default = exports["default"] = AssetRenderResponse; \ No newline at end of file diff --git a/src/model/AssetResponse.js b/src/model/AssetResponse.js deleted file mode 100644 index 15c751f..0000000 --- a/src/model/AssetResponse.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _AssetResponseData = _interopRequireDefault(require("./AssetResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The AssetResponse model module. - * @module model/AssetResponse - * @version 0.2.9 - */ -var AssetResponse = /*#__PURE__*/function () { - /** - * Constructs a new AssetResponse. - * The response returned by the Serve API [get asset](#get-asset) request. Includes details of a hosted video, image, audio file, thumbnail or poster image. The response follows the [json:api](https://jsonapi.org/) specification. - * @alias module:model/AssetResponse - * @param data {module:model/AssetResponseData} - */ - function AssetResponse(data) { - _classCallCheck(this, AssetResponse); - AssetResponse.initialize(this, data); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(AssetResponse, [{ - key: "getData", - value: - /** - * @return {module:model/AssetResponseData} - */ - function getData() { - return this.data; - } - - /** - * @param {module:model/AssetResponseData} data - */ - }, { - key: "setData", - value: function setData(data) { - this['data'] = data; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, data) { - obj['data'] = data; - } - - /** - * Constructs a AssetResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AssetResponse} obj Optional instance to populate. - * @return {module:model/AssetResponse} The populated AssetResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new AssetResponse(); - if (data.hasOwnProperty('data')) { - obj['data'] = _AssetResponseData["default"].constructFromObject(data['data']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to AssetResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to AssetResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(AssetResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `data` - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['data']) { - // data not null - _AssetResponseData["default"].validateJSON(data['data']); - } - return true; - } - }]); -}(); -AssetResponse.RequiredProperties = ["data"]; - -/** - * @member {module:model/AssetResponseData} data - */ -AssetResponse.prototype['data'] = undefined; -var _default = exports["default"] = AssetResponse; \ No newline at end of file diff --git a/src/model/AssetResponseAttributes.js b/src/model/AssetResponseAttributes.js deleted file mode 100644 index 8d7fbee..0000000 --- a/src/model/AssetResponseAttributes.js +++ /dev/null @@ -1,464 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The AssetResponseAttributes model module. - * @module model/AssetResponseAttributes - * @version 0.2.9 - */ -var AssetResponseAttributes = /*#__PURE__*/function () { - /** - * Constructs a new AssetResponseAttributes. - * The list of asset attributes and their values. - * @alias module:model/AssetResponseAttributes - * @param id {String} The unique id of the hosted asset in UUID format. - * @param owner {String} The owner id of the asset. - * @param status {module:model/AssetResponseAttributes.StatusEnum} The status of the asset.
  • `importing` - the asset is being copied to the hosting service
  • `ready` - the asset is ready to be served to users
  • `failed` - the asset failed to copy or delete
  • `deleted` - the asset has been deleted
- */ - function AssetResponseAttributes(id, owner, status) { - _classCallCheck(this, AssetResponseAttributes); - AssetResponseAttributes.initialize(this, id, owner, status); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(AssetResponseAttributes, [{ - key: "getId", - value: - /** - * Returns The unique id of the hosted asset in UUID format. - * @return {String} - */ - function getId() { - return this.id; - } - - /** - * Sets The unique id of the hosted asset in UUID format. - * @param {String} id The unique id of the hosted asset in UUID format. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns The owner id of the asset. - * @return {String} - */ - }, { - key: "getOwner", - value: function getOwner() { - return this.owner; - } - - /** - * Sets The owner id of the asset. - * @param {String} owner The owner id of the asset. - */ - }, { - key: "setOwner", - value: function setOwner(owner) { - this['owner'] = owner; - return this; - } - /** - * Returns The region the asset is hosted, currently only `au` (Australia). - * @return {String} - */ - }, { - key: "getRegion", - value: function getRegion() { - return this.region; - } - - /** - * Sets The region the asset is hosted, currently only `au` (Australia). - * @param {String} region The region the asset is hosted, currently only `au` (Australia). - */ - }, { - key: "setRegion", - value: function setRegion(region) { - this['region'] = region; - return this; - } - /** - * Returns The original render id that created the asset in UUID format. Multiple assets can share the same render id. - * @return {String} - */ - }, { - key: "getRenderId", - value: function getRenderId() { - return this.renderId; - } - - /** - * Sets The original render id that created the asset in UUID format. Multiple assets can share the same render id. - * @param {String} renderId The original render id that created the asset in UUID format. Multiple assets can share the same render id. - */ - }, { - key: "setRenderId", - value: function setRenderId(renderId) { - this['renderId'] = renderId; - return this; - } - /** - * Returns The third party id of an asset transferred to an external provider, i.e. Mux, YouTube or S3. If the provider is Shotstack, the providerID is the same as the asset id. - * @return {String} - */ - }, { - key: "getProviderId", - value: function getProviderId() { - return this.providerId; - } - - /** - * Sets The third party id of an asset transferred to an external provider, i.e. Mux, YouTube or S3. If the provider is Shotstack, the providerID is the same as the asset id. - * @param {String} providerId The third party id of an asset transferred to an external provider, i.e. Mux, YouTube or S3. If the provider is Shotstack, the providerID is the same as the asset id. - */ - }, { - key: "setProviderId", - value: function setProviderId(providerId) { - this['providerId'] = providerId; - return this; - } - /** - * Returns The asset file name. - * @return {String} - */ - }, { - key: "getFilename", - value: function getFilename() { - return this.filename; - } - - /** - * Sets The asset file name. - * @param {String} filename The asset file name. - */ - }, { - key: "setFilename", - value: function setFilename(filename) { - this['filename'] = filename; - return this; - } - /** - * Returns The asset file name. - * @return {String} - */ - }, { - key: "getUrl", - value: function getUrl() { - return this.url; - } - - /** - * Sets The asset file name. - * @param {String} url The asset file name. - */ - }, { - key: "setUrl", - value: function setUrl(url) { - this['url'] = url; - return this; - } - /** - * Returns The status of the asset.
  • `importing` - the asset is being copied to the hosting service
  • `ready` - the asset is ready to be served to users
  • `failed` - the asset failed to copy or delete
  • `deleted` - the asset has been deleted
- * @return {module:model/AssetResponseAttributes.StatusEnum} - */ - }, { - key: "getStatus", - value: function getStatus() { - return this.status; - } - - /** - * Sets The status of the asset.
  • `importing` - the asset is being copied to the hosting service
  • `ready` - the asset is ready to be served to users
  • `failed` - the asset failed to copy or delete
  • `deleted` - the asset has been deleted
- * @param {module:model/AssetResponseAttributes.StatusEnum} status The status of the asset.
  • `importing` - the asset is being copied to the hosting service
  • `ready` - the asset is ready to be served to users
  • `failed` - the asset failed to copy or delete
  • `deleted` - the asset has been deleted
- */ - }, { - key: "setStatus", - value: function setStatus(status) { - this['status'] = status; - return this; - } - /** - * Returns The time the asset was created. - * @return {String} - */ - }, { - key: "getCreated", - value: function getCreated() { - return this.created; - } - - /** - * Sets The time the asset was created. - * @param {String} created The time the asset was created. - */ - }, { - key: "setCreated", - value: function setCreated(created) { - this['created'] = created; - return this; - } - /** - * Returns The time the asset status was last updated. - * @return {String} - */ - }, { - key: "getUpdated", - value: function getUpdated() { - return this.updated; - } - - /** - * Sets The time the asset status was last updated. - * @param {String} updated The time the asset status was last updated. - */ - }, { - key: "setUpdated", - value: function setUpdated(updated) { - this['updated'] = updated; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, id, owner, status) { - obj['id'] = id; - obj['owner'] = owner; - obj['status'] = status; - } - - /** - * Constructs a AssetResponseAttributes from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AssetResponseAttributes} obj Optional instance to populate. - * @return {module:model/AssetResponseAttributes} The populated AssetResponseAttributes instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new AssetResponseAttributes(); - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('owner')) { - obj['owner'] = _ApiClient["default"].convertToType(data['owner'], 'String'); - } - if (data.hasOwnProperty('region')) { - obj['region'] = _ApiClient["default"].convertToType(data['region'], 'String'); - } - if (data.hasOwnProperty('renderId')) { - obj['renderId'] = _ApiClient["default"].convertToType(data['renderId'], 'String'); - } - if (data.hasOwnProperty('providerId')) { - obj['providerId'] = _ApiClient["default"].convertToType(data['providerId'], 'String'); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String'); - } - if (data.hasOwnProperty('url')) { - obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('created')) { - obj['created'] = _ApiClient["default"].convertToType(data['created'], 'String'); - } - if (data.hasOwnProperty('updated')) { - obj['updated'] = _ApiClient["default"].convertToType(data['updated'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to AssetResponseAttributes. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to AssetResponseAttributes. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(AssetResponseAttributes.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['owner'] && !(typeof data['owner'] === 'string' || data['owner'] instanceof String)) { - throw new Error("Expected the field `owner` to be a primitive type in the JSON string but got " + data['owner']); - } - // ensure the json data is a string - if (data['region'] && !(typeof data['region'] === 'string' || data['region'] instanceof String)) { - throw new Error("Expected the field `region` to be a primitive type in the JSON string but got " + data['region']); - } - // ensure the json data is a string - if (data['renderId'] && !(typeof data['renderId'] === 'string' || data['renderId'] instanceof String)) { - throw new Error("Expected the field `renderId` to be a primitive type in the JSON string but got " + data['renderId']); - } - // ensure the json data is a string - if (data['providerId'] && !(typeof data['providerId'] === 'string' || data['providerId'] instanceof String)) { - throw new Error("Expected the field `providerId` to be a primitive type in the JSON string but got " + data['providerId']); - } - // ensure the json data is a string - if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) { - throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']); - } - // ensure the json data is a string - if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { - throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // ensure the json data is a string - if (data['created'] && !(typeof data['created'] === 'string' || data['created'] instanceof String)) { - throw new Error("Expected the field `created` to be a primitive type in the JSON string but got " + data['created']); - } - // ensure the json data is a string - if (data['updated'] && !(typeof data['updated'] === 'string' || data['updated'] instanceof String)) { - throw new Error("Expected the field `updated` to be a primitive type in the JSON string but got " + data['updated']); - } - return true; - } - }]); -}(); -AssetResponseAttributes.RequiredProperties = ["id", "owner", "status"]; - -/** - * The unique id of the hosted asset in UUID format. - * @member {String} id - */ -AssetResponseAttributes.prototype['id'] = undefined; - -/** - * The owner id of the asset. - * @member {String} owner - */ -AssetResponseAttributes.prototype['owner'] = undefined; - -/** - * The region the asset is hosted, currently only `au` (Australia). - * @member {String} region - */ -AssetResponseAttributes.prototype['region'] = undefined; - -/** - * The original render id that created the asset in UUID format. Multiple assets can share the same render id. - * @member {String} renderId - */ -AssetResponseAttributes.prototype['renderId'] = undefined; - -/** - * The third party id of an asset transferred to an external provider, i.e. Mux, YouTube or S3. If the provider is Shotstack, the providerID is the same as the asset id. - * @member {String} providerId - */ -AssetResponseAttributes.prototype['providerId'] = undefined; - -/** - * The asset file name. - * @member {String} filename - */ -AssetResponseAttributes.prototype['filename'] = undefined; - -/** - * The asset file name. - * @member {String} url - */ -AssetResponseAttributes.prototype['url'] = undefined; - -/** - * The status of the asset.
  • `importing` - the asset is being copied to the hosting service
  • `ready` - the asset is ready to be served to users
  • `failed` - the asset failed to copy or delete
  • `deleted` - the asset has been deleted
- * @member {module:model/AssetResponseAttributes.StatusEnum} status - */ -AssetResponseAttributes.prototype['status'] = undefined; - -/** - * The time the asset was created. - * @member {String} created - */ -AssetResponseAttributes.prototype['created'] = undefined; - -/** - * The time the asset status was last updated. - * @member {String} updated - */ -AssetResponseAttributes.prototype['updated'] = undefined; - -/** - * Allowed values for the status property. - * @enum {String} - * @readonly - */ -AssetResponseAttributes['StatusEnum'] = { - /** - * value: "importing" - * @const - */ - "importing": "importing", - /** - * value: "ready" - * @const - */ - "ready": "ready", - /** - * value: "failed" - * @const - */ - "failed": "failed", - /** - * value: "deleted" - * @const - */ - "deleted": "deleted" -}; -var _default = exports["default"] = AssetResponseAttributes; \ No newline at end of file diff --git a/src/model/AssetResponseData.js b/src/model/AssetResponseData.js deleted file mode 100644 index 9ce93f3..0000000 --- a/src/model/AssetResponseData.js +++ /dev/null @@ -1,169 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _AssetResponseAttributes = _interopRequireDefault(require("./AssetResponseAttributes")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The AssetResponseData model module. - * @module model/AssetResponseData - * @version 0.2.9 - */ -var AssetResponseData = /*#__PURE__*/function () { - /** - * Constructs a new AssetResponseData. - * The type of resource (an asset) and attributes of the asset. - * @alias module:model/AssetResponseData - * @param type {String} The type of resource, in this case it is an assets. - * @param attributes {module:model/AssetResponseAttributes} - */ - function AssetResponseData(type, attributes) { - _classCallCheck(this, AssetResponseData); - AssetResponseData.initialize(this, type, attributes); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(AssetResponseData, [{ - key: "getType", - value: - /** - * Returns The type of resource, in this case it is an assets. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of resource, in this case it is an assets. - * @param {String} type The type of resource, in this case it is an assets. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * @return {module:model/AssetResponseAttributes} - */ - }, { - key: "getAttributes", - value: function getAttributes() { - return this.attributes; - } - - /** - * @param {module:model/AssetResponseAttributes} attributes - */ - }, { - key: "setAttributes", - value: function setAttributes(attributes) { - this['attributes'] = attributes; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, attributes) { - obj['type'] = type; - obj['attributes'] = attributes; - } - - /** - * Constructs a AssetResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AssetResponseData} obj Optional instance to populate. - * @return {module:model/AssetResponseData} The populated AssetResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new AssetResponseData(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('attributes')) { - obj['attributes'] = _AssetResponseAttributes["default"].constructFromObject(data['attributes']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to AssetResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to AssetResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(AssetResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // validate the optional field `attributes` - if (data['attributes']) { - // data not null - _AssetResponseAttributes["default"].validateJSON(data['attributes']); - } - return true; - } - }]); -}(); -AssetResponseData.RequiredProperties = ["type", "attributes"]; - -/** - * The type of resource, in this case it is an assets. - * @member {String} type - */ -AssetResponseData.prototype['type'] = undefined; - -/** - * @member {module:model/AssetResponseAttributes} attributes - */ -AssetResponseData.prototype['attributes'] = undefined; -var _default = exports["default"] = AssetResponseData; \ No newline at end of file diff --git a/src/model/AudioAsset.js b/src/model/AudioAsset.js deleted file mode 100644 index 50fc4e7..0000000 --- a/src/model/AudioAsset.js +++ /dev/null @@ -1,319 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _AudioAssetVolume = _interopRequireDefault(require("./AudioAssetVolume")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The AudioAsset model module. - * @module model/AudioAsset - * @version 0.2.9 - */ -var AudioAsset = /*#__PURE__*/function () { - /** - * Constructs a new AudioAsset. - * The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file. - * @alias module:model/AudioAsset - * @param type {String} The type of asset - set to `audio` for audio assets. - * @param src {String} The audio source URL. The URL must be publicly accessible or include credentials. - */ - function AudioAsset(type, src) { - _classCallCheck(this, AudioAsset); - AudioAsset.initialize(this, type, src); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(AudioAsset, [{ - key: "getType", - value: - /** - * Returns The type of asset - set to `audio` for audio assets. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset - set to `audio` for audio assets. - * @param {String} type The type of asset - set to `audio` for audio assets. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The audio source URL. The URL must be publicly accessible or include credentials. - * @return {String} - */ - }, { - key: "getSrc", - value: function getSrc() { - return this.src; - } - - /** - * Sets The audio source URL. The URL must be publicly accessible or include credentials. - * @param {String} src The audio source URL. The URL must be publicly accessible or include credentials. - */ - }, { - key: "setSrc", - value: function setSrc(src) { - this['src'] = src; - return this; - } - /** - * Returns The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached. - * @return {Number} - */ - }, { - key: "getTrim", - value: function getTrim() { - return this.trim; - } - - /** - * Sets The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached. - * @param {Number} trim The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached. - */ - }, { - key: "setTrim", - value: function setTrim(trim) { - this['trim'] = trim; - return this; - } - /** - * @return {module:model/AudioAssetVolume} - */ - }, { - key: "getVolume", - value: function getVolume() { - return this.volume; - } - - /** - * @param {module:model/AudioAssetVolume} volume - */ - }, { - key: "setVolume", - value: function setVolume(volume) { - this['volume'] = volume; - return this; - } - /** - * Returns Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2). - * minimum: 0 - * maximum: 10 - * @return {Number} - */ - }, { - key: "getSpeed", - value: function getSpeed() { - return this.speed; - } - - /** - * Sets Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2). - * @param {Number} speed Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2). - */ - }, { - key: "setSpeed", - value: function setSpeed(speed) { - this['speed'] = speed; - return this; - } - /** - * Returns The effect to apply to the audio asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @return {module:model/AudioAsset.EffectEnum} - */ - }, { - key: "getEffect", - value: function getEffect() { - return this.effect; - } - - /** - * Sets The effect to apply to the audio asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @param {module:model/AudioAsset.EffectEnum} effect The effect to apply to the audio asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- */ - }, { - key: "setEffect", - value: function setEffect(effect) { - this['effect'] = effect; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, src) { - obj['type'] = type || 'audio'; - obj['src'] = src; - } - - /** - * Constructs a AudioAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AudioAsset} obj Optional instance to populate. - * @return {module:model/AudioAsset} The populated AudioAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new AudioAsset(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('src')) { - obj['src'] = _ApiClient["default"].convertToType(data['src'], 'String'); - } - if (data.hasOwnProperty('trim')) { - obj['trim'] = _ApiClient["default"].convertToType(data['trim'], 'Number'); - } - if (data.hasOwnProperty('volume')) { - obj['volume'] = _AudioAssetVolume["default"].constructFromObject(data['volume']); - } - if (data.hasOwnProperty('speed')) { - obj['speed'] = _ApiClient["default"].convertToType(data['speed'], 'Number'); - } - if (data.hasOwnProperty('effect')) { - obj['effect'] = _ApiClient["default"].convertToType(data['effect'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to AudioAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to AudioAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(AudioAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['src'] && !(typeof data['src'] === 'string' || data['src'] instanceof String)) { - throw new Error("Expected the field `src` to be a primitive type in the JSON string but got " + data['src']); - } - // validate the optional field `volume` - if (data['volume']) { - // data not null - _AudioAssetVolume["default"].validateJSON(data['volume']); - } - // ensure the json data is a string - if (data['effect'] && !(typeof data['effect'] === 'string' || data['effect'] instanceof String)) { - throw new Error("Expected the field `effect` to be a primitive type in the JSON string but got " + data['effect']); - } - return true; - } - }]); -}(); -AudioAsset.RequiredProperties = ["type", "src"]; - -/** - * The type of asset - set to `audio` for audio assets. - * @member {String} type - * @default 'audio' - */ -AudioAsset.prototype['type'] = 'audio'; - -/** - * The audio source URL. The URL must be publicly accessible or include credentials. - * @member {String} src - */ -AudioAsset.prototype['src'] = undefined; - -/** - * The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached. - * @member {Number} trim - */ -AudioAsset.prototype['trim'] = undefined; - -/** - * @member {module:model/AudioAssetVolume} volume - */ -AudioAsset.prototype['volume'] = undefined; - -/** - * Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2). - * @member {Number} speed - */ -AudioAsset.prototype['speed'] = undefined; - -/** - * The effect to apply to the audio asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @member {module:model/AudioAsset.EffectEnum} effect - */ -AudioAsset.prototype['effect'] = undefined; - -/** - * Allowed values for the effect property. - * @enum {String} - * @readonly - */ -AudioAsset['EffectEnum'] = { - /** - * value: "fadeIn" - * @const - */ - "fadeIn": "fadeIn", - /** - * value: "fadeOut" - * @const - */ - "fadeOut": "fadeOut", - /** - * value: "fadeInFadeOut" - * @const - */ - "fadeInFadeOut": "fadeInFadeOut" -}; -var _default = exports["default"] = AudioAsset; \ No newline at end of file diff --git a/src/model/AudioAssetVolume.js b/src/model/AudioAssetVolume.js deleted file mode 100644 index 30bd705..0000000 --- a/src/model/AudioAssetVolume.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Tween = _interopRequireDefault(require("./Tween")); -var _AudioAssetVolume; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The AudioAssetVolume model module. - * @module model/AudioAssetVolume - * @version 0.2.9 - */ -var AudioAssetVolume = /*#__PURE__*/function () { - /** - * Constructs a new AudioAssetVolume. - * Set the volume of the audio clip. Use a number or an array of [Tween](./#tocs_tween) objects to create custom volume transitions. - * @alias module:model/AudioAssetVolume - * @param {(module:model/Number|module:model/[Tween])} instance The actual instance to initialize AudioAssetVolume. - */ - function AudioAssetVolume() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, AudioAssetVolume); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // The volume level for the audio clip. Range varies from 0 to 1 where 0 is muted and 1 is full volume (defaults to 1). - try { - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // An array of [Tween](./#tocs_tween) objects used to create a custom volume effect. Modify the volume of an asset over time. - try { - if (typeof instance === "[Tween]") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - [_Tween["default"]].validateJSON(instance); // throw an exception if no match - // create [Tween] from JS object - this.actualInstance = [_Tween["default"]].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into [Tween] - errorMessages.push("Failed to construct [Tween]: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `AudioAssetVolume` with oneOf schemas Number, [Tween]. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `AudioAssetVolume` with oneOf schemas Number, [Tween]. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a AudioAssetVolume from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AudioAssetVolume} obj Optional instance to populate. - * @return {module:model/AudioAssetVolume} The populated AudioAssetVolume instance. - */ - return _createClass(AudioAssetVolume, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, [Tween]. - * @return {(module:model/Number|module:model/[Tween])} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, [Tween]. - * @param {(module:model/Number|module:model/[Tween])} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = AudioAssetVolume.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new AudioAssetVolume(data); - } - }]); -}(); -_AudioAssetVolume = AudioAssetVolume; -/** - * Create an instance of AudioAssetVolume from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/AudioAssetVolume} An instance of AudioAssetVolume. - */ -_defineProperty(AudioAssetVolume, "fromJSON", function (json_string) { - return _AudioAssetVolume.constructFromObject(JSON.parse(json_string)); -}); -AudioAssetVolume.OneOf = ["Number", "[Tween]"]; -var _default = exports["default"] = AudioAssetVolume; \ No newline at end of file diff --git a/src/model/AudioEnhancement.js b/src/model/AudioEnhancement.js deleted file mode 100644 index 3b4a5e8..0000000 --- a/src/model/AudioEnhancement.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _DolbyEnhancement = _interopRequireDefault(require("./DolbyEnhancement")); -var _DolbyEnhancementOptions = _interopRequireDefault(require("./DolbyEnhancementOptions")); -var _AudioEnhancement; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The AudioEnhancement model module. - * @module model/AudioEnhancement - * @version 0.2.9 - */ -var AudioEnhancement = /*#__PURE__*/function () { - /** - * Constructs a new AudioEnhancement. - * An audio enhancement that can be applied to the audio content of a rendition. The following providers are available: <ul> <li><a href=\"#tocs_dolbyenhancement\">DolbyEnhancement</a></li> </ul> - * @alias module:model/AudioEnhancement - * @param {(module:model/DolbyEnhancement)} instance The actual instance to initialize AudioEnhancement. - */ - function AudioEnhancement() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, AudioEnhancement); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - try { - if (typeof instance === "DolbyEnhancement") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _DolbyEnhancement["default"].validateJSON(instance); // throw an exception if no match - // create DolbyEnhancement from JS object - this.actualInstance = _DolbyEnhancement["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into DolbyEnhancement - errorMessages.push("Failed to construct DolbyEnhancement: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `AudioEnhancement` with oneOf schemas DolbyEnhancement. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `AudioEnhancement` with oneOf schemas DolbyEnhancement. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a AudioEnhancement from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AudioEnhancement} obj Optional instance to populate. - * @return {module:model/AudioEnhancement} The populated AudioEnhancement instance. - */ - return _createClass(AudioEnhancement, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be DolbyEnhancement. - * @return {(module:model/DolbyEnhancement)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be DolbyEnhancement. - * @param {(module:model/DolbyEnhancement)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = AudioEnhancement.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new AudioEnhancement(data); - } - }]); -}(); -/** - * The enhancement provider to use - set to `dolby` for Dolby. - * @member {String} provider - * @default 'dolby' - */ -_AudioEnhancement = AudioEnhancement; -/** - * Create an instance of AudioEnhancement from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/AudioEnhancement} An instance of AudioEnhancement. - */ -_defineProperty(AudioEnhancement, "fromJSON", function (json_string) { - return _AudioEnhancement.constructFromObject(JSON.parse(json_string)); -}); -AudioEnhancement.prototype['provider'] = 'dolby'; - -/** - * @member {module:model/DolbyEnhancementOptions} options - */ -AudioEnhancement.prototype['options'] = undefined; -AudioEnhancement.OneOf = ["DolbyEnhancement"]; -var _default = exports["default"] = AudioEnhancement; \ No newline at end of file diff --git a/src/model/CaptionAsset.js b/src/model/CaptionAsset.js deleted file mode 100644 index fd6646b..0000000 --- a/src/model/CaptionAsset.js +++ /dev/null @@ -1,327 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _CaptionBackground = _interopRequireDefault(require("./CaptionBackground")); -var _CaptionFont = _interopRequireDefault(require("./CaptionFont")); -var _CaptionMargin = _interopRequireDefault(require("./CaptionMargin")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The CaptionAsset model module. - * @module model/CaptionAsset - * @version 0.2.9 - */ -var CaptionAsset = /*#__PURE__*/function () { - /** - * Constructs a new CaptionAsset. - * The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will be read and burnt to the video. Captions can be applied independently from a video or audio file for greater flexibility with styling and layout. For example you can scale, position or crop a video without modifying the captions. To sync captions with a video or audio file use a [Video](#tocs_videoasset\") or [Audio](#tocs_audioasset\") with matching start and end time. - * @alias module:model/CaptionAsset - * @param type {String} The type of asset - set to `caption` for captions. - * @param src {String} The URL to an SRT or VTT subtitles file. The URL must be publicly accessible or include credentials. - */ - function CaptionAsset(type, src) { - _classCallCheck(this, CaptionAsset); - CaptionAsset.initialize(this, type, src); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(CaptionAsset, [{ - key: "getType", - value: - /** - * Returns The type of asset - set to `caption` for captions. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset - set to `caption` for captions. - * @param {String} type The type of asset - set to `caption` for captions. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The URL to an SRT or VTT subtitles file. The URL must be publicly accessible or include credentials. - * @return {String} - */ - }, { - key: "getSrc", - value: function getSrc() { - return this.src; - } - - /** - * Sets The URL to an SRT or VTT subtitles file. The URL must be publicly accessible or include credentials. - * @param {String} src The URL to an SRT or VTT subtitles file. The URL must be publicly accessible or include credentials. - */ - }, { - key: "setSrc", - value: function setSrc(src) { - this['src'] = src; - return this; - } - /** - * @return {module:model/CaptionFont} - */ - }, { - key: "getFont", - value: function getFont() { - return this.font; - } - - /** - * @param {module:model/CaptionFont} font - */ - }, { - key: "setFont", - value: function setFont(font) { - this['font'] = font; - return this; - } - /** - * @return {module:model/CaptionBackground} - */ - }, { - key: "getBackground", - value: function getBackground() { - return this.background; - } - - /** - * @param {module:model/CaptionBackground} background - */ - }, { - key: "setBackground", - value: function setBackground(background) { - this['background'] = background; - return this; - } - /** - * @return {module:model/CaptionMargin} - */ - }, { - key: "getMargin", - value: function getMargin() { - return this.margin; - } - - /** - * @param {module:model/CaptionMargin} margin - */ - }, { - key: "setMargin", - value: function setMargin(margin) { - this['margin'] = margin; - return this; - } - /** - * Returns The start trim point of the captions, in seconds (defaults to 0). Remove the trim length from teh start of the captions and allow it to be synced with video or audio. The captions will play until the file ends or the Clip length is reached. - * @return {Number} - */ - }, { - key: "getTrim", - value: function getTrim() { - return this.trim; - } - - /** - * Sets The start trim point of the captions, in seconds (defaults to 0). Remove the trim length from teh start of the captions and allow it to be synced with video or audio. The captions will play until the file ends or the Clip length is reached. - * @param {Number} trim The start trim point of the captions, in seconds (defaults to 0). Remove the trim length from teh start of the captions and allow it to be synced with video or audio. The captions will play until the file ends or the Clip length is reached. - */ - }, { - key: "setTrim", - value: function setTrim(trim) { - this['trim'] = trim; - return this; - } - /** - * Returns Adjust the playback speed of the captions between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire captions (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire captions (i.e. original length / 2). - * minimum: 0 - * maximum: 10 - * @return {Number} - */ - }, { - key: "getSpeed", - value: function getSpeed() { - return this.speed; - } - - /** - * Sets Adjust the playback speed of the captions between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire captions (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire captions (i.e. original length / 2). - * @param {Number} speed Adjust the playback speed of the captions between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire captions (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire captions (i.e. original length / 2). - */ - }, { - key: "setSpeed", - value: function setSpeed(speed) { - this['speed'] = speed; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, src) { - obj['type'] = type || 'caption'; - obj['src'] = src; - } - - /** - * Constructs a CaptionAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CaptionAsset} obj Optional instance to populate. - * @return {module:model/CaptionAsset} The populated CaptionAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new CaptionAsset(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('src')) { - obj['src'] = _ApiClient["default"].convertToType(data['src'], 'String'); - } - if (data.hasOwnProperty('font')) { - obj['font'] = _CaptionFont["default"].constructFromObject(data['font']); - } - if (data.hasOwnProperty('background')) { - obj['background'] = _CaptionBackground["default"].constructFromObject(data['background']); - } - if (data.hasOwnProperty('margin')) { - obj['margin'] = _CaptionMargin["default"].constructFromObject(data['margin']); - } - if (data.hasOwnProperty('trim')) { - obj['trim'] = _ApiClient["default"].convertToType(data['trim'], 'Number'); - } - if (data.hasOwnProperty('speed')) { - obj['speed'] = _ApiClient["default"].convertToType(data['speed'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to CaptionAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to CaptionAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(CaptionAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['src'] && !(typeof data['src'] === 'string' || data['src'] instanceof String)) { - throw new Error("Expected the field `src` to be a primitive type in the JSON string but got " + data['src']); - } - // validate the optional field `font` - if (data['font']) { - // data not null - _CaptionFont["default"].validateJSON(data['font']); - } - // validate the optional field `background` - if (data['background']) { - // data not null - _CaptionBackground["default"].validateJSON(data['background']); - } - // validate the optional field `margin` - if (data['margin']) { - // data not null - _CaptionMargin["default"].validateJSON(data['margin']); - } - return true; - } - }]); -}(); -CaptionAsset.RequiredProperties = ["type", "src"]; - -/** - * The type of asset - set to `caption` for captions. - * @member {String} type - * @default 'caption' - */ -CaptionAsset.prototype['type'] = 'caption'; - -/** - * The URL to an SRT or VTT subtitles file. The URL must be publicly accessible or include credentials. - * @member {String} src - */ -CaptionAsset.prototype['src'] = undefined; - -/** - * @member {module:model/CaptionFont} font - */ -CaptionAsset.prototype['font'] = undefined; - -/** - * @member {module:model/CaptionBackground} background - */ -CaptionAsset.prototype['background'] = undefined; - -/** - * @member {module:model/CaptionMargin} margin - */ -CaptionAsset.prototype['margin'] = undefined; - -/** - * The start trim point of the captions, in seconds (defaults to 0). Remove the trim length from teh start of the captions and allow it to be synced with video or audio. The captions will play until the file ends or the Clip length is reached. - * @member {Number} trim - */ -CaptionAsset.prototype['trim'] = undefined; - -/** - * Adjust the playback speed of the captions between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire captions (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire captions (i.e. original length / 2). - * @member {Number} speed - */ -CaptionAsset.prototype['speed'] = undefined; -var _default = exports["default"] = CaptionAsset; \ No newline at end of file diff --git a/src/model/CaptionBackground.js b/src/model/CaptionBackground.js deleted file mode 100644 index c015562..0000000 --- a/src/model/CaptionBackground.js +++ /dev/null @@ -1,199 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The CaptionBackground model module. - * @module model/CaptionBackground - * @version 0.2.9 - */ -var CaptionBackground = /*#__PURE__*/function () { - /** - * Constructs a new CaptionBackground. - * Displays a background box behind the caption text. - * @alias module:model/CaptionBackground - */ - function CaptionBackground() { - _classCallCheck(this, CaptionBackground); - CaptionBackground.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(CaptionBackground, [{ - key: "getColor", - value: - /** - * Returns The background color using hexadecimal color notation. - * @return {String} - */ - function getColor() { - return this.color; - } - - /** - * Sets The background color using hexadecimal color notation. - * @param {String} color The background color using hexadecimal color notation. - */ - }, { - key: "setColor", - value: function setColor(color) { - this['color'] = color; - return this; - } - /** - * Returns The opacity of the background color. - * @return {Number} - */ - }, { - key: "getOpacity", - value: function getOpacity() { - return this.opacity; - } - - /** - * Sets The opacity of the background color. - * @param {Number} opacity The opacity of the background color. - */ - }, { - key: "setOpacity", - value: function setOpacity(opacity) { - this['opacity'] = opacity; - return this; - } - /** - * Returns The padding inside the background box in pixels. - * @return {Number} - */ - }, { - key: "getPadding", - value: function getPadding() { - return this.padding; - } - - /** - * Sets The padding inside the background box in pixels. - * @param {Number} padding The padding inside the background box in pixels. - */ - }, { - key: "setPadding", - value: function setPadding(padding) { - this['padding'] = padding; - return this; - } - /** - * Returns The border radius of the background box in pixels. - * @return {Number} - */ - }, { - key: "getBorderRadius", - value: function getBorderRadius() { - return this.borderRadius; - } - - /** - * Sets The border radius of the background box in pixels. - * @param {Number} borderRadius The border radius of the background box in pixels. - */ - }, { - key: "setBorderRadius", - value: function setBorderRadius(borderRadius) { - this['borderRadius'] = borderRadius; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a CaptionBackground from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CaptionBackground} obj Optional instance to populate. - * @return {module:model/CaptionBackground} The populated CaptionBackground instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new CaptionBackground(); - if (data.hasOwnProperty('color')) { - obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String'); - } - if (data.hasOwnProperty('opacity')) { - obj['opacity'] = _ApiClient["default"].convertToType(data['opacity'], 'Number'); - } - if (data.hasOwnProperty('padding')) { - obj['padding'] = _ApiClient["default"].convertToType(data['padding'], 'Number'); - } - if (data.hasOwnProperty('borderRadius')) { - obj['borderRadius'] = _ApiClient["default"].convertToType(data['borderRadius'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to CaptionBackground. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to CaptionBackground. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) { - throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']); - } - return true; - } - }]); -}(); -/** - * The background color using hexadecimal color notation. - * @member {String} color - */ -CaptionBackground.prototype['color'] = undefined; - -/** - * The opacity of the background color. - * @member {Number} opacity - */ -CaptionBackground.prototype['opacity'] = undefined; - -/** - * The padding inside the background box in pixels. - * @member {Number} padding - */ -CaptionBackground.prototype['padding'] = undefined; - -/** - * The border radius of the background box in pixels. - * @member {Number} borderRadius - */ -CaptionBackground.prototype['borderRadius'] = undefined; -var _default = exports["default"] = CaptionBackground; \ No newline at end of file diff --git a/src/model/CaptionFont.js b/src/model/CaptionFont.js deleted file mode 100644 index 445998f..0000000 --- a/src/model/CaptionFont.js +++ /dev/null @@ -1,294 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The CaptionFont model module. - * @module model/CaptionFont - * @version 0.2.9 - */ -var CaptionFont = /*#__PURE__*/function () { - /** - * Constructs a new CaptionFont. - * Font properties for captions text. - * @alias module:model/CaptionFont - */ - function CaptionFont() { - _classCallCheck(this, CaptionFont); - CaptionFont.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(CaptionFont, [{ - key: "getFamily", - value: - /** - * Returns The font family name. This must be Family name embedded in the font, i.e. \"Open Sans\". - * @return {String} - */ - function getFamily() { - return this.family; - } - - /** - * Sets The font family name. This must be Family name embedded in the font, i.e. \"Open Sans\". - * @param {String} family The font family name. This must be Family name embedded in the font, i.e. \"Open Sans\". - */ - }, { - key: "setFamily", - value: function setFamily(family) { - this['family'] = family; - return this; - } - /** - * Returns The text color using hexadecimal color notation. - * @return {String} - */ - }, { - key: "getColor", - value: function getColor() { - return this.color; - } - - /** - * Sets The text color using hexadecimal color notation. - * @param {String} color The text color using hexadecimal color notation. - */ - }, { - key: "setColor", - value: function setColor(color) { - this['color'] = color; - return this; - } - /** - * Returns The opacity of the text where 1 is opaque and 0 is transparent. - * @return {Number} - */ - }, { - key: "getOpacity", - value: function getOpacity() { - return this.opacity; - } - - /** - * Sets The opacity of the text where 1 is opaque and 0 is transparent. - * @param {Number} opacity The opacity of the text where 1 is opaque and 0 is transparent. - */ - }, { - key: "setOpacity", - value: function setOpacity(opacity) { - this['opacity'] = opacity; - return this; - } - /** - * Returns The size of the font in pixels (px). - * @return {Number} - */ - }, { - key: "getSize", - value: function getSize() { - return this.size; - } - - /** - * Sets The size of the font in pixels (px). - * @param {Number} size The size of the font in pixels (px). - */ - }, { - key: "setSize", - value: function setSize(size) { - this['size'] = size; - return this; - } - /** - * Returns The line height of the font as a ratio of the font size. - * @return {Number} - */ - }, { - key: "getLineHeight", - value: function getLineHeight() { - return this.lineHeight; - } - - /** - * Sets The line height of the font as a ratio of the font size. - * @param {Number} lineHeight The line height of the font as a ratio of the font size. - */ - }, { - key: "setLineHeight", - value: function setLineHeight(lineHeight) { - this['lineHeight'] = lineHeight; - return this; - } - /** - * Returns The stroke color of the font using hexadecimal color notation. - * @return {String} - */ - }, { - key: "getStroke", - value: function getStroke() { - return this.stroke; - } - - /** - * Sets The stroke color of the font using hexadecimal color notation. - * @param {String} stroke The stroke color of the font using hexadecimal color notation. - */ - }, { - key: "setStroke", - value: function setStroke(stroke) { - this['stroke'] = stroke; - return this; - } - /** - * Returns The width of the stroke in pixels. - * @return {Number} - */ - }, { - key: "getStrokeWidth", - value: function getStrokeWidth() { - return this.strokeWidth; - } - - /** - * Sets The width of the stroke in pixels. - * @param {Number} strokeWidth The width of the stroke in pixels. - */ - }, { - key: "setStrokeWidth", - value: function setStrokeWidth(strokeWidth) { - this['strokeWidth'] = strokeWidth; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a CaptionFont from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CaptionFont} obj Optional instance to populate. - * @return {module:model/CaptionFont} The populated CaptionFont instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new CaptionFont(); - if (data.hasOwnProperty('family')) { - obj['family'] = _ApiClient["default"].convertToType(data['family'], 'String'); - } - if (data.hasOwnProperty('color')) { - obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String'); - } - if (data.hasOwnProperty('opacity')) { - obj['opacity'] = _ApiClient["default"].convertToType(data['opacity'], 'Number'); - } - if (data.hasOwnProperty('size')) { - obj['size'] = _ApiClient["default"].convertToType(data['size'], 'Number'); - } - if (data.hasOwnProperty('lineHeight')) { - obj['lineHeight'] = _ApiClient["default"].convertToType(data['lineHeight'], 'Number'); - } - if (data.hasOwnProperty('stroke')) { - obj['stroke'] = _ApiClient["default"].convertToType(data['stroke'], 'String'); - } - if (data.hasOwnProperty('strokeWidth')) { - obj['strokeWidth'] = _ApiClient["default"].convertToType(data['strokeWidth'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to CaptionFont. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to CaptionFont. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['family'] && !(typeof data['family'] === 'string' || data['family'] instanceof String)) { - throw new Error("Expected the field `family` to be a primitive type in the JSON string but got " + data['family']); - } - // ensure the json data is a string - if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) { - throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']); - } - // ensure the json data is a string - if (data['stroke'] && !(typeof data['stroke'] === 'string' || data['stroke'] instanceof String)) { - throw new Error("Expected the field `stroke` to be a primitive type in the JSON string but got " + data['stroke']); - } - return true; - } - }]); -}(); -/** - * The font family name. This must be Family name embedded in the font, i.e. \"Open Sans\". - * @member {String} family - */ -CaptionFont.prototype['family'] = undefined; - -/** - * The text color using hexadecimal color notation. - * @member {String} color - */ -CaptionFont.prototype['color'] = undefined; - -/** - * The opacity of the text where 1 is opaque and 0 is transparent. - * @member {Number} opacity - */ -CaptionFont.prototype['opacity'] = undefined; - -/** - * The size of the font in pixels (px). - * @member {Number} size - */ -CaptionFont.prototype['size'] = undefined; - -/** - * The line height of the font as a ratio of the font size. - * @member {Number} lineHeight - */ -CaptionFont.prototype['lineHeight'] = undefined; - -/** - * The stroke color of the font using hexadecimal color notation. - * @member {String} stroke - */ -CaptionFont.prototype['stroke'] = undefined; - -/** - * The width of the stroke in pixels. - * @member {Number} strokeWidth - */ -CaptionFont.prototype['strokeWidth'] = undefined; -var _default = exports["default"] = CaptionFont; \ No newline at end of file diff --git a/src/model/CaptionMargin.js b/src/model/CaptionMargin.js deleted file mode 100644 index f2b4152..0000000 --- a/src/model/CaptionMargin.js +++ /dev/null @@ -1,166 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The CaptionMargin model module. - * @module model/CaptionMargin - * @version 0.2.9 - */ -var CaptionMargin = /*#__PURE__*/function () { - /** - * Constructs a new CaptionMargin. - * The margin properties for captions. Margins are used to position the caption text and background on the screen. - * @alias module:model/CaptionMargin - */ - function CaptionMargin() { - _classCallCheck(this, CaptionMargin); - CaptionMargin.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(CaptionMargin, [{ - key: "getTop", - value: - /** - * Returns The margin above the text. Pushes captions down the screen. - * @return {Number} - */ - function getTop() { - return this.top; - } - - /** - * Sets The margin above the text. Pushes captions down the screen. - * @param {Number} top The margin above the text. Pushes captions down the screen. - */ - }, { - key: "setTop", - value: function setTop(top) { - this['top'] = top; - return this; - } - /** - * Returns The margin to the left of the text. Pushes captions to the right. - * @return {Number} - */ - }, { - key: "getLeft", - value: function getLeft() { - return this.left; - } - - /** - * Sets The margin to the left of the text. Pushes captions to the right. - * @param {Number} left The margin to the left of the text. Pushes captions to the right. - */ - }, { - key: "setLeft", - value: function setLeft(left) { - this['left'] = left; - return this; - } - /** - * Returns The margin to the right of the text. Pushes captions to the left. - * @return {Number} - */ - }, { - key: "getRight", - value: function getRight() { - return this.right; - } - - /** - * Sets The margin to the right of the text. Pushes captions to the left. - * @param {Number} right The margin to the right of the text. Pushes captions to the left. - */ - }, { - key: "setRight", - value: function setRight(right) { - this['right'] = right; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a CaptionMargin from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/CaptionMargin} obj Optional instance to populate. - * @return {module:model/CaptionMargin} The populated CaptionMargin instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new CaptionMargin(); - if (data.hasOwnProperty('top')) { - obj['top'] = _ApiClient["default"].convertToType(data['top'], 'Number'); - } - if (data.hasOwnProperty('left')) { - obj['left'] = _ApiClient["default"].convertToType(data['left'], 'Number'); - } - if (data.hasOwnProperty('right')) { - obj['right'] = _ApiClient["default"].convertToType(data['right'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to CaptionMargin. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to CaptionMargin. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - return true; - } - }]); -}(); -/** - * The margin above the text. Pushes captions down the screen. - * @member {Number} top - */ -CaptionMargin.prototype['top'] = undefined; - -/** - * The margin to the left of the text. Pushes captions to the right. - * @member {Number} left - */ -CaptionMargin.prototype['left'] = undefined; - -/** - * The margin to the right of the text. Pushes captions to the left. - * @member {Number} right - */ -CaptionMargin.prototype['right'] = undefined; -var _default = exports["default"] = CaptionMargin; \ No newline at end of file diff --git a/src/model/ChromaKey.js b/src/model/ChromaKey.js deleted file mode 100644 index 5cbe0c2..0000000 --- a/src/model/ChromaKey.js +++ /dev/null @@ -1,174 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ChromaKey model module. - * @module model/ChromaKey - * @version 0.2.9 - */ -var ChromaKey = /*#__PURE__*/function () { - /** - * Constructs a new ChromaKey. - * Chroma key, commonly known as green screen, is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments. - * @alias module:model/ChromaKey - */ - function ChromaKey() { - _classCallCheck(this, ChromaKey); - ChromaKey.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ChromaKey, [{ - key: "getColor", - value: - /** - * Returns The chroma key color as a hex value. For a green screen, use a green hex value. - * @return {String} - */ - function getColor() { - return this.color; - } - - /** - * Sets The chroma key color as a hex value. For a green screen, use a green hex value. - * @param {String} color The chroma key color as a hex value. For a green screen, use a green hex value. - */ - }, { - key: "setColor", - value: function setColor(color) { - this['color'] = color; - return this; - } - /** - * Returns Pixels within this distance from the key color are eliminated by setting their alpha values to zero. - * minimum: 0 - * maximum: 250 - * @return {Number} - */ - }, { - key: "getThreshold", - value: function getThreshold() { - return this.threshold; - } - - /** - * Sets Pixels within this distance from the key color are eliminated by setting their alpha values to zero. - * @param {Number} threshold Pixels within this distance from the key color are eliminated by setting their alpha values to zero. - */ - }, { - key: "setThreshold", - value: function setThreshold(threshold) { - this['threshold'] = threshold; - return this; - } - /** - * Returns Pixels within the halo distance from the threshold boundary are given an increasing alpha value based on their distance from the threshold. - * minimum: 0 - * maximum: 250 - * @return {Number} - */ - }, { - key: "getHalo", - value: function getHalo() { - return this.halo; - } - - /** - * Sets Pixels within the halo distance from the threshold boundary are given an increasing alpha value based on their distance from the threshold. - * @param {Number} halo Pixels within the halo distance from the threshold boundary are given an increasing alpha value based on their distance from the threshold. - */ - }, { - key: "setHalo", - value: function setHalo(halo) { - this['halo'] = halo; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a ChromaKey from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ChromaKey} obj Optional instance to populate. - * @return {module:model/ChromaKey} The populated ChromaKey instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ChromaKey(); - if (data.hasOwnProperty('color')) { - obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String'); - } - if (data.hasOwnProperty('threshold')) { - obj['threshold'] = _ApiClient["default"].convertToType(data['threshold'], 'Number'); - } - if (data.hasOwnProperty('halo')) { - obj['halo'] = _ApiClient["default"].convertToType(data['halo'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ChromaKey. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ChromaKey. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) { - throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']); - } - return true; - } - }]); -}(); -/** - * The chroma key color as a hex value. For a green screen, use a green hex value. - * @member {String} color - */ -ChromaKey.prototype['color'] = undefined; - -/** - * Pixels within this distance from the key color are eliminated by setting their alpha values to zero. - * @member {Number} threshold - */ -ChromaKey.prototype['threshold'] = undefined; - -/** - * Pixels within the halo distance from the threshold boundary are given an increasing alpha value based on their distance from the threshold. - * @member {Number} halo - */ -ChromaKey.prototype['halo'] = undefined; -var _default = exports["default"] = ChromaKey; \ No newline at end of file diff --git a/src/model/Clip.js b/src/model/Clip.js deleted file mode 100644 index fdcc5d8..0000000 --- a/src/model/Clip.js +++ /dev/null @@ -1,718 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Asset = _interopRequireDefault(require("./Asset")); -var _ClipLength = _interopRequireDefault(require("./ClipLength")); -var _ClipOpacity = _interopRequireDefault(require("./ClipOpacity")); -var _ClipStart = _interopRequireDefault(require("./ClipStart")); -var _Offset = _interopRequireDefault(require("./Offset")); -var _Transformation = _interopRequireDefault(require("./Transformation")); -var _Transition = _interopRequireDefault(require("./Transition")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Clip model module. - * @module model/Clip - * @version 0.2.9 - */ -var Clip = /*#__PURE__*/function () { - /** - * Constructs a new Clip. - * A clip is a container for a specific type of asset, i.e. a title, image, video, audio or html. You use a Clip to define when an asset will display on the timeline, how long it will play for and transitions, filters and effects to apply to it. - * @alias module:model/Clip - * @param asset {module:model/Asset} - * @param start {module:model/ClipStart} - * @param length {module:model/ClipLength} - */ - function Clip(asset, start, length) { - _classCallCheck(this, Clip); - Clip.initialize(this, asset, start, length); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Clip, [{ - key: "getAsset", - value: - /** - * @return {module:model/Asset} - */ - function getAsset() { - return this.asset; - } - - /** - * @param {module:model/Asset} asset - */ - }, { - key: "setAsset", - value: function setAsset(asset) { - this['asset'] = asset; - return this; - } - /** - * @return {module:model/ClipStart} - */ - }, { - key: "getStart", - value: function getStart() { - return this.start; - } - - /** - * @param {module:model/ClipStart} start - */ - }, { - key: "setStart", - value: function setStart(start) { - this['start'] = start; - return this; - } - /** - * @return {module:model/ClipLength} - */ - }, { - key: "getLength", - value: function getLength() { - return this.length; - } - - /** - * @param {module:model/ClipLength} length - */ - }, { - key: "setLength", - value: function setLength(length) { - this['length'] = length; - return this; - } - /** - * Returns Set how the asset should be scaled to fit the viewport using one of the following options:
  • `crop` (default) - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.
  • `cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.
  • `contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.
  • `none` - preserves the original asset dimensions and does not apply any scaling.
- * @return {module:model/Clip.FitEnum} - */ - }, { - key: "getFit", - value: function getFit() { - return this.fit; - } - - /** - * Sets Set how the asset should be scaled to fit the viewport using one of the following options:
  • `crop` (default) - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.
  • `cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.
  • `contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.
  • `none` - preserves the original asset dimensions and does not apply any scaling.
- * @param {module:model/Clip.FitEnum} fit Set how the asset should be scaled to fit the viewport using one of the following options:
  • `crop` (default) - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.
  • `cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.
  • `contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.
  • `none` - preserves the original asset dimensions and does not apply any scaling.
- */ - }, { - key: "setFit", - value: function setFit(fit) { - this['fit'] = fit; - return this; - } - /** - * Returns Scale the asset to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale asset to half the size of the viewport. This is useful for picture-in-picture video and scaling images such as logos and watermarks. - * @return {Number} - */ - }, { - key: "getScale", - value: function getScale() { - return this.scale; - } - - /** - * Sets Scale the asset to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale asset to half the size of the viewport. This is useful for picture-in-picture video and scaling images such as logos and watermarks. - * @param {Number} scale Scale the asset to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale asset to half the size of the viewport. This is useful for picture-in-picture video and scaling images such as logos and watermarks. - */ - }, { - key: "setScale", - value: function setScale(scale) { - this['scale'] = scale; - return this; - } - /** - * Returns Place the asset in one of nine predefined positions of the viewport. This is most effective for when the asset is scaled and you want to position the element to a specific position.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @return {module:model/Clip.PositionEnum} - */ - }, { - key: "getPosition", - value: function getPosition() { - return this.position; - } - - /** - * Sets Place the asset in one of nine predefined positions of the viewport. This is most effective for when the asset is scaled and you want to position the element to a specific position.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @param {module:model/Clip.PositionEnum} position Place the asset in one of nine predefined positions of the viewport. This is most effective for when the asset is scaled and you want to position the element to a specific position.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- */ - }, { - key: "setPosition", - value: function setPosition(position) { - this['position'] = position; - return this; - } - /** - * @return {module:model/Offset} - */ - }, { - key: "getOffset", - value: function getOffset() { - return this.offset; - } - - /** - * @param {module:model/Offset} offset - */ - }, { - key: "setOffset", - value: function setOffset(offset) { - this['offset'] = offset; - return this; - } - /** - * @return {module:model/Transition} - */ - }, { - key: "getTransition", - value: function getTransition() { - return this.transition; - } - - /** - * @param {module:model/Transition} transition - */ - }, { - key: "setTransition", - value: function setTransition(transition) { - this['transition'] = transition; - return this; - } - /** - * Returns A motion effect to apply to the Clip.
  • `zoomIn` - slow zoom in
  • `zoomOut` - slow zoom out
  • `slideLeft` - slow slide (pan) left
  • `slideRight` - slow slide (pan) right
  • `slideUp` - slow slide (pan) up
  • `slideDown` - slow slide (pan) down
The motion effect speed can also be controlled by appending `Fast` or `Slow` to the effect, e.g. `zoomInFast` or `slideRightSlow`. - * @return {module:model/Clip.EffectEnum} - */ - }, { - key: "getEffect", - value: function getEffect() { - return this.effect; - } - - /** - * Sets A motion effect to apply to the Clip.
  • `zoomIn` - slow zoom in
  • `zoomOut` - slow zoom out
  • `slideLeft` - slow slide (pan) left
  • `slideRight` - slow slide (pan) right
  • `slideUp` - slow slide (pan) up
  • `slideDown` - slow slide (pan) down
The motion effect speed can also be controlled by appending `Fast` or `Slow` to the effect, e.g. `zoomInFast` or `slideRightSlow`. - * @param {module:model/Clip.EffectEnum} effect A motion effect to apply to the Clip.
  • `zoomIn` - slow zoom in
  • `zoomOut` - slow zoom out
  • `slideLeft` - slow slide (pan) left
  • `slideRight` - slow slide (pan) right
  • `slideUp` - slow slide (pan) up
  • `slideDown` - slow slide (pan) down
The motion effect speed can also be controlled by appending `Fast` or `Slow` to the effect, e.g. `zoomInFast` or `slideRightSlow`. - */ - }, { - key: "setEffect", - value: function setEffect(effect) { - this['effect'] = effect; - return this; - } - /** - * Returns A filter effect to apply to the Clip.
  • `blur` - blur the scene
  • `boost` - boost contrast and saturation
  • `contrast` - increase contrast
  • `darken` - darken the scene
  • `greyscale` - remove colour
  • `lighten` - lighten the scene
  • `muted` - reduce saturation and contrast
  • `negative` - negative colors
- * @return {module:model/Clip.FilterEnum} - */ - }, { - key: "getFilter", - value: function getFilter() { - return this.filter; - } - - /** - * Sets A filter effect to apply to the Clip.
  • `blur` - blur the scene
  • `boost` - boost contrast and saturation
  • `contrast` - increase contrast
  • `darken` - darken the scene
  • `greyscale` - remove colour
  • `lighten` - lighten the scene
  • `muted` - reduce saturation and contrast
  • `negative` - negative colors
- * @param {module:model/Clip.FilterEnum} filter A filter effect to apply to the Clip.
  • `blur` - blur the scene
  • `boost` - boost contrast and saturation
  • `contrast` - increase contrast
  • `darken` - darken the scene
  • `greyscale` - remove colour
  • `lighten` - lighten the scene
  • `muted` - reduce saturation and contrast
  • `negative` - negative colors
- */ - }, { - key: "setFilter", - value: function setFilter(filter) { - this['filter'] = filter; - return this; - } - /** - * @return {module:model/ClipOpacity} - */ - }, { - key: "getOpacity", - value: function getOpacity() { - return this.opacity; - } - - /** - * @param {module:model/ClipOpacity} opacity - */ - }, { - key: "setOpacity", - value: function setOpacity(opacity) { - this['opacity'] = opacity; - return this; - } - /** - * @return {module:model/Transformation} - */ - }, { - key: "getTransform", - value: function getTransform() { - return this.transform; - } - - /** - * @param {module:model/Transformation} transform - */ - }, { - key: "setTransform", - value: function setTransform(transform) { - this['transform'] = transform; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, asset, start, length) { - obj['asset'] = asset; - obj['start'] = start; - obj['length'] = length; - } - - /** - * Constructs a Clip from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Clip} obj Optional instance to populate. - * @return {module:model/Clip} The populated Clip instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Clip(); - if (data.hasOwnProperty('asset')) { - obj['asset'] = _Asset["default"].constructFromObject(data['asset']); - } - if (data.hasOwnProperty('start')) { - obj['start'] = _ClipStart["default"].constructFromObject(data['start']); - } - if (data.hasOwnProperty('length')) { - obj['length'] = _ClipLength["default"].constructFromObject(data['length']); - } - if (data.hasOwnProperty('fit')) { - obj['fit'] = _ApiClient["default"].convertToType(data['fit'], 'String'); - } - if (data.hasOwnProperty('scale')) { - obj['scale'] = _ApiClient["default"].convertToType(data['scale'], 'Number'); - } - if (data.hasOwnProperty('position')) { - obj['position'] = _ApiClient["default"].convertToType(data['position'], 'String'); - } - if (data.hasOwnProperty('offset')) { - obj['offset'] = _Offset["default"].constructFromObject(data['offset']); - } - if (data.hasOwnProperty('transition')) { - obj['transition'] = _Transition["default"].constructFromObject(data['transition']); - } - if (data.hasOwnProperty('effect')) { - obj['effect'] = _ApiClient["default"].convertToType(data['effect'], 'String'); - } - if (data.hasOwnProperty('filter')) { - obj['filter'] = _ApiClient["default"].convertToType(data['filter'], 'String'); - } - if (data.hasOwnProperty('opacity')) { - obj['opacity'] = _ClipOpacity["default"].constructFromObject(data['opacity']); - } - if (data.hasOwnProperty('transform')) { - obj['transform'] = _Transformation["default"].constructFromObject(data['transform']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Clip. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Clip. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Clip.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `asset` - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['asset']) { - // data not null - _Asset["default"].validateJSON(data['asset']); - } - // validate the optional field `start` - if (data['start']) { - // data not null - _ClipStart["default"].validateJSON(data['start']); - } - // validate the optional field `length` - if (data['length']) { - // data not null - _ClipLength["default"].validateJSON(data['length']); - } - // ensure the json data is a string - if (data['fit'] && !(typeof data['fit'] === 'string' || data['fit'] instanceof String)) { - throw new Error("Expected the field `fit` to be a primitive type in the JSON string but got " + data['fit']); - } - // ensure the json data is a string - if (data['position'] && !(typeof data['position'] === 'string' || data['position'] instanceof String)) { - throw new Error("Expected the field `position` to be a primitive type in the JSON string but got " + data['position']); - } - // validate the optional field `offset` - if (data['offset']) { - // data not null - _Offset["default"].validateJSON(data['offset']); - } - // validate the optional field `transition` - if (data['transition']) { - // data not null - _Transition["default"].validateJSON(data['transition']); - } - // ensure the json data is a string - if (data['effect'] && !(typeof data['effect'] === 'string' || data['effect'] instanceof String)) { - throw new Error("Expected the field `effect` to be a primitive type in the JSON string but got " + data['effect']); - } - // ensure the json data is a string - if (data['filter'] && !(typeof data['filter'] === 'string' || data['filter'] instanceof String)) { - throw new Error("Expected the field `filter` to be a primitive type in the JSON string but got " + data['filter']); - } - // validate the optional field `opacity` - if (data['opacity']) { - // data not null - _ClipOpacity["default"].validateJSON(data['opacity']); - } - // validate the optional field `transform` - if (data['transform']) { - // data not null - _Transformation["default"].validateJSON(data['transform']); - } - return true; - } - }]); -}(); -Clip.RequiredProperties = ["asset", "start", "length"]; - -/** - * @member {module:model/Asset} asset - */ -Clip.prototype['asset'] = undefined; - -/** - * @member {module:model/ClipStart} start - */ -Clip.prototype['start'] = undefined; - -/** - * @member {module:model/ClipLength} length - */ -Clip.prototype['length'] = undefined; - -/** - * Set how the asset should be scaled to fit the viewport using one of the following options:
  • `crop` (default) - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.
  • `cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.
  • `contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.
  • `none` - preserves the original asset dimensions and does not apply any scaling.
- * @member {module:model/Clip.FitEnum} fit - */ -Clip.prototype['fit'] = undefined; - -/** - * Scale the asset to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale asset to half the size of the viewport. This is useful for picture-in-picture video and scaling images such as logos and watermarks. - * @member {Number} scale - */ -Clip.prototype['scale'] = undefined; - -/** - * Place the asset in one of nine predefined positions of the viewport. This is most effective for when the asset is scaled and you want to position the element to a specific position.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @member {module:model/Clip.PositionEnum} position - */ -Clip.prototype['position'] = undefined; - -/** - * @member {module:model/Offset} offset - */ -Clip.prototype['offset'] = undefined; - -/** - * @member {module:model/Transition} transition - */ -Clip.prototype['transition'] = undefined; - -/** - * A motion effect to apply to the Clip.
  • `zoomIn` - slow zoom in
  • `zoomOut` - slow zoom out
  • `slideLeft` - slow slide (pan) left
  • `slideRight` - slow slide (pan) right
  • `slideUp` - slow slide (pan) up
  • `slideDown` - slow slide (pan) down
The motion effect speed can also be controlled by appending `Fast` or `Slow` to the effect, e.g. `zoomInFast` or `slideRightSlow`. - * @member {module:model/Clip.EffectEnum} effect - */ -Clip.prototype['effect'] = undefined; - -/** - * A filter effect to apply to the Clip.
  • `blur` - blur the scene
  • `boost` - boost contrast and saturation
  • `contrast` - increase contrast
  • `darken` - darken the scene
  • `greyscale` - remove colour
  • `lighten` - lighten the scene
  • `muted` - reduce saturation and contrast
  • `negative` - negative colors
- * @member {module:model/Clip.FilterEnum} filter - */ -Clip.prototype['filter'] = undefined; - -/** - * @member {module:model/ClipOpacity} opacity - */ -Clip.prototype['opacity'] = undefined; - -/** - * @member {module:model/Transformation} transform - */ -Clip.prototype['transform'] = undefined; - -/** - * Allowed values for the fit property. - * @enum {String} - * @readonly - */ -Clip['FitEnum'] = { - /** - * value: "cover" - * @const - */ - "cover": "cover", - /** - * value: "contain" - * @const - */ - "contain": "contain", - /** - * value: "crop" - * @const - */ - "crop": "crop", - /** - * value: "none" - * @const - */ - "none": "none" -}; - -/** - * Allowed values for the position property. - * @enum {String} - * @readonly - */ -Clip['PositionEnum'] = { - /** - * value: "top" - * @const - */ - "top": "top", - /** - * value: "topRight" - * @const - */ - "topRight": "topRight", - /** - * value: "right" - * @const - */ - "right": "right", - /** - * value: "bottomRight" - * @const - */ - "bottomRight": "bottomRight", - /** - * value: "bottom" - * @const - */ - "bottom": "bottom", - /** - * value: "bottomLeft" - * @const - */ - "bottomLeft": "bottomLeft", - /** - * value: "left" - * @const - */ - "left": "left", - /** - * value: "topLeft" - * @const - */ - "topLeft": "topLeft", - /** - * value: "center" - * @const - */ - "center": "center" -}; - -/** - * Allowed values for the effect property. - * @enum {String} - * @readonly - */ -Clip['EffectEnum'] = { - /** - * value: "zoomIn" - * @const - */ - "zoomIn": "zoomIn", - /** - * value: "zoomInSlow" - * @const - */ - "zoomInSlow": "zoomInSlow", - /** - * value: "zoomInFast" - * @const - */ - "zoomInFast": "zoomInFast", - /** - * value: "zoomOut" - * @const - */ - "zoomOut": "zoomOut", - /** - * value: "zoomOutSlow" - * @const - */ - "zoomOutSlow": "zoomOutSlow", - /** - * value: "zoomOutFast" - * @const - */ - "zoomOutFast": "zoomOutFast", - /** - * value: "slideLeft" - * @const - */ - "slideLeft": "slideLeft", - /** - * value: "slideLeftSlow" - * @const - */ - "slideLeftSlow": "slideLeftSlow", - /** - * value: "slideLeftFast" - * @const - */ - "slideLeftFast": "slideLeftFast", - /** - * value: "slideRight" - * @const - */ - "slideRight": "slideRight", - /** - * value: "slideRightSlow" - * @const - */ - "slideRightSlow": "slideRightSlow", - /** - * value: "slideRightFast" - * @const - */ - "slideRightFast": "slideRightFast", - /** - * value: "slideUp" - * @const - */ - "slideUp": "slideUp", - /** - * value: "slideUpSlow" - * @const - */ - "slideUpSlow": "slideUpSlow", - /** - * value: "slideUpFast" - * @const - */ - "slideUpFast": "slideUpFast", - /** - * value: "slideDown" - * @const - */ - "slideDown": "slideDown", - /** - * value: "slideDownSlow" - * @const - */ - "slideDownSlow": "slideDownSlow", - /** - * value: "slideDownFast" - * @const - */ - "slideDownFast": "slideDownFast" -}; - -/** - * Allowed values for the filter property. - * @enum {String} - * @readonly - */ -Clip['FilterEnum'] = { - /** - * value: "blur" - * @const - */ - "blur": "blur", - /** - * value: "boost" - * @const - */ - "boost": "boost", - /** - * value: "contrast" - * @const - */ - "contrast": "contrast", - /** - * value: "darken" - * @const - */ - "darken": "darken", - /** - * value: "greyscale" - * @const - */ - "greyscale": "greyscale", - /** - * value: "lighten" - * @const - */ - "lighten": "lighten", - /** - * value: "muted" - * @const - */ - "muted": "muted", - /** - * value: "negative" - * @const - */ - "negative": "negative" -}; -var _default = exports["default"] = Clip; \ No newline at end of file diff --git a/src/model/ClipLength.js b/src/model/ClipLength.js deleted file mode 100644 index 20dcc99..0000000 --- a/src/model/ClipLength.js +++ /dev/null @@ -1,135 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _ClipLength; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ClipLength model module. - * @module model/ClipLength - * @version 0.2.9 - */ -var ClipLength = /*#__PURE__*/function () { - /** - * Constructs a new ClipLength. - * The duration the Clip should play for. - * @alias module:model/ClipLength - * @param {(module:model/Number|module:model/String)} instance The actual instance to initialize ClipLength. - */ - function ClipLength() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, ClipLength); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // The duration the Clip should play for, in seconds. For example, to play the Clip for 5 seconds, set the length value to 5. - try { - // validate number - if (!(typeof instance === 'number' && instance % 1 != 0)) { - throw new Error("Invalid value. Must be number. Input: " + JSON.stringify(instance)); - } - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // The duration the Clip should play for using a [smart clip property](/docs/guide/architecting-an-application/smart-clips/). Set to `auto` to play the Clip for the duration of the asset. Set to `end` to display or play the clip to the end of the timeline. - try { - // validate string - if (!(typeof instance === 'string')) { - throw new Error("Invalid value. Must be string. Input: " + JSON.stringify(instance)); - } - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into String - errorMessages.push("Failed to construct String: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `ClipLength` with oneOf schemas Number, String. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `ClipLength` with oneOf schemas Number, String. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a ClipLength from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ClipLength} obj Optional instance to populate. - * @return {module:model/ClipLength} The populated ClipLength instance. - */ - return _createClass(ClipLength, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, String. - * @return {(module:model/Number|module:model/String)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, String. - * @param {(module:model/Number|module:model/String)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = ClipLength.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new ClipLength(data); - } - }]); -}(); -_ClipLength = ClipLength; -/** - * Create an instance of ClipLength from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/ClipLength} An instance of ClipLength. - */ -_defineProperty(ClipLength, "fromJSON", function (json_string) { - return _ClipLength.constructFromObject(JSON.parse(json_string)); -}); -ClipLength.OneOf = ["Number", "String"]; -var _default = exports["default"] = ClipLength; \ No newline at end of file diff --git a/src/model/ClipOpacity.js b/src/model/ClipOpacity.js deleted file mode 100644 index 1c5b05d..0000000 --- a/src/model/ClipOpacity.js +++ /dev/null @@ -1,140 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Tween = _interopRequireDefault(require("./Tween")); -var _ClipOpacity; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ClipOpacity model module. - * @module model/ClipOpacity - * @version 0.2.9 - */ -var ClipOpacity = /*#__PURE__*/function () { - /** - * Constructs a new ClipOpacity. - * Offset an asset on the horizontal axis (left or right). Use a number or an array of [Tween](./#tocs_tween) objects to create a custom animation. - * @alias module:model/ClipOpacity - * @param {(module:model/Number|module:model/[Tween])} instance The actual instance to initialize ClipOpacity. - */ - function ClipOpacity() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, ClipOpacity); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // Sets the opacity of the Clip where 1 is opaque and 0 is transparent. - try { - // validate number - if (!(typeof instance === 'number' && instance % 1 != 0)) { - throw new Error("Invalid value. Must be number. Input: " + JSON.stringify(instance)); - } - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // An array of [Tween](./#tocs_tween) objects used to create a custom animation. Animate the opacity of an asset over time. - try { - if (typeof instance === "[Tween]") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - [_Tween["default"]].validateJSON(instance); // throw an exception if no match - // create [Tween] from JS object - this.actualInstance = [_Tween["default"]].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into [Tween] - errorMessages.push("Failed to construct [Tween]: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `ClipOpacity` with oneOf schemas Number, [Tween]. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `ClipOpacity` with oneOf schemas Number, [Tween]. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a ClipOpacity from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ClipOpacity} obj Optional instance to populate. - * @return {module:model/ClipOpacity} The populated ClipOpacity instance. - */ - return _createClass(ClipOpacity, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, [Tween]. - * @return {(module:model/Number|module:model/[Tween])} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, [Tween]. - * @param {(module:model/Number|module:model/[Tween])} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = ClipOpacity.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new ClipOpacity(data); - } - }]); -}(); -_ClipOpacity = ClipOpacity; -/** - * Create an instance of ClipOpacity from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/ClipOpacity} An instance of ClipOpacity. - */ -_defineProperty(ClipOpacity, "fromJSON", function (json_string) { - return _ClipOpacity.constructFromObject(JSON.parse(json_string)); -}); -ClipOpacity.OneOf = ["Number", "[Tween]"]; -var _default = exports["default"] = ClipOpacity; \ No newline at end of file diff --git a/src/model/ClipStart.js b/src/model/ClipStart.js deleted file mode 100644 index 4fcbf6c..0000000 --- a/src/model/ClipStart.js +++ /dev/null @@ -1,135 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _ClipStart; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ClipStart model module. - * @module model/ClipStart - * @version 0.2.9 - */ -var ClipStart = /*#__PURE__*/function () { - /** - * Constructs a new ClipStart. - * The start position of the Clip on the timeline. - * @alias module:model/ClipStart - * @param {(module:model/Number|module:model/String)} instance The actual instance to initialize ClipStart. - */ - function ClipStart() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, ClipStart); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // The start position of the Clip on the timeline, in seconds. For example, to start the Clip at 2 seconds, set the start value to 2. - try { - // validate number - if (!(typeof instance === 'number' && instance % 1 != 0)) { - throw new Error("Invalid value. Must be number. Input: " + JSON.stringify(instance)); - } - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // The start position using a [smart clip property](/docs/guide/architecting-an-application/smart-clips/). Set to `auto` to automatically play the clip after the previous clip finishes. - try { - // validate string - if (!(typeof instance === 'string')) { - throw new Error("Invalid value. Must be string. Input: " + JSON.stringify(instance)); - } - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into String - errorMessages.push("Failed to construct String: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `ClipStart` with oneOf schemas Number, String. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `ClipStart` with oneOf schemas Number, String. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a ClipStart from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ClipStart} obj Optional instance to populate. - * @return {module:model/ClipStart} The populated ClipStart instance. - */ - return _createClass(ClipStart, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, String. - * @return {(module:model/Number|module:model/String)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, String. - * @param {(module:model/Number|module:model/String)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = ClipStart.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new ClipStart(data); - } - }]); -}(); -_ClipStart = ClipStart; -/** - * Create an instance of ClipStart from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/ClipStart} An instance of ClipStart. - */ -_defineProperty(ClipStart, "fromJSON", function (json_string) { - return _ClipStart.constructFromObject(JSON.parse(json_string)); -}); -ClipStart.OneOf = ["Number", "String"]; -var _default = exports["default"] = ClipStart; \ No newline at end of file diff --git a/src/model/Crop.js b/src/model/Crop.js deleted file mode 100644 index 64dff0d..0000000 --- a/src/model/Crop.js +++ /dev/null @@ -1,203 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Crop model module. - * @module model/Crop - * @version 0.2.9 - */ -var Crop = /*#__PURE__*/function () { - /** - * Constructs a new Crop. - * Crop the sides of an asset by a relative amount. The size of the crop is specified using a scale between 0 and 1, relative to the screen width - i.e a left crop of 0.5 will crop half of the asset from the left, a top crop of 0.25 will crop the top by quarter of the asset. - * @alias module:model/Crop - */ - function Crop() { - _classCallCheck(this, Crop); - Crop.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Crop, [{ - key: "getTop", - value: - /** - * Returns Crop from the top of the asset - * minimum: 0 - * maximum: 1 - * @return {Number} - */ - function getTop() { - return this.top; - } - - /** - * Sets Crop from the top of the asset - * @param {Number} top Crop from the top of the asset - */ - }, { - key: "setTop", - value: function setTop(top) { - this['top'] = top; - return this; - } - /** - * Returns Crop from the bottom of the asset - * minimum: 0 - * maximum: 1 - * @return {Number} - */ - }, { - key: "getBottom", - value: function getBottom() { - return this.bottom; - } - - /** - * Sets Crop from the bottom of the asset - * @param {Number} bottom Crop from the bottom of the asset - */ - }, { - key: "setBottom", - value: function setBottom(bottom) { - this['bottom'] = bottom; - return this; - } - /** - * Returns Crop from the left of the asset - * minimum: 0 - * maximum: 1 - * @return {Number} - */ - }, { - key: "getLeft", - value: function getLeft() { - return this.left; - } - - /** - * Sets Crop from the left of the asset - * @param {Number} left Crop from the left of the asset - */ - }, { - key: "setLeft", - value: function setLeft(left) { - this['left'] = left; - return this; - } - /** - * Returns Crop from the left of the asset - * minimum: 0 - * maximum: 1 - * @return {Number} - */ - }, { - key: "getRight", - value: function getRight() { - return this.right; - } - - /** - * Sets Crop from the left of the asset - * @param {Number} right Crop from the left of the asset - */ - }, { - key: "setRight", - value: function setRight(right) { - this['right'] = right; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Crop from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Crop} obj Optional instance to populate. - * @return {module:model/Crop} The populated Crop instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Crop(); - if (data.hasOwnProperty('top')) { - obj['top'] = _ApiClient["default"].convertToType(data['top'], 'Number'); - } - if (data.hasOwnProperty('bottom')) { - obj['bottom'] = _ApiClient["default"].convertToType(data['bottom'], 'Number'); - } - if (data.hasOwnProperty('left')) { - obj['left'] = _ApiClient["default"].convertToType(data['left'], 'Number'); - } - if (data.hasOwnProperty('right')) { - obj['right'] = _ApiClient["default"].convertToType(data['right'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Crop. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Crop. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - return true; - } - }]); -}(); -/** - * Crop from the top of the asset - * @member {Number} top - */ -Crop.prototype['top'] = undefined; - -/** - * Crop from the bottom of the asset - * @member {Number} bottom - */ -Crop.prototype['bottom'] = undefined; - -/** - * Crop from the left of the asset - * @member {Number} left - */ -Crop.prototype['left'] = undefined; - -/** - * Crop from the left of the asset - * @member {Number} right - */ -Crop.prototype['right'] = undefined; -var _default = exports["default"] = Crop; \ No newline at end of file diff --git a/src/model/DIDGeneratedAsset.js b/src/model/DIDGeneratedAsset.js deleted file mode 100644 index caf04fc..0000000 --- a/src/model/DIDGeneratedAsset.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _DIDGeneratedAssetOptions = _interopRequireDefault(require("./DIDGeneratedAssetOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The DIDGeneratedAsset model module. - * @module model/DIDGeneratedAsset - * @version 0.2.9 - */ -var DIDGeneratedAsset = /*#__PURE__*/function () { - /** - * Constructs a new DIDGeneratedAsset. - * Generate assets using D-ID. D-ID provide a text-to-avatar service. The D-ID provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/d-id), not in the request. - * @alias module:model/DIDGeneratedAsset - * @param provider {module:model/DIDGeneratedAsset.ProviderEnum} The name of the provider - set to `d-id` for D-ID. - * @param options {module:model/DIDGeneratedAssetOptions} - */ - function DIDGeneratedAsset(provider, options) { - _classCallCheck(this, DIDGeneratedAsset); - DIDGeneratedAsset.initialize(this, provider, options); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(DIDGeneratedAsset, [{ - key: "getProvider", - value: - /** - * Returns The name of the provider - set to `d-id` for D-ID. - * @return {module:model/DIDGeneratedAsset.ProviderEnum} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The name of the provider - set to `d-id` for D-ID. - * @param {module:model/DIDGeneratedAsset.ProviderEnum} provider The name of the provider - set to `d-id` for D-ID. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/DIDGeneratedAssetOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/DIDGeneratedAssetOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider, options) { - obj['provider'] = provider || 'd-id'; - obj['options'] = options; - } - - /** - * Constructs a DIDGeneratedAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/DIDGeneratedAsset} obj Optional instance to populate. - * @return {module:model/DIDGeneratedAsset} The populated DIDGeneratedAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new DIDGeneratedAsset(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _DIDGeneratedAssetOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to DIDGeneratedAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to DIDGeneratedAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(DIDGeneratedAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _DIDGeneratedAssetOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -DIDGeneratedAsset.RequiredProperties = ["provider", "options"]; - -/** - * The name of the provider - set to `d-id` for D-ID. - * @member {module:model/DIDGeneratedAsset.ProviderEnum} provider - * @default 'd-id' - */ -DIDGeneratedAsset.prototype['provider'] = 'd-id'; - -/** - * @member {module:model/DIDGeneratedAssetOptions} options - */ -DIDGeneratedAsset.prototype['options'] = undefined; - -/** - * Allowed values for the provider property. - * @enum {String} - * @readonly - */ -DIDGeneratedAsset['ProviderEnum'] = { - /** - * value: "d-id" - * @const - */ - "d-id": "d-id" -}; -var _default = exports["default"] = DIDGeneratedAsset; \ No newline at end of file diff --git a/src/model/DIDGeneratedAssetOptions.js b/src/model/DIDGeneratedAssetOptions.js deleted file mode 100644 index 8fe9f39..0000000 --- a/src/model/DIDGeneratedAssetOptions.js +++ /dev/null @@ -1,149 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _DIDTextToAvatarOptions = _interopRequireDefault(require("./DIDTextToAvatarOptions")); -var _DIDGeneratedAssetOptions; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The DIDGeneratedAssetOptions model module. - * @module model/DIDGeneratedAssetOptions - * @version 0.2.9 - */ -var DIDGeneratedAssetOptions = /*#__PURE__*/function () { - /** - * Constructs a new DIDGeneratedAssetOptions. - * Generate assets using the third party D-ID provider AI services. The following AI generation services are available: <ul> <li><a href=\"#tocs_didtexttoavataroptions\">DidTextToAvatarOptions</a></li> </ul> - * @alias module:model/DIDGeneratedAssetOptions - * @param {(module:model/DIDTextToAvatarOptions)} instance The actual instance to initialize DIDGeneratedAssetOptions. - */ - function DIDGeneratedAssetOptions() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, DIDGeneratedAssetOptions); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - try { - if (typeof instance === "DIDTextToAvatarOptions") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _DIDTextToAvatarOptions["default"].validateJSON(instance); // throw an exception if no match - // create DIDTextToAvatarOptions from JS object - this.actualInstance = _DIDTextToAvatarOptions["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into DIDTextToAvatarOptions - errorMessages.push("Failed to construct DIDTextToAvatarOptions: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `DIDGeneratedAssetOptions` with oneOf schemas DIDTextToAvatarOptions. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `DIDGeneratedAssetOptions` with oneOf schemas DIDTextToAvatarOptions. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a DIDGeneratedAssetOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/DIDGeneratedAssetOptions} obj Optional instance to populate. - * @return {module:model/DIDGeneratedAssetOptions} The populated DIDGeneratedAssetOptions instance. - */ - return _createClass(DIDGeneratedAssetOptions, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be DIDTextToAvatarOptions. - * @return {(module:model/DIDTextToAvatarOptions)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be DIDTextToAvatarOptions. - * @param {(module:model/DIDTextToAvatarOptions)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = DIDGeneratedAssetOptions.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new DIDGeneratedAssetOptions(data); - } - }]); -}(); -/** - * The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @member {module:model/DIDGeneratedAssetOptions.TypeEnum} type - */ -_DIDGeneratedAssetOptions = DIDGeneratedAssetOptions; -/** - * Create an instance of DIDGeneratedAssetOptions from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/DIDGeneratedAssetOptions} An instance of DIDGeneratedAssetOptions. - */ -_defineProperty(DIDGeneratedAssetOptions, "fromJSON", function (json_string) { - return _DIDGeneratedAssetOptions.constructFromObject(JSON.parse(json_string)); -}); -DIDGeneratedAssetOptions.prototype['type'] = undefined; - -/** - * The text or script that the avatar will narrate. - * @member {String} text - */ -DIDGeneratedAssetOptions.prototype['text'] = undefined; - -/** - * The avatar character to generate. Select from the list of available avatars:
  • `jack`
  • `lana`
  • `lily`
  • `matt`
  • `rian`
- * @member {module:model/DIDGeneratedAssetOptions.AvatarEnum} avatar - */ -DIDGeneratedAssetOptions.prototype['avatar'] = undefined; - -/** - * The background color of the video. - * @member {String} background - */ -DIDGeneratedAssetOptions.prototype['background'] = undefined; -DIDGeneratedAssetOptions.OneOf = ["DIDTextToAvatarOptions"]; -var _default = exports["default"] = DIDGeneratedAssetOptions; \ No newline at end of file diff --git a/src/model/DIDTextToAvatarOptions.js b/src/model/DIDTextToAvatarOptions.js deleted file mode 100644 index 62eb20d..0000000 --- a/src/model/DIDTextToAvatarOptions.js +++ /dev/null @@ -1,284 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The DIDTextToAvatarOptions model module. - * @module model/DIDTextToAvatarOptions - * @version 0.2.9 - */ -var DIDTextToAvatarOptions = /*#__PURE__*/function () { - /** - * Constructs a new DIDTextToAvatarOptions. - * Options for the D-ID text-to-avatar service. Set the text to be converted to an avatar and configure the avatar and background. The output will be generated as an MP4 video file. - * @alias module:model/DIDTextToAvatarOptions - * @param type {module:model/DIDTextToAvatarOptions.TypeEnum} The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @param text {String} The text or script that the avatar will narrate. - * @param avatar {module:model/DIDTextToAvatarOptions.AvatarEnum} The avatar character to generate. Select from the list of available avatars:
  • `jack`
  • `lana`
  • `lily`
  • `matt`
  • `rian`
- */ - function DIDTextToAvatarOptions(type, text, avatar) { - _classCallCheck(this, DIDTextToAvatarOptions); - DIDTextToAvatarOptions.initialize(this, type, text, avatar); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(DIDTextToAvatarOptions, [{ - key: "getType", - value: - /** - * Returns The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @return {module:model/DIDTextToAvatarOptions.TypeEnum} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @param {module:model/DIDTextToAvatarOptions.TypeEnum} type The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The text or script that the avatar will narrate. - * @return {String} - */ - }, { - key: "getText", - value: function getText() { - return this.text; - } - - /** - * Sets The text or script that the avatar will narrate. - * @param {String} text The text or script that the avatar will narrate. - */ - }, { - key: "setText", - value: function setText(text) { - this['text'] = text; - return this; - } - /** - * Returns The avatar character to generate. Select from the list of available avatars:
  • `jack`
  • `lana`
  • `lily`
  • `matt`
  • `rian`
- * @return {module:model/DIDTextToAvatarOptions.AvatarEnum} - */ - }, { - key: "getAvatar", - value: function getAvatar() { - return this.avatar; - } - - /** - * Sets The avatar character to generate. Select from the list of available avatars:
  • `jack`
  • `lana`
  • `lily`
  • `matt`
  • `rian`
- * @param {module:model/DIDTextToAvatarOptions.AvatarEnum} avatar The avatar character to generate. Select from the list of available avatars:
  • `jack`
  • `lana`
  • `lily`
  • `matt`
  • `rian`
- */ - }, { - key: "setAvatar", - value: function setAvatar(avatar) { - this['avatar'] = avatar; - return this; - } - /** - * Returns The background color of the video. - * @return {String} - */ - }, { - key: "getBackground", - value: function getBackground() { - return this.background; - } - - /** - * Sets The background color of the video. - * @param {String} background The background color of the video. - */ - }, { - key: "setBackground", - value: function setBackground(background) { - this['background'] = background; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, text, avatar) { - obj['type'] = type; - obj['text'] = text; - obj['avatar'] = avatar; - } - - /** - * Constructs a DIDTextToAvatarOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/DIDTextToAvatarOptions} obj Optional instance to populate. - * @return {module:model/DIDTextToAvatarOptions} The populated DIDTextToAvatarOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new DIDTextToAvatarOptions(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('text')) { - obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String'); - } - if (data.hasOwnProperty('avatar')) { - obj['avatar'] = _ApiClient["default"].convertToType(data['avatar'], 'String'); - } - if (data.hasOwnProperty('background')) { - obj['background'] = _ApiClient["default"].convertToType(data['background'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to DIDTextToAvatarOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to DIDTextToAvatarOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(DIDTextToAvatarOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { - throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); - } - // ensure the json data is a string - if (data['avatar'] && !(typeof data['avatar'] === 'string' || data['avatar'] instanceof String)) { - throw new Error("Expected the field `avatar` to be a primitive type in the JSON string but got " + data['avatar']); - } - // ensure the json data is a string - if (data['background'] && !(typeof data['background'] === 'string' || data['background'] instanceof String)) { - throw new Error("Expected the field `background` to be a primitive type in the JSON string but got " + data['background']); - } - return true; - } - }]); -}(); -DIDTextToAvatarOptions.RequiredProperties = ["type", "text", "avatar"]; - -/** - * The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @member {module:model/DIDTextToAvatarOptions.TypeEnum} type - */ -DIDTextToAvatarOptions.prototype['type'] = undefined; - -/** - * The text or script that the avatar will narrate. - * @member {String} text - */ -DIDTextToAvatarOptions.prototype['text'] = undefined; - -/** - * The avatar character to generate. Select from the list of available avatars:
  • `jack`
  • `lana`
  • `lily`
  • `matt`
  • `rian`
- * @member {module:model/DIDTextToAvatarOptions.AvatarEnum} avatar - */ -DIDTextToAvatarOptions.prototype['avatar'] = undefined; - -/** - * The background color of the video. - * @member {String} background - */ -DIDTextToAvatarOptions.prototype['background'] = undefined; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -DIDTextToAvatarOptions['TypeEnum'] = { - /** - * value: "text-to-avatar" - * @const - */ - "text-to-avatar": "text-to-avatar" -}; - -/** - * Allowed values for the avatar property. - * @enum {String} - * @readonly - */ -DIDTextToAvatarOptions['AvatarEnum'] = { - /** - * value: "jack" - * @const - */ - "jack": "jack", - /** - * value: "lana" - * @const - */ - "lana": "lana", - /** - * value: "lily" - * @const - */ - "lily": "lily", - /** - * value: "matt" - * @const - */ - "matt": "matt", - /** - * value: "rian" - * @const - */ - "rian": "rian" -}; -var _default = exports["default"] = DIDTextToAvatarOptions; \ No newline at end of file diff --git a/src/model/Destinations.js b/src/model/Destinations.js deleted file mode 100644 index 1040620..0000000 --- a/src/model/Destinations.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _GoogleCloudStorageDestination = _interopRequireDefault(require("./GoogleCloudStorageDestination")); -var _GoogleDriveDestination = _interopRequireDefault(require("./GoogleDriveDestination")); -var _MuxDestination = _interopRequireDefault(require("./MuxDestination")); -var _S3Destination = _interopRequireDefault(require("./S3Destination")); -var _ShotstackDestination = _interopRequireDefault(require("./ShotstackDestination")); -var _VimeoDestination = _interopRequireDefault(require("./VimeoDestination")); -var _VimeoDestinationOptions = _interopRequireDefault(require("./VimeoDestinationOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } \ No newline at end of file diff --git a/src/model/DolbyEnhancement.js b/src/model/DolbyEnhancement.js deleted file mode 100644 index e339760..0000000 --- a/src/model/DolbyEnhancement.js +++ /dev/null @@ -1,170 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _DolbyEnhancementOptions = _interopRequireDefault(require("./DolbyEnhancementOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The DolbyEnhancement model module. - * @module model/DolbyEnhancement - * @version 0.2.9 - */ -var DolbyEnhancement = /*#__PURE__*/function () { - /** - * Constructs a new DolbyEnhancement. - * Dolby.io audio enhancement provider. Credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/dolby), not in the request. - * @alias module:model/DolbyEnhancement - * @param provider {String} The enhancement provider to use - set to `dolby` for Dolby. - * @param options {module:model/DolbyEnhancementOptions} - */ - function DolbyEnhancement(provider, options) { - _classCallCheck(this, DolbyEnhancement); - DolbyEnhancement.initialize(this, provider, options); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(DolbyEnhancement, [{ - key: "getProvider", - value: - /** - * Returns The enhancement provider to use - set to `dolby` for Dolby. - * @return {String} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The enhancement provider to use - set to `dolby` for Dolby. - * @param {String} provider The enhancement provider to use - set to `dolby` for Dolby. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/DolbyEnhancementOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/DolbyEnhancementOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider, options) { - obj['provider'] = provider || 'dolby'; - obj['options'] = options; - } - - /** - * Constructs a DolbyEnhancement from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/DolbyEnhancement} obj Optional instance to populate. - * @return {module:model/DolbyEnhancement} The populated DolbyEnhancement instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new DolbyEnhancement(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _DolbyEnhancementOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to DolbyEnhancement. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to DolbyEnhancement. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(DolbyEnhancement.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _DolbyEnhancementOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -DolbyEnhancement.RequiredProperties = ["provider", "options"]; - -/** - * The enhancement provider to use - set to `dolby` for Dolby. - * @member {String} provider - * @default 'dolby' - */ -DolbyEnhancement.prototype['provider'] = 'dolby'; - -/** - * @member {module:model/DolbyEnhancementOptions} options - */ -DolbyEnhancement.prototype['options'] = undefined; -var _default = exports["default"] = DolbyEnhancement; \ No newline at end of file diff --git a/src/model/DolbyEnhancementOptions.js b/src/model/DolbyEnhancementOptions.js deleted file mode 100644 index 6e06d99..0000000 --- a/src/model/DolbyEnhancementOptions.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The DolbyEnhancementOptions model module. - * @module model/DolbyEnhancementOptions - * @version 0.2.9 - */ -var DolbyEnhancementOptions = /*#__PURE__*/function () { - /** - * Constructs a new DolbyEnhancementOptions. - * Options for the Dolby.io audio enhancement provider. - * @alias module:model/DolbyEnhancementOptions - * @param preset {module:model/DolbyEnhancementOptions.PresetEnum} The preset to use for the audio enhancement. The following presets are available:
  • `conference` - Conference
  • `interview` - Interview
  • `lecture` - Lecture
  • `meeting` - Meeting
  • `mobile_phone` - Mobile Phone
  • `music` - Music
  • `podcast` - Podcast
  • `studio` - Studio
  • `voice_over` - Voice Over
- */ - function DolbyEnhancementOptions(preset) { - _classCallCheck(this, DolbyEnhancementOptions); - DolbyEnhancementOptions.initialize(this, preset); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(DolbyEnhancementOptions, [{ - key: "getPreset", - value: - /** - * Returns The preset to use for the audio enhancement. The following presets are available:
  • `conference` - Conference
  • `interview` - Interview
  • `lecture` - Lecture
  • `meeting` - Meeting
  • `mobile_phone` - Mobile Phone
  • `music` - Music
  • `podcast` - Podcast
  • `studio` - Studio
  • `voice_over` - Voice Over
- * @return {module:model/DolbyEnhancementOptions.PresetEnum} - */ - function getPreset() { - return this.preset; - } - - /** - * Sets The preset to use for the audio enhancement. The following presets are available:
  • `conference` - Conference
  • `interview` - Interview
  • `lecture` - Lecture
  • `meeting` - Meeting
  • `mobile_phone` - Mobile Phone
  • `music` - Music
  • `podcast` - Podcast
  • `studio` - Studio
  • `voice_over` - Voice Over
- * @param {module:model/DolbyEnhancementOptions.PresetEnum} preset The preset to use for the audio enhancement. The following presets are available:
  • `conference` - Conference
  • `interview` - Interview
  • `lecture` - Lecture
  • `meeting` - Meeting
  • `mobile_phone` - Mobile Phone
  • `music` - Music
  • `podcast` - Podcast
  • `studio` - Studio
  • `voice_over` - Voice Over
- */ - }, { - key: "setPreset", - value: function setPreset(preset) { - this['preset'] = preset; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, preset) { - obj['preset'] = preset; - } - - /** - * Constructs a DolbyEnhancementOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/DolbyEnhancementOptions} obj Optional instance to populate. - * @return {module:model/DolbyEnhancementOptions} The populated DolbyEnhancementOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new DolbyEnhancementOptions(); - if (data.hasOwnProperty('preset')) { - obj['preset'] = _ApiClient["default"].convertToType(data['preset'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to DolbyEnhancementOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to DolbyEnhancementOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(DolbyEnhancementOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['preset'] && !(typeof data['preset'] === 'string' || data['preset'] instanceof String)) { - throw new Error("Expected the field `preset` to be a primitive type in the JSON string but got " + data['preset']); - } - return true; - } - }]); -}(); -DolbyEnhancementOptions.RequiredProperties = ["preset"]; - -/** - * The preset to use for the audio enhancement. The following presets are available:
  • `conference` - Conference
  • `interview` - Interview
  • `lecture` - Lecture
  • `meeting` - Meeting
  • `mobile_phone` - Mobile Phone
  • `music` - Music
  • `podcast` - Podcast
  • `studio` - Studio
  • `voice_over` - Voice Over
- * @member {module:model/DolbyEnhancementOptions.PresetEnum} preset - */ -DolbyEnhancementOptions.prototype['preset'] = undefined; - -/** - * Allowed values for the preset property. - * @enum {String} - * @readonly - */ -DolbyEnhancementOptions['PresetEnum'] = { - /** - * value: "conference" - * @const - */ - "conference": "conference", - /** - * value: "interview" - * @const - */ - "interview": "interview", - /** - * value: "lecture" - * @const - */ - "lecture": "lecture", - /** - * value: "meeting" - * @const - */ - "meeting": "meeting", - /** - * value: "mobile_phone" - * @const - */ - "mobile_phone": "mobile_phone", - /** - * value: "music" - * @const - */ - "music": "music", - /** - * value: "podcast" - * @const - */ - "podcast": "podcast", - /** - * value: "studio" - * @const - */ - "studio": "studio", - /** - * value: "voice_over" - * @const - */ - "voice_over": "voice_over" -}; -var _default = exports["default"] = DolbyEnhancementOptions; \ No newline at end of file diff --git a/src/model/Edit.js b/src/model/Edit.js deleted file mode 100644 index 7b46230..0000000 --- a/src/model/Edit.js +++ /dev/null @@ -1,303 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _MergeField = _interopRequireDefault(require("./MergeField")); -var _Output = _interopRequireDefault(require("./Output")); -var _Timeline = _interopRequireDefault(require("./Timeline")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Edit model module. - * @module model/Edit - * @version 0.2.9 - */ -var Edit = /*#__PURE__*/function () { - /** - * Constructs a new Edit. - * An edit defines the arrangement of a video on a timeline, an audio edit or an image design and the output format. - * @alias module:model/Edit - * @param timeline {module:model/Timeline} - * @param output {module:model/Output} - */ - function Edit(timeline, output) { - _classCallCheck(this, Edit); - Edit.initialize(this, timeline, output); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Edit, [{ - key: "getTimeline", - value: - /** - * @return {module:model/Timeline} - */ - function getTimeline() { - return this.timeline; - } - - /** - * @param {module:model/Timeline} timeline - */ - }, { - key: "setTimeline", - value: function setTimeline(timeline) { - this['timeline'] = timeline; - return this; - } - /** - * @return {module:model/Output} - */ - }, { - key: "getOutput", - value: function getOutput() { - return this.output; - } - - /** - * @param {module:model/Output} output - */ - }, { - key: "setOutput", - value: function setOutput(output) { - this['output'] = output; - return this; - } - /** - * Returns An array of key/value pairs that provides an easy way to create templates with placeholders. The placeholders can be used to find and replace keys with values. For example you can search for the placeholder `{{NAME}}` and replace it with the value `Jane`. - * @return {Array.} - */ - }, { - key: "getMerge", - value: function getMerge() { - return this.merge; - } - - /** - * Sets An array of key/value pairs that provides an easy way to create templates with placeholders. The placeholders can be used to find and replace keys with values. For example you can search for the placeholder `{{NAME}}` and replace it with the value `Jane`. - * @param {Array.} merge An array of key/value pairs that provides an easy way to create templates with placeholders. The placeholders can be used to find and replace keys with values. For example you can search for the placeholder `{{NAME}}` and replace it with the value `Jane`. - */ - }, { - key: "setMerge", - value: function setMerge(merge) { - this['merge'] = merge; - return this; - } - /** - * Returns An optional webhook callback URL used to receive status notifications when a render completes or fails. Notifications are also sent when a rendered video is sent to an output [destination](https://shotstack.io/docs/guide/serving-assets/destinations/). See [webhooks](https://shotstack.io/docs/guide/architecting-an-application/webhooks/) for more details. - * @return {String} - */ - }, { - key: "getCallback", - value: function getCallback() { - return this.callback; - } - - /** - * Sets An optional webhook callback URL used to receive status notifications when a render completes or fails. Notifications are also sent when a rendered video is sent to an output [destination](https://shotstack.io/docs/guide/serving-assets/destinations/). See [webhooks](https://shotstack.io/docs/guide/architecting-an-application/webhooks/) for more details. - * @param {String} callback An optional webhook callback URL used to receive status notifications when a render completes or fails. Notifications are also sent when a rendered video is sent to an output [destination](https://shotstack.io/docs/guide/serving-assets/destinations/). See [webhooks](https://shotstack.io/docs/guide/architecting-an-application/webhooks/) for more details. - */ - }, { - key: "setCallback", - value: function setCallback(callback) { - this['callback'] = callback; - return this; - } - /** - * Returns **Notice: This option is now deprecated and will be removed. Disk types are handled automatically. Setting a disk type has no effect.** The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.io/docs/guide/architecting-an-application/disk-types/) for more details.
  • `local` - optimized for high speed rendering with up to 512MB storage
  • `mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render
- * @return {module:model/Edit.DiskEnum} - */ - }, { - key: "getDisk", - value: function getDisk() { - return this.disk; - } - - /** - * Sets **Notice: This option is now deprecated and will be removed. Disk types are handled automatically. Setting a disk type has no effect.** The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.io/docs/guide/architecting-an-application/disk-types/) for more details.
  • `local` - optimized for high speed rendering with up to 512MB storage
  • `mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render
- * @param {module:model/Edit.DiskEnum} disk **Notice: This option is now deprecated and will be removed. Disk types are handled automatically. Setting a disk type has no effect.** The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.io/docs/guide/architecting-an-application/disk-types/) for more details.
  • `local` - optimized for high speed rendering with up to 512MB storage
  • `mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render
- */ - }, { - key: "setDisk", - value: function setDisk(disk) { - this['disk'] = disk; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, timeline, output) { - obj['timeline'] = timeline; - obj['output'] = output; - } - - /** - * Constructs a Edit from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Edit} obj Optional instance to populate. - * @return {module:model/Edit} The populated Edit instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Edit(); - if (data.hasOwnProperty('timeline')) { - obj['timeline'] = _Timeline["default"].constructFromObject(data['timeline']); - } - if (data.hasOwnProperty('output')) { - obj['output'] = _Output["default"].constructFromObject(data['output']); - } - if (data.hasOwnProperty('merge')) { - obj['merge'] = _ApiClient["default"].convertToType(data['merge'], [_MergeField["default"]]); - } - if (data.hasOwnProperty('callback')) { - obj['callback'] = _ApiClient["default"].convertToType(data['callback'], 'String'); - } - if (data.hasOwnProperty('disk')) { - obj['disk'] = _ApiClient["default"].convertToType(data['disk'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Edit. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Edit. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Edit.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `timeline` - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['timeline']) { - // data not null - _Timeline["default"].validateJSON(data['timeline']); - } - // validate the optional field `output` - if (data['output']) { - // data not null - _Output["default"].validateJSON(data['output']); - } - if (data['merge']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['merge'])) { - throw new Error("Expected the field `merge` to be an array in the JSON data but got " + data['merge']); - } - // validate the optional field `merge` (array) - var _iterator2 = _createForOfIteratorHelper(data['merge']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _MergeField["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - // ensure the json data is a string - if (data['callback'] && !(typeof data['callback'] === 'string' || data['callback'] instanceof String)) { - throw new Error("Expected the field `callback` to be a primitive type in the JSON string but got " + data['callback']); - } - // ensure the json data is a string - if (data['disk'] && !(typeof data['disk'] === 'string' || data['disk'] instanceof String)) { - throw new Error("Expected the field `disk` to be a primitive type in the JSON string but got " + data['disk']); - } - return true; - } - }]); -}(); -Edit.RequiredProperties = ["timeline", "output"]; - -/** - * @member {module:model/Timeline} timeline - */ -Edit.prototype['timeline'] = undefined; - -/** - * @member {module:model/Output} output - */ -Edit.prototype['output'] = undefined; - -/** - * An array of key/value pairs that provides an easy way to create templates with placeholders. The placeholders can be used to find and replace keys with values. For example you can search for the placeholder `{{NAME}}` and replace it with the value `Jane`. - * @member {Array.} merge - */ -Edit.prototype['merge'] = undefined; - -/** - * An optional webhook callback URL used to receive status notifications when a render completes or fails. Notifications are also sent when a rendered video is sent to an output [destination](https://shotstack.io/docs/guide/serving-assets/destinations/). See [webhooks](https://shotstack.io/docs/guide/architecting-an-application/webhooks/) for more details. - * @member {String} callback - */ -Edit.prototype['callback'] = undefined; - -/** - * **Notice: This option is now deprecated and will be removed. Disk types are handled automatically. Setting a disk type has no effect.** The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.io/docs/guide/architecting-an-application/disk-types/) for more details.
  • `local` - optimized for high speed rendering with up to 512MB storage
  • `mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render
- * @member {module:model/Edit.DiskEnum} disk - */ -Edit.prototype['disk'] = undefined; - -/** - * Allowed values for the disk property. - * @enum {String} - * @readonly - */ -Edit['DiskEnum'] = { - /** - * value: "local" - * @const - */ - "local": "local", - /** - * value: "mount" - * @const - */ - "mount": "mount" -}; -var _default = exports["default"] = Edit; \ No newline at end of file diff --git a/src/model/ElevenLabsGeneratedAsset.js b/src/model/ElevenLabsGeneratedAsset.js deleted file mode 100644 index 4d30562..0000000 --- a/src/model/ElevenLabsGeneratedAsset.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _ElevenLabsGeneratedAssetOptions = _interopRequireDefault(require("./ElevenLabsGeneratedAssetOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ElevenLabsGeneratedAsset model module. - * @module model/ElevenLabsGeneratedAsset - * @version 0.2.9 - */ -var ElevenLabsGeneratedAsset = /*#__PURE__*/function () { - /** - * Constructs a new ElevenLabsGeneratedAsset. - * Generate assets using ElevenLabs. ElevenLabs provide a text-to-speech service. The ElevenLabs provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/elevenlabs), not in the request. - * @alias module:model/ElevenLabsGeneratedAsset - * @param provider {module:model/ElevenLabsGeneratedAsset.ProviderEnum} The name of the provider - set to `elevenlabs` for ElevenLabs. - * @param options {module:model/ElevenLabsGeneratedAssetOptions} - */ - function ElevenLabsGeneratedAsset(provider, options) { - _classCallCheck(this, ElevenLabsGeneratedAsset); - ElevenLabsGeneratedAsset.initialize(this, provider, options); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ElevenLabsGeneratedAsset, [{ - key: "getProvider", - value: - /** - * Returns The name of the provider - set to `elevenlabs` for ElevenLabs. - * @return {module:model/ElevenLabsGeneratedAsset.ProviderEnum} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The name of the provider - set to `elevenlabs` for ElevenLabs. - * @param {module:model/ElevenLabsGeneratedAsset.ProviderEnum} provider The name of the provider - set to `elevenlabs` for ElevenLabs. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/ElevenLabsGeneratedAssetOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/ElevenLabsGeneratedAssetOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider, options) { - obj['provider'] = provider || 'elevenlabs'; - obj['options'] = options; - } - - /** - * Constructs a ElevenLabsGeneratedAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ElevenLabsGeneratedAsset} obj Optional instance to populate. - * @return {module:model/ElevenLabsGeneratedAsset} The populated ElevenLabsGeneratedAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ElevenLabsGeneratedAsset(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _ElevenLabsGeneratedAssetOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ElevenLabsGeneratedAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ElevenLabsGeneratedAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ElevenLabsGeneratedAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _ElevenLabsGeneratedAssetOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -ElevenLabsGeneratedAsset.RequiredProperties = ["provider", "options"]; - -/** - * The name of the provider - set to `elevenlabs` for ElevenLabs. - * @member {module:model/ElevenLabsGeneratedAsset.ProviderEnum} provider - * @default 'elevenlabs' - */ -ElevenLabsGeneratedAsset.prototype['provider'] = 'elevenlabs'; - -/** - * @member {module:model/ElevenLabsGeneratedAssetOptions} options - */ -ElevenLabsGeneratedAsset.prototype['options'] = undefined; - -/** - * Allowed values for the provider property. - * @enum {String} - * @readonly - */ -ElevenLabsGeneratedAsset['ProviderEnum'] = { - /** - * value: "elevenlabs" - * @const - */ - "elevenlabs": "elevenlabs" -}; -var _default = exports["default"] = ElevenLabsGeneratedAsset; \ No newline at end of file diff --git a/src/model/ElevenLabsGeneratedAssetOptions.js b/src/model/ElevenLabsGeneratedAssetOptions.js deleted file mode 100644 index 5233f84..0000000 --- a/src/model/ElevenLabsGeneratedAssetOptions.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _ElevenLabsTextToSpeechOptions = _interopRequireDefault(require("./ElevenLabsTextToSpeechOptions")); -var _ElevenLabsGeneratedAssetOptions; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ElevenLabsGeneratedAssetOptions model module. - * @module model/ElevenLabsGeneratedAssetOptions - * @version 0.2.9 - */ -var ElevenLabsGeneratedAssetOptions = /*#__PURE__*/function () { - /** - * Constructs a new ElevenLabsGeneratedAssetOptions. - * Generate assets using the third party ElevenLabs provider AI services. The following AI generation services are available: <ul> <li><a href=\"#tocs_elevenlabstexttospeechoptions\">ElevenLabsTextToSpeechOptions</a></li> </ul> - * @alias module:model/ElevenLabsGeneratedAssetOptions - * @param {(module:model/ElevenLabsTextToSpeechOptions)} instance The actual instance to initialize ElevenLabsGeneratedAssetOptions. - */ - function ElevenLabsGeneratedAssetOptions() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, ElevenLabsGeneratedAssetOptions); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - try { - if (typeof instance === "ElevenLabsTextToSpeechOptions") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _ElevenLabsTextToSpeechOptions["default"].validateJSON(instance); // throw an exception if no match - // create ElevenLabsTextToSpeechOptions from JS object - this.actualInstance = _ElevenLabsTextToSpeechOptions["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into ElevenLabsTextToSpeechOptions - errorMessages.push("Failed to construct ElevenLabsTextToSpeechOptions: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `ElevenLabsGeneratedAssetOptions` with oneOf schemas ElevenLabsTextToSpeechOptions. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `ElevenLabsGeneratedAssetOptions` with oneOf schemas ElevenLabsTextToSpeechOptions. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a ElevenLabsGeneratedAssetOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ElevenLabsGeneratedAssetOptions} obj Optional instance to populate. - * @return {module:model/ElevenLabsGeneratedAssetOptions} The populated ElevenLabsGeneratedAssetOptions instance. - */ - return _createClass(ElevenLabsGeneratedAssetOptions, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be ElevenLabsTextToSpeechOptions. - * @return {(module:model/ElevenLabsTextToSpeechOptions)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be ElevenLabsTextToSpeechOptions. - * @param {(module:model/ElevenLabsTextToSpeechOptions)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = ElevenLabsGeneratedAssetOptions.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new ElevenLabsGeneratedAssetOptions(data); - } - }]); -}(); -/** - * The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @member {module:model/ElevenLabsGeneratedAssetOptions.TypeEnum} type - */ -_ElevenLabsGeneratedAssetOptions = ElevenLabsGeneratedAssetOptions; -/** - * Create an instance of ElevenLabsGeneratedAssetOptions from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/ElevenLabsGeneratedAssetOptions} An instance of ElevenLabsGeneratedAssetOptions. - */ -_defineProperty(ElevenLabsGeneratedAssetOptions, "fromJSON", function (json_string) { - return _ElevenLabsGeneratedAssetOptions.constructFromObject(JSON.parse(json_string)); -}); -ElevenLabsGeneratedAssetOptions.prototype['type'] = undefined; - -/** - * The text to convert to speech. - * @member {String} text - */ -ElevenLabsGeneratedAssetOptions.prototype['text'] = undefined; - -/** - * The voice to use for the text-to-speech conversion. Select a voice from the list of available voices:
  • `Adam`
  • `Antoni`
  • `Arnold`
  • `Bella`
  • `Domi`
  • `Elli`
  • `Josh`
  • `Rachel`
  • `Sam`
- * @member {module:model/ElevenLabsGeneratedAssetOptions.VoiceEnum} voice - */ -ElevenLabsGeneratedAssetOptions.prototype['voice'] = undefined; -ElevenLabsGeneratedAssetOptions.OneOf = ["ElevenLabsTextToSpeechOptions"]; -var _default = exports["default"] = ElevenLabsGeneratedAssetOptions; \ No newline at end of file diff --git a/src/model/ElevenLabsTextToSpeechOptions.js b/src/model/ElevenLabsTextToSpeechOptions.js deleted file mode 100644 index d18aa0f..0000000 --- a/src/model/ElevenLabsTextToSpeechOptions.js +++ /dev/null @@ -1,271 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ElevenLabsTextToSpeechOptions model module. - * @module model/ElevenLabsTextToSpeechOptions - * @version 0.2.9 - */ -var ElevenLabsTextToSpeechOptions = /*#__PURE__*/function () { - /** - * Constructs a new ElevenLabsTextToSpeechOptions. - * Options for the ElevenLabs text-to-speech service. Set the text to be converted to speech and choose a voice to set the speaking style. The output will be generated as an MP3 audio file available at the URL returned in the response. - * @alias module:model/ElevenLabsTextToSpeechOptions - * @param type {module:model/ElevenLabsTextToSpeechOptions.TypeEnum} The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @param text {String} The text to convert to speech. - * @param voice {module:model/ElevenLabsTextToSpeechOptions.VoiceEnum} The voice to use for the text-to-speech conversion. Select a voice from the list of available voices:
  • `Adam`
  • `Antoni`
  • `Arnold`
  • `Bella`
  • `Domi`
  • `Elli`
  • `Josh`
  • `Rachel`
  • `Sam`
- */ - function ElevenLabsTextToSpeechOptions(type, text, voice) { - _classCallCheck(this, ElevenLabsTextToSpeechOptions); - ElevenLabsTextToSpeechOptions.initialize(this, type, text, voice); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ElevenLabsTextToSpeechOptions, [{ - key: "getType", - value: - /** - * Returns The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @return {module:model/ElevenLabsTextToSpeechOptions.TypeEnum} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @param {module:model/ElevenLabsTextToSpeechOptions.TypeEnum} type The type of asset to generate - set to `text-to-speech` for text-to-speech. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The text to convert to speech. - * @return {String} - */ - }, { - key: "getText", - value: function getText() { - return this.text; - } - - /** - * Sets The text to convert to speech. - * @param {String} text The text to convert to speech. - */ - }, { - key: "setText", - value: function setText(text) { - this['text'] = text; - return this; - } - /** - * Returns The voice to use for the text-to-speech conversion. Select a voice from the list of available voices:
  • `Adam`
  • `Antoni`
  • `Arnold`
  • `Bella`
  • `Domi`
  • `Elli`
  • `Josh`
  • `Rachel`
  • `Sam`
- * @return {module:model/ElevenLabsTextToSpeechOptions.VoiceEnum} - */ - }, { - key: "getVoice", - value: function getVoice() { - return this.voice; - } - - /** - * Sets The voice to use for the text-to-speech conversion. Select a voice from the list of available voices:
  • `Adam`
  • `Antoni`
  • `Arnold`
  • `Bella`
  • `Domi`
  • `Elli`
  • `Josh`
  • `Rachel`
  • `Sam`
- * @param {module:model/ElevenLabsTextToSpeechOptions.VoiceEnum} voice The voice to use for the text-to-speech conversion. Select a voice from the list of available voices:
  • `Adam`
  • `Antoni`
  • `Arnold`
  • `Bella`
  • `Domi`
  • `Elli`
  • `Josh`
  • `Rachel`
  • `Sam`
- */ - }, { - key: "setVoice", - value: function setVoice(voice) { - this['voice'] = voice; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, text, voice) { - obj['type'] = type; - obj['text'] = text; - obj['voice'] = voice; - } - - /** - * Constructs a ElevenLabsTextToSpeechOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ElevenLabsTextToSpeechOptions} obj Optional instance to populate. - * @return {module:model/ElevenLabsTextToSpeechOptions} The populated ElevenLabsTextToSpeechOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ElevenLabsTextToSpeechOptions(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('text')) { - obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String'); - } - if (data.hasOwnProperty('voice')) { - obj['voice'] = _ApiClient["default"].convertToType(data['voice'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ElevenLabsTextToSpeechOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ElevenLabsTextToSpeechOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ElevenLabsTextToSpeechOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { - throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); - } - // ensure the json data is a string - if (data['voice'] && !(typeof data['voice'] === 'string' || data['voice'] instanceof String)) { - throw new Error("Expected the field `voice` to be a primitive type in the JSON string but got " + data['voice']); - } - return true; - } - }]); -}(); -ElevenLabsTextToSpeechOptions.RequiredProperties = ["type", "text", "voice"]; - -/** - * The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @member {module:model/ElevenLabsTextToSpeechOptions.TypeEnum} type - */ -ElevenLabsTextToSpeechOptions.prototype['type'] = undefined; - -/** - * The text to convert to speech. - * @member {String} text - */ -ElevenLabsTextToSpeechOptions.prototype['text'] = undefined; - -/** - * The voice to use for the text-to-speech conversion. Select a voice from the list of available voices:
  • `Adam`
  • `Antoni`
  • `Arnold`
  • `Bella`
  • `Domi`
  • `Elli`
  • `Josh`
  • `Rachel`
  • `Sam`
- * @member {module:model/ElevenLabsTextToSpeechOptions.VoiceEnum} voice - */ -ElevenLabsTextToSpeechOptions.prototype['voice'] = undefined; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -ElevenLabsTextToSpeechOptions['TypeEnum'] = { - /** - * value: "text-to-speech" - * @const - */ - "text-to-speech": "text-to-speech" -}; - -/** - * Allowed values for the voice property. - * @enum {String} - * @readonly - */ -ElevenLabsTextToSpeechOptions['VoiceEnum'] = { - /** - * value: "Adam" - * @const - */ - "Adam": "Adam", - /** - * value: "Antoni" - * @const - */ - "Antoni": "Antoni", - /** - * value: "Arnold" - * @const - */ - "Arnold": "Arnold", - /** - * value: "Bella" - * @const - */ - "Bella": "Bella", - /** - * value: "Domi" - * @const - */ - "Domi": "Domi", - /** - * value: "Elli" - * @const - */ - "Elli": "Elli", - /** - * value: "Josh" - * @const - */ - "Josh": "Josh", - /** - * value: "Rachel" - * @const - */ - "Rachel": "Rachel", - /** - * value: "Sam" - * @const - */ - "Sam": "Sam" -}; -var _default = exports["default"] = ElevenLabsTextToSpeechOptions; \ No newline at end of file diff --git a/src/model/Enhancements.js b/src/model/Enhancements.js deleted file mode 100644 index cff5e9c..0000000 --- a/src/model/Enhancements.js +++ /dev/null @@ -1,111 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _AudioEnhancement = _interopRequireDefault(require("./AudioEnhancement")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Enhancements model module. - * @module model/Enhancements - * @version 0.2.9 - */ -var Enhancements = /*#__PURE__*/function () { - /** - * Constructs a new Enhancements. - * Enhancements that can be applied to a rendition. Currently only supports the Dolby audio enhancement. - * @alias module:model/Enhancements - */ - function Enhancements() { - _classCallCheck(this, Enhancements); - Enhancements.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Enhancements, [{ - key: "getAudio", - value: - /** - * @return {module:model/AudioEnhancement} - */ - function getAudio() { - return this.audio; - } - - /** - * @param {module:model/AudioEnhancement} audio - */ - }, { - key: "setAudio", - value: function setAudio(audio) { - this['audio'] = audio; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Enhancements from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Enhancements} obj Optional instance to populate. - * @return {module:model/Enhancements} The populated Enhancements instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Enhancements(); - if (data.hasOwnProperty('audio')) { - obj['audio'] = _AudioEnhancement["default"].constructFromObject(data['audio']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Enhancements. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Enhancements. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // validate the optional field `audio` - if (data['audio']) { - // data not null - _AudioEnhancement["default"].validateJSON(data['audio']); - } - return true; - } - }]); -}(); -/** - * @member {module:model/AudioEnhancement} audio - */ -Enhancements.prototype['audio'] = undefined; -var _default = exports["default"] = Enhancements; \ No newline at end of file diff --git a/src/model/FlipTransformation.js b/src/model/FlipTransformation.js deleted file mode 100644 index 22d1a9b..0000000 --- a/src/model/FlipTransformation.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The FlipTransformation model module. - * @module model/FlipTransformation - * @version 0.2.9 - */ -var FlipTransformation = /*#__PURE__*/function () { - /** - * Constructs a new FlipTransformation. - * Flip a clip vertically or horizontally. Acts as a mirror effect of the clip along the selected plane. - * @alias module:model/FlipTransformation - */ - function FlipTransformation() { - _classCallCheck(this, FlipTransformation); - FlipTransformation.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(FlipTransformation, [{ - key: "getHorizontal", - value: - /** - * Returns Flip a clip horizontally. - * @return {Boolean} - */ - function getHorizontal() { - return this.horizontal; - } - - /** - * Sets Flip a clip horizontally. - * @param {Boolean} horizontal Flip a clip horizontally. - */ - }, { - key: "setHorizontal", - value: function setHorizontal(horizontal) { - this['horizontal'] = horizontal; - return this; - } - /** - * Returns Flip a clip vertically. - * @return {Boolean} - */ - }, { - key: "getVertical", - value: function getVertical() { - return this.vertical; - } - - /** - * Sets Flip a clip vertically. - * @param {Boolean} vertical Flip a clip vertically. - */ - }, { - key: "setVertical", - value: function setVertical(vertical) { - this['vertical'] = vertical; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a FlipTransformation from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/FlipTransformation} obj Optional instance to populate. - * @return {module:model/FlipTransformation} The populated FlipTransformation instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new FlipTransformation(); - if (data.hasOwnProperty('horizontal')) { - obj['horizontal'] = _ApiClient["default"].convertToType(data['horizontal'], 'Boolean'); - } - if (data.hasOwnProperty('vertical')) { - obj['vertical'] = _ApiClient["default"].convertToType(data['vertical'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to FlipTransformation. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to FlipTransformation. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - return true; - } - }]); -}(); -/** - * Flip a clip horizontally. - * @member {Boolean} horizontal - */ -FlipTransformation.prototype['horizontal'] = undefined; - -/** - * Flip a clip vertically. - * @member {Boolean} vertical - */ -FlipTransformation.prototype['vertical'] = undefined; -var _default = exports["default"] = FlipTransformation; \ No newline at end of file diff --git a/src/model/Font.js b/src/model/Font.js deleted file mode 100644 index 5784ece..0000000 --- a/src/model/Font.js +++ /dev/null @@ -1,135 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Font model module. - * @module model/Font - * @version 0.2.9 - */ -var Font = /*#__PURE__*/function () { - /** - * Constructs a new Font. - * Download a custom font to use with the HTML asset type, using the font name in the CSS or font tag. See our [custom fonts](https://shotstack.io/learn/html-custom-fonts/) getting started guide for more details. - * @alias module:model/Font - * @param src {String} The URL of the font file. The URL must be publicly accessible or include credentials. - */ - function Font(src) { - _classCallCheck(this, Font); - Font.initialize(this, src); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Font, [{ - key: "getSrc", - value: - /** - * Returns The URL of the font file. The URL must be publicly accessible or include credentials. - * @return {String} - */ - function getSrc() { - return this.src; - } - - /** - * Sets The URL of the font file. The URL must be publicly accessible or include credentials. - * @param {String} src The URL of the font file. The URL must be publicly accessible or include credentials. - */ - }, { - key: "setSrc", - value: function setSrc(src) { - this['src'] = src; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, src) { - obj['src'] = src; - } - - /** - * Constructs a Font from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Font} obj Optional instance to populate. - * @return {module:model/Font} The populated Font instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Font(); - if (data.hasOwnProperty('src')) { - obj['src'] = _ApiClient["default"].convertToType(data['src'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Font. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Font. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Font.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['src'] && !(typeof data['src'] === 'string' || data['src'] instanceof String)) { - throw new Error("Expected the field `src` to be a primitive type in the JSON string but got " + data['src']); - } - return true; - } - }]); -}(); -Font.RequiredProperties = ["src"]; - -/** - * The URL of the font file. The URL must be publicly accessible or include credentials. - * @member {String} src - */ -Font.prototype['src'] = undefined; -var _default = exports["default"] = Font; \ No newline at end of file diff --git a/src/model/GeneratedAsset.js b/src/model/GeneratedAsset.js deleted file mode 100644 index bcaff5e..0000000 --- a/src/model/GeneratedAsset.js +++ /dev/null @@ -1,218 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _DIDGeneratedAsset = _interopRequireDefault(require("./DIDGeneratedAsset")); -var _ElevenLabsGeneratedAsset = _interopRequireDefault(require("./ElevenLabsGeneratedAsset")); -var _HeyGenGeneratedAsset = _interopRequireDefault(require("./HeyGenGeneratedAsset")); -var _OpenAiGeneratedAsset = _interopRequireDefault(require("./OpenAiGeneratedAsset")); -var _ShotstackGeneratedAsset = _interopRequireDefault(require("./ShotstackGeneratedAsset")); -var _StabilityAiGeneratedAsset = _interopRequireDefault(require("./StabilityAiGeneratedAsset")); -var _StabilityAiGeneratedAssetOptions = _interopRequireDefault(require("./StabilityAiGeneratedAssetOptions")); -var _GeneratedAsset; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GeneratedAsset model module. - * @module model/GeneratedAsset - * @version 0.2.9 - */ -var GeneratedAsset = /*#__PURE__*/function () { - /** - * Constructs a new GeneratedAsset. - * A generated asset is a media asset created by the Create API. You can use native or third party providers to generate video, audio and image files using Generative AI services like text-to-speech and text-to-avatar. - * @alias module:model/GeneratedAsset - * @param {(module:model/DIDGeneratedAsset|module:model/ElevenLabsGeneratedAsset|module:model/HeyGenGeneratedAsset|module:model/OpenAiGeneratedAsset|module:model/ShotstackGeneratedAsset|module:model/StabilityAiGeneratedAsset)} instance The actual instance to initialize GeneratedAsset. - */ - function GeneratedAsset() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, GeneratedAsset); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - try { - if (typeof instance === "ShotstackGeneratedAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _ShotstackGeneratedAsset["default"].validateJSON(instance); // throw an exception if no match - // create ShotstackGeneratedAsset from JS object - this.actualInstance = _ShotstackGeneratedAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into ShotstackGeneratedAsset - errorMessages.push("Failed to construct ShotstackGeneratedAsset: " + err); - } - try { - if (typeof instance === "DIDGeneratedAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _DIDGeneratedAsset["default"].validateJSON(instance); // throw an exception if no match - // create DIDGeneratedAsset from JS object - this.actualInstance = _DIDGeneratedAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into DIDGeneratedAsset - errorMessages.push("Failed to construct DIDGeneratedAsset: " + err); - } - try { - if (typeof instance === "ElevenLabsGeneratedAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _ElevenLabsGeneratedAsset["default"].validateJSON(instance); // throw an exception if no match - // create ElevenLabsGeneratedAsset from JS object - this.actualInstance = _ElevenLabsGeneratedAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into ElevenLabsGeneratedAsset - errorMessages.push("Failed to construct ElevenLabsGeneratedAsset: " + err); - } - try { - if (typeof instance === "HeyGenGeneratedAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _HeyGenGeneratedAsset["default"].validateJSON(instance); // throw an exception if no match - // create HeyGenGeneratedAsset from JS object - this.actualInstance = _HeyGenGeneratedAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into HeyGenGeneratedAsset - errorMessages.push("Failed to construct HeyGenGeneratedAsset: " + err); - } - try { - if (typeof instance === "OpenAiGeneratedAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _OpenAiGeneratedAsset["default"].validateJSON(instance); // throw an exception if no match - // create OpenAiGeneratedAsset from JS object - this.actualInstance = _OpenAiGeneratedAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into OpenAiGeneratedAsset - errorMessages.push("Failed to construct OpenAiGeneratedAsset: " + err); - } - try { - if (typeof instance === "StabilityAiGeneratedAsset") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _StabilityAiGeneratedAsset["default"].validateJSON(instance); // throw an exception if no match - // create StabilityAiGeneratedAsset from JS object - this.actualInstance = _StabilityAiGeneratedAsset["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into StabilityAiGeneratedAsset - errorMessages.push("Failed to construct StabilityAiGeneratedAsset: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `GeneratedAsset` with oneOf schemas DIDGeneratedAsset, ElevenLabsGeneratedAsset, HeyGenGeneratedAsset, OpenAiGeneratedAsset, ShotstackGeneratedAsset, StabilityAiGeneratedAsset. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `GeneratedAsset` with oneOf schemas DIDGeneratedAsset, ElevenLabsGeneratedAsset, HeyGenGeneratedAsset, OpenAiGeneratedAsset, ShotstackGeneratedAsset, StabilityAiGeneratedAsset. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a GeneratedAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GeneratedAsset} obj Optional instance to populate. - * @return {module:model/GeneratedAsset} The populated GeneratedAsset instance. - */ - return _createClass(GeneratedAsset, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be DIDGeneratedAsset, ElevenLabsGeneratedAsset, HeyGenGeneratedAsset, OpenAiGeneratedAsset, ShotstackGeneratedAsset, StabilityAiGeneratedAsset. - * @return {(module:model/DIDGeneratedAsset|module:model/ElevenLabsGeneratedAsset|module:model/HeyGenGeneratedAsset|module:model/OpenAiGeneratedAsset|module:model/ShotstackGeneratedAsset|module:model/StabilityAiGeneratedAsset)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be DIDGeneratedAsset, ElevenLabsGeneratedAsset, HeyGenGeneratedAsset, OpenAiGeneratedAsset, ShotstackGeneratedAsset, StabilityAiGeneratedAsset. - * @param {(module:model/DIDGeneratedAsset|module:model/ElevenLabsGeneratedAsset|module:model/HeyGenGeneratedAsset|module:model/OpenAiGeneratedAsset|module:model/ShotstackGeneratedAsset|module:model/StabilityAiGeneratedAsset)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = GeneratedAsset.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new GeneratedAsset(data); - } - }]); -}(); -/** - * The name of the provider - set to `stability-ai` for Stability AI. - * @member {module:model/GeneratedAsset.ProviderEnum} provider - * @default 'stability-ai' - */ -_GeneratedAsset = GeneratedAsset; -/** - * Create an instance of GeneratedAsset from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/GeneratedAsset} An instance of GeneratedAsset. - */ -_defineProperty(GeneratedAsset, "fromJSON", function (json_string) { - return _GeneratedAsset.constructFromObject(JSON.parse(json_string)); -}); -GeneratedAsset.prototype['provider'] = 'stability-ai'; - -/** - * @member {module:model/StabilityAiGeneratedAssetOptions} options - */ -GeneratedAsset.prototype['options'] = undefined; -GeneratedAsset.OneOf = ["DIDGeneratedAsset", "ElevenLabsGeneratedAsset", "HeyGenGeneratedAsset", "OpenAiGeneratedAsset", "ShotstackGeneratedAsset", "StabilityAiGeneratedAsset"]; -var _default = exports["default"] = GeneratedAsset; \ No newline at end of file diff --git a/src/model/GeneratedAssetErrorResponse.js b/src/model/GeneratedAssetErrorResponse.js deleted file mode 100644 index ff3d26a..0000000 --- a/src/model/GeneratedAssetErrorResponse.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _GeneratedAssetErrorResponseData = _interopRequireDefault(require("./GeneratedAssetErrorResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GeneratedAssetErrorResponse model module. - * @module model/GeneratedAssetErrorResponse - * @version 0.2.9 - */ -var GeneratedAssetErrorResponse = /*#__PURE__*/function () { - /** - * Constructs a new GeneratedAssetErrorResponse. - * Error response data for validation and other errors returned by the Create API. - * @alias module:model/GeneratedAssetErrorResponse - * @param errors {Array.} An array of errors. - */ - function GeneratedAssetErrorResponse(errors) { - _classCallCheck(this, GeneratedAssetErrorResponse); - GeneratedAssetErrorResponse.initialize(this, errors); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(GeneratedAssetErrorResponse, [{ - key: "getErrors", - value: - /** - * Returns An array of errors. - * @return {Array.} - */ - function getErrors() { - return this.errors; - } - - /** - * Sets An array of errors. - * @param {Array.} errors An array of errors. - */ - }, { - key: "setErrors", - value: function setErrors(errors) { - this['errors'] = errors; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, errors) { - obj['errors'] = errors; - } - - /** - * Constructs a GeneratedAssetErrorResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GeneratedAssetErrorResponse} obj Optional instance to populate. - * @return {module:model/GeneratedAssetErrorResponse} The populated GeneratedAssetErrorResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new GeneratedAssetErrorResponse(); - if (data.hasOwnProperty('errors')) { - obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_GeneratedAssetErrorResponseData["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GeneratedAssetErrorResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GeneratedAssetErrorResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(GeneratedAssetErrorResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['errors']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['errors'])) { - throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']); - } - // validate the optional field `errors` (array) - var _iterator2 = _createForOfIteratorHelper(data['errors']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _GeneratedAssetErrorResponseData["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - return true; - } - }]); -}(); -GeneratedAssetErrorResponse.RequiredProperties = ["errors"]; - -/** - * An array of errors. - * @member {Array.} errors - */ -GeneratedAssetErrorResponse.prototype['errors'] = undefined; -var _default = exports["default"] = GeneratedAssetErrorResponse; \ No newline at end of file diff --git a/src/model/GeneratedAssetErrorResponseData.js b/src/model/GeneratedAssetErrorResponseData.js deleted file mode 100644 index cf66e8a..0000000 --- a/src/model/GeneratedAssetErrorResponseData.js +++ /dev/null @@ -1,205 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GeneratedAssetErrorResponseData model module. - * @module model/GeneratedAssetErrorResponseData - * @version 0.2.9 - */ -var GeneratedAssetErrorResponseData = /*#__PURE__*/function () { - /** - * Constructs a new GeneratedAssetErrorResponseData. - * Individual errors returned by the Create API. - * @alias module:model/GeneratedAssetErrorResponseData - * @param status {String} The http status code. - * @param title {String} A short summary of the error. - * @param detail {String} A detailed description of the error. - */ - function GeneratedAssetErrorResponseData(status, title, detail) { - _classCallCheck(this, GeneratedAssetErrorResponseData); - GeneratedAssetErrorResponseData.initialize(this, status, title, detail); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(GeneratedAssetErrorResponseData, [{ - key: "getStatus", - value: - /** - * Returns The http status code. - * @return {String} - */ - function getStatus() { - return this.status; - } - - /** - * Sets The http status code. - * @param {String} status The http status code. - */ - }, { - key: "setStatus", - value: function setStatus(status) { - this['status'] = status; - return this; - } - /** - * Returns A short summary of the error. - * @return {String} - */ - }, { - key: "getTitle", - value: function getTitle() { - return this.title; - } - - /** - * Sets A short summary of the error. - * @param {String} title A short summary of the error. - */ - }, { - key: "setTitle", - value: function setTitle(title) { - this['title'] = title; - return this; - } - /** - * Returns A detailed description of the error. - * @return {String} - */ - }, { - key: "getDetail", - value: function getDetail() { - return this.detail; - } - - /** - * Sets A detailed description of the error. - * @param {String} detail A detailed description of the error. - */ - }, { - key: "setDetail", - value: function setDetail(detail) { - this['detail'] = detail; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, status, title, detail) { - obj['status'] = status; - obj['title'] = title; - obj['detail'] = detail; - } - - /** - * Constructs a GeneratedAssetErrorResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GeneratedAssetErrorResponseData} obj Optional instance to populate. - * @return {module:model/GeneratedAssetErrorResponseData} The populated GeneratedAssetErrorResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new GeneratedAssetErrorResponseData(); - if (data.hasOwnProperty('status')) { - obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('title')) { - obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String'); - } - if (data.hasOwnProperty('detail')) { - obj['detail'] = _ApiClient["default"].convertToType(data['detail'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GeneratedAssetErrorResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GeneratedAssetErrorResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(GeneratedAssetErrorResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // ensure the json data is a string - if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) { - throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']); - } - // ensure the json data is a string - if (data['detail'] && !(typeof data['detail'] === 'string' || data['detail'] instanceof String)) { - throw new Error("Expected the field `detail` to be a primitive type in the JSON string but got " + data['detail']); - } - return true; - } - }]); -}(); -GeneratedAssetErrorResponseData.RequiredProperties = ["status", "title", "detail"]; - -/** - * The http status code. - * @member {String} status - */ -GeneratedAssetErrorResponseData.prototype['status'] = undefined; - -/** - * A short summary of the error. - * @member {String} title - */ -GeneratedAssetErrorResponseData.prototype['title'] = undefined; - -/** - * A detailed description of the error. - * @member {String} detail - */ -GeneratedAssetErrorResponseData.prototype['detail'] = undefined; -var _default = exports["default"] = GeneratedAssetErrorResponseData; \ No newline at end of file diff --git a/src/model/GeneratedAssetResponse.js b/src/model/GeneratedAssetResponse.js deleted file mode 100644 index c416ea0..0000000 --- a/src/model/GeneratedAssetResponse.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _GeneratedAssetResponseData = _interopRequireDefault(require("./GeneratedAssetResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GeneratedAssetResponse model module. - * @module model/GeneratedAssetResponse - * @version 0.2.9 - */ -var GeneratedAssetResponse = /*#__PURE__*/function () { - /** - * Constructs a new GeneratedAssetResponse. - * The response returned by the Create API [generate asset](#generate-asset) and [get generated asset](#get-generated-asset) requests. Includes status and details of the generated asset. The response follows the [json:api](https://jsonapi.org/) specification. - * @alias module:model/GeneratedAssetResponse - * @param data {module:model/GeneratedAssetResponseData} - */ - function GeneratedAssetResponse(data) { - _classCallCheck(this, GeneratedAssetResponse); - GeneratedAssetResponse.initialize(this, data); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(GeneratedAssetResponse, [{ - key: "getData", - value: - /** - * @return {module:model/GeneratedAssetResponseData} - */ - function getData() { - return this.data; - } - - /** - * @param {module:model/GeneratedAssetResponseData} data - */ - }, { - key: "setData", - value: function setData(data) { - this['data'] = data; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, data) { - obj['data'] = data; - } - - /** - * Constructs a GeneratedAssetResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GeneratedAssetResponse} obj Optional instance to populate. - * @return {module:model/GeneratedAssetResponse} The populated GeneratedAssetResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new GeneratedAssetResponse(); - if (data.hasOwnProperty('data')) { - obj['data'] = _GeneratedAssetResponseData["default"].constructFromObject(data['data']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GeneratedAssetResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GeneratedAssetResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(GeneratedAssetResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `data` - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['data']) { - // data not null - _GeneratedAssetResponseData["default"].validateJSON(data['data']); - } - return true; - } - }]); -}(); -GeneratedAssetResponse.RequiredProperties = ["data"]; - -/** - * @member {module:model/GeneratedAssetResponseData} data - */ -GeneratedAssetResponse.prototype['data'] = undefined; -var _default = exports["default"] = GeneratedAssetResponse; \ No newline at end of file diff --git a/src/model/GeneratedAssetResponseAttributes.js b/src/model/GeneratedAssetResponseAttributes.js deleted file mode 100644 index fd0dee6..0000000 --- a/src/model/GeneratedAssetResponseAttributes.js +++ /dev/null @@ -1,422 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GeneratedAssetResponseAttributes model module. - * @module model/GeneratedAssetResponseAttributes - * @version 0.2.9 - */ -var GeneratedAssetResponseAttributes = /*#__PURE__*/function () { - /** - * Constructs a new GeneratedAssetResponseAttributes. - * The id and attributes of the generated asset. - * @alias module:model/GeneratedAssetResponseAttributes - * @param owner {String} The owner id of the asset. - * @param provider {module:model/GeneratedAssetResponseAttributes.ProviderEnum} The native or third party provider that generated the asset, `shotstack`, `elevenlabs`, `heygen` or `d-id`. - * @param type {module:model/GeneratedAssetResponseAttributes.TypeEnum} The type of service used to generate the asset, `text-to-speech` or `text-to-avatar`. - * @param status {module:model/GeneratedAssetResponseAttributes.StatusEnum} The status of the asset file generation task.
  • `queued` - generation task is queued waiting to be processed
  • `processing` - the asset is being generated by the provider
  • `saving` - the asset is being saved to Shotstack
  • `done` - the asset has been generated and stored
  • `failed` - there was an error generating the asset
- * @param created {String} The time the generate asset task was initially queued. - * @param updated {String} The time the asset status was last updated. - */ - function GeneratedAssetResponseAttributes(owner, provider, type, status, created, updated) { - _classCallCheck(this, GeneratedAssetResponseAttributes); - GeneratedAssetResponseAttributes.initialize(this, owner, provider, type, status, created, updated); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(GeneratedAssetResponseAttributes, [{ - key: "getOwner", - value: - /** - * Returns The owner id of the asset. - * @return {String} - */ - function getOwner() { - return this.owner; - } - - /** - * Sets The owner id of the asset. - * @param {String} owner The owner id of the asset. - */ - }, { - key: "setOwner", - value: function setOwner(owner) { - this['owner'] = owner; - return this; - } - /** - * Returns The native or third party provider that generated the asset, `shotstack`, `elevenlabs`, `heygen` or `d-id`. - * @return {module:model/GeneratedAssetResponseAttributes.ProviderEnum} - */ - }, { - key: "getProvider", - value: function getProvider() { - return this.provider; - } - - /** - * Sets The native or third party provider that generated the asset, `shotstack`, `elevenlabs`, `heygen` or `d-id`. - * @param {module:model/GeneratedAssetResponseAttributes.ProviderEnum} provider The native or third party provider that generated the asset, `shotstack`, `elevenlabs`, `heygen` or `d-id`. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * Returns The type of service used to generate the asset, `text-to-speech` or `text-to-avatar`. - * @return {module:model/GeneratedAssetResponseAttributes.TypeEnum} - */ - }, { - key: "getType", - value: function getType() { - return this.type; - } - - /** - * Sets The type of service used to generate the asset, `text-to-speech` or `text-to-avatar`. - * @param {module:model/GeneratedAssetResponseAttributes.TypeEnum} type The type of service used to generate the asset, `text-to-speech` or `text-to-avatar`. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The URL of the asset file hosted by Shotstack. The file at the URL can be used by the Edit API. Generated asset file URL's consist of a base URL (AWS bucket), owner id, asset id and extension. The extension varies depending on the type of file generated. - * @return {String} - */ - }, { - key: "getUrl", - value: function getUrl() { - return this.url; - } - - /** - * Sets The URL of the asset file hosted by Shotstack. The file at the URL can be used by the Edit API. Generated asset file URL's consist of a base URL (AWS bucket), owner id, asset id and extension. The extension varies depending on the type of file generated. - * @param {String} url The URL of the asset file hosted by Shotstack. The file at the URL can be used by the Edit API. Generated asset file URL's consist of a base URL (AWS bucket), owner id, asset id and extension. The extension varies depending on the type of file generated. - */ - }, { - key: "setUrl", - value: function setUrl(url) { - this['url'] = url; - return this; - } - /** - * Returns The status of the asset file generation task.
  • `queued` - generation task is queued waiting to be processed
  • `processing` - the asset is being generated by the provider
  • `saving` - the asset is being saved to Shotstack
  • `done` - the asset has been generated and stored
  • `failed` - there was an error generating the asset
- * @return {module:model/GeneratedAssetResponseAttributes.StatusEnum} - */ - }, { - key: "getStatus", - value: function getStatus() { - return this.status; - } - - /** - * Sets The status of the asset file generation task.
  • `queued` - generation task is queued waiting to be processed
  • `processing` - the asset is being generated by the provider
  • `saving` - the asset is being saved to Shotstack
  • `done` - the asset has been generated and stored
  • `failed` - there was an error generating the asset
- * @param {module:model/GeneratedAssetResponseAttributes.StatusEnum} status The status of the asset file generation task.
  • `queued` - generation task is queued waiting to be processed
  • `processing` - the asset is being generated by the provider
  • `saving` - the asset is being saved to Shotstack
  • `done` - the asset has been generated and stored
  • `failed` - there was an error generating the asset
- */ - }, { - key: "setStatus", - value: function setStatus(status) { - this['status'] = status; - return this; - } - /** - * Returns The time the generate asset task was initially queued. - * @return {String} - */ - }, { - key: "getCreated", - value: function getCreated() { - return this.created; - } - - /** - * Sets The time the generate asset task was initially queued. - * @param {String} created The time the generate asset task was initially queued. - */ - }, { - key: "setCreated", - value: function setCreated(created) { - this['created'] = created; - return this; - } - /** - * Returns The time the asset status was last updated. - * @return {String} - */ - }, { - key: "getUpdated", - value: function getUpdated() { - return this.updated; - } - - /** - * Sets The time the asset status was last updated. - * @param {String} updated The time the asset status was last updated. - */ - }, { - key: "setUpdated", - value: function setUpdated(updated) { - this['updated'] = updated; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, owner, provider, type, status, created, updated) { - obj['owner'] = owner; - obj['provider'] = provider; - obj['type'] = type; - obj['status'] = status; - obj['created'] = created; - obj['updated'] = updated; - } - - /** - * Constructs a GeneratedAssetResponseAttributes from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GeneratedAssetResponseAttributes} obj Optional instance to populate. - * @return {module:model/GeneratedAssetResponseAttributes} The populated GeneratedAssetResponseAttributes instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new GeneratedAssetResponseAttributes(); - if (data.hasOwnProperty('owner')) { - obj['owner'] = _ApiClient["default"].convertToType(data['owner'], 'String'); - } - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('url')) { - obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('created')) { - obj['created'] = _ApiClient["default"].convertToType(data['created'], 'String'); - } - if (data.hasOwnProperty('updated')) { - obj['updated'] = _ApiClient["default"].convertToType(data['updated'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GeneratedAssetResponseAttributes. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GeneratedAssetResponseAttributes. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(GeneratedAssetResponseAttributes.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['owner'] && !(typeof data['owner'] === 'string' || data['owner'] instanceof String)) { - throw new Error("Expected the field `owner` to be a primitive type in the JSON string but got " + data['owner']); - } - // ensure the json data is a string - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // ensure the json data is a string - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { - throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // ensure the json data is a string - if (data['created'] && !(typeof data['created'] === 'string' || data['created'] instanceof String)) { - throw new Error("Expected the field `created` to be a primitive type in the JSON string but got " + data['created']); - } - // ensure the json data is a string - if (data['updated'] && !(typeof data['updated'] === 'string' || data['updated'] instanceof String)) { - throw new Error("Expected the field `updated` to be a primitive type in the JSON string but got " + data['updated']); - } - return true; - } - }]); -}(); -GeneratedAssetResponseAttributes.RequiredProperties = ["owner", "provider", "type", "status", "created", "updated"]; - -/** - * The owner id of the asset. - * @member {String} owner - */ -GeneratedAssetResponseAttributes.prototype['owner'] = undefined; - -/** - * The native or third party provider that generated the asset, `shotstack`, `elevenlabs`, `heygen` or `d-id`. - * @member {module:model/GeneratedAssetResponseAttributes.ProviderEnum} provider - */ -GeneratedAssetResponseAttributes.prototype['provider'] = undefined; - -/** - * The type of service used to generate the asset, `text-to-speech` or `text-to-avatar`. - * @member {module:model/GeneratedAssetResponseAttributes.TypeEnum} type - */ -GeneratedAssetResponseAttributes.prototype['type'] = undefined; - -/** - * The URL of the asset file hosted by Shotstack. The file at the URL can be used by the Edit API. Generated asset file URL's consist of a base URL (AWS bucket), owner id, asset id and extension. The extension varies depending on the type of file generated. - * @member {String} url - */ -GeneratedAssetResponseAttributes.prototype['url'] = undefined; - -/** - * The status of the asset file generation task.
  • `queued` - generation task is queued waiting to be processed
  • `processing` - the asset is being generated by the provider
  • `saving` - the asset is being saved to Shotstack
  • `done` - the asset has been generated and stored
  • `failed` - there was an error generating the asset
- * @member {module:model/GeneratedAssetResponseAttributes.StatusEnum} status - */ -GeneratedAssetResponseAttributes.prototype['status'] = undefined; - -/** - * The time the generate asset task was initially queued. - * @member {String} created - */ -GeneratedAssetResponseAttributes.prototype['created'] = undefined; - -/** - * The time the asset status was last updated. - * @member {String} updated - */ -GeneratedAssetResponseAttributes.prototype['updated'] = undefined; - -/** - * Allowed values for the provider property. - * @enum {String} - * @readonly - */ -GeneratedAssetResponseAttributes['ProviderEnum'] = { - /** - * value: "shotstack" - * @const - */ - "shotstack": "shotstack", - /** - * value: "elevenlabs" - * @const - */ - "elevenlabs": "elevenlabs", - /** - * value: "heygen" - * @const - */ - "heygen": "heygen", - /** - * value: "d-id" - * @const - */ - "d-id": "d-id" -}; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -GeneratedAssetResponseAttributes['TypeEnum'] = { - /** - * value: "text-to-speech" - * @const - */ - "speech": "text-to-speech", - /** - * value: "text-to-avatar" - * @const - */ - "avatar": "text-to-avatar" -}; - -/** - * Allowed values for the status property. - * @enum {String} - * @readonly - */ -GeneratedAssetResponseAttributes['StatusEnum'] = { - /** - * value: "queued" - * @const - */ - "queued": "queued", - /** - * value: "processing" - * @const - */ - "processing": "processing", - /** - * value: "saving" - * @const - */ - "saving": "saving", - /** - * value: "done" - * @const - */ - "done": "done", - /** - * value: "failed" - * @const - */ - "failed": "failed" -}; -var _default = exports["default"] = GeneratedAssetResponseAttributes; \ No newline at end of file diff --git a/src/model/GeneratedAssetResponseData.js b/src/model/GeneratedAssetResponseData.js deleted file mode 100644 index 8693d69..0000000 --- a/src/model/GeneratedAssetResponseData.js +++ /dev/null @@ -1,204 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _GeneratedAssetResponseAttributes = _interopRequireDefault(require("./GeneratedAssetResponseAttributes")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GeneratedAssetResponseData model module. - * @module model/GeneratedAssetResponseData - * @version 0.2.9 - */ -var GeneratedAssetResponseData = /*#__PURE__*/function () { - /** - * Constructs a new GeneratedAssetResponseData. - * The type of resource (an asset), it's id and attributes of the generated file. - * @alias module:model/GeneratedAssetResponseData - * @param type {String} The type of resource, in this case it is an asset. - * @param id {String} The generated asset id. - * @param attributes {module:model/GeneratedAssetResponseAttributes} - */ - function GeneratedAssetResponseData(type, id, attributes) { - _classCallCheck(this, GeneratedAssetResponseData); - GeneratedAssetResponseData.initialize(this, type, id, attributes); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(GeneratedAssetResponseData, [{ - key: "getType", - value: - /** - * Returns The type of resource, in this case it is an asset. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of resource, in this case it is an asset. - * @param {String} type The type of resource, in this case it is an asset. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The generated asset id. - * @return {String} - */ - }, { - key: "getId", - value: function getId() { - return this.id; - } - - /** - * Sets The generated asset id. - * @param {String} id The generated asset id. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * @return {module:model/GeneratedAssetResponseAttributes} - */ - }, { - key: "getAttributes", - value: function getAttributes() { - return this.attributes; - } - - /** - * @param {module:model/GeneratedAssetResponseAttributes} attributes - */ - }, { - key: "setAttributes", - value: function setAttributes(attributes) { - this['attributes'] = attributes; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, id, attributes) { - obj['type'] = type; - obj['id'] = id; - obj['attributes'] = attributes; - } - - /** - * Constructs a GeneratedAssetResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GeneratedAssetResponseData} obj Optional instance to populate. - * @return {module:model/GeneratedAssetResponseData} The populated GeneratedAssetResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new GeneratedAssetResponseData(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('attributes')) { - obj['attributes'] = _GeneratedAssetResponseAttributes["default"].constructFromObject(data['attributes']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GeneratedAssetResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GeneratedAssetResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(GeneratedAssetResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // validate the optional field `attributes` - if (data['attributes']) { - // data not null - _GeneratedAssetResponseAttributes["default"].validateJSON(data['attributes']); - } - return true; - } - }]); -}(); -GeneratedAssetResponseData.RequiredProperties = ["type", "id", "attributes"]; - -/** - * The type of resource, in this case it is an asset. - * @member {String} type - */ -GeneratedAssetResponseData.prototype['type'] = undefined; - -/** - * The generated asset id. - * @member {String} id - */ -GeneratedAssetResponseData.prototype['id'] = undefined; - -/** - * @member {module:model/GeneratedAssetResponseAttributes} attributes - */ -GeneratedAssetResponseData.prototype['attributes'] = undefined; -var _default = exports["default"] = GeneratedAssetResponseData; \ No newline at end of file diff --git a/src/model/GoogleCloudStorageDestination.js b/src/model/GoogleCloudStorageDestination.js deleted file mode 100644 index d48a491..0000000 --- a/src/model/GoogleCloudStorageDestination.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _GoogleCloudStorageDestinationOptions = _interopRequireDefault(require("./GoogleCloudStorageDestinationOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GoogleCloudStorageDestination model module. - * @module model/GoogleCloudStorageDestination - * @version 0.2.9 - */ -var GoogleCloudStorageDestination = /*#__PURE__*/function () { - /** - * Constructs a new GoogleCloudStorageDestination. - * Send videos and assets to a [Google Cloud Storage](https://cloud.google.com/storage) bucket. Send files with your own prefix and filename. Google Cloud credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/google-cloud-storage), not in the request. - * @alias module:model/GoogleCloudStorageDestination - * @param provider {String} The destination to send assets to - set to `google-cloud-storage` for Google Cloud Storage. - */ - function GoogleCloudStorageDestination(provider) { - _classCallCheck(this, GoogleCloudStorageDestination); - GoogleCloudStorageDestination.initialize(this, provider); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(GoogleCloudStorageDestination, [{ - key: "getProvider", - value: - /** - * Returns The destination to send assets to - set to `google-cloud-storage` for Google Cloud Storage. - * @return {String} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The destination to send assets to - set to `google-cloud-storage` for Google Cloud Storage. - * @param {String} provider The destination to send assets to - set to `google-cloud-storage` for Google Cloud Storage. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/GoogleCloudStorageDestinationOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/GoogleCloudStorageDestinationOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider) { - obj['provider'] = provider || 'google-cloud-storage'; - } - - /** - * Constructs a GoogleCloudStorageDestination from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GoogleCloudStorageDestination} obj Optional instance to populate. - * @return {module:model/GoogleCloudStorageDestination} The populated GoogleCloudStorageDestination instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new GoogleCloudStorageDestination(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _GoogleCloudStorageDestinationOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GoogleCloudStorageDestination. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GoogleCloudStorageDestination. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(GoogleCloudStorageDestination.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _GoogleCloudStorageDestinationOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -GoogleCloudStorageDestination.RequiredProperties = ["provider"]; - -/** - * The destination to send assets to - set to `google-cloud-storage` for Google Cloud Storage. - * @member {String} provider - * @default 'google-cloud-storage' - */ -GoogleCloudStorageDestination.prototype['provider'] = 'google-cloud-storage'; - -/** - * @member {module:model/GoogleCloudStorageDestinationOptions} options - */ -GoogleCloudStorageDestination.prototype['options'] = undefined; -var _default = exports["default"] = GoogleCloudStorageDestination; \ No newline at end of file diff --git a/src/model/GoogleCloudStorageDestinationOptions.js b/src/model/GoogleCloudStorageDestinationOptions.js deleted file mode 100644 index 6398215..0000000 --- a/src/model/GoogleCloudStorageDestinationOptions.js +++ /dev/null @@ -1,201 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GoogleCloudStorageDestinationOptions model module. - * @module model/GoogleCloudStorageDestinationOptions - * @version 0.2.9 - */ -var GoogleCloudStorageDestinationOptions = /*#__PURE__*/function () { - /** - * Constructs a new GoogleCloudStorageDestinationOptions. - * Pass additional options to control how files are stored in Google Cloud Storage. - * @alias module:model/GoogleCloudStorageDestinationOptions - * @param bucket {String} The bucket name to send files to. The bucket must exist in the Google Cloud Storage account before files can be sent. - */ - function GoogleCloudStorageDestinationOptions(bucket) { - _classCallCheck(this, GoogleCloudStorageDestinationOptions); - GoogleCloudStorageDestinationOptions.initialize(this, bucket); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(GoogleCloudStorageDestinationOptions, [{ - key: "getBucket", - value: - /** - * Returns The bucket name to send files to. The bucket must exist in the Google Cloud Storage account before files can be sent. - * @return {String} - */ - function getBucket() { - return this.bucket; - } - - /** - * Sets The bucket name to send files to. The bucket must exist in the Google Cloud Storage account before files can be sent. - * @param {String} bucket The bucket name to send files to. The bucket must exist in the Google Cloud Storage account before files can be sent. - */ - }, { - key: "setBucket", - value: function setBucket(bucket) { - this['bucket'] = bucket; - return this; - } - /** - * Returns A prefix for the file being sent. This is typically a folder name, i.e. `videos` or `customerId/videos`. - * @return {String} - */ - }, { - key: "getPrefix", - value: function getPrefix() { - return this.prefix; - } - - /** - * Sets A prefix for the file being sent. This is typically a folder name, i.e. `videos` or `customerId/videos`. - * @param {String} prefix A prefix for the file being sent. This is typically a folder name, i.e. `videos` or `customerId/videos`. - */ - }, { - key: "setPrefix", - value: function setPrefix(prefix) { - this['prefix'] = prefix; - return this; - } - /** - * Returns Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - * @return {String} - */ - }, { - key: "getFilename", - value: function getFilename() { - return this.filename; - } - - /** - * Sets Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - * @param {String} filename Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - */ - }, { - key: "setFilename", - value: function setFilename(filename) { - this['filename'] = filename; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, bucket) { - obj['bucket'] = bucket; - } - - /** - * Constructs a GoogleCloudStorageDestinationOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GoogleCloudStorageDestinationOptions} obj Optional instance to populate. - * @return {module:model/GoogleCloudStorageDestinationOptions} The populated GoogleCloudStorageDestinationOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new GoogleCloudStorageDestinationOptions(); - if (data.hasOwnProperty('bucket')) { - obj['bucket'] = _ApiClient["default"].convertToType(data['bucket'], 'String'); - } - if (data.hasOwnProperty('prefix')) { - obj['prefix'] = _ApiClient["default"].convertToType(data['prefix'], 'String'); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GoogleCloudStorageDestinationOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GoogleCloudStorageDestinationOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(GoogleCloudStorageDestinationOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['bucket'] && !(typeof data['bucket'] === 'string' || data['bucket'] instanceof String)) { - throw new Error("Expected the field `bucket` to be a primitive type in the JSON string but got " + data['bucket']); - } - // ensure the json data is a string - if (data['prefix'] && !(typeof data['prefix'] === 'string' || data['prefix'] instanceof String)) { - throw new Error("Expected the field `prefix` to be a primitive type in the JSON string but got " + data['prefix']); - } - // ensure the json data is a string - if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) { - throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']); - } - return true; - } - }]); -}(); -GoogleCloudStorageDestinationOptions.RequiredProperties = ["bucket"]; - -/** - * The bucket name to send files to. The bucket must exist in the Google Cloud Storage account before files can be sent. - * @member {String} bucket - */ -GoogleCloudStorageDestinationOptions.prototype['bucket'] = undefined; - -/** - * A prefix for the file being sent. This is typically a folder name, i.e. `videos` or `customerId/videos`. - * @member {String} prefix - */ -GoogleCloudStorageDestinationOptions.prototype['prefix'] = undefined; - -/** - * Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - * @member {String} filename - */ -GoogleCloudStorageDestinationOptions.prototype['filename'] = undefined; -var _default = exports["default"] = GoogleCloudStorageDestinationOptions; \ No newline at end of file diff --git a/src/model/GoogleDriveDestination.js b/src/model/GoogleDriveDestination.js deleted file mode 100644 index bd28c9c..0000000 --- a/src/model/GoogleDriveDestination.js +++ /dev/null @@ -1,170 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _GoogleDriveDestinationOptions = _interopRequireDefault(require("./GoogleDriveDestinationOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GoogleDriveDestination model module. - * @module model/GoogleDriveDestination - * @version 0.2.9 - */ -var GoogleDriveDestination = /*#__PURE__*/function () { - /** - * Constructs a new GoogleDriveDestination. - * Send rendered videos and assets to the [Google Drive](https://shotstack.io/docs/guide/serving-assets/destinations/google-drive/) cloud storage service. Google Drive uses OAuth and you must authenticate and link your Google account via [dashboard](https://dashboard.shotstack.io/integrations/google-drive), not in the request. - * @alias module:model/GoogleDriveDestination - * @param provider {String} The destination to send assets to - set to `google-drive` for Google Drive. - * @param options {module:model/GoogleDriveDestinationOptions} - */ - function GoogleDriveDestination(provider, options) { - _classCallCheck(this, GoogleDriveDestination); - GoogleDriveDestination.initialize(this, provider, options); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(GoogleDriveDestination, [{ - key: "getProvider", - value: - /** - * Returns The destination to send assets to - set to `google-drive` for Google Drive. - * @return {String} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The destination to send assets to - set to `google-drive` for Google Drive. - * @param {String} provider The destination to send assets to - set to `google-drive` for Google Drive. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/GoogleDriveDestinationOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/GoogleDriveDestinationOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider, options) { - obj['provider'] = provider || 'google-drive'; - obj['options'] = options; - } - - /** - * Constructs a GoogleDriveDestination from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GoogleDriveDestination} obj Optional instance to populate. - * @return {module:model/GoogleDriveDestination} The populated GoogleDriveDestination instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new GoogleDriveDestination(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _GoogleDriveDestinationOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GoogleDriveDestination. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GoogleDriveDestination. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(GoogleDriveDestination.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _GoogleDriveDestinationOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -GoogleDriveDestination.RequiredProperties = ["provider", "options"]; - -/** - * The destination to send assets to - set to `google-drive` for Google Drive. - * @member {String} provider - * @default 'google-drive' - */ -GoogleDriveDestination.prototype['provider'] = 'google-drive'; - -/** - * @member {module:model/GoogleDriveDestinationOptions} options - */ -GoogleDriveDestination.prototype['options'] = undefined; -var _default = exports["default"] = GoogleDriveDestination; \ No newline at end of file diff --git a/src/model/GoogleDriveDestinationOptions.js b/src/model/GoogleDriveDestinationOptions.js deleted file mode 100644 index 1753c97..0000000 --- a/src/model/GoogleDriveDestinationOptions.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The GoogleDriveDestinationOptions model module. - * @module model/GoogleDriveDestinationOptions - * @version 0.2.9 - */ -var GoogleDriveDestinationOptions = /*#__PURE__*/function () { - /** - * Constructs a new GoogleDriveDestinationOptions. - * Pass the folder ID and options to configure how assets are stored in Google Drive. - * @alias module:model/GoogleDriveDestinationOptions - * @param folderId {String} The Google Drive folder ID where asset will be stored. The folder ID is required and can be retrieved from the URL when logged in to Google Drive, e.g. https://drive.google.com/drive/u/0/folders/1r-eTY6OLO8tzQRKwMyq-fIrQ_7AJEI6A. - */ - function GoogleDriveDestinationOptions(folderId) { - _classCallCheck(this, GoogleDriveDestinationOptions); - GoogleDriveDestinationOptions.initialize(this, folderId); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(GoogleDriveDestinationOptions, [{ - key: "getFolderId", - value: - /** - * Returns The Google Drive folder ID where asset will be stored. The folder ID is required and can be retrieved from the URL when logged in to Google Drive, e.g. https://drive.google.com/drive/u/0/folders/1r-eTY6OLO8tzQRKwMyq-fIrQ_7AJEI6A. - * @return {String} - */ - function getFolderId() { - return this.folderId; - } - - /** - * Sets The Google Drive folder ID where asset will be stored. The folder ID is required and can be retrieved from the URL when logged in to Google Drive, e.g. https://drive.google.com/drive/u/0/folders/1r-eTY6OLO8tzQRKwMyq-fIrQ_7AJEI6A. - * @param {String} folderId The Google Drive folder ID where asset will be stored. The folder ID is required and can be retrieved from the URL when logged in to Google Drive, e.g. https://drive.google.com/drive/u/0/folders/1r-eTY6OLO8tzQRKwMyq-fIrQ_7AJEI6A. - */ - }, { - key: "setFolderId", - value: function setFolderId(folderId) { - this['folderId'] = folderId; - return this; - } - /** - * Returns Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - * @return {String} - */ - }, { - key: "getFilename", - value: function getFilename() { - return this.filename; - } - - /** - * Sets Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - * @param {String} filename Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - */ - }, { - key: "setFilename", - value: function setFilename(filename) { - this['filename'] = filename; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, folderId) { - obj['folderId'] = folderId; - } - - /** - * Constructs a GoogleDriveDestinationOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/GoogleDriveDestinationOptions} obj Optional instance to populate. - * @return {module:model/GoogleDriveDestinationOptions} The populated GoogleDriveDestinationOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new GoogleDriveDestinationOptions(); - if (data.hasOwnProperty('folderId')) { - obj['folderId'] = _ApiClient["default"].convertToType(data['folderId'], 'String'); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to GoogleDriveDestinationOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to GoogleDriveDestinationOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(GoogleDriveDestinationOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['folderId'] && !(typeof data['folderId'] === 'string' || data['folderId'] instanceof String)) { - throw new Error("Expected the field `folderId` to be a primitive type in the JSON string but got " + data['folderId']); - } - // ensure the json data is a string - if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) { - throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']); - } - return true; - } - }]); -}(); -GoogleDriveDestinationOptions.RequiredProperties = ["folderId"]; - -/** - * The Google Drive folder ID where asset will be stored. The folder ID is required and can be retrieved from the URL when logged in to Google Drive, e.g. https://drive.google.com/drive/u/0/folders/1r-eTY6OLO8tzQRKwMyq-fIrQ_7AJEI6A. - * @member {String} folderId - */ -GoogleDriveDestinationOptions.prototype['folderId'] = undefined; - -/** - * Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - * @member {String} filename - */ -GoogleDriveDestinationOptions.prototype['filename'] = undefined; -var _default = exports["default"] = GoogleDriveDestinationOptions; \ No newline at end of file diff --git a/src/model/HeyGenGeneratedAsset.js b/src/model/HeyGenGeneratedAsset.js deleted file mode 100644 index f72cdd6..0000000 --- a/src/model/HeyGenGeneratedAsset.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _HeyGenGeneratedAssetOptions = _interopRequireDefault(require("./HeyGenGeneratedAssetOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The HeyGenGeneratedAsset model module. - * @module model/HeyGenGeneratedAsset - * @version 0.2.9 - */ -var HeyGenGeneratedAsset = /*#__PURE__*/function () { - /** - * Constructs a new HeyGenGeneratedAsset. - * Generate assets using HeyGen. HeyGen provide a text-to-avatar service. The HeyGen provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/heygen), not in the request. - * @alias module:model/HeyGenGeneratedAsset - * @param provider {module:model/HeyGenGeneratedAsset.ProviderEnum} The name of the provider - set to `heygen` for HeyGen. - * @param options {module:model/HeyGenGeneratedAssetOptions} - */ - function HeyGenGeneratedAsset(provider, options) { - _classCallCheck(this, HeyGenGeneratedAsset); - HeyGenGeneratedAsset.initialize(this, provider, options); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(HeyGenGeneratedAsset, [{ - key: "getProvider", - value: - /** - * Returns The name of the provider - set to `heygen` for HeyGen. - * @return {module:model/HeyGenGeneratedAsset.ProviderEnum} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The name of the provider - set to `heygen` for HeyGen. - * @param {module:model/HeyGenGeneratedAsset.ProviderEnum} provider The name of the provider - set to `heygen` for HeyGen. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/HeyGenGeneratedAssetOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/HeyGenGeneratedAssetOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider, options) { - obj['provider'] = provider || 'heygen'; - obj['options'] = options; - } - - /** - * Constructs a HeyGenGeneratedAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/HeyGenGeneratedAsset} obj Optional instance to populate. - * @return {module:model/HeyGenGeneratedAsset} The populated HeyGenGeneratedAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new HeyGenGeneratedAsset(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _HeyGenGeneratedAssetOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to HeyGenGeneratedAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to HeyGenGeneratedAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(HeyGenGeneratedAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _HeyGenGeneratedAssetOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -HeyGenGeneratedAsset.RequiredProperties = ["provider", "options"]; - -/** - * The name of the provider - set to `heygen` for HeyGen. - * @member {module:model/HeyGenGeneratedAsset.ProviderEnum} provider - * @default 'heygen' - */ -HeyGenGeneratedAsset.prototype['provider'] = 'heygen'; - -/** - * @member {module:model/HeyGenGeneratedAssetOptions} options - */ -HeyGenGeneratedAsset.prototype['options'] = undefined; - -/** - * Allowed values for the provider property. - * @enum {String} - * @readonly - */ -HeyGenGeneratedAsset['ProviderEnum'] = { - /** - * value: "heygen" - * @const - */ - "heygen": "heygen" -}; -var _default = exports["default"] = HeyGenGeneratedAsset; \ No newline at end of file diff --git a/src/model/HeyGenGeneratedAssetOptions.js b/src/model/HeyGenGeneratedAssetOptions.js deleted file mode 100644 index 96cd8e8..0000000 --- a/src/model/HeyGenGeneratedAssetOptions.js +++ /dev/null @@ -1,173 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _HeyGenTextToAvatarOptions = _interopRequireDefault(require("./HeyGenTextToAvatarOptions")); -var _HeyGenGeneratedAssetOptions; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The HeyGenGeneratedAssetOptions model module. - * @module model/HeyGenGeneratedAssetOptions - * @version 0.2.9 - */ -var HeyGenGeneratedAssetOptions = /*#__PURE__*/function () { - /** - * Constructs a new HeyGenGeneratedAssetOptions. - * Generate assets using the third party HeyGen provider AI services. The following AI generation services are available: <ul> <li><a href=\"#tocs_heygentexttoavataroptions\">HeyGenTextToAvatarOptions</a></li> </ul> - * @alias module:model/HeyGenGeneratedAssetOptions - * @param {(module:model/HeyGenTextToAvatarOptions)} instance The actual instance to initialize HeyGenGeneratedAssetOptions. - */ - function HeyGenGeneratedAssetOptions() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, HeyGenGeneratedAssetOptions); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - try { - if (typeof instance === "HeyGenTextToAvatarOptions") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _HeyGenTextToAvatarOptions["default"].validateJSON(instance); // throw an exception if no match - // create HeyGenTextToAvatarOptions from JS object - this.actualInstance = _HeyGenTextToAvatarOptions["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into HeyGenTextToAvatarOptions - errorMessages.push("Failed to construct HeyGenTextToAvatarOptions: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `HeyGenGeneratedAssetOptions` with oneOf schemas HeyGenTextToAvatarOptions. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `HeyGenGeneratedAssetOptions` with oneOf schemas HeyGenTextToAvatarOptions. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a HeyGenGeneratedAssetOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/HeyGenGeneratedAssetOptions} obj Optional instance to populate. - * @return {module:model/HeyGenGeneratedAssetOptions} The populated HeyGenGeneratedAssetOptions instance. - */ - return _createClass(HeyGenGeneratedAssetOptions, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be HeyGenTextToAvatarOptions. - * @return {(module:model/HeyGenTextToAvatarOptions)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be HeyGenTextToAvatarOptions. - * @param {(module:model/HeyGenTextToAvatarOptions)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = HeyGenGeneratedAssetOptions.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new HeyGenGeneratedAssetOptions(data); - } - }]); -}(); -/** - * The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @member {module:model/HeyGenGeneratedAssetOptions.TypeEnum} type - */ -_HeyGenGeneratedAssetOptions = HeyGenGeneratedAssetOptions; -/** - * Create an instance of HeyGenGeneratedAssetOptions from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/HeyGenGeneratedAssetOptions} An instance of HeyGenGeneratedAssetOptions. - */ -_defineProperty(HeyGenGeneratedAssetOptions, "fromJSON", function (json_string) { - return _HeyGenGeneratedAssetOptions.constructFromObject(JSON.parse(json_string)); -}); -HeyGenGeneratedAssetOptions.prototype['type'] = undefined; - -/** - * The text or script that the avatar will narrate. - * @member {String} text - */ -HeyGenGeneratedAssetOptions.prototype['text'] = undefined; - -/** - * The avatar character to generate. Select from the list of available avatars:
  • `Angela`
  • `Bill`
  • `Daisy`
  • `Derek`
  • `Eva`
  • `Jake`
  • `Jeff`
  • `Jerome`
  • `Joon`
  • `Kayla`
  • `Kent`
  • `Luna`
  • `Mark`
  • `Matthew`
  • `Monica`
  • `Peter`
  • `Selina`
  • `Tanya`
  • `Thomas`
  • `Tina`
  • `Tyler`
  • `Vanessa`
  • `Vera`
  • `Wilson`
  • `Zoey`
- * @member {module:model/HeyGenGeneratedAssetOptions.AvatarEnum} avatar - */ -HeyGenGeneratedAssetOptions.prototype['avatar'] = undefined; - -/** - * The avatars voice and speaking style. Select from the list of available voices:
  • `Abb- - Natural`
  • `Adam - Natural`
  • `Aiston - Friendly`
  • `Alice - Newscaster`
  • `Alison - Cheerful`
  • `Amber - Friendly`
  • `Amy - Warm`
  • `Ana - Cheerful`
  • `Antoni - Friendly`
  • `Aria - Newscaster`
  • `Arnold - Cheerful`
  • `Arthur - Natural`
  • `Bella - Friendly`
  • `Belle - Natural`
  • `Brandon - Warm`
  • `Brian - Natural`
  • `Bruce - Natural`
  • `Cerise - Cheerful`
  • `Christopher - Calm`
  • `Clara - Professional`
  • `Connor - Natural`
  • `Dahlia - Friendly`
  • `Davis - Professional`
  • `Dean - Natural`
  • `Delbert - Cheerful`
  • `Edward - Friendly`
  • `Elaine - Calm`
  • `Emily - Natural`
  • `Emma - Newscaster`
  • `Eric - Newscaster`
  • `Grace - Natural`
  • `Hailey - Calm`
  • `Indira - Cheerful`
  • `Isabella - Cheerful`
  • `Jacob - Natural`
  • `Jahmai - Friendly`
  • `Jane - Serious`
  • `Jason - Serious`
  • `Jelle - Friendly`
  • `Jen - Natural`
  • `Jenny - Professional`
  • `Jodi - Cheerful`
  • `Joey - Calm`
  • `Johan - Friendly`
  • `Josie - Cheerful`
  • `Keanan - Natural`
  • `Keith - Cheerful`
  • `Kellie - Friendly`
  • `Lauren - Friendly`
  • `Leah - Natural`
  • `Liam - Professional`
  • `Libby - Natural`
  • `Lily - Professional`
  • `Lucas - Natural`
  • `Luke - Professional`
  • `Luna - Natural`
  • `Marieke - Natural`
  • `Matthew - Professional`
  • `Michelle - Natural`
  • `Mitchell - Natural`
  • `Molly - Newscaster`
  • `Monica - Calm`
  • `Natasha - Professional`
  • `Neerja - Newscaster`
  • `Noah - Serious`
  • `Oliver - Newscaster`
  • `Olivia - Calm`
  • `Paul - Natural`
  • `Prabhat - Natural`
  • `Raveena - Natural`
  • `Rudi - Friendly`
  • `Ryan - Professional`
  • `Sam - Natural`
  • `Sara - Cheerful`
  • `Sherry - Friendly`
  • `Sonia - Warm`
  • `Thomas - Natural`
  • `Todd - Professional`
  • `Tony - Professional`
  • `Tracy - Cheerful`
  • `Wayne - Natural`
  • `Wilder - Natural`
  • `Wille - Natural`
  • `William - Friendly`
- * @member {module:model/HeyGenGeneratedAssetOptions.VoiceEnum} voice - */ -HeyGenGeneratedAssetOptions.prototype['voice'] = undefined; - -/** - * The display style of the avatar, a rectangle `normal` or circular `circle` background. Defaults to `normal`. - * @member {module:model/HeyGenGeneratedAssetOptions.AvatarStyleEnum} avatarStyle - */ -HeyGenGeneratedAssetOptions.prototype['avatarStyle'] = undefined; - -/** - * The background color of the video. Defaults to `#ffffff`. - * @member {String} background - */ -HeyGenGeneratedAssetOptions.prototype['background'] = undefined; - -/** - * The aspect ratio of the video, `16:9` horizontal or `9:16` vertical. Defaults to `16:9`. - * @member {module:model/HeyGenGeneratedAssetOptions.RatioEnum} ratio - */ -HeyGenGeneratedAssetOptions.prototype['ratio'] = undefined; - -/** - * A boolean flag indicating whether the video is for testing purposes. See the \"test\" parameter in [HeyGen](https://docs.heygen.com/reference/generate-video) for more details. - * @member {Boolean} test - */ -HeyGenGeneratedAssetOptions.prototype['test'] = undefined; -HeyGenGeneratedAssetOptions.OneOf = ["HeyGenTextToAvatarOptions"]; -var _default = exports["default"] = HeyGenGeneratedAssetOptions; \ No newline at end of file diff --git a/src/model/HeyGenTextToAvatarOptions.js b/src/model/HeyGenTextToAvatarOptions.js deleted file mode 100644 index 3874f61..0000000 --- a/src/model/HeyGenTextToAvatarOptions.js +++ /dev/null @@ -1,978 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The HeyGenTextToAvatarOptions model module. - * @module model/HeyGenTextToAvatarOptions - * @version 0.2.9 - */ -var HeyGenTextToAvatarOptions = /*#__PURE__*/function () { - /** - * Constructs a new HeyGenTextToAvatarOptions. - * Options for the HeyGen text-to-avatar service. Set the text to be converted to an avatar and configure the avatars voice, speaking style, appearance and background. The output will be generated as an MP4 video file available at the URL returned in the response. - * @alias module:model/HeyGenTextToAvatarOptions - * @param type {module:model/HeyGenTextToAvatarOptions.TypeEnum} The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @param text {String} The text or script that the avatar will narrate. - * @param avatar {module:model/HeyGenTextToAvatarOptions.AvatarEnum} The avatar character to generate. Select from the list of available avatars:
  • `Angela`
  • `Bill`
  • `Daisy`
  • `Derek`
  • `Eva`
  • `Jake`
  • `Jeff`
  • `Jerome`
  • `Joon`
  • `Kayla`
  • `Kent`
  • `Luna`
  • `Mark`
  • `Matthew`
  • `Monica`
  • `Peter`
  • `Selina`
  • `Tanya`
  • `Thomas`
  • `Tina`
  • `Tyler`
  • `Vanessa`
  • `Vera`
  • `Wilson`
  • `Zoey`
- * @param voice {module:model/HeyGenTextToAvatarOptions.VoiceEnum} The avatars voice and speaking style. Select from the list of available voices:
  • `Abb- - Natural`
  • `Adam - Natural`
  • `Aiston - Friendly`
  • `Alice - Newscaster`
  • `Alison - Cheerful`
  • `Amber - Friendly`
  • `Amy - Warm`
  • `Ana - Cheerful`
  • `Antoni - Friendly`
  • `Aria - Newscaster`
  • `Arnold - Cheerful`
  • `Arthur - Natural`
  • `Bella - Friendly`
  • `Belle - Natural`
  • `Brandon - Warm`
  • `Brian - Natural`
  • `Bruce - Natural`
  • `Cerise - Cheerful`
  • `Christopher - Calm`
  • `Clara - Professional`
  • `Connor - Natural`
  • `Dahlia - Friendly`
  • `Davis - Professional`
  • `Dean - Natural`
  • `Delbert - Cheerful`
  • `Edward - Friendly`
  • `Elaine - Calm`
  • `Emily - Natural`
  • `Emma - Newscaster`
  • `Eric - Newscaster`
  • `Grace - Natural`
  • `Hailey - Calm`
  • `Indira - Cheerful`
  • `Isabella - Cheerful`
  • `Jacob - Natural`
  • `Jahmai - Friendly`
  • `Jane - Serious`
  • `Jason - Serious`
  • `Jelle - Friendly`
  • `Jen - Natural`
  • `Jenny - Professional`
  • `Jodi - Cheerful`
  • `Joey - Calm`
  • `Johan - Friendly`
  • `Josie - Cheerful`
  • `Keanan - Natural`
  • `Keith - Cheerful`
  • `Kellie - Friendly`
  • `Lauren - Friendly`
  • `Leah - Natural`
  • `Liam - Professional`
  • `Libby - Natural`
  • `Lily - Professional`
  • `Lucas - Natural`
  • `Luke - Professional`
  • `Luna - Natural`
  • `Marieke - Natural`
  • `Matthew - Professional`
  • `Michelle - Natural`
  • `Mitchell - Natural`
  • `Molly - Newscaster`
  • `Monica - Calm`
  • `Natasha - Professional`
  • `Neerja - Newscaster`
  • `Noah - Serious`
  • `Oliver - Newscaster`
  • `Olivia - Calm`
  • `Paul - Natural`
  • `Prabhat - Natural`
  • `Raveena - Natural`
  • `Rudi - Friendly`
  • `Ryan - Professional`
  • `Sam - Natural`
  • `Sara - Cheerful`
  • `Sherry - Friendly`
  • `Sonia - Warm`
  • `Thomas - Natural`
  • `Todd - Professional`
  • `Tony - Professional`
  • `Tracy - Cheerful`
  • `Wayne - Natural`
  • `Wilder - Natural`
  • `Wille - Natural`
  • `William - Friendly`
- */ - function HeyGenTextToAvatarOptions(type, text, avatar, voice) { - _classCallCheck(this, HeyGenTextToAvatarOptions); - HeyGenTextToAvatarOptions.initialize(this, type, text, avatar, voice); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(HeyGenTextToAvatarOptions, [{ - key: "getType", - value: - /** - * Returns The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @return {module:model/HeyGenTextToAvatarOptions.TypeEnum} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @param {module:model/HeyGenTextToAvatarOptions.TypeEnum} type The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The text or script that the avatar will narrate. - * @return {String} - */ - }, { - key: "getText", - value: function getText() { - return this.text; - } - - /** - * Sets The text or script that the avatar will narrate. - * @param {String} text The text or script that the avatar will narrate. - */ - }, { - key: "setText", - value: function setText(text) { - this['text'] = text; - return this; - } - /** - * Returns The avatar character to generate. Select from the list of available avatars:
  • `Angela`
  • `Bill`
  • `Daisy`
  • `Derek`
  • `Eva`
  • `Jake`
  • `Jeff`
  • `Jerome`
  • `Joon`
  • `Kayla`
  • `Kent`
  • `Luna`
  • `Mark`
  • `Matthew`
  • `Monica`
  • `Peter`
  • `Selina`
  • `Tanya`
  • `Thomas`
  • `Tina`
  • `Tyler`
  • `Vanessa`
  • `Vera`
  • `Wilson`
  • `Zoey`
- * @return {module:model/HeyGenTextToAvatarOptions.AvatarEnum} - */ - }, { - key: "getAvatar", - value: function getAvatar() { - return this.avatar; - } - - /** - * Sets The avatar character to generate. Select from the list of available avatars:
  • `Angela`
  • `Bill`
  • `Daisy`
  • `Derek`
  • `Eva`
  • `Jake`
  • `Jeff`
  • `Jerome`
  • `Joon`
  • `Kayla`
  • `Kent`
  • `Luna`
  • `Mark`
  • `Matthew`
  • `Monica`
  • `Peter`
  • `Selina`
  • `Tanya`
  • `Thomas`
  • `Tina`
  • `Tyler`
  • `Vanessa`
  • `Vera`
  • `Wilson`
  • `Zoey`
- * @param {module:model/HeyGenTextToAvatarOptions.AvatarEnum} avatar The avatar character to generate. Select from the list of available avatars:
  • `Angela`
  • `Bill`
  • `Daisy`
  • `Derek`
  • `Eva`
  • `Jake`
  • `Jeff`
  • `Jerome`
  • `Joon`
  • `Kayla`
  • `Kent`
  • `Luna`
  • `Mark`
  • `Matthew`
  • `Monica`
  • `Peter`
  • `Selina`
  • `Tanya`
  • `Thomas`
  • `Tina`
  • `Tyler`
  • `Vanessa`
  • `Vera`
  • `Wilson`
  • `Zoey`
- */ - }, { - key: "setAvatar", - value: function setAvatar(avatar) { - this['avatar'] = avatar; - return this; - } - /** - * Returns The avatars voice and speaking style. Select from the list of available voices:
  • `Abb- - Natural`
  • `Adam - Natural`
  • `Aiston - Friendly`
  • `Alice - Newscaster`
  • `Alison - Cheerful`
  • `Amber - Friendly`
  • `Amy - Warm`
  • `Ana - Cheerful`
  • `Antoni - Friendly`
  • `Aria - Newscaster`
  • `Arnold - Cheerful`
  • `Arthur - Natural`
  • `Bella - Friendly`
  • `Belle - Natural`
  • `Brandon - Warm`
  • `Brian - Natural`
  • `Bruce - Natural`
  • `Cerise - Cheerful`
  • `Christopher - Calm`
  • `Clara - Professional`
  • `Connor - Natural`
  • `Dahlia - Friendly`
  • `Davis - Professional`
  • `Dean - Natural`
  • `Delbert - Cheerful`
  • `Edward - Friendly`
  • `Elaine - Calm`
  • `Emily - Natural`
  • `Emma - Newscaster`
  • `Eric - Newscaster`
  • `Grace - Natural`
  • `Hailey - Calm`
  • `Indira - Cheerful`
  • `Isabella - Cheerful`
  • `Jacob - Natural`
  • `Jahmai - Friendly`
  • `Jane - Serious`
  • `Jason - Serious`
  • `Jelle - Friendly`
  • `Jen - Natural`
  • `Jenny - Professional`
  • `Jodi - Cheerful`
  • `Joey - Calm`
  • `Johan - Friendly`
  • `Josie - Cheerful`
  • `Keanan - Natural`
  • `Keith - Cheerful`
  • `Kellie - Friendly`
  • `Lauren - Friendly`
  • `Leah - Natural`
  • `Liam - Professional`
  • `Libby - Natural`
  • `Lily - Professional`
  • `Lucas - Natural`
  • `Luke - Professional`
  • `Luna - Natural`
  • `Marieke - Natural`
  • `Matthew - Professional`
  • `Michelle - Natural`
  • `Mitchell - Natural`
  • `Molly - Newscaster`
  • `Monica - Calm`
  • `Natasha - Professional`
  • `Neerja - Newscaster`
  • `Noah - Serious`
  • `Oliver - Newscaster`
  • `Olivia - Calm`
  • `Paul - Natural`
  • `Prabhat - Natural`
  • `Raveena - Natural`
  • `Rudi - Friendly`
  • `Ryan - Professional`
  • `Sam - Natural`
  • `Sara - Cheerful`
  • `Sherry - Friendly`
  • `Sonia - Warm`
  • `Thomas - Natural`
  • `Todd - Professional`
  • `Tony - Professional`
  • `Tracy - Cheerful`
  • `Wayne - Natural`
  • `Wilder - Natural`
  • `Wille - Natural`
  • `William - Friendly`
- * @return {module:model/HeyGenTextToAvatarOptions.VoiceEnum} - */ - }, { - key: "getVoice", - value: function getVoice() { - return this.voice; - } - - /** - * Sets The avatars voice and speaking style. Select from the list of available voices:
  • `Abb- - Natural`
  • `Adam - Natural`
  • `Aiston - Friendly`
  • `Alice - Newscaster`
  • `Alison - Cheerful`
  • `Amber - Friendly`
  • `Amy - Warm`
  • `Ana - Cheerful`
  • `Antoni - Friendly`
  • `Aria - Newscaster`
  • `Arnold - Cheerful`
  • `Arthur - Natural`
  • `Bella - Friendly`
  • `Belle - Natural`
  • `Brandon - Warm`
  • `Brian - Natural`
  • `Bruce - Natural`
  • `Cerise - Cheerful`
  • `Christopher - Calm`
  • `Clara - Professional`
  • `Connor - Natural`
  • `Dahlia - Friendly`
  • `Davis - Professional`
  • `Dean - Natural`
  • `Delbert - Cheerful`
  • `Edward - Friendly`
  • `Elaine - Calm`
  • `Emily - Natural`
  • `Emma - Newscaster`
  • `Eric - Newscaster`
  • `Grace - Natural`
  • `Hailey - Calm`
  • `Indira - Cheerful`
  • `Isabella - Cheerful`
  • `Jacob - Natural`
  • `Jahmai - Friendly`
  • `Jane - Serious`
  • `Jason - Serious`
  • `Jelle - Friendly`
  • `Jen - Natural`
  • `Jenny - Professional`
  • `Jodi - Cheerful`
  • `Joey - Calm`
  • `Johan - Friendly`
  • `Josie - Cheerful`
  • `Keanan - Natural`
  • `Keith - Cheerful`
  • `Kellie - Friendly`
  • `Lauren - Friendly`
  • `Leah - Natural`
  • `Liam - Professional`
  • `Libby - Natural`
  • `Lily - Professional`
  • `Lucas - Natural`
  • `Luke - Professional`
  • `Luna - Natural`
  • `Marieke - Natural`
  • `Matthew - Professional`
  • `Michelle - Natural`
  • `Mitchell - Natural`
  • `Molly - Newscaster`
  • `Monica - Calm`
  • `Natasha - Professional`
  • `Neerja - Newscaster`
  • `Noah - Serious`
  • `Oliver - Newscaster`
  • `Olivia - Calm`
  • `Paul - Natural`
  • `Prabhat - Natural`
  • `Raveena - Natural`
  • `Rudi - Friendly`
  • `Ryan - Professional`
  • `Sam - Natural`
  • `Sara - Cheerful`
  • `Sherry - Friendly`
  • `Sonia - Warm`
  • `Thomas - Natural`
  • `Todd - Professional`
  • `Tony - Professional`
  • `Tracy - Cheerful`
  • `Wayne - Natural`
  • `Wilder - Natural`
  • `Wille - Natural`
  • `William - Friendly`
- * @param {module:model/HeyGenTextToAvatarOptions.VoiceEnum} voice The avatars voice and speaking style. Select from the list of available voices:
  • `Abb- - Natural`
  • `Adam - Natural`
  • `Aiston - Friendly`
  • `Alice - Newscaster`
  • `Alison - Cheerful`
  • `Amber - Friendly`
  • `Amy - Warm`
  • `Ana - Cheerful`
  • `Antoni - Friendly`
  • `Aria - Newscaster`
  • `Arnold - Cheerful`
  • `Arthur - Natural`
  • `Bella - Friendly`
  • `Belle - Natural`
  • `Brandon - Warm`
  • `Brian - Natural`
  • `Bruce - Natural`
  • `Cerise - Cheerful`
  • `Christopher - Calm`
  • `Clara - Professional`
  • `Connor - Natural`
  • `Dahlia - Friendly`
  • `Davis - Professional`
  • `Dean - Natural`
  • `Delbert - Cheerful`
  • `Edward - Friendly`
  • `Elaine - Calm`
  • `Emily - Natural`
  • `Emma - Newscaster`
  • `Eric - Newscaster`
  • `Grace - Natural`
  • `Hailey - Calm`
  • `Indira - Cheerful`
  • `Isabella - Cheerful`
  • `Jacob - Natural`
  • `Jahmai - Friendly`
  • `Jane - Serious`
  • `Jason - Serious`
  • `Jelle - Friendly`
  • `Jen - Natural`
  • `Jenny - Professional`
  • `Jodi - Cheerful`
  • `Joey - Calm`
  • `Johan - Friendly`
  • `Josie - Cheerful`
  • `Keanan - Natural`
  • `Keith - Cheerful`
  • `Kellie - Friendly`
  • `Lauren - Friendly`
  • `Leah - Natural`
  • `Liam - Professional`
  • `Libby - Natural`
  • `Lily - Professional`
  • `Lucas - Natural`
  • `Luke - Professional`
  • `Luna - Natural`
  • `Marieke - Natural`
  • `Matthew - Professional`
  • `Michelle - Natural`
  • `Mitchell - Natural`
  • `Molly - Newscaster`
  • `Monica - Calm`
  • `Natasha - Professional`
  • `Neerja - Newscaster`
  • `Noah - Serious`
  • `Oliver - Newscaster`
  • `Olivia - Calm`
  • `Paul - Natural`
  • `Prabhat - Natural`
  • `Raveena - Natural`
  • `Rudi - Friendly`
  • `Ryan - Professional`
  • `Sam - Natural`
  • `Sara - Cheerful`
  • `Sherry - Friendly`
  • `Sonia - Warm`
  • `Thomas - Natural`
  • `Todd - Professional`
  • `Tony - Professional`
  • `Tracy - Cheerful`
  • `Wayne - Natural`
  • `Wilder - Natural`
  • `Wille - Natural`
  • `William - Friendly`
- */ - }, { - key: "setVoice", - value: function setVoice(voice) { - this['voice'] = voice; - return this; - } - /** - * Returns The display style of the avatar, a rectangle `normal` or circular `circle` background. Defaults to `normal`. - * @return {module:model/HeyGenTextToAvatarOptions.AvatarStyleEnum} - */ - }, { - key: "getAvatarStyle", - value: function getAvatarStyle() { - return this.avatarStyle; - } - - /** - * Sets The display style of the avatar, a rectangle `normal` or circular `circle` background. Defaults to `normal`. - * @param {module:model/HeyGenTextToAvatarOptions.AvatarStyleEnum} avatarStyle The display style of the avatar, a rectangle `normal` or circular `circle` background. Defaults to `normal`. - */ - }, { - key: "setAvatarStyle", - value: function setAvatarStyle(avatarStyle) { - this['avatarStyle'] = avatarStyle; - return this; - } - /** - * Returns The background color of the video. Defaults to `#ffffff`. - * @return {String} - */ - }, { - key: "getBackground", - value: function getBackground() { - return this.background; - } - - /** - * Sets The background color of the video. Defaults to `#ffffff`. - * @param {String} background The background color of the video. Defaults to `#ffffff`. - */ - }, { - key: "setBackground", - value: function setBackground(background) { - this['background'] = background; - return this; - } - /** - * Returns The aspect ratio of the video, `16:9` horizontal or `9:16` vertical. Defaults to `16:9`. - * @return {module:model/HeyGenTextToAvatarOptions.RatioEnum} - */ - }, { - key: "getRatio", - value: function getRatio() { - return this.ratio; - } - - /** - * Sets The aspect ratio of the video, `16:9` horizontal or `9:16` vertical. Defaults to `16:9`. - * @param {module:model/HeyGenTextToAvatarOptions.RatioEnum} ratio The aspect ratio of the video, `16:9` horizontal or `9:16` vertical. Defaults to `16:9`. - */ - }, { - key: "setRatio", - value: function setRatio(ratio) { - this['ratio'] = ratio; - return this; - } - /** - * Returns A boolean flag indicating whether the video is for testing purposes. See the \"test\" parameter in [HeyGen](https://docs.heygen.com/reference/generate-video) for more details. - * @return {Boolean} - */ - }, { - key: "getTest", - value: function getTest() { - return this.test; - } - - /** - * Sets A boolean flag indicating whether the video is for testing purposes. See the \"test\" parameter in [HeyGen](https://docs.heygen.com/reference/generate-video) for more details. - * @param {Boolean} test A boolean flag indicating whether the video is for testing purposes. See the \"test\" parameter in [HeyGen](https://docs.heygen.com/reference/generate-video) for more details. - */ - }, { - key: "setTest", - value: function setTest(test) { - this['test'] = test; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, text, avatar, voice) { - obj['type'] = type; - obj['text'] = text; - obj['avatar'] = avatar; - obj['voice'] = voice; - } - - /** - * Constructs a HeyGenTextToAvatarOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/HeyGenTextToAvatarOptions} obj Optional instance to populate. - * @return {module:model/HeyGenTextToAvatarOptions} The populated HeyGenTextToAvatarOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new HeyGenTextToAvatarOptions(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('text')) { - obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String'); - } - if (data.hasOwnProperty('avatar')) { - obj['avatar'] = _ApiClient["default"].convertToType(data['avatar'], 'String'); - } - if (data.hasOwnProperty('voice')) { - obj['voice'] = _ApiClient["default"].convertToType(data['voice'], 'String'); - } - if (data.hasOwnProperty('avatarStyle')) { - obj['avatarStyle'] = _ApiClient["default"].convertToType(data['avatarStyle'], 'String'); - } - if (data.hasOwnProperty('background')) { - obj['background'] = _ApiClient["default"].convertToType(data['background'], 'String'); - } - if (data.hasOwnProperty('ratio')) { - obj['ratio'] = _ApiClient["default"].convertToType(data['ratio'], 'String'); - } - if (data.hasOwnProperty('test')) { - obj['test'] = _ApiClient["default"].convertToType(data['test'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to HeyGenTextToAvatarOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to HeyGenTextToAvatarOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(HeyGenTextToAvatarOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { - throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); - } - // ensure the json data is a string - if (data['avatar'] && !(typeof data['avatar'] === 'string' || data['avatar'] instanceof String)) { - throw new Error("Expected the field `avatar` to be a primitive type in the JSON string but got " + data['avatar']); - } - // ensure the json data is a string - if (data['voice'] && !(typeof data['voice'] === 'string' || data['voice'] instanceof String)) { - throw new Error("Expected the field `voice` to be a primitive type in the JSON string but got " + data['voice']); - } - // ensure the json data is a string - if (data['avatarStyle'] && !(typeof data['avatarStyle'] === 'string' || data['avatarStyle'] instanceof String)) { - throw new Error("Expected the field `avatarStyle` to be a primitive type in the JSON string but got " + data['avatarStyle']); - } - // ensure the json data is a string - if (data['background'] && !(typeof data['background'] === 'string' || data['background'] instanceof String)) { - throw new Error("Expected the field `background` to be a primitive type in the JSON string but got " + data['background']); - } - // ensure the json data is a string - if (data['ratio'] && !(typeof data['ratio'] === 'string' || data['ratio'] instanceof String)) { - throw new Error("Expected the field `ratio` to be a primitive type in the JSON string but got " + data['ratio']); - } - return true; - } - }]); -}(); -HeyGenTextToAvatarOptions.RequiredProperties = ["type", "text", "avatar", "voice"]; - -/** - * The type of asset to generate - set to `text-to-avatar` for text-to-avatar. - * @member {module:model/HeyGenTextToAvatarOptions.TypeEnum} type - */ -HeyGenTextToAvatarOptions.prototype['type'] = undefined; - -/** - * The text or script that the avatar will narrate. - * @member {String} text - */ -HeyGenTextToAvatarOptions.prototype['text'] = undefined; - -/** - * The avatar character to generate. Select from the list of available avatars:
  • `Angela`
  • `Bill`
  • `Daisy`
  • `Derek`
  • `Eva`
  • `Jake`
  • `Jeff`
  • `Jerome`
  • `Joon`
  • `Kayla`
  • `Kent`
  • `Luna`
  • `Mark`
  • `Matthew`
  • `Monica`
  • `Peter`
  • `Selina`
  • `Tanya`
  • `Thomas`
  • `Tina`
  • `Tyler`
  • `Vanessa`
  • `Vera`
  • `Wilson`
  • `Zoey`
- * @member {module:model/HeyGenTextToAvatarOptions.AvatarEnum} avatar - */ -HeyGenTextToAvatarOptions.prototype['avatar'] = undefined; - -/** - * The avatars voice and speaking style. Select from the list of available voices:
  • `Abb- - Natural`
  • `Adam - Natural`
  • `Aiston - Friendly`
  • `Alice - Newscaster`
  • `Alison - Cheerful`
  • `Amber - Friendly`
  • `Amy - Warm`
  • `Ana - Cheerful`
  • `Antoni - Friendly`
  • `Aria - Newscaster`
  • `Arnold - Cheerful`
  • `Arthur - Natural`
  • `Bella - Friendly`
  • `Belle - Natural`
  • `Brandon - Warm`
  • `Brian - Natural`
  • `Bruce - Natural`
  • `Cerise - Cheerful`
  • `Christopher - Calm`
  • `Clara - Professional`
  • `Connor - Natural`
  • `Dahlia - Friendly`
  • `Davis - Professional`
  • `Dean - Natural`
  • `Delbert - Cheerful`
  • `Edward - Friendly`
  • `Elaine - Calm`
  • `Emily - Natural`
  • `Emma - Newscaster`
  • `Eric - Newscaster`
  • `Grace - Natural`
  • `Hailey - Calm`
  • `Indira - Cheerful`
  • `Isabella - Cheerful`
  • `Jacob - Natural`
  • `Jahmai - Friendly`
  • `Jane - Serious`
  • `Jason - Serious`
  • `Jelle - Friendly`
  • `Jen - Natural`
  • `Jenny - Professional`
  • `Jodi - Cheerful`
  • `Joey - Calm`
  • `Johan - Friendly`
  • `Josie - Cheerful`
  • `Keanan - Natural`
  • `Keith - Cheerful`
  • `Kellie - Friendly`
  • `Lauren - Friendly`
  • `Leah - Natural`
  • `Liam - Professional`
  • `Libby - Natural`
  • `Lily - Professional`
  • `Lucas - Natural`
  • `Luke - Professional`
  • `Luna - Natural`
  • `Marieke - Natural`
  • `Matthew - Professional`
  • `Michelle - Natural`
  • `Mitchell - Natural`
  • `Molly - Newscaster`
  • `Monica - Calm`
  • `Natasha - Professional`
  • `Neerja - Newscaster`
  • `Noah - Serious`
  • `Oliver - Newscaster`
  • `Olivia - Calm`
  • `Paul - Natural`
  • `Prabhat - Natural`
  • `Raveena - Natural`
  • `Rudi - Friendly`
  • `Ryan - Professional`
  • `Sam - Natural`
  • `Sara - Cheerful`
  • `Sherry - Friendly`
  • `Sonia - Warm`
  • `Thomas - Natural`
  • `Todd - Professional`
  • `Tony - Professional`
  • `Tracy - Cheerful`
  • `Wayne - Natural`
  • `Wilder - Natural`
  • `Wille - Natural`
  • `William - Friendly`
- * @member {module:model/HeyGenTextToAvatarOptions.VoiceEnum} voice - */ -HeyGenTextToAvatarOptions.prototype['voice'] = undefined; - -/** - * The display style of the avatar, a rectangle `normal` or circular `circle` background. Defaults to `normal`. - * @member {module:model/HeyGenTextToAvatarOptions.AvatarStyleEnum} avatarStyle - */ -HeyGenTextToAvatarOptions.prototype['avatarStyle'] = undefined; - -/** - * The background color of the video. Defaults to `#ffffff`. - * @member {String} background - */ -HeyGenTextToAvatarOptions.prototype['background'] = undefined; - -/** - * The aspect ratio of the video, `16:9` horizontal or `9:16` vertical. Defaults to `16:9`. - * @member {module:model/HeyGenTextToAvatarOptions.RatioEnum} ratio - */ -HeyGenTextToAvatarOptions.prototype['ratio'] = undefined; - -/** - * A boolean flag indicating whether the video is for testing purposes. See the \"test\" parameter in [HeyGen](https://docs.heygen.com/reference/generate-video) for more details. - * @member {Boolean} test - */ -HeyGenTextToAvatarOptions.prototype['test'] = undefined; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -HeyGenTextToAvatarOptions['TypeEnum'] = { - /** - * value: "text-to-avatar" - * @const - */ - "text-to-avatar": "text-to-avatar" -}; - -/** - * Allowed values for the avatar property. - * @enum {String} - * @readonly - */ -HeyGenTextToAvatarOptions['AvatarEnum'] = { - /** - * value: "Angela" - * @const - */ - "Angela": "Angela", - /** - * value: "Bill" - * @const - */ - "Bill": "Bill", - /** - * value: "Daisy" - * @const - */ - "Daisy": "Daisy", - /** - * value: "Derek" - * @const - */ - "Derek": "Derek", - /** - * value: "Eva" - * @const - */ - "Eva": "Eva", - /** - * value: "Jake" - * @const - */ - "Jake": "Jake", - /** - * value: "Jeff" - * @const - */ - "Jeff": "Jeff", - /** - * value: "Jerome" - * @const - */ - "Jerome": "Jerome", - /** - * value: "Joon" - * @const - */ - "Joon": "Joon", - /** - * value: "Kayla" - * @const - */ - "Kayla": "Kayla", - /** - * value: "Kent" - * @const - */ - "Kent": "Kent", - /** - * value: "Luna" - * @const - */ - "Luna": "Luna", - /** - * value: "Mark" - * @const - */ - "Mark": "Mark", - /** - * value: "Matthew" - * @const - */ - "Matthew": "Matthew", - /** - * value: "Monica" - * @const - */ - "Monica": "Monica", - /** - * value: "Peter" - * @const - */ - "Peter": "Peter", - /** - * value: "Selina" - * @const - */ - "Selina": "Selina", - /** - * value: "Tanya" - * @const - */ - "Tanya": "Tanya", - /** - * value: "Thomas" - * @const - */ - "Thomas": "Thomas", - /** - * value: "Tina" - * @const - */ - "Tina": "Tina", - /** - * value: "Tyler" - * @const - */ - "Tyler": "Tyler", - /** - * value: "Vanessa" - * @const - */ - "Vanessa": "Vanessa", - /** - * value: "Vera" - * @const - */ - "Vera": "Vera", - /** - * value: "Wilson" - * @const - */ - "Wilson": "Wilson", - /** - * value: "Zoey" - * @const - */ - "Zoey": "Zoey" -}; - -/** - * Allowed values for the voice property. - * @enum {String} - * @readonly - */ -HeyGenTextToAvatarOptions['VoiceEnum'] = { - /** - * value: "Abbi - Natural" - * @const - */ - "Abbi - Natural": "Abbi - Natural", - /** - * value: "Adam - Natural" - * @const - */ - "Adam - Natural": "Adam - Natural", - /** - * value: "Aiston - Friendly" - * @const - */ - "Aiston - Friendly": "Aiston - Friendly", - /** - * value: "Alice - Newscaster" - * @const - */ - "Alice - Newscaster": "Alice - Newscaster", - /** - * value: "Alison - Cheerful" - * @const - */ - "Alison - Cheerful": "Alison - Cheerful", - /** - * value: "Amber - Friendly" - * @const - */ - "Amber - Friendly": "Amber - Friendly", - /** - * value: "Amy - Warm" - * @const - */ - "Amy - Warm": "Amy - Warm", - /** - * value: "Ana - Cheerful" - * @const - */ - "Ana - Cheerful": "Ana - Cheerful", - /** - * value: "Antoni - Friendly" - * @const - */ - "Antoni - Friendly": "Antoni - Friendly", - /** - * value: "Aria - Newscaster" - * @const - */ - "Aria - Newscaster": "Aria - Newscaster", - /** - * value: "Arnold - Cheerful" - * @const - */ - "Arnold - Cheerful": "Arnold - Cheerful", - /** - * value: "Arthur - Natural" - * @const - */ - "Arthur - Natural": "Arthur - Natural", - /** - * value: "Bella - Friendly" - * @const - */ - "Bella - Friendly": "Bella - Friendly", - /** - * value: "Belle - Natural" - * @const - */ - "Belle - Natural": "Belle - Natural", - /** - * value: "Brandon - Warm" - * @const - */ - "Brandon - Warm": "Brandon - Warm", - /** - * value: "Brian - Natural" - * @const - */ - "Brian - Natural": "Brian - Natural", - /** - * value: "Bruce - Natural" - * @const - */ - "Bruce - Natural": "Bruce - Natural", - /** - * value: "Cerise - Cheerful" - * @const - */ - "Cerise - Cheerful": "Cerise - Cheerful", - /** - * value: "Christopher - Calm" - * @const - */ - "Christopher - Calm": "Christopher - Calm", - /** - * value: "Clara - Professional" - * @const - */ - "Clara - Professional": "Clara - Professional", - /** - * value: "Connor - Natural" - * @const - */ - "Connor - Natural": "Connor - Natural", - /** - * value: "Dahlia - Friendly" - * @const - */ - "Dahlia - Friendly": "Dahlia - Friendly", - /** - * value: "Davis - Professional" - * @const - */ - "Davis - Professional": "Davis - Professional", - /** - * value: "Dean - Natural" - * @const - */ - "Dean - Natural": "Dean - Natural", - /** - * value: "Delbert - Cheerful" - * @const - */ - "Delbert - Cheerful": "Delbert - Cheerful", - /** - * value: "Edward - Friendly" - * @const - */ - "Edward - Friendly": "Edward - Friendly", - /** - * value: "Elaine - Calm" - * @const - */ - "Elaine - Calm": "Elaine - Calm", - /** - * value: "Emily - Natural" - * @const - */ - "Emily - Natural": "Emily - Natural", - /** - * value: "Emma - Newscaster" - * @const - */ - "Emma - Newscaster": "Emma - Newscaster", - /** - * value: "Eric - Newscaster" - * @const - */ - "Eric - Newscaster": "Eric - Newscaster", - /** - * value: "Grace - Natural" - * @const - */ - "Grace - Natural": "Grace - Natural", - /** - * value: "Hailey - Calm" - * @const - */ - "Hailey - Calm": "Hailey - Calm", - /** - * value: "Indira - Cheerful" - * @const - */ - "Indira - Cheerful": "Indira - Cheerful", - /** - * value: "Isabella - Cheerful" - * @const - */ - "Isabella - Cheerful": "Isabella - Cheerful", - /** - * value: "Jacob - Natural" - * @const - */ - "Jacob - Natural": "Jacob - Natural", - /** - * value: "Jahmai - Friendly" - * @const - */ - "Jahmai - Friendly": "Jahmai - Friendly", - /** - * value: "Jane - Serious" - * @const - */ - "Jane - Serious": "Jane - Serious", - /** - * value: "Jason - Serious" - * @const - */ - "Jason - Serious": "Jason - Serious", - /** - * value: "Jelle - Friendly" - * @const - */ - "Jelle - Friendly": "Jelle - Friendly", - /** - * value: "Jen - Natural" - * @const - */ - "Jen - Natural": "Jen - Natural", - /** - * value: "Jenny - Professional" - * @const - */ - "Jenny - Professional": "Jenny - Professional", - /** - * value: "Jodi - Cheerful" - * @const - */ - "Jodi - Cheerful": "Jodi - Cheerful", - /** - * value: "Joey - Calm" - * @const - */ - "Joey - Calm": "Joey - Calm", - /** - * value: "Johan - Friendly" - * @const - */ - "Johan - Friendly": "Johan - Friendly", - /** - * value: "Josie - Cheerful" - * @const - */ - "Josie - Cheerful": "Josie - Cheerful", - /** - * value: "Keanan - Natural" - * @const - */ - "Keanan - Natural": "Keanan - Natural", - /** - * value: "Keith - Cheerful" - * @const - */ - "Keith - Cheerful": "Keith - Cheerful", - /** - * value: "Kellie - Friendly" - * @const - */ - "Kellie - Friendly": "Kellie - Friendly", - /** - * value: "Lauren - Friendly" - * @const - */ - "Lauren - Friendly": "Lauren - Friendly", - /** - * value: "Leah - Natural" - * @const - */ - "Leah - Natural": "Leah - Natural", - /** - * value: "Liam - Professional" - * @const - */ - "Liam - Professional": "Liam - Professional", - /** - * value: "Libby - Natural" - * @const - */ - "Libby - Natural": "Libby - Natural", - /** - * value: "Lily - Professional" - * @const - */ - "Lily - Professional": "Lily - Professional", - /** - * value: "Lucas - Natural" - * @const - */ - "Lucas - Natural": "Lucas - Natural", - /** - * value: "Luke - Professional" - * @const - */ - "Luke - Professional": "Luke - Professional", - /** - * value: "Luna - Natural" - * @const - */ - "Luna - Natural": "Luna - Natural", - /** - * value: "Marieke - Natural" - * @const - */ - "Marieke - Natural": "Marieke - Natural", - /** - * value: "Matthew - Professional" - * @const - */ - "Matthew - Professional": "Matthew - Professional", - /** - * value: "Michelle - Natural" - * @const - */ - "Michelle - Natural": "Michelle - Natural", - /** - * value: "Mitchell - Natural" - * @const - */ - "Mitchell - Natural": "Mitchell - Natural", - /** - * value: "Molly - Newscaster" - * @const - */ - "Molly - Newscaster": "Molly - Newscaster", - /** - * value: "Monica - Calm" - * @const - */ - "Monica - Calm": "Monica - Calm", - /** - * value: "Natasha - Professional" - * @const - */ - "Natasha - Professional": "Natasha - Professional", - /** - * value: "Neerja - Newscaster" - * @const - */ - "Neerja - Newscaster": "Neerja - Newscaster", - /** - * value: "Noah - Serious" - * @const - */ - "Noah - Serious": "Noah - Serious", - /** - * value: "Oliver - Newscaster" - * @const - */ - "Oliver - Newscaster": "Oliver - Newscaster", - /** - * value: "Olivia - Calm" - * @const - */ - "Olivia - Calm": "Olivia - Calm", - /** - * value: "Paul - Natural" - * @const - */ - "Paul - Natural": "Paul - Natural", - /** - * value: "Prabhat - Natural" - * @const - */ - "Prabhat - Natural": "Prabhat - Natural", - /** - * value: "Raveena - Natural" - * @const - */ - "Raveena - Natural": "Raveena - Natural", - /** - * value: "Rudi - Friendly" - * @const - */ - "Rudi - Friendly": "Rudi - Friendly", - /** - * value: "Ryan - Professional" - * @const - */ - "Ryan - Professional": "Ryan - Professional", - /** - * value: "Sam - Natural" - * @const - */ - "Sam - Natural": "Sam - Natural", - /** - * value: "Sara - Cheerful" - * @const - */ - "Sara - Cheerful": "Sara - Cheerful", - /** - * value: "Sherry - Friendly" - * @const - */ - "Sherry - Friendly": "Sherry - Friendly", - /** - * value: "Sonia - Warm" - * @const - */ - "Sonia - Warm": "Sonia - Warm", - /** - * value: "Thomas - Natural" - * @const - */ - "Thomas - Natural": "Thomas - Natural", - /** - * value: "Todd - Professional" - * @const - */ - "Todd - Professional": "Todd - Professional", - /** - * value: "Tony - Professional" - * @const - */ - "Tony - Professional": "Tony - Professional", - /** - * value: "Tracy - Cheerful" - * @const - */ - "Tracy - Cheerful": "Tracy - Cheerful", - /** - * value: "Wayne - Natural" - * @const - */ - "Wayne - Natural": "Wayne - Natural", - /** - * value: "Wilder - Natural" - * @const - */ - "Wilder - Natural": "Wilder - Natural", - /** - * value: "Wille - Natural" - * @const - */ - "Wille - Natural": "Wille - Natural", - /** - * value: "William - Friendly" - * @const - */ - "William - Friendly": "William - Friendly" -}; - -/** - * Allowed values for the avatarStyle property. - * @enum {String} - * @readonly - */ -HeyGenTextToAvatarOptions['AvatarStyleEnum'] = { - /** - * value: "normal" - * @const - */ - "normal": "normal", - /** - * value: "circle" - * @const - */ - "circle": "circle" -}; - -/** - * Allowed values for the ratio property. - * @enum {String} - * @readonly - */ -HeyGenTextToAvatarOptions['RatioEnum'] = { - /** - * value: "16:9" - * @const - */ - "16:9": "16:9", - /** - * value: "9:16" - * @const - */ - "9:16": "9:16" -}; -var _default = exports["default"] = HeyGenTextToAvatarOptions; \ No newline at end of file diff --git a/src/model/HtmlAsset.js b/src/model/HtmlAsset.js deleted file mode 100644 index ea58253..0000000 --- a/src/model/HtmlAsset.js +++ /dev/null @@ -1,381 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The HtmlAsset model module. - * @module model/HtmlAsset - * @version 0.2.9 - */ -var HtmlAsset = /*#__PURE__*/function () { - /** - * Constructs a new HtmlAsset. - * The HtmlAsset clip type lets you create text based layout and formatting using HTML and CSS. You can also set the height and width of a bounding box for the HTML content to sit within. Text and elements will wrap within the bounding box. - * @alias module:model/HtmlAsset - * @param type {String} The type of asset - set to `html` for HTML. - * @param html {String} The HTML text string. See list of [supported HTML tags](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-html-tags). - */ - function HtmlAsset(type, html) { - _classCallCheck(this, HtmlAsset); - HtmlAsset.initialize(this, type, html); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(HtmlAsset, [{ - key: "getType", - value: - /** - * Returns The type of asset - set to `html` for HTML. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset - set to `html` for HTML. - * @param {String} type The type of asset - set to `html` for HTML. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The HTML text string. See list of [supported HTML tags](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-html-tags). - * @return {String} - */ - }, { - key: "getHtml", - value: function getHtml() { - return this.html; - } - - /** - * Sets The HTML text string. See list of [supported HTML tags](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-html-tags). - * @param {String} html The HTML text string. See list of [supported HTML tags](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-html-tags). - */ - }, { - key: "setHtml", - value: function setHtml(html) { - this['html'] = html; - return this; - } - /** - * Returns The CSS text string to apply styling to the HTML. See list of [support CSS properties](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-css-properties). - * @return {String} - */ - }, { - key: "getCss", - value: function getCss() { - return this.css; - } - - /** - * Sets The CSS text string to apply styling to the HTML. See list of [support CSS properties](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-css-properties). - * @param {String} css The CSS text string to apply styling to the HTML. See list of [support CSS properties](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-css-properties). - */ - }, { - key: "setCss", - value: function setCss(css) { - this['css'] = css; - return this; - } - /** - * Returns Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box. - * @return {Number} - */ - }, { - key: "getWidth", - value: function getWidth() { - return this.width; - } - - /** - * Sets Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box. - * @param {Number} width Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box. - */ - }, { - key: "setWidth", - value: function setWidth(width) { - this['width'] = width; - return this; - } - /** - * Returns Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box. - * @return {Number} - */ - }, { - key: "getHeight", - value: function getHeight() { - return this.height; - } - - /** - * Sets Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box. - * @param {Number} height Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box. - */ - }, { - key: "setHeight", - value: function setHeight(height) { - this['height'] = height; - return this; - } - /** - * Returns Apply a background color behind the HTML bounding box using. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. - * @return {String} - */ - }, { - key: "getBackground", - value: function getBackground() { - return this.background; - } - - /** - * Sets Apply a background color behind the HTML bounding box using. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. - * @param {String} background Apply a background color behind the HTML bounding box using. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. - */ - }, { - key: "setBackground", - value: function setBackground(background) { - this['background'] = background; - return this; - } - /** - * Returns Place the HTML in one of nine predefined positions within the HTML area.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @return {module:model/HtmlAsset.PositionEnum} - */ - }, { - key: "getPosition", - value: function getPosition() { - return this.position; - } - - /** - * Sets Place the HTML in one of nine predefined positions within the HTML area.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @param {module:model/HtmlAsset.PositionEnum} position Place the HTML in one of nine predefined positions within the HTML area.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- */ - }, { - key: "setPosition", - value: function setPosition(position) { - this['position'] = position; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, html) { - obj['type'] = type || 'html'; - obj['html'] = html; - } - - /** - * Constructs a HtmlAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/HtmlAsset} obj Optional instance to populate. - * @return {module:model/HtmlAsset} The populated HtmlAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new HtmlAsset(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('html')) { - obj['html'] = _ApiClient["default"].convertToType(data['html'], 'String'); - } - if (data.hasOwnProperty('css')) { - obj['css'] = _ApiClient["default"].convertToType(data['css'], 'String'); - } - if (data.hasOwnProperty('width')) { - obj['width'] = _ApiClient["default"].convertToType(data['width'], 'Number'); - } - if (data.hasOwnProperty('height')) { - obj['height'] = _ApiClient["default"].convertToType(data['height'], 'Number'); - } - if (data.hasOwnProperty('background')) { - obj['background'] = _ApiClient["default"].convertToType(data['background'], 'String'); - } - if (data.hasOwnProperty('position')) { - obj['position'] = _ApiClient["default"].convertToType(data['position'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to HtmlAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to HtmlAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(HtmlAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['html'] && !(typeof data['html'] === 'string' || data['html'] instanceof String)) { - throw new Error("Expected the field `html` to be a primitive type in the JSON string but got " + data['html']); - } - // ensure the json data is a string - if (data['css'] && !(typeof data['css'] === 'string' || data['css'] instanceof String)) { - throw new Error("Expected the field `css` to be a primitive type in the JSON string but got " + data['css']); - } - // ensure the json data is a string - if (data['background'] && !(typeof data['background'] === 'string' || data['background'] instanceof String)) { - throw new Error("Expected the field `background` to be a primitive type in the JSON string but got " + data['background']); - } - // ensure the json data is a string - if (data['position'] && !(typeof data['position'] === 'string' || data['position'] instanceof String)) { - throw new Error("Expected the field `position` to be a primitive type in the JSON string but got " + data['position']); - } - return true; - } - }]); -}(); -HtmlAsset.RequiredProperties = ["type", "html"]; - -/** - * The type of asset - set to `html` for HTML. - * @member {String} type - * @default 'html' - */ -HtmlAsset.prototype['type'] = 'html'; - -/** - * The HTML text string. See list of [supported HTML tags](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-html-tags). - * @member {String} html - */ -HtmlAsset.prototype['html'] = undefined; - -/** - * The CSS text string to apply styling to the HTML. See list of [support CSS properties](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-css-properties). - * @member {String} css - */ -HtmlAsset.prototype['css'] = undefined; - -/** - * Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box. - * @member {Number} width - */ -HtmlAsset.prototype['width'] = undefined; - -/** - * Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box. - * @member {Number} height - */ -HtmlAsset.prototype['height'] = undefined; - -/** - * Apply a background color behind the HTML bounding box using. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. - * @member {String} background - */ -HtmlAsset.prototype['background'] = undefined; - -/** - * Place the HTML in one of nine predefined positions within the HTML area.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @member {module:model/HtmlAsset.PositionEnum} position - */ -HtmlAsset.prototype['position'] = undefined; - -/** - * Allowed values for the position property. - * @enum {String} - * @readonly - */ -HtmlAsset['PositionEnum'] = { - /** - * value: "top" - * @const - */ - "top": "top", - /** - * value: "topRight" - * @const - */ - "topRight": "topRight", - /** - * value: "right" - * @const - */ - "right": "right", - /** - * value: "bottomRight" - * @const - */ - "bottomRight": "bottomRight", - /** - * value: "bottom" - * @const - */ - "bottom": "bottom", - /** - * value: "bottomLeft" - * @const - */ - "bottomLeft": "bottomLeft", - /** - * value: "left" - * @const - */ - "left": "left", - /** - * value: "topLeft" - * @const - */ - "topLeft": "topLeft", - /** - * value: "center" - * @const - */ - "center": "center" -}; -var _default = exports["default"] = HtmlAsset; \ No newline at end of file diff --git a/src/model/ImageAsset.js b/src/model/ImageAsset.js deleted file mode 100644 index 1c1e161..0000000 --- a/src/model/ImageAsset.js +++ /dev/null @@ -1,203 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Crop = _interopRequireDefault(require("./Crop")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ImageAsset model module. - * @module model/ImageAsset - * @version 0.2.9 - */ -var ImageAsset = /*#__PURE__*/function () { - /** - * Constructs a new ImageAsset. - * The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file. - * @alias module:model/ImageAsset - * @param type {String} The type of asset - set to `image` for images. - * @param src {String} The image source URL. The URL must be publicly accessible or include credentials. - */ - function ImageAsset(type, src) { - _classCallCheck(this, ImageAsset); - ImageAsset.initialize(this, type, src); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ImageAsset, [{ - key: "getType", - value: - /** - * Returns The type of asset - set to `image` for images. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset - set to `image` for images. - * @param {String} type The type of asset - set to `image` for images. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The image source URL. The URL must be publicly accessible or include credentials. - * @return {String} - */ - }, { - key: "getSrc", - value: function getSrc() { - return this.src; - } - - /** - * Sets The image source URL. The URL must be publicly accessible or include credentials. - * @param {String} src The image source URL. The URL must be publicly accessible or include credentials. - */ - }, { - key: "setSrc", - value: function setSrc(src) { - this['src'] = src; - return this; - } - /** - * @return {module:model/Crop} - */ - }, { - key: "getCrop", - value: function getCrop() { - return this.crop; - } - - /** - * @param {module:model/Crop} crop - */ - }, { - key: "setCrop", - value: function setCrop(crop) { - this['crop'] = crop; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, src) { - obj['type'] = type || 'image'; - obj['src'] = src; - } - - /** - * Constructs a ImageAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ImageAsset} obj Optional instance to populate. - * @return {module:model/ImageAsset} The populated ImageAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ImageAsset(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('src')) { - obj['src'] = _ApiClient["default"].convertToType(data['src'], 'String'); - } - if (data.hasOwnProperty('crop')) { - obj['crop'] = _Crop["default"].constructFromObject(data['crop']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ImageAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ImageAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ImageAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['src'] && !(typeof data['src'] === 'string' || data['src'] instanceof String)) { - throw new Error("Expected the field `src` to be a primitive type in the JSON string but got " + data['src']); - } - // validate the optional field `crop` - if (data['crop']) { - // data not null - _Crop["default"].validateJSON(data['crop']); - } - return true; - } - }]); -}(); -ImageAsset.RequiredProperties = ["type", "src"]; - -/** - * The type of asset - set to `image` for images. - * @member {String} type - * @default 'image' - */ -ImageAsset.prototype['type'] = 'image'; - -/** - * The image source URL. The URL must be publicly accessible or include credentials. - * @member {String} src - */ -ImageAsset.prototype['src'] = undefined; - -/** - * @member {module:model/Crop} crop - */ -ImageAsset.prototype['crop'] = undefined; -var _default = exports["default"] = ImageAsset; \ No newline at end of file diff --git a/src/model/IngestErrorResponse.js b/src/model/IngestErrorResponse.js deleted file mode 100644 index f9c1d46..0000000 --- a/src/model/IngestErrorResponse.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _IngestErrorResponseData = _interopRequireDefault(require("./IngestErrorResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The IngestErrorResponse model module. - * @module model/IngestErrorResponse - * @version 0.2.9 - */ -var IngestErrorResponse = /*#__PURE__*/function () { - /** - * Constructs a new IngestErrorResponse. - * Error response data for validation and other errors returned by the Ingest API. - * @alias module:model/IngestErrorResponse - * @param errors {Array.} An array of errors. - */ - function IngestErrorResponse(errors) { - _classCallCheck(this, IngestErrorResponse); - IngestErrorResponse.initialize(this, errors); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(IngestErrorResponse, [{ - key: "getErrors", - value: - /** - * Returns An array of errors. - * @return {Array.} - */ - function getErrors() { - return this.errors; - } - - /** - * Sets An array of errors. - * @param {Array.} errors An array of errors. - */ - }, { - key: "setErrors", - value: function setErrors(errors) { - this['errors'] = errors; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, errors) { - obj['errors'] = errors; - } - - /** - * Constructs a IngestErrorResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/IngestErrorResponse} obj Optional instance to populate. - * @return {module:model/IngestErrorResponse} The populated IngestErrorResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new IngestErrorResponse(); - if (data.hasOwnProperty('errors')) { - obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_IngestErrorResponseData["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to IngestErrorResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to IngestErrorResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(IngestErrorResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['errors']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['errors'])) { - throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']); - } - // validate the optional field `errors` (array) - var _iterator2 = _createForOfIteratorHelper(data['errors']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _IngestErrorResponseData["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - return true; - } - }]); -}(); -IngestErrorResponse.RequiredProperties = ["errors"]; - -/** - * An array of errors. - * @member {Array.} errors - */ -IngestErrorResponse.prototype['errors'] = undefined; -var _default = exports["default"] = IngestErrorResponse; \ No newline at end of file diff --git a/src/model/IngestErrorResponseData.js b/src/model/IngestErrorResponseData.js deleted file mode 100644 index ef154e9..0000000 --- a/src/model/IngestErrorResponseData.js +++ /dev/null @@ -1,205 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The IngestErrorResponseData model module. - * @module model/IngestErrorResponseData - * @version 0.2.9 - */ -var IngestErrorResponseData = /*#__PURE__*/function () { - /** - * Constructs a new IngestErrorResponseData. - * Individual errors returned by the Ingest API. - * @alias module:model/IngestErrorResponseData - * @param status {String} The http status code. - * @param title {String} A short summary of the error. - * @param detail {String} A detailed description of the error. - */ - function IngestErrorResponseData(status, title, detail) { - _classCallCheck(this, IngestErrorResponseData); - IngestErrorResponseData.initialize(this, status, title, detail); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(IngestErrorResponseData, [{ - key: "getStatus", - value: - /** - * Returns The http status code. - * @return {String} - */ - function getStatus() { - return this.status; - } - - /** - * Sets The http status code. - * @param {String} status The http status code. - */ - }, { - key: "setStatus", - value: function setStatus(status) { - this['status'] = status; - return this; - } - /** - * Returns A short summary of the error. - * @return {String} - */ - }, { - key: "getTitle", - value: function getTitle() { - return this.title; - } - - /** - * Sets A short summary of the error. - * @param {String} title A short summary of the error. - */ - }, { - key: "setTitle", - value: function setTitle(title) { - this['title'] = title; - return this; - } - /** - * Returns A detailed description of the error. - * @return {String} - */ - }, { - key: "getDetail", - value: function getDetail() { - return this.detail; - } - - /** - * Sets A detailed description of the error. - * @param {String} detail A detailed description of the error. - */ - }, { - key: "setDetail", - value: function setDetail(detail) { - this['detail'] = detail; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, status, title, detail) { - obj['status'] = status; - obj['title'] = title; - obj['detail'] = detail; - } - - /** - * Constructs a IngestErrorResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/IngestErrorResponseData} obj Optional instance to populate. - * @return {module:model/IngestErrorResponseData} The populated IngestErrorResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new IngestErrorResponseData(); - if (data.hasOwnProperty('status')) { - obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('title')) { - obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String'); - } - if (data.hasOwnProperty('detail')) { - obj['detail'] = _ApiClient["default"].convertToType(data['detail'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to IngestErrorResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to IngestErrorResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(IngestErrorResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // ensure the json data is a string - if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) { - throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']); - } - // ensure the json data is a string - if (data['detail'] && !(typeof data['detail'] === 'string' || data['detail'] instanceof String)) { - throw new Error("Expected the field `detail` to be a primitive type in the JSON string but got " + data['detail']); - } - return true; - } - }]); -}(); -IngestErrorResponseData.RequiredProperties = ["status", "title", "detail"]; - -/** - * The http status code. - * @member {String} status - */ -IngestErrorResponseData.prototype['status'] = undefined; - -/** - * A short summary of the error. - * @member {String} title - */ -IngestErrorResponseData.prototype['title'] = undefined; - -/** - * A detailed description of the error. - * @member {String} detail - */ -IngestErrorResponseData.prototype['detail'] = undefined; -var _default = exports["default"] = IngestErrorResponseData; \ No newline at end of file diff --git a/src/model/LumaAsset.js b/src/model/LumaAsset.js deleted file mode 100644 index d00b031..0000000 --- a/src/model/LumaAsset.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The LumaAsset model module. - * @module model/LumaAsset - * @version 0.2.9 - */ -var LumaAsset = /*#__PURE__*/function () { - /** - * Constructs a new LumaAsset. - * The LumaAsset is used to create luma matte masks, transitions and effects between other assets. A luma matte is a grey scale image or animated video where the black areas are transparent and the white areas solid. The luma matte animation should be provided as an mp4 video file. The src must be a publicly accessible URL to the file. - * @alias module:model/LumaAsset - * @param type {String} The type of asset - set to `luma` for luma mattes. - * @param src {String} The luma matte source URL. The URL must be publicly accessible or include credentials. - */ - function LumaAsset(type, src) { - _classCallCheck(this, LumaAsset); - LumaAsset.initialize(this, type, src); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(LumaAsset, [{ - key: "getType", - value: - /** - * Returns The type of asset - set to `luma` for luma mattes. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset - set to `luma` for luma mattes. - * @param {String} type The type of asset - set to `luma` for luma mattes. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The luma matte source URL. The URL must be publicly accessible or include credentials. - * @return {String} - */ - }, { - key: "getSrc", - value: function getSrc() { - return this.src; - } - - /** - * Sets The luma matte source URL. The URL must be publicly accessible or include credentials. - * @param {String} src The luma matte source URL. The URL must be publicly accessible or include credentials. - */ - }, { - key: "setSrc", - value: function setSrc(src) { - this['src'] = src; - return this; - } - /** - * Returns The start trim point of the luma matte clip, in seconds (defaults to 0). Videos will start from the in trim point. A luma matte video will play until the file ends or the Clip length is reached. - * @return {Number} - */ - }, { - key: "getTrim", - value: function getTrim() { - return this.trim; - } - - /** - * Sets The start trim point of the luma matte clip, in seconds (defaults to 0). Videos will start from the in trim point. A luma matte video will play until the file ends or the Clip length is reached. - * @param {Number} trim The start trim point of the luma matte clip, in seconds (defaults to 0). Videos will start from the in trim point. A luma matte video will play until the file ends or the Clip length is reached. - */ - }, { - key: "setTrim", - value: function setTrim(trim) { - this['trim'] = trim; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, src) { - obj['type'] = type || 'luma'; - obj['src'] = src; - } - - /** - * Constructs a LumaAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/LumaAsset} obj Optional instance to populate. - * @return {module:model/LumaAsset} The populated LumaAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new LumaAsset(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('src')) { - obj['src'] = _ApiClient["default"].convertToType(data['src'], 'String'); - } - if (data.hasOwnProperty('trim')) { - obj['trim'] = _ApiClient["default"].convertToType(data['trim'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to LumaAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to LumaAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(LumaAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['src'] && !(typeof data['src'] === 'string' || data['src'] instanceof String)) { - throw new Error("Expected the field `src` to be a primitive type in the JSON string but got " + data['src']); - } - return true; - } - }]); -}(); -LumaAsset.RequiredProperties = ["type", "src"]; - -/** - * The type of asset - set to `luma` for luma mattes. - * @member {String} type - * @default 'luma' - */ -LumaAsset.prototype['type'] = 'luma'; - -/** - * The luma matte source URL. The URL must be publicly accessible or include credentials. - * @member {String} src - */ -LumaAsset.prototype['src'] = undefined; - -/** - * The start trim point of the luma matte clip, in seconds (defaults to 0). Videos will start from the in trim point. A luma matte video will play until the file ends or the Clip length is reached. - * @member {Number} trim - */ -LumaAsset.prototype['trim'] = undefined; -var _default = exports["default"] = LumaAsset; \ No newline at end of file diff --git a/src/model/MergeField.js b/src/model/MergeField.js deleted file mode 100644 index 80d8eaf..0000000 --- a/src/model/MergeField.js +++ /dev/null @@ -1,166 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The MergeField model module. - * @module model/MergeField - * @version 0.2.9 - */ -var MergeField = /*#__PURE__*/function () { - /** - * Constructs a new MergeField. - * A merge field consists of a key; `find`, and a value; `replace`. Merge fields can be used to replace placeholders within the JSON edit to create re-usable templates. Placeholders should be a string with double brace delimiters, i.e. `\"{{NAME}}\"`. A placeholder can be used for any value within the JSON edit. - * @alias module:model/MergeField - * @param find {String} The string to find without delimiters. - * @param replace {Object} The replacement value. The replacement can be any valid JSON type - string, boolean, number, etc... - */ - function MergeField(find, replace) { - _classCallCheck(this, MergeField); - MergeField.initialize(this, find, replace); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(MergeField, [{ - key: "getFind", - value: - /** - * Returns The string to find without delimiters. - * @return {String} - */ - function getFind() { - return this.find; - } - - /** - * Sets The string to find without delimiters. - * @param {String} find The string to find without delimiters. - */ - }, { - key: "setFind", - value: function setFind(find) { - this['find'] = find; - return this; - } - /** - * Returns The replacement value. The replacement can be any valid JSON type - string, boolean, number, etc... - * @return {Object} - */ - }, { - key: "getReplace", - value: function getReplace() { - return this.replace; - } - - /** - * Sets The replacement value. The replacement can be any valid JSON type - string, boolean, number, etc... - * @param {Object} replace The replacement value. The replacement can be any valid JSON type - string, boolean, number, etc... - */ - }, { - key: "setReplace", - value: function setReplace(replace) { - this['replace'] = replace; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, find, replace) { - obj['find'] = find; - obj['replace'] = replace; - } - - /** - * Constructs a MergeField from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/MergeField} obj Optional instance to populate. - * @return {module:model/MergeField} The populated MergeField instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new MergeField(); - if (data.hasOwnProperty('find')) { - obj['find'] = _ApiClient["default"].convertToType(data['find'], 'String'); - } - if (data.hasOwnProperty('replace')) { - obj['replace'] = _ApiClient["default"].convertToType(data['replace'], Object); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to MergeField. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to MergeField. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(MergeField.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['find'] && !(typeof data['find'] === 'string' || data['find'] instanceof String)) { - throw new Error("Expected the field `find` to be a primitive type in the JSON string but got " + data['find']); - } - return true; - } - }]); -}(); -MergeField.RequiredProperties = ["find", "replace"]; - -/** - * The string to find without delimiters. - * @member {String} find - */ -MergeField.prototype['find'] = undefined; - -/** - * The replacement value. The replacement can be any valid JSON type - string, boolean, number, etc... - * @member {Object} replace - */ -MergeField.prototype['replace'] = undefined; -var _default = exports["default"] = MergeField; \ No newline at end of file diff --git a/src/model/MuxDestination.js b/src/model/MuxDestination.js deleted file mode 100644 index 34cc247..0000000 --- a/src/model/MuxDestination.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _MuxDestinationOptions = _interopRequireDefault(require("./MuxDestinationOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The MuxDestination model module. - * @module model/MuxDestination - * @version 0.2.9 - */ -var MuxDestination = /*#__PURE__*/function () { - /** - * Constructs a new MuxDestination. - * Send videos to the [Mux](https://shotstack.io/docs/guide/serving-assets/destinations/mux/) video hosting and streaming service. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request. - * @alias module:model/MuxDestination - * @param provider {String} The destination to send video to - set to `mux` for Mux. - */ - function MuxDestination(provider) { - _classCallCheck(this, MuxDestination); - MuxDestination.initialize(this, provider); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(MuxDestination, [{ - key: "getProvider", - value: - /** - * Returns The destination to send video to - set to `mux` for Mux. - * @return {String} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The destination to send video to - set to `mux` for Mux. - * @param {String} provider The destination to send video to - set to `mux` for Mux. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/MuxDestinationOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/MuxDestinationOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider) { - obj['provider'] = provider || 'mux'; - } - - /** - * Constructs a MuxDestination from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/MuxDestination} obj Optional instance to populate. - * @return {module:model/MuxDestination} The populated MuxDestination instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new MuxDestination(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _MuxDestinationOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to MuxDestination. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to MuxDestination. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(MuxDestination.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _MuxDestinationOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -MuxDestination.RequiredProperties = ["provider"]; - -/** - * The destination to send video to - set to `mux` for Mux. - * @member {String} provider - * @default 'mux' - */ -MuxDestination.prototype['provider'] = 'mux'; - -/** - * @member {module:model/MuxDestinationOptions} options - */ -MuxDestination.prototype['options'] = undefined; -var _default = exports["default"] = MuxDestination; \ No newline at end of file diff --git a/src/model/MuxDestinationOptions.js b/src/model/MuxDestinationOptions.js deleted file mode 100644 index 384feb8..0000000 --- a/src/model/MuxDestinationOptions.js +++ /dev/null @@ -1,163 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The MuxDestinationOptions model module. - * @module model/MuxDestinationOptions - * @version 0.2.9 - */ -var MuxDestinationOptions = /*#__PURE__*/function () { - /** - * Constructs a new MuxDestinationOptions. - * Pass additional options to control how Mux processes video. Currently supports playback_policy and passthrough options. - * @alias module:model/MuxDestinationOptions - */ - function MuxDestinationOptions() { - _classCallCheck(this, MuxDestinationOptions); - MuxDestinationOptions.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(MuxDestinationOptions, [{ - key: "getPlaybackPolicy", - value: - /** - * Returns Sets the Mux `playback_policy` option. Value is an array of strings - use `public`, `signed`, or both. - * @return {Array.} - */ - function getPlaybackPolicy() { - return this.playbackPolicy; - } - - /** - * Sets Sets the Mux `playback_policy` option. Value is an array of strings - use `public`, `signed`, or both. - * @param {Array.} playbackPolicy Sets the Mux `playback_policy` option. Value is an array of strings - use `public`, `signed`, or both. - */ - }, { - key: "setPlaybackPolicy", - value: function setPlaybackPolicy(playbackPolicy) { - this['playbackPolicy'] = playbackPolicy; - return this; - } - /** - * Returns Sets the Mux `passthrough` option. Max 255 characters. - * @return {String} - */ - }, { - key: "getPassthrough", - value: function getPassthrough() { - return this.passthrough; - } - - /** - * Sets Sets the Mux `passthrough` option. Max 255 characters. - * @param {String} passthrough Sets the Mux `passthrough` option. Max 255 characters. - */ - }, { - key: "setPassthrough", - value: function setPassthrough(passthrough) { - this['passthrough'] = passthrough; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a MuxDestinationOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/MuxDestinationOptions} obj Optional instance to populate. - * @return {module:model/MuxDestinationOptions} The populated MuxDestinationOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new MuxDestinationOptions(); - if (data.hasOwnProperty('playbackPolicy')) { - obj['playbackPolicy'] = _ApiClient["default"].convertToType(data['playbackPolicy'], ['String']); - } - if (data.hasOwnProperty('passthrough')) { - obj['passthrough'] = _ApiClient["default"].convertToType(data['passthrough'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to MuxDestinationOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to MuxDestinationOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is an array - if (!Array.isArray(data['playbackPolicy'])) { - throw new Error("Expected the field `playbackPolicy` to be an array in the JSON data but got " + data['playbackPolicy']); - } - // ensure the json data is a string - if (data['passthrough'] && !(typeof data['passthrough'] === 'string' || data['passthrough'] instanceof String)) { - throw new Error("Expected the field `passthrough` to be a primitive type in the JSON string but got " + data['passthrough']); - } - return true; - } - }]); -}(); -/** - * Sets the Mux `playback_policy` option. Value is an array of strings - use `public`, `signed`, or both. - * @member {Array.} playbackPolicy - */ -MuxDestinationOptions.prototype['playbackPolicy'] = undefined; - -/** - * Sets the Mux `passthrough` option. Max 255 characters. - * @member {String} passthrough - */ -MuxDestinationOptions.prototype['passthrough'] = undefined; - -/** - * Allowed values for the playbackPolicy property. - * @enum {String} - * @readonly - */ -MuxDestinationOptions['PlaybackPolicyEnum'] = { - /** - * value: "public" - * @const - */ - "public": "public", - /** - * value: "signed" - * @const - */ - "signed": "signed" -}; -var _default = exports["default"] = MuxDestinationOptions; \ No newline at end of file diff --git a/src/model/Offset.js b/src/model/Offset.js deleted file mode 100644 index 9a3ab7d..0000000 --- a/src/model/Offset.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _OffsetX = _interopRequireDefault(require("./OffsetX")); -var _OffsetY = _interopRequireDefault(require("./OffsetY")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Offset model module. - * @module model/Offset - * @version 0.2.9 - */ -var Offset = /*#__PURE__*/function () { - /** - * Constructs a new Offset. - * Offsets the position of an asset horizontally or vertically by a relative distance. - * @alias module:model/Offset - */ - function Offset() { - _classCallCheck(this, Offset); - Offset.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Offset, [{ - key: "getX", - value: - /** - * @return {module:model/OffsetX} - */ - function getX() { - return this.x; - } - - /** - * @param {module:model/OffsetX} x - */ - }, { - key: "setX", - value: function setX(x) { - this['x'] = x; - return this; - } - /** - * @return {module:model/OffsetY} - */ - }, { - key: "getY", - value: function getY() { - return this.y; - } - - /** - * @param {module:model/OffsetY} y - */ - }, { - key: "setY", - value: function setY(y) { - this['y'] = y; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Offset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Offset} obj Optional instance to populate. - * @return {module:model/Offset} The populated Offset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Offset(); - if (data.hasOwnProperty('x')) { - obj['x'] = _OffsetX["default"].constructFromObject(data['x']); - } - if (data.hasOwnProperty('y')) { - obj['y'] = _OffsetY["default"].constructFromObject(data['y']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Offset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Offset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // validate the optional field `x` - if (data['x']) { - // data not null - _OffsetX["default"].validateJSON(data['x']); - } - // validate the optional field `y` - if (data['y']) { - // data not null - _OffsetY["default"].validateJSON(data['y']); - } - return true; - } - }]); -}(); -/** - * @member {module:model/OffsetX} x - */ -Offset.prototype['x'] = undefined; - -/** - * @member {module:model/OffsetY} y - */ -Offset.prototype['y'] = undefined; -var _default = exports["default"] = Offset; \ No newline at end of file diff --git a/src/model/OffsetX.js b/src/model/OffsetX.js deleted file mode 100644 index b95f547..0000000 --- a/src/model/OffsetX.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Tween = _interopRequireDefault(require("./Tween")); -var _OffsetX; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The OffsetX model module. - * @module model/OffsetX - * @version 0.2.9 - */ -var OffsetX = /*#__PURE__*/function () { - /** - * Constructs a new OffsetX. - * Offset an asset on the horizontal axis (left or right). Use a number or an array of [Tween](./#tocs_tween) objects to create a custom animation. - * @alias module:model/OffsetX - * @param {(module:model/Number|module:model/[Tween])} instance The actual instance to initialize OffsetX. - */ - function OffsetX() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, OffsetX); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // Range varies from -10 to 10. Positive numbers move the asset right, negative left. The distance moved is relative to the width of the viewport - i.e. an X offset of 0.5 will move the asset half the screen width to the right. - try { - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // An array of [Tween](./#tocs_tween) objects used to create a custom animation. Animate the X offset of an asset over time. - try { - if (typeof instance === "[Tween]") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - [_Tween["default"]].validateJSON(instance); // throw an exception if no match - // create [Tween] from JS object - this.actualInstance = [_Tween["default"]].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into [Tween] - errorMessages.push("Failed to construct [Tween]: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `OffsetX` with oneOf schemas Number, [Tween]. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `OffsetX` with oneOf schemas Number, [Tween]. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a OffsetX from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/OffsetX} obj Optional instance to populate. - * @return {module:model/OffsetX} The populated OffsetX instance. - */ - return _createClass(OffsetX, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, [Tween]. - * @return {(module:model/Number|module:model/[Tween])} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, [Tween]. - * @param {(module:model/Number|module:model/[Tween])} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = OffsetX.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new OffsetX(data); - } - }]); -}(); -_OffsetX = OffsetX; -/** - * Create an instance of OffsetX from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/OffsetX} An instance of OffsetX. - */ -_defineProperty(OffsetX, "fromJSON", function (json_string) { - return _OffsetX.constructFromObject(JSON.parse(json_string)); -}); -OffsetX.OneOf = ["Number", "[Tween]"]; -var _default = exports["default"] = OffsetX; \ No newline at end of file diff --git a/src/model/OffsetY.js b/src/model/OffsetY.js deleted file mode 100644 index 6c43033..0000000 --- a/src/model/OffsetY.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Tween = _interopRequireDefault(require("./Tween")); -var _OffsetY; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The OffsetY model module. - * @module model/OffsetY - * @version 0.2.9 - */ -var OffsetY = /*#__PURE__*/function () { - /** - * Constructs a new OffsetY. - * Offset an asset on the vertical axis (up or down). Use a number or an array of [Tween](./#tocs_tween) objects to create a custom animation. - * @alias module:model/OffsetY - * @param {(module:model/Number|module:model/[Tween])} instance The actual instance to initialize OffsetY. - */ - function OffsetY() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, OffsetY); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // Range varies from -10 to 10. Positive numbers move the asset up, negative down. The distance moved is relative to the height of the viewport - i.e. an Y offset of 0.5 will move the asset half the screen height up. - try { - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // An array of [Tween](./#tocs_tween) objects used to create a custom animation. Animate the Y offset of an asset over time. - try { - if (typeof instance === "[Tween]") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - [_Tween["default"]].validateJSON(instance); // throw an exception if no match - // create [Tween] from JS object - this.actualInstance = [_Tween["default"]].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into [Tween] - errorMessages.push("Failed to construct [Tween]: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `OffsetY` with oneOf schemas Number, [Tween]. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `OffsetY` with oneOf schemas Number, [Tween]. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a OffsetY from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/OffsetY} obj Optional instance to populate. - * @return {module:model/OffsetY} The populated OffsetY instance. - */ - return _createClass(OffsetY, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, [Tween]. - * @return {(module:model/Number|module:model/[Tween])} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, [Tween]. - * @param {(module:model/Number|module:model/[Tween])} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = OffsetY.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new OffsetY(data); - } - }]); -}(); -_OffsetY = OffsetY; -/** - * Create an instance of OffsetY from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/OffsetY} An instance of OffsetY. - */ -_defineProperty(OffsetY, "fromJSON", function (json_string) { - return _OffsetY.constructFromObject(JSON.parse(json_string)); -}); -OffsetY.OneOf = ["Number", "[Tween]"]; -var _default = exports["default"] = OffsetY; \ No newline at end of file diff --git a/src/model/OpenAiGeneratedAsset.js b/src/model/OpenAiGeneratedAsset.js deleted file mode 100644 index dadaf94..0000000 --- a/src/model/OpenAiGeneratedAsset.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _OpenAiGeneratedAssetOptions = _interopRequireDefault(require("./OpenAiGeneratedAssetOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The OpenAiGeneratedAsset model module. - * @module model/OpenAiGeneratedAsset - * @version 0.2.9 - */ -var OpenAiGeneratedAsset = /*#__PURE__*/function () { - /** - * Constructs a new OpenAiGeneratedAsset. - * Generate assets using OpenAI. OpenAI provide a text generation service using ChatGPT 3.5 and 4. The OpenAI provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/openai), not in the request. - * @alias module:model/OpenAiGeneratedAsset - * @param provider {module:model/OpenAiGeneratedAsset.ProviderEnum} The name of the provider - set to `openai` for OpenAI. - * @param options {module:model/OpenAiGeneratedAssetOptions} - */ - function OpenAiGeneratedAsset(provider, options) { - _classCallCheck(this, OpenAiGeneratedAsset); - OpenAiGeneratedAsset.initialize(this, provider, options); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(OpenAiGeneratedAsset, [{ - key: "getProvider", - value: - /** - * Returns The name of the provider - set to `openai` for OpenAI. - * @return {module:model/OpenAiGeneratedAsset.ProviderEnum} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The name of the provider - set to `openai` for OpenAI. - * @param {module:model/OpenAiGeneratedAsset.ProviderEnum} provider The name of the provider - set to `openai` for OpenAI. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/OpenAiGeneratedAssetOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/OpenAiGeneratedAssetOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider, options) { - obj['provider'] = provider || 'openai'; - obj['options'] = options; - } - - /** - * Constructs a OpenAiGeneratedAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/OpenAiGeneratedAsset} obj Optional instance to populate. - * @return {module:model/OpenAiGeneratedAsset} The populated OpenAiGeneratedAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new OpenAiGeneratedAsset(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _OpenAiGeneratedAssetOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to OpenAiGeneratedAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to OpenAiGeneratedAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(OpenAiGeneratedAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _OpenAiGeneratedAssetOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -OpenAiGeneratedAsset.RequiredProperties = ["provider", "options"]; - -/** - * The name of the provider - set to `openai` for OpenAI. - * @member {module:model/OpenAiGeneratedAsset.ProviderEnum} provider - * @default 'openai' - */ -OpenAiGeneratedAsset.prototype['provider'] = 'openai'; - -/** - * @member {module:model/OpenAiGeneratedAssetOptions} options - */ -OpenAiGeneratedAsset.prototype['options'] = undefined; - -/** - * Allowed values for the provider property. - * @enum {String} - * @readonly - */ -OpenAiGeneratedAsset['ProviderEnum'] = { - /** - * value: "openai" - * @const - */ - "openai": "openai" -}; -var _default = exports["default"] = OpenAiGeneratedAsset; \ No newline at end of file diff --git a/src/model/OpenAiGeneratedAssetOptions.js b/src/model/OpenAiGeneratedAssetOptions.js deleted file mode 100644 index af4bdf1..0000000 --- a/src/model/OpenAiGeneratedAssetOptions.js +++ /dev/null @@ -1,150 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _OpenAiTextGeneratorOptions = _interopRequireDefault(require("./OpenAiTextGeneratorOptions")); -var _OpenAiGeneratedAssetOptions; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The OpenAiGeneratedAssetOptions model module. - * @module model/OpenAiGeneratedAssetOptions - * @version 0.2.9 - */ -var OpenAiGeneratedAssetOptions = /*#__PURE__*/function () { - /** - * Constructs a new OpenAiGeneratedAssetOptions. - * Generate assets using OpenAI provider AI services. The following AI generation services are available: <ul> <li><a href=\"#tocs_openaitextgeneratoroptions\">OpenAiTextGeneratorOptions</a></li> </ul> - * @alias module:model/OpenAiGeneratedAssetOptions - * @param {(module:model/OpenAiTextGeneratorOptions)} instance The actual instance to initialize OpenAiGeneratedAssetOptions. - */ - function OpenAiGeneratedAssetOptions() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, OpenAiGeneratedAssetOptions); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - try { - if (typeof instance === "OpenAiTextGeneratorOptions") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _OpenAiTextGeneratorOptions["default"].validateJSON(instance); // throw an exception if no match - // create OpenAiTextGeneratorOptions from JS object - this.actualInstance = _OpenAiTextGeneratorOptions["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into OpenAiTextGeneratorOptions - errorMessages.push("Failed to construct OpenAiTextGeneratorOptions: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `OpenAiGeneratedAssetOptions` with oneOf schemas OpenAiTextGeneratorOptions. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `OpenAiGeneratedAssetOptions` with oneOf schemas OpenAiTextGeneratorOptions. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a OpenAiGeneratedAssetOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/OpenAiGeneratedAssetOptions} obj Optional instance to populate. - * @return {module:model/OpenAiGeneratedAssetOptions} The populated OpenAiGeneratedAssetOptions instance. - */ - return _createClass(OpenAiGeneratedAssetOptions, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be OpenAiTextGeneratorOptions. - * @return {(module:model/OpenAiTextGeneratorOptions)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be OpenAiTextGeneratorOptions. - * @param {(module:model/OpenAiTextGeneratorOptions)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = OpenAiGeneratedAssetOptions.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new OpenAiGeneratedAssetOptions(data); - } - }]); -}(); -/** - * The type of asset to generate - set to `text-generator` for text generation. - * @member {module:model/OpenAiGeneratedAssetOptions.TypeEnum} type - * @default 'text-generator' - */ -_OpenAiGeneratedAssetOptions = OpenAiGeneratedAssetOptions; -/** - * Create an instance of OpenAiGeneratedAssetOptions from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/OpenAiGeneratedAssetOptions} An instance of OpenAiGeneratedAssetOptions. - */ -_defineProperty(OpenAiGeneratedAssetOptions, "fromJSON", function (json_string) { - return _OpenAiGeneratedAssetOptions.constructFromObject(JSON.parse(json_string)); -}); -OpenAiGeneratedAssetOptions.prototype['type'] = 'text-generator'; - -/** - * The text prompt to generate text from. - * @member {String} prompt - */ -OpenAiGeneratedAssetOptions.prototype['prompt'] = undefined; - -/** - * The model to use for generating the text. Select from the list of available models:
  • `gpt-3.5-turbo`
  • `gpt-4`
- * @member {module:model/OpenAiGeneratedAssetOptions.ModelEnum} model - */ -OpenAiGeneratedAssetOptions.prototype['model'] = undefined; - -/** - * The system prompt to use for generating the text. This is an optional prompt that can be used to provide context or additional information to the model. - * @member {String} systemPrompt - */ -OpenAiGeneratedAssetOptions.prototype['systemPrompt'] = undefined; -OpenAiGeneratedAssetOptions.OneOf = ["OpenAiTextGeneratorOptions"]; -var _default = exports["default"] = OpenAiGeneratedAssetOptions; \ No newline at end of file diff --git a/src/model/OpenAiTextGeneratorOptions.js b/src/model/OpenAiTextGeneratorOptions.js deleted file mode 100644 index 1d3a226..0000000 --- a/src/model/OpenAiTextGeneratorOptions.js +++ /dev/null @@ -1,270 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The OpenAiTextGeneratorOptions model module. - * @module model/OpenAiTextGeneratorOptions - * @version 0.2.9 - */ -var OpenAiTextGeneratorOptions = /*#__PURE__*/function () { - /** - * Constructs a new OpenAiTextGeneratorOptions. - * Options for the OpenAI text-generator service. Set a text prompt that will be used to generate a new body of text. The output will be generated as a text (txt) file available at the URL returned in the response. - * @alias module:model/OpenAiTextGeneratorOptions - * @param type {module:model/OpenAiTextGeneratorOptions.TypeEnum} The type of asset to generate - set to `text-generator` for text generation. - * @param prompt {String} The text prompt to generate text from. - * @param model {module:model/OpenAiTextGeneratorOptions.ModelEnum} The model to use for generating the text. Select from the list of available models:
  • `gpt-3.5-turbo`
  • `gpt-4`
- */ - function OpenAiTextGeneratorOptions(type, prompt, model) { - _classCallCheck(this, OpenAiTextGeneratorOptions); - OpenAiTextGeneratorOptions.initialize(this, type, prompt, model); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(OpenAiTextGeneratorOptions, [{ - key: "getType", - value: - /** - * Returns The type of asset to generate - set to `text-generator` for text generation. - * @return {module:model/OpenAiTextGeneratorOptions.TypeEnum} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset to generate - set to `text-generator` for text generation. - * @param {module:model/OpenAiTextGeneratorOptions.TypeEnum} type The type of asset to generate - set to `text-generator` for text generation. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The text prompt to generate text from. - * @return {String} - */ - }, { - key: "getPrompt", - value: function getPrompt() { - return this.prompt; - } - - /** - * Sets The text prompt to generate text from. - * @param {String} prompt The text prompt to generate text from. - */ - }, { - key: "setPrompt", - value: function setPrompt(prompt) { - this['prompt'] = prompt; - return this; - } - /** - * Returns The model to use for generating the text. Select from the list of available models:
  • `gpt-3.5-turbo`
  • `gpt-4`
- * @return {module:model/OpenAiTextGeneratorOptions.ModelEnum} - */ - }, { - key: "getModel", - value: function getModel() { - return this.model; - } - - /** - * Sets The model to use for generating the text. Select from the list of available models:
  • `gpt-3.5-turbo`
  • `gpt-4`
- * @param {module:model/OpenAiTextGeneratorOptions.ModelEnum} model The model to use for generating the text. Select from the list of available models:
  • `gpt-3.5-turbo`
  • `gpt-4`
- */ - }, { - key: "setModel", - value: function setModel(model) { - this['model'] = model; - return this; - } - /** - * Returns The system prompt to use for generating the text. This is an optional prompt that can be used to provide context or additional information to the model. - * @return {String} - */ - }, { - key: "getSystemPrompt", - value: function getSystemPrompt() { - return this.systemPrompt; - } - - /** - * Sets The system prompt to use for generating the text. This is an optional prompt that can be used to provide context or additional information to the model. - * @param {String} systemPrompt The system prompt to use for generating the text. This is an optional prompt that can be used to provide context or additional information to the model. - */ - }, { - key: "setSystemPrompt", - value: function setSystemPrompt(systemPrompt) { - this['systemPrompt'] = systemPrompt; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, prompt, model) { - obj['type'] = type || 'text-generator'; - obj['prompt'] = prompt; - obj['model'] = model; - } - - /** - * Constructs a OpenAiTextGeneratorOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/OpenAiTextGeneratorOptions} obj Optional instance to populate. - * @return {module:model/OpenAiTextGeneratorOptions} The populated OpenAiTextGeneratorOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new OpenAiTextGeneratorOptions(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('prompt')) { - obj['prompt'] = _ApiClient["default"].convertToType(data['prompt'], 'String'); - } - if (data.hasOwnProperty('model')) { - obj['model'] = _ApiClient["default"].convertToType(data['model'], 'String'); - } - if (data.hasOwnProperty('systemPrompt')) { - obj['systemPrompt'] = _ApiClient["default"].convertToType(data['systemPrompt'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to OpenAiTextGeneratorOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to OpenAiTextGeneratorOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(OpenAiTextGeneratorOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['prompt'] && !(typeof data['prompt'] === 'string' || data['prompt'] instanceof String)) { - throw new Error("Expected the field `prompt` to be a primitive type in the JSON string but got " + data['prompt']); - } - // ensure the json data is a string - if (data['model'] && !(typeof data['model'] === 'string' || data['model'] instanceof String)) { - throw new Error("Expected the field `model` to be a primitive type in the JSON string but got " + data['model']); - } - // ensure the json data is a string - if (data['systemPrompt'] && !(typeof data['systemPrompt'] === 'string' || data['systemPrompt'] instanceof String)) { - throw new Error("Expected the field `systemPrompt` to be a primitive type in the JSON string but got " + data['systemPrompt']); - } - return true; - } - }]); -}(); -OpenAiTextGeneratorOptions.RequiredProperties = ["type", "prompt", "model"]; - -/** - * The type of asset to generate - set to `text-generator` for text generation. - * @member {module:model/OpenAiTextGeneratorOptions.TypeEnum} type - * @default 'text-generator' - */ -OpenAiTextGeneratorOptions.prototype['type'] = 'text-generator'; - -/** - * The text prompt to generate text from. - * @member {String} prompt - */ -OpenAiTextGeneratorOptions.prototype['prompt'] = undefined; - -/** - * The model to use for generating the text. Select from the list of available models:
  • `gpt-3.5-turbo`
  • `gpt-4`
- * @member {module:model/OpenAiTextGeneratorOptions.ModelEnum} model - */ -OpenAiTextGeneratorOptions.prototype['model'] = undefined; - -/** - * The system prompt to use for generating the text. This is an optional prompt that can be used to provide context or additional information to the model. - * @member {String} systemPrompt - */ -OpenAiTextGeneratorOptions.prototype['systemPrompt'] = undefined; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -OpenAiTextGeneratorOptions['TypeEnum'] = { - /** - * value: "text-generator" - * @const - */ - "text-generator": "text-generator" -}; - -/** - * Allowed values for the model property. - * @enum {String} - * @readonly - */ -OpenAiTextGeneratorOptions['ModelEnum'] = { - /** - * value: "gpt-3.5-turbo" - * @const - */ - "3.5-turbo": "gpt-3.5-turbo", - /** - * value: "gpt-4" - * @const - */ - "4": "gpt-4" -}; -var _default = exports["default"] = OpenAiTextGeneratorOptions; \ No newline at end of file diff --git a/src/model/Output.js b/src/model/Output.js deleted file mode 100644 index dacd79f..0000000 --- a/src/model/Output.js +++ /dev/null @@ -1,771 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Destinations = _interopRequireDefault(require("./Destinations")); -var _Poster = _interopRequireDefault(require("./Poster")); -var _Range = _interopRequireDefault(require("./Range")); -var _Size = _interopRequireDefault(require("./Size")); -var _Thumbnail = _interopRequireDefault(require("./Thumbnail")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Output model module. - * @module model/Output - * @version 0.2.9 - */ -var Output = /*#__PURE__*/function () { - /** - * Constructs a new Output. - * The output format, render range and type of media to generate. - * @alias module:model/Output - * @param format {module:model/Output.FormatEnum} The output format and type of media file to generate.
  • `mp4` - mp4 video file
  • `gif` - animated gif
  • `jpg` - jpg image file
  • `png` - png image file
  • `bmp` - bmp image file
  • `mp3` - mp3 audio file (audio only)
- */ - function Output(format) { - _classCallCheck(this, Output); - Output.initialize(this, format); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Output, [{ - key: "getFormat", - value: - /** - * Returns The output format and type of media file to generate.
  • `mp4` - mp4 video file
  • `gif` - animated gif
  • `jpg` - jpg image file
  • `png` - png image file
  • `bmp` - bmp image file
  • `mp3` - mp3 audio file (audio only)
- * @return {module:model/Output.FormatEnum} - */ - function getFormat() { - return this.format; - } - - /** - * Sets The output format and type of media file to generate.
  • `mp4` - mp4 video file
  • `gif` - animated gif
  • `jpg` - jpg image file
  • `png` - png image file
  • `bmp` - bmp image file
  • `mp3` - mp3 audio file (audio only)
- * @param {module:model/Output.FormatEnum} format The output format and type of media file to generate.
  • `mp4` - mp4 video file
  • `gif` - animated gif
  • `jpg` - jpg image file
  • `png` - png image file
  • `bmp` - bmp image file
  • `mp3` - mp3 audio file (audio only)
- */ - }, { - key: "setFormat", - value: function setFormat(format) { - this['format'] = format; - return this; - } - /** - * Returns The preset output resolution of the video or image. For custom sizes use the `size` property.
  • `preview` - 512px x 288px @ 15fps
  • `mobile` - 640px x 360px @ 25fps
  • `sd` - 1024px x 576px @ 25fps
  • `hd` - 1280px x 720px @ 25fps
  • `1080` - 1920px x 1080px @ 25fps
  • `4k` - 3840px x 2160px @ 25fps
- * @return {module:model/Output.ResolutionEnum} - */ - }, { - key: "getResolution", - value: function getResolution() { - return this.resolution; - } - - /** - * Sets The preset output resolution of the video or image. For custom sizes use the `size` property.
  • `preview` - 512px x 288px @ 15fps
  • `mobile` - 640px x 360px @ 25fps
  • `sd` - 1024px x 576px @ 25fps
  • `hd` - 1280px x 720px @ 25fps
  • `1080` - 1920px x 1080px @ 25fps
  • `4k` - 3840px x 2160px @ 25fps
- * @param {module:model/Output.ResolutionEnum} resolution The preset output resolution of the video or image. For custom sizes use the `size` property.
  • `preview` - 512px x 288px @ 15fps
  • `mobile` - 640px x 360px @ 25fps
  • `sd` - 1024px x 576px @ 25fps
  • `hd` - 1280px x 720px @ 25fps
  • `1080` - 1920px x 1080px @ 25fps
  • `4k` - 3840px x 2160px @ 25fps
- */ - }, { - key: "setResolution", - value: function setResolution(resolution) { - this['resolution'] = resolution; - return this; - } - /** - * Returns The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are:
  • `16:9` (default) - regular landscape/horizontal aspect ratio
  • `9:16` - vertical/portrait aspect ratio
  • `1:1` - square aspect ratio
  • `4:5` - short vertical/portrait aspect ratio
  • `4:3` - legacy TV aspect ratio
- * @return {module:model/Output.AspectRatioEnum} - */ - }, { - key: "getAspectRatio", - value: function getAspectRatio() { - return this.aspectRatio; - } - - /** - * Sets The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are:
  • `16:9` (default) - regular landscape/horizontal aspect ratio
  • `9:16` - vertical/portrait aspect ratio
  • `1:1` - square aspect ratio
  • `4:5` - short vertical/portrait aspect ratio
  • `4:3` - legacy TV aspect ratio
- * @param {module:model/Output.AspectRatioEnum} aspectRatio The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are:
  • `16:9` (default) - regular landscape/horizontal aspect ratio
  • `9:16` - vertical/portrait aspect ratio
  • `1:1` - square aspect ratio
  • `4:5` - short vertical/portrait aspect ratio
  • `4:3` - legacy TV aspect ratio
- */ - }, { - key: "setAspectRatio", - value: function setAspectRatio(aspectRatio) { - this['aspectRatio'] = aspectRatio; - return this; - } - /** - * @return {module:model/Size} - */ - }, { - key: "getSize", - value: function getSize() { - return this.size; - } - - /** - * @param {module:model/Size} size - */ - }, { - key: "setSize", - value: function setSize(size) { - this['size'] = size; - return this; - } - /** - * Returns Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps.
  • `12` - 12fps
  • `15` - 15fps
  • `24` - 24fps
  • `23.976` - 23.976fps
  • `25` (default) - 25fps
  • `29.97` - 29.97fps
  • `30` - 30fps
  • `48` - 48fps
  • `50` - 50fps
  • `59.94` - 59.94fps
  • `60` - 60fps
- * @return {module:model/Output.FpsEnum} - */ - }, { - key: "getFps", - value: function getFps() { - return this.fps; - } - - /** - * Sets Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps.
  • `12` - 12fps
  • `15` - 15fps
  • `24` - 24fps
  • `23.976` - 23.976fps
  • `25` (default) - 25fps
  • `29.97` - 29.97fps
  • `30` - 30fps
  • `48` - 48fps
  • `50` - 50fps
  • `59.94` - 59.94fps
  • `60` - 60fps
- * @param {module:model/Output.FpsEnum} fps Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps.
  • `12` - 12fps
  • `15` - 15fps
  • `24` - 24fps
  • `23.976` - 23.976fps
  • `25` (default) - 25fps
  • `29.97` - 29.97fps
  • `30` - 30fps
  • `48` - 48fps
  • `50` - 50fps
  • `59.94` - 59.94fps
  • `60` - 60fps
- */ - }, { - key: "setFps", - value: function setFps(fps) { - this['fps'] = fps; - return this; - } - /** - * Returns Override the resolution and scale the video or image to render at a different size. When using scaleTo the asset should be edited at the resolution dimensions, i.e. use font sizes that look best at HD, then use scaleTo to output the file at SD and the text will be scaled to the correct size. This is useful if you want to create multiple asset sizes.
  • `preview` - 512px x 288px @ 15fps
  • `mobile` - 640px x 360px @ 25fps
  • `sd` - 1024px x 576px @25fps
  • `hd` - 1280px x 720px @25fps
  • `1080` - 1920px x 1080px @25fps
- * @return {module:model/Output.ScaleToEnum} - */ - }, { - key: "getScaleTo", - value: function getScaleTo() { - return this.scaleTo; - } - - /** - * Sets Override the resolution and scale the video or image to render at a different size. When using scaleTo the asset should be edited at the resolution dimensions, i.e. use font sizes that look best at HD, then use scaleTo to output the file at SD and the text will be scaled to the correct size. This is useful if you want to create multiple asset sizes.
  • `preview` - 512px x 288px @ 15fps
  • `mobile` - 640px x 360px @ 25fps
  • `sd` - 1024px x 576px @25fps
  • `hd` - 1280px x 720px @25fps
  • `1080` - 1920px x 1080px @25fps
- * @param {module:model/Output.ScaleToEnum} scaleTo Override the resolution and scale the video or image to render at a different size. When using scaleTo the asset should be edited at the resolution dimensions, i.e. use font sizes that look best at HD, then use scaleTo to output the file at SD and the text will be scaled to the correct size. This is useful if you want to create multiple asset sizes.
  • `preview` - 512px x 288px @ 15fps
  • `mobile` - 640px x 360px @ 25fps
  • `sd` - 1024px x 576px @25fps
  • `hd` - 1280px x 720px @25fps
  • `1080` - 1920px x 1080px @25fps
- */ - }, { - key: "setScaleTo", - value: function setScaleTo(scaleTo) { - this['scaleTo'] = scaleTo; - return this; - } - /** - * Returns Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors.
  • `verylow` - reduced quality, smallest file size
  • `low` - slightly reduced quality, smaller file size
  • `medium` (default) - optimized quality, render speeds and file size
  • `high` - slightly increased quality, larger file size
  • `veryhigh` - highest quality, largest file size
- * @return {module:model/Output.QualityEnum} - */ - }, { - key: "getQuality", - value: function getQuality() { - return this.quality; - } - - /** - * Sets Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors.
  • `verylow` - reduced quality, smallest file size
  • `low` - slightly reduced quality, smaller file size
  • `medium` (default) - optimized quality, render speeds and file size
  • `high` - slightly increased quality, larger file size
  • `veryhigh` - highest quality, largest file size
- * @param {module:model/Output.QualityEnum} quality Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors.
  • `verylow` - reduced quality, smallest file size
  • `low` - slightly reduced quality, smaller file size
  • `medium` (default) - optimized quality, render speeds and file size
  • `high` - slightly increased quality, larger file size
  • `veryhigh` - highest quality, largest file size
- */ - }, { - key: "setQuality", - value: function setQuality(quality) { - this['quality'] = quality; - return this; - } - /** - * Returns Loop settings for gif files. Set to `true` to loop, `false` to play only once. - * @return {Boolean} - */ - }, { - key: "getRepeat", - value: function getRepeat() { - return this.repeat; - } - - /** - * Sets Loop settings for gif files. Set to `true` to loop, `false` to play only once. - * @param {Boolean} repeat Loop settings for gif files. Set to `true` to loop, `false` to play only once. - */ - }, { - key: "setRepeat", - value: function setRepeat(repeat) { - this['repeat'] = repeat; - return this; - } - /** - * Returns Mute the audio track of the output video. Set to `true` to mute, `false` to un-mute. - * @return {Boolean} - */ - }, { - key: "getMute", - value: function getMute() { - return this.mute; - } - - /** - * Sets Mute the audio track of the output video. Set to `true` to mute, `false` to un-mute. - * @param {Boolean} mute Mute the audio track of the output video. Set to `true` to mute, `false` to un-mute. - */ - }, { - key: "setMute", - value: function setMute(mute) { - this['mute'] = mute; - return this; - } - /** - * @return {module:model/Range} - */ - }, { - key: "getRange", - value: function getRange() { - return this.range; - } - - /** - * @param {module:model/Range} range - */ - }, { - key: "setRange", - value: function setRange(range) { - this['range'] = range; - return this; - } - /** - * @return {module:model/Poster} - */ - }, { - key: "getPoster", - value: function getPoster() { - return this.poster; - } - - /** - * @param {module:model/Poster} poster - */ - }, { - key: "setPoster", - value: function setPoster(poster) { - this['poster'] = poster; - return this; - } - /** - * @return {module:model/Thumbnail} - */ - }, { - key: "getThumbnail", - value: function getThumbnail() { - return this.thumbnail; - } - - /** - * @param {module:model/Thumbnail} thumbnail - */ - }, { - key: "setThumbnail", - value: function setThumbnail(thumbnail) { - this['thumbnail'] = thumbnail; - return this; - } - /** - * Returns Specify the storage locations and hosting services to send rendered videos to. - * @return {Array.} - */ - }, { - key: "getDestinations", - value: function getDestinations() { - return this.destinations; - } - - /** - * Sets Specify the storage locations and hosting services to send rendered videos to. - * @param {Array.} destinations Specify the storage locations and hosting services to send rendered videos to. - */ - }, { - key: "setDestinations", - value: function setDestinations(destinations) { - this['destinations'] = destinations; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, format) { - obj['format'] = format; - } - - /** - * Constructs a Output from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Output} obj Optional instance to populate. - * @return {module:model/Output} The populated Output instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Output(); - if (data.hasOwnProperty('format')) { - obj['format'] = _ApiClient["default"].convertToType(data['format'], 'String'); - } - if (data.hasOwnProperty('resolution')) { - obj['resolution'] = _ApiClient["default"].convertToType(data['resolution'], 'String'); - } - if (data.hasOwnProperty('aspectRatio')) { - obj['aspectRatio'] = _ApiClient["default"].convertToType(data['aspectRatio'], 'String'); - } - if (data.hasOwnProperty('size')) { - obj['size'] = _Size["default"].constructFromObject(data['size']); - } - if (data.hasOwnProperty('fps')) { - obj['fps'] = _ApiClient["default"].convertToType(data['fps'], 'Number'); - } - if (data.hasOwnProperty('scaleTo')) { - obj['scaleTo'] = _ApiClient["default"].convertToType(data['scaleTo'], 'String'); - } - if (data.hasOwnProperty('quality')) { - obj['quality'] = _ApiClient["default"].convertToType(data['quality'], 'String'); - } - if (data.hasOwnProperty('repeat')) { - obj['repeat'] = _ApiClient["default"].convertToType(data['repeat'], 'Boolean'); - } - if (data.hasOwnProperty('mute')) { - obj['mute'] = _ApiClient["default"].convertToType(data['mute'], 'Boolean'); - } - if (data.hasOwnProperty('range')) { - obj['range'] = _Range["default"].constructFromObject(data['range']); - } - if (data.hasOwnProperty('poster')) { - obj['poster'] = _Poster["default"].constructFromObject(data['poster']); - } - if (data.hasOwnProperty('thumbnail')) { - obj['thumbnail'] = _Thumbnail["default"].constructFromObject(data['thumbnail']); - } - if (data.hasOwnProperty('destinations')) { - obj['destinations'] = _ApiClient["default"].convertToType(data['destinations'], [_Destinations["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Output. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Output. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Output.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['format'] && !(typeof data['format'] === 'string' || data['format'] instanceof String)) { - throw new Error("Expected the field `format` to be a primitive type in the JSON string but got " + data['format']); - } - // ensure the json data is a string - if (data['resolution'] && !(typeof data['resolution'] === 'string' || data['resolution'] instanceof String)) { - throw new Error("Expected the field `resolution` to be a primitive type in the JSON string but got " + data['resolution']); - } - // ensure the json data is a string - if (data['aspectRatio'] && !(typeof data['aspectRatio'] === 'string' || data['aspectRatio'] instanceof String)) { - throw new Error("Expected the field `aspectRatio` to be a primitive type in the JSON string but got " + data['aspectRatio']); - } - // validate the optional field `size` - if (data['size']) { - // data not null - _Size["default"].validateJSON(data['size']); - } - // ensure the json data is a string - if (data['scaleTo'] && !(typeof data['scaleTo'] === 'string' || data['scaleTo'] instanceof String)) { - throw new Error("Expected the field `scaleTo` to be a primitive type in the JSON string but got " + data['scaleTo']); - } - // ensure the json data is a string - if (data['quality'] && !(typeof data['quality'] === 'string' || data['quality'] instanceof String)) { - throw new Error("Expected the field `quality` to be a primitive type in the JSON string but got " + data['quality']); - } - // validate the optional field `range` - if (data['range']) { - // data not null - _Range["default"].validateJSON(data['range']); - } - // validate the optional field `poster` - if (data['poster']) { - // data not null - _Poster["default"].validateJSON(data['poster']); - } - // validate the optional field `thumbnail` - if (data['thumbnail']) { - // data not null - _Thumbnail["default"].validateJSON(data['thumbnail']); - } - if (data['destinations']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['destinations'])) { - throw new Error("Expected the field `destinations` to be an array in the JSON data but got " + data['destinations']); - } - // validate the optional field `destinations` (array) - var _iterator2 = _createForOfIteratorHelper(data['destinations']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _Destinations["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - return true; - } - }]); -}(); -Output.RequiredProperties = ["format"]; - -/** - * The output format and type of media file to generate.
  • `mp4` - mp4 video file
  • `gif` - animated gif
  • `jpg` - jpg image file
  • `png` - png image file
  • `bmp` - bmp image file
  • `mp3` - mp3 audio file (audio only)
- * @member {module:model/Output.FormatEnum} format - */ -Output.prototype['format'] = undefined; - -/** - * The preset output resolution of the video or image. For custom sizes use the `size` property.
  • `preview` - 512px x 288px @ 15fps
  • `mobile` - 640px x 360px @ 25fps
  • `sd` - 1024px x 576px @ 25fps
  • `hd` - 1280px x 720px @ 25fps
  • `1080` - 1920px x 1080px @ 25fps
  • `4k` - 3840px x 2160px @ 25fps
- * @member {module:model/Output.ResolutionEnum} resolution - */ -Output.prototype['resolution'] = undefined; - -/** - * The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are:
  • `16:9` (default) - regular landscape/horizontal aspect ratio
  • `9:16` - vertical/portrait aspect ratio
  • `1:1` - square aspect ratio
  • `4:5` - short vertical/portrait aspect ratio
  • `4:3` - legacy TV aspect ratio
- * @member {module:model/Output.AspectRatioEnum} aspectRatio - */ -Output.prototype['aspectRatio'] = undefined; - -/** - * @member {module:model/Size} size - */ -Output.prototype['size'] = undefined; - -/** - * Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps.
  • `12` - 12fps
  • `15` - 15fps
  • `24` - 24fps
  • `23.976` - 23.976fps
  • `25` (default) - 25fps
  • `29.97` - 29.97fps
  • `30` - 30fps
  • `48` - 48fps
  • `50` - 50fps
  • `59.94` - 59.94fps
  • `60` - 60fps
- * @member {module:model/Output.FpsEnum} fps - */ -Output.prototype['fps'] = undefined; - -/** - * Override the resolution and scale the video or image to render at a different size. When using scaleTo the asset should be edited at the resolution dimensions, i.e. use font sizes that look best at HD, then use scaleTo to output the file at SD and the text will be scaled to the correct size. This is useful if you want to create multiple asset sizes.
  • `preview` - 512px x 288px @ 15fps
  • `mobile` - 640px x 360px @ 25fps
  • `sd` - 1024px x 576px @25fps
  • `hd` - 1280px x 720px @25fps
  • `1080` - 1920px x 1080px @25fps
- * @member {module:model/Output.ScaleToEnum} scaleTo - */ -Output.prototype['scaleTo'] = undefined; - -/** - * Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors.
  • `verylow` - reduced quality, smallest file size
  • `low` - slightly reduced quality, smaller file size
  • `medium` (default) - optimized quality, render speeds and file size
  • `high` - slightly increased quality, larger file size
  • `veryhigh` - highest quality, largest file size
- * @member {module:model/Output.QualityEnum} quality - */ -Output.prototype['quality'] = undefined; - -/** - * Loop settings for gif files. Set to `true` to loop, `false` to play only once. - * @member {Boolean} repeat - */ -Output.prototype['repeat'] = undefined; - -/** - * Mute the audio track of the output video. Set to `true` to mute, `false` to un-mute. - * @member {Boolean} mute - */ -Output.prototype['mute'] = undefined; - -/** - * @member {module:model/Range} range - */ -Output.prototype['range'] = undefined; - -/** - * @member {module:model/Poster} poster - */ -Output.prototype['poster'] = undefined; - -/** - * @member {module:model/Thumbnail} thumbnail - */ -Output.prototype['thumbnail'] = undefined; - -/** - * Specify the storage locations and hosting services to send rendered videos to. - * @member {Array.} destinations - */ -Output.prototype['destinations'] = undefined; - -/** - * Allowed values for the format property. - * @enum {String} - * @readonly - */ -Output['FormatEnum'] = { - /** - * value: "mp4" - * @const - */ - "mp4": "mp4", - /** - * value: "gif" - * @const - */ - "gif": "gif", - /** - * value: "mp3" - * @const - */ - "mp3": "mp3", - /** - * value: "jpg" - * @const - */ - "jpg": "jpg", - /** - * value: "png" - * @const - */ - "png": "png", - /** - * value: "bmp" - * @const - */ - "bmp": "bmp" -}; - -/** - * Allowed values for the resolution property. - * @enum {String} - * @readonly - */ -Output['ResolutionEnum'] = { - /** - * value: "preview" - * @const - */ - "preview": "preview", - /** - * value: "mobile" - * @const - */ - "mobile": "mobile", - /** - * value: "sd" - * @const - */ - "sd": "sd", - /** - * value: "hd" - * @const - */ - "hd": "hd", - /** - * value: "1080" - * @const - */ - "1080": "1080", - /** - * value: "4k" - * @const - */ - "4k": "4k" -}; - -/** - * Allowed values for the aspectRatio property. - * @enum {String} - * @readonly - */ -Output['AspectRatioEnum'] = { - /** - * value: "16:9" - * @const - */ - "16:9": "16:9", - /** - * value: "9:16" - * @const - */ - "9:16": "9:16", - /** - * value: "1:1" - * @const - */ - "1:1": "1:1", - /** - * value: "4:5" - * @const - */ - "4:5": "4:5", - /** - * value: "4:3" - * @const - */ - "4:3": "4:3" -}; - -/** - * Allowed values for the fps property. - * @enum {Number} - * @readonly - */ -Output['FpsEnum'] = { - /** - * value: 12 - * @const - */ - "12": 12, - /** - * value: 15 - * @const - */ - "15": 15, - /** - * value: 23.976 - * @const - */ - "23.976": 23.976, - /** - * value: 24 - * @const - */ - "24": 24, - /** - * value: 25 - * @const - */ - "25": 25, - /** - * value: 29.97 - * @const - */ - "29.97": 29.97, - /** - * value: 30 - * @const - */ - "30": 30, - /** - * value: 48 - * @const - */ - "48": 48, - /** - * value: 50 - * @const - */ - "50": 50, - /** - * value: 59.94 - * @const - */ - "59.94": 59.94, - /** - * value: 60 - * @const - */ - "60": 60 -}; - -/** - * Allowed values for the scaleTo property. - * @enum {String} - * @readonly - */ -Output['ScaleToEnum'] = { - /** - * value: "preview" - * @const - */ - "preview": "preview", - /** - * value: "mobile" - * @const - */ - "mobile": "mobile", - /** - * value: "sd" - * @const - */ - "sd": "sd", - /** - * value: "hd" - * @const - */ - "hd": "hd", - /** - * value: "1080" - * @const - */ - "1080": "1080" -}; - -/** - * Allowed values for the quality property. - * @enum {String} - * @readonly - */ -Output['QualityEnum'] = { - /** - * value: "verylow" - * @const - */ - "verylow": "verylow", - /** - * value: "low" - * @const - */ - "low": "low", - /** - * value: "medium" - * @const - */ - "medium": "medium", - /** - * value: "high" - * @const - */ - "high": "high", - /** - * value: "veryhigh" - * @const - */ - "veryhigh": "veryhigh" -}; -var _default = exports["default"] = Output; \ No newline at end of file diff --git a/src/model/Outputs.js b/src/model/Outputs.js deleted file mode 100644 index 0587ef0..0000000 --- a/src/model/Outputs.js +++ /dev/null @@ -1,165 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Rendition = _interopRequireDefault(require("./Rendition")); -var _Transcription = _interopRequireDefault(require("./Transcription")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Outputs model module. - * @module model/Outputs - * @version 0.2.9 - */ -var Outputs = /*#__PURE__*/function () { - /** - * Constructs a new Outputs. - * The output renditions and transformations that should be generated from the source file. - * @alias module:model/Outputs - */ - function Outputs() { - _classCallCheck(this, Outputs); - Outputs.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Outputs, [{ - key: "getRenditions", - value: - /** - * Returns The output renditions and transformations that should be generated from the source file. - * @return {Array.} - */ - function getRenditions() { - return this.renditions; - } - - /** - * Sets The output renditions and transformations that should be generated from the source file. - * @param {Array.} renditions The output renditions and transformations that should be generated from the source file. - */ - }, { - key: "setRenditions", - value: function setRenditions(renditions) { - this['renditions'] = renditions; - return this; - } - /** - * @return {module:model/Transcription} - */ - }, { - key: "getTranscription", - value: function getTranscription() { - return this.transcription; - } - - /** - * @param {module:model/Transcription} transcription - */ - }, { - key: "setTranscription", - value: function setTranscription(transcription) { - this['transcription'] = transcription; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Outputs from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Outputs} obj Optional instance to populate. - * @return {module:model/Outputs} The populated Outputs instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Outputs(); - if (data.hasOwnProperty('renditions')) { - obj['renditions'] = _ApiClient["default"].convertToType(data['renditions'], [_Rendition["default"]]); - } - if (data.hasOwnProperty('transcription')) { - obj['transcription'] = _Transcription["default"].constructFromObject(data['transcription']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Outputs. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Outputs. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - if (data['renditions']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['renditions'])) { - throw new Error("Expected the field `renditions` to be an array in the JSON data but got " + data['renditions']); - } - // validate the optional field `renditions` (array) - var _iterator = _createForOfIteratorHelper(data['renditions']), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var item = _step.value; - _Rendition["default"].validateJSON(item); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - ; - } - // validate the optional field `transcription` - if (data['transcription']) { - // data not null - _Transcription["default"].validateJSON(data['transcription']); - } - return true; - } - }]); -}(); -/** - * The output renditions and transformations that should be generated from the source file. - * @member {Array.} renditions - */ -Outputs.prototype['renditions'] = undefined; - -/** - * @member {module:model/Transcription} transcription - */ -Outputs.prototype['transcription'] = undefined; -var _default = exports["default"] = Outputs; \ No newline at end of file diff --git a/src/model/OutputsResponse.js b/src/model/OutputsResponse.js deleted file mode 100644 index 43fd6ad..0000000 --- a/src/model/OutputsResponse.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _RenditionResponseAttributes = _interopRequireDefault(require("./RenditionResponseAttributes")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The OutputsResponse model module. - * @module model/OutputsResponse - * @version 0.2.9 - */ -var OutputsResponse = /*#__PURE__*/function () { - /** - * Constructs a new OutputsResponse. - * The list of outputs generated from the source file. Currently supports renditions which are versions of the source file with different transformations applied. - * @alias module:model/OutputsResponse - */ - function OutputsResponse() { - _classCallCheck(this, OutputsResponse); - OutputsResponse.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(OutputsResponse, [{ - key: "getRenditions", - value: - /** - * Returns The list of renditions generated from the source file. - * @return {Array.} - */ - function getRenditions() { - return this.renditions; - } - - /** - * Sets The list of renditions generated from the source file. - * @param {Array.} renditions The list of renditions generated from the source file. - */ - }, { - key: "setRenditions", - value: function setRenditions(renditions) { - this['renditions'] = renditions; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a OutputsResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/OutputsResponse} obj Optional instance to populate. - * @return {module:model/OutputsResponse} The populated OutputsResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new OutputsResponse(); - if (data.hasOwnProperty('renditions')) { - obj['renditions'] = _ApiClient["default"].convertToType(data['renditions'], [_RenditionResponseAttributes["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to OutputsResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to OutputsResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - if (data['renditions']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['renditions'])) { - throw new Error("Expected the field `renditions` to be an array in the JSON data but got " + data['renditions']); - } - // validate the optional field `renditions` (array) - var _iterator = _createForOfIteratorHelper(data['renditions']), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var item = _step.value; - _RenditionResponseAttributes["default"].validateJSON(item); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - ; - } - return true; - } - }]); -}(); -/** - * The list of renditions generated from the source file. - * @member {Array.} renditions - */ -OutputsResponse.prototype['renditions'] = undefined; -var _default = exports["default"] = OutputsResponse; \ No newline at end of file diff --git a/src/model/Poster.js b/src/model/Poster.js deleted file mode 100644 index a1881d2..0000000 --- a/src/model/Poster.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Poster model module. - * @module model/Poster - * @version 0.2.9 - */ -var Poster = /*#__PURE__*/function () { - /** - * Constructs a new Poster. - * Generate a poster image for the video at a specific point from the timeline. The poster image size will match the size of the output video. - * @alias module:model/Poster - * @param capture {Number} The point on the timeline in seconds to capture a single frame to use as the poster image. - */ - function Poster(capture) { - _classCallCheck(this, Poster); - Poster.initialize(this, capture); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Poster, [{ - key: "getCapture", - value: - /** - * Returns The point on the timeline in seconds to capture a single frame to use as the poster image. - * @return {Number} - */ - function getCapture() { - return this.capture; - } - - /** - * Sets The point on the timeline in seconds to capture a single frame to use as the poster image. - * @param {Number} capture The point on the timeline in seconds to capture a single frame to use as the poster image. - */ - }, { - key: "setCapture", - value: function setCapture(capture) { - this['capture'] = capture; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, capture) { - obj['capture'] = capture; - } - - /** - * Constructs a Poster from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Poster} obj Optional instance to populate. - * @return {module:model/Poster} The populated Poster instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Poster(); - if (data.hasOwnProperty('capture')) { - obj['capture'] = _ApiClient["default"].convertToType(data['capture'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Poster. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Poster. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Poster.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - return true; - } - }]); -}(); -Poster.RequiredProperties = ["capture"]; - -/** - * The point on the timeline in seconds to capture a single frame to use as the poster image. - * @member {Number} capture - */ -Poster.prototype['capture'] = undefined; -var _default = exports["default"] = Poster; \ No newline at end of file diff --git a/src/model/ProbeResponse.js b/src/model/ProbeResponse.js deleted file mode 100644 index 31d63f7..0000000 --- a/src/model/ProbeResponse.js +++ /dev/null @@ -1,197 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ProbeResponse model module. - * @module model/ProbeResponse - * @version 0.2.9 - */ -var ProbeResponse = /*#__PURE__*/function () { - /** - * Constructs a new ProbeResponse. - * The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON. - * @alias module:model/ProbeResponse - * @param success {Boolean} `true` if media successfully read, else `false`. - * @param message {String} `Created`, `Bad Request` or an error message. - * @param response {Object} The response from FFprobe in JSON format. - */ - function ProbeResponse(success, message, response) { - _classCallCheck(this, ProbeResponse); - ProbeResponse.initialize(this, success, message, response); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ProbeResponse, [{ - key: "getSuccess", - value: - /** - * Returns `true` if media successfully read, else `false`. - * @return {Boolean} - */ - function getSuccess() { - return this.success; - } - - /** - * Sets `true` if media successfully read, else `false`. - * @param {Boolean} success `true` if media successfully read, else `false`. - */ - }, { - key: "setSuccess", - value: function setSuccess(success) { - this['success'] = success; - return this; - } - /** - * Returns `Created`, `Bad Request` or an error message. - * @return {String} - */ - }, { - key: "getMessage", - value: function getMessage() { - return this.message; - } - - /** - * Sets `Created`, `Bad Request` or an error message. - * @param {String} message `Created`, `Bad Request` or an error message. - */ - }, { - key: "setMessage", - value: function setMessage(message) { - this['message'] = message; - return this; - } - /** - * Returns The response from FFprobe in JSON format. - * @return {Object} - */ - }, { - key: "getResponse", - value: function getResponse() { - return this.response; - } - - /** - * Sets The response from FFprobe in JSON format. - * @param {Object} response The response from FFprobe in JSON format. - */ - }, { - key: "setResponse", - value: function setResponse(response) { - this['response'] = response; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, success, message, response) { - obj['success'] = success; - obj['message'] = message; - obj['response'] = response; - } - - /** - * Constructs a ProbeResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ProbeResponse} obj Optional instance to populate. - * @return {module:model/ProbeResponse} The populated ProbeResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ProbeResponse(); - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean'); - } - if (data.hasOwnProperty('message')) { - obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String'); - } - if (data.hasOwnProperty('response')) { - obj['response'] = _ApiClient["default"].convertToType(data['response'], Object); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ProbeResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ProbeResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ProbeResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - return true; - } - }]); -}(); -ProbeResponse.RequiredProperties = ["success", "message", "response"]; - -/** - * `true` if media successfully read, else `false`. - * @member {Boolean} success - */ -ProbeResponse.prototype['success'] = undefined; - -/** - * `Created`, `Bad Request` or an error message. - * @member {String} message - */ -ProbeResponse.prototype['message'] = undefined; - -/** - * The response from FFprobe in JSON format. - * @member {Object} response - */ -ProbeResponse.prototype['response'] = undefined; -var _default = exports["default"] = ProbeResponse; \ No newline at end of file diff --git a/src/model/QueuedResponse.js b/src/model/QueuedResponse.js deleted file mode 100644 index 57b4328..0000000 --- a/src/model/QueuedResponse.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _QueuedResponseData = _interopRequireDefault(require("./QueuedResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The QueuedResponse model module. - * @module model/QueuedResponse - * @version 0.2.9 - */ -var QueuedResponse = /*#__PURE__*/function () { - /** - * Constructs a new QueuedResponse. - * The response received after a [render request](#render-asset) or [template render](#render-template) is submitted. The render task is queued for rendering and a unique render id is returned. - * @alias module:model/QueuedResponse - * @param success {Boolean} `true` if successfully queued, else `false`. - * @param message {String} `Created`, `Bad Request` or an error message. - * @param response {module:model/QueuedResponseData} - */ - function QueuedResponse(success, message, response) { - _classCallCheck(this, QueuedResponse); - QueuedResponse.initialize(this, success, message, response); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(QueuedResponse, [{ - key: "getSuccess", - value: - /** - * Returns `true` if successfully queued, else `false`. - * @return {Boolean} - */ - function getSuccess() { - return this.success; - } - - /** - * Sets `true` if successfully queued, else `false`. - * @param {Boolean} success `true` if successfully queued, else `false`. - */ - }, { - key: "setSuccess", - value: function setSuccess(success) { - this['success'] = success; - return this; - } - /** - * Returns `Created`, `Bad Request` or an error message. - * @return {String} - */ - }, { - key: "getMessage", - value: function getMessage() { - return this.message; - } - - /** - * Sets `Created`, `Bad Request` or an error message. - * @param {String} message `Created`, `Bad Request` or an error message. - */ - }, { - key: "setMessage", - value: function setMessage(message) { - this['message'] = message; - return this; - } - /** - * @return {module:model/QueuedResponseData} - */ - }, { - key: "getResponse", - value: function getResponse() { - return this.response; - } - - /** - * @param {module:model/QueuedResponseData} response - */ - }, { - key: "setResponse", - value: function setResponse(response) { - this['response'] = response; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, success, message, response) { - obj['success'] = success; - obj['message'] = message; - obj['response'] = response; - } - - /** - * Constructs a QueuedResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/QueuedResponse} obj Optional instance to populate. - * @return {module:model/QueuedResponse} The populated QueuedResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new QueuedResponse(); - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean'); - } - if (data.hasOwnProperty('message')) { - obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String'); - } - if (data.hasOwnProperty('response')) { - obj['response'] = _QueuedResponseData["default"].constructFromObject(data['response']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to QueuedResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to QueuedResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(QueuedResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - // validate the optional field `response` - if (data['response']) { - // data not null - _QueuedResponseData["default"].validateJSON(data['response']); - } - return true; - } - }]); -}(); -QueuedResponse.RequiredProperties = ["success", "message", "response"]; - -/** - * `true` if successfully queued, else `false`. - * @member {Boolean} success - */ -QueuedResponse.prototype['success'] = undefined; - -/** - * `Created`, `Bad Request` or an error message. - * @member {String} message - */ -QueuedResponse.prototype['message'] = undefined; - -/** - * @member {module:model/QueuedResponseData} response - */ -QueuedResponse.prototype['response'] = undefined; -var _default = exports["default"] = QueuedResponse; \ No newline at end of file diff --git a/src/model/QueuedResponseData.js b/src/model/QueuedResponseData.js deleted file mode 100644 index 2e63a47..0000000 --- a/src/model/QueuedResponseData.js +++ /dev/null @@ -1,170 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The QueuedResponseData model module. - * @module model/QueuedResponseData - * @version 0.2.9 - */ -var QueuedResponseData = /*#__PURE__*/function () { - /** - * Constructs a new QueuedResponseData. - * The response data returned with the [QueuedResponse](#tocs_queuedresponse). - * @alias module:model/QueuedResponseData - * @param message {String} Success response message or error details. - * @param id {String} The id of the render task in UUID format. - */ - function QueuedResponseData(message, id) { - _classCallCheck(this, QueuedResponseData); - QueuedResponseData.initialize(this, message, id); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(QueuedResponseData, [{ - key: "getMessage", - value: - /** - * Returns Success response message or error details. - * @return {String} - */ - function getMessage() { - return this.message; - } - - /** - * Sets Success response message or error details. - * @param {String} message Success response message or error details. - */ - }, { - key: "setMessage", - value: function setMessage(message) { - this['message'] = message; - return this; - } - /** - * Returns The id of the render task in UUID format. - * @return {String} - */ - }, { - key: "getId", - value: function getId() { - return this.id; - } - - /** - * Sets The id of the render task in UUID format. - * @param {String} id The id of the render task in UUID format. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, message, id) { - obj['message'] = message; - obj['id'] = id; - } - - /** - * Constructs a QueuedResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/QueuedResponseData} obj Optional instance to populate. - * @return {module:model/QueuedResponseData} The populated QueuedResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new QueuedResponseData(); - if (data.hasOwnProperty('message')) { - obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String'); - } - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to QueuedResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to QueuedResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(QueuedResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - return true; - } - }]); -}(); -QueuedResponseData.RequiredProperties = ["message", "id"]; - -/** - * Success response message or error details. - * @member {String} message - */ -QueuedResponseData.prototype['message'] = undefined; - -/** - * The id of the render task in UUID format. - * @member {String} id - */ -QueuedResponseData.prototype['id'] = undefined; -var _default = exports["default"] = QueuedResponseData; \ No newline at end of file diff --git a/src/model/QueuedSourceResponse.js b/src/model/QueuedSourceResponse.js deleted file mode 100644 index 9963216..0000000 --- a/src/model/QueuedSourceResponse.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _QueuedSourceResponseData = _interopRequireDefault(require("./QueuedSourceResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The QueuedSourceResponse model module. - * @module model/QueuedSourceResponse - * @version 0.2.9 - */ -var QueuedSourceResponse = /*#__PURE__*/function () { - /** - * Constructs a new QueuedSourceResponse. - * The response returned by the Ingest API [fetch source](#fetch-source) request. Includes the id of the source file. The response follows the [json:api](https://jsonapi.org/) specification. - * @alias module:model/QueuedSourceResponse - * @param data {module:model/QueuedSourceResponseData} - */ - function QueuedSourceResponse(data) { - _classCallCheck(this, QueuedSourceResponse); - QueuedSourceResponse.initialize(this, data); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(QueuedSourceResponse, [{ - key: "getData", - value: - /** - * @return {module:model/QueuedSourceResponseData} - */ - function getData() { - return this.data; - } - - /** - * @param {module:model/QueuedSourceResponseData} data - */ - }, { - key: "setData", - value: function setData(data) { - this['data'] = data; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, data) { - obj['data'] = data; - } - - /** - * Constructs a QueuedSourceResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/QueuedSourceResponse} obj Optional instance to populate. - * @return {module:model/QueuedSourceResponse} The populated QueuedSourceResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new QueuedSourceResponse(); - if (data.hasOwnProperty('data')) { - obj['data'] = _QueuedSourceResponseData["default"].constructFromObject(data['data']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to QueuedSourceResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to QueuedSourceResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(QueuedSourceResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `data` - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['data']) { - // data not null - _QueuedSourceResponseData["default"].validateJSON(data['data']); - } - return true; - } - }]); -}(); -QueuedSourceResponse.RequiredProperties = ["data"]; - -/** - * @member {module:model/QueuedSourceResponseData} data - */ -QueuedSourceResponse.prototype['data'] = undefined; -var _default = exports["default"] = QueuedSourceResponse; \ No newline at end of file diff --git a/src/model/QueuedSourceResponseData.js b/src/model/QueuedSourceResponseData.js deleted file mode 100644 index 746c994..0000000 --- a/src/model/QueuedSourceResponseData.js +++ /dev/null @@ -1,170 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The QueuedSourceResponseData model module. - * @module model/QueuedSourceResponseData - * @version 0.2.9 - */ -var QueuedSourceResponseData = /*#__PURE__*/function () { - /** - * Constructs a new QueuedSourceResponseData. - * The type of resource (a source) and the newly created source id. Returned with [QueuedSourceResponse](#tocs_queuedsourceresponse). - * @alias module:model/QueuedSourceResponseData - * @param type {String} The type of resource, in this case it is a source. - * @param id {String} The source id. - */ - function QueuedSourceResponseData(type, id) { - _classCallCheck(this, QueuedSourceResponseData); - QueuedSourceResponseData.initialize(this, type, id); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(QueuedSourceResponseData, [{ - key: "getType", - value: - /** - * Returns The type of resource, in this case it is a source. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of resource, in this case it is a source. - * @param {String} type The type of resource, in this case it is a source. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The source id. - * @return {String} - */ - }, { - key: "getId", - value: function getId() { - return this.id; - } - - /** - * Sets The source id. - * @param {String} id The source id. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, id) { - obj['type'] = type; - obj['id'] = id; - } - - /** - * Constructs a QueuedSourceResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/QueuedSourceResponseData} obj Optional instance to populate. - * @return {module:model/QueuedSourceResponseData} The populated QueuedSourceResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new QueuedSourceResponseData(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to QueuedSourceResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to QueuedSourceResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(QueuedSourceResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - return true; - } - }]); -}(); -QueuedSourceResponseData.RequiredProperties = ["type", "id"]; - -/** - * The type of resource, in this case it is a source. - * @member {String} type - */ -QueuedSourceResponseData.prototype['type'] = undefined; - -/** - * The source id. - * @member {String} id - */ -QueuedSourceResponseData.prototype['id'] = undefined; -var _default = exports["default"] = QueuedSourceResponseData; \ No newline at end of file diff --git a/src/model/Range.js b/src/model/Range.js deleted file mode 100644 index aa089e7..0000000 --- a/src/model/Range.js +++ /dev/null @@ -1,139 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Range model module. - * @module model/Range - * @version 0.2.9 - */ -var Range = /*#__PURE__*/function () { - /** - * Constructs a new Range. - * Specify a time range to render, i.e. to render only a portion of a video or audio file. Omit this setting to export the entire video. Range can also be used to render a frame at a specific time point - setting a range and output format as `jpg` will output a single frame image at the range `start` point. - * @alias module:model/Range - */ - function Range() { - _classCallCheck(this, Range); - Range.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Range, [{ - key: "getStart", - value: - /** - * Returns The point on the timeline, in seconds, to start the render from - i.e. start at second 3. - * minimum: 0 - * @return {Number} - */ - function getStart() { - return this.start; - } - - /** - * Sets The point on the timeline, in seconds, to start the render from - i.e. start at second 3. - * @param {Number} start The point on the timeline, in seconds, to start the render from - i.e. start at second 3. - */ - }, { - key: "setStart", - value: function setStart(start) { - this['start'] = start; - return this; - } - /** - * Returns The length of the portion of the video or audio to render - i.e. render 6 seconds of the video. - * minimum: 0 - * @return {Number} - */ - }, { - key: "getLength", - value: function getLength() { - return this.length; - } - - /** - * Sets The length of the portion of the video or audio to render - i.e. render 6 seconds of the video. - * @param {Number} length The length of the portion of the video or audio to render - i.e. render 6 seconds of the video. - */ - }, { - key: "setLength", - value: function setLength(length) { - this['length'] = length; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Range from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Range} obj Optional instance to populate. - * @return {module:model/Range} The populated Range instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Range(); - if (data.hasOwnProperty('start')) { - obj['start'] = _ApiClient["default"].convertToType(data['start'], 'Number'); - } - if (data.hasOwnProperty('length')) { - obj['length'] = _ApiClient["default"].convertToType(data['length'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Range. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Range. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - return true; - } - }]); -}(); -/** - * The point on the timeline, in seconds, to start the render from - i.e. start at second 3. - * @member {Number} start - */ -Range.prototype['start'] = undefined; - -/** - * The length of the portion of the video or audio to render - i.e. render 6 seconds of the video. - * @member {Number} length - */ -Range.prototype['length'] = undefined; -var _default = exports["default"] = Range; \ No newline at end of file diff --git a/src/model/RenderResponse.js b/src/model/RenderResponse.js deleted file mode 100644 index b276b98..0000000 --- a/src/model/RenderResponse.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _RenderResponseData = _interopRequireDefault(require("./RenderResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The RenderResponse model module. - * @module model/RenderResponse - * @version 0.2.9 - */ -var RenderResponse = /*#__PURE__*/function () { - /** - * Constructs a new RenderResponse. - * The response received after a [render status request](#get-render-status) is submitted. The response includes details about status of a render and the output URL. - * @alias module:model/RenderResponse - * @param success {Boolean} `true` if status available, else `false`. - * @param message {String} `OK` or an error message. - * @param response {module:model/RenderResponseData} - */ - function RenderResponse(success, message, response) { - _classCallCheck(this, RenderResponse); - RenderResponse.initialize(this, success, message, response); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(RenderResponse, [{ - key: "getSuccess", - value: - /** - * Returns `true` if status available, else `false`. - * @return {Boolean} - */ - function getSuccess() { - return this.success; - } - - /** - * Sets `true` if status available, else `false`. - * @param {Boolean} success `true` if status available, else `false`. - */ - }, { - key: "setSuccess", - value: function setSuccess(success) { - this['success'] = success; - return this; - } - /** - * Returns `OK` or an error message. - * @return {String} - */ - }, { - key: "getMessage", - value: function getMessage() { - return this.message; - } - - /** - * Sets `OK` or an error message. - * @param {String} message `OK` or an error message. - */ - }, { - key: "setMessage", - value: function setMessage(message) { - this['message'] = message; - return this; - } - /** - * @return {module:model/RenderResponseData} - */ - }, { - key: "getResponse", - value: function getResponse() { - return this.response; - } - - /** - * @param {module:model/RenderResponseData} response - */ - }, { - key: "setResponse", - value: function setResponse(response) { - this['response'] = response; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, success, message, response) { - obj['success'] = success; - obj['message'] = message; - obj['response'] = response; - } - - /** - * Constructs a RenderResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/RenderResponse} obj Optional instance to populate. - * @return {module:model/RenderResponse} The populated RenderResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new RenderResponse(); - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean'); - } - if (data.hasOwnProperty('message')) { - obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String'); - } - if (data.hasOwnProperty('response')) { - obj['response'] = _RenderResponseData["default"].constructFromObject(data['response']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to RenderResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to RenderResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(RenderResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - // validate the optional field `response` - if (data['response']) { - // data not null - _RenderResponseData["default"].validateJSON(data['response']); - } - return true; - } - }]); -}(); -RenderResponse.RequiredProperties = ["success", "message", "response"]; - -/** - * `true` if status available, else `false`. - * @member {Boolean} success - */ -RenderResponse.prototype['success'] = undefined; - -/** - * `OK` or an error message. - * @member {String} message - */ -RenderResponse.prototype['message'] = undefined; - -/** - * @member {module:model/RenderResponseData} response - */ -RenderResponse.prototype['response'] = undefined; -var _default = exports["default"] = RenderResponse; \ No newline at end of file diff --git a/src/model/RenderResponseData.js b/src/model/RenderResponseData.js deleted file mode 100644 index 087360a..0000000 --- a/src/model/RenderResponseData.js +++ /dev/null @@ -1,564 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Edit = _interopRequireDefault(require("./Edit")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The RenderResponseData model module. - * @module model/RenderResponseData - * @version 0.2.9 - */ -var RenderResponseData = /*#__PURE__*/function () { - /** - * Constructs a new RenderResponseData. - * The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL. - * @alias module:model/RenderResponseData - * @param id {String} The id of the render task in UUID format. - * @param owner {String} The owner id of the render task. - * @param status {module:model/RenderResponseData.StatusEnum} The status of the render task.
  • `queued` - render is queued waiting to be rendered
  • `fetching` - assets are being fetched
  • `rendering` - the asset is being rendered
  • `saving` - the final asset is being saved to storage
  • `done` - the asset is ready to be downloaded
  • `failed` - there was an error rendering the asset
- */ - function RenderResponseData(id, owner, status) { - _classCallCheck(this, RenderResponseData); - RenderResponseData.initialize(this, id, owner, status); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(RenderResponseData, [{ - key: "getId", - value: - /** - * Returns The id of the render task in UUID format. - * @return {String} - */ - function getId() { - return this.id; - } - - /** - * Sets The id of the render task in UUID format. - * @param {String} id The id of the render task in UUID format. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns The owner id of the render task. - * @return {String} - */ - }, { - key: "getOwner", - value: function getOwner() { - return this.owner; - } - - /** - * Sets The owner id of the render task. - * @param {String} owner The owner id of the render task. - */ - }, { - key: "setOwner", - value: function setOwner(owner) { - this['owner'] = owner; - return this; - } - /** - * Returns The customer subscription plan. - * @return {String} - */ - }, { - key: "getPlan", - value: function getPlan() { - return this.plan; - } - - /** - * Sets The customer subscription plan. - * @param {String} plan The customer subscription plan. - */ - }, { - key: "setPlan", - value: function setPlan(plan) { - this['plan'] = plan; - return this; - } - /** - * Returns The status of the render task.
  • `queued` - render is queued waiting to be rendered
  • `fetching` - assets are being fetched
  • `rendering` - the asset is being rendered
  • `saving` - the final asset is being saved to storage
  • `done` - the asset is ready to be downloaded
  • `failed` - there was an error rendering the asset
- * @return {module:model/RenderResponseData.StatusEnum} - */ - }, { - key: "getStatus", - value: function getStatus() { - return this.status; - } - - /** - * Sets The status of the render task.
  • `queued` - render is queued waiting to be rendered
  • `fetching` - assets are being fetched
  • `rendering` - the asset is being rendered
  • `saving` - the final asset is being saved to storage
  • `done` - the asset is ready to be downloaded
  • `failed` - there was an error rendering the asset
- * @param {module:model/RenderResponseData.StatusEnum} status The status of the render task.
  • `queued` - render is queued waiting to be rendered
  • `fetching` - assets are being fetched
  • `rendering` - the asset is being rendered
  • `saving` - the final asset is being saved to storage
  • `done` - the asset is ready to be downloaded
  • `failed` - there was an error rendering the asset
- */ - }, { - key: "setStatus", - value: function setStatus(status) { - this['status'] = status; - return this; - } - /** - * Returns An error message, only displayed if an error occurred. - * @return {String} - */ - }, { - key: "getError", - value: function getError() { - return this.error; - } - - /** - * Sets An error message, only displayed if an error occurred. - * @param {String} error An error message, only displayed if an error occurred. - */ - }, { - key: "setError", - value: function setError(error) { - this['error'] = error; - return this; - } - /** - * Returns The output video or audio length in seconds. - * @return {Number} - */ - }, { - key: "getDuration", - value: function getDuration() { - return this.duration; - } - - /** - * Sets The output video or audio length in seconds. - * @param {Number} duration The output video or audio length in seconds. - */ - }, { - key: "setDuration", - value: function setDuration(duration) { - this['duration'] = duration; - return this; - } - /** - * Returns The time taken to render the asset in milliseconds. - * @return {Number} - */ - }, { - key: "getRenderTime", - value: function getRenderTime() { - return this.renderTime; - } - - /** - * Sets The time taken to render the asset in milliseconds. - * @param {Number} renderTime The time taken to render the asset in milliseconds. - */ - }, { - key: "setRenderTime", - value: function setRenderTime(renderTime) { - this['renderTime'] = renderTime; - return this; - } - /** - * Returns The URL of the final asset. This will only be available if status is done. This is a temporary URL and will be deleted after 24 hours. By default all assets are copied to the Shotstack hosting and CDN destination. - * @return {String} - */ - }, { - key: "getUrl", - value: function getUrl() { - return this.url; - } - - /** - * Sets The URL of the final asset. This will only be available if status is done. This is a temporary URL and will be deleted after 24 hours. By default all assets are copied to the Shotstack hosting and CDN destination. - * @param {String} url The URL of the final asset. This will only be available if status is done. This is a temporary URL and will be deleted after 24 hours. By default all assets are copied to the Shotstack hosting and CDN destination. - */ - }, { - key: "setUrl", - value: function setUrl(url) { - this['url'] = url; - return this; - } - /** - * Returns The URL of the poster image if requested. This will only be available if status is done. - * @return {String} - */ - }, { - key: "getPoster", - value: function getPoster() { - return this.poster; - } - - /** - * Sets The URL of the poster image if requested. This will only be available if status is done. - * @param {String} poster The URL of the poster image if requested. This will only be available if status is done. - */ - }, { - key: "setPoster", - value: function setPoster(poster) { - this['poster'] = poster; - return this; - } - /** - * Returns The URL of the thumbnail image if requested. This will only be available if status is done. - * @return {String} - */ - }, { - key: "getThumbnail", - value: function getThumbnail() { - return this.thumbnail; - } - - /** - * Sets The URL of the thumbnail image if requested. This will only be available if status is done. - * @param {String} thumbnail The URL of the thumbnail image if requested. This will only be available if status is done. - */ - }, { - key: "setThumbnail", - value: function setThumbnail(thumbnail) { - this['thumbnail'] = thumbnail; - return this; - } - /** - * @return {module:model/Edit} - */ - }, { - key: "getData", - value: function getData() { - return this.data; - } - - /** - * @param {module:model/Edit} data - */ - }, { - key: "setData", - value: function setData(data) { - this['data'] = data; - return this; - } - /** - * Returns The time the render task was initially queued. - * @return {String} - */ - }, { - key: "getCreated", - value: function getCreated() { - return this.created; - } - - /** - * Sets The time the render task was initially queued. - * @param {String} created The time the render task was initially queued. - */ - }, { - key: "setCreated", - value: function setCreated(created) { - this['created'] = created; - return this; - } - /** - * Returns The time the render status was last updated. - * @return {String} - */ - }, { - key: "getUpdated", - value: function getUpdated() { - return this.updated; - } - - /** - * Sets The time the render status was last updated. - * @param {String} updated The time the render status was last updated. - */ - }, { - key: "setUpdated", - value: function setUpdated(updated) { - this['updated'] = updated; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, id, owner, status) { - obj['id'] = id; - obj['owner'] = owner; - obj['status'] = status; - } - - /** - * Constructs a RenderResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/RenderResponseData} obj Optional instance to populate. - * @return {module:model/RenderResponseData} The populated RenderResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new RenderResponseData(); - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('owner')) { - obj['owner'] = _ApiClient["default"].convertToType(data['owner'], 'String'); - } - if (data.hasOwnProperty('plan')) { - obj['plan'] = _ApiClient["default"].convertToType(data['plan'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient["default"].convertToType(data['error'], 'String'); - } - if (data.hasOwnProperty('duration')) { - obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number'); - } - if (data.hasOwnProperty('renderTime')) { - obj['renderTime'] = _ApiClient["default"].convertToType(data['renderTime'], 'Number'); - } - if (data.hasOwnProperty('url')) { - obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String'); - } - if (data.hasOwnProperty('poster')) { - obj['poster'] = _ApiClient["default"].convertToType(data['poster'], 'String'); - } - if (data.hasOwnProperty('thumbnail')) { - obj['thumbnail'] = _ApiClient["default"].convertToType(data['thumbnail'], 'String'); - } - if (data.hasOwnProperty('data')) { - obj['data'] = _Edit["default"].constructFromObject(data['data']); - } - if (data.hasOwnProperty('created')) { - obj['created'] = _ApiClient["default"].convertToType(data['created'], 'String'); - } - if (data.hasOwnProperty('updated')) { - obj['updated'] = _ApiClient["default"].convertToType(data['updated'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to RenderResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to RenderResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(RenderResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['owner'] && !(typeof data['owner'] === 'string' || data['owner'] instanceof String)) { - throw new Error("Expected the field `owner` to be a primitive type in the JSON string but got " + data['owner']); - } - // ensure the json data is a string - if (data['plan'] && !(typeof data['plan'] === 'string' || data['plan'] instanceof String)) { - throw new Error("Expected the field `plan` to be a primitive type in the JSON string but got " + data['plan']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // ensure the json data is a string - if (data['error'] && !(typeof data['error'] === 'string' || data['error'] instanceof String)) { - throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']); - } - // ensure the json data is a string - if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { - throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); - } - // ensure the json data is a string - if (data['poster'] && !(typeof data['poster'] === 'string' || data['poster'] instanceof String)) { - throw new Error("Expected the field `poster` to be a primitive type in the JSON string but got " + data['poster']); - } - // ensure the json data is a string - if (data['thumbnail'] && !(typeof data['thumbnail'] === 'string' || data['thumbnail'] instanceof String)) { - throw new Error("Expected the field `thumbnail` to be a primitive type in the JSON string but got " + data['thumbnail']); - } - // validate the optional field `data` - if (data['data']) { - // data not null - _Edit["default"].validateJSON(data['data']); - } - // ensure the json data is a string - if (data['created'] && !(typeof data['created'] === 'string' || data['created'] instanceof String)) { - throw new Error("Expected the field `created` to be a primitive type in the JSON string but got " + data['created']); - } - // ensure the json data is a string - if (data['updated'] && !(typeof data['updated'] === 'string' || data['updated'] instanceof String)) { - throw new Error("Expected the field `updated` to be a primitive type in the JSON string but got " + data['updated']); - } - return true; - } - }]); -}(); -RenderResponseData.RequiredProperties = ["id", "owner", "status"]; - -/** - * The id of the render task in UUID format. - * @member {String} id - */ -RenderResponseData.prototype['id'] = undefined; - -/** - * The owner id of the render task. - * @member {String} owner - */ -RenderResponseData.prototype['owner'] = undefined; - -/** - * The customer subscription plan. - * @member {String} plan - */ -RenderResponseData.prototype['plan'] = undefined; - -/** - * The status of the render task.
  • `queued` - render is queued waiting to be rendered
  • `fetching` - assets are being fetched
  • `rendering` - the asset is being rendered
  • `saving` - the final asset is being saved to storage
  • `done` - the asset is ready to be downloaded
  • `failed` - there was an error rendering the asset
- * @member {module:model/RenderResponseData.StatusEnum} status - */ -RenderResponseData.prototype['status'] = undefined; - -/** - * An error message, only displayed if an error occurred. - * @member {String} error - */ -RenderResponseData.prototype['error'] = undefined; - -/** - * The output video or audio length in seconds. - * @member {Number} duration - */ -RenderResponseData.prototype['duration'] = undefined; - -/** - * The time taken to render the asset in milliseconds. - * @member {Number} renderTime - */ -RenderResponseData.prototype['renderTime'] = undefined; - -/** - * The URL of the final asset. This will only be available if status is done. This is a temporary URL and will be deleted after 24 hours. By default all assets are copied to the Shotstack hosting and CDN destination. - * @member {String} url - */ -RenderResponseData.prototype['url'] = undefined; - -/** - * The URL of the poster image if requested. This will only be available if status is done. - * @member {String} poster - */ -RenderResponseData.prototype['poster'] = undefined; - -/** - * The URL of the thumbnail image if requested. This will only be available if status is done. - * @member {String} thumbnail - */ -RenderResponseData.prototype['thumbnail'] = undefined; - -/** - * @member {module:model/Edit} data - */ -RenderResponseData.prototype['data'] = undefined; - -/** - * The time the render task was initially queued. - * @member {String} created - */ -RenderResponseData.prototype['created'] = undefined; - -/** - * The time the render status was last updated. - * @member {String} updated - */ -RenderResponseData.prototype['updated'] = undefined; - -/** - * Allowed values for the status property. - * @enum {String} - * @readonly - */ -RenderResponseData['StatusEnum'] = { - /** - * value: "queued" - * @const - */ - "queued": "queued", - /** - * value: "fetching" - * @const - */ - "fetching": "fetching", - /** - * value: "rendering" - * @const - */ - "rendering": "rendering", - /** - * value: "saving" - * @const - */ - "saving": "saving", - /** - * value: "done" - * @const - */ - "done": "done", - /** - * value: "failed" - * @const - */ - "failed": "failed" -}; -var _default = exports["default"] = RenderResponseData; \ No newline at end of file diff --git a/src/model/Rendition.js b/src/model/Rendition.js deleted file mode 100644 index 511303d..0000000 --- a/src/model/Rendition.js +++ /dev/null @@ -1,653 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Enhancements = _interopRequireDefault(require("./Enhancements")); -var _Size = _interopRequireDefault(require("./Size")); -var _Speed = _interopRequireDefault(require("./Speed")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Rendition model module. - * @module model/Rendition - * @version 0.2.9 - */ -var Rendition = /*#__PURE__*/function () { - /** - * Constructs a new Rendition. - * A rendition is a new output file that is generated from the source. The rendition can be encoded to a different format and have transformations applied to it such as resizing, cropping, etc... - * @alias module:model/Rendition - */ - function Rendition() { - _classCallCheck(this, Rendition); - Rendition.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Rendition, [{ - key: "getFormat", - value: - /** - * Returns The output format to encode the file to. You can only encode a file to the same type, i.e. a video to a video or an image to an image. You can't encode a video as an image. The following formats are available:
  • `mp4` - mp4 video file (video only)
  • `webm` - webm video file (video only)
  • `mov` - mov video file (video only)
  • `avi` - avi video file (video only)
  • `mkv` - mkv video file (video only)
  • `ogv` - ogv video file (video only)
  • `wmv` - wmv video file (video only)
  • `avif` - avif video file (video only)
  • `gif` - animated gif file (video only)
  • `jpg` - jpg image file (image only)
  • `png` - png image file (image only)
  • `webp` - webp image file (image only)
  • `tif` - tif image file (image only)
  • `mp3` - mp3 audio file (audio only)
  • `wav` - wav audio file (audio only)
- * @return {module:model/Rendition.FormatEnum} - */ - function getFormat() { - return this.format; - } - - /** - * Sets The output format to encode the file to. You can only encode a file to the same type, i.e. a video to a video or an image to an image. You can't encode a video as an image. The following formats are available:
  • `mp4` - mp4 video file (video only)
  • `webm` - webm video file (video only)
  • `mov` - mov video file (video only)
  • `avi` - avi video file (video only)
  • `mkv` - mkv video file (video only)
  • `ogv` - ogv video file (video only)
  • `wmv` - wmv video file (video only)
  • `avif` - avif video file (video only)
  • `gif` - animated gif file (video only)
  • `jpg` - jpg image file (image only)
  • `png` - png image file (image only)
  • `webp` - webp image file (image only)
  • `tif` - tif image file (image only)
  • `mp3` - mp3 audio file (audio only)
  • `wav` - wav audio file (audio only)
- * @param {module:model/Rendition.FormatEnum} format The output format to encode the file to. You can only encode a file to the same type, i.e. a video to a video or an image to an image. You can't encode a video as an image. The following formats are available:
  • `mp4` - mp4 video file (video only)
  • `webm` - webm video file (video only)
  • `mov` - mov video file (video only)
  • `avi` - avi video file (video only)
  • `mkv` - mkv video file (video only)
  • `ogv` - ogv video file (video only)
  • `wmv` - wmv video file (video only)
  • `avif` - avif video file (video only)
  • `gif` - animated gif file (video only)
  • `jpg` - jpg image file (image only)
  • `png` - png image file (image only)
  • `webp` - webp image file (image only)
  • `tif` - tif image file (image only)
  • `mp3` - mp3 audio file (audio only)
  • `wav` - wav audio file (audio only)
- */ - }, { - key: "setFormat", - value: function setFormat(format) { - this['format'] = format; - return this; - } - /** - * @return {module:model/Size} - */ - }, { - key: "getSize", - value: function getSize() { - return this.size; - } - - /** - * @param {module:model/Size} size - */ - }, { - key: "setSize", - value: function setSize(size) { - this['size'] = size; - return this; - } - /** - * Returns Set how the rendition should be scaled and cropped when using a size with an aspect ratio that is different from the source. Fit applies to both videos and images.
  • `crop` (default) - scale the rendition to fill the output area while maintaining the aspect ratio. The rendition will be cropped if it exceeds the bounds of the output.
  • `cover` - stretch the rendition to fill the output without maintaining the aspect ratio.
  • `contain` - fit the entire rendition within the output while maintaining the original aspect ratio.
- * @return {module:model/Rendition.FitEnum} - */ - }, { - key: "getFit", - value: function getFit() { - return this.fit; - } - - /** - * Sets Set how the rendition should be scaled and cropped when using a size with an aspect ratio that is different from the source. Fit applies to both videos and images.
  • `crop` (default) - scale the rendition to fill the output area while maintaining the aspect ratio. The rendition will be cropped if it exceeds the bounds of the output.
  • `cover` - stretch the rendition to fill the output without maintaining the aspect ratio.
  • `contain` - fit the entire rendition within the output while maintaining the original aspect ratio.
- * @param {module:model/Rendition.FitEnum} fit Set how the rendition should be scaled and cropped when using a size with an aspect ratio that is different from the source. Fit applies to both videos and images.
  • `crop` (default) - scale the rendition to fill the output area while maintaining the aspect ratio. The rendition will be cropped if it exceeds the bounds of the output.
  • `cover` - stretch the rendition to fill the output without maintaining the aspect ratio.
  • `contain` - fit the entire rendition within the output while maintaining the original aspect ratio.
- */ - }, { - key: "setFit", - value: function setFit(fit) { - this['fit'] = fit; - return this; - } - /** - * Returns The preset output resolution of the video or image. This is a convenience property that sets the width and height based on industry standard resolutions. The following resolutions are available:
  • `preview` - 512px x 288px
  • `mobile` - 640px x 360px
  • `sd` - 1024px x 576px
  • `hd` - 1280px x 720px
  • `fhd` - 1920px x 1080px
- * @return {module:model/Rendition.ResolutionEnum} - */ - }, { - key: "getResolution", - value: function getResolution() { - return this.resolution; - } - - /** - * Sets The preset output resolution of the video or image. This is a convenience property that sets the width and height based on industry standard resolutions. The following resolutions are available:
  • `preview` - 512px x 288px
  • `mobile` - 640px x 360px
  • `sd` - 1024px x 576px
  • `hd` - 1280px x 720px
  • `fhd` - 1920px x 1080px
- * @param {module:model/Rendition.ResolutionEnum} resolution The preset output resolution of the video or image. This is a convenience property that sets the width and height based on industry standard resolutions. The following resolutions are available:
  • `preview` - 512px x 288px
  • `mobile` - 640px x 360px
  • `sd` - 1024px x 576px
  • `hd` - 1280px x 720px
  • `fhd` - 1920px x 1080px
- */ - }, { - key: "setResolution", - value: function setResolution(resolution) { - this['resolution'] = resolution; - return this; - } - /** - * Returns Adjust the visual quality of the video or image. The higher the value, the sharper the image quality but the larger file size and slower the encoding process. When specifying quality, the goal is to balance file size vs visual quality. Quality is a value between 1 and 100 where 1 is fully compressed with low image quality and 100 is close to lossless with high image quality and large file size. Sane values are between 50 and 75. Omitting the quality parameter will result in an asset optimised for encoding speed, file size and visual quality. - * minimum: 1 - * maximum: 100 - * @return {Number} - */ - }, { - key: "getQuality", - value: function getQuality() { - return this.quality; - } - - /** - * Sets Adjust the visual quality of the video or image. The higher the value, the sharper the image quality but the larger file size and slower the encoding process. When specifying quality, the goal is to balance file size vs visual quality. Quality is a value between 1 and 100 where 1 is fully compressed with low image quality and 100 is close to lossless with high image quality and large file size. Sane values are between 50 and 75. Omitting the quality parameter will result in an asset optimised for encoding speed, file size and visual quality. - * @param {Number} quality Adjust the visual quality of the video or image. The higher the value, the sharper the image quality but the larger file size and slower the encoding process. When specifying quality, the goal is to balance file size vs visual quality. Quality is a value between 1 and 100 where 1 is fully compressed with low image quality and 100 is close to lossless with high image quality and large file size. Sane values are between 50 and 75. Omitting the quality parameter will result in an asset optimised for encoding speed, file size and visual quality. - */ - }, { - key: "setQuality", - value: function setQuality(quality) { - this['quality'] = quality; - return this; - } - /** - * Returns Change the frame rate of a video asset.
  • `12` - 12fps
  • `15` - 15fps
  • `24` - 24fps
  • `23.976` - 23.976fps
  • `25` (default) - 25fps
  • `29.97` - 29.97fps
  • `30` - 30fps
  • `48` - 48fps
  • `50` - 50fps
  • `59.94` - 59.94fps
  • `60` - 60fps
- * @return {module:model/Rendition.FpsEnum} - */ - }, { - key: "getFps", - value: function getFps() { - return this.fps; - } - - /** - * Sets Change the frame rate of a video asset.
  • `12` - 12fps
  • `15` - 15fps
  • `24` - 24fps
  • `23.976` - 23.976fps
  • `25` (default) - 25fps
  • `29.97` - 29.97fps
  • `30` - 30fps
  • `48` - 48fps
  • `50` - 50fps
  • `59.94` - 59.94fps
  • `60` - 60fps
- * @param {module:model/Rendition.FpsEnum} fps Change the frame rate of a video asset.
  • `12` - 12fps
  • `15` - 15fps
  • `24` - 24fps
  • `23.976` - 23.976fps
  • `25` (default) - 25fps
  • `29.97` - 29.97fps
  • `30` - 30fps
  • `48` - 48fps
  • `50` - 50fps
  • `59.94` - 59.94fps
  • `60` - 60fps
- */ - }, { - key: "setFps", - value: function setFps(fps) { - this['fps'] = fps; - return this; - } - /** - * @return {module:model/Speed} - */ - }, { - key: "getSpeed", - value: function getSpeed() { - return this.speed; - } - - /** - * @param {module:model/Speed} speed - */ - }, { - key: "setSpeed", - value: function setSpeed(speed) { - this['speed'] = speed; - return this; - } - /** - * Returns The keyframe interval is useful to optimize playback, seeking and smoother scrubbing in browsers. The value sets the number of frames between a keyframe. The lower the number, the larger the file. Try a value between 10 and 25 for smooth scrubbing. - * minimum: 1 - * maximum: 300 - * @return {Number} - */ - }, { - key: "getKeyframeInterval", - value: function getKeyframeInterval() { - return this.keyframeInterval; - } - - /** - * Sets The keyframe interval is useful to optimize playback, seeking and smoother scrubbing in browsers. The value sets the number of frames between a keyframe. The lower the number, the larger the file. Try a value between 10 and 25 for smooth scrubbing. - * @param {Number} keyframeInterval The keyframe interval is useful to optimize playback, seeking and smoother scrubbing in browsers. The value sets the number of frames between a keyframe. The lower the number, the larger the file. Try a value between 10 and 25 for smooth scrubbing. - */ - }, { - key: "setKeyframeInterval", - value: function setKeyframeInterval(keyframeInterval) { - this['keyframeInterval'] = keyframeInterval; - return this; - } - /** - * Returns Attempt to fix audio and video sync issues. This can occur when recording devices, such as smartphones and web cams use compression techniques like [Variable Frame Rate](https://en.wikipedia.org/wiki/Variable_frame_rate) (VFR) which can cause audio and video to go out of sync. This option will attempt to fix the sync issues. - * @return {Boolean} - */ - }, { - key: "getFixOffset", - value: function getFixOffset() { - return this.fixOffset; - } - - /** - * Sets Attempt to fix audio and video sync issues. This can occur when recording devices, such as smartphones and web cams use compression techniques like [Variable Frame Rate](https://en.wikipedia.org/wiki/Variable_frame_rate) (VFR) which can cause audio and video to go out of sync. This option will attempt to fix the sync issues. - * @param {Boolean} fixOffset Attempt to fix audio and video sync issues. This can occur when recording devices, such as smartphones and web cams use compression techniques like [Variable Frame Rate](https://en.wikipedia.org/wiki/Variable_frame_rate) (VFR) which can cause audio and video to go out of sync. This option will attempt to fix the sync issues. - */ - }, { - key: "setFixOffset", - value: function setFixOffset(fixOffset) { - this['fixOffset'] = fixOffset; - return this; - } - /** - * Returns Automatically reset the rotation of the video based on the orientation metadata in the video file. This is useful for videos recorded on smartphones that have orientation metadata that may not work correctly with certain video editing software, including the Shotstack Edit API. - * @return {Boolean} - */ - }, { - key: "getFixRotation", - value: function getFixRotation() { - return this.fixRotation; - } - - /** - * Sets Automatically reset the rotation of the video based on the orientation metadata in the video file. This is useful for videos recorded on smartphones that have orientation metadata that may not work correctly with certain video editing software, including the Shotstack Edit API. - * @param {Boolean} fixRotation Automatically reset the rotation of the video based on the orientation metadata in the video file. This is useful for videos recorded on smartphones that have orientation metadata that may not work correctly with certain video editing software, including the Shotstack Edit API. - */ - }, { - key: "setFixRotation", - value: function setFixRotation(fixRotation) { - this['fixRotation'] = fixRotation; - return this; - } - /** - * @return {module:model/Enhancements} - */ - }, { - key: "getEnhance", - value: function getEnhance() { - return this.enhance; - } - - /** - * @param {module:model/Enhancements} enhance - */ - }, { - key: "setEnhance", - value: function setEnhance(enhance) { - this['enhance'] = enhance; - return this; - } - /** - * Returns A custom name for the generated rendition file. The file extension will be automatically added based on the format of the rendition. If no filename is provided, the rendition ID will be used. - * @return {String} - */ - }, { - key: "getFilename", - value: function getFilename() { - return this.filename; - } - - /** - * Sets A custom name for the generated rendition file. The file extension will be automatically added based on the format of the rendition. If no filename is provided, the rendition ID will be used. - * @param {String} filename A custom name for the generated rendition file. The file extension will be automatically added based on the format of the rendition. If no filename is provided, the rendition ID will be used. - */ - }, { - key: "setFilename", - value: function setFilename(filename) { - this['filename'] = filename; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Rendition from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Rendition} obj Optional instance to populate. - * @return {module:model/Rendition} The populated Rendition instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Rendition(); - if (data.hasOwnProperty('format')) { - obj['format'] = _ApiClient["default"].convertToType(data['format'], 'String'); - } - if (data.hasOwnProperty('size')) { - obj['size'] = _Size["default"].constructFromObject(data['size']); - } - if (data.hasOwnProperty('fit')) { - obj['fit'] = _ApiClient["default"].convertToType(data['fit'], 'String'); - } - if (data.hasOwnProperty('resolution')) { - obj['resolution'] = _ApiClient["default"].convertToType(data['resolution'], 'String'); - } - if (data.hasOwnProperty('quality')) { - obj['quality'] = _ApiClient["default"].convertToType(data['quality'], 'Number'); - } - if (data.hasOwnProperty('fps')) { - obj['fps'] = _ApiClient["default"].convertToType(data['fps'], 'Number'); - } - if (data.hasOwnProperty('speed')) { - obj['speed'] = _Speed["default"].constructFromObject(data['speed']); - } - if (data.hasOwnProperty('keyframeInterval')) { - obj['keyframeInterval'] = _ApiClient["default"].convertToType(data['keyframeInterval'], 'Number'); - } - if (data.hasOwnProperty('fixOffset')) { - obj['fixOffset'] = _ApiClient["default"].convertToType(data['fixOffset'], 'Boolean'); - } - if (data.hasOwnProperty('fixRotation')) { - obj['fixRotation'] = _ApiClient["default"].convertToType(data['fixRotation'], 'Boolean'); - } - if (data.hasOwnProperty('enhance')) { - obj['enhance'] = _Enhancements["default"].constructFromObject(data['enhance']); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Rendition. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Rendition. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['format'] && !(typeof data['format'] === 'string' || data['format'] instanceof String)) { - throw new Error("Expected the field `format` to be a primitive type in the JSON string but got " + data['format']); - } - // validate the optional field `size` - if (data['size']) { - // data not null - _Size["default"].validateJSON(data['size']); - } - // ensure the json data is a string - if (data['fit'] && !(typeof data['fit'] === 'string' || data['fit'] instanceof String)) { - throw new Error("Expected the field `fit` to be a primitive type in the JSON string but got " + data['fit']); - } - // ensure the json data is a string - if (data['resolution'] && !(typeof data['resolution'] === 'string' || data['resolution'] instanceof String)) { - throw new Error("Expected the field `resolution` to be a primitive type in the JSON string but got " + data['resolution']); - } - // validate the optional field `speed` - if (data['speed']) { - // data not null - _Speed["default"].validateJSON(data['speed']); - } - // ensure the json data is a string - if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) { - throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']); - } - return true; - } - }]); -}(); -/** - * The output format to encode the file to. You can only encode a file to the same type, i.e. a video to a video or an image to an image. You can't encode a video as an image. The following formats are available:
  • `mp4` - mp4 video file (video only)
  • `webm` - webm video file (video only)
  • `mov` - mov video file (video only)
  • `avi` - avi video file (video only)
  • `mkv` - mkv video file (video only)
  • `ogv` - ogv video file (video only)
  • `wmv` - wmv video file (video only)
  • `avif` - avif video file (video only)
  • `gif` - animated gif file (video only)
  • `jpg` - jpg image file (image only)
  • `png` - png image file (image only)
  • `webp` - webp image file (image only)
  • `tif` - tif image file (image only)
  • `mp3` - mp3 audio file (audio only)
  • `wav` - wav audio file (audio only)
- * @member {module:model/Rendition.FormatEnum} format - */ -Rendition.prototype['format'] = undefined; - -/** - * @member {module:model/Size} size - */ -Rendition.prototype['size'] = undefined; - -/** - * Set how the rendition should be scaled and cropped when using a size with an aspect ratio that is different from the source. Fit applies to both videos and images.
  • `crop` (default) - scale the rendition to fill the output area while maintaining the aspect ratio. The rendition will be cropped if it exceeds the bounds of the output.
  • `cover` - stretch the rendition to fill the output without maintaining the aspect ratio.
  • `contain` - fit the entire rendition within the output while maintaining the original aspect ratio.
- * @member {module:model/Rendition.FitEnum} fit - */ -Rendition.prototype['fit'] = undefined; - -/** - * The preset output resolution of the video or image. This is a convenience property that sets the width and height based on industry standard resolutions. The following resolutions are available:
  • `preview` - 512px x 288px
  • `mobile` - 640px x 360px
  • `sd` - 1024px x 576px
  • `hd` - 1280px x 720px
  • `fhd` - 1920px x 1080px
- * @member {module:model/Rendition.ResolutionEnum} resolution - */ -Rendition.prototype['resolution'] = undefined; - -/** - * Adjust the visual quality of the video or image. The higher the value, the sharper the image quality but the larger file size and slower the encoding process. When specifying quality, the goal is to balance file size vs visual quality. Quality is a value between 1 and 100 where 1 is fully compressed with low image quality and 100 is close to lossless with high image quality and large file size. Sane values are between 50 and 75. Omitting the quality parameter will result in an asset optimised for encoding speed, file size and visual quality. - * @member {Number} quality - */ -Rendition.prototype['quality'] = undefined; - -/** - * Change the frame rate of a video asset.
  • `12` - 12fps
  • `15` - 15fps
  • `24` - 24fps
  • `23.976` - 23.976fps
  • `25` (default) - 25fps
  • `29.97` - 29.97fps
  • `30` - 30fps
  • `48` - 48fps
  • `50` - 50fps
  • `59.94` - 59.94fps
  • `60` - 60fps
- * @member {module:model/Rendition.FpsEnum} fps - */ -Rendition.prototype['fps'] = undefined; - -/** - * @member {module:model/Speed} speed - */ -Rendition.prototype['speed'] = undefined; - -/** - * The keyframe interval is useful to optimize playback, seeking and smoother scrubbing in browsers. The value sets the number of frames between a keyframe. The lower the number, the larger the file. Try a value between 10 and 25 for smooth scrubbing. - * @member {Number} keyframeInterval - */ -Rendition.prototype['keyframeInterval'] = undefined; - -/** - * Attempt to fix audio and video sync issues. This can occur when recording devices, such as smartphones and web cams use compression techniques like [Variable Frame Rate](https://en.wikipedia.org/wiki/Variable_frame_rate) (VFR) which can cause audio and video to go out of sync. This option will attempt to fix the sync issues. - * @member {Boolean} fixOffset - */ -Rendition.prototype['fixOffset'] = undefined; - -/** - * Automatically reset the rotation of the video based on the orientation metadata in the video file. This is useful for videos recorded on smartphones that have orientation metadata that may not work correctly with certain video editing software, including the Shotstack Edit API. - * @member {Boolean} fixRotation - */ -Rendition.prototype['fixRotation'] = undefined; - -/** - * @member {module:model/Enhancements} enhance - */ -Rendition.prototype['enhance'] = undefined; - -/** - * A custom name for the generated rendition file. The file extension will be automatically added based on the format of the rendition. If no filename is provided, the rendition ID will be used. - * @member {String} filename - */ -Rendition.prototype['filename'] = undefined; - -/** - * Allowed values for the format property. - * @enum {String} - * @readonly - */ -Rendition['FormatEnum'] = { - /** - * value: "mp4" - * @const - */ - "mp4": "mp4", - /** - * value: "webm" - * @const - */ - "webm": "webm", - /** - * value: "mov" - * @const - */ - "mov": "mov", - /** - * value: "avi" - * @const - */ - "avi": "avi", - /** - * value: "mkv" - * @const - */ - "mkv": "mkv", - /** - * value: "ogv" - * @const - */ - "ogv": "ogv", - /** - * value: "wmv" - * @const - */ - "wmv": "wmv", - /** - * value: "avif" - * @const - */ - "avif": "avif", - /** - * value: "gif" - * @const - */ - "gif": "gif", - /** - * value: "mp3" - * @const - */ - "mp3": "mp3", - /** - * value: "wav" - * @const - */ - "wav": "wav", - /** - * value: "jpg" - * @const - */ - "jpg": "jpg", - /** - * value: "png" - * @const - */ - "png": "png", - /** - * value: "webp" - * @const - */ - "webp": "webp", - /** - * value: "tif" - * @const - */ - "tif": "tif" -}; - -/** - * Allowed values for the fit property. - * @enum {String} - * @readonly - */ -Rendition['FitEnum'] = { - /** - * value: "cover" - * @const - */ - "cover": "cover", - /** - * value: "contain" - * @const - */ - "contain": "contain", - /** - * value: "crop" - * @const - */ - "crop": "crop" -}; - -/** - * Allowed values for the resolution property. - * @enum {String} - * @readonly - */ -Rendition['ResolutionEnum'] = { - /** - * value: "preview" - * @const - */ - "preview": "preview", - /** - * value: "mobile" - * @const - */ - "mobile": "mobile", - /** - * value: "sd" - * @const - */ - "sd": "sd", - /** - * value: "hd" - * @const - */ - "hd": "hd", - /** - * value: "fhd" - * @const - */ - "fhd": "fhd" -}; - -/** - * Allowed values for the fps property. - * @enum {Number} - * @readonly - */ -Rendition['FpsEnum'] = { - /** - * value: 12 - * @const - */ - "12": 12, - /** - * value: 15 - * @const - */ - "15": 15, - /** - * value: 23.976 - * @const - */ - "23.976": 23.976, - /** - * value: 24 - * @const - */ - "24": 24, - /** - * value: 25 - * @const - */ - "25": 25, - /** - * value: 29.97 - * @const - */ - "29.97": 29.97, - /** - * value: 30 - * @const - */ - "30": 30, - /** - * value: 48 - * @const - */ - "48": 48, - /** - * value: 50 - * @const - */ - "50": 50, - /** - * value: 59.94 - * @const - */ - "59.94": 59.94, - /** - * value: 60 - * @const - */ - "60": 60 -}; -var _default = exports["default"] = Rendition; \ No newline at end of file diff --git a/src/model/RenditionResponseAttributes.js b/src/model/RenditionResponseAttributes.js deleted file mode 100644 index 94b7e54..0000000 --- a/src/model/RenditionResponseAttributes.js +++ /dev/null @@ -1,416 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Rendition = _interopRequireDefault(require("./Rendition")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The RenditionResponseAttributes model module. - * @module model/RenditionResponseAttributes - * @version 0.2.9 - */ -var RenditionResponseAttributes = /*#__PURE__*/function () { - /** - * Constructs a new RenditionResponseAttributes. - * The id and attributes of the generated rendition file. - * @alias module:model/RenditionResponseAttributes - * @param id {String} The rendition id. - */ - function RenditionResponseAttributes(id) { - _classCallCheck(this, RenditionResponseAttributes); - RenditionResponseAttributes.initialize(this, id); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(RenditionResponseAttributes, [{ - key: "getId", - value: - /** - * Returns The rendition id. - * @return {String} - */ - function getId() { - return this.id; - } - - /** - * Sets The rendition id. - * @param {String} id The rendition id. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns The status of the rendition transformation task.
  • `waiting` - rendition task is waiting for source file to become available
  • `queued` - rendition task is queued waiting to be processed
  • `processing` - the rendition is being processed
  • `ready` - the rendition is ready to be downloaded
  • `failed` - there was an error creating the rendition
  • `deleted` - the rendition has been deleted
- * @return {module:model/RenditionResponseAttributes.StatusEnum} - */ - }, { - key: "getStatus", - value: function getStatus() { - return this.status; - } - - /** - * Sets The status of the rendition transformation task.
  • `waiting` - rendition task is waiting for source file to become available
  • `queued` - rendition task is queued waiting to be processed
  • `processing` - the rendition is being processed
  • `ready` - the rendition is ready to be downloaded
  • `failed` - there was an error creating the rendition
  • `deleted` - the rendition has been deleted
- * @param {module:model/RenditionResponseAttributes.StatusEnum} status The status of the rendition transformation task.
  • `waiting` - rendition task is waiting for source file to become available
  • `queued` - rendition task is queued waiting to be processed
  • `processing` - the rendition is being processed
  • `ready` - the rendition is ready to be downloaded
  • `failed` - there was an error creating the rendition
  • `deleted` - the rendition has been deleted
- */ - }, { - key: "setStatus", - value: function setStatus(status) { - this['status'] = status; - return this; - } - /** - * Returns The URL of the rendition file hosted by Shotstack. The file at the URL can be used by the Edit API. Source file URL's consist of a base URL (AWS bucket), owner id, source id and a file name with the rendition id and extension. - * @return {String} - */ - }, { - key: "getUrl", - value: function getUrl() { - return this.url; - } - - /** - * Sets The URL of the rendition file hosted by Shotstack. The file at the URL can be used by the Edit API. Source file URL's consist of a base URL (AWS bucket), owner id, source id and a file name with the rendition id and extension. - * @param {String} url The URL of the rendition file hosted by Shotstack. The file at the URL can be used by the Edit API. Source file URL's consist of a base URL (AWS bucket), owner id, source id and a file name with the rendition id and extension. - */ - }, { - key: "setUrl", - value: function setUrl(url) { - this['url'] = url; - return this; - } - /** - * Returns The time in milliseconds it took to process the rendition. - * @return {Number} - */ - }, { - key: "getExecutionTime", - value: function getExecutionTime() { - return this.executionTime; - } - - /** - * Sets The time in milliseconds it took to process the rendition. - * @param {Number} executionTime The time in milliseconds it took to process the rendition. - */ - }, { - key: "setExecutionTime", - value: function setExecutionTime(executionTime) { - this['executionTime'] = executionTime; - return this; - } - /** - * @return {module:model/Rendition} - */ - }, { - key: "getTransformation", - value: function getTransformation() { - return this.transformation; - } - - /** - * @param {module:model/Rendition} transformation - */ - }, { - key: "setTransformation", - value: function setTransformation(transformation) { - this['transformation'] = transformation; - return this; - } - /** - * Returns The width in pixels of the ingested source file, if a video or image. - * @return {Number} - */ - }, { - key: "getWidth", - value: function getWidth() { - return this.width; - } - - /** - * Sets The width in pixels of the ingested source file, if a video or image. - * @param {Number} width The width in pixels of the ingested source file, if a video or image. - */ - }, { - key: "setWidth", - value: function setWidth(width) { - this['width'] = width; - return this; - } - /** - * Returns The height in pixels of the ingested source file, if a video or image. - * @return {Number} - */ - }, { - key: "getHeight", - value: function getHeight() { - return this.height; - } - - /** - * Sets The height in pixels of the ingested source file, if a video or image. - * @param {Number} height The height in pixels of the ingested source file, if a video or image. - */ - }, { - key: "setHeight", - value: function setHeight(height) { - this['height'] = height; - return this; - } - /** - * Returns The duration in seconds of the ingested source file, if a video or audio file. - * @return {Number} - */ - }, { - key: "getDuration", - value: function getDuration() { - return this.duration; - } - - /** - * Sets The duration in seconds of the ingested source file, if a video or audio file. - * @param {Number} duration The duration in seconds of the ingested source file, if a video or audio file. - */ - }, { - key: "setDuration", - value: function setDuration(duration) { - this['duration'] = duration; - return this; - } - /** - * Returns The frame rate in frames per second of the source file, if a video file. - * @return {Number} - */ - }, { - key: "getFps", - value: function getFps() { - return this.fps; - } - - /** - * Sets The frame rate in frames per second of the source file, if a video file. - * @param {Number} fps The frame rate in frames per second of the source file, if a video file. - */ - }, { - key: "setFps", - value: function setFps(fps) { - this['fps'] = fps; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, id) { - obj['id'] = id; - } - - /** - * Constructs a RenditionResponseAttributes from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/RenditionResponseAttributes} obj Optional instance to populate. - * @return {module:model/RenditionResponseAttributes} The populated RenditionResponseAttributes instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new RenditionResponseAttributes(); - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('url')) { - obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String'); - } - if (data.hasOwnProperty('executionTime')) { - obj['executionTime'] = _ApiClient["default"].convertToType(data['executionTime'], 'Number'); - } - if (data.hasOwnProperty('transformation')) { - obj['transformation'] = _Rendition["default"].constructFromObject(data['transformation']); - } - if (data.hasOwnProperty('width')) { - obj['width'] = _ApiClient["default"].convertToType(data['width'], 'Number'); - } - if (data.hasOwnProperty('height')) { - obj['height'] = _ApiClient["default"].convertToType(data['height'], 'Number'); - } - if (data.hasOwnProperty('duration')) { - obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number'); - } - if (data.hasOwnProperty('fps')) { - obj['fps'] = _ApiClient["default"].convertToType(data['fps'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to RenditionResponseAttributes. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to RenditionResponseAttributes. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(RenditionResponseAttributes.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // ensure the json data is a string - if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { - throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); - } - // validate the optional field `transformation` - if (data['transformation']) { - // data not null - _Rendition["default"].validateJSON(data['transformation']); - } - return true; - } - }]); -}(); -RenditionResponseAttributes.RequiredProperties = ["id"]; - -/** - * The rendition id. - * @member {String} id - */ -RenditionResponseAttributes.prototype['id'] = undefined; - -/** - * The status of the rendition transformation task.
  • `waiting` - rendition task is waiting for source file to become available
  • `queued` - rendition task is queued waiting to be processed
  • `processing` - the rendition is being processed
  • `ready` - the rendition is ready to be downloaded
  • `failed` - there was an error creating the rendition
  • `deleted` - the rendition has been deleted
- * @member {module:model/RenditionResponseAttributes.StatusEnum} status - */ -RenditionResponseAttributes.prototype['status'] = undefined; - -/** - * The URL of the rendition file hosted by Shotstack. The file at the URL can be used by the Edit API. Source file URL's consist of a base URL (AWS bucket), owner id, source id and a file name with the rendition id and extension. - * @member {String} url - */ -RenditionResponseAttributes.prototype['url'] = undefined; - -/** - * The time in milliseconds it took to process the rendition. - * @member {Number} executionTime - */ -RenditionResponseAttributes.prototype['executionTime'] = undefined; - -/** - * @member {module:model/Rendition} transformation - */ -RenditionResponseAttributes.prototype['transformation'] = undefined; - -/** - * The width in pixels of the ingested source file, if a video or image. - * @member {Number} width - */ -RenditionResponseAttributes.prototype['width'] = undefined; - -/** - * The height in pixels of the ingested source file, if a video or image. - * @member {Number} height - */ -RenditionResponseAttributes.prototype['height'] = undefined; - -/** - * The duration in seconds of the ingested source file, if a video or audio file. - * @member {Number} duration - */ -RenditionResponseAttributes.prototype['duration'] = undefined; - -/** - * The frame rate in frames per second of the source file, if a video file. - * @member {Number} fps - */ -RenditionResponseAttributes.prototype['fps'] = undefined; - -/** - * Allowed values for the status property. - * @enum {String} - * @readonly - */ -RenditionResponseAttributes['StatusEnum'] = { - /** - * value: "queued" - * @const - */ - "queued": "queued", - /** - * value: "importing" - * @const - */ - "importing": "importing", - /** - * value: "ready" - * @const - */ - "ready": "ready", - /** - * value: "failed" - * @const - */ - "failed": "failed", - /** - * value: "deleted" - * @const - */ - "deleted": "deleted", - /** - * value: "overwritten" - * @const - */ - "overwritten": "overwritten" -}; -var _default = exports["default"] = RenditionResponseAttributes; \ No newline at end of file diff --git a/src/model/RotateTransformation.js b/src/model/RotateTransformation.js deleted file mode 100644 index 88e0684..0000000 --- a/src/model/RotateTransformation.js +++ /dev/null @@ -1,111 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _RotateTransformationAngle = _interopRequireDefault(require("./RotateTransformationAngle")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The RotateTransformation model module. - * @module model/RotateTransformation - * @version 0.2.9 - */ -var RotateTransformation = /*#__PURE__*/function () { - /** - * Constructs a new RotateTransformation. - * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`. - * @alias module:model/RotateTransformation - */ - function RotateTransformation() { - _classCallCheck(this, RotateTransformation); - RotateTransformation.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(RotateTransformation, [{ - key: "getAngle", - value: - /** - * @return {module:model/RotateTransformationAngle} - */ - function getAngle() { - return this.angle; - } - - /** - * @param {module:model/RotateTransformationAngle} angle - */ - }, { - key: "setAngle", - value: function setAngle(angle) { - this['angle'] = angle; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a RotateTransformation from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/RotateTransformation} obj Optional instance to populate. - * @return {module:model/RotateTransformation} The populated RotateTransformation instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new RotateTransformation(); - if (data.hasOwnProperty('angle')) { - obj['angle'] = _RotateTransformationAngle["default"].constructFromObject(data['angle']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to RotateTransformation. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to RotateTransformation. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // validate the optional field `angle` - if (data['angle']) { - // data not null - _RotateTransformationAngle["default"].validateJSON(data['angle']); - } - return true; - } - }]); -}(); -/** - * @member {module:model/RotateTransformationAngle} angle - */ -RotateTransformation.prototype['angle'] = undefined; -var _default = exports["default"] = RotateTransformation; \ No newline at end of file diff --git a/src/model/RotateTransformationAngle.js b/src/model/RotateTransformationAngle.js deleted file mode 100644 index 0ff2b5f..0000000 --- a/src/model/RotateTransformationAngle.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Tween = _interopRequireDefault(require("./Tween")); -var _RotateTransformationAngle; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The RotateTransformationAngle model module. - * @module model/RotateTransformationAngle - * @version 0.2.9 - */ -var RotateTransformationAngle = /*#__PURE__*/function () { - /** - * Constructs a new RotateTransformationAngle. - * Rotate a clip by the specified angle in degrees. Use a number or an array of [Tween](./#tocs_tween) objects to create a custom animation. - * @alias module:model/RotateTransformationAngle - * @param {(module:model/Number|module:model/[Tween])} instance The actual instance to initialize RotateTransformationAngle. - */ - function RotateTransformationAngle() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, RotateTransformationAngle); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // The angle to rotate the clip. Can be 0 to 360, or 0 to -360. Using a positive number rotates the clip clockwise, negative numbers counter-clockwise. - try { - // validate integer - if (!(typeof instance === 'number' && instance % 1 === 0)) { - throw new Error("Invalid value. Must be integer. Input: " + JSON.stringify(instance)); - } - if (instance > 360 || instance < -360) { - throw new Error("Invalid integer value. Max.: 360. Min.: -360. Input: " + JSON.stringify(instance)); - } - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // An array of [Tween](./#tocs_tween) objects used to create a custom animation. Animate the rotation of an asset over time. - try { - if (typeof instance === "[Tween]") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - [_Tween["default"]].validateJSON(instance); // throw an exception if no match - // create [Tween] from JS object - this.actualInstance = [_Tween["default"]].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into [Tween] - errorMessages.push("Failed to construct [Tween]: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `RotateTransformationAngle` with oneOf schemas Number, [Tween]. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `RotateTransformationAngle` with oneOf schemas Number, [Tween]. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a RotateTransformationAngle from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/RotateTransformationAngle} obj Optional instance to populate. - * @return {module:model/RotateTransformationAngle} The populated RotateTransformationAngle instance. - */ - return _createClass(RotateTransformationAngle, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, [Tween]. - * @return {(module:model/Number|module:model/[Tween])} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, [Tween]. - * @param {(module:model/Number|module:model/[Tween])} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = RotateTransformationAngle.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new RotateTransformationAngle(data); - } - }]); -}(); -_RotateTransformationAngle = RotateTransformationAngle; -/** - * Create an instance of RotateTransformationAngle from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/RotateTransformationAngle} An instance of RotateTransformationAngle. - */ -_defineProperty(RotateTransformationAngle, "fromJSON", function (json_string) { - return _RotateTransformationAngle.constructFromObject(JSON.parse(json_string)); -}); -RotateTransformationAngle.OneOf = ["Number", "[Tween]"]; -var _default = exports["default"] = RotateTransformationAngle; \ No newline at end of file diff --git a/src/model/S3Destination.js b/src/model/S3Destination.js deleted file mode 100644 index 675d21d..0000000 --- a/src/model/S3Destination.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _S3DestinationOptions = _interopRequireDefault(require("./S3DestinationOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The S3Destination model module. - * @module model/S3Destination - * @version 0.2.9 - */ -var S3Destination = /*#__PURE__*/function () { - /** - * Constructs a new S3Destination. - * Send videos and assets to an [Amazon S3](https://shotstack.io/docs/guide/serving-assets/destinations/s3/) bucket. Send files to any region with your own prefix and filename. AWS credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/s3), not in the request. - * @alias module:model/S3Destination - * @param provider {String} The destination to send assets to - set to `s3` for S3. - */ - function S3Destination(provider) { - _classCallCheck(this, S3Destination); - S3Destination.initialize(this, provider); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(S3Destination, [{ - key: "getProvider", - value: - /** - * Returns The destination to send assets to - set to `s3` for S3. - * @return {String} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The destination to send assets to - set to `s3` for S3. - * @param {String} provider The destination to send assets to - set to `s3` for S3. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/S3DestinationOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/S3DestinationOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider) { - obj['provider'] = provider || 's3'; - } - - /** - * Constructs a S3Destination from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/S3Destination} obj Optional instance to populate. - * @return {module:model/S3Destination} The populated S3Destination instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new S3Destination(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _S3DestinationOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to S3Destination. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to S3Destination. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(S3Destination.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _S3DestinationOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -S3Destination.RequiredProperties = ["provider"]; - -/** - * The destination to send assets to - set to `s3` for S3. - * @member {String} provider - * @default 's3' - */ -S3Destination.prototype['provider'] = 's3'; - -/** - * @member {module:model/S3DestinationOptions} options - */ -S3Destination.prototype['options'] = undefined; -var _default = exports["default"] = S3Destination; \ No newline at end of file diff --git a/src/model/S3DestinationOptions.js b/src/model/S3DestinationOptions.js deleted file mode 100644 index c498c81..0000000 --- a/src/model/S3DestinationOptions.js +++ /dev/null @@ -1,269 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The S3DestinationOptions model module. - * @module model/S3DestinationOptions - * @version 0.2.9 - */ -var S3DestinationOptions = /*#__PURE__*/function () { - /** - * Constructs a new S3DestinationOptions. - * Pass additional options to control how files are stored in S3. - * @alias module:model/S3DestinationOptions - * @param region {String} Choose the region to send the file to. Must be a valid [AWS region](https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_region) string like `us-east-1` or `ap-southeast-2`. - * @param bucket {String} The bucket name to send files to. The bucket must exist in the AWS account before files can be sent. - */ - function S3DestinationOptions(region, bucket) { - _classCallCheck(this, S3DestinationOptions); - S3DestinationOptions.initialize(this, region, bucket); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(S3DestinationOptions, [{ - key: "getRegion", - value: - /** - * Returns Choose the region to send the file to. Must be a valid [AWS region](https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_region) string like `us-east-1` or `ap-southeast-2`. - * @return {String} - */ - function getRegion() { - return this.region; - } - - /** - * Sets Choose the region to send the file to. Must be a valid [AWS region](https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_region) string like `us-east-1` or `ap-southeast-2`. - * @param {String} region Choose the region to send the file to. Must be a valid [AWS region](https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_region) string like `us-east-1` or `ap-southeast-2`. - */ - }, { - key: "setRegion", - value: function setRegion(region) { - this['region'] = region; - return this; - } - /** - * Returns The bucket name to send files to. The bucket must exist in the AWS account before files can be sent. - * @return {String} - */ - }, { - key: "getBucket", - value: function getBucket() { - return this.bucket; - } - - /** - * Sets The bucket name to send files to. The bucket must exist in the AWS account before files can be sent. - * @param {String} bucket The bucket name to send files to. The bucket must exist in the AWS account before files can be sent. - */ - }, { - key: "setBucket", - value: function setBucket(bucket) { - this['bucket'] = bucket; - return this; - } - /** - * Returns A prefix for the file being sent. This is typically a folder name, i.e. `videos` or `customerId/videos`. - * @return {String} - */ - }, { - key: "getPrefix", - value: function getPrefix() { - return this.prefix; - } - - /** - * Sets A prefix for the file being sent. This is typically a folder name, i.e. `videos` or `customerId/videos`. - * @param {String} prefix A prefix for the file being sent. This is typically a folder name, i.e. `videos` or `customerId/videos`. - */ - }, { - key: "setPrefix", - value: function setPrefix(prefix) { - this['prefix'] = prefix; - return this; - } - /** - * Returns Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - * @return {String} - */ - }, { - key: "getFilename", - value: function getFilename() { - return this.filename; - } - - /** - * Sets Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - * @param {String} filename Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - */ - }, { - key: "setFilename", - value: function setFilename(filename) { - this['filename'] = filename; - return this; - } - /** - * Returns Sets the S3 Access Control List (acl) permissions. Default is `private`. Must use a valid S3 [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl). - * @return {String} - */ - }, { - key: "getAcl", - value: function getAcl() { - return this.acl; - } - - /** - * Sets Sets the S3 Access Control List (acl) permissions. Default is `private`. Must use a valid S3 [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl). - * @param {String} acl Sets the S3 Access Control List (acl) permissions. Default is `private`. Must use a valid S3 [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl). - */ - }, { - key: "setAcl", - value: function setAcl(acl) { - this['acl'] = acl; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, region, bucket) { - obj['region'] = region; - obj['bucket'] = bucket; - } - - /** - * Constructs a S3DestinationOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/S3DestinationOptions} obj Optional instance to populate. - * @return {module:model/S3DestinationOptions} The populated S3DestinationOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new S3DestinationOptions(); - if (data.hasOwnProperty('region')) { - obj['region'] = _ApiClient["default"].convertToType(data['region'], 'String'); - } - if (data.hasOwnProperty('bucket')) { - obj['bucket'] = _ApiClient["default"].convertToType(data['bucket'], 'String'); - } - if (data.hasOwnProperty('prefix')) { - obj['prefix'] = _ApiClient["default"].convertToType(data['prefix'], 'String'); - } - if (data.hasOwnProperty('filename')) { - obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String'); - } - if (data.hasOwnProperty('acl')) { - obj['acl'] = _ApiClient["default"].convertToType(data['acl'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to S3DestinationOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to S3DestinationOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(S3DestinationOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['region'] && !(typeof data['region'] === 'string' || data['region'] instanceof String)) { - throw new Error("Expected the field `region` to be a primitive type in the JSON string but got " + data['region']); - } - // ensure the json data is a string - if (data['bucket'] && !(typeof data['bucket'] === 'string' || data['bucket'] instanceof String)) { - throw new Error("Expected the field `bucket` to be a primitive type in the JSON string but got " + data['bucket']); - } - // ensure the json data is a string - if (data['prefix'] && !(typeof data['prefix'] === 'string' || data['prefix'] instanceof String)) { - throw new Error("Expected the field `prefix` to be a primitive type in the JSON string but got " + data['prefix']); - } - // ensure the json data is a string - if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) { - throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']); - } - // ensure the json data is a string - if (data['acl'] && !(typeof data['acl'] === 'string' || data['acl'] instanceof String)) { - throw new Error("Expected the field `acl` to be a primitive type in the JSON string but got " + data['acl']); - } - return true; - } - }]); -}(); -S3DestinationOptions.RequiredProperties = ["region", "bucket"]; - -/** - * Choose the region to send the file to. Must be a valid [AWS region](https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_region) string like `us-east-1` or `ap-southeast-2`. - * @member {String} region - */ -S3DestinationOptions.prototype['region'] = undefined; - -/** - * The bucket name to send files to. The bucket must exist in the AWS account before files can be sent. - * @member {String} bucket - */ -S3DestinationOptions.prototype['bucket'] = undefined; - -/** - * A prefix for the file being sent. This is typically a folder name, i.e. `videos` or `customerId/videos`. - * @member {String} prefix - */ -S3DestinationOptions.prototype['prefix'] = undefined; - -/** - * Use your own filename instead of the default filenames generated by Shotstack. Note: omit the file extension as this will be appended depending on the output format. Also `-poster.jpg` and `-thumb.jpg` will be appended for poster and thumbnail images. - * @member {String} filename - */ -S3DestinationOptions.prototype['filename'] = undefined; - -/** - * Sets the S3 Access Control List (acl) permissions. Default is `private`. Must use a valid S3 [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl). - * @member {String} acl - */ -S3DestinationOptions.prototype['acl'] = undefined; -var _default = exports["default"] = S3DestinationOptions; \ No newline at end of file diff --git a/src/model/ShotstackDestination.js b/src/model/ShotstackDestination.js deleted file mode 100644 index c41b46e..0000000 --- a/src/model/ShotstackDestination.js +++ /dev/null @@ -1,165 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ShotstackDestination model module. - * @module model/ShotstackDestination - * @version 0.2.9 - */ -var ShotstackDestination = /*#__PURE__*/function () { - /** - * Constructs a new ShotstackDestination. - * Send videos and assets to the [Shotstack hosting and CDN](https://shotstack.io/docs/guide/serving-assets/destinations/shotstack/) service. This destination is enabled by default. - * @alias module:model/ShotstackDestination - * @param provider {String} The destination to send assets to - set to `shotstack` for Shotstack hosting and CDN. - */ - function ShotstackDestination(provider) { - _classCallCheck(this, ShotstackDestination); - ShotstackDestination.initialize(this, provider); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ShotstackDestination, [{ - key: "getProvider", - value: - /** - * Returns The destination to send assets to - set to `shotstack` for Shotstack hosting and CDN. - * @return {String} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The destination to send assets to - set to `shotstack` for Shotstack hosting and CDN. - * @param {String} provider The destination to send assets to - set to `shotstack` for Shotstack hosting and CDN. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * Returns Set to `true` to [opt-out](https://shotstack.io/docs/guide/serving-assets/self-host/) from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering. - * @return {Boolean} - */ - }, { - key: "getExclude", - value: function getExclude() { - return this.exclude; - } - - /** - * Sets Set to `true` to [opt-out](https://shotstack.io/docs/guide/serving-assets/self-host/) from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering. - * @param {Boolean} exclude Set to `true` to [opt-out](https://shotstack.io/docs/guide/serving-assets/self-host/) from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering. - */ - }, { - key: "setExclude", - value: function setExclude(exclude) { - this['exclude'] = exclude; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider) { - obj['provider'] = provider || 'shotstack'; - } - - /** - * Constructs a ShotstackDestination from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ShotstackDestination} obj Optional instance to populate. - * @return {module:model/ShotstackDestination} The populated ShotstackDestination instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ShotstackDestination(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('exclude')) { - obj['exclude'] = _ApiClient["default"].convertToType(data['exclude'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ShotstackDestination. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ShotstackDestination. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ShotstackDestination.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - return true; - } - }]); -}(); -ShotstackDestination.RequiredProperties = ["provider"]; - -/** - * The destination to send assets to - set to `shotstack` for Shotstack hosting and CDN. - * @member {String} provider - * @default 'shotstack' - */ -ShotstackDestination.prototype['provider'] = 'shotstack'; - -/** - * Set to `true` to [opt-out](https://shotstack.io/docs/guide/serving-assets/self-host/) from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering. - * @member {Boolean} exclude - */ -ShotstackDestination.prototype['exclude'] = undefined; -var _default = exports["default"] = ShotstackDestination; \ No newline at end of file diff --git a/src/model/ShotstackGeneratedAsset.js b/src/model/ShotstackGeneratedAsset.js deleted file mode 100644 index 7f10ddc..0000000 --- a/src/model/ShotstackGeneratedAsset.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _ShotstackGeneratedAssetOptions = _interopRequireDefault(require("./ShotstackGeneratedAssetOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ShotstackGeneratedAsset model module. - * @module model/ShotstackGeneratedAsset - * @version 0.2.9 - */ -var ShotstackGeneratedAsset = /*#__PURE__*/function () { - /** - * Constructs a new ShotstackGeneratedAsset. - * Generate assets using the native Shotstack provider. Shotstack provides a text-to-speech and a text-to-image service. The Shotstack provider works natively with your existing API key, no additional credentials are required. - * @alias module:model/ShotstackGeneratedAsset - * @param provider {module:model/ShotstackGeneratedAsset.ProviderEnum} The name of the provider - set to `shotstack` for Shotstack. - * @param options {module:model/ShotstackGeneratedAssetOptions} - */ - function ShotstackGeneratedAsset(provider, options) { - _classCallCheck(this, ShotstackGeneratedAsset); - ShotstackGeneratedAsset.initialize(this, provider, options); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ShotstackGeneratedAsset, [{ - key: "getProvider", - value: - /** - * Returns The name of the provider - set to `shotstack` for Shotstack. - * @return {module:model/ShotstackGeneratedAsset.ProviderEnum} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The name of the provider - set to `shotstack` for Shotstack. - * @param {module:model/ShotstackGeneratedAsset.ProviderEnum} provider The name of the provider - set to `shotstack` for Shotstack. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/ShotstackGeneratedAssetOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/ShotstackGeneratedAssetOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider, options) { - obj['provider'] = provider || 'shotstack'; - obj['options'] = options; - } - - /** - * Constructs a ShotstackGeneratedAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ShotstackGeneratedAsset} obj Optional instance to populate. - * @return {module:model/ShotstackGeneratedAsset} The populated ShotstackGeneratedAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ShotstackGeneratedAsset(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _ShotstackGeneratedAssetOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ShotstackGeneratedAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ShotstackGeneratedAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ShotstackGeneratedAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _ShotstackGeneratedAssetOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -ShotstackGeneratedAsset.RequiredProperties = ["provider", "options"]; - -/** - * The name of the provider - set to `shotstack` for Shotstack. - * @member {module:model/ShotstackGeneratedAsset.ProviderEnum} provider - * @default 'shotstack' - */ -ShotstackGeneratedAsset.prototype['provider'] = 'shotstack'; - -/** - * @member {module:model/ShotstackGeneratedAssetOptions} options - */ -ShotstackGeneratedAsset.prototype['options'] = undefined; - -/** - * Allowed values for the provider property. - * @enum {String} - * @readonly - */ -ShotstackGeneratedAsset['ProviderEnum'] = { - /** - * value: "shotstack" - * @const - */ - "shotstack": "shotstack" -}; -var _default = exports["default"] = ShotstackGeneratedAsset; \ No newline at end of file diff --git a/src/model/ShotstackGeneratedAssetOptions.js b/src/model/ShotstackGeneratedAssetOptions.js deleted file mode 100644 index 4cb1bec..0000000 --- a/src/model/ShotstackGeneratedAssetOptions.js +++ /dev/null @@ -1,244 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _ShotstackImageToVideoOptions = _interopRequireDefault(require("./ShotstackImageToVideoOptions")); -var _ShotstackTextGeneratorOptions = _interopRequireDefault(require("./ShotstackTextGeneratorOptions")); -var _ShotstackTextToImageOptions = _interopRequireDefault(require("./ShotstackTextToImageOptions")); -var _ShotstackTextToSpeechOptions = _interopRequireDefault(require("./ShotstackTextToSpeechOptions")); -var _ShotstackGeneratedAssetOptions; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ShotstackGeneratedAssetOptions model module. - * @module model/ShotstackGeneratedAssetOptions - * @version 0.2.9 - */ -var ShotstackGeneratedAssetOptions = /*#__PURE__*/function () { - /** - * Constructs a new ShotstackGeneratedAssetOptions. - * Generate assets using the native Shotstack provider AI services. - * @alias module:model/ShotstackGeneratedAssetOptions - * @param {(module:model/ShotstackImageToVideoOptions|module:model/ShotstackTextGeneratorOptions|module:model/ShotstackTextToImageOptions|module:model/ShotstackTextToSpeechOptions)} instance The actual instance to initialize ShotstackGeneratedAssetOptions. - */ - function ShotstackGeneratedAssetOptions() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, ShotstackGeneratedAssetOptions); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - try { - if (typeof instance === "ShotstackTextToSpeechOptions") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _ShotstackTextToSpeechOptions["default"].validateJSON(instance); // throw an exception if no match - // create ShotstackTextToSpeechOptions from JS object - this.actualInstance = _ShotstackTextToSpeechOptions["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into ShotstackTextToSpeechOptions - errorMessages.push("Failed to construct ShotstackTextToSpeechOptions: " + err); - } - try { - if (typeof instance === "ShotstackTextToImageOptions") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _ShotstackTextToImageOptions["default"].validateJSON(instance); // throw an exception if no match - // create ShotstackTextToImageOptions from JS object - this.actualInstance = _ShotstackTextToImageOptions["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into ShotstackTextToImageOptions - errorMessages.push("Failed to construct ShotstackTextToImageOptions: " + err); - } - try { - if (typeof instance === "ShotstackTextGeneratorOptions") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _ShotstackTextGeneratorOptions["default"].validateJSON(instance); // throw an exception if no match - // create ShotstackTextGeneratorOptions from JS object - this.actualInstance = _ShotstackTextGeneratorOptions["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into ShotstackTextGeneratorOptions - errorMessages.push("Failed to construct ShotstackTextGeneratorOptions: " + err); - } - try { - if (typeof instance === "ShotstackImageToVideoOptions") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _ShotstackImageToVideoOptions["default"].validateJSON(instance); // throw an exception if no match - // create ShotstackImageToVideoOptions from JS object - this.actualInstance = _ShotstackImageToVideoOptions["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into ShotstackImageToVideoOptions - errorMessages.push("Failed to construct ShotstackImageToVideoOptions: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `ShotstackGeneratedAssetOptions` with oneOf schemas ShotstackImageToVideoOptions, ShotstackTextGeneratorOptions, ShotstackTextToImageOptions, ShotstackTextToSpeechOptions. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `ShotstackGeneratedAssetOptions` with oneOf schemas ShotstackImageToVideoOptions, ShotstackTextGeneratorOptions, ShotstackTextToImageOptions, ShotstackTextToSpeechOptions. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a ShotstackGeneratedAssetOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ShotstackGeneratedAssetOptions} obj Optional instance to populate. - * @return {module:model/ShotstackGeneratedAssetOptions} The populated ShotstackGeneratedAssetOptions instance. - */ - return _createClass(ShotstackGeneratedAssetOptions, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be ShotstackImageToVideoOptions, ShotstackTextGeneratorOptions, ShotstackTextToImageOptions, ShotstackTextToSpeechOptions. - * @return {(module:model/ShotstackImageToVideoOptions|module:model/ShotstackTextGeneratorOptions|module:model/ShotstackTextToImageOptions|module:model/ShotstackTextToSpeechOptions)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be ShotstackImageToVideoOptions, ShotstackTextGeneratorOptions, ShotstackTextToImageOptions, ShotstackTextToSpeechOptions. - * @param {(module:model/ShotstackImageToVideoOptions|module:model/ShotstackTextGeneratorOptions|module:model/ShotstackTextToImageOptions|module:model/ShotstackTextToSpeechOptions)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = ShotstackGeneratedAssetOptions.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new ShotstackGeneratedAssetOptions(data); - } - }]); -}(); -/** - * The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @member {module:model/ShotstackGeneratedAssetOptions.TypeEnum} type - * @default 'text-to-speech' - */ -_ShotstackGeneratedAssetOptions = ShotstackGeneratedAssetOptions; -/** - * Create an instance of ShotstackGeneratedAssetOptions from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/ShotstackGeneratedAssetOptions} An instance of ShotstackGeneratedAssetOptions. - */ -_defineProperty(ShotstackGeneratedAssetOptions, "fromJSON", function (json_string) { - return _ShotstackGeneratedAssetOptions.constructFromObject(JSON.parse(json_string)); -}); -ShotstackGeneratedAssetOptions.prototype['type'] = 'text-to-speech'; - -/** - * The text to convert to speech. - * @member {String} text - */ -ShotstackGeneratedAssetOptions.prototype['text'] = undefined; - -/** - * The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets:
  • Arabic - Gulf (ar-AE)
    • `Hala`
  • Dutch - Belgian (nl-BE)
    • `Lisa`
  • Catalan (ca-ES)
    • `Arlet`
  • Chinese - Cantonese (yue-CN)
    • `Hiujin`
  • Chinese - Mandarin (cmn-CN)
    • `Zhiyu`
  • Danish (da-DK)
    • `Sofie`
  • Dutch (nl-NL)
    • `Laura`
  • English - Australian (en-AU)
    • `Olivia`
  • English - British (en-GB)
    • `Amy`
    • `Emma`
    • `Brian`
    • `Arthur`
  • English - Indian (en-IN)
    • `Kajal`
  • English - Ireland (en-IE)
    • `Niamh`
  • English - New Zealand (en-NZ)
    • `Aria`
  • English - South African (en-ZA)
    • `Ayanda`
  • English - US (en-US)
    • `Ivy`
    • `Joanna`
    • `Kendra`
    • `Kimberly`
    • `Salli`
    • `Joey`
    • `Justin`
    • `Kevin`
    • `Matthew`
    • `Ruth`
    • `Stephen`
  • Finnish (fi-FI)
    • `Suvi`
  • French (fr-FR)
    • `Léa`
    • `Rémi`
  • French - Canadian (fr-CA)
    • `Gabrielle`
    • `Liam`
  • German (de-DE)
    • `Vicki`
    • `Daniel`
  • German - Austrian (de-AT)
    • `Hannah`
  • Hindi (hi-IN)
    • `Kajal`
  • Italian (it-IT)
    • `Bianca`
    • `Adriano`
  • Japanese (ja-JP)
    • `Takumi`
    • `Kazuha`
    • `Tomoko`
  • Korean (ko-KR)
    • `Seoyeon`
  • Norwegian (nb-NO)
    • `Ida`
  • Polish (pl-PL)
    • `Ola`
  • Portuguese - Brazilian (pt-BR)
    • `Camila`
    • `Vitória` or `Vitoria`
    • `Thiago`
  • Portuguese - European (pt-PT)
    • `Inês` or `Ines`
  • Spanish (es-ES)
    • `Lucia`
    • `Sergio`
  • Spanish - Mexican (es-MX)
    • `Mia`
    • `Andrés`
  • Spanish - US (es-US)
    • `Lupe`
    • `Pedro`
  • Swedish (sv-SE)
    • `Elin`
- * @member {module:model/ShotstackGeneratedAssetOptions.VoiceEnum} voice - */ -ShotstackGeneratedAssetOptions.prototype['voice'] = undefined; - -/** - * The language code for the text-to-speech conversion. You must pair the correct language with the correct voice (see voice parameter above). Select a language from the list of available languages:
  • `cmn-CN`
  • `da-DK`
  • `de-DE`
  • `en-AU`
  • `en-GB`
  • `en-IN`
  • `en-US`
  • `es-ES`
  • `es-MX`
  • `es-US`
  • `fr-CA`
  • `fr-FR`
  • `it-IT`
  • `ja-JP`
  • `hi-IN`
  • `ko-KR`
  • `nb-NO`
  • `nl-NL`
  • `pl-PL`
  • `pt-BR`
  • `pt-PT`
  • `sv-SE`
  • `en-NZ`
  • `en-ZA`
  • `ca-ES`
  • `de-AT`
  • `yue-CN`
  • `ar-AE`
  • `fi-FI`
- * @member {module:model/ShotstackGeneratedAssetOptions.LanguageEnum} language - * @default 'en-US' - */ -ShotstackGeneratedAssetOptions.prototype['language'] = 'en-US'; - -/** - * Set the voice to newscaster mode.

*Only Matthew and Joanna for US English (en-US), Lupe for US Spanish (es-US), and Amy for British English (en-GB) are available in the newscaster voice. - * @member {Boolean} newscaster - * @default false - */ -ShotstackGeneratedAssetOptions.prototype['newscaster'] = false; - -/** - * The text prompt to generate text from. - * @member {String} prompt - */ -ShotstackGeneratedAssetOptions.prototype['prompt'] = undefined; - -/** - * The width of the image in pixels. - * @member {Number} width - */ -ShotstackGeneratedAssetOptions.prototype['width'] = undefined; - -/** - * The height of the image in pixels. - * @member {Number} height - */ -ShotstackGeneratedAssetOptions.prototype['height'] = undefined; - -/** - * The URL of the image to convert to video. The URL must be publicly accessible or include credentials. The image dimensions must exactly match one of the following: 1024px x 576px, 576px x 1024px or 768px x 768px. - * @member {String} imageUrl - */ -ShotstackGeneratedAssetOptions.prototype['imageUrl'] = undefined; - -/** - * The guidance scale determines how closely the generated video will match the image. Lower numbers allow for more creative freedom. A number between 0 and 10. - * @member {Number} guidanceScale - * @default 1.8 - */ -ShotstackGeneratedAssetOptions.prototype['guidanceScale'] = 1.8; - -/** - * The amount of motion in the video. A number between 1 and 255. - * @member {Number} motion - * @default 127 - */ -ShotstackGeneratedAssetOptions.prototype['motion'] = 127; -ShotstackGeneratedAssetOptions.OneOf = ["ShotstackImageToVideoOptions", "ShotstackTextGeneratorOptions", "ShotstackTextToImageOptions", "ShotstackTextToSpeechOptions"]; -var _default = exports["default"] = ShotstackGeneratedAssetOptions; \ No newline at end of file diff --git a/src/model/ShotstackImageToVideoOptions.js b/src/model/ShotstackImageToVideoOptions.js deleted file mode 100644 index fa81e0b..0000000 --- a/src/model/ShotstackImageToVideoOptions.js +++ /dev/null @@ -1,244 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ShotstackImageToVideoOptions model module. - * @module model/ShotstackImageToVideoOptions - * @version 0.2.9 - */ -var ShotstackImageToVideoOptions = /*#__PURE__*/function () { - /** - * Constructs a new ShotstackImageToVideoOptions. - * Options for the Shotstack image-to-video service. Set the URL of an image to convert in to a video. The output will be generated as an MP4 file available at the URL returned in the response. - * @alias module:model/ShotstackImageToVideoOptions - * @param type {module:model/ShotstackImageToVideoOptions.TypeEnum} The type of asset to generate - set to `image-to-video` for image-to-video. - * @param imageUrl {String} The URL of the image to convert to video. The URL must be publicly accessible or include credentials. The image dimensions must exactly match one of the following: 1024px x 576px, 576px x 1024px or 768px x 768px. - */ - function ShotstackImageToVideoOptions(type, imageUrl) { - _classCallCheck(this, ShotstackImageToVideoOptions); - ShotstackImageToVideoOptions.initialize(this, type, imageUrl); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ShotstackImageToVideoOptions, [{ - key: "getType", - value: - /** - * Returns The type of asset to generate - set to `image-to-video` for image-to-video. - * @return {module:model/ShotstackImageToVideoOptions.TypeEnum} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset to generate - set to `image-to-video` for image-to-video. - * @param {module:model/ShotstackImageToVideoOptions.TypeEnum} type The type of asset to generate - set to `image-to-video` for image-to-video. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The URL of the image to convert to video. The URL must be publicly accessible or include credentials. The image dimensions must exactly match one of the following: 1024px x 576px, 576px x 1024px or 768px x 768px. - * @return {String} - */ - }, { - key: "getImageUrl", - value: function getImageUrl() { - return this.imageUrl; - } - - /** - * Sets The URL of the image to convert to video. The URL must be publicly accessible or include credentials. The image dimensions must exactly match one of the following: 1024px x 576px, 576px x 1024px or 768px x 768px. - * @param {String} imageUrl The URL of the image to convert to video. The URL must be publicly accessible or include credentials. The image dimensions must exactly match one of the following: 1024px x 576px, 576px x 1024px or 768px x 768px. - */ - }, { - key: "setImageUrl", - value: function setImageUrl(imageUrl) { - this['imageUrl'] = imageUrl; - return this; - } - /** - * Returns The guidance scale determines how closely the generated video will match the image. Lower numbers allow for more creative freedom. A number between 0 and 10. - * @return {Number} - */ - }, { - key: "getGuidanceScale", - value: function getGuidanceScale() { - return this.guidanceScale; - } - - /** - * Sets The guidance scale determines how closely the generated video will match the image. Lower numbers allow for more creative freedom. A number between 0 and 10. - * @param {Number} guidanceScale The guidance scale determines how closely the generated video will match the image. Lower numbers allow for more creative freedom. A number between 0 and 10. - */ - }, { - key: "setGuidanceScale", - value: function setGuidanceScale(guidanceScale) { - this['guidanceScale'] = guidanceScale; - return this; - } - /** - * Returns The amount of motion in the video. A number between 1 and 255. - * @return {Number} - */ - }, { - key: "getMotion", - value: function getMotion() { - return this.motion; - } - - /** - * Sets The amount of motion in the video. A number between 1 and 255. - * @param {Number} motion The amount of motion in the video. A number between 1 and 255. - */ - }, { - key: "setMotion", - value: function setMotion(motion) { - this['motion'] = motion; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, imageUrl) { - obj['type'] = type || 'image-to-video'; - obj['imageUrl'] = imageUrl; - } - - /** - * Constructs a ShotstackImageToVideoOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ShotstackImageToVideoOptions} obj Optional instance to populate. - * @return {module:model/ShotstackImageToVideoOptions} The populated ShotstackImageToVideoOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ShotstackImageToVideoOptions(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('imageUrl')) { - obj['imageUrl'] = _ApiClient["default"].convertToType(data['imageUrl'], 'String'); - } - if (data.hasOwnProperty('guidanceScale')) { - obj['guidanceScale'] = _ApiClient["default"].convertToType(data['guidanceScale'], 'Number'); - } - if (data.hasOwnProperty('motion')) { - obj['motion'] = _ApiClient["default"].convertToType(data['motion'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ShotstackImageToVideoOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ShotstackImageToVideoOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ShotstackImageToVideoOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['imageUrl'] && !(typeof data['imageUrl'] === 'string' || data['imageUrl'] instanceof String)) { - throw new Error("Expected the field `imageUrl` to be a primitive type in the JSON string but got " + data['imageUrl']); - } - return true; - } - }]); -}(); -ShotstackImageToVideoOptions.RequiredProperties = ["type", "imageUrl"]; - -/** - * The type of asset to generate - set to `image-to-video` for image-to-video. - * @member {module:model/ShotstackImageToVideoOptions.TypeEnum} type - * @default 'image-to-video' - */ -ShotstackImageToVideoOptions.prototype['type'] = 'image-to-video'; - -/** - * The URL of the image to convert to video. The URL must be publicly accessible or include credentials. The image dimensions must exactly match one of the following: 1024px x 576px, 576px x 1024px or 768px x 768px. - * @member {String} imageUrl - */ -ShotstackImageToVideoOptions.prototype['imageUrl'] = undefined; - -/** - * The guidance scale determines how closely the generated video will match the image. Lower numbers allow for more creative freedom. A number between 0 and 10. - * @member {Number} guidanceScale - * @default 1.8 - */ -ShotstackImageToVideoOptions.prototype['guidanceScale'] = 1.8; - -/** - * The amount of motion in the video. A number between 1 and 255. - * @member {Number} motion - * @default 127 - */ -ShotstackImageToVideoOptions.prototype['motion'] = 127; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -ShotstackImageToVideoOptions['TypeEnum'] = { - /** - * value: "image-to-video" - * @const - */ - "image-to-video": "image-to-video" -}; -var _default = exports["default"] = ShotstackImageToVideoOptions; \ No newline at end of file diff --git a/src/model/ShotstackTextGeneratorOptions.js b/src/model/ShotstackTextGeneratorOptions.js deleted file mode 100644 index fc4460e..0000000 --- a/src/model/ShotstackTextGeneratorOptions.js +++ /dev/null @@ -1,184 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ShotstackTextGeneratorOptions model module. - * @module model/ShotstackTextGeneratorOptions - * @version 0.2.9 - */ -var ShotstackTextGeneratorOptions = /*#__PURE__*/function () { - /** - * Constructs a new ShotstackTextGeneratorOptions. - * Options for the Shotstack text-generator service. Set a text prompt that will be used to generate a new body of text. The output will be generated as a text (txt) file available at the URL returned in the response. - * @alias module:model/ShotstackTextGeneratorOptions - * @param type {module:model/ShotstackTextGeneratorOptions.TypeEnum} The type of asset to generate - set to `text-generator` for text generation. - * @param prompt {String} The text prompt to generate text from. - */ - function ShotstackTextGeneratorOptions(type, prompt) { - _classCallCheck(this, ShotstackTextGeneratorOptions); - ShotstackTextGeneratorOptions.initialize(this, type, prompt); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ShotstackTextGeneratorOptions, [{ - key: "getType", - value: - /** - * Returns The type of asset to generate - set to `text-generator` for text generation. - * @return {module:model/ShotstackTextGeneratorOptions.TypeEnum} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset to generate - set to `text-generator` for text generation. - * @param {module:model/ShotstackTextGeneratorOptions.TypeEnum} type The type of asset to generate - set to `text-generator` for text generation. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The text prompt to generate text from. - * @return {String} - */ - }, { - key: "getPrompt", - value: function getPrompt() { - return this.prompt; - } - - /** - * Sets The text prompt to generate text from. - * @param {String} prompt The text prompt to generate text from. - */ - }, { - key: "setPrompt", - value: function setPrompt(prompt) { - this['prompt'] = prompt; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, prompt) { - obj['type'] = type || 'text-generator'; - obj['prompt'] = prompt; - } - - /** - * Constructs a ShotstackTextGeneratorOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ShotstackTextGeneratorOptions} obj Optional instance to populate. - * @return {module:model/ShotstackTextGeneratorOptions} The populated ShotstackTextGeneratorOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ShotstackTextGeneratorOptions(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('prompt')) { - obj['prompt'] = _ApiClient["default"].convertToType(data['prompt'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ShotstackTextGeneratorOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ShotstackTextGeneratorOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ShotstackTextGeneratorOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['prompt'] && !(typeof data['prompt'] === 'string' || data['prompt'] instanceof String)) { - throw new Error("Expected the field `prompt` to be a primitive type in the JSON string but got " + data['prompt']); - } - return true; - } - }]); -}(); -ShotstackTextGeneratorOptions.RequiredProperties = ["type", "prompt"]; - -/** - * The type of asset to generate - set to `text-generator` for text generation. - * @member {module:model/ShotstackTextGeneratorOptions.TypeEnum} type - * @default 'text-generator' - */ -ShotstackTextGeneratorOptions.prototype['type'] = 'text-generator'; - -/** - * The text prompt to generate text from. - * @member {String} prompt - */ -ShotstackTextGeneratorOptions.prototype['prompt'] = undefined; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -ShotstackTextGeneratorOptions['TypeEnum'] = { - /** - * value: "text-generator" - * @const - */ - "text-generator": "text-generator" -}; -var _default = exports["default"] = ShotstackTextGeneratorOptions; \ No newline at end of file diff --git a/src/model/ShotstackTextToImageOptions.js b/src/model/ShotstackTextToImageOptions.js deleted file mode 100644 index b43a621..0000000 --- a/src/model/ShotstackTextToImageOptions.js +++ /dev/null @@ -1,246 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ShotstackTextToImageOptions model module. - * @module model/ShotstackTextToImageOptions - * @version 0.2.9 - */ -var ShotstackTextToImageOptions = /*#__PURE__*/function () { - /** - * Constructs a new ShotstackTextToImageOptions. - * Options for the Shotstack text-to-image service. Set a text prompt to generate an image from. The output will be generated as a PNG file available at the URL returned in the response. - * @alias module:model/ShotstackTextToImageOptions - * @param type {module:model/ShotstackTextToImageOptions.TypeEnum} The type of asset to generate - set to `text-to-image` for text-to-image. - * @param prompt {String} The text prompt to generate an image from. - * @param width {Number} The width of the image in pixels. - * @param height {Number} The height of the image in pixels. - */ - function ShotstackTextToImageOptions(type, prompt, width, height) { - _classCallCheck(this, ShotstackTextToImageOptions); - ShotstackTextToImageOptions.initialize(this, type, prompt, width, height); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ShotstackTextToImageOptions, [{ - key: "getType", - value: - /** - * Returns The type of asset to generate - set to `text-to-image` for text-to-image. - * @return {module:model/ShotstackTextToImageOptions.TypeEnum} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset to generate - set to `text-to-image` for text-to-image. - * @param {module:model/ShotstackTextToImageOptions.TypeEnum} type The type of asset to generate - set to `text-to-image` for text-to-image. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The text prompt to generate an image from. - * @return {String} - */ - }, { - key: "getPrompt", - value: function getPrompt() { - return this.prompt; - } - - /** - * Sets The text prompt to generate an image from. - * @param {String} prompt The text prompt to generate an image from. - */ - }, { - key: "setPrompt", - value: function setPrompt(prompt) { - this['prompt'] = prompt; - return this; - } - /** - * Returns The width of the image in pixels. - * @return {Number} - */ - }, { - key: "getWidth", - value: function getWidth() { - return this.width; - } - - /** - * Sets The width of the image in pixels. - * @param {Number} width The width of the image in pixels. - */ - }, { - key: "setWidth", - value: function setWidth(width) { - this['width'] = width; - return this; - } - /** - * Returns The height of the image in pixels. - * @return {Number} - */ - }, { - key: "getHeight", - value: function getHeight() { - return this.height; - } - - /** - * Sets The height of the image in pixels. - * @param {Number} height The height of the image in pixels. - */ - }, { - key: "setHeight", - value: function setHeight(height) { - this['height'] = height; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, prompt, width, height) { - obj['type'] = type || 'text-to-image'; - obj['prompt'] = prompt; - obj['width'] = width; - obj['height'] = height; - } - - /** - * Constructs a ShotstackTextToImageOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ShotstackTextToImageOptions} obj Optional instance to populate. - * @return {module:model/ShotstackTextToImageOptions} The populated ShotstackTextToImageOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ShotstackTextToImageOptions(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('prompt')) { - obj['prompt'] = _ApiClient["default"].convertToType(data['prompt'], 'String'); - } - if (data.hasOwnProperty('width')) { - obj['width'] = _ApiClient["default"].convertToType(data['width'], 'Number'); - } - if (data.hasOwnProperty('height')) { - obj['height'] = _ApiClient["default"].convertToType(data['height'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ShotstackTextToImageOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ShotstackTextToImageOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ShotstackTextToImageOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['prompt'] && !(typeof data['prompt'] === 'string' || data['prompt'] instanceof String)) { - throw new Error("Expected the field `prompt` to be a primitive type in the JSON string but got " + data['prompt']); - } - return true; - } - }]); -}(); -ShotstackTextToImageOptions.RequiredProperties = ["type", "prompt", "width", "height"]; - -/** - * The type of asset to generate - set to `text-to-image` for text-to-image. - * @member {module:model/ShotstackTextToImageOptions.TypeEnum} type - * @default 'text-to-image' - */ -ShotstackTextToImageOptions.prototype['type'] = 'text-to-image'; - -/** - * The text prompt to generate an image from. - * @member {String} prompt - */ -ShotstackTextToImageOptions.prototype['prompt'] = undefined; - -/** - * The width of the image in pixels. - * @member {Number} width - */ -ShotstackTextToImageOptions.prototype['width'] = undefined; - -/** - * The height of the image in pixels. - * @member {Number} height - */ -ShotstackTextToImageOptions.prototype['height'] = undefined; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -ShotstackTextToImageOptions['TypeEnum'] = { - /** - * value: "text-to-image" - * @const - */ - "text-to-image": "text-to-image" -}; -var _default = exports["default"] = ShotstackTextToImageOptions; \ No newline at end of file diff --git a/src/model/ShotstackTextToSpeechOptions.js b/src/model/ShotstackTextToSpeechOptions.js deleted file mode 100644 index f50b3a6..0000000 --- a/src/model/ShotstackTextToSpeechOptions.js +++ /dev/null @@ -1,729 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The ShotstackTextToSpeechOptions model module. - * @module model/ShotstackTextToSpeechOptions - * @version 0.2.9 - */ -var ShotstackTextToSpeechOptions = /*#__PURE__*/function () { - /** - * Constructs a new ShotstackTextToSpeechOptions. - * Options for the Shotstack text-to-speech service. Set the text to be converted to speech and choose a voice to set the speaking style. The output will be generated as an MP3 audio file available at the URL returned in the response. - * @alias module:model/ShotstackTextToSpeechOptions - * @param type {module:model/ShotstackTextToSpeechOptions.TypeEnum} The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @param text {String} The text to convert to speech. - * @param voice {module:model/ShotstackTextToSpeechOptions.VoiceEnum} The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets:
  • Arabic - Gulf (ar-AE)
    • `Hala`
  • Dutch - Belgian (nl-BE)
    • `Lisa`
  • Catalan (ca-ES)
    • `Arlet`
  • Chinese - Cantonese (yue-CN)
    • `Hiujin`
  • Chinese - Mandarin (cmn-CN)
    • `Zhiyu`
  • Danish (da-DK)
    • `Sofie`
  • Dutch (nl-NL)
    • `Laura`
  • English - Australian (en-AU)
    • `Olivia`
  • English - British (en-GB)
    • `Amy`
    • `Emma`
    • `Brian`
    • `Arthur`
  • English - Indian (en-IN)
    • `Kajal`
  • English - Ireland (en-IE)
    • `Niamh`
  • English - New Zealand (en-NZ)
    • `Aria`
  • English - South African (en-ZA)
    • `Ayanda`
  • English - US (en-US)
    • `Ivy`
    • `Joanna`
    • `Kendra`
    • `Kimberly`
    • `Salli`
    • `Joey`
    • `Justin`
    • `Kevin`
    • `Matthew`
    • `Ruth`
    • `Stephen`
  • Finnish (fi-FI)
    • `Suvi`
  • French (fr-FR)
    • `Léa`
    • `Rémi`
  • French - Canadian (fr-CA)
    • `Gabrielle`
    • `Liam`
  • German (de-DE)
    • `Vicki`
    • `Daniel`
  • German - Austrian (de-AT)
    • `Hannah`
  • Hindi (hi-IN)
    • `Kajal`
  • Italian (it-IT)
    • `Bianca`
    • `Adriano`
  • Japanese (ja-JP)
    • `Takumi`
    • `Kazuha`
    • `Tomoko`
  • Korean (ko-KR)
    • `Seoyeon`
  • Norwegian (nb-NO)
    • `Ida`
  • Polish (pl-PL)
    • `Ola`
  • Portuguese - Brazilian (pt-BR)
    • `Camila`
    • `Vitória` or `Vitoria`
    • `Thiago`
  • Portuguese - European (pt-PT)
    • `Inês` or `Ines`
  • Spanish (es-ES)
    • `Lucia`
    • `Sergio`
  • Spanish - Mexican (es-MX)
    • `Mia`
    • `Andrés`
  • Spanish - US (es-US)
    • `Lupe`
    • `Pedro`
  • Swedish (sv-SE)
    • `Elin`
- */ - function ShotstackTextToSpeechOptions(type, text, voice) { - _classCallCheck(this, ShotstackTextToSpeechOptions); - ShotstackTextToSpeechOptions.initialize(this, type, text, voice); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(ShotstackTextToSpeechOptions, [{ - key: "getType", - value: - /** - * Returns The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @return {module:model/ShotstackTextToSpeechOptions.TypeEnum} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @param {module:model/ShotstackTextToSpeechOptions.TypeEnum} type The type of asset to generate - set to `text-to-speech` for text-to-speech. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The text to convert to speech. - * @return {String} - */ - }, { - key: "getText", - value: function getText() { - return this.text; - } - - /** - * Sets The text to convert to speech. - * @param {String} text The text to convert to speech. - */ - }, { - key: "setText", - value: function setText(text) { - this['text'] = text; - return this; - } - /** - * Returns The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets:
  • Arabic - Gulf (ar-AE)
    • `Hala`
  • Dutch - Belgian (nl-BE)
    • `Lisa`
  • Catalan (ca-ES)
    • `Arlet`
  • Chinese - Cantonese (yue-CN)
    • `Hiujin`
  • Chinese - Mandarin (cmn-CN)
    • `Zhiyu`
  • Danish (da-DK)
    • `Sofie`
  • Dutch (nl-NL)
    • `Laura`
  • English - Australian (en-AU)
    • `Olivia`
  • English - British (en-GB)
    • `Amy`
    • `Emma`
    • `Brian`
    • `Arthur`
  • English - Indian (en-IN)
    • `Kajal`
  • English - Ireland (en-IE)
    • `Niamh`
  • English - New Zealand (en-NZ)
    • `Aria`
  • English - South African (en-ZA)
    • `Ayanda`
  • English - US (en-US)
    • `Ivy`
    • `Joanna`
    • `Kendra`
    • `Kimberly`
    • `Salli`
    • `Joey`
    • `Justin`
    • `Kevin`
    • `Matthew`
    • `Ruth`
    • `Stephen`
  • Finnish (fi-FI)
    • `Suvi`
  • French (fr-FR)
    • `Léa`
    • `Rémi`
  • French - Canadian (fr-CA)
    • `Gabrielle`
    • `Liam`
  • German (de-DE)
    • `Vicki`
    • `Daniel`
  • German - Austrian (de-AT)
    • `Hannah`
  • Hindi (hi-IN)
    • `Kajal`
  • Italian (it-IT)
    • `Bianca`
    • `Adriano`
  • Japanese (ja-JP)
    • `Takumi`
    • `Kazuha`
    • `Tomoko`
  • Korean (ko-KR)
    • `Seoyeon`
  • Norwegian (nb-NO)
    • `Ida`
  • Polish (pl-PL)
    • `Ola`
  • Portuguese - Brazilian (pt-BR)
    • `Camila`
    • `Vitória` or `Vitoria`
    • `Thiago`
  • Portuguese - European (pt-PT)
    • `Inês` or `Ines`
  • Spanish (es-ES)
    • `Lucia`
    • `Sergio`
  • Spanish - Mexican (es-MX)
    • `Mia`
    • `Andrés`
  • Spanish - US (es-US)
    • `Lupe`
    • `Pedro`
  • Swedish (sv-SE)
    • `Elin`
- * @return {module:model/ShotstackTextToSpeechOptions.VoiceEnum} - */ - }, { - key: "getVoice", - value: function getVoice() { - return this.voice; - } - - /** - * Sets The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets:
  • Arabic - Gulf (ar-AE)
    • `Hala`
  • Dutch - Belgian (nl-BE)
    • `Lisa`
  • Catalan (ca-ES)
    • `Arlet`
  • Chinese - Cantonese (yue-CN)
    • `Hiujin`
  • Chinese - Mandarin (cmn-CN)
    • `Zhiyu`
  • Danish (da-DK)
    • `Sofie`
  • Dutch (nl-NL)
    • `Laura`
  • English - Australian (en-AU)
    • `Olivia`
  • English - British (en-GB)
    • `Amy`
    • `Emma`
    • `Brian`
    • `Arthur`
  • English - Indian (en-IN)
    • `Kajal`
  • English - Ireland (en-IE)
    • `Niamh`
  • English - New Zealand (en-NZ)
    • `Aria`
  • English - South African (en-ZA)
    • `Ayanda`
  • English - US (en-US)
    • `Ivy`
    • `Joanna`
    • `Kendra`
    • `Kimberly`
    • `Salli`
    • `Joey`
    • `Justin`
    • `Kevin`
    • `Matthew`
    • `Ruth`
    • `Stephen`
  • Finnish (fi-FI)
    • `Suvi`
  • French (fr-FR)
    • `Léa`
    • `Rémi`
  • French - Canadian (fr-CA)
    • `Gabrielle`
    • `Liam`
  • German (de-DE)
    • `Vicki`
    • `Daniel`
  • German - Austrian (de-AT)
    • `Hannah`
  • Hindi (hi-IN)
    • `Kajal`
  • Italian (it-IT)
    • `Bianca`
    • `Adriano`
  • Japanese (ja-JP)
    • `Takumi`
    • `Kazuha`
    • `Tomoko`
  • Korean (ko-KR)
    • `Seoyeon`
  • Norwegian (nb-NO)
    • `Ida`
  • Polish (pl-PL)
    • `Ola`
  • Portuguese - Brazilian (pt-BR)
    • `Camila`
    • `Vitória` or `Vitoria`
    • `Thiago`
  • Portuguese - European (pt-PT)
    • `Inês` or `Ines`
  • Spanish (es-ES)
    • `Lucia`
    • `Sergio`
  • Spanish - Mexican (es-MX)
    • `Mia`
    • `Andrés`
  • Spanish - US (es-US)
    • `Lupe`
    • `Pedro`
  • Swedish (sv-SE)
    • `Elin`
- * @param {module:model/ShotstackTextToSpeechOptions.VoiceEnum} voice The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets:
  • Arabic - Gulf (ar-AE)
    • `Hala`
  • Dutch - Belgian (nl-BE)
    • `Lisa`
  • Catalan (ca-ES)
    • `Arlet`
  • Chinese - Cantonese (yue-CN)
    • `Hiujin`
  • Chinese - Mandarin (cmn-CN)
    • `Zhiyu`
  • Danish (da-DK)
    • `Sofie`
  • Dutch (nl-NL)
    • `Laura`
  • English - Australian (en-AU)
    • `Olivia`
  • English - British (en-GB)
    • `Amy`
    • `Emma`
    • `Brian`
    • `Arthur`
  • English - Indian (en-IN)
    • `Kajal`
  • English - Ireland (en-IE)
    • `Niamh`
  • English - New Zealand (en-NZ)
    • `Aria`
  • English - South African (en-ZA)
    • `Ayanda`
  • English - US (en-US)
    • `Ivy`
    • `Joanna`
    • `Kendra`
    • `Kimberly`
    • `Salli`
    • `Joey`
    • `Justin`
    • `Kevin`
    • `Matthew`
    • `Ruth`
    • `Stephen`
  • Finnish (fi-FI)
    • `Suvi`
  • French (fr-FR)
    • `Léa`
    • `Rémi`
  • French - Canadian (fr-CA)
    • `Gabrielle`
    • `Liam`
  • German (de-DE)
    • `Vicki`
    • `Daniel`
  • German - Austrian (de-AT)
    • `Hannah`
  • Hindi (hi-IN)
    • `Kajal`
  • Italian (it-IT)
    • `Bianca`
    • `Adriano`
  • Japanese (ja-JP)
    • `Takumi`
    • `Kazuha`
    • `Tomoko`
  • Korean (ko-KR)
    • `Seoyeon`
  • Norwegian (nb-NO)
    • `Ida`
  • Polish (pl-PL)
    • `Ola`
  • Portuguese - Brazilian (pt-BR)
    • `Camila`
    • `Vitória` or `Vitoria`
    • `Thiago`
  • Portuguese - European (pt-PT)
    • `Inês` or `Ines`
  • Spanish (es-ES)
    • `Lucia`
    • `Sergio`
  • Spanish - Mexican (es-MX)
    • `Mia`
    • `Andrés`
  • Spanish - US (es-US)
    • `Lupe`
    • `Pedro`
  • Swedish (sv-SE)
    • `Elin`
- */ - }, { - key: "setVoice", - value: function setVoice(voice) { - this['voice'] = voice; - return this; - } - /** - * Returns The language code for the text-to-speech conversion. You must pair the correct language with the correct voice (see voice parameter above). Select a language from the list of available languages:
  • `cmn-CN`
  • `da-DK`
  • `de-DE`
  • `en-AU`
  • `en-GB`
  • `en-IN`
  • `en-US`
  • `es-ES`
  • `es-MX`
  • `es-US`
  • `fr-CA`
  • `fr-FR`
  • `it-IT`
  • `ja-JP`
  • `hi-IN`
  • `ko-KR`
  • `nb-NO`
  • `nl-NL`
  • `pl-PL`
  • `pt-BR`
  • `pt-PT`
  • `sv-SE`
  • `en-NZ`
  • `en-ZA`
  • `ca-ES`
  • `de-AT`
  • `yue-CN`
  • `ar-AE`
  • `fi-FI`
- * @return {module:model/ShotstackTextToSpeechOptions.LanguageEnum} - */ - }, { - key: "getLanguage", - value: function getLanguage() { - return this.language; - } - - /** - * Sets The language code for the text-to-speech conversion. You must pair the correct language with the correct voice (see voice parameter above). Select a language from the list of available languages:
  • `cmn-CN`
  • `da-DK`
  • `de-DE`
  • `en-AU`
  • `en-GB`
  • `en-IN`
  • `en-US`
  • `es-ES`
  • `es-MX`
  • `es-US`
  • `fr-CA`
  • `fr-FR`
  • `it-IT`
  • `ja-JP`
  • `hi-IN`
  • `ko-KR`
  • `nb-NO`
  • `nl-NL`
  • `pl-PL`
  • `pt-BR`
  • `pt-PT`
  • `sv-SE`
  • `en-NZ`
  • `en-ZA`
  • `ca-ES`
  • `de-AT`
  • `yue-CN`
  • `ar-AE`
  • `fi-FI`
- * @param {module:model/ShotstackTextToSpeechOptions.LanguageEnum} language The language code for the text-to-speech conversion. You must pair the correct language with the correct voice (see voice parameter above). Select a language from the list of available languages:
  • `cmn-CN`
  • `da-DK`
  • `de-DE`
  • `en-AU`
  • `en-GB`
  • `en-IN`
  • `en-US`
  • `es-ES`
  • `es-MX`
  • `es-US`
  • `fr-CA`
  • `fr-FR`
  • `it-IT`
  • `ja-JP`
  • `hi-IN`
  • `ko-KR`
  • `nb-NO`
  • `nl-NL`
  • `pl-PL`
  • `pt-BR`
  • `pt-PT`
  • `sv-SE`
  • `en-NZ`
  • `en-ZA`
  • `ca-ES`
  • `de-AT`
  • `yue-CN`
  • `ar-AE`
  • `fi-FI`
- */ - }, { - key: "setLanguage", - value: function setLanguage(language) { - this['language'] = language; - return this; - } - /** - * Returns Set the voice to newscaster mode.

*Only Matthew and Joanna for US English (en-US), Lupe for US Spanish (es-US), and Amy for British English (en-GB) are available in the newscaster voice. - * @return {Boolean} - */ - }, { - key: "getNewscaster", - value: function getNewscaster() { - return this.newscaster; - } - - /** - * Sets Set the voice to newscaster mode.

*Only Matthew and Joanna for US English (en-US), Lupe for US Spanish (es-US), and Amy for British English (en-GB) are available in the newscaster voice. - * @param {Boolean} newscaster Set the voice to newscaster mode.

*Only Matthew and Joanna for US English (en-US), Lupe for US Spanish (es-US), and Amy for British English (en-GB) are available in the newscaster voice. - */ - }, { - key: "setNewscaster", - value: function setNewscaster(newscaster) { - this['newscaster'] = newscaster; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, text, voice) { - obj['type'] = type || 'text-to-speech'; - obj['text'] = text; - obj['voice'] = voice; - } - - /** - * Constructs a ShotstackTextToSpeechOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ShotstackTextToSpeechOptions} obj Optional instance to populate. - * @return {module:model/ShotstackTextToSpeechOptions} The populated ShotstackTextToSpeechOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new ShotstackTextToSpeechOptions(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('text')) { - obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String'); - } - if (data.hasOwnProperty('voice')) { - obj['voice'] = _ApiClient["default"].convertToType(data['voice'], 'String'); - } - if (data.hasOwnProperty('language')) { - obj['language'] = _ApiClient["default"].convertToType(data['language'], 'String'); - } - if (data.hasOwnProperty('newscaster')) { - obj['newscaster'] = _ApiClient["default"].convertToType(data['newscaster'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ShotstackTextToSpeechOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ShotstackTextToSpeechOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(ShotstackTextToSpeechOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { - throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); - } - // ensure the json data is a string - if (data['voice'] && !(typeof data['voice'] === 'string' || data['voice'] instanceof String)) { - throw new Error("Expected the field `voice` to be a primitive type in the JSON string but got " + data['voice']); - } - // ensure the json data is a string - if (data['language'] && !(typeof data['language'] === 'string' || data['language'] instanceof String)) { - throw new Error("Expected the field `language` to be a primitive type in the JSON string but got " + data['language']); - } - return true; - } - }]); -}(); -ShotstackTextToSpeechOptions.RequiredProperties = ["type", "text", "voice"]; - -/** - * The type of asset to generate - set to `text-to-speech` for text-to-speech. - * @member {module:model/ShotstackTextToSpeechOptions.TypeEnum} type - * @default 'text-to-speech' - */ -ShotstackTextToSpeechOptions.prototype['type'] = 'text-to-speech'; - -/** - * The text to convert to speech. - * @member {String} text - */ -ShotstackTextToSpeechOptions.prototype['text'] = undefined; - -/** - * The voice to use for the text-to-speech conversion. You must pair the correct voice with the correct language. For each language there is a language code that must be set in the `language` property. The voice must be available for the language code or the conversion will fail. i.e. To use the voice `Zeina` for Arabic you must set the `language` to `arb`. Select a voice from the list of available voices, the language code is in brackets:
  • Arabic - Gulf (ar-AE)
    • `Hala`
  • Dutch - Belgian (nl-BE)
    • `Lisa`
  • Catalan (ca-ES)
    • `Arlet`
  • Chinese - Cantonese (yue-CN)
    • `Hiujin`
  • Chinese - Mandarin (cmn-CN)
    • `Zhiyu`
  • Danish (da-DK)
    • `Sofie`
  • Dutch (nl-NL)
    • `Laura`
  • English - Australian (en-AU)
    • `Olivia`
  • English - British (en-GB)
    • `Amy`
    • `Emma`
    • `Brian`
    • `Arthur`
  • English - Indian (en-IN)
    • `Kajal`
  • English - Ireland (en-IE)
    • `Niamh`
  • English - New Zealand (en-NZ)
    • `Aria`
  • English - South African (en-ZA)
    • `Ayanda`
  • English - US (en-US)
    • `Ivy`
    • `Joanna`
    • `Kendra`
    • `Kimberly`
    • `Salli`
    • `Joey`
    • `Justin`
    • `Kevin`
    • `Matthew`
    • `Ruth`
    • `Stephen`
  • Finnish (fi-FI)
    • `Suvi`
  • French (fr-FR)
    • `Léa`
    • `Rémi`
  • French - Canadian (fr-CA)
    • `Gabrielle`
    • `Liam`
  • German (de-DE)
    • `Vicki`
    • `Daniel`
  • German - Austrian (de-AT)
    • `Hannah`
  • Hindi (hi-IN)
    • `Kajal`
  • Italian (it-IT)
    • `Bianca`
    • `Adriano`
  • Japanese (ja-JP)
    • `Takumi`
    • `Kazuha`
    • `Tomoko`
  • Korean (ko-KR)
    • `Seoyeon`
  • Norwegian (nb-NO)
    • `Ida`
  • Polish (pl-PL)
    • `Ola`
  • Portuguese - Brazilian (pt-BR)
    • `Camila`
    • `Vitória` or `Vitoria`
    • `Thiago`
  • Portuguese - European (pt-PT)
    • `Inês` or `Ines`
  • Spanish (es-ES)
    • `Lucia`
    • `Sergio`
  • Spanish - Mexican (es-MX)
    • `Mia`
    • `Andrés`
  • Spanish - US (es-US)
    • `Lupe`
    • `Pedro`
  • Swedish (sv-SE)
    • `Elin`
- * @member {module:model/ShotstackTextToSpeechOptions.VoiceEnum} voice - */ -ShotstackTextToSpeechOptions.prototype['voice'] = undefined; - -/** - * The language code for the text-to-speech conversion. You must pair the correct language with the correct voice (see voice parameter above). Select a language from the list of available languages:
  • `cmn-CN`
  • `da-DK`
  • `de-DE`
  • `en-AU`
  • `en-GB`
  • `en-IN`
  • `en-US`
  • `es-ES`
  • `es-MX`
  • `es-US`
  • `fr-CA`
  • `fr-FR`
  • `it-IT`
  • `ja-JP`
  • `hi-IN`
  • `ko-KR`
  • `nb-NO`
  • `nl-NL`
  • `pl-PL`
  • `pt-BR`
  • `pt-PT`
  • `sv-SE`
  • `en-NZ`
  • `en-ZA`
  • `ca-ES`
  • `de-AT`
  • `yue-CN`
  • `ar-AE`
  • `fi-FI`
- * @member {module:model/ShotstackTextToSpeechOptions.LanguageEnum} language - * @default 'en-US' - */ -ShotstackTextToSpeechOptions.prototype['language'] = 'en-US'; - -/** - * Set the voice to newscaster mode.

*Only Matthew and Joanna for US English (en-US), Lupe for US Spanish (es-US), and Amy for British English (en-GB) are available in the newscaster voice. - * @member {Boolean} newscaster - * @default false - */ -ShotstackTextToSpeechOptions.prototype['newscaster'] = false; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -ShotstackTextToSpeechOptions['TypeEnum'] = { - /** - * value: "text-to-speech" - * @const - */ - "text-to-speech": "text-to-speech" -}; - -/** - * Allowed values for the voice property. - * @enum {String} - * @readonly - */ -ShotstackTextToSpeechOptions['VoiceEnum'] = { - /** - * value: "Hala" - * @const - */ - "Hala": "Hala", - /** - * value: "Lisa" - * @const - */ - "Lisa": "Lisa", - /** - * value: "Arlet" - * @const - */ - "Arlet": "Arlet", - /** - * value: "Hiujin" - * @const - */ - "Hiujin": "Hiujin", - /** - * value: "Zhiyu" - * @const - */ - "Zhiyu": "Zhiyu", - /** - * value: "Sofie" - * @const - */ - "Sofie": "Sofie", - /** - * value: "Laura" - * @const - */ - "Laura": "Laura", - /** - * value: "Olivia" - * @const - */ - "Olivia": "Olivia", - /** - * value: "Amy" - * @const - */ - "Amy": "Amy", - /** - * value: "Emma" - * @const - */ - "Emma": "Emma", - /** - * value: "Brian" - * @const - */ - "Brian": "Brian", - /** - * value: "Arthur" - * @const - */ - "Arthur": "Arthur", - /** - * value: "Kajal" - * @const - */ - "Kajal": "Kajal", - /** - * value: "Niamh" - * @const - */ - "Niamh": "Niamh", - /** - * value: "Aria" - * @const - */ - "Aria": "Aria", - /** - * value: "Ayanda" - * @const - */ - "Ayanda": "Ayanda", - /** - * value: "Ivy" - * @const - */ - "Ivy": "Ivy", - /** - * value: "Joanna" - * @const - */ - "Joanna": "Joanna", - /** - * value: "Kendra" - * @const - */ - "Kendra": "Kendra", - /** - * value: "Kimberly" - * @const - */ - "Kimberly": "Kimberly", - /** - * value: "Salli" - * @const - */ - "Salli": "Salli", - /** - * value: "Joey" - * @const - */ - "Joey": "Joey", - /** - * value: "Justin" - * @const - */ - "Justin": "Justin", - /** - * value: "Kevin" - * @const - */ - "Kevin": "Kevin", - /** - * value: "Matthew" - * @const - */ - "Matthew": "Matthew", - /** - * value: "Ruth" - * @const - */ - "Ruth": "Ruth", - /** - * value: "Stephen" - * @const - */ - "Stephen": "Stephen", - /** - * value: "Suvi" - * @const - */ - "Suvi": "Suvi", - /** - * value: "Léa" - * @const - */ - "Léa": "Léa", - /** - * value: "Rémi" - * @const - */ - "Rémi": "Rémi", - /** - * value: "Gabrielle" - * @const - */ - "Gabrielle": "Gabrielle", - /** - * value: "Liam" - * @const - */ - "Liam": "Liam", - /** - * value: "Vicki" - * @const - */ - "Vicki": "Vicki", - /** - * value: "Daniel" - * @const - */ - "Daniel": "Daniel", - /** - * value: "Hannah" - * @const - */ - "Hannah": "Hannah", - /** - * value: "Kajal" - * @const - */ - "Kajal2": "Kajal", - /** - * value: "Bianca" - * @const - */ - "Bianca": "Bianca", - /** - * value: "Adriano" - * @const - */ - "Adriano": "Adriano", - /** - * value: "Takumi" - * @const - */ - "Takumi": "Takumi", - /** - * value: "Kazuha" - * @const - */ - "Kazuha": "Kazuha", - /** - * value: "Tomoko" - * @const - */ - "Tomoko": "Tomoko", - /** - * value: "Seoyeon" - * @const - */ - "Seoyeon": "Seoyeon", - /** - * value: "Ida" - * @const - */ - "Ida": "Ida", - /** - * value: "Ola" - * @const - */ - "Ola": "Ola", - /** - * value: "Camila" - * @const - */ - "Camila": "Camila", - /** - * value: "Vitória" - * @const - */ - "Vitória": "Vitória", - /** - * value: "Vitoria" - * @const - */ - "Vitoria": "Vitoria", - /** - * value: "Thiago" - * @const - */ - "Thiago": "Thiago", - /** - * value: "Inês" - * @const - */ - "Inês": "Inês", - /** - * value: "Ines" - * @const - */ - "Ines": "Ines", - /** - * value: "Lucia" - * @const - */ - "Lucia": "Lucia", - /** - * value: "Sergio" - * @const - */ - "Sergio": "Sergio", - /** - * value: "Mia" - * @const - */ - "Mia": "Mia", - /** - * value: "Andrés" - * @const - */ - "Andrés": "Andrés", - /** - * value: "Lupe" - * @const - */ - "Lupe": "Lupe", - /** - * value: "Pedro" - * @const - */ - "Pedro": "Pedro", - /** - * value: "Elin" - * @const - */ - "Elin": "Elin" -}; - -/** - * Allowed values for the language property. - * @enum {String} - * @readonly - */ -ShotstackTextToSpeechOptions['LanguageEnum'] = { - /** - * value: "cmn-CN" - * @const - */ - "cmn-CN": "cmn-CN", - /** - * value: "da-DK" - * @const - */ - "da-DK": "da-DK", - /** - * value: "de-DE" - * @const - */ - "de-DE": "de-DE", - /** - * value: "en-AU" - * @const - */ - "en-AU": "en-AU", - /** - * value: "en-GB" - * @const - */ - "en-GB": "en-GB", - /** - * value: "en-IN" - * @const - */ - "en-IN": "en-IN", - /** - * value: "en-US" - * @const - */ - "en-US": "en-US", - /** - * value: "es-ES" - * @const - */ - "es-ES": "es-ES", - /** - * value: "es-MX" - * @const - */ - "es-MX": "es-MX", - /** - * value: "es-US" - * @const - */ - "es-US": "es-US", - /** - * value: "fr-CA" - * @const - */ - "fr-CA": "fr-CA", - /** - * value: "fr-FR" - * @const - */ - "fr-FR": "fr-FR", - /** - * value: "it-IT" - * @const - */ - "it-IT": "it-IT", - /** - * value: "ja-JP" - * @const - */ - "ja-JP": "ja-JP", - /** - * value: "hi-IN" - * @const - */ - "hi-IN": "hi-IN", - /** - * value: "ko-KR" - * @const - */ - "ko-KR": "ko-KR", - /** - * value: "nb-NO" - * @const - */ - "nb-NO": "nb-NO", - /** - * value: "nl-NL" - * @const - */ - "nl-NL": "nl-NL", - /** - * value: "pl-PL" - * @const - */ - "pl-PL": "pl-PL", - /** - * value: "pt-BR" - * @const - */ - "pt-BR": "pt-BR", - /** - * value: "pt-PT" - * @const - */ - "pt-PT": "pt-PT", - /** - * value: "sv-SE" - * @const - */ - "sv-SE": "sv-SE", - /** - * value: "en-NZ" - * @const - */ - "en-NZ": "en-NZ", - /** - * value: "en-ZA" - * @const - */ - "en-ZA": "en-ZA", - /** - * value: "ca-ES" - * @const - */ - "ca-ES": "ca-ES", - /** - * value: "de-AT" - * @const - */ - "de-AT": "de-AT", - /** - * value: "yue-CN" - * @const - */ - "yue-CN": "yue-CN", - /** - * value: "ar-AE" - * @const - */ - "ar-AE": "ar-AE", - /** - * value: "fi-FI" - * @const - */ - "fi-FI": "fi-FI" -}; -var _default = exports["default"] = ShotstackTextToSpeechOptions; \ No newline at end of file diff --git a/src/model/Size.js b/src/model/Size.js deleted file mode 100644 index 9caff97..0000000 --- a/src/model/Size.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Size model module. - * @module model/Size - * @version 0.2.9 - */ -var Size = /*#__PURE__*/function () { - /** - * Constructs a new Size. - * Set a custom size for a video or image in pixels. When using a custom size omit the `resolution` and `aspectRatio`. Custom sizes must be divisible by 2 based on the encoder specifications. - * @alias module:model/Size - */ - function Size() { - _classCallCheck(this, Size); - Size.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Size, [{ - key: "getWidth", - value: - /** - * Returns Set a custom width for the video or image file in pixels. Value must be divisible by 2. Maximum video width is 1920px, maximum image width is 4096px. - * minimum: 1 - * maximum: 4096 - * @return {Number} - */ - function getWidth() { - return this.width; - } - - /** - * Sets Set a custom width for the video or image file in pixels. Value must be divisible by 2. Maximum video width is 1920px, maximum image width is 4096px. - * @param {Number} width Set a custom width for the video or image file in pixels. Value must be divisible by 2. Maximum video width is 1920px, maximum image width is 4096px. - */ - }, { - key: "setWidth", - value: function setWidth(width) { - this['width'] = width; - return this; - } - /** - * Returns Set a custom height for the video or image file in pixels. Value must be divisible by 2. Maximum video height is 1920px, maximum image height is 4096px. - * minimum: 1 - * maximum: 4096 - * @return {Number} - */ - }, { - key: "getHeight", - value: function getHeight() { - return this.height; - } - - /** - * Sets Set a custom height for the video or image file in pixels. Value must be divisible by 2. Maximum video height is 1920px, maximum image height is 4096px. - * @param {Number} height Set a custom height for the video or image file in pixels. Value must be divisible by 2. Maximum video height is 1920px, maximum image height is 4096px. - */ - }, { - key: "setHeight", - value: function setHeight(height) { - this['height'] = height; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Size from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Size} obj Optional instance to populate. - * @return {module:model/Size} The populated Size instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Size(); - if (data.hasOwnProperty('width')) { - obj['width'] = _ApiClient["default"].convertToType(data['width'], 'Number'); - } - if (data.hasOwnProperty('height')) { - obj['height'] = _ApiClient["default"].convertToType(data['height'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Size. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Size. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - return true; - } - }]); -}(); -/** - * Set a custom width for the video or image file in pixels. Value must be divisible by 2. Maximum video width is 1920px, maximum image width is 4096px. - * @member {Number} width - */ -Size.prototype['width'] = undefined; - -/** - * Set a custom height for the video or image file in pixels. Value must be divisible by 2. Maximum video height is 1920px, maximum image height is 4096px. - * @member {Number} height - */ -Size.prototype['height'] = undefined; -var _default = exports["default"] = Size; \ No newline at end of file diff --git a/src/model/SkewTransformation.js b/src/model/SkewTransformation.js deleted file mode 100644 index 634f555..0000000 --- a/src/model/SkewTransformation.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _SkewTransformationX = _interopRequireDefault(require("./SkewTransformationX")); -var _SkewTransformationY = _interopRequireDefault(require("./SkewTransformationY")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The SkewTransformation model module. - * @module model/SkewTransformation - * @version 0.2.9 - */ -var SkewTransformation = /*#__PURE__*/function () { - /** - * Constructs a new SkewTransformation. - * Skew a clip so its edges are sheared at an angle. Use values between 0 and 3. Over 3 the clip will be skewed almost flat. - * @alias module:model/SkewTransformation - */ - function SkewTransformation() { - _classCallCheck(this, SkewTransformation); - SkewTransformation.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(SkewTransformation, [{ - key: "getX", - value: - /** - * @return {module:model/SkewTransformationX} - */ - function getX() { - return this.x; - } - - /** - * @param {module:model/SkewTransformationX} x - */ - }, { - key: "setX", - value: function setX(x) { - this['x'] = x; - return this; - } - /** - * @return {module:model/SkewTransformationY} - */ - }, { - key: "getY", - value: function getY() { - return this.y; - } - - /** - * @param {module:model/SkewTransformationY} y - */ - }, { - key: "setY", - value: function setY(y) { - this['y'] = y; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a SkewTransformation from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SkewTransformation} obj Optional instance to populate. - * @return {module:model/SkewTransformation} The populated SkewTransformation instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new SkewTransformation(); - if (data.hasOwnProperty('x')) { - obj['x'] = _SkewTransformationX["default"].constructFromObject(data['x']); - } - if (data.hasOwnProperty('y')) { - obj['y'] = _SkewTransformationY["default"].constructFromObject(data['y']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SkewTransformation. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SkewTransformation. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // validate the optional field `x` - if (data['x']) { - // data not null - _SkewTransformationX["default"].validateJSON(data['x']); - } - // validate the optional field `y` - if (data['y']) { - // data not null - _SkewTransformationY["default"].validateJSON(data['y']); - } - return true; - } - }]); -}(); -/** - * @member {module:model/SkewTransformationX} x - */ -SkewTransformation.prototype['x'] = undefined; - -/** - * @member {module:model/SkewTransformationY} y - */ -SkewTransformation.prototype['y'] = undefined; -var _default = exports["default"] = SkewTransformation; \ No newline at end of file diff --git a/src/model/SkewTransformationX.js b/src/model/SkewTransformationX.js deleted file mode 100644 index f1fb789..0000000 --- a/src/model/SkewTransformationX.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Tween = _interopRequireDefault(require("./Tween")); -var _SkewTransformationX; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The SkewTransformationX model module. - * @module model/SkewTransformationX - * @version 0.2.9 - */ -var SkewTransformationX = /*#__PURE__*/function () { - /** - * Constructs a new SkewTransformationX. - * Skew the clip along it's x axis. - * @alias module:model/SkewTransformationX - * @param {(module:model/Number|module:model/[Tween])} instance The actual instance to initialize SkewTransformationX. - */ - function SkewTransformationX() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, SkewTransformationX); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // Range varies from 0 to 3. Positive numbers skew the asset right, negative left. The distance moved is relative to the width of the viewport - i.e. an X skew of 0.5 will skew the asset half the screen width to the right. - try { - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // An array of [Tween](./#tocs_tween) objects used to create a custom animation. Animate the X skew of an asset over time. - try { - if (typeof instance === "[Tween]") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - [_Tween["default"]].validateJSON(instance); // throw an exception if no match - // create [Tween] from JS object - this.actualInstance = [_Tween["default"]].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into [Tween] - errorMessages.push("Failed to construct [Tween]: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `SkewTransformationX` with oneOf schemas Number, [Tween]. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `SkewTransformationX` with oneOf schemas Number, [Tween]. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a SkewTransformationX from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SkewTransformationX} obj Optional instance to populate. - * @return {module:model/SkewTransformationX} The populated SkewTransformationX instance. - */ - return _createClass(SkewTransformationX, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, [Tween]. - * @return {(module:model/Number|module:model/[Tween])} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, [Tween]. - * @param {(module:model/Number|module:model/[Tween])} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = SkewTransformationX.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new SkewTransformationX(data); - } - }]); -}(); -_SkewTransformationX = SkewTransformationX; -/** - * Create an instance of SkewTransformationX from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/SkewTransformationX} An instance of SkewTransformationX. - */ -_defineProperty(SkewTransformationX, "fromJSON", function (json_string) { - return _SkewTransformationX.constructFromObject(JSON.parse(json_string)); -}); -SkewTransformationX.OneOf = ["Number", "[Tween]"]; -var _default = exports["default"] = SkewTransformationX; \ No newline at end of file diff --git a/src/model/SkewTransformationY.js b/src/model/SkewTransformationY.js deleted file mode 100644 index 20a0c7c..0000000 --- a/src/model/SkewTransformationY.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Tween = _interopRequireDefault(require("./Tween")); -var _SkewTransformationY; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The SkewTransformationY model module. - * @module model/SkewTransformationY - * @version 0.2.9 - */ -var SkewTransformationY = /*#__PURE__*/function () { - /** - * Constructs a new SkewTransformationY. - * Skew the clip along it's y axis. - * @alias module:model/SkewTransformationY - * @param {(module:model/Number|module:model/[Tween])} instance The actual instance to initialize SkewTransformationY. - */ - function SkewTransformationY() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, SkewTransformationY); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // Range varies from 0 to 3. Positive numbers skew the asset up, negative down. The distance moved is relative to the height of the viewport - i.e. an Y skew of 0.5 will skew the asset half the screen height up. - try { - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // An array of [Tween](./#tocs_tween) objects used to create a custom animation. Animate the Y skew of an asset over time. - try { - if (typeof instance === "[Tween]") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - [_Tween["default"]].validateJSON(instance); // throw an exception if no match - // create [Tween] from JS object - this.actualInstance = [_Tween["default"]].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into [Tween] - errorMessages.push("Failed to construct [Tween]: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `SkewTransformationY` with oneOf schemas Number, [Tween]. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `SkewTransformationY` with oneOf schemas Number, [Tween]. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a SkewTransformationY from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SkewTransformationY} obj Optional instance to populate. - * @return {module:model/SkewTransformationY} The populated SkewTransformationY instance. - */ - return _createClass(SkewTransformationY, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, [Tween]. - * @return {(module:model/Number|module:model/[Tween])} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, [Tween]. - * @param {(module:model/Number|module:model/[Tween])} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = SkewTransformationY.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new SkewTransformationY(data); - } - }]); -}(); -_SkewTransformationY = SkewTransformationY; -/** - * Create an instance of SkewTransformationY from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/SkewTransformationY} An instance of SkewTransformationY. - */ -_defineProperty(SkewTransformationY, "fromJSON", function (json_string) { - return _SkewTransformationY.constructFromObject(JSON.parse(json_string)); -}); -SkewTransformationY.OneOf = ["Number", "[Tween]"]; -var _default = exports["default"] = SkewTransformationY; \ No newline at end of file diff --git a/src/model/Soundtrack.js b/src/model/Soundtrack.js deleted file mode 100644 index ad80cb5..0000000 --- a/src/model/Soundtrack.js +++ /dev/null @@ -1,220 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Soundtrack model module. - * @module model/Soundtrack - * @version 0.2.9 - */ -var Soundtrack = /*#__PURE__*/function () { - /** - * Constructs a new Soundtrack. - * A music or audio file in mp3 format that plays for the duration of the rendered video or the length of the audio file, which ever is shortest. - * @alias module:model/Soundtrack - * @param src {String} The URL of the mp3 audio file. The URL must be publicly accessible or include credentials. - */ - function Soundtrack(src) { - _classCallCheck(this, Soundtrack); - Soundtrack.initialize(this, src); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Soundtrack, [{ - key: "getSrc", - value: - /** - * Returns The URL of the mp3 audio file. The URL must be publicly accessible or include credentials. - * @return {String} - */ - function getSrc() { - return this.src; - } - - /** - * Sets The URL of the mp3 audio file. The URL must be publicly accessible or include credentials. - * @param {String} src The URL of the mp3 audio file. The URL must be publicly accessible or include credentials. - */ - }, { - key: "setSrc", - value: function setSrc(src) { - this['src'] = src; - return this; - } - /** - * Returns The effect to apply to the audio file
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @return {module:model/Soundtrack.EffectEnum} - */ - }, { - key: "getEffect", - value: function getEffect() { - return this.effect; - } - - /** - * Sets The effect to apply to the audio file
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @param {module:model/Soundtrack.EffectEnum} effect The effect to apply to the audio file
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- */ - }, { - key: "setEffect", - value: function setEffect(effect) { - this['effect'] = effect; - return this; - } - /** - * Returns Set the volume for the soundtrack between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1). - * @return {Number} - */ - }, { - key: "getVolume", - value: function getVolume() { - return this.volume; - } - - /** - * Sets Set the volume for the soundtrack between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1). - * @param {Number} volume Set the volume for the soundtrack between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1). - */ - }, { - key: "setVolume", - value: function setVolume(volume) { - this['volume'] = volume; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, src) { - obj['src'] = src; - } - - /** - * Constructs a Soundtrack from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Soundtrack} obj Optional instance to populate. - * @return {module:model/Soundtrack} The populated Soundtrack instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Soundtrack(); - if (data.hasOwnProperty('src')) { - obj['src'] = _ApiClient["default"].convertToType(data['src'], 'String'); - } - if (data.hasOwnProperty('effect')) { - obj['effect'] = _ApiClient["default"].convertToType(data['effect'], 'String'); - } - if (data.hasOwnProperty('volume')) { - obj['volume'] = _ApiClient["default"].convertToType(data['volume'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Soundtrack. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Soundtrack. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Soundtrack.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['src'] && !(typeof data['src'] === 'string' || data['src'] instanceof String)) { - throw new Error("Expected the field `src` to be a primitive type in the JSON string but got " + data['src']); - } - // ensure the json data is a string - if (data['effect'] && !(typeof data['effect'] === 'string' || data['effect'] instanceof String)) { - throw new Error("Expected the field `effect` to be a primitive type in the JSON string but got " + data['effect']); - } - return true; - } - }]); -}(); -Soundtrack.RequiredProperties = ["src"]; - -/** - * The URL of the mp3 audio file. The URL must be publicly accessible or include credentials. - * @member {String} src - */ -Soundtrack.prototype['src'] = undefined; - -/** - * The effect to apply to the audio file
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @member {module:model/Soundtrack.EffectEnum} effect - */ -Soundtrack.prototype['effect'] = undefined; - -/** - * Set the volume for the soundtrack between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1). - * @member {Number} volume - */ -Soundtrack.prototype['volume'] = undefined; - -/** - * Allowed values for the effect property. - * @enum {String} - * @readonly - */ -Soundtrack['EffectEnum'] = { - /** - * value: "fadeIn" - * @const - */ - "fadeIn": "fadeIn", - /** - * value: "fadeOut" - * @const - */ - "fadeOut": "fadeOut", - /** - * value: "fadeInFadeOut" - * @const - */ - "fadeInFadeOut": "fadeInFadeOut" -}; -var _default = exports["default"] = Soundtrack; \ No newline at end of file diff --git a/src/model/Source.js b/src/model/Source.js deleted file mode 100644 index 86fe668..0000000 --- a/src/model/Source.js +++ /dev/null @@ -1,209 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Destinations = _interopRequireDefault(require("./Destinations")); -var _Outputs = _interopRequireDefault(require("./Outputs")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Source model module. - * @module model/Source - * @version 0.2.9 - */ -var Source = /*#__PURE__*/function () { - /** - * Constructs a new Source. - * The details of the file to be ingested and any transformations to be applied. Once the source file has been ingested, new renditions can be created from it. The renditions are specified in the **outputs** property. A rendition is a new version, generated from the source. This can be used to create new sizes and aspect ratios tht serve different purposes within an application. - * @alias module:model/Source - */ - function Source() { - _classCallCheck(this, Source); - Source.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Source, [{ - key: "getUrl", - value: - /** - * Returns The URL of the file to be ingested. The URL must be publicly accessible or include credentials. - * @return {String} - */ - function getUrl() { - return this.url; - } - - /** - * Sets The URL of the file to be ingested. The URL must be publicly accessible or include credentials. - * @param {String} url The URL of the file to be ingested. The URL must be publicly accessible or include credentials. - */ - }, { - key: "setUrl", - value: function setUrl(url) { - this['url'] = url; - return this; - } - /** - * @return {module:model/Outputs} - */ - }, { - key: "getOutputs", - value: function getOutputs() { - return this.outputs; - } - - /** - * @param {module:model/Outputs} outputs - */ - }, { - key: "setOutputs", - value: function setOutputs(outputs) { - this['outputs'] = outputs; - return this; - } - /** - * @return {module:model/Destinations} - */ - }, { - key: "getDestinations", - value: function getDestinations() { - return this.destinations; - } - - /** - * @param {module:model/Destinations} destinations - */ - }, { - key: "setDestinations", - value: function setDestinations(destinations) { - this['destinations'] = destinations; - return this; - } - /** - * Returns An optional webhook callback URL used to receive status notifications when sources are uploaded and renditions processed. - * @return {String} - */ - }, { - key: "getCallback", - value: function getCallback() { - return this.callback; - } - - /** - * Sets An optional webhook callback URL used to receive status notifications when sources are uploaded and renditions processed. - * @param {String} callback An optional webhook callback URL used to receive status notifications when sources are uploaded and renditions processed. - */ - }, { - key: "setCallback", - value: function setCallback(callback) { - this['callback'] = callback; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Source from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Source} obj Optional instance to populate. - * @return {module:model/Source} The populated Source instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Source(); - if (data.hasOwnProperty('url')) { - obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String'); - } - if (data.hasOwnProperty('outputs')) { - obj['outputs'] = _Outputs["default"].constructFromObject(data['outputs']); - } - if (data.hasOwnProperty('destinations')) { - obj['destinations'] = _Destinations["default"].constructFromObject(data['destinations']); - } - if (data.hasOwnProperty('callback')) { - obj['callback'] = _ApiClient["default"].convertToType(data['callback'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Source. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Source. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { - throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); - } - // validate the optional field `outputs` - if (data['outputs']) { - // data not null - _Outputs["default"].validateJSON(data['outputs']); - } - // validate the optional field `destinations` - if (data['destinations']) { - // data not null - _Destinations["default"].validateJSON(data['destinations']); - } - // ensure the json data is a string - if (data['callback'] && !(typeof data['callback'] === 'string' || data['callback'] instanceof String)) { - throw new Error("Expected the field `callback` to be a primitive type in the JSON string but got " + data['callback']); - } - return true; - } - }]); -}(); -/** - * The URL of the file to be ingested. The URL must be publicly accessible or include credentials. - * @member {String} url - */ -Source.prototype['url'] = undefined; - -/** - * @member {module:model/Outputs} outputs - */ -Source.prototype['outputs'] = undefined; - -/** - * @member {module:model/Destinations} destinations - */ -Source.prototype['destinations'] = undefined; - -/** - * An optional webhook callback URL used to receive status notifications when sources are uploaded and renditions processed. - * @member {String} callback - */ -Source.prototype['callback'] = undefined; -var _default = exports["default"] = Source; \ No newline at end of file diff --git a/src/model/SourceListResponse.js b/src/model/SourceListResponse.js deleted file mode 100644 index fe948ba..0000000 --- a/src/model/SourceListResponse.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _SourceResponseData = _interopRequireDefault(require("./SourceResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The SourceListResponse model module. - * @module model/SourceListResponse - * @version 0.2.9 - */ -var SourceListResponse = /*#__PURE__*/function () { - /** - * Constructs a new SourceListResponse. - * A list of all ingested source files fetched or uploaded to a users account. - * @alias module:model/SourceListResponse - * @param data {Array.} An array of ingested source files. - */ - function SourceListResponse(data) { - _classCallCheck(this, SourceListResponse); - SourceListResponse.initialize(this, data); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(SourceListResponse, [{ - key: "getData", - value: - /** - * Returns An array of ingested source files. - * @return {Array.} - */ - function getData() { - return this.data; - } - - /** - * Sets An array of ingested source files. - * @param {Array.} data An array of ingested source files. - */ - }, { - key: "setData", - value: function setData(data) { - this['data'] = data; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, data) { - obj['data'] = data; - } - - /** - * Constructs a SourceListResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SourceListResponse} obj Optional instance to populate. - * @return {module:model/SourceListResponse} The populated SourceListResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new SourceListResponse(); - if (data.hasOwnProperty('data')) { - obj['data'] = _ApiClient["default"].convertToType(data['data'], [_SourceResponseData["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SourceListResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SourceListResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(SourceListResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['data']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['data'])) { - throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']); - } - // validate the optional field `data` (array) - var _iterator2 = _createForOfIteratorHelper(data['data']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _SourceResponseData["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - return true; - } - }]); -}(); -SourceListResponse.RequiredProperties = ["data"]; - -/** - * An array of ingested source files. - * @member {Array.} data - */ -SourceListResponse.prototype['data'] = undefined; -var _default = exports["default"] = SourceListResponse; \ No newline at end of file diff --git a/src/model/SourceResponse.js b/src/model/SourceResponse.js deleted file mode 100644 index a21b44b..0000000 --- a/src/model/SourceResponse.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _SourceResponseData = _interopRequireDefault(require("./SourceResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The SourceResponse model module. - * @module model/SourceResponse - * @version 0.2.9 - */ -var SourceResponse = /*#__PURE__*/function () { - /** - * Constructs a new SourceResponse. - * The response returned by the Ingest API [get source](#get-source) request. Includes details of the ingested source file. The response follows the [json:api](https://jsonapi.org/) specification. - * @alias module:model/SourceResponse - * @param data {module:model/SourceResponseData} - */ - function SourceResponse(data) { - _classCallCheck(this, SourceResponse); - SourceResponse.initialize(this, data); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(SourceResponse, [{ - key: "getData", - value: - /** - * @return {module:model/SourceResponseData} - */ - function getData() { - return this.data; - } - - /** - * @param {module:model/SourceResponseData} data - */ - }, { - key: "setData", - value: function setData(data) { - this['data'] = data; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, data) { - obj['data'] = data; - } - - /** - * Constructs a SourceResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SourceResponse} obj Optional instance to populate. - * @return {module:model/SourceResponse} The populated SourceResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new SourceResponse(); - if (data.hasOwnProperty('data')) { - obj['data'] = _SourceResponseData["default"].constructFromObject(data['data']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SourceResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SourceResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(SourceResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `data` - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['data']) { - // data not null - _SourceResponseData["default"].validateJSON(data['data']); - } - return true; - } - }]); -}(); -SourceResponse.RequiredProperties = ["data"]; - -/** - * @member {module:model/SourceResponseData} data - */ -SourceResponse.prototype['data'] = undefined; -var _default = exports["default"] = SourceResponse; \ No newline at end of file diff --git a/src/model/SourceResponseAttributes.js b/src/model/SourceResponseAttributes.js deleted file mode 100644 index d6cc6e8..0000000 --- a/src/model/SourceResponseAttributes.js +++ /dev/null @@ -1,525 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _OutputsResponse = _interopRequireDefault(require("./OutputsResponse")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The SourceResponseAttributes model module. - * @module model/SourceResponseAttributes - * @version 0.2.9 - */ -var SourceResponseAttributes = /*#__PURE__*/function () { - /** - * Constructs a new SourceResponseAttributes. - * The id and attributes of the source file. - * @alias module:model/SourceResponseAttributes - * @param id {String} The source id. - * @param owner {String} The owner id of the source file. - */ - function SourceResponseAttributes(id, owner) { - _classCallCheck(this, SourceResponseAttributes); - SourceResponseAttributes.initialize(this, id, owner); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(SourceResponseAttributes, [{ - key: "getId", - value: - /** - * Returns The source id. - * @return {String} - */ - function getId() { - return this.id; - } - - /** - * Sets The source id. - * @param {String} id The source id. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns The owner id of the source file. - * @return {String} - */ - }, { - key: "getOwner", - value: function getOwner() { - return this.owner; - } - - /** - * Sets The owner id of the source file. - * @param {String} owner The owner id of the source file. - */ - }, { - key: "setOwner", - value: function setOwner(owner) { - this['owner'] = owner; - return this; - } - /** - * Returns The original URL of an ingested source file, where it originated. Only displayed for files ingested using the [fetch source](#fetch-source) endpoint. Not displayed for direct uploads. - * @return {String} - */ - }, { - key: "getInput", - value: function getInput() { - return this.input; - } - - /** - * Sets The original URL of an ingested source file, where it originated. Only displayed for files ingested using the [fetch source](#fetch-source) endpoint. Not displayed for direct uploads. - * @param {String} input The original URL of an ingested source file, where it originated. Only displayed for files ingested using the [fetch source](#fetch-source) endpoint. Not displayed for direct uploads. - */ - }, { - key: "setInput", - value: function setInput(input) { - this['input'] = input; - return this; - } - /** - * Returns The URL of the source file hosted by Shotstack. The file at the URL can be used by the Edit API. Source file URL's consist of a base URL (AWS bucket), owner id, source id and a file named source. The extension varies depending on the type of file ingested. - * @return {String} - */ - }, { - key: "getSource", - value: function getSource() { - return this.source; - } - - /** - * Sets The URL of the source file hosted by Shotstack. The file at the URL can be used by the Edit API. Source file URL's consist of a base URL (AWS bucket), owner id, source id and a file named source. The extension varies depending on the type of file ingested. - * @param {String} source The URL of the source file hosted by Shotstack. The file at the URL can be used by the Edit API. Source file URL's consist of a base URL (AWS bucket), owner id, source id and a file named source. The extension varies depending on the type of file ingested. - */ - }, { - key: "setSource", - value: function setSource(source) { - this['source'] = source; - return this; - } - /** - * Returns The status of the source file ingestion task.
  • `queued` - ingestion task is queued waiting to be fetched
  • `importing` - the source file is being downloaded
  • `ready` - the source file has been ingested and stored
  • `failed` - there was an error ingesting the source file
  • `deleted` - the source file has been deleted
- * @return {module:model/SourceResponseAttributes.StatusEnum} - */ - }, { - key: "getStatus", - value: function getStatus() { - return this.status; - } - - /** - * Sets The status of the source file ingestion task.
  • `queued` - ingestion task is queued waiting to be fetched
  • `importing` - the source file is being downloaded
  • `ready` - the source file has been ingested and stored
  • `failed` - there was an error ingesting the source file
  • `deleted` - the source file has been deleted
- * @param {module:model/SourceResponseAttributes.StatusEnum} status The status of the source file ingestion task.
  • `queued` - ingestion task is queued waiting to be fetched
  • `importing` - the source file is being downloaded
  • `ready` - the source file has been ingested and stored
  • `failed` - there was an error ingesting the source file
  • `deleted` - the source file has been deleted
- */ - }, { - key: "setStatus", - value: function setStatus(status) { - this['status'] = status; - return this; - } - /** - * @return {module:model/OutputsResponse} - */ - }, { - key: "getOutputs", - value: function getOutputs() { - return this.outputs; - } - - /** - * @param {module:model/OutputsResponse} outputs - */ - }, { - key: "setOutputs", - value: function setOutputs(outputs) { - this['outputs'] = outputs; - return this; - } - /** - * Returns The width in pixels of the ingested source file, if a video or image. - * @return {Number} - */ - }, { - key: "getWidth", - value: function getWidth() { - return this.width; - } - - /** - * Sets The width in pixels of the ingested source file, if a video or image. - * @param {Number} width The width in pixels of the ingested source file, if a video or image. - */ - }, { - key: "setWidth", - value: function setWidth(width) { - this['width'] = width; - return this; - } - /** - * Returns The height in pixels of the ingested source file, if a video or image. - * @return {String} - */ - }, { - key: "getHeight", - value: function getHeight() { - return this.height; - } - - /** - * Sets The height in pixels of the ingested source file, if a video or image. - * @param {String} height The height in pixels of the ingested source file, if a video or image. - */ - }, { - key: "setHeight", - value: function setHeight(height) { - this['height'] = height; - return this; - } - /** - * Returns The duration in seconds of the ingested source file, if a video or audio file. - * @return {Number} - */ - }, { - key: "getDuration", - value: function getDuration() { - return this.duration; - } - - /** - * Sets The duration in seconds of the ingested source file, if a video or audio file. - * @param {Number} duration The duration in seconds of the ingested source file, if a video or audio file. - */ - }, { - key: "setDuration", - value: function setDuration(duration) { - this['duration'] = duration; - return this; - } - /** - * Returns The frame rate in frames per second of the source file, if a video file. - * @return {Number} - */ - }, { - key: "getFps", - value: function getFps() { - return this.fps; - } - - /** - * Sets The frame rate in frames per second of the source file, if a video file. - * @param {Number} fps The frame rate in frames per second of the source file, if a video file. - */ - }, { - key: "setFps", - value: function setFps(fps) { - this['fps'] = fps; - return this; - } - /** - * Returns The time the ingestion task was initially queued. - * @return {String} - */ - }, { - key: "getCreated", - value: function getCreated() { - return this.created; - } - - /** - * Sets The time the ingestion task was initially queued. - * @param {String} created The time the ingestion task was initially queued. - */ - }, { - key: "setCreated", - value: function setCreated(created) { - this['created'] = created; - return this; - } - /** - * Returns The time the ingestion status was last updated. - * @return {String} - */ - }, { - key: "getUpdated", - value: function getUpdated() { - return this.updated; - } - - /** - * Sets The time the ingestion status was last updated. - * @param {String} updated The time the ingestion status was last updated. - */ - }, { - key: "setUpdated", - value: function setUpdated(updated) { - this['updated'] = updated; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, id, owner) { - obj['id'] = id; - obj['owner'] = owner; - } - - /** - * Constructs a SourceResponseAttributes from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SourceResponseAttributes} obj Optional instance to populate. - * @return {module:model/SourceResponseAttributes} The populated SourceResponseAttributes instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new SourceResponseAttributes(); - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('owner')) { - obj['owner'] = _ApiClient["default"].convertToType(data['owner'], 'String'); - } - if (data.hasOwnProperty('input')) { - obj['input'] = _ApiClient["default"].convertToType(data['input'], 'String'); - } - if (data.hasOwnProperty('source')) { - obj['source'] = _ApiClient["default"].convertToType(data['source'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('outputs')) { - obj['outputs'] = _OutputsResponse["default"].constructFromObject(data['outputs']); - } - if (data.hasOwnProperty('width')) { - obj['width'] = _ApiClient["default"].convertToType(data['width'], 'Number'); - } - if (data.hasOwnProperty('height')) { - obj['height'] = _ApiClient["default"].convertToType(data['height'], 'String'); - } - if (data.hasOwnProperty('duration')) { - obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number'); - } - if (data.hasOwnProperty('fps')) { - obj['fps'] = _ApiClient["default"].convertToType(data['fps'], 'Number'); - } - if (data.hasOwnProperty('created')) { - obj['created'] = _ApiClient["default"].convertToType(data['created'], 'String'); - } - if (data.hasOwnProperty('updated')) { - obj['updated'] = _ApiClient["default"].convertToType(data['updated'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SourceResponseAttributes. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SourceResponseAttributes. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(SourceResponseAttributes.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['owner'] && !(typeof data['owner'] === 'string' || data['owner'] instanceof String)) { - throw new Error("Expected the field `owner` to be a primitive type in the JSON string but got " + data['owner']); - } - // ensure the json data is a string - if (data['input'] && !(typeof data['input'] === 'string' || data['input'] instanceof String)) { - throw new Error("Expected the field `input` to be a primitive type in the JSON string but got " + data['input']); - } - // ensure the json data is a string - if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) { - throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // validate the optional field `outputs` - if (data['outputs']) { - // data not null - _OutputsResponse["default"].validateJSON(data['outputs']); - } - // ensure the json data is a string - if (data['height'] && !(typeof data['height'] === 'string' || data['height'] instanceof String)) { - throw new Error("Expected the field `height` to be a primitive type in the JSON string but got " + data['height']); - } - // ensure the json data is a string - if (data['created'] && !(typeof data['created'] === 'string' || data['created'] instanceof String)) { - throw new Error("Expected the field `created` to be a primitive type in the JSON string but got " + data['created']); - } - // ensure the json data is a string - if (data['updated'] && !(typeof data['updated'] === 'string' || data['updated'] instanceof String)) { - throw new Error("Expected the field `updated` to be a primitive type in the JSON string but got " + data['updated']); - } - return true; - } - }]); -}(); -SourceResponseAttributes.RequiredProperties = ["id", "owner"]; - -/** - * The source id. - * @member {String} id - */ -SourceResponseAttributes.prototype['id'] = undefined; - -/** - * The owner id of the source file. - * @member {String} owner - */ -SourceResponseAttributes.prototype['owner'] = undefined; - -/** - * The original URL of an ingested source file, where it originated. Only displayed for files ingested using the [fetch source](#fetch-source) endpoint. Not displayed for direct uploads. - * @member {String} input - */ -SourceResponseAttributes.prototype['input'] = undefined; - -/** - * The URL of the source file hosted by Shotstack. The file at the URL can be used by the Edit API. Source file URL's consist of a base URL (AWS bucket), owner id, source id and a file named source. The extension varies depending on the type of file ingested. - * @member {String} source - */ -SourceResponseAttributes.prototype['source'] = undefined; - -/** - * The status of the source file ingestion task.
  • `queued` - ingestion task is queued waiting to be fetched
  • `importing` - the source file is being downloaded
  • `ready` - the source file has been ingested and stored
  • `failed` - there was an error ingesting the source file
  • `deleted` - the source file has been deleted
- * @member {module:model/SourceResponseAttributes.StatusEnum} status - */ -SourceResponseAttributes.prototype['status'] = undefined; - -/** - * @member {module:model/OutputsResponse} outputs - */ -SourceResponseAttributes.prototype['outputs'] = undefined; - -/** - * The width in pixels of the ingested source file, if a video or image. - * @member {Number} width - */ -SourceResponseAttributes.prototype['width'] = undefined; - -/** - * The height in pixels of the ingested source file, if a video or image. - * @member {String} height - */ -SourceResponseAttributes.prototype['height'] = undefined; - -/** - * The duration in seconds of the ingested source file, if a video or audio file. - * @member {Number} duration - */ -SourceResponseAttributes.prototype['duration'] = undefined; - -/** - * The frame rate in frames per second of the source file, if a video file. - * @member {Number} fps - */ -SourceResponseAttributes.prototype['fps'] = undefined; - -/** - * The time the ingestion task was initially queued. - * @member {String} created - */ -SourceResponseAttributes.prototype['created'] = undefined; - -/** - * The time the ingestion status was last updated. - * @member {String} updated - */ -SourceResponseAttributes.prototype['updated'] = undefined; - -/** - * Allowed values for the status property. - * @enum {String} - * @readonly - */ -SourceResponseAttributes['StatusEnum'] = { - /** - * value: "queued" - * @const - */ - "queued": "queued", - /** - * value: "importing" - * @const - */ - "importing": "importing", - /** - * value: "ready" - * @const - */ - "ready": "ready", - /** - * value: "failed" - * @const - */ - "failed": "failed", - /** - * value: "deleted" - * @const - */ - "deleted": "deleted", - /** - * value: "overwritten" - * @const - */ - "overwritten": "overwritten" -}; -var _default = exports["default"] = SourceResponseAttributes; \ No newline at end of file diff --git a/src/model/SourceResponseData.js b/src/model/SourceResponseData.js deleted file mode 100644 index f793fd0..0000000 --- a/src/model/SourceResponseData.js +++ /dev/null @@ -1,204 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _SourceResponseAttributes = _interopRequireDefault(require("./SourceResponseAttributes")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The SourceResponseData model module. - * @module model/SourceResponseData - * @version 0.2.9 - */ -var SourceResponseData = /*#__PURE__*/function () { - /** - * Constructs a new SourceResponseData. - * The type of resource (a source), it's id and attributes of the source file. - * @alias module:model/SourceResponseData - * @param type {String} The type of resource, in this case it is a source. - * @param id {String} The source file id. - * @param attributes {module:model/SourceResponseAttributes} - */ - function SourceResponseData(type, id, attributes) { - _classCallCheck(this, SourceResponseData); - SourceResponseData.initialize(this, type, id, attributes); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(SourceResponseData, [{ - key: "getType", - value: - /** - * Returns The type of resource, in this case it is a source. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of resource, in this case it is a source. - * @param {String} type The type of resource, in this case it is a source. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The source file id. - * @return {String} - */ - }, { - key: "getId", - value: function getId() { - return this.id; - } - - /** - * Sets The source file id. - * @param {String} id The source file id. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * @return {module:model/SourceResponseAttributes} - */ - }, { - key: "getAttributes", - value: function getAttributes() { - return this.attributes; - } - - /** - * @param {module:model/SourceResponseAttributes} attributes - */ - }, { - key: "setAttributes", - value: function setAttributes(attributes) { - this['attributes'] = attributes; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, id, attributes) { - obj['type'] = type; - obj['id'] = id; - obj['attributes'] = attributes; - } - - /** - * Constructs a SourceResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/SourceResponseData} obj Optional instance to populate. - * @return {module:model/SourceResponseData} The populated SourceResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new SourceResponseData(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('attributes')) { - obj['attributes'] = _SourceResponseAttributes["default"].constructFromObject(data['attributes']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to SourceResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to SourceResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(SourceResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // validate the optional field `attributes` - if (data['attributes']) { - // data not null - _SourceResponseAttributes["default"].validateJSON(data['attributes']); - } - return true; - } - }]); -}(); -SourceResponseData.RequiredProperties = ["type", "id", "attributes"]; - -/** - * The type of resource, in this case it is a source. - * @member {String} type - */ -SourceResponseData.prototype['type'] = undefined; - -/** - * The source file id. - * @member {String} id - */ -SourceResponseData.prototype['id'] = undefined; - -/** - * @member {module:model/SourceResponseAttributes} attributes - */ -SourceResponseData.prototype['attributes'] = undefined; -var _default = exports["default"] = SourceResponseData; \ No newline at end of file diff --git a/src/model/Speed.js b/src/model/Speed.js deleted file mode 100644 index 696ee1a..0000000 --- a/src/model/Speed.js +++ /dev/null @@ -1,139 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Speed model module. - * @module model/Speed - * @version 0.2.9 - */ -var Speed = /*#__PURE__*/function () { - /** - * Constructs a new Speed. - * Set the playback speed of a video or audio file. Allows you to preserve the pitch of the audio so that it is sped up without sounding too high pitched or too low. - * @alias module:model/Speed - */ - function Speed() { - _classCallCheck(this, Speed); - Speed.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Speed, [{ - key: "getSpeed", - value: - /** - * Returns Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Set values less than 1 to slow down the playback speed, i.e. set speed to 0.5 to play back at half speed. Set values greater than 1 to speed up the playback speed, i.e. set speed to 2 to play back at double speed. - * minimum: 0 - * maximum: 10 - * @return {Number} - */ - function getSpeed() { - return this.speed; - } - - /** - * Sets Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Set values less than 1 to slow down the playback speed, i.e. set speed to 0.5 to play back at half speed. Set values greater than 1 to speed up the playback speed, i.e. set speed to 2 to play back at double speed. - * @param {Number} speed Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Set values less than 1 to slow down the playback speed, i.e. set speed to 0.5 to play back at half speed. Set values greater than 1 to speed up the playback speed, i.e. set speed to 2 to play back at double speed. - */ - }, { - key: "setSpeed", - value: function setSpeed(speed) { - this['speed'] = speed; - return this; - } - /** - * Returns Set whether to adjust the audio pitch or not. Set to false to make the audio sound higher or lower pitched. By default the pitch is preserved. - * @return {Boolean} - */ - }, { - key: "getPreservePitch", - value: function getPreservePitch() { - return this.preservePitch; - } - - /** - * Sets Set whether to adjust the audio pitch or not. Set to false to make the audio sound higher or lower pitched. By default the pitch is preserved. - * @param {Boolean} preservePitch Set whether to adjust the audio pitch or not. Set to false to make the audio sound higher or lower pitched. By default the pitch is preserved. - */ - }, { - key: "setPreservePitch", - value: function setPreservePitch(preservePitch) { - this['preservePitch'] = preservePitch; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Speed from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Speed} obj Optional instance to populate. - * @return {module:model/Speed} The populated Speed instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Speed(); - if (data.hasOwnProperty('speed')) { - obj['speed'] = _ApiClient["default"].convertToType(data['speed'], 'Number'); - } - if (data.hasOwnProperty('preservePitch')) { - obj['preservePitch'] = _ApiClient["default"].convertToType(data['preservePitch'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Speed. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Speed. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - return true; - } - }]); -}(); -/** - * Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Set values less than 1 to slow down the playback speed, i.e. set speed to 0.5 to play back at half speed. Set values greater than 1 to speed up the playback speed, i.e. set speed to 2 to play back at double speed. - * @member {Number} speed - */ -Speed.prototype['speed'] = undefined; - -/** - * Set whether to adjust the audio pitch or not. Set to false to make the audio sound higher or lower pitched. By default the pitch is preserved. - * @member {Boolean} preservePitch - */ -Speed.prototype['preservePitch'] = undefined; -var _default = exports["default"] = Speed; \ No newline at end of file diff --git a/src/model/StabilityAiGeneratedAsset.js b/src/model/StabilityAiGeneratedAsset.js deleted file mode 100644 index fd7dbec..0000000 --- a/src/model/StabilityAiGeneratedAsset.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _StabilityAiGeneratedAssetOptions = _interopRequireDefault(require("./StabilityAiGeneratedAssetOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The StabilityAiGeneratedAsset model module. - * @module model/StabilityAiGeneratedAsset - * @version 0.2.9 - */ -var StabilityAiGeneratedAsset = /*#__PURE__*/function () { - /** - * Constructs a new StabilityAiGeneratedAsset. - * Generate assets using Stability AI. Stability AI provide a text-to-image service using Stable Diffusion. The Stability AI provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/stability-ai), not in the request. - * @alias module:model/StabilityAiGeneratedAsset - * @param provider {module:model/StabilityAiGeneratedAsset.ProviderEnum} The name of the provider - set to `stability-ai` for Stability AI. - * @param options {module:model/StabilityAiGeneratedAssetOptions} - */ - function StabilityAiGeneratedAsset(provider, options) { - _classCallCheck(this, StabilityAiGeneratedAsset); - StabilityAiGeneratedAsset.initialize(this, provider, options); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(StabilityAiGeneratedAsset, [{ - key: "getProvider", - value: - /** - * Returns The name of the provider - set to `stability-ai` for Stability AI. - * @return {module:model/StabilityAiGeneratedAsset.ProviderEnum} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The name of the provider - set to `stability-ai` for Stability AI. - * @param {module:model/StabilityAiGeneratedAsset.ProviderEnum} provider The name of the provider - set to `stability-ai` for Stability AI. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/StabilityAiGeneratedAssetOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/StabilityAiGeneratedAssetOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider, options) { - obj['provider'] = provider || 'stability-ai'; - obj['options'] = options; - } - - /** - * Constructs a StabilityAiGeneratedAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/StabilityAiGeneratedAsset} obj Optional instance to populate. - * @return {module:model/StabilityAiGeneratedAsset} The populated StabilityAiGeneratedAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new StabilityAiGeneratedAsset(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _StabilityAiGeneratedAssetOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to StabilityAiGeneratedAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to StabilityAiGeneratedAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(StabilityAiGeneratedAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _StabilityAiGeneratedAssetOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -StabilityAiGeneratedAsset.RequiredProperties = ["provider", "options"]; - -/** - * The name of the provider - set to `stability-ai` for Stability AI. - * @member {module:model/StabilityAiGeneratedAsset.ProviderEnum} provider - * @default 'stability-ai' - */ -StabilityAiGeneratedAsset.prototype['provider'] = 'stability-ai'; - -/** - * @member {module:model/StabilityAiGeneratedAssetOptions} options - */ -StabilityAiGeneratedAsset.prototype['options'] = undefined; - -/** - * Allowed values for the provider property. - * @enum {String} - * @readonly - */ -StabilityAiGeneratedAsset['ProviderEnum'] = { - /** - * value: "stability-ai" - * @const - */ - "stability-ai": "stability-ai" -}; -var _default = exports["default"] = StabilityAiGeneratedAsset; \ No newline at end of file diff --git a/src/model/StabilityAiGeneratedAssetOptions.js b/src/model/StabilityAiGeneratedAssetOptions.js deleted file mode 100644 index f242bef..0000000 --- a/src/model/StabilityAiGeneratedAssetOptions.js +++ /dev/null @@ -1,184 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _StabilityAiTextToImageOptions = _interopRequireDefault(require("./StabilityAiTextToImageOptions")); -var _StabilityAiGeneratedAssetOptions; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The StabilityAiGeneratedAssetOptions model module. - * @module model/StabilityAiGeneratedAssetOptions - * @version 0.2.9 - */ -var StabilityAiGeneratedAssetOptions = /*#__PURE__*/function () { - /** - * Constructs a new StabilityAiGeneratedAssetOptions. - * Generate assets using Stability AI provider AI services. The following AI generation services are available: <ul> <li><a href=\"#tocs_stabilityaitexttoimageoptions\">StabilityAiTextToImageOptions</a></li> </ul> - * @alias module:model/StabilityAiGeneratedAssetOptions - * @param {(module:model/StabilityAiTextToImageOptions)} instance The actual instance to initialize StabilityAiGeneratedAssetOptions. - */ - function StabilityAiGeneratedAssetOptions() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, StabilityAiGeneratedAssetOptions); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - try { - if (typeof instance === "StabilityAiTextToImageOptions") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - _StabilityAiTextToImageOptions["default"].validateJSON(instance); // throw an exception if no match - // create StabilityAiTextToImageOptions from JS object - this.actualInstance = _StabilityAiTextToImageOptions["default"].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into StabilityAiTextToImageOptions - errorMessages.push("Failed to construct StabilityAiTextToImageOptions: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `StabilityAiGeneratedAssetOptions` with oneOf schemas StabilityAiTextToImageOptions. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `StabilityAiGeneratedAssetOptions` with oneOf schemas StabilityAiTextToImageOptions. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a StabilityAiGeneratedAssetOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/StabilityAiGeneratedAssetOptions} obj Optional instance to populate. - * @return {module:model/StabilityAiGeneratedAssetOptions} The populated StabilityAiGeneratedAssetOptions instance. - */ - return _createClass(StabilityAiGeneratedAssetOptions, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be StabilityAiTextToImageOptions. - * @return {(module:model/StabilityAiTextToImageOptions)} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be StabilityAiTextToImageOptions. - * @param {(module:model/StabilityAiTextToImageOptions)} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = StabilityAiGeneratedAssetOptions.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new StabilityAiGeneratedAssetOptions(data); - } - }]); -}(); -/** - * The type of asset to generate - set to `text-to-image` for text-to-image. - * @member {module:model/StabilityAiGeneratedAssetOptions.TypeEnum} type - * @default 'text-to-image' - */ -_StabilityAiGeneratedAssetOptions = StabilityAiGeneratedAssetOptions; -/** - * Create an instance of StabilityAiGeneratedAssetOptions from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/StabilityAiGeneratedAssetOptions} An instance of StabilityAiGeneratedAssetOptions. - */ -_defineProperty(StabilityAiGeneratedAssetOptions, "fromJSON", function (json_string) { - return _StabilityAiGeneratedAssetOptions.constructFromObject(JSON.parse(json_string)); -}); -StabilityAiGeneratedAssetOptions.prototype['type'] = 'text-to-image'; - -/** - * The text prompt to generate an image from. - * @member {String} prompt - */ -StabilityAiGeneratedAssetOptions.prototype['prompt'] = undefined; - -/** - * The engine (model) to use for generating the image. Select from the list of available engines:
  • `stable-diffusion-xl-1024-v0-9`
  • `stable-diffusion-xl-1024-v1-0`
  • `stable-diffusion-v1-6`
  • `stable-diffusion-512-v2-1`
  • `stable-diffusion-xl-beta-v2-2-2`
- * @member {module:model/StabilityAiGeneratedAssetOptions.EngineEnum} engine - * @default 'stable-diffusion-xl-1024-v1-0' - */ -StabilityAiGeneratedAssetOptions.prototype['engine'] = 'stable-diffusion-xl-1024-v1-0'; - -/** - * The width of the image in pixels. Must be divisible by 64. - * @member {Number} width - */ -StabilityAiGeneratedAssetOptions.prototype['width'] = undefined; - -/** - * The height of the image in pixels. Must be divisible by 64. - * @member {Number} height - */ -StabilityAiGeneratedAssetOptions.prototype['height'] = undefined; - -/** - * The number of iterative diffusion steps to run. A number between 10 and 50. - * @member {Number} steps - * @default 30 - */ -StabilityAiGeneratedAssetOptions.prototype['steps'] = 30; - -/** - * Using the same seed can help you create images that look similar. Set to 0 for a random seed. A number between 0 and 4294967295. - * @member {Number} seed - * @default 0 - */ -StabilityAiGeneratedAssetOptions.prototype['seed'] = 0; - -/** - * Determines how closely the generated image will match the prompt. Lower numbers allow for more creative freedom. A number between 0 and 35. - * @member {Number} cfgScale - * @default 7 - */ -StabilityAiGeneratedAssetOptions.prototype['cfgScale'] = 7; - -/** - * Apply a preset to generate an image in a particular style. Select from the list of available presets:
  • `3d-model`
  • `analog-film`
  • `anime`
  • `cinematic`
  • `comic-book`
  • `digital-art`
  • `enhance`
  • `fantasy-art`
  • `isometric`
  • `line-art`
  • `low-poly`
  • `modeling-compound`
  • `neon-punk`
  • `origami`
  • `photographic`
  • `pixel-art`
  • `tile-texture`
- * @member {module:model/StabilityAiGeneratedAssetOptions.StylePresetEnum} stylePreset - */ -StabilityAiGeneratedAssetOptions.prototype['stylePreset'] = undefined; -StabilityAiGeneratedAssetOptions.OneOf = ["StabilityAiTextToImageOptions"]; -var _default = exports["default"] = StabilityAiGeneratedAssetOptions; \ No newline at end of file diff --git a/src/model/StabilityAiTextToImageOptions.js b/src/model/StabilityAiTextToImageOptions.js deleted file mode 100644 index 65397d8..0000000 --- a/src/model/StabilityAiTextToImageOptions.js +++ /dev/null @@ -1,529 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The StabilityAiTextToImageOptions model module. - * @module model/StabilityAiTextToImageOptions - * @version 0.2.9 - */ -var StabilityAiTextToImageOptions = /*#__PURE__*/function () { - /** - * Constructs a new StabilityAiTextToImageOptions. - * Options for the Stability AI text-to-image service. Set a text prompt to generate an image from plus other engine and configuration options. The output will be generated as a JPG file available at the URL returned in the response. - * @alias module:model/StabilityAiTextToImageOptions - * @param type {module:model/StabilityAiTextToImageOptions.TypeEnum} The type of asset to generate - set to `text-to-image` for text-to-image. - * @param prompt {String} The text prompt to generate an image from. - * @param width {Number} The width of the image in pixels. Must be divisible by 64. - * @param height {Number} The height of the image in pixels. Must be divisible by 64. - */ - function StabilityAiTextToImageOptions(type, prompt, width, height) { - _classCallCheck(this, StabilityAiTextToImageOptions); - StabilityAiTextToImageOptions.initialize(this, type, prompt, width, height); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(StabilityAiTextToImageOptions, [{ - key: "getType", - value: - /** - * Returns The type of asset to generate - set to `text-to-image` for text-to-image. - * @return {module:model/StabilityAiTextToImageOptions.TypeEnum} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset to generate - set to `text-to-image` for text-to-image. - * @param {module:model/StabilityAiTextToImageOptions.TypeEnum} type The type of asset to generate - set to `text-to-image` for text-to-image. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The text prompt to generate an image from. - * @return {String} - */ - }, { - key: "getPrompt", - value: function getPrompt() { - return this.prompt; - } - - /** - * Sets The text prompt to generate an image from. - * @param {String} prompt The text prompt to generate an image from. - */ - }, { - key: "setPrompt", - value: function setPrompt(prompt) { - this['prompt'] = prompt; - return this; - } - /** - * Returns The engine (model) to use for generating the image. Select from the list of available engines:
  • `stable-diffusion-xl-1024-v0-9`
  • `stable-diffusion-xl-1024-v1-0`
  • `stable-diffusion-v1-6`
  • `stable-diffusion-512-v2-1`
  • `stable-diffusion-xl-beta-v2-2-2`
- * @return {module:model/StabilityAiTextToImageOptions.EngineEnum} - */ - }, { - key: "getEngine", - value: function getEngine() { - return this.engine; - } - - /** - * Sets The engine (model) to use for generating the image. Select from the list of available engines:
  • `stable-diffusion-xl-1024-v0-9`
  • `stable-diffusion-xl-1024-v1-0`
  • `stable-diffusion-v1-6`
  • `stable-diffusion-512-v2-1`
  • `stable-diffusion-xl-beta-v2-2-2`
- * @param {module:model/StabilityAiTextToImageOptions.EngineEnum} engine The engine (model) to use for generating the image. Select from the list of available engines:
  • `stable-diffusion-xl-1024-v0-9`
  • `stable-diffusion-xl-1024-v1-0`
  • `stable-diffusion-v1-6`
  • `stable-diffusion-512-v2-1`
  • `stable-diffusion-xl-beta-v2-2-2`
- */ - }, { - key: "setEngine", - value: function setEngine(engine) { - this['engine'] = engine; - return this; - } - /** - * Returns The width of the image in pixels. Must be divisible by 64. - * @return {Number} - */ - }, { - key: "getWidth", - value: function getWidth() { - return this.width; - } - - /** - * Sets The width of the image in pixels. Must be divisible by 64. - * @param {Number} width The width of the image in pixels. Must be divisible by 64. - */ - }, { - key: "setWidth", - value: function setWidth(width) { - this['width'] = width; - return this; - } - /** - * Returns The height of the image in pixels. Must be divisible by 64. - * @return {Number} - */ - }, { - key: "getHeight", - value: function getHeight() { - return this.height; - } - - /** - * Sets The height of the image in pixels. Must be divisible by 64. - * @param {Number} height The height of the image in pixels. Must be divisible by 64. - */ - }, { - key: "setHeight", - value: function setHeight(height) { - this['height'] = height; - return this; - } - /** - * Returns The number of iterative diffusion steps to run. A number between 10 and 50. - * @return {Number} - */ - }, { - key: "getSteps", - value: function getSteps() { - return this.steps; - } - - /** - * Sets The number of iterative diffusion steps to run. A number between 10 and 50. - * @param {Number} steps The number of iterative diffusion steps to run. A number between 10 and 50. - */ - }, { - key: "setSteps", - value: function setSteps(steps) { - this['steps'] = steps; - return this; - } - /** - * Returns Using the same seed can help you create images that look similar. Set to 0 for a random seed. A number between 0 and 4294967295. - * @return {Number} - */ - }, { - key: "getSeed", - value: function getSeed() { - return this.seed; - } - - /** - * Sets Using the same seed can help you create images that look similar. Set to 0 for a random seed. A number between 0 and 4294967295. - * @param {Number} seed Using the same seed can help you create images that look similar. Set to 0 for a random seed. A number between 0 and 4294967295. - */ - }, { - key: "setSeed", - value: function setSeed(seed) { - this['seed'] = seed; - return this; - } - /** - * Returns Determines how closely the generated image will match the prompt. Lower numbers allow for more creative freedom. A number between 0 and 35. - * @return {Number} - */ - }, { - key: "getCfgScale", - value: function getCfgScale() { - return this.cfgScale; - } - - /** - * Sets Determines how closely the generated image will match the prompt. Lower numbers allow for more creative freedom. A number between 0 and 35. - * @param {Number} cfgScale Determines how closely the generated image will match the prompt. Lower numbers allow for more creative freedom. A number between 0 and 35. - */ - }, { - key: "setCfgScale", - value: function setCfgScale(cfgScale) { - this['cfgScale'] = cfgScale; - return this; - } - /** - * Returns Apply a preset to generate an image in a particular style. Select from the list of available presets:
  • `3d-model`
  • `analog-film`
  • `anime`
  • `cinematic`
  • `comic-book`
  • `digital-art`
  • `enhance`
  • `fantasy-art`
  • `isometric`
  • `line-art`
  • `low-poly`
  • `modeling-compound`
  • `neon-punk`
  • `origami`
  • `photographic`
  • `pixel-art`
  • `tile-texture`
- * @return {module:model/StabilityAiTextToImageOptions.StylePresetEnum} - */ - }, { - key: "getStylePreset", - value: function getStylePreset() { - return this.stylePreset; - } - - /** - * Sets Apply a preset to generate an image in a particular style. Select from the list of available presets:
  • `3d-model`
  • `analog-film`
  • `anime`
  • `cinematic`
  • `comic-book`
  • `digital-art`
  • `enhance`
  • `fantasy-art`
  • `isometric`
  • `line-art`
  • `low-poly`
  • `modeling-compound`
  • `neon-punk`
  • `origami`
  • `photographic`
  • `pixel-art`
  • `tile-texture`
- * @param {module:model/StabilityAiTextToImageOptions.StylePresetEnum} stylePreset Apply a preset to generate an image in a particular style. Select from the list of available presets:
  • `3d-model`
  • `analog-film`
  • `anime`
  • `cinematic`
  • `comic-book`
  • `digital-art`
  • `enhance`
  • `fantasy-art`
  • `isometric`
  • `line-art`
  • `low-poly`
  • `modeling-compound`
  • `neon-punk`
  • `origami`
  • `photographic`
  • `pixel-art`
  • `tile-texture`
- */ - }, { - key: "setStylePreset", - value: function setStylePreset(stylePreset) { - this['stylePreset'] = stylePreset; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, prompt, width, height) { - obj['type'] = type || 'text-to-image'; - obj['prompt'] = prompt; - obj['width'] = width; - obj['height'] = height; - } - - /** - * Constructs a StabilityAiTextToImageOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/StabilityAiTextToImageOptions} obj Optional instance to populate. - * @return {module:model/StabilityAiTextToImageOptions} The populated StabilityAiTextToImageOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new StabilityAiTextToImageOptions(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('prompt')) { - obj['prompt'] = _ApiClient["default"].convertToType(data['prompt'], 'String'); - } - if (data.hasOwnProperty('engine')) { - obj['engine'] = _ApiClient["default"].convertToType(data['engine'], 'String'); - } - if (data.hasOwnProperty('width')) { - obj['width'] = _ApiClient["default"].convertToType(data['width'], 'Number'); - } - if (data.hasOwnProperty('height')) { - obj['height'] = _ApiClient["default"].convertToType(data['height'], 'Number'); - } - if (data.hasOwnProperty('steps')) { - obj['steps'] = _ApiClient["default"].convertToType(data['steps'], 'Number'); - } - if (data.hasOwnProperty('seed')) { - obj['seed'] = _ApiClient["default"].convertToType(data['seed'], 'Number'); - } - if (data.hasOwnProperty('cfgScale')) { - obj['cfgScale'] = _ApiClient["default"].convertToType(data['cfgScale'], 'Number'); - } - if (data.hasOwnProperty('stylePreset')) { - obj['stylePreset'] = _ApiClient["default"].convertToType(data['stylePreset'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to StabilityAiTextToImageOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to StabilityAiTextToImageOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(StabilityAiTextToImageOptions.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['prompt'] && !(typeof data['prompt'] === 'string' || data['prompt'] instanceof String)) { - throw new Error("Expected the field `prompt` to be a primitive type in the JSON string but got " + data['prompt']); - } - // ensure the json data is a string - if (data['engine'] && !(typeof data['engine'] === 'string' || data['engine'] instanceof String)) { - throw new Error("Expected the field `engine` to be a primitive type in the JSON string but got " + data['engine']); - } - // ensure the json data is a string - if (data['stylePreset'] && !(typeof data['stylePreset'] === 'string' || data['stylePreset'] instanceof String)) { - throw new Error("Expected the field `stylePreset` to be a primitive type in the JSON string but got " + data['stylePreset']); - } - return true; - } - }]); -}(); -StabilityAiTextToImageOptions.RequiredProperties = ["type", "prompt", "width", "height"]; - -/** - * The type of asset to generate - set to `text-to-image` for text-to-image. - * @member {module:model/StabilityAiTextToImageOptions.TypeEnum} type - * @default 'text-to-image' - */ -StabilityAiTextToImageOptions.prototype['type'] = 'text-to-image'; - -/** - * The text prompt to generate an image from. - * @member {String} prompt - */ -StabilityAiTextToImageOptions.prototype['prompt'] = undefined; - -/** - * The engine (model) to use for generating the image. Select from the list of available engines:
  • `stable-diffusion-xl-1024-v0-9`
  • `stable-diffusion-xl-1024-v1-0`
  • `stable-diffusion-v1-6`
  • `stable-diffusion-512-v2-1`
  • `stable-diffusion-xl-beta-v2-2-2`
- * @member {module:model/StabilityAiTextToImageOptions.EngineEnum} engine - * @default 'stable-diffusion-xl-1024-v1-0' - */ -StabilityAiTextToImageOptions.prototype['engine'] = 'stable-diffusion-xl-1024-v1-0'; - -/** - * The width of the image in pixels. Must be divisible by 64. - * @member {Number} width - */ -StabilityAiTextToImageOptions.prototype['width'] = undefined; - -/** - * The height of the image in pixels. Must be divisible by 64. - * @member {Number} height - */ -StabilityAiTextToImageOptions.prototype['height'] = undefined; - -/** - * The number of iterative diffusion steps to run. A number between 10 and 50. - * @member {Number} steps - * @default 30 - */ -StabilityAiTextToImageOptions.prototype['steps'] = 30; - -/** - * Using the same seed can help you create images that look similar. Set to 0 for a random seed. A number between 0 and 4294967295. - * @member {Number} seed - * @default 0 - */ -StabilityAiTextToImageOptions.prototype['seed'] = 0; - -/** - * Determines how closely the generated image will match the prompt. Lower numbers allow for more creative freedom. A number between 0 and 35. - * @member {Number} cfgScale - * @default 7 - */ -StabilityAiTextToImageOptions.prototype['cfgScale'] = 7; - -/** - * Apply a preset to generate an image in a particular style. Select from the list of available presets:
  • `3d-model`
  • `analog-film`
  • `anime`
  • `cinematic`
  • `comic-book`
  • `digital-art`
  • `enhance`
  • `fantasy-art`
  • `isometric`
  • `line-art`
  • `low-poly`
  • `modeling-compound`
  • `neon-punk`
  • `origami`
  • `photographic`
  • `pixel-art`
  • `tile-texture`
- * @member {module:model/StabilityAiTextToImageOptions.StylePresetEnum} stylePreset - */ -StabilityAiTextToImageOptions.prototype['stylePreset'] = undefined; - -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -StabilityAiTextToImageOptions['TypeEnum'] = { - /** - * value: "text-to-image" - * @const - */ - "text-to-image": "text-to-image" -}; - -/** - * Allowed values for the engine property. - * @enum {String} - * @readonly - */ -StabilityAiTextToImageOptions['EngineEnum'] = { - /** - * value: "stable-diffusion-xl-1024-v0-9" - * @const - */ - "xl-1024-v0-9": "stable-diffusion-xl-1024-v0-9", - /** - * value: "stable-diffusion-xl-1024-v1-0" - * @const - */ - "xl-1024-v1-0": "stable-diffusion-xl-1024-v1-0", - /** - * value: "stable-diffusion-v1-6" - * @const - */ - "v1-6": "stable-diffusion-v1-6", - /** - * value: "stable-diffusion-512-v2-1" - * @const - */ - "512-v2-1": "stable-diffusion-512-v2-1", - /** - * value: "stable-diffusion-xl-beta-v2-2-2" - * @const - */ - "xl-beta-v2-2-2": "stable-diffusion-xl-beta-v2-2-2" -}; - -/** - * Allowed values for the stylePreset property. - * @enum {String} - * @readonly - */ -StabilityAiTextToImageOptions['StylePresetEnum'] = { - /** - * value: "3d-model" - * @const - */ - "3d-model": "3d-model", - /** - * value: "analog-film" - * @const - */ - "analog-film": "analog-film", - /** - * value: "anime" - * @const - */ - "anime": "anime", - /** - * value: "cinematic" - * @const - */ - "cinematic": "cinematic", - /** - * value: "comic-book" - * @const - */ - "comic-book": "comic-book", - /** - * value: "digital-art" - * @const - */ - "digital-art": "digital-art", - /** - * value: "enhance" - * @const - */ - "enhance": "enhance", - /** - * value: "fantasy-art" - * @const - */ - "fantasy-art": "fantasy-art", - /** - * value: "isometric" - * @const - */ - "isometric": "isometric", - /** - * value: "line-art" - * @const - */ - "line-art": "line-art", - /** - * value: "low-poly" - * @const - */ - "low-poly": "low-poly", - /** - * value: "modeling-compound" - * @const - */ - "modeling-compound": "modeling-compound", - /** - * value: "neon-punk" - * @const - */ - "neon-punk": "neon-punk", - /** - * value: "origami" - * @const - */ - "origami": "origami", - /** - * value: "photographic" - * @const - */ - "photographic": "photographic", - /** - * value: "pixel-art" - * @const - */ - "pixel-art": "pixel-art", - /** - * value: "tile-texture" - * @const - */ - "tile-texture": "tile-texture" -}; -var _default = exports["default"] = StabilityAiTextToImageOptions; \ No newline at end of file diff --git a/src/model/Template.js b/src/model/Template.js deleted file mode 100644 index 4d626b9..0000000 --- a/src/model/Template.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Edit = _interopRequireDefault(require("./Edit")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Template model module. - * @module model/Template - * @version 0.2.9 - */ -var Template = /*#__PURE__*/function () { - /** - * Constructs a new Template. - * A template is a saved [Edit](#tocs_edit) than can be loaded and re-used. - * @alias module:model/Template - * @param name {String} The template name - */ - function Template(name) { - _classCallCheck(this, Template); - Template.initialize(this, name); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Template, [{ - key: "getName", - value: - /** - * Returns The template name - * @return {String} - */ - function getName() { - return this.name; - } - - /** - * Sets The template name - * @param {String} name The template name - */ - }, { - key: "setName", - value: function setName(name) { - this['name'] = name; - return this; - } - /** - * @return {module:model/Edit} - */ - }, { - key: "getTemplate", - value: function getTemplate() { - return this.template; - } - - /** - * @param {module:model/Edit} template - */ - }, { - key: "setTemplate", - value: function setTemplate(template) { - this['template'] = template; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, name) { - obj['name'] = name; - } - - /** - * Constructs a Template from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Template} obj Optional instance to populate. - * @return {module:model/Template} The populated Template instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Template(); - if (data.hasOwnProperty('name')) { - obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('template')) { - obj['template'] = _Edit["default"].constructFromObject(data['template']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Template. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Template. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Template.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { - throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); - } - // validate the optional field `template` - if (data['template']) { - // data not null - _Edit["default"].validateJSON(data['template']); - } - return true; - } - }]); -}(); -Template.RequiredProperties = ["name"]; - -/** - * The template name - * @member {String} name - */ -Template.prototype['name'] = undefined; - -/** - * @member {module:model/Edit} template - */ -Template.prototype['template'] = undefined; -var _default = exports["default"] = Template; \ No newline at end of file diff --git a/src/model/TemplateDataResponse.js b/src/model/TemplateDataResponse.js deleted file mode 100644 index cd2e5c9..0000000 --- a/src/model/TemplateDataResponse.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _TemplateDataResponseData = _interopRequireDefault(require("./TemplateDataResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TemplateDataResponse model module. - * @module model/TemplateDataResponse - * @version 0.2.9 - */ -var TemplateDataResponse = /*#__PURE__*/function () { - /** - * Constructs a new TemplateDataResponse. - * The template data including the template name and [Edit](#tocs_edit). - * @alias module:model/TemplateDataResponse - * @param success {Boolean} `true` if successfully returned, else `false`. - * @param message {String} `OK`, `Bad Request` or an error message. - * @param response {module:model/TemplateDataResponseData} - */ - function TemplateDataResponse(success, message, response) { - _classCallCheck(this, TemplateDataResponse); - TemplateDataResponse.initialize(this, success, message, response); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TemplateDataResponse, [{ - key: "getSuccess", - value: - /** - * Returns `true` if successfully returned, else `false`. - * @return {Boolean} - */ - function getSuccess() { - return this.success; - } - - /** - * Sets `true` if successfully returned, else `false`. - * @param {Boolean} success `true` if successfully returned, else `false`. - */ - }, { - key: "setSuccess", - value: function setSuccess(success) { - this['success'] = success; - return this; - } - /** - * Returns `OK`, `Bad Request` or an error message. - * @return {String} - */ - }, { - key: "getMessage", - value: function getMessage() { - return this.message; - } - - /** - * Sets `OK`, `Bad Request` or an error message. - * @param {String} message `OK`, `Bad Request` or an error message. - */ - }, { - key: "setMessage", - value: function setMessage(message) { - this['message'] = message; - return this; - } - /** - * @return {module:model/TemplateDataResponseData} - */ - }, { - key: "getResponse", - value: function getResponse() { - return this.response; - } - - /** - * @param {module:model/TemplateDataResponseData} response - */ - }, { - key: "setResponse", - value: function setResponse(response) { - this['response'] = response; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, success, message, response) { - obj['success'] = success; - obj['message'] = message; - obj['response'] = response; - } - - /** - * Constructs a TemplateDataResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateDataResponse} obj Optional instance to populate. - * @return {module:model/TemplateDataResponse} The populated TemplateDataResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateDataResponse(); - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean'); - } - if (data.hasOwnProperty('message')) { - obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String'); - } - if (data.hasOwnProperty('response')) { - obj['response'] = _TemplateDataResponseData["default"].constructFromObject(data['response']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateDataResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateDataResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TemplateDataResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - // validate the optional field `response` - if (data['response']) { - // data not null - _TemplateDataResponseData["default"].validateJSON(data['response']); - } - return true; - } - }]); -}(); -TemplateDataResponse.RequiredProperties = ["success", "message", "response"]; - -/** - * `true` if successfully returned, else `false`. - * @member {Boolean} success - */ -TemplateDataResponse.prototype['success'] = undefined; - -/** - * `OK`, `Bad Request` or an error message. - * @member {String} message - */ -TemplateDataResponse.prototype['message'] = undefined; - -/** - * @member {module:model/TemplateDataResponseData} response - */ -TemplateDataResponse.prototype['response'] = undefined; -var _default = exports["default"] = TemplateDataResponse; \ No newline at end of file diff --git a/src/model/TemplateDataResponseData.js b/src/model/TemplateDataResponseData.js deleted file mode 100644 index 5bcb7b9..0000000 --- a/src/model/TemplateDataResponseData.js +++ /dev/null @@ -1,239 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Edit = _interopRequireDefault(require("./Edit")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TemplateDataResponseData model module. - * @module model/TemplateDataResponseData - * @version 0.2.9 - */ -var TemplateDataResponseData = /*#__PURE__*/function () { - /** - * Constructs a new TemplateDataResponseData. - * The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse). - * @alias module:model/TemplateDataResponseData - * @param id {String} The unique id of the template in UUID format. - * @param name {String} The template name. - * @param owner {String} The owner id of the templates. - * @param template {module:model/Edit} - */ - function TemplateDataResponseData(id, name, owner, template) { - _classCallCheck(this, TemplateDataResponseData); - TemplateDataResponseData.initialize(this, id, name, owner, template); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TemplateDataResponseData, [{ - key: "getId", - value: - /** - * Returns The unique id of the template in UUID format. - * @return {String} - */ - function getId() { - return this.id; - } - - /** - * Sets The unique id of the template in UUID format. - * @param {String} id The unique id of the template in UUID format. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns The template name. - * @return {String} - */ - }, { - key: "getName", - value: function getName() { - return this.name; - } - - /** - * Sets The template name. - * @param {String} name The template name. - */ - }, { - key: "setName", - value: function setName(name) { - this['name'] = name; - return this; - } - /** - * Returns The owner id of the templates. - * @return {String} - */ - }, { - key: "getOwner", - value: function getOwner() { - return this.owner; - } - - /** - * Sets The owner id of the templates. - * @param {String} owner The owner id of the templates. - */ - }, { - key: "setOwner", - value: function setOwner(owner) { - this['owner'] = owner; - return this; - } - /** - * @return {module:model/Edit} - */ - }, { - key: "getTemplate", - value: function getTemplate() { - return this.template; - } - - /** - * @param {module:model/Edit} template - */ - }, { - key: "setTemplate", - value: function setTemplate(template) { - this['template'] = template; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, id, name, owner, template) { - obj['id'] = id; - obj['name'] = name; - obj['owner'] = owner; - obj['template'] = template; - } - - /** - * Constructs a TemplateDataResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateDataResponseData} obj Optional instance to populate. - * @return {module:model/TemplateDataResponseData} The populated TemplateDataResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateDataResponseData(); - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('name')) { - obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('owner')) { - obj['owner'] = _ApiClient["default"].convertToType(data['owner'], 'String'); - } - if (data.hasOwnProperty('template')) { - obj['template'] = _Edit["default"].constructFromObject(data['template']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateDataResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateDataResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TemplateDataResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { - throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); - } - // ensure the json data is a string - if (data['owner'] && !(typeof data['owner'] === 'string' || data['owner'] instanceof String)) { - throw new Error("Expected the field `owner` to be a primitive type in the JSON string but got " + data['owner']); - } - // validate the optional field `template` - if (data['template']) { - // data not null - _Edit["default"].validateJSON(data['template']); - } - return true; - } - }]); -}(); -TemplateDataResponseData.RequiredProperties = ["id", "name", "owner", "template"]; - -/** - * The unique id of the template in UUID format. - * @member {String} id - */ -TemplateDataResponseData.prototype['id'] = undefined; - -/** - * The template name. - * @member {String} name - */ -TemplateDataResponseData.prototype['name'] = undefined; - -/** - * The owner id of the templates. - * @member {String} owner - */ -TemplateDataResponseData.prototype['owner'] = undefined; - -/** - * @member {module:model/Edit} template - */ -TemplateDataResponseData.prototype['template'] = undefined; -var _default = exports["default"] = TemplateDataResponseData; \ No newline at end of file diff --git a/src/model/TemplateListResponse.js b/src/model/TemplateListResponse.js deleted file mode 100644 index 6c4cb1c..0000000 --- a/src/model/TemplateListResponse.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _TemplateListResponseData = _interopRequireDefault(require("./TemplateListResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TemplateListResponse model module. - * @module model/TemplateListResponse - * @version 0.2.9 - */ -var TemplateListResponse = /*#__PURE__*/function () { - /** - * Constructs a new TemplateListResponse. - * A list of previously saved templates. - * @alias module:model/TemplateListResponse - * @param success {Boolean} `true` if successfully returned, else `false`. - * @param message {String} `OK`, `Bad Request` or an error message. - * @param response {module:model/TemplateListResponseData} - */ - function TemplateListResponse(success, message, response) { - _classCallCheck(this, TemplateListResponse); - TemplateListResponse.initialize(this, success, message, response); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TemplateListResponse, [{ - key: "getSuccess", - value: - /** - * Returns `true` if successfully returned, else `false`. - * @return {Boolean} - */ - function getSuccess() { - return this.success; - } - - /** - * Sets `true` if successfully returned, else `false`. - * @param {Boolean} success `true` if successfully returned, else `false`. - */ - }, { - key: "setSuccess", - value: function setSuccess(success) { - this['success'] = success; - return this; - } - /** - * Returns `OK`, `Bad Request` or an error message. - * @return {String} - */ - }, { - key: "getMessage", - value: function getMessage() { - return this.message; - } - - /** - * Sets `OK`, `Bad Request` or an error message. - * @param {String} message `OK`, `Bad Request` or an error message. - */ - }, { - key: "setMessage", - value: function setMessage(message) { - this['message'] = message; - return this; - } - /** - * @return {module:model/TemplateListResponseData} - */ - }, { - key: "getResponse", - value: function getResponse() { - return this.response; - } - - /** - * @param {module:model/TemplateListResponseData} response - */ - }, { - key: "setResponse", - value: function setResponse(response) { - this['response'] = response; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, success, message, response) { - obj['success'] = success; - obj['message'] = message; - obj['response'] = response; - } - - /** - * Constructs a TemplateListResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateListResponse} obj Optional instance to populate. - * @return {module:model/TemplateListResponse} The populated TemplateListResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateListResponse(); - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean'); - } - if (data.hasOwnProperty('message')) { - obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String'); - } - if (data.hasOwnProperty('response')) { - obj['response'] = _TemplateListResponseData["default"].constructFromObject(data['response']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateListResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateListResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TemplateListResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - // validate the optional field `response` - if (data['response']) { - // data not null - _TemplateListResponseData["default"].validateJSON(data['response']); - } - return true; - } - }]); -}(); -TemplateListResponse.RequiredProperties = ["success", "message", "response"]; - -/** - * `true` if successfully returned, else `false`. - * @member {Boolean} success - */ -TemplateListResponse.prototype['success'] = undefined; - -/** - * `OK`, `Bad Request` or an error message. - * @member {String} message - */ -TemplateListResponse.prototype['message'] = undefined; - -/** - * @member {module:model/TemplateListResponseData} response - */ -TemplateListResponse.prototype['response'] = undefined; -var _default = exports["default"] = TemplateListResponse; \ No newline at end of file diff --git a/src/model/TemplateListResponseData.js b/src/model/TemplateListResponseData.js deleted file mode 100644 index fc4a420..0000000 --- a/src/model/TemplateListResponseData.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _TemplateListResponseItem = _interopRequireDefault(require("./TemplateListResponseItem")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TemplateListResponseData model module. - * @module model/TemplateListResponseData - * @version 0.2.9 - */ -var TemplateListResponseData = /*#__PURE__*/function () { - /** - * Constructs a new TemplateListResponseData. - * The response data returned with the [TemplateListResponse](#tocs_templatelistresponse). - * @alias module:model/TemplateListResponseData - * @param owner {String} The owner id of the templates. - * @param templates {Array.} The list of templates. - */ - function TemplateListResponseData(owner, templates) { - _classCallCheck(this, TemplateListResponseData); - TemplateListResponseData.initialize(this, owner, templates); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TemplateListResponseData, [{ - key: "getOwner", - value: - /** - * Returns The owner id of the templates. - * @return {String} - */ - function getOwner() { - return this.owner; - } - - /** - * Sets The owner id of the templates. - * @param {String} owner The owner id of the templates. - */ - }, { - key: "setOwner", - value: function setOwner(owner) { - this['owner'] = owner; - return this; - } - /** - * Returns The list of templates. - * @return {Array.} - */ - }, { - key: "getTemplates", - value: function getTemplates() { - return this.templates; - } - - /** - * Sets The list of templates. - * @param {Array.} templates The list of templates. - */ - }, { - key: "setTemplates", - value: function setTemplates(templates) { - this['templates'] = templates; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, owner, templates) { - obj['owner'] = owner; - obj['templates'] = templates; - } - - /** - * Constructs a TemplateListResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateListResponseData} obj Optional instance to populate. - * @return {module:model/TemplateListResponseData} The populated TemplateListResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateListResponseData(); - if (data.hasOwnProperty('owner')) { - obj['owner'] = _ApiClient["default"].convertToType(data['owner'], 'String'); - } - if (data.hasOwnProperty('templates')) { - obj['templates'] = _ApiClient["default"].convertToType(data['templates'], [_TemplateListResponseItem["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateListResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateListResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TemplateListResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['owner'] && !(typeof data['owner'] === 'string' || data['owner'] instanceof String)) { - throw new Error("Expected the field `owner` to be a primitive type in the JSON string but got " + data['owner']); - } - if (data['templates']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['templates'])) { - throw new Error("Expected the field `templates` to be an array in the JSON data but got " + data['templates']); - } - // validate the optional field `templates` (array) - var _iterator2 = _createForOfIteratorHelper(data['templates']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _TemplateListResponseItem["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - return true; - } - }]); -}(); -TemplateListResponseData.RequiredProperties = ["owner", "templates"]; - -/** - * The owner id of the templates. - * @member {String} owner - */ -TemplateListResponseData.prototype['owner'] = undefined; - -/** - * The list of templates. - * @member {Array.} templates - */ -TemplateListResponseData.prototype['templates'] = undefined; -var _default = exports["default"] = TemplateListResponseData; \ No newline at end of file diff --git a/src/model/TemplateListResponseItem.js b/src/model/TemplateListResponseItem.js deleted file mode 100644 index 8eec5ca..0000000 --- a/src/model/TemplateListResponseItem.js +++ /dev/null @@ -1,236 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TemplateListResponseItem model module. - * @module model/TemplateListResponseItem - * @version 0.2.9 - */ -var TemplateListResponseItem = /*#__PURE__*/function () { - /** - * Constructs a new TemplateListResponseItem. - * The individual template item returned with the [TemplateListResponseData](#tocs_templatelistresponsedata) templates list. - * @alias module:model/TemplateListResponseItem - * @param id {String} The unique id of the template in UUID format. - * @param name {String} The template name - */ - function TemplateListResponseItem(id, name) { - _classCallCheck(this, TemplateListResponseItem); - TemplateListResponseItem.initialize(this, id, name); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TemplateListResponseItem, [{ - key: "getId", - value: - /** - * Returns The unique id of the template in UUID format. - * @return {String} - */ - function getId() { - return this.id; - } - - /** - * Sets The unique id of the template in UUID format. - * @param {String} id The unique id of the template in UUID format. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns The template name - * @return {String} - */ - }, { - key: "getName", - value: function getName() { - return this.name; - } - - /** - * Sets The template name - * @param {String} name The template name - */ - }, { - key: "setName", - value: function setName(name) { - this['name'] = name; - return this; - } - /** - * Returns The time the template was created. - * @return {String} - */ - }, { - key: "getCreated", - value: function getCreated() { - return this.created; - } - - /** - * Sets The time the template was created. - * @param {String} created The time the template was created. - */ - }, { - key: "setCreated", - value: function setCreated(created) { - this['created'] = created; - return this; - } - /** - * Returns The time the template was last updated. - * @return {String} - */ - }, { - key: "getUpdated", - value: function getUpdated() { - return this.updated; - } - - /** - * Sets The time the template was last updated. - * @param {String} updated The time the template was last updated. - */ - }, { - key: "setUpdated", - value: function setUpdated(updated) { - this['updated'] = updated; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, id, name) { - obj['id'] = id; - obj['name'] = name; - } - - /** - * Constructs a TemplateListResponseItem from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateListResponseItem} obj Optional instance to populate. - * @return {module:model/TemplateListResponseItem} The populated TemplateListResponseItem instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateListResponseItem(); - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('name')) { - obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('created')) { - obj['created'] = _ApiClient["default"].convertToType(data['created'], 'String'); - } - if (data.hasOwnProperty('updated')) { - obj['updated'] = _ApiClient["default"].convertToType(data['updated'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateListResponseItem. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateListResponseItem. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TemplateListResponseItem.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { - throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); - } - // ensure the json data is a string - if (data['created'] && !(typeof data['created'] === 'string' || data['created'] instanceof String)) { - throw new Error("Expected the field `created` to be a primitive type in the JSON string but got " + data['created']); - } - // ensure the json data is a string - if (data['updated'] && !(typeof data['updated'] === 'string' || data['updated'] instanceof String)) { - throw new Error("Expected the field `updated` to be a primitive type in the JSON string but got " + data['updated']); - } - return true; - } - }]); -}(); -TemplateListResponseItem.RequiredProperties = ["id", "name"]; - -/** - * The unique id of the template in UUID format. - * @member {String} id - */ -TemplateListResponseItem.prototype['id'] = undefined; - -/** - * The template name - * @member {String} name - */ -TemplateListResponseItem.prototype['name'] = undefined; - -/** - * The time the template was created. - * @member {String} created - */ -TemplateListResponseItem.prototype['created'] = undefined; - -/** - * The time the template was last updated. - * @member {String} updated - */ -TemplateListResponseItem.prototype['updated'] = undefined; -var _default = exports["default"] = TemplateListResponseItem; \ No newline at end of file diff --git a/src/model/TemplateRender.js b/src/model/TemplateRender.js deleted file mode 100644 index 8439526..0000000 --- a/src/model/TemplateRender.js +++ /dev/null @@ -1,186 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _MergeField = _interopRequireDefault(require("./MergeField")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TemplateRender model module. - * @module model/TemplateRender - * @version 0.2.9 - */ -var TemplateRender = /*#__PURE__*/function () { - /** - * Constructs a new TemplateRender. - * Configure the id and optional merge fields to render a template by id. - * @alias module:model/TemplateRender - * @param id {String} The id of the template to render in UUID format. - */ - function TemplateRender(id) { - _classCallCheck(this, TemplateRender); - TemplateRender.initialize(this, id); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TemplateRender, [{ - key: "getId", - value: - /** - * Returns The id of the template to render in UUID format. - * @return {String} - */ - function getId() { - return this.id; - } - - /** - * Sets The id of the template to render in UUID format. - * @param {String} id The id of the template to render in UUID format. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns An array of key/value pairs that provides an easy way to create templates with placeholders. The placeholders can be used to find and replace keys with values. For example you can search for the placeholder `{{NAME}}` and replace it with the value `Jane`. - * @return {Array.} - */ - }, { - key: "getMerge", - value: function getMerge() { - return this.merge; - } - - /** - * Sets An array of key/value pairs that provides an easy way to create templates with placeholders. The placeholders can be used to find and replace keys with values. For example you can search for the placeholder `{{NAME}}` and replace it with the value `Jane`. - * @param {Array.} merge An array of key/value pairs that provides an easy way to create templates with placeholders. The placeholders can be used to find and replace keys with values. For example you can search for the placeholder `{{NAME}}` and replace it with the value `Jane`. - */ - }, { - key: "setMerge", - value: function setMerge(merge) { - this['merge'] = merge; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, id) { - obj['id'] = id; - } - - /** - * Constructs a TemplateRender from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateRender} obj Optional instance to populate. - * @return {module:model/TemplateRender} The populated TemplateRender instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateRender(); - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('merge')) { - obj['merge'] = _ApiClient["default"].convertToType(data['merge'], [_MergeField["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateRender. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateRender. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TemplateRender.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - if (data['merge']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['merge'])) { - throw new Error("Expected the field `merge` to be an array in the JSON data but got " + data['merge']); - } - // validate the optional field `merge` (array) - var _iterator2 = _createForOfIteratorHelper(data['merge']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _MergeField["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - return true; - } - }]); -}(); -TemplateRender.RequiredProperties = ["id"]; - -/** - * The id of the template to render in UUID format. - * @member {String} id - */ -TemplateRender.prototype['id'] = undefined; - -/** - * An array of key/value pairs that provides an easy way to create templates with placeholders. The placeholders can be used to find and replace keys with values. For example you can search for the placeholder `{{NAME}}` and replace it with the value `Jane`. - * @member {Array.} merge - */ -TemplateRender.prototype['merge'] = undefined; -var _default = exports["default"] = TemplateRender; \ No newline at end of file diff --git a/src/model/TemplateResponse.js b/src/model/TemplateResponse.js deleted file mode 100644 index 9bfb05a..0000000 --- a/src/model/TemplateResponse.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _TemplateResponseData = _interopRequireDefault(require("./TemplateResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TemplateResponse model module. - * @module model/TemplateResponse - * @version 0.2.9 - */ -var TemplateResponse = /*#__PURE__*/function () { - /** - * Constructs a new TemplateResponse. - * The response received after a [template](#create-template) is submitted. The template is saved and a unique template id is returned. - * @alias module:model/TemplateResponse - * @param success {Boolean} `true` if successfully created, else `false`. - * @param message {String} `Created`, `Bad Request` or an error message. - * @param response {module:model/TemplateResponseData} - */ - function TemplateResponse(success, message, response) { - _classCallCheck(this, TemplateResponse); - TemplateResponse.initialize(this, success, message, response); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TemplateResponse, [{ - key: "getSuccess", - value: - /** - * Returns `true` if successfully created, else `false`. - * @return {Boolean} - */ - function getSuccess() { - return this.success; - } - - /** - * Sets `true` if successfully created, else `false`. - * @param {Boolean} success `true` if successfully created, else `false`. - */ - }, { - key: "setSuccess", - value: function setSuccess(success) { - this['success'] = success; - return this; - } - /** - * Returns `Created`, `Bad Request` or an error message. - * @return {String} - */ - }, { - key: "getMessage", - value: function getMessage() { - return this.message; - } - - /** - * Sets `Created`, `Bad Request` or an error message. - * @param {String} message `Created`, `Bad Request` or an error message. - */ - }, { - key: "setMessage", - value: function setMessage(message) { - this['message'] = message; - return this; - } - /** - * @return {module:model/TemplateResponseData} - */ - }, { - key: "getResponse", - value: function getResponse() { - return this.response; - } - - /** - * @param {module:model/TemplateResponseData} response - */ - }, { - key: "setResponse", - value: function setResponse(response) { - this['response'] = response; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, success, message, response) { - obj['success'] = success; - obj['message'] = message; - obj['response'] = response; - } - - /** - * Constructs a TemplateResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateResponse} obj Optional instance to populate. - * @return {module:model/TemplateResponse} The populated TemplateResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateResponse(); - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean'); - } - if (data.hasOwnProperty('message')) { - obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String'); - } - if (data.hasOwnProperty('response')) { - obj['response'] = _TemplateResponseData["default"].constructFromObject(data['response']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TemplateResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - // validate the optional field `response` - if (data['response']) { - // data not null - _TemplateResponseData["default"].validateJSON(data['response']); - } - return true; - } - }]); -}(); -TemplateResponse.RequiredProperties = ["success", "message", "response"]; - -/** - * `true` if successfully created, else `false`. - * @member {Boolean} success - */ -TemplateResponse.prototype['success'] = undefined; - -/** - * `Created`, `Bad Request` or an error message. - * @member {String} message - */ -TemplateResponse.prototype['message'] = undefined; - -/** - * @member {module:model/TemplateResponseData} response - */ -TemplateResponse.prototype['response'] = undefined; -var _default = exports["default"] = TemplateResponse; \ No newline at end of file diff --git a/src/model/TemplateResponseData.js b/src/model/TemplateResponseData.js deleted file mode 100644 index a8d50e5..0000000 --- a/src/model/TemplateResponseData.js +++ /dev/null @@ -1,170 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TemplateResponseData model module. - * @module model/TemplateResponseData - * @version 0.2.9 - */ -var TemplateResponseData = /*#__PURE__*/function () { - /** - * Constructs a new TemplateResponseData. - * The response data returned with the [TemplateResponse](#tocs_templateresponse). - * @alias module:model/TemplateResponseData - * @param message {String} Success response message or error details. - * @param id {String} The unique id of the template in UUID format. - */ - function TemplateResponseData(message, id) { - _classCallCheck(this, TemplateResponseData); - TemplateResponseData.initialize(this, message, id); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TemplateResponseData, [{ - key: "getMessage", - value: - /** - * Returns Success response message or error details. - * @return {String} - */ - function getMessage() { - return this.message; - } - - /** - * Sets Success response message or error details. - * @param {String} message Success response message or error details. - */ - }, { - key: "setMessage", - value: function setMessage(message) { - this['message'] = message; - return this; - } - /** - * Returns The unique id of the template in UUID format. - * @return {String} - */ - }, { - key: "getId", - value: function getId() { - return this.id; - } - - /** - * Sets The unique id of the template in UUID format. - * @param {String} id The unique id of the template in UUID format. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, message, id) { - obj['message'] = message; - obj['id'] = id; - } - - /** - * Constructs a TemplateResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TemplateResponseData} obj Optional instance to populate. - * @return {module:model/TemplateResponseData} The populated TemplateResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TemplateResponseData(); - if (data.hasOwnProperty('message')) { - obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String'); - } - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TemplateResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TemplateResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TemplateResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - return true; - } - }]); -}(); -TemplateResponseData.RequiredProperties = ["message", "id"]; - -/** - * Success response message or error details. - * @member {String} message - */ -TemplateResponseData.prototype['message'] = undefined; - -/** - * The unique id of the template in UUID format. - * @member {String} id - */ -TemplateResponseData.prototype['id'] = undefined; -var _default = exports["default"] = TemplateResponseData; \ No newline at end of file diff --git a/src/model/TextAlignment.js b/src/model/TextAlignment.js deleted file mode 100644 index be23118..0000000 --- a/src/model/TextAlignment.js +++ /dev/null @@ -1,191 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TextAlignment model module. - * @module model/TextAlignment - * @version 0.2.9 - */ -var TextAlignment = /*#__PURE__*/function () { - /** - * Constructs a new TextAlignment. - * Horizontal and vertical alignment properties for text. - * @alias module:model/TextAlignment - */ - function TextAlignment() { - _classCallCheck(this, TextAlignment); - TextAlignment.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TextAlignment, [{ - key: "getHorizontal", - value: - /** - * Returns The horizontal alignment of the text. Value must be one of:
  • `left`
  • `center`
  • `right`
- * @return {module:model/TextAlignment.HorizontalEnum} - */ - function getHorizontal() { - return this.horizontal; - } - - /** - * Sets The horizontal alignment of the text. Value must be one of:
  • `left`
  • `center`
  • `right`
- * @param {module:model/TextAlignment.HorizontalEnum} horizontal The horizontal alignment of the text. Value must be one of:
  • `left`
  • `center`
  • `right`
- */ - }, { - key: "setHorizontal", - value: function setHorizontal(horizontal) { - this['horizontal'] = horizontal; - return this; - } - /** - * Returns The vertical alignment of the text. Value must be one of:
  • `top`
  • `center`
  • `bottom`
- * @return {module:model/TextAlignment.VerticalEnum} - */ - }, { - key: "getVertical", - value: function getVertical() { - return this.vertical; - } - - /** - * Sets The vertical alignment of the text. Value must be one of:
  • `top`
  • `center`
  • `bottom`
- * @param {module:model/TextAlignment.VerticalEnum} vertical The vertical alignment of the text. Value must be one of:
  • `top`
  • `center`
  • `bottom`
- */ - }, { - key: "setVertical", - value: function setVertical(vertical) { - this['vertical'] = vertical; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a TextAlignment from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TextAlignment} obj Optional instance to populate. - * @return {module:model/TextAlignment} The populated TextAlignment instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TextAlignment(); - if (data.hasOwnProperty('horizontal')) { - obj['horizontal'] = _ApiClient["default"].convertToType(data['horizontal'], 'String'); - } - if (data.hasOwnProperty('vertical')) { - obj['vertical'] = _ApiClient["default"].convertToType(data['vertical'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TextAlignment. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TextAlignment. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['horizontal'] && !(typeof data['horizontal'] === 'string' || data['horizontal'] instanceof String)) { - throw new Error("Expected the field `horizontal` to be a primitive type in the JSON string but got " + data['horizontal']); - } - // ensure the json data is a string - if (data['vertical'] && !(typeof data['vertical'] === 'string' || data['vertical'] instanceof String)) { - throw new Error("Expected the field `vertical` to be a primitive type in the JSON string but got " + data['vertical']); - } - return true; - } - }]); -}(); -/** - * The horizontal alignment of the text. Value must be one of:
  • `left`
  • `center`
  • `right`
- * @member {module:model/TextAlignment.HorizontalEnum} horizontal - */ -TextAlignment.prototype['horizontal'] = undefined; - -/** - * The vertical alignment of the text. Value must be one of:
  • `top`
  • `center`
  • `bottom`
- * @member {module:model/TextAlignment.VerticalEnum} vertical - */ -TextAlignment.prototype['vertical'] = undefined; - -/** - * Allowed values for the horizontal property. - * @enum {String} - * @readonly - */ -TextAlignment['HorizontalEnum'] = { - /** - * value: "left" - * @const - */ - "left": "left", - /** - * value: "center" - * @const - */ - "center": "center", - /** - * value: "right" - * @const - */ - "right": "right" -}; - -/** - * Allowed values for the vertical property. - * @enum {String} - * @readonly - */ -TextAlignment['VerticalEnum'] = { - /** - * value: "top" - * @const - */ - "top": "top", - /** - * value: "center" - * @const - */ - "center": "center", - /** - * value: "bottom" - * @const - */ - "bottom": "bottom" -}; -var _default = exports["default"] = TextAlignment; \ No newline at end of file diff --git a/src/model/TextAsset.js b/src/model/TextAsset.js deleted file mode 100644 index 2887b40..0000000 --- a/src/model/TextAsset.js +++ /dev/null @@ -1,325 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _TextAlignment = _interopRequireDefault(require("./TextAlignment")); -var _TextBackground = _interopRequireDefault(require("./TextBackground")); -var _TextFont = _interopRequireDefault(require("./TextFont")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TextAsset model module. - * @module model/TextAsset - * @version 0.2.9 - */ -var TextAsset = /*#__PURE__*/function () { - /** - * Constructs a new TextAsset. - * The TextAsset is used to add text and titles to a video. The text can be styled with built in and custom [Fonts](#tocs_font). You can also add a background bounding box used to control wrapping and overflow. - * @alias module:model/TextAsset - * @param type {String} The type of asset - set to `text` for text. - * @param text {String} The text string to display. - */ - function TextAsset(type, text) { - _classCallCheck(this, TextAsset); - TextAsset.initialize(this, type, text); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TextAsset, [{ - key: "getType", - value: - /** - * Returns The type of asset - set to `text` for text. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset - set to `text` for text. - * @param {String} type The type of asset - set to `text` for text. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The text string to display. - * @return {String} - */ - }, { - key: "getText", - value: function getText() { - return this.text; - } - - /** - * Sets The text string to display. - * @param {String} text The text string to display. - */ - }, { - key: "setText", - value: function setText(text) { - this['text'] = text; - return this; - } - /** - * Returns Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box. - * @return {Number} - */ - }, { - key: "getWidth", - value: function getWidth() { - return this.width; - } - - /** - * Sets Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box. - * @param {Number} width Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box. - */ - }, { - key: "setWidth", - value: function setWidth(width) { - this['width'] = width; - return this; - } - /** - * Returns Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box. - * @return {Number} - */ - }, { - key: "getHeight", - value: function getHeight() { - return this.height; - } - - /** - * Sets Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box. - * @param {Number} height Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box. - */ - }, { - key: "setHeight", - value: function setHeight(height) { - this['height'] = height; - return this; - } - /** - * @return {module:model/TextFont} - */ - }, { - key: "getFont", - value: function getFont() { - return this.font; - } - - /** - * @param {module:model/TextFont} font - */ - }, { - key: "setFont", - value: function setFont(font) { - this['font'] = font; - return this; - } - /** - * @return {module:model/TextBackground} - */ - }, { - key: "getBackground", - value: function getBackground() { - return this.background; - } - - /** - * @param {module:model/TextBackground} background - */ - }, { - key: "setBackground", - value: function setBackground(background) { - this['background'] = background; - return this; - } - /** - * @return {module:model/TextAlignment} - */ - }, { - key: "getAlignment", - value: function getAlignment() { - return this.alignment; - } - - /** - * @param {module:model/TextAlignment} alignment - */ - }, { - key: "setAlignment", - value: function setAlignment(alignment) { - this['alignment'] = alignment; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, text) { - obj['type'] = type || 'text'; - obj['text'] = text; - } - - /** - * Constructs a TextAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TextAsset} obj Optional instance to populate. - * @return {module:model/TextAsset} The populated TextAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TextAsset(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('text')) { - obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String'); - } - if (data.hasOwnProperty('width')) { - obj['width'] = _ApiClient["default"].convertToType(data['width'], 'Number'); - } - if (data.hasOwnProperty('height')) { - obj['height'] = _ApiClient["default"].convertToType(data['height'], 'Number'); - } - if (data.hasOwnProperty('font')) { - obj['font'] = _TextFont["default"].constructFromObject(data['font']); - } - if (data.hasOwnProperty('background')) { - obj['background'] = _TextBackground["default"].constructFromObject(data['background']); - } - if (data.hasOwnProperty('alignment')) { - obj['alignment'] = _TextAlignment["default"].constructFromObject(data['alignment']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TextAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TextAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TextAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { - throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); - } - // validate the optional field `font` - if (data['font']) { - // data not null - _TextFont["default"].validateJSON(data['font']); - } - // validate the optional field `background` - if (data['background']) { - // data not null - _TextBackground["default"].validateJSON(data['background']); - } - // validate the optional field `alignment` - if (data['alignment']) { - // data not null - _TextAlignment["default"].validateJSON(data['alignment']); - } - return true; - } - }]); -}(); -TextAsset.RequiredProperties = ["type", "text"]; - -/** - * The type of asset - set to `text` for text. - * @member {String} type - * @default 'text' - */ -TextAsset.prototype['type'] = 'text'; - -/** - * The text string to display. - * @member {String} text - */ -TextAsset.prototype['text'] = undefined; - -/** - * Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box. - * @member {Number} width - */ -TextAsset.prototype['width'] = undefined; - -/** - * Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box. - * @member {Number} height - */ -TextAsset.prototype['height'] = undefined; - -/** - * @member {module:model/TextFont} font - */ -TextAsset.prototype['font'] = undefined; - -/** - * @member {module:model/TextBackground} background - */ -TextAsset.prototype['background'] = undefined; - -/** - * @member {module:model/TextAlignment} alignment - */ -TextAsset.prototype['alignment'] = undefined; -var _default = exports["default"] = TextAsset; \ No newline at end of file diff --git a/src/model/TextBackground.js b/src/model/TextBackground.js deleted file mode 100644 index 3bc2974..0000000 --- a/src/model/TextBackground.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TextBackground model module. - * @module model/TextBackground - * @version 0.2.9 - */ -var TextBackground = /*#__PURE__*/function () { - /** - * Constructs a new TextBackground. - * Displays a background box behind the text. - * @alias module:model/TextBackground - */ - function TextBackground() { - _classCallCheck(this, TextBackground); - TextBackground.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TextBackground, [{ - key: "getColor", - value: - /** - * Returns The background color using hexadecimal color notation. - * @return {String} - */ - function getColor() { - return this.color; - } - - /** - * Sets The background color using hexadecimal color notation. - * @param {String} color The background color using hexadecimal color notation. - */ - }, { - key: "setColor", - value: function setColor(color) { - this['color'] = color; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a TextBackground from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TextBackground} obj Optional instance to populate. - * @return {module:model/TextBackground} The populated TextBackground instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TextBackground(); - if (data.hasOwnProperty('color')) { - obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TextBackground. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TextBackground. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) { - throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']); - } - return true; - } - }]); -}(); -/** - * The background color using hexadecimal color notation. - * @member {String} color - */ -TextBackground.prototype['color'] = undefined; -var _default = exports["default"] = TextBackground; \ No newline at end of file diff --git a/src/model/TextFont.js b/src/model/TextFont.js deleted file mode 100644 index 08b9924..0000000 --- a/src/model/TextFont.js +++ /dev/null @@ -1,261 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TextFont model module. - * @module model/TextFont - * @version 0.2.9 - */ -var TextFont = /*#__PURE__*/function () { - /** - * Constructs a new TextFont. - * Font properties for text. - * @alias module:model/TextFont - */ - function TextFont() { - _classCallCheck(this, TextFont); - TextFont.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TextFont, [{ - key: "getFamily", - value: - /** - * Returns The font family name. This must be Family name embedded in the font, i.e. \"Open Sans\". - * @return {String} - */ - function getFamily() { - return this.family; - } - - /** - * Sets The font family name. This must be Family name embedded in the font, i.e. \"Open Sans\". - * @param {String} family The font family name. This must be Family name embedded in the font, i.e. \"Open Sans\". - */ - }, { - key: "setFamily", - value: function setFamily(family) { - this['family'] = family; - return this; - } - /** - * Returns The text color using hexadecimal color notation. - * @return {String} - */ - }, { - key: "getColor", - value: function getColor() { - return this.color; - } - - /** - * Sets The text color using hexadecimal color notation. - * @param {String} color The text color using hexadecimal color notation. - */ - }, { - key: "setColor", - value: function setColor(color) { - this['color'] = color; - return this; - } - /** - * Returns The opacity of the text where 1 is opaque and 0 is transparent. - * @return {Number} - */ - }, { - key: "getOpacity", - value: function getOpacity() { - return this.opacity; - } - - /** - * Sets The opacity of the text where 1 is opaque and 0 is transparent. - * @param {Number} opacity The opacity of the text where 1 is opaque and 0 is transparent. - */ - }, { - key: "setOpacity", - value: function setOpacity(opacity) { - this['opacity'] = opacity; - return this; - } - /** - * Returns The size of the font in pixels (px). - * @return {Number} - */ - }, { - key: "getSize", - value: function getSize() { - return this.size; - } - - /** - * Sets The size of the font in pixels (px). - * @param {Number} size The size of the font in pixels (px). - */ - }, { - key: "setSize", - value: function setSize(size) { - this['size'] = size; - return this; - } - /** - * Returns The weight of the font. 100 is lightest, 900 is heaviest (boldest). - * @return {Number} - */ - }, { - key: "getWeight", - value: function getWeight() { - return this.weight; - } - - /** - * Sets The weight of the font. 100 is lightest, 900 is heaviest (boldest). - * @param {Number} weight The weight of the font. 100 is lightest, 900 is heaviest (boldest). - */ - }, { - key: "setWeight", - value: function setWeight(weight) { - this['weight'] = weight; - return this; - } - /** - * Returns The line height of the font as a ratio of the font size. - * @return {Number} - */ - }, { - key: "getLineHeight", - value: function getLineHeight() { - return this.lineHeight; - } - - /** - * Sets The line height of the font as a ratio of the font size. - * @param {Number} lineHeight The line height of the font as a ratio of the font size. - */ - }, { - key: "setLineHeight", - value: function setLineHeight(lineHeight) { - this['lineHeight'] = lineHeight; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a TextFont from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TextFont} obj Optional instance to populate. - * @return {module:model/TextFont} The populated TextFont instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TextFont(); - if (data.hasOwnProperty('family')) { - obj['family'] = _ApiClient["default"].convertToType(data['family'], 'String'); - } - if (data.hasOwnProperty('color')) { - obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String'); - } - if (data.hasOwnProperty('opacity')) { - obj['opacity'] = _ApiClient["default"].convertToType(data['opacity'], 'Number'); - } - if (data.hasOwnProperty('size')) { - obj['size'] = _ApiClient["default"].convertToType(data['size'], 'Number'); - } - if (data.hasOwnProperty('weight')) { - obj['weight'] = _ApiClient["default"].convertToType(data['weight'], 'Number'); - } - if (data.hasOwnProperty('lineHeight')) { - obj['lineHeight'] = _ApiClient["default"].convertToType(data['lineHeight'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TextFont. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TextFont. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['family'] && !(typeof data['family'] === 'string' || data['family'] instanceof String)) { - throw new Error("Expected the field `family` to be a primitive type in the JSON string but got " + data['family']); - } - // ensure the json data is a string - if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) { - throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']); - } - return true; - } - }]); -}(); -/** - * The font family name. This must be Family name embedded in the font, i.e. \"Open Sans\". - * @member {String} family - */ -TextFont.prototype['family'] = undefined; - -/** - * The text color using hexadecimal color notation. - * @member {String} color - */ -TextFont.prototype['color'] = undefined; - -/** - * The opacity of the text where 1 is opaque and 0 is transparent. - * @member {Number} opacity - */ -TextFont.prototype['opacity'] = undefined; - -/** - * The size of the font in pixels (px). - * @member {Number} size - */ -TextFont.prototype['size'] = undefined; - -/** - * The weight of the font. 100 is lightest, 900 is heaviest (boldest). - * @member {Number} weight - */ -TextFont.prototype['weight'] = undefined; - -/** - * The line height of the font as a ratio of the font size. - * @member {Number} lineHeight - */ -TextFont.prototype['lineHeight'] = undefined; -var _default = exports["default"] = TextFont; \ No newline at end of file diff --git a/src/model/Thumbnail.js b/src/model/Thumbnail.js deleted file mode 100644 index 830ad45..0000000 --- a/src/model/Thumbnail.js +++ /dev/null @@ -1,164 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Thumbnail model module. - * @module model/Thumbnail - * @version 0.2.9 - */ -var Thumbnail = /*#__PURE__*/function () { - /** - * Constructs a new Thumbnail. - * Generate a thumbnail image for the video or image at a specific point from the timeline. - * @alias module:model/Thumbnail - * @param capture {Number} The point on the timeline in seconds to capture a single frame to use as the thumbnail image. - * @param scale {Number} Scale the thumbnail size to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale the thumbnail to half the size of the viewport. - */ - function Thumbnail(capture, scale) { - _classCallCheck(this, Thumbnail); - Thumbnail.initialize(this, capture, scale); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Thumbnail, [{ - key: "getCapture", - value: - /** - * Returns The point on the timeline in seconds to capture a single frame to use as the thumbnail image. - * @return {Number} - */ - function getCapture() { - return this.capture; - } - - /** - * Sets The point on the timeline in seconds to capture a single frame to use as the thumbnail image. - * @param {Number} capture The point on the timeline in seconds to capture a single frame to use as the thumbnail image. - */ - }, { - key: "setCapture", - value: function setCapture(capture) { - this['capture'] = capture; - return this; - } - /** - * Returns Scale the thumbnail size to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale the thumbnail to half the size of the viewport. - * minimum: 0 - * maximum: 1 - * @return {Number} - */ - }, { - key: "getScale", - value: function getScale() { - return this.scale; - } - - /** - * Sets Scale the thumbnail size to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale the thumbnail to half the size of the viewport. - * @param {Number} scale Scale the thumbnail size to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale the thumbnail to half the size of the viewport. - */ - }, { - key: "setScale", - value: function setScale(scale) { - this['scale'] = scale; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, capture, scale) { - obj['capture'] = capture; - obj['scale'] = scale; - } - - /** - * Constructs a Thumbnail from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Thumbnail} obj Optional instance to populate. - * @return {module:model/Thumbnail} The populated Thumbnail instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Thumbnail(); - if (data.hasOwnProperty('capture')) { - obj['capture'] = _ApiClient["default"].convertToType(data['capture'], 'Number'); - } - if (data.hasOwnProperty('scale')) { - obj['scale'] = _ApiClient["default"].convertToType(data['scale'], 'Number'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Thumbnail. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Thumbnail. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Thumbnail.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - return true; - } - }]); -}(); -Thumbnail.RequiredProperties = ["capture", "scale"]; - -/** - * The point on the timeline in seconds to capture a single frame to use as the thumbnail image. - * @member {Number} capture - */ -Thumbnail.prototype['capture'] = undefined; - -/** - * Scale the thumbnail size to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale the thumbnail to half the size of the viewport. - * @member {Number} scale - */ -Thumbnail.prototype['scale'] = undefined; -var _default = exports["default"] = Thumbnail; \ No newline at end of file diff --git a/src/model/Timeline.js b/src/model/Timeline.js deleted file mode 100644 index 208b6e4..0000000 --- a/src/model/Timeline.js +++ /dev/null @@ -1,298 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Font = _interopRequireDefault(require("./Font")); -var _Soundtrack = _interopRequireDefault(require("./Soundtrack")); -var _Track = _interopRequireDefault(require("./Track")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Timeline model module. - * @module model/Timeline - * @version 0.2.9 - */ -var Timeline = /*#__PURE__*/function () { - /** - * Constructs a new Timeline. - * A timeline represents the contents of a video edit over time, an audio edit over time, in seconds, or an image layout. A timeline consists of layers called tracks. Tracks are composed of titles, images, audio, html or video segments referred to as clips which are placed along the track at specific starting point and lasting for a specific amount of time. - * @alias module:model/Timeline - * @param tracks {Array.} A timeline consists of an array of tracks, each track containing clips. Tracks are layered on top of each other in the same order they are added to the array with the top most track layered over the top of those below it. Ensure that a track containing titles is the top most track so that it is displayed above videos and images. - */ - function Timeline(tracks) { - _classCallCheck(this, Timeline); - Timeline.initialize(this, tracks); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Timeline, [{ - key: "getSoundtrack", - value: - /** - * @return {module:model/Soundtrack} - */ - function getSoundtrack() { - return this.soundtrack; - } - - /** - * @param {module:model/Soundtrack} soundtrack - */ - }, { - key: "setSoundtrack", - value: function setSoundtrack(soundtrack) { - this['soundtrack'] = soundtrack; - return this; - } - /** - * Returns A hexadecimal value for the timeline background colour. Defaults to #000000 (black). - * @return {String} - */ - }, { - key: "getBackground", - value: function getBackground() { - return this.background; - } - - /** - * Sets A hexadecimal value for the timeline background colour. Defaults to #000000 (black). - * @param {String} background A hexadecimal value for the timeline background colour. Defaults to #000000 (black). - */ - }, { - key: "setBackground", - value: function setBackground(background) { - this['background'] = background; - return this; - } - /** - * Returns An array of custom fonts to be downloaded for use by the HTML assets. - * @return {Array.} - */ - }, { - key: "getFonts", - value: function getFonts() { - return this.fonts; - } - - /** - * Sets An array of custom fonts to be downloaded for use by the HTML assets. - * @param {Array.} fonts An array of custom fonts to be downloaded for use by the HTML assets. - */ - }, { - key: "setFonts", - value: function setFonts(fonts) { - this['fonts'] = fonts; - return this; - } - /** - * Returns A timeline consists of an array of tracks, each track containing clips. Tracks are layered on top of each other in the same order they are added to the array with the top most track layered over the top of those below it. Ensure that a track containing titles is the top most track so that it is displayed above videos and images. - * @return {Array.} - */ - }, { - key: "getTracks", - value: function getTracks() { - return this.tracks; - } - - /** - * Sets A timeline consists of an array of tracks, each track containing clips. Tracks are layered on top of each other in the same order they are added to the array with the top most track layered over the top of those below it. Ensure that a track containing titles is the top most track so that it is displayed above videos and images. - * @param {Array.} tracks A timeline consists of an array of tracks, each track containing clips. Tracks are layered on top of each other in the same order they are added to the array with the top most track layered over the top of those below it. Ensure that a track containing titles is the top most track so that it is displayed above videos and images. - */ - }, { - key: "setTracks", - value: function setTracks(tracks) { - this['tracks'] = tracks; - return this; - } - /** - * Returns Disable the caching of ingested source footage and assets. See [caching](https://shotstack.io/docs/guide/architecting-an-application/caching/) for more details. - * @return {Boolean} - */ - }, { - key: "getCache", - value: function getCache() { - return this.cache; - } - - /** - * Sets Disable the caching of ingested source footage and assets. See [caching](https://shotstack.io/docs/guide/architecting-an-application/caching/) for more details. - * @param {Boolean} cache Disable the caching of ingested source footage and assets. See [caching](https://shotstack.io/docs/guide/architecting-an-application/caching/) for more details. - */ - }, { - key: "setCache", - value: function setCache(cache) { - this['cache'] = cache; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, tracks) { - obj['tracks'] = tracks; - } - - /** - * Constructs a Timeline from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Timeline} obj Optional instance to populate. - * @return {module:model/Timeline} The populated Timeline instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Timeline(); - if (data.hasOwnProperty('soundtrack')) { - obj['soundtrack'] = _Soundtrack["default"].constructFromObject(data['soundtrack']); - } - if (data.hasOwnProperty('background')) { - obj['background'] = _ApiClient["default"].convertToType(data['background'], 'String'); - } - if (data.hasOwnProperty('fonts')) { - obj['fonts'] = _ApiClient["default"].convertToType(data['fonts'], [_Font["default"]]); - } - if (data.hasOwnProperty('tracks')) { - obj['tracks'] = _ApiClient["default"].convertToType(data['tracks'], [_Track["default"]]); - } - if (data.hasOwnProperty('cache')) { - obj['cache'] = _ApiClient["default"].convertToType(data['cache'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Timeline. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Timeline. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Timeline.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `soundtrack` - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['soundtrack']) { - // data not null - _Soundtrack["default"].validateJSON(data['soundtrack']); - } - // ensure the json data is a string - if (data['background'] && !(typeof data['background'] === 'string' || data['background'] instanceof String)) { - throw new Error("Expected the field `background` to be a primitive type in the JSON string but got " + data['background']); - } - if (data['fonts']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['fonts'])) { - throw new Error("Expected the field `fonts` to be an array in the JSON data but got " + data['fonts']); - } - // validate the optional field `fonts` (array) - var _iterator2 = _createForOfIteratorHelper(data['fonts']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _Font["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - if (data['tracks']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['tracks'])) { - throw new Error("Expected the field `tracks` to be an array in the JSON data but got " + data['tracks']); - } - // validate the optional field `tracks` (array) - var _iterator3 = _createForOfIteratorHelper(data['tracks']), - _step3; - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { - var _item = _step3.value; - _Track["default"].validateJSON(_item); - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); - } - ; - } - return true; - } - }]); -}(); -Timeline.RequiredProperties = ["tracks"]; - -/** - * @member {module:model/Soundtrack} soundtrack - */ -Timeline.prototype['soundtrack'] = undefined; - -/** - * A hexadecimal value for the timeline background colour. Defaults to #000000 (black). - * @member {String} background - */ -Timeline.prototype['background'] = undefined; - -/** - * An array of custom fonts to be downloaded for use by the HTML assets. - * @member {Array.} fonts - */ -Timeline.prototype['fonts'] = undefined; - -/** - * A timeline consists of an array of tracks, each track containing clips. Tracks are layered on top of each other in the same order they are added to the array with the top most track layered over the top of those below it. Ensure that a track containing titles is the top most track so that it is displayed above videos and images. - * @member {Array.} tracks - */ -Timeline.prototype['tracks'] = undefined; - -/** - * Disable the caching of ingested source footage and assets. See [caching](https://shotstack.io/docs/guide/architecting-an-application/caching/) for more details. - * @member {Boolean} cache - */ -Timeline.prototype['cache'] = undefined; -var _default = exports["default"] = Timeline; \ No newline at end of file diff --git a/src/model/TitleAsset.js b/src/model/TitleAsset.js deleted file mode 100644 index 3b4b8eb..0000000 --- a/src/model/TitleAsset.js +++ /dev/null @@ -1,522 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Offset = _interopRequireDefault(require("./Offset")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TitleAsset model module. - * @module model/TitleAsset - * @version 0.2.9 - */ -var TitleAsset = /*#__PURE__*/function () { - /** - * Constructs a new TitleAsset. - * **Notice: The TitleAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.** The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning. - * @alias module:model/TitleAsset - * @param type {String} The type of asset - set to `title` for titles. - * @param text {String} The title text string - i.e. \"My Title\". - */ - function TitleAsset(type, text) { - _classCallCheck(this, TitleAsset); - TitleAsset.initialize(this, type, text); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TitleAsset, [{ - key: "getType", - value: - /** - * Returns The type of asset - set to `title` for titles. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset - set to `title` for titles. - * @param {String} type The type of asset - set to `title` for titles. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The title text string - i.e. \"My Title\". - * @return {String} - */ - }, { - key: "getText", - value: function getText() { - return this.text; - } - - /** - * Sets The title text string - i.e. \"My Title\". - * @param {String} text The title text string - i.e. \"My Title\". - */ - }, { - key: "setText", - value: function setText(text) { - this['text'] = text; - return this; - } - /** - * Returns Uses a preset to apply font properties and styling to the title.
  • `minimal`
  • `blockbuster`
  • `vogue`
  • `sketchy`
  • `skinny`
  • `chunk`
  • `chunkLight`
  • `marker`
  • `future`
  • `subtitle`
- * @return {module:model/TitleAsset.StyleEnum} - */ - }, { - key: "getStyle", - value: function getStyle() { - return this.style; - } - - /** - * Sets Uses a preset to apply font properties and styling to the title.
  • `minimal`
  • `blockbuster`
  • `vogue`
  • `sketchy`
  • `skinny`
  • `chunk`
  • `chunkLight`
  • `marker`
  • `future`
  • `subtitle`
- * @param {module:model/TitleAsset.StyleEnum} style Uses a preset to apply font properties and styling to the title.
  • `minimal`
  • `blockbuster`
  • `vogue`
  • `sketchy`
  • `skinny`
  • `chunk`
  • `chunkLight`
  • `marker`
  • `future`
  • `subtitle`
- */ - }, { - key: "setStyle", - value: function setStyle(style) { - this['style'] = style; - return this; - } - /** - * Returns Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. - * @return {String} - */ - }, { - key: "getColor", - value: function getColor() { - return this.color; - } - - /** - * Sets Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. - * @param {String} color Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. - */ - }, { - key: "setColor", - value: function setColor(color) { - this['color'] = color; - return this; - } - /** - * Returns Set the relative size of the text using predefined sizes from xx-small to xx-large.
  • `xx-small`
  • `x-small`
  • `small`
  • `medium`
  • `large`
  • `x-large`
  • `xx-large`
- * @return {module:model/TitleAsset.SizeEnum} - */ - }, { - key: "getSize", - value: function getSize() { - return this.size; - } - - /** - * Sets Set the relative size of the text using predefined sizes from xx-small to xx-large.
  • `xx-small`
  • `x-small`
  • `small`
  • `medium`
  • `large`
  • `x-large`
  • `xx-large`
- * @param {module:model/TitleAsset.SizeEnum} size Set the relative size of the text using predefined sizes from xx-small to xx-large.
  • `xx-small`
  • `x-small`
  • `small`
  • `medium`
  • `large`
  • `x-large`
  • `xx-large`
- */ - }, { - key: "setSize", - value: function setSize(size) { - this['size'] = size; - return this; - } - /** - * Returns Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. Omit to use transparent background. - * @return {String} - */ - }, { - key: "getBackground", - value: function getBackground() { - return this.background; - } - - /** - * Sets Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. Omit to use transparent background. - * @param {String} background Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. Omit to use transparent background. - */ - }, { - key: "setBackground", - value: function setBackground(background) { - this['background'] = background; - return this; - } - /** - * Returns Place the title in one of nine predefined positions of the viewport.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @return {module:model/TitleAsset.PositionEnum} - */ - }, { - key: "getPosition", - value: function getPosition() { - return this.position; - } - - /** - * Sets Place the title in one of nine predefined positions of the viewport.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @param {module:model/TitleAsset.PositionEnum} position Place the title in one of nine predefined positions of the viewport.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- */ - }, { - key: "setPosition", - value: function setPosition(position) { - this['position'] = position; - return this; - } - /** - * @return {module:model/Offset} - */ - }, { - key: "getOffset", - value: function getOffset() { - return this.offset; - } - - /** - * @param {module:model/Offset} offset - */ - }, { - key: "setOffset", - value: function setOffset(offset) { - this['offset'] = offset; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, text) { - obj['type'] = type || 'title'; - obj['text'] = text; - } - - /** - * Constructs a TitleAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TitleAsset} obj Optional instance to populate. - * @return {module:model/TitleAsset} The populated TitleAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TitleAsset(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('text')) { - obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String'); - } - if (data.hasOwnProperty('style')) { - obj['style'] = _ApiClient["default"].convertToType(data['style'], 'String'); - } - if (data.hasOwnProperty('color')) { - obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String'); - } - if (data.hasOwnProperty('size')) { - obj['size'] = _ApiClient["default"].convertToType(data['size'], 'String'); - } - if (data.hasOwnProperty('background')) { - obj['background'] = _ApiClient["default"].convertToType(data['background'], 'String'); - } - if (data.hasOwnProperty('position')) { - obj['position'] = _ApiClient["default"].convertToType(data['position'], 'String'); - } - if (data.hasOwnProperty('offset')) { - obj['offset'] = _Offset["default"].constructFromObject(data['offset']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TitleAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TitleAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TitleAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['text'] && !(typeof data['text'] === 'string' || data['text'] instanceof String)) { - throw new Error("Expected the field `text` to be a primitive type in the JSON string but got " + data['text']); - } - // ensure the json data is a string - if (data['style'] && !(typeof data['style'] === 'string' || data['style'] instanceof String)) { - throw new Error("Expected the field `style` to be a primitive type in the JSON string but got " + data['style']); - } - // ensure the json data is a string - if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) { - throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']); - } - // ensure the json data is a string - if (data['size'] && !(typeof data['size'] === 'string' || data['size'] instanceof String)) { - throw new Error("Expected the field `size` to be a primitive type in the JSON string but got " + data['size']); - } - // ensure the json data is a string - if (data['background'] && !(typeof data['background'] === 'string' || data['background'] instanceof String)) { - throw new Error("Expected the field `background` to be a primitive type in the JSON string but got " + data['background']); - } - // ensure the json data is a string - if (data['position'] && !(typeof data['position'] === 'string' || data['position'] instanceof String)) { - throw new Error("Expected the field `position` to be a primitive type in the JSON string but got " + data['position']); - } - // validate the optional field `offset` - if (data['offset']) { - // data not null - _Offset["default"].validateJSON(data['offset']); - } - return true; - } - }]); -}(); -TitleAsset.RequiredProperties = ["type", "text"]; - -/** - * The type of asset - set to `title` for titles. - * @member {String} type - * @default 'title' - */ -TitleAsset.prototype['type'] = 'title'; - -/** - * The title text string - i.e. \"My Title\". - * @member {String} text - */ -TitleAsset.prototype['text'] = undefined; - -/** - * Uses a preset to apply font properties and styling to the title.
  • `minimal`
  • `blockbuster`
  • `vogue`
  • `sketchy`
  • `skinny`
  • `chunk`
  • `chunkLight`
  • `marker`
  • `future`
  • `subtitle`
- * @member {module:model/TitleAsset.StyleEnum} style - */ -TitleAsset.prototype['style'] = undefined; - -/** - * Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. - * @member {String} color - */ -TitleAsset.prototype['color'] = undefined; - -/** - * Set the relative size of the text using predefined sizes from xx-small to xx-large.
  • `xx-small`
  • `x-small`
  • `small`
  • `medium`
  • `large`
  • `x-large`
  • `xx-large`
- * @member {module:model/TitleAsset.SizeEnum} size - */ -TitleAsset.prototype['size'] = undefined; - -/** - * Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. Omit to use transparent background. - * @member {String} background - */ -TitleAsset.prototype['background'] = undefined; - -/** - * Place the title in one of nine predefined positions of the viewport.
  • `top` - top (center)
  • `topRight` - top right
  • `right` - right (center)
  • `bottomRight` - bottom right
  • `bottom` - bottom (center)
  • `bottomLeft` - bottom left
  • `left` - left (center)
  • `topLeft` - top left
  • `center` - center
- * @member {module:model/TitleAsset.PositionEnum} position - */ -TitleAsset.prototype['position'] = undefined; - -/** - * @member {module:model/Offset} offset - */ -TitleAsset.prototype['offset'] = undefined; - -/** - * Allowed values for the style property. - * @enum {String} - * @readonly - */ -TitleAsset['StyleEnum'] = { - /** - * value: "minimal" - * @const - */ - "minimal": "minimal", - /** - * value: "blockbuster" - * @const - */ - "blockbuster": "blockbuster", - /** - * value: "vogue" - * @const - */ - "vogue": "vogue", - /** - * value: "sketchy" - * @const - */ - "sketchy": "sketchy", - /** - * value: "skinny" - * @const - */ - "skinny": "skinny", - /** - * value: "chunk" - * @const - */ - "chunk": "chunk", - /** - * value: "chunkLight" - * @const - */ - "chunkLight": "chunkLight", - /** - * value: "marker" - * @const - */ - "marker": "marker", - /** - * value: "future" - * @const - */ - "future": "future", - /** - * value: "subtitle" - * @const - */ - "subtitle": "subtitle" -}; - -/** - * Allowed values for the size property. - * @enum {String} - * @readonly - */ -TitleAsset['SizeEnum'] = { - /** - * value: "xx-small" - * @const - */ - "xx-small": "xx-small", - /** - * value: "x-small" - * @const - */ - "x-small": "x-small", - /** - * value: "small" - * @const - */ - "small": "small", - /** - * value: "medium" - * @const - */ - "medium": "medium", - /** - * value: "large" - * @const - */ - "large": "large", - /** - * value: "x-large" - * @const - */ - "x-large": "x-large", - /** - * value: "xx-large" - * @const - */ - "xx-large": "xx-large" -}; - -/** - * Allowed values for the position property. - * @enum {String} - * @readonly - */ -TitleAsset['PositionEnum'] = { - /** - * value: "top" - * @const - */ - "top": "top", - /** - * value: "topRight" - * @const - */ - "topRight": "topRight", - /** - * value: "right" - * @const - */ - "right": "right", - /** - * value: "bottomRight" - * @const - */ - "bottomRight": "bottomRight", - /** - * value: "bottom" - * @const - */ - "bottom": "bottom", - /** - * value: "bottomLeft" - * @const - */ - "bottomLeft": "bottomLeft", - /** - * value: "left" - * @const - */ - "left": "left", - /** - * value: "topLeft" - * @const - */ - "topLeft": "topLeft", - /** - * value: "center" - * @const - */ - "center": "center" -}; -var _default = exports["default"] = TitleAsset; \ No newline at end of file diff --git a/src/model/Track.js b/src/model/Track.js deleted file mode 100644 index 37f5744..0000000 --- a/src/model/Track.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Clip = _interopRequireDefault(require("./Clip")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Track model module. - * @module model/Track - * @version 0.2.9 - */ -var Track = /*#__PURE__*/function () { - /** - * Constructs a new Track. - * A track contains an array of clips. Tracks are layered on top of each other in the order in the array. The top most track will render on top of those below it. - * @alias module:model/Track - * @param clips {Array.} An array of Clips comprising of TitleClip, ImageClip or VideoClip. - */ - function Track(clips) { - _classCallCheck(this, Track); - Track.initialize(this, clips); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Track, [{ - key: "getClips", - value: - /** - * Returns An array of Clips comprising of TitleClip, ImageClip or VideoClip. - * @return {Array.} - */ - function getClips() { - return this.clips; - } - - /** - * Sets An array of Clips comprising of TitleClip, ImageClip or VideoClip. - * @param {Array.} clips An array of Clips comprising of TitleClip, ImageClip or VideoClip. - */ - }, { - key: "setClips", - value: function setClips(clips) { - this['clips'] = clips; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, clips) { - obj['clips'] = clips; - } - - /** - * Constructs a Track from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Track} obj Optional instance to populate. - * @return {module:model/Track} The populated Track instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Track(); - if (data.hasOwnProperty('clips')) { - obj['clips'] = _ApiClient["default"].convertToType(data['clips'], [_Clip["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Track. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Track. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Track.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['clips']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['clips'])) { - throw new Error("Expected the field `clips` to be an array in the JSON data but got " + data['clips']); - } - // validate the optional field `clips` (array) - var _iterator2 = _createForOfIteratorHelper(data['clips']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _Clip["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - return true; - } - }]); -}(); -Track.RequiredProperties = ["clips"]; - -/** - * An array of Clips comprising of TitleClip, ImageClip or VideoClip. - * @member {Array.} clips - */ -Track.prototype['clips'] = undefined; -var _default = exports["default"] = Track; \ No newline at end of file diff --git a/src/model/Transcription.js b/src/model/Transcription.js deleted file mode 100644 index 49fdcce..0000000 --- a/src/model/Transcription.js +++ /dev/null @@ -1,130 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Transcription model module. - * @module model/Transcription - * @version 0.2.9 - */ -var Transcription = /*#__PURE__*/function () { - /** - * Constructs a new Transcription. - * Generate a transcription of the audio in the video. The transcription can be output as a file in SRT or VTT format. - * @alias module:model/Transcription - */ - function Transcription() { - _classCallCheck(this, Transcription); - Transcription.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Transcription, [{ - key: "getFormat", - value: - /** - * Returns The output format of the transcription file. The following formats are available:
  • `srt` - SRT captions format
  • `vtt` - VTT captions format
- * @return {module:model/Transcription.FormatEnum} - */ - function getFormat() { - return this.format; - } - - /** - * Sets The output format of the transcription file. The following formats are available:
  • `srt` - SRT captions format
  • `vtt` - VTT captions format
- * @param {module:model/Transcription.FormatEnum} format The output format of the transcription file. The following formats are available:
  • `srt` - SRT captions format
  • `vtt` - VTT captions format
- */ - }, { - key: "setFormat", - value: function setFormat(format) { - this['format'] = format; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Transcription from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Transcription} obj Optional instance to populate. - * @return {module:model/Transcription} The populated Transcription instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Transcription(); - if (data.hasOwnProperty('format')) { - obj['format'] = _ApiClient["default"].convertToType(data['format'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Transcription. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Transcription. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['format'] && !(typeof data['format'] === 'string' || data['format'] instanceof String)) { - throw new Error("Expected the field `format` to be a primitive type in the JSON string but got " + data['format']); - } - return true; - } - }]); -}(); -/** - * The output format of the transcription file. The following formats are available:
  • `srt` - SRT captions format
  • `vtt` - VTT captions format
- * @member {module:model/Transcription.FormatEnum} format - */ -Transcription.prototype['format'] = undefined; - -/** - * Allowed values for the format property. - * @enum {String} - * @readonly - */ -Transcription['FormatEnum'] = { - /** - * value: "srt" - * @const - */ - "srt": "srt", - /** - * value: "vtt" - * @const - */ - "vtt": "vtt" -}; -var _default = exports["default"] = Transcription; \ No newline at end of file diff --git a/src/model/Transfer.js b/src/model/Transfer.js deleted file mode 100644 index 897db3b..0000000 --- a/src/model/Transfer.js +++ /dev/null @@ -1,223 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Destinations = _interopRequireDefault(require("./Destinations")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Transfer model module. - * @module model/Transfer - * @version 0.2.9 - */ -var Transfer = /*#__PURE__*/function () { - /** - * Constructs a new Transfer. - * The asset URL to fetch and transfer to a destination. - * @alias module:model/Transfer - * @param url {String} The file URL to fetch and transfer. - * @param id {String} An identifier for the asset which must be provided by the client. The identifier does not need to be unique. - * @param destinations {Array.} Specify the storage locations and hosting services to send the file to. - */ - function Transfer(url, id, destinations) { - _classCallCheck(this, Transfer); - Transfer.initialize(this, url, id, destinations); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Transfer, [{ - key: "getUrl", - value: - /** - * Returns The file URL to fetch and transfer. - * @return {String} - */ - function getUrl() { - return this.url; - } - - /** - * Sets The file URL to fetch and transfer. - * @param {String} url The file URL to fetch and transfer. - */ - }, { - key: "setUrl", - value: function setUrl(url) { - this['url'] = url; - return this; - } - /** - * Returns An identifier for the asset which must be provided by the client. The identifier does not need to be unique. - * @return {String} - */ - }, { - key: "getId", - value: function getId() { - return this.id; - } - - /** - * Sets An identifier for the asset which must be provided by the client. The identifier does not need to be unique. - * @param {String} id An identifier for the asset which must be provided by the client. The identifier does not need to be unique. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns Specify the storage locations and hosting services to send the file to. - * @return {Array.} - */ - }, { - key: "getDestinations", - value: function getDestinations() { - return this.destinations; - } - - /** - * Sets Specify the storage locations and hosting services to send the file to. - * @param {Array.} destinations Specify the storage locations and hosting services to send the file to. - */ - }, { - key: "setDestinations", - value: function setDestinations(destinations) { - this['destinations'] = destinations; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, url, id, destinations) { - obj['url'] = url; - obj['id'] = id; - obj['destinations'] = destinations; - } - - /** - * Constructs a Transfer from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Transfer} obj Optional instance to populate. - * @return {module:model/Transfer} The populated Transfer instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Transfer(); - if (data.hasOwnProperty('url')) { - obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String'); - } - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('destinations')) { - obj['destinations'] = _ApiClient["default"].convertToType(data['destinations'], [_Destinations["default"]]); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Transfer. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Transfer. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(Transfer.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { - throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); - } - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - if (data['destinations']) { - // data not null - // ensure the json data is an array - if (!Array.isArray(data['destinations'])) { - throw new Error("Expected the field `destinations` to be an array in the JSON data but got " + data['destinations']); - } - // validate the optional field `destinations` (array) - var _iterator2 = _createForOfIteratorHelper(data['destinations']), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var item = _step2.value; - _Destinations["default"].validateJSON(item); - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - ; - } - return true; - } - }]); -}(); -Transfer.RequiredProperties = ["url", "id", "destinations"]; - -/** - * The file URL to fetch and transfer. - * @member {String} url - */ -Transfer.prototype['url'] = undefined; - -/** - * An identifier for the asset which must be provided by the client. The identifier does not need to be unique. - * @member {String} id - */ -Transfer.prototype['id'] = undefined; - -/** - * Specify the storage locations and hosting services to send the file to. - * @member {Array.} destinations - */ -Transfer.prototype['destinations'] = undefined; -var _default = exports["default"] = Transfer; \ No newline at end of file diff --git a/src/model/TransferResponse.js b/src/model/TransferResponse.js deleted file mode 100644 index 588d173..0000000 --- a/src/model/TransferResponse.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _TransferResponseData = _interopRequireDefault(require("./TransferResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TransferResponse model module. - * @module model/TransferResponse - * @version 0.2.9 - */ -var TransferResponse = /*#__PURE__*/function () { - /** - * Constructs a new TransferResponse. - * The response returned by the Serve API [transfer asset](#transfer-asset) request. The response includes the ID and transfer status. The response follows the [json:api](https://jsonapi.org/) specification. - * @alias module:model/TransferResponse - * @param data {module:model/TransferResponseData} - */ - function TransferResponse(data) { - _classCallCheck(this, TransferResponse); - TransferResponse.initialize(this, data); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TransferResponse, [{ - key: "getData", - value: - /** - * @return {module:model/TransferResponseData} - */ - function getData() { - return this.data; - } - - /** - * @param {module:model/TransferResponseData} data - */ - }, { - key: "setData", - value: function setData(data) { - this['data'] = data; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, data) { - obj['data'] = data; - } - - /** - * Constructs a TransferResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TransferResponse} obj Optional instance to populate. - * @return {module:model/TransferResponse} The populated TransferResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TransferResponse(); - if (data.hasOwnProperty('data')) { - obj['data'] = _TransferResponseData["default"].constructFromObject(data['data']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TransferResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TransferResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(TransferResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `data` - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['data']) { - // data not null - _TransferResponseData["default"].validateJSON(data['data']); - } - return true; - } - }]); -}(); -TransferResponse.RequiredProperties = ["data"]; - -/** - * @member {module:model/TransferResponseData} data - */ -TransferResponse.prototype['data'] = undefined; -var _default = exports["default"] = TransferResponse; \ No newline at end of file diff --git a/src/model/TransferResponseAttributes.js b/src/model/TransferResponseAttributes.js deleted file mode 100644 index aa5bde2..0000000 --- a/src/model/TransferResponseAttributes.js +++ /dev/null @@ -1,229 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TransferResponseAttributes model module. - * @module model/TransferResponseAttributes - * @version 0.2.9 - */ -var TransferResponseAttributes = /*#__PURE__*/function () { - /** - * Constructs a new TransferResponseAttributes. - * The transfer request attributes inlcudling the user specified ID and status. Returned with [TransferResponseData](#tocs_transferresponsedata). - * @alias module:model/TransferResponseAttributes - */ - function TransferResponseAttributes() { - _classCallCheck(this, TransferResponseAttributes); - TransferResponseAttributes.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TransferResponseAttributes, [{ - key: "getId", - value: - /** - * Returns The user provided ID for the asset - * @return {String} - */ - function getId() { - return this.id; - } - - /** - * Sets The user provided ID for the asset - * @param {String} id The user provided ID for the asset - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns The attributes of the asset transfer including the status. - * @return {String} - */ - }, { - key: "getOwner", - value: function getOwner() { - return this.owner; - } - - /** - * Sets The attributes of the asset transfer including the status. - * @param {String} owner The attributes of the asset transfer including the status. - */ - }, { - key: "setOwner", - value: function setOwner(owner) { - this['owner'] = owner; - return this; - } - /** - * Returns The status of the asset transfer.
  • `queued` - the transfer request has been queued
  • `failed` - the transfer request failed
- * @return {module:model/TransferResponseAttributes.StatusEnum} - */ - }, { - key: "getStatus", - value: function getStatus() { - return this.status; - } - - /** - * Sets The status of the asset transfer.
  • `queued` - the transfer request has been queued
  • `failed` - the transfer request failed
- * @param {module:model/TransferResponseAttributes.StatusEnum} status The status of the asset transfer.
  • `queued` - the transfer request has been queued
  • `failed` - the transfer request failed
- */ - }, { - key: "setStatus", - value: function setStatus(status) { - this['status'] = status; - return this; - } - /** - * Returns The time the asset transfer was created. - * @return {String} - */ - }, { - key: "getCreated", - value: function getCreated() { - return this.created; - } - - /** - * Sets The time the asset transfer was created. - * @param {String} created The time the asset transfer was created. - */ - }, { - key: "setCreated", - value: function setCreated(created) { - this['created'] = created; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a TransferResponseAttributes from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TransferResponseAttributes} obj Optional instance to populate. - * @return {module:model/TransferResponseAttributes} The populated TransferResponseAttributes instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TransferResponseAttributes(); - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('owner')) { - obj['owner'] = _ApiClient["default"].convertToType(data['owner'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); - } - if (data.hasOwnProperty('created')) { - obj['created'] = _ApiClient["default"].convertToType(data['created'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TransferResponseAttributes. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TransferResponseAttributes. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['owner'] && !(typeof data['owner'] === 'string' || data['owner'] instanceof String)) { - throw new Error("Expected the field `owner` to be a primitive type in the JSON string but got " + data['owner']); - } - // ensure the json data is a string - if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { - throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); - } - // ensure the json data is a string - if (data['created'] && !(typeof data['created'] === 'string' || data['created'] instanceof String)) { - throw new Error("Expected the field `created` to be a primitive type in the JSON string but got " + data['created']); - } - return true; - } - }]); -}(); -/** - * The user provided ID for the asset - * @member {String} id - */ -TransferResponseAttributes.prototype['id'] = undefined; - -/** - * The attributes of the asset transfer including the status. - * @member {String} owner - */ -TransferResponseAttributes.prototype['owner'] = undefined; - -/** - * The status of the asset transfer.
  • `queued` - the transfer request has been queued
  • `failed` - the transfer request failed
- * @member {module:model/TransferResponseAttributes.StatusEnum} status - */ -TransferResponseAttributes.prototype['status'] = undefined; - -/** - * The time the asset transfer was created. - * @member {String} created - */ -TransferResponseAttributes.prototype['created'] = undefined; - -/** - * Allowed values for the status property. - * @enum {String} - * @readonly - */ -TransferResponseAttributes['StatusEnum'] = { - /** - * value: "queued" - * @const - */ - "queued": "queued", - /** - * value: "failed" - * @const - */ - "failed": "failed" -}; -var _default = exports["default"] = TransferResponseAttributes; \ No newline at end of file diff --git a/src/model/TransferResponseData.js b/src/model/TransferResponseData.js deleted file mode 100644 index f4b57f1..0000000 --- a/src/model/TransferResponseData.js +++ /dev/null @@ -1,144 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _TransferResponseAttributes = _interopRequireDefault(require("./TransferResponseAttributes")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The TransferResponseData model module. - * @module model/TransferResponseData - * @version 0.2.9 - */ -var TransferResponseData = /*#__PURE__*/function () { - /** - * Constructs a new TransferResponseData. - * The type of resource (an asset) and the transfer attributes. Returned with [TransferResponse](#tocs_transferresponse). - * @alias module:model/TransferResponseData - */ - function TransferResponseData() { - _classCallCheck(this, TransferResponseData); - TransferResponseData.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(TransferResponseData, [{ - key: "getType", - value: - /** - * Returns The type of resource, in this case it is an asset. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of resource, in this case it is an asset. - * @param {String} type The type of resource, in this case it is an asset. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * @return {module:model/TransferResponseAttributes} - */ - }, { - key: "getAttributes", - value: function getAttributes() { - return this.attributes; - } - - /** - * @param {module:model/TransferResponseAttributes} attributes - */ - }, { - key: "setAttributes", - value: function setAttributes(attributes) { - this['attributes'] = attributes; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a TransferResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TransferResponseData} obj Optional instance to populate. - * @return {module:model/TransferResponseData} The populated TransferResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new TransferResponseData(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('attributes')) { - obj['attributes'] = _TransferResponseAttributes["default"].constructFromObject(data['attributes']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to TransferResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to TransferResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // validate the optional field `attributes` - if (data['attributes']) { - // data not null - _TransferResponseAttributes["default"].validateJSON(data['attributes']); - } - return true; - } - }]); -}(); -/** - * The type of resource, in this case it is an asset. - * @member {String} type - */ -TransferResponseData.prototype['type'] = undefined; - -/** - * @member {module:model/TransferResponseAttributes} attributes - */ -TransferResponseData.prototype['attributes'] = undefined; -var _default = exports["default"] = TransferResponseData; \ No newline at end of file diff --git a/src/model/Transformation.js b/src/model/Transformation.js deleted file mode 100644 index 2f62a0a..0000000 --- a/src/model/Transformation.js +++ /dev/null @@ -1,175 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _FlipTransformation = _interopRequireDefault(require("./FlipTransformation")); -var _RotateTransformation = _interopRequireDefault(require("./RotateTransformation")); -var _SkewTransformation = _interopRequireDefault(require("./SkewTransformation")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Transformation model module. - * @module model/Transformation - * @version 0.2.9 - */ -var Transformation = /*#__PURE__*/function () { - /** - * Constructs a new Transformation. - * Apply one or more transformations to a clip. Transformations alter the visual properties of a clip and can be combined to create new shapes and effects. - * @alias module:model/Transformation - */ - function Transformation() { - _classCallCheck(this, Transformation); - Transformation.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Transformation, [{ - key: "getRotate", - value: - /** - * @return {module:model/RotateTransformation} - */ - function getRotate() { - return this.rotate; - } - - /** - * @param {module:model/RotateTransformation} rotate - */ - }, { - key: "setRotate", - value: function setRotate(rotate) { - this['rotate'] = rotate; - return this; - } - /** - * @return {module:model/SkewTransformation} - */ - }, { - key: "getSkew", - value: function getSkew() { - return this.skew; - } - - /** - * @param {module:model/SkewTransformation} skew - */ - }, { - key: "setSkew", - value: function setSkew(skew) { - this['skew'] = skew; - return this; - } - /** - * @return {module:model/FlipTransformation} - */ - }, { - key: "getFlip", - value: function getFlip() { - return this.flip; - } - - /** - * @param {module:model/FlipTransformation} flip - */ - }, { - key: "setFlip", - value: function setFlip(flip) { - this['flip'] = flip; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Transformation from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Transformation} obj Optional instance to populate. - * @return {module:model/Transformation} The populated Transformation instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Transformation(); - if (data.hasOwnProperty('rotate')) { - obj['rotate'] = _RotateTransformation["default"].constructFromObject(data['rotate']); - } - if (data.hasOwnProperty('skew')) { - obj['skew'] = _SkewTransformation["default"].constructFromObject(data['skew']); - } - if (data.hasOwnProperty('flip')) { - obj['flip'] = _FlipTransformation["default"].constructFromObject(data['flip']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Transformation. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Transformation. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // validate the optional field `rotate` - if (data['rotate']) { - // data not null - _RotateTransformation["default"].validateJSON(data['rotate']); - } - // validate the optional field `skew` - if (data['skew']) { - // data not null - _SkewTransformation["default"].validateJSON(data['skew']); - } - // validate the optional field `flip` - if (data['flip']) { - // data not null - _FlipTransformation["default"].validateJSON(data['flip']); - } - return true; - } - }]); -}(); -/** - * @member {module:model/RotateTransformation} rotate - */ -Transformation.prototype['rotate'] = undefined; - -/** - * @member {module:model/SkewTransformation} skew - */ -Transformation.prototype['skew'] = undefined; - -/** - * @member {module:model/FlipTransformation} flip - */ -Transformation.prototype['flip'] = undefined; -var _default = exports["default"] = Transformation; \ No newline at end of file diff --git a/src/model/Transition.js b/src/model/Transition.js deleted file mode 100644 index 50ebb79..0000000 --- a/src/model/Transition.js +++ /dev/null @@ -1,771 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Transition model module. - * @module model/Transition - * @version 0.2.9 - */ -var Transition = /*#__PURE__*/function () { - /** - * Constructs a new Transition. - * In and out transitions for a clip - i.e. fade in and fade out - * @alias module:model/Transition - */ - function Transition() { - _classCallCheck(this, Transition); - Transition.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Transition, [{ - key: "getIn", - value: - /** - * Returns The transition in. Available transitions are:
  • `fade` - fade in
  • `reveal` - reveal from left to right
  • `wipeLeft` - fade across screen to the left
  • `wipeRight` - fade across screen to the right
  • `slideLeft` - move slightly left and fade in
  • `slideRight` - move slightly right and fade in
  • `slideUp` - move slightly up and fade in
  • `slideDown` - move slightly down and fade in
  • `carouselLeft` - slide in from right to left
  • `carouselRight` - slide in from left to right
  • `carouselUp` - slide in from bottom to top
  • `carouselDown` - slide in from top to bottom
  • `shuffleTopRight` - rotate in from top right
  • `shuffleRightTop` - rotate in from right top
  • `shuffleRightBottom` - rotate in from right bottom
  • `shuffleBottomRight` - rotate in from bottom right
  • `shuffleBottomLeft` - rotate in from bottom left
  • `shuffleLeftBottom` - rotate in from left bottom
  • `shuffleLeftTop` - rotate in from left top
  • `shuffleTopLeft` - rotate in from top left
  • `zoom` - fast zoom in
The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`. - * @return {module:model/Transition.InEnum} - */ - function getIn() { - return this["in"]; - } - - /** - * Sets The transition in. Available transitions are:
  • `fade` - fade in
  • `reveal` - reveal from left to right
  • `wipeLeft` - fade across screen to the left
  • `wipeRight` - fade across screen to the right
  • `slideLeft` - move slightly left and fade in
  • `slideRight` - move slightly right and fade in
  • `slideUp` - move slightly up and fade in
  • `slideDown` - move slightly down and fade in
  • `carouselLeft` - slide in from right to left
  • `carouselRight` - slide in from left to right
  • `carouselUp` - slide in from bottom to top
  • `carouselDown` - slide in from top to bottom
  • `shuffleTopRight` - rotate in from top right
  • `shuffleRightTop` - rotate in from right top
  • `shuffleRightBottom` - rotate in from right bottom
  • `shuffleBottomRight` - rotate in from bottom right
  • `shuffleBottomLeft` - rotate in from bottom left
  • `shuffleLeftBottom` - rotate in from left bottom
  • `shuffleLeftTop` - rotate in from left top
  • `shuffleTopLeft` - rotate in from top left
  • `zoom` - fast zoom in
The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`. - * @param {module:model/Transition.InEnum} _in The transition in. Available transitions are:
  • `fade` - fade in
  • `reveal` - reveal from left to right
  • `wipeLeft` - fade across screen to the left
  • `wipeRight` - fade across screen to the right
  • `slideLeft` - move slightly left and fade in
  • `slideRight` - move slightly right and fade in
  • `slideUp` - move slightly up and fade in
  • `slideDown` - move slightly down and fade in
  • `carouselLeft` - slide in from right to left
  • `carouselRight` - slide in from left to right
  • `carouselUp` - slide in from bottom to top
  • `carouselDown` - slide in from top to bottom
  • `shuffleTopRight` - rotate in from top right
  • `shuffleRightTop` - rotate in from right top
  • `shuffleRightBottom` - rotate in from right bottom
  • `shuffleBottomRight` - rotate in from bottom right
  • `shuffleBottomLeft` - rotate in from bottom left
  • `shuffleLeftBottom` - rotate in from left bottom
  • `shuffleLeftTop` - rotate in from left top
  • `shuffleTopLeft` - rotate in from top left
  • `zoom` - fast zoom in
The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`. - */ - }, { - key: "setIn", - value: function setIn(_in) { - this['in'] = _in; - return this; - } - /** - * Returns The transition out. Available transitions are:
  • `fade` - fade out
  • `reveal` - reveal from right to left
  • `wipeLeft` - fade across screen to the left
  • `wipeRight` - fade across screen to the right
  • `slideLeft` - move slightly left and fade out
  • `slideRight` - move slightly right and fade out
  • `slideUp` - move slightly up and fade out
  • `slideDown` - move slightly down and fade out
  • `carouselLeft` - slide out from right to left
  • `carouselRight` - slide out from left to right
  • `carouselUp` - slide out from bottom to top
  • `carouselDown` - slide out from top to bottom
  • `shuffleTopRight` - rotate out from top right
  • `shuffleRightTop` - rotate out from right top
  • `shuffleRightBottom` - rotate out from right bottom
  • `shuffleBottomRight` - rotate out from bottom right
  • `shuffleBottomLeft` - rotate out from bottom left
  • `shuffleLeftBottom` - rotate out from left bottom
  • `shuffleLeftTop` - rotate out from left top
  • `shuffleTopLeft` - rotate out from top left
  • `zoom` - fast zoom out
The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`. - * @return {module:model/Transition.OutEnum} - */ - }, { - key: "getOut", - value: function getOut() { - return this.out; - } - - /** - * Sets The transition out. Available transitions are:
  • `fade` - fade out
  • `reveal` - reveal from right to left
  • `wipeLeft` - fade across screen to the left
  • `wipeRight` - fade across screen to the right
  • `slideLeft` - move slightly left and fade out
  • `slideRight` - move slightly right and fade out
  • `slideUp` - move slightly up and fade out
  • `slideDown` - move slightly down and fade out
  • `carouselLeft` - slide out from right to left
  • `carouselRight` - slide out from left to right
  • `carouselUp` - slide out from bottom to top
  • `carouselDown` - slide out from top to bottom
  • `shuffleTopRight` - rotate out from top right
  • `shuffleRightTop` - rotate out from right top
  • `shuffleRightBottom` - rotate out from right bottom
  • `shuffleBottomRight` - rotate out from bottom right
  • `shuffleBottomLeft` - rotate out from bottom left
  • `shuffleLeftBottom` - rotate out from left bottom
  • `shuffleLeftTop` - rotate out from left top
  • `shuffleTopLeft` - rotate out from top left
  • `zoom` - fast zoom out
The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`. - * @param {module:model/Transition.OutEnum} out The transition out. Available transitions are:
  • `fade` - fade out
  • `reveal` - reveal from right to left
  • `wipeLeft` - fade across screen to the left
  • `wipeRight` - fade across screen to the right
  • `slideLeft` - move slightly left and fade out
  • `slideRight` - move slightly right and fade out
  • `slideUp` - move slightly up and fade out
  • `slideDown` - move slightly down and fade out
  • `carouselLeft` - slide out from right to left
  • `carouselRight` - slide out from left to right
  • `carouselUp` - slide out from bottom to top
  • `carouselDown` - slide out from top to bottom
  • `shuffleTopRight` - rotate out from top right
  • `shuffleRightTop` - rotate out from right top
  • `shuffleRightBottom` - rotate out from right bottom
  • `shuffleBottomRight` - rotate out from bottom right
  • `shuffleBottomLeft` - rotate out from bottom left
  • `shuffleLeftBottom` - rotate out from left bottom
  • `shuffleLeftTop` - rotate out from left top
  • `shuffleTopLeft` - rotate out from top left
  • `zoom` - fast zoom out
The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`. - */ - }, { - key: "setOut", - value: function setOut(out) { - this['out'] = out; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Transition from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Transition} obj Optional instance to populate. - * @return {module:model/Transition} The populated Transition instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Transition(); - if (data.hasOwnProperty('in')) { - obj['in'] = _ApiClient["default"].convertToType(data['in'], 'String'); - } - if (data.hasOwnProperty('out')) { - obj['out'] = _ApiClient["default"].convertToType(data['out'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Transition. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Transition. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['in'] && !(typeof data['in'] === 'string' || data['in'] instanceof String)) { - throw new Error("Expected the field `in` to be a primitive type in the JSON string but got " + data['in']); - } - // ensure the json data is a string - if (data['out'] && !(typeof data['out'] === 'string' || data['out'] instanceof String)) { - throw new Error("Expected the field `out` to be a primitive type in the JSON string but got " + data['out']); - } - return true; - } - }]); -}(); -/** - * The transition in. Available transitions are:
  • `fade` - fade in
  • `reveal` - reveal from left to right
  • `wipeLeft` - fade across screen to the left
  • `wipeRight` - fade across screen to the right
  • `slideLeft` - move slightly left and fade in
  • `slideRight` - move slightly right and fade in
  • `slideUp` - move slightly up and fade in
  • `slideDown` - move slightly down and fade in
  • `carouselLeft` - slide in from right to left
  • `carouselRight` - slide in from left to right
  • `carouselUp` - slide in from bottom to top
  • `carouselDown` - slide in from top to bottom
  • `shuffleTopRight` - rotate in from top right
  • `shuffleRightTop` - rotate in from right top
  • `shuffleRightBottom` - rotate in from right bottom
  • `shuffleBottomRight` - rotate in from bottom right
  • `shuffleBottomLeft` - rotate in from bottom left
  • `shuffleLeftBottom` - rotate in from left bottom
  • `shuffleLeftTop` - rotate in from left top
  • `shuffleTopLeft` - rotate in from top left
  • `zoom` - fast zoom in
The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`. - * @member {module:model/Transition.InEnum} in - */ -Transition.prototype['in'] = undefined; - -/** - * The transition out. Available transitions are:
  • `fade` - fade out
  • `reveal` - reveal from right to left
  • `wipeLeft` - fade across screen to the left
  • `wipeRight` - fade across screen to the right
  • `slideLeft` - move slightly left and fade out
  • `slideRight` - move slightly right and fade out
  • `slideUp` - move slightly up and fade out
  • `slideDown` - move slightly down and fade out
  • `carouselLeft` - slide out from right to left
  • `carouselRight` - slide out from left to right
  • `carouselUp` - slide out from bottom to top
  • `carouselDown` - slide out from top to bottom
  • `shuffleTopRight` - rotate out from top right
  • `shuffleRightTop` - rotate out from right top
  • `shuffleRightBottom` - rotate out from right bottom
  • `shuffleBottomRight` - rotate out from bottom right
  • `shuffleBottomLeft` - rotate out from bottom left
  • `shuffleLeftBottom` - rotate out from left bottom
  • `shuffleLeftTop` - rotate out from left top
  • `shuffleTopLeft` - rotate out from top left
  • `zoom` - fast zoom out
The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`. - * @member {module:model/Transition.OutEnum} out - */ -Transition.prototype['out'] = undefined; - -/** - * Allowed values for the in property. - * @enum {String} - * @readonly - */ -Transition['InEnum'] = { - /** - * value: "fade" - * @const - */ - "fade": "fade", - /** - * value: "fadeSlow" - * @const - */ - "fadeSlow": "fadeSlow", - /** - * value: "fadeFast" - * @const - */ - "fadeFast": "fadeFast", - /** - * value: "reveal" - * @const - */ - "reveal": "reveal", - /** - * value: "revealSlow" - * @const - */ - "revealSlow": "revealSlow", - /** - * value: "revealFast" - * @const - */ - "revealFast": "revealFast", - /** - * value: "wipeLeft" - * @const - */ - "wipeLeft": "wipeLeft", - /** - * value: "wipeLeftSlow" - * @const - */ - "wipeLeftSlow": "wipeLeftSlow", - /** - * value: "wipeLeftFast" - * @const - */ - "wipeLeftFast": "wipeLeftFast", - /** - * value: "wipeRight" - * @const - */ - "wipeRight": "wipeRight", - /** - * value: "wipeRightSlow" - * @const - */ - "wipeRightSlow": "wipeRightSlow", - /** - * value: "wipeRightFast" - * @const - */ - "wipeRightFast": "wipeRightFast", - /** - * value: "slideLeft" - * @const - */ - "slideLeft": "slideLeft", - /** - * value: "slideLeftSlow" - * @const - */ - "slideLeftSlow": "slideLeftSlow", - /** - * value: "slideLeftFast" - * @const - */ - "slideLeftFast": "slideLeftFast", - /** - * value: "slideRight" - * @const - */ - "slideRight": "slideRight", - /** - * value: "slideRightSlow" - * @const - */ - "slideRightSlow": "slideRightSlow", - /** - * value: "slideRightFast" - * @const - */ - "slideRightFast": "slideRightFast", - /** - * value: "slideUp" - * @const - */ - "slideUp": "slideUp", - /** - * value: "slideUpSlow" - * @const - */ - "slideUpSlow": "slideUpSlow", - /** - * value: "slideUpFast" - * @const - */ - "slideUpFast": "slideUpFast", - /** - * value: "slideDown" - * @const - */ - "slideDown": "slideDown", - /** - * value: "slideDownSlow" - * @const - */ - "slideDownSlow": "slideDownSlow", - /** - * value: "slideDownFast" - * @const - */ - "slideDownFast": "slideDownFast", - /** - * value: "carouselLeft" - * @const - */ - "carouselLeft": "carouselLeft", - /** - * value: "carouselLeftSlow" - * @const - */ - "carouselLeftSlow": "carouselLeftSlow", - /** - * value: "carouselLeftFast" - * @const - */ - "carouselLeftFast": "carouselLeftFast", - /** - * value: "carouselRight" - * @const - */ - "carouselRight": "carouselRight", - /** - * value: "carouselRightSlow" - * @const - */ - "carouselRightSlow": "carouselRightSlow", - /** - * value: "carouselRightFast" - * @const - */ - "carouselRightFast": "carouselRightFast", - /** - * value: "carouselUp" - * @const - */ - "carouselUp": "carouselUp", - /** - * value: "carouselUpSlow" - * @const - */ - "carouselUpSlow": "carouselUpSlow", - /** - * value: "carouselUpFast" - * @const - */ - "carouselUpFast": "carouselUpFast", - /** - * value: "carouselDown" - * @const - */ - "carouselDown": "carouselDown", - /** - * value: "carouselDownSlow" - * @const - */ - "carouselDownSlow": "carouselDownSlow", - /** - * value: "carouselDownFast" - * @const - */ - "carouselDownFast": "carouselDownFast", - /** - * value: "shuffleTopRight" - * @const - */ - "shuffleTopRight": "shuffleTopRight", - /** - * value: "shuffleTopRightSlow" - * @const - */ - "shuffleTopRightSlow": "shuffleTopRightSlow", - /** - * value: "shuffleTopRightFast" - * @const - */ - "shuffleTopRightFast": "shuffleTopRightFast", - /** - * value: "shuffleRightTop" - * @const - */ - "shuffleRightTop": "shuffleRightTop", - /** - * value: "shuffleRightTopSlow" - * @const - */ - "shuffleRightTopSlow": "shuffleRightTopSlow", - /** - * value: "shuffleRightTopFast" - * @const - */ - "shuffleRightTopFast": "shuffleRightTopFast", - /** - * value: "shuffleRightBottom" - * @const - */ - "shuffleRightBottom": "shuffleRightBottom", - /** - * value: "shuffleRightBottomSlow" - * @const - */ - "shuffleRightBottomSlow": "shuffleRightBottomSlow", - /** - * value: "shuffleRightBottomFast" - * @const - */ - "shuffleRightBottomFast": "shuffleRightBottomFast", - /** - * value: "shuffleBottomRight" - * @const - */ - "shuffleBottomRight": "shuffleBottomRight", - /** - * value: "shuffleBottomRightSlow" - * @const - */ - "shuffleBottomRightSlow": "shuffleBottomRightSlow", - /** - * value: "shuffleBottomRightFast" - * @const - */ - "shuffleBottomRightFast": "shuffleBottomRightFast", - /** - * value: "shuffleBottomLeft" - * @const - */ - "shuffleBottomLeft": "shuffleBottomLeft", - /** - * value: "shuffleBottomLeftSlow" - * @const - */ - "shuffleBottomLeftSlow": "shuffleBottomLeftSlow", - /** - * value: "shuffleBottomLeftFast" - * @const - */ - "shuffleBottomLeftFast": "shuffleBottomLeftFast", - /** - * value: "shuffleLeftBottom" - * @const - */ - "shuffleLeftBottom": "shuffleLeftBottom", - /** - * value: "shuffleLeftBottomSlow" - * @const - */ - "shuffleLeftBottomSlow": "shuffleLeftBottomSlow", - /** - * value: "shuffleLeftBottomFast" - * @const - */ - "shuffleLeftBottomFast": "shuffleLeftBottomFast", - /** - * value: "shuffleLeftTop" - * @const - */ - "shuffleLeftTop": "shuffleLeftTop", - /** - * value: "shuffleLeftTopSlow" - * @const - */ - "shuffleLeftTopSlow": "shuffleLeftTopSlow", - /** - * value: "shuffleLeftTopFast" - * @const - */ - "shuffleLeftTopFast": "shuffleLeftTopFast", - /** - * value: "shuffleTopLeft" - * @const - */ - "shuffleTopLeft": "shuffleTopLeft", - /** - * value: "shuffleTopLeftSlow" - * @const - */ - "shuffleTopLeftSlow": "shuffleTopLeftSlow", - /** - * value: "shuffleTopLeftFast" - * @const - */ - "shuffleTopLeftFast": "shuffleTopLeftFast", - /** - * value: "zoom" - * @const - */ - "zoom": "zoom" -}; - -/** - * Allowed values for the out property. - * @enum {String} - * @readonly - */ -Transition['OutEnum'] = { - /** - * value: "fade" - * @const - */ - "fade": "fade", - /** - * value: "fadeSlow" - * @const - */ - "fadeSlow": "fadeSlow", - /** - * value: "fadeFast" - * @const - */ - "fadeFast": "fadeFast", - /** - * value: "reveal" - * @const - */ - "reveal": "reveal", - /** - * value: "revealSlow" - * @const - */ - "revealSlow": "revealSlow", - /** - * value: "revealFast" - * @const - */ - "revealFast": "revealFast", - /** - * value: "wipeLeft" - * @const - */ - "wipeLeft": "wipeLeft", - /** - * value: "wipeLeftSlow" - * @const - */ - "wipeLeftSlow": "wipeLeftSlow", - /** - * value: "wipeLeftFast" - * @const - */ - "wipeLeftFast": "wipeLeftFast", - /** - * value: "wipeRight" - * @const - */ - "wipeRight": "wipeRight", - /** - * value: "wipeRightSlow" - * @const - */ - "wipeRightSlow": "wipeRightSlow", - /** - * value: "wipeRightFast" - * @const - */ - "wipeRightFast": "wipeRightFast", - /** - * value: "slideLeft" - * @const - */ - "slideLeft": "slideLeft", - /** - * value: "slideLeftSlow" - * @const - */ - "slideLeftSlow": "slideLeftSlow", - /** - * value: "slideLeftFast" - * @const - */ - "slideLeftFast": "slideLeftFast", - /** - * value: "slideRight" - * @const - */ - "slideRight": "slideRight", - /** - * value: "slideRightSlow" - * @const - */ - "slideRightSlow": "slideRightSlow", - /** - * value: "slideRightFast" - * @const - */ - "slideRightFast": "slideRightFast", - /** - * value: "slideUp" - * @const - */ - "slideUp": "slideUp", - /** - * value: "slideUpSlow" - * @const - */ - "slideUpSlow": "slideUpSlow", - /** - * value: "slideUpFast" - * @const - */ - "slideUpFast": "slideUpFast", - /** - * value: "slideDown" - * @const - */ - "slideDown": "slideDown", - /** - * value: "slideDownSlow" - * @const - */ - "slideDownSlow": "slideDownSlow", - /** - * value: "slideDownFast" - * @const - */ - "slideDownFast": "slideDownFast", - /** - * value: "carouselLeft" - * @const - */ - "carouselLeft": "carouselLeft", - /** - * value: "carouselLeftSlow" - * @const - */ - "carouselLeftSlow": "carouselLeftSlow", - /** - * value: "carouselLeftFast" - * @const - */ - "carouselLeftFast": "carouselLeftFast", - /** - * value: "carouselRight" - * @const - */ - "carouselRight": "carouselRight", - /** - * value: "carouselRightSlow" - * @const - */ - "carouselRightSlow": "carouselRightSlow", - /** - * value: "carouselRightFast" - * @const - */ - "carouselRightFast": "carouselRightFast", - /** - * value: "carouselUp" - * @const - */ - "carouselUp": "carouselUp", - /** - * value: "carouselUpSlow" - * @const - */ - "carouselUpSlow": "carouselUpSlow", - /** - * value: "carouselUpFast" - * @const - */ - "carouselUpFast": "carouselUpFast", - /** - * value: "carouselDown" - * @const - */ - "carouselDown": "carouselDown", - /** - * value: "carouselDownSlow" - * @const - */ - "carouselDownSlow": "carouselDownSlow", - /** - * value: "carouselDownFast" - * @const - */ - "carouselDownFast": "carouselDownFast", - /** - * value: "shuffleTopRight" - * @const - */ - "shuffleTopRight": "shuffleTopRight", - /** - * value: "shuffleTopRightSlow" - * @const - */ - "shuffleTopRightSlow": "shuffleTopRightSlow", - /** - * value: "shuffleTopRightFast" - * @const - */ - "shuffleTopRightFast": "shuffleTopRightFast", - /** - * value: "shuffleRightTop" - * @const - */ - "shuffleRightTop": "shuffleRightTop", - /** - * value: "shuffleRightTopSlow" - * @const - */ - "shuffleRightTopSlow": "shuffleRightTopSlow", - /** - * value: "shuffleRightTopFast" - * @const - */ - "shuffleRightTopFast": "shuffleRightTopFast", - /** - * value: "shuffleRightBottom" - * @const - */ - "shuffleRightBottom": "shuffleRightBottom", - /** - * value: "shuffleRightBottomSlow" - * @const - */ - "shuffleRightBottomSlow": "shuffleRightBottomSlow", - /** - * value: "shuffleRightBottomFast" - * @const - */ - "shuffleRightBottomFast": "shuffleRightBottomFast", - /** - * value: "shuffleBottomRight" - * @const - */ - "shuffleBottomRight": "shuffleBottomRight", - /** - * value: "shuffleBottomRightSlow" - * @const - */ - "shuffleBottomRightSlow": "shuffleBottomRightSlow", - /** - * value: "shuffleBottomRightFast" - * @const - */ - "shuffleBottomRightFast": "shuffleBottomRightFast", - /** - * value: "shuffleBottomLeft" - * @const - */ - "shuffleBottomLeft": "shuffleBottomLeft", - /** - * value: "shuffleBottomLeftSlow" - * @const - */ - "shuffleBottomLeftSlow": "shuffleBottomLeftSlow", - /** - * value: "shuffleBottomLeftFast" - * @const - */ - "shuffleBottomLeftFast": "shuffleBottomLeftFast", - /** - * value: "shuffleLeftBottom" - * @const - */ - "shuffleLeftBottom": "shuffleLeftBottom", - /** - * value: "shuffleLeftBottomSlow" - * @const - */ - "shuffleLeftBottomSlow": "shuffleLeftBottomSlow", - /** - * value: "shuffleLeftBottomFast" - * @const - */ - "shuffleLeftBottomFast": "shuffleLeftBottomFast", - /** - * value: "shuffleLeftTop" - * @const - */ - "shuffleLeftTop": "shuffleLeftTop", - /** - * value: "shuffleLeftTopSlow" - * @const - */ - "shuffleLeftTopSlow": "shuffleLeftTopSlow", - /** - * value: "shuffleLeftTopFast" - * @const - */ - "shuffleLeftTopFast": "shuffleLeftTopFast", - /** - * value: "shuffleTopLeft" - * @const - */ - "shuffleTopLeft": "shuffleTopLeft", - /** - * value: "shuffleTopLeftSlow" - * @const - */ - "shuffleTopLeftSlow": "shuffleTopLeftSlow", - /** - * value: "shuffleTopLeftFast" - * @const - */ - "shuffleTopLeftFast": "shuffleTopLeftFast", - /** - * value: "zoom" - * @const - */ - "zoom": "zoom" -}; -var _default = exports["default"] = Transition; \ No newline at end of file diff --git a/src/model/Tween.js b/src/model/Tween.js deleted file mode 100644 index 49a8116..0000000 --- a/src/model/Tween.js +++ /dev/null @@ -1,246 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The Tween model module. - * @module model/Tween - * @version 0.2.9 - */ -var Tween = /*#__PURE__*/function () { - /** - * Constructs a new Tween. - * Use a Tween to [animate properties over time](/docs/guide/architecting-an-application/animations/). The following properties are currently supported and can be animated: <ul> <li>Opacity - animate the transparency of a clip.</li> <li>Offset - animate the x and y position of a clip.</li> <li>Rotation - animate the rotation of a clip.</li> <li>Skew - animate the horizontal and vertical shearing effect.</li> <li>Volume - animate the audio volume of a clip.</li> </ul> - * @alias module:model/Tween - */ - function Tween() { - _classCallCheck(this, Tween); - Tween.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(Tween, [{ - key: "getFrom", - value: - /** - * Returns The initial property value at the start of the animation. - * @return {Object} - */ - function getFrom() { - return this.from; - } - - /** - * Sets The initial property value at the start of the animation. - * @param {Object} from The initial property value at the start of the animation. - */ - }, { - key: "setFrom", - value: function setFrom(from) { - this['from'] = from; - return this; - } - /** - * Returns The final property value at the end of the animation. - * @return {Object} - */ - }, { - key: "getTo", - value: function getTo() { - return this.to; - } - - /** - * Sets The final property value at the end of the animation. - * @param {Object} to The final property value at the end of the animation. - */ - }, { - key: "setTo", - value: function setTo(to) { - this['to'] = to; - return this; - } - /** - * Returns The time in seconds when the animation starts, relative to the clip, not the timeline. - * @return {Number} - */ - }, { - key: "getStart", - value: function getStart() { - return this.start; - } - - /** - * Sets The time in seconds when the animation starts, relative to the clip, not the timeline. - * @param {Number} start The time in seconds when the animation starts, relative to the clip, not the timeline. - */ - }, { - key: "setStart", - value: function setStart(start) { - this['start'] = start; - return this; - } - /** - * Returns The duration of the animation in seconds. - * @return {Number} - */ - }, { - key: "getLength", - value: function getLength() { - return this.length; - } - - /** - * Sets The duration of the animation in seconds. - * @param {Number} length The duration of the animation in seconds. - */ - }, { - key: "setLength", - value: function setLength(length) { - this['length'] = length; - return this; - } - /** - * Returns The interpolation method to use for the animation. Available options are:
  • `linear` - a linear interpolation between the start and end values.
  • `bezier` - a bezier curve interpolation between the start and end values.
- * @return {module:model/Tween.InterpolationEnum} - */ - }, { - key: "getInterpolation", - value: function getInterpolation() { - return this.interpolation; - } - - /** - * Sets The interpolation method to use for the animation. Available options are:
  • `linear` - a linear interpolation between the start and end values.
  • `bezier` - a bezier curve interpolation between the start and end values.
- * @param {module:model/Tween.InterpolationEnum} interpolation The interpolation method to use for the animation. Available options are:
  • `linear` - a linear interpolation between the start and end values.
  • `bezier` - a bezier curve interpolation between the start and end values.
- */ - }, { - key: "setInterpolation", - value: function setInterpolation(interpolation) { - this['interpolation'] = interpolation; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a Tween from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/Tween} obj Optional instance to populate. - * @return {module:model/Tween} The populated Tween instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new Tween(); - if (data.hasOwnProperty('from')) { - obj['from'] = _ApiClient["default"].convertToType(data['from'], Object); - } - if (data.hasOwnProperty('to')) { - obj['to'] = _ApiClient["default"].convertToType(data['to'], Object); - } - if (data.hasOwnProperty('start')) { - obj['start'] = _ApiClient["default"].convertToType(data['start'], 'Number'); - } - if (data.hasOwnProperty('length')) { - obj['length'] = _ApiClient["default"].convertToType(data['length'], 'Number'); - } - if (data.hasOwnProperty('interpolation')) { - obj['interpolation'] = _ApiClient["default"].convertToType(data['interpolation'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to Tween. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Tween. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['interpolation'] && !(typeof data['interpolation'] === 'string' || data['interpolation'] instanceof String)) { - throw new Error("Expected the field `interpolation` to be a primitive type in the JSON string but got " + data['interpolation']); - } - return true; - } - }]); -}(); -/** - * The initial property value at the start of the animation. - * @member {Object} from - */ -Tween.prototype['from'] = undefined; - -/** - * The final property value at the end of the animation. - * @member {Object} to - */ -Tween.prototype['to'] = undefined; - -/** - * The time in seconds when the animation starts, relative to the clip, not the timeline. - * @member {Number} start - */ -Tween.prototype['start'] = undefined; - -/** - * The duration of the animation in seconds. - * @member {Number} length - */ -Tween.prototype['length'] = undefined; - -/** - * The interpolation method to use for the animation. Available options are:
  • `linear` - a linear interpolation between the start and end values.
  • `bezier` - a bezier curve interpolation between the start and end values.
- * @member {module:model/Tween.InterpolationEnum} interpolation - */ -Tween.prototype['interpolation'] = undefined; - -/** - * Allowed values for the interpolation property. - * @enum {String} - * @readonly - */ -Tween['InterpolationEnum'] = { - /** - * value: "linear" - * @const - */ - "linear": "linear", - /** - * value: "bezier" - * @const - */ - "bezier": "bezier" -}; -var _default = exports["default"] = Tween; \ No newline at end of file diff --git a/src/model/UploadResponse.js b/src/model/UploadResponse.js deleted file mode 100644 index 896832f..0000000 --- a/src/model/UploadResponse.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _UploadResponseData = _interopRequireDefault(require("./UploadResponseData")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The UploadResponse model module. - * @module model/UploadResponse - * @version 0.2.9 - */ -var UploadResponse = /*#__PURE__*/function () { - /** - * Constructs a new UploadResponse. - * The response returned by the Ingest API [direct upload](#direct-upload) request. Includes the id of the file and the signed url to send the binary file to. The response follows the [json:api](https://jsonapi.org/) specification. - * @alias module:model/UploadResponse - * @param data {module:model/UploadResponseData} - */ - function UploadResponse(data) { - _classCallCheck(this, UploadResponse); - UploadResponse.initialize(this, data); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(UploadResponse, [{ - key: "getData", - value: - /** - * @return {module:model/UploadResponseData} - */ - function getData() { - return this.data; - } - - /** - * @param {module:model/UploadResponseData} data - */ - }, { - key: "setData", - value: function setData(data) { - this['data'] = data; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, data) { - obj['data'] = data; - } - - /** - * Constructs a UploadResponse from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UploadResponse} obj Optional instance to populate. - * @return {module:model/UploadResponse} The populated UploadResponse instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new UploadResponse(); - if (data.hasOwnProperty('data')) { - obj['data'] = _UploadResponseData["default"].constructFromObject(data['data']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to UploadResponse. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to UploadResponse. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(UploadResponse.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `data` - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['data']) { - // data not null - _UploadResponseData["default"].validateJSON(data['data']); - } - return true; - } - }]); -}(); -UploadResponse.RequiredProperties = ["data"]; - -/** - * @member {module:model/UploadResponseData} data - */ -UploadResponse.prototype['data'] = undefined; -var _default = exports["default"] = UploadResponse; \ No newline at end of file diff --git a/src/model/UploadResponseAttributes.js b/src/model/UploadResponseAttributes.js deleted file mode 100644 index 03e34d8..0000000 --- a/src/model/UploadResponseAttributes.js +++ /dev/null @@ -1,205 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The UploadResponseAttributes model module. - * @module model/UploadResponseAttributes - * @version 0.2.9 - */ -var UploadResponseAttributes = /*#__PURE__*/function () { - /** - * Constructs a new UploadResponseAttributes. - * The id and attributes of the upload file including the signed URL to send the binary file data to. - * @alias module:model/UploadResponseAttributes - * @param id {String} The source id. - * @param url {String} The signed URL to use in a PUT request to send the binary file to. - * @param expires {String} The time the upload request will expire. The signed URL will expire after one hour. Upload must complete within one hour. - */ - function UploadResponseAttributes(id, url, expires) { - _classCallCheck(this, UploadResponseAttributes); - UploadResponseAttributes.initialize(this, id, url, expires); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(UploadResponseAttributes, [{ - key: "getId", - value: - /** - * Returns The source id. - * @return {String} - */ - function getId() { - return this.id; - } - - /** - * Sets The source id. - * @param {String} id The source id. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * Returns The signed URL to use in a PUT request to send the binary file to. - * @return {String} - */ - }, { - key: "getUrl", - value: function getUrl() { - return this.url; - } - - /** - * Sets The signed URL to use in a PUT request to send the binary file to. - * @param {String} url The signed URL to use in a PUT request to send the binary file to. - */ - }, { - key: "setUrl", - value: function setUrl(url) { - this['url'] = url; - return this; - } - /** - * Returns The time the upload request will expire. The signed URL will expire after one hour. Upload must complete within one hour. - * @return {String} - */ - }, { - key: "getExpires", - value: function getExpires() { - return this.expires; - } - - /** - * Sets The time the upload request will expire. The signed URL will expire after one hour. Upload must complete within one hour. - * @param {String} expires The time the upload request will expire. The signed URL will expire after one hour. Upload must complete within one hour. - */ - }, { - key: "setExpires", - value: function setExpires(expires) { - this['expires'] = expires; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, id, url, expires) { - obj['id'] = id; - obj['url'] = url; - obj['expires'] = expires; - } - - /** - * Constructs a UploadResponseAttributes from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UploadResponseAttributes} obj Optional instance to populate. - * @return {module:model/UploadResponseAttributes} The populated UploadResponseAttributes instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new UploadResponseAttributes(); - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('url')) { - obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String'); - } - if (data.hasOwnProperty('expires')) { - obj['expires'] = _ApiClient["default"].convertToType(data['expires'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to UploadResponseAttributes. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to UploadResponseAttributes. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(UploadResponseAttributes.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // ensure the json data is a string - if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) { - throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']); - } - // ensure the json data is a string - if (data['expires'] && !(typeof data['expires'] === 'string' || data['expires'] instanceof String)) { - throw new Error("Expected the field `expires` to be a primitive type in the JSON string but got " + data['expires']); - } - return true; - } - }]); -}(); -UploadResponseAttributes.RequiredProperties = ["id", "url", "expires"]; - -/** - * The source id. - * @member {String} id - */ -UploadResponseAttributes.prototype['id'] = undefined; - -/** - * The signed URL to use in a PUT request to send the binary file to. - * @member {String} url - */ -UploadResponseAttributes.prototype['url'] = undefined; - -/** - * The time the upload request will expire. The signed URL will expire after one hour. Upload must complete within one hour. - * @member {String} expires - */ -UploadResponseAttributes.prototype['expires'] = undefined; -var _default = exports["default"] = UploadResponseAttributes; \ No newline at end of file diff --git a/src/model/UploadResponseData.js b/src/model/UploadResponseData.js deleted file mode 100644 index bc6e35d..0000000 --- a/src/model/UploadResponseData.js +++ /dev/null @@ -1,204 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _UploadResponseAttributes = _interopRequireDefault(require("./UploadResponseAttributes")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The UploadResponseData model module. - * @module model/UploadResponseData - * @version 0.2.9 - */ -var UploadResponseData = /*#__PURE__*/function () { - /** - * Constructs a new UploadResponseData. - * The type of resource (an upload), it's id and attributes of the upload request. - * @alias module:model/UploadResponseData - * @param type {String} The type of resource, in this case it is an upload. - * @param id {String} The upload file id. - * @param attributes {module:model/UploadResponseAttributes} - */ - function UploadResponseData(type, id, attributes) { - _classCallCheck(this, UploadResponseData); - UploadResponseData.initialize(this, type, id, attributes); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(UploadResponseData, [{ - key: "getType", - value: - /** - * Returns The type of resource, in this case it is an upload. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of resource, in this case it is an upload. - * @param {String} type The type of resource, in this case it is an upload. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The upload file id. - * @return {String} - */ - }, { - key: "getId", - value: function getId() { - return this.id; - } - - /** - * Sets The upload file id. - * @param {String} id The upload file id. - */ - }, { - key: "setId", - value: function setId(id) { - this['id'] = id; - return this; - } - /** - * @return {module:model/UploadResponseAttributes} - */ - }, { - key: "getAttributes", - value: function getAttributes() { - return this.attributes; - } - - /** - * @param {module:model/UploadResponseAttributes} attributes - */ - }, { - key: "setAttributes", - value: function setAttributes(attributes) { - this['attributes'] = attributes; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, id, attributes) { - obj['type'] = type; - obj['id'] = id; - obj['attributes'] = attributes; - } - - /** - * Constructs a UploadResponseData from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/UploadResponseData} obj Optional instance to populate. - * @return {module:model/UploadResponseData} The populated UploadResponseData instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new UploadResponseData(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); - } - if (data.hasOwnProperty('attributes')) { - obj['attributes'] = _UploadResponseAttributes["default"].constructFromObject(data['attributes']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to UploadResponseData. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to UploadResponseData. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(UploadResponseData.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { - throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); - } - // validate the optional field `attributes` - if (data['attributes']) { - // data not null - _UploadResponseAttributes["default"].validateJSON(data['attributes']); - } - return true; - } - }]); -}(); -UploadResponseData.RequiredProperties = ["type", "id", "attributes"]; - -/** - * The type of resource, in this case it is an upload. - * @member {String} type - */ -UploadResponseData.prototype['type'] = undefined; - -/** - * The upload file id. - * @member {String} id - */ -UploadResponseData.prototype['id'] = undefined; - -/** - * @member {module:model/UploadResponseAttributes} attributes - */ -UploadResponseData.prototype['attributes'] = undefined; -var _default = exports["default"] = UploadResponseData; \ No newline at end of file diff --git a/src/model/VideoAsset.js b/src/model/VideoAsset.js deleted file mode 100644 index 72d701b..0000000 --- a/src/model/VideoAsset.js +++ /dev/null @@ -1,383 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _ChromaKey = _interopRequireDefault(require("./ChromaKey")); -var _Crop = _interopRequireDefault(require("./Crop")); -var _VideoAssetVolume = _interopRequireDefault(require("./VideoAssetVolume")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The VideoAsset model module. - * @module model/VideoAsset - * @version 0.2.9 - */ -var VideoAsset = /*#__PURE__*/function () { - /** - * Constructs a new VideoAsset. - * The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file. - * @alias module:model/VideoAsset - * @param type {String} The type of asset - set to `video` for videos. - * @param src {String} The video source URL. The URL must be publicly accessible or include credentials. - */ - function VideoAsset(type, src) { - _classCallCheck(this, VideoAsset); - VideoAsset.initialize(this, type, src); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(VideoAsset, [{ - key: "getType", - value: - /** - * Returns The type of asset - set to `video` for videos. - * @return {String} - */ - function getType() { - return this.type; - } - - /** - * Sets The type of asset - set to `video` for videos. - * @param {String} type The type of asset - set to `video` for videos. - */ - }, { - key: "setType", - value: function setType(type) { - this['type'] = type; - return this; - } - /** - * Returns The video source URL. The URL must be publicly accessible or include credentials. - * @return {String} - */ - }, { - key: "getSrc", - value: function getSrc() { - return this.src; - } - - /** - * Sets The video source URL. The URL must be publicly accessible or include credentials. - * @param {String} src The video source URL. The URL must be publicly accessible or include credentials. - */ - }, { - key: "setSrc", - value: function setSrc(src) { - this['src'] = src; - return this; - } - /** - * Returns The start trim point of the video clip, in seconds (defaults to 0). Videos will start from the in trim point. The video will play until the file ends or the Clip length is reached. - * @return {Number} - */ - }, { - key: "getTrim", - value: function getTrim() { - return this.trim; - } - - /** - * Sets The start trim point of the video clip, in seconds (defaults to 0). Videos will start from the in trim point. The video will play until the file ends or the Clip length is reached. - * @param {Number} trim The start trim point of the video clip, in seconds (defaults to 0). Videos will start from the in trim point. The video will play until the file ends or the Clip length is reached. - */ - }, { - key: "setTrim", - value: function setTrim(trim) { - this['trim'] = trim; - return this; - } - /** - * @return {module:model/VideoAssetVolume} - */ - }, { - key: "getVolume", - value: function getVolume() { - return this.volume; - } - - /** - * @param {module:model/VideoAssetVolume} volume - */ - }, { - key: "setVolume", - value: function setVolume(volume) { - this['volume'] = volume; - return this; - } - /** - * Returns Preset volume effects to apply to the video asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @return {module:model/VideoAsset.VolumeEffectEnum} - */ - }, { - key: "getVolumeEffect", - value: function getVolumeEffect() { - return this.volumeEffect; - } - - /** - * Sets Preset volume effects to apply to the video asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @param {module:model/VideoAsset.VolumeEffectEnum} volumeEffect Preset volume effects to apply to the video asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- */ - }, { - key: "setVolumeEffect", - value: function setVolumeEffect(volumeEffect) { - this['volumeEffect'] = volumeEffect; - return this; - } - /** - * Returns Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2). - * minimum: 0 - * maximum: 10 - * @return {Number} - */ - }, { - key: "getSpeed", - value: function getSpeed() { - return this.speed; - } - - /** - * Sets Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2). - * @param {Number} speed Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2). - */ - }, { - key: "setSpeed", - value: function setSpeed(speed) { - this['speed'] = speed; - return this; - } - /** - * @return {module:model/Crop} - */ - }, { - key: "getCrop", - value: function getCrop() { - return this.crop; - } - - /** - * @param {module:model/Crop} crop - */ - }, { - key: "setCrop", - value: function setCrop(crop) { - this['crop'] = crop; - return this; - } - /** - * @return {module:model/ChromaKey} - */ - }, { - key: "getChromaKey", - value: function getChromaKey() { - return this.chromaKey; - } - - /** - * @param {module:model/ChromaKey} chromaKey - */ - }, { - key: "setChromaKey", - value: function setChromaKey(chromaKey) { - this['chromaKey'] = chromaKey; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, type, src) { - obj['type'] = type || 'video'; - obj['src'] = src; - } - - /** - * Constructs a VideoAsset from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/VideoAsset} obj Optional instance to populate. - * @return {module:model/VideoAsset} The populated VideoAsset instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new VideoAsset(); - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); - } - if (data.hasOwnProperty('src')) { - obj['src'] = _ApiClient["default"].convertToType(data['src'], 'String'); - } - if (data.hasOwnProperty('trim')) { - obj['trim'] = _ApiClient["default"].convertToType(data['trim'], 'Number'); - } - if (data.hasOwnProperty('volume')) { - obj['volume'] = _VideoAssetVolume["default"].constructFromObject(data['volume']); - } - if (data.hasOwnProperty('volumeEffect')) { - obj['volumeEffect'] = _ApiClient["default"].convertToType(data['volumeEffect'], 'String'); - } - if (data.hasOwnProperty('speed')) { - obj['speed'] = _ApiClient["default"].convertToType(data['speed'], 'Number'); - } - if (data.hasOwnProperty('crop')) { - obj['crop'] = _Crop["default"].constructFromObject(data['crop']); - } - if (data.hasOwnProperty('chromaKey')) { - obj['chromaKey'] = _ChromaKey["default"].constructFromObject(data['chromaKey']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to VideoAsset. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to VideoAsset. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(VideoAsset.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } - // ensure the json data is a string - if (data['src'] && !(typeof data['src'] === 'string' || data['src'] instanceof String)) { - throw new Error("Expected the field `src` to be a primitive type in the JSON string but got " + data['src']); - } - // validate the optional field `volume` - if (data['volume']) { - // data not null - _VideoAssetVolume["default"].validateJSON(data['volume']); - } - // ensure the json data is a string - if (data['volumeEffect'] && !(typeof data['volumeEffect'] === 'string' || data['volumeEffect'] instanceof String)) { - throw new Error("Expected the field `volumeEffect` to be a primitive type in the JSON string but got " + data['volumeEffect']); - } - // validate the optional field `crop` - if (data['crop']) { - // data not null - _Crop["default"].validateJSON(data['crop']); - } - // validate the optional field `chromaKey` - if (data['chromaKey']) { - // data not null - _ChromaKey["default"].validateJSON(data['chromaKey']); - } - return true; - } - }]); -}(); -VideoAsset.RequiredProperties = ["type", "src"]; - -/** - * The type of asset - set to `video` for videos. - * @member {String} type - * @default 'video' - */ -VideoAsset.prototype['type'] = 'video'; - -/** - * The video source URL. The URL must be publicly accessible or include credentials. - * @member {String} src - */ -VideoAsset.prototype['src'] = undefined; - -/** - * The start trim point of the video clip, in seconds (defaults to 0). Videos will start from the in trim point. The video will play until the file ends or the Clip length is reached. - * @member {Number} trim - */ -VideoAsset.prototype['trim'] = undefined; - -/** - * @member {module:model/VideoAssetVolume} volume - */ -VideoAsset.prototype['volume'] = undefined; - -/** - * Preset volume effects to apply to the video asset
  • `fadeIn` - fade volume in only
  • `fadeOut` - fade volume out only
  • `fadeInFadeOut` - fade volume in and out
- * @member {module:model/VideoAsset.VolumeEffectEnum} volumeEffect - */ -VideoAsset.prototype['volumeEffect'] = undefined; - -/** - * Adjust the playback speed of the video clip between 0 (paused) and 10 (10x normal speed) where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire video (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire video (i.e. original length / 2). - * @member {Number} speed - */ -VideoAsset.prototype['speed'] = undefined; - -/** - * @member {module:model/Crop} crop - */ -VideoAsset.prototype['crop'] = undefined; - -/** - * @member {module:model/ChromaKey} chromaKey - */ -VideoAsset.prototype['chromaKey'] = undefined; - -/** - * Allowed values for the volumeEffect property. - * @enum {String} - * @readonly - */ -VideoAsset['VolumeEffectEnum'] = { - /** - * value: "fadeIn" - * @const - */ - "fadeIn": "fadeIn", - /** - * value: "fadeOut" - * @const - */ - "fadeOut": "fadeOut", - /** - * value: "fadeInFadeOut" - * @const - */ - "fadeInFadeOut": "fadeInFadeOut" -}; -var _default = exports["default"] = VideoAsset; \ No newline at end of file diff --git a/src/model/VideoAssetVolume.js b/src/model/VideoAssetVolume.js deleted file mode 100644 index 02ac45a..0000000 --- a/src/model/VideoAssetVolume.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _Tween = _interopRequireDefault(require("./Tween")); -var _VideoAssetVolume; -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The VideoAssetVolume model module. - * @module model/VideoAssetVolume - * @version 0.2.9 - */ -var VideoAssetVolume = /*#__PURE__*/function () { - /** - * Constructs a new VideoAssetVolume. - * Set the volume of the video clip. Use a number or an array of [Tween](./#tocs_tween) objects to create custom volume transitions. - * @alias module:model/VideoAssetVolume - * @param {(module:model/Number|module:model/[Tween])} instance The actual instance to initialize VideoAssetVolume. - */ - function VideoAssetVolume() { - var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - _classCallCheck(this, VideoAssetVolume); - /** - * Returns the JSON representation of the actual instance. - * @return {string} - */ - _defineProperty(this, "toJSON", function () { - return this.getActualInstance(); - }); - if (instance === null) { - this.actualInstance = null; - return; - } - var match = 0; - var errorMessages = []; - // The volume level for the video clip. Range varies from 0 to 1 where 0 is muted and 1 is full volume (defaults to 1). - try { - this.actualInstance = instance; - match++; - } catch (err) { - // json data failed to deserialize into Number - errorMessages.push("Failed to construct Number: " + err); - } - - // An array of [Tween](./#tocs_tween) objects used to create a custom volume effect. Modify the volume of an asset over time. - try { - if (typeof instance === "[Tween]") { - this.actualInstance = instance; - } else { - // plain JS object - // validate the object - [_Tween["default"]].validateJSON(instance); // throw an exception if no match - // create [Tween] from JS object - this.actualInstance = [_Tween["default"]].constructFromObject(instance); - } - match++; - } catch (err) { - // json data failed to deserialize into [Tween] - errorMessages.push("Failed to construct [Tween]: " + err); - } - if (match > 1) { - throw new Error("Multiple matches found constructing `VideoAssetVolume` with oneOf schemas Number, [Tween]. Input: " + JSON.stringify(instance)); - } else if (match === 0) { - this.actualInstance = null; // clear the actual instance in case there are multiple matches - throw new Error("No match found constructing `VideoAssetVolume` with oneOf schemas Number, [Tween]. Details: " + errorMessages.join(", ")); - } else {// only 1 match - // the input is valid - } - } - - /** - * Constructs a VideoAssetVolume from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/VideoAssetVolume} obj Optional instance to populate. - * @return {module:model/VideoAssetVolume} The populated VideoAssetVolume instance. - */ - return _createClass(VideoAssetVolume, [{ - key: "getActualInstance", - value: - /** - * Gets the actual instance, which can be Number, [Tween]. - * @return {(module:model/Number|module:model/[Tween])} The actual instance. - */ - function getActualInstance() { - return this.actualInstance; - } - - /** - * Sets the actual instance, which can be Number, [Tween]. - * @param {(module:model/Number|module:model/[Tween])} obj The actual instance. - */ - }, { - key: "setActualInstance", - value: function setActualInstance(obj) { - this.actualInstance = VideoAssetVolume.constructFromObject(obj).getActualInstance(); - } - }], [{ - key: "constructFromObject", - value: function constructFromObject(data, obj) { - return new VideoAssetVolume(data); - } - }]); -}(); -_VideoAssetVolume = VideoAssetVolume; -/** - * Create an instance of VideoAssetVolume from a JSON string. - * @param {string} json_string JSON string. - * @return {module:model/VideoAssetVolume} An instance of VideoAssetVolume. - */ -_defineProperty(VideoAssetVolume, "fromJSON", function (json_string) { - return _VideoAssetVolume.constructFromObject(JSON.parse(json_string)); -}); -VideoAssetVolume.OneOf = ["Number", "[Tween]"]; -var _default = exports["default"] = VideoAssetVolume; \ No newline at end of file diff --git a/src/model/VimeoDestination.js b/src/model/VimeoDestination.js deleted file mode 100644 index 7209136..0000000 --- a/src/model/VimeoDestination.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _VimeoDestinationOptions = _interopRequireDefault(require("./VimeoDestinationOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The VimeoDestination model module. - * @module model/VimeoDestination - * @version 0.2.9 - */ -var VimeoDestination = /*#__PURE__*/function () { - /** - * Constructs a new VimeoDestination. - * Send videos to [Vimeo](https://shotstack.io/docs/guide/serving-assets/destinations/vimeo/) video hosting and streaming service. Vimeo credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/vimeo), not in the request. - * @alias module:model/VimeoDestination - * @param provider {String} The destination to send video to - set to `vimeo` for Vimeo. - */ - function VimeoDestination(provider) { - _classCallCheck(this, VimeoDestination); - VimeoDestination.initialize(this, provider); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(VimeoDestination, [{ - key: "getProvider", - value: - /** - * Returns The destination to send video to - set to `vimeo` for Vimeo. - * @return {String} - */ - function getProvider() { - return this.provider; - } - - /** - * Sets The destination to send video to - set to `vimeo` for Vimeo. - * @param {String} provider The destination to send video to - set to `vimeo` for Vimeo. - */ - }, { - key: "setProvider", - value: function setProvider(provider) { - this['provider'] = provider; - return this; - } - /** - * @return {module:model/VimeoDestinationOptions} - */ - }, { - key: "getOptions", - value: function getOptions() { - return this.options; - } - - /** - * @param {module:model/VimeoDestinationOptions} options - */ - }, { - key: "setOptions", - value: function setOptions(options) { - this['options'] = options; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj, provider) { - obj['provider'] = provider || 'vimeo'; - } - - /** - * Constructs a VimeoDestination from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/VimeoDestination} obj Optional instance to populate. - * @return {module:model/VimeoDestination} The populated VimeoDestination instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new VimeoDestination(); - if (data.hasOwnProperty('provider')) { - obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String'); - } - if (data.hasOwnProperty('options')) { - obj['options'] = _VimeoDestinationOptions["default"].constructFromObject(data['options']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to VimeoDestination. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to VimeoDestination. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // check to make sure all required properties are present in the JSON string - var _iterator = _createForOfIteratorHelper(VimeoDestination.RequiredProperties), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var property = _step.value; - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is a string - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) { - throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']); - } - // validate the optional field `options` - if (data['options']) { - // data not null - _VimeoDestinationOptions["default"].validateJSON(data['options']); - } - return true; - } - }]); -}(); -VimeoDestination.RequiredProperties = ["provider"]; - -/** - * The destination to send video to - set to `vimeo` for Vimeo. - * @member {String} provider - * @default 'vimeo' - */ -VimeoDestination.prototype['provider'] = 'vimeo'; - -/** - * @member {module:model/VimeoDestinationOptions} options - */ -VimeoDestination.prototype['options'] = undefined; -var _default = exports["default"] = VimeoDestination; \ No newline at end of file diff --git a/src/model/VimeoDestinationOptions.js b/src/model/VimeoDestinationOptions.js deleted file mode 100644 index e355367..0000000 --- a/src/model/VimeoDestinationOptions.js +++ /dev/null @@ -1,177 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -var _VimeoDestinationPrivacyOptions = _interopRequireDefault(require("./VimeoDestinationPrivacyOptions")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The VimeoDestinationOptions model module. - * @module model/VimeoDestinationOptions - * @version 0.2.9 - */ -var VimeoDestinationOptions = /*#__PURE__*/function () { - /** - * Constructs a new VimeoDestinationOptions. - * Pass additional options to control how Vimeo publishes video, including name, description and privacy settings. - * @alias module:model/VimeoDestinationOptions - */ - function VimeoDestinationOptions() { - _classCallCheck(this, VimeoDestinationOptions); - VimeoDestinationOptions.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(VimeoDestinationOptions, [{ - key: "getName", - value: - /** - * Returns A name or title for the video that will be displayed on the Vimeo website. - * @return {String} - */ - function getName() { - return this.name; - } - - /** - * Sets A name or title for the video that will be displayed on the Vimeo website. - * @param {String} name A name or title for the video that will be displayed on the Vimeo website. - */ - }, { - key: "setName", - value: function setName(name) { - this['name'] = name; - return this; - } - /** - * Returns A description of the video that will be displayed on the Vimeo website. - * @return {String} - */ - }, { - key: "getDescription", - value: function getDescription() { - return this.description; - } - - /** - * Sets A description of the video that will be displayed on the Vimeo website. - * @param {String} description A description of the video that will be displayed on the Vimeo website. - */ - }, { - key: "setDescription", - value: function setDescription(description) { - this['description'] = description; - return this; - } - /** - * @return {module:model/VimeoDestinationPrivacyOptions} - */ - }, { - key: "getPrivacy", - value: function getPrivacy() { - return this.privacy; - } - - /** - * @param {module:model/VimeoDestinationPrivacyOptions} privacy - */ - }, { - key: "setPrivacy", - value: function setPrivacy(privacy) { - this['privacy'] = privacy; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a VimeoDestinationOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/VimeoDestinationOptions} obj Optional instance to populate. - * @return {module:model/VimeoDestinationOptions} The populated VimeoDestinationOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new VimeoDestinationOptions(); - if (data.hasOwnProperty('name')) { - obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('description')) { - obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); - } - if (data.hasOwnProperty('privacy')) { - obj['privacy'] = _VimeoDestinationPrivacyOptions["default"].constructFromObject(data['privacy']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to VimeoDestinationOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to VimeoDestinationOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { - throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); - } - // ensure the json data is a string - if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { - throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); - } - // validate the optional field `privacy` - if (data['privacy']) { - // data not null - _VimeoDestinationPrivacyOptions["default"].validateJSON(data['privacy']); - } - return true; - } - }]); -}(); -/** - * A name or title for the video that will be displayed on the Vimeo website. - * @member {String} name - */ -VimeoDestinationOptions.prototype['name'] = undefined; - -/** - * A description of the video that will be displayed on the Vimeo website. - * @member {String} description - */ -VimeoDestinationOptions.prototype['description'] = undefined; - -/** - * @member {module:model/VimeoDestinationPrivacyOptions} privacy - */ -VimeoDestinationOptions.prototype['privacy'] = undefined; -var _default = exports["default"] = VimeoDestinationOptions; \ No newline at end of file diff --git a/src/model/VimeoDestinationPrivacyOptions.js b/src/model/VimeoDestinationPrivacyOptions.js deleted file mode 100644 index 443df95..0000000 --- a/src/model/VimeoDestinationPrivacyOptions.js +++ /dev/null @@ -1,257 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _ApiClient = _interopRequireDefault(require("../ApiClient")); -function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } -function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } -function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** - * Shotstack - * Official Node SDK for the Shotstack Cloud Video Editing API - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ -/** - * The VimeoDestinationPrivacyOptions model module. - * @module model/VimeoDestinationPrivacyOptions - * @version 0.2.9 - */ -var VimeoDestinationPrivacyOptions = /*#__PURE__*/function () { - /** - * Constructs a new VimeoDestinationPrivacyOptions. - * Options to control the visibility of videos and privacy features. - * @alias module:model/VimeoDestinationPrivacyOptions - */ - function VimeoDestinationPrivacyOptions() { - _classCallCheck(this, VimeoDestinationPrivacyOptions); - VimeoDestinationPrivacyOptions.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - return _createClass(VimeoDestinationPrivacyOptions, [{ - key: "getView", - value: - /** - * Returns Set who can view the videos. Available options are:
  • `anybody` - Anyone can view the video.
  • `nobody` - Only the video owner can view the video.
  • `contacts` - Only contacts can view the video.
  • `password` - A password is required to view the video.
  • `unlisted` - The video is not listed on Vimeo.
- * @return {module:model/VimeoDestinationPrivacyOptions.ViewEnum} - */ - function getView() { - return this.view; - } - - /** - * Sets Set who can view the videos. Available options are:
  • `anybody` - Anyone can view the video.
  • `nobody` - Only the video owner can view the video.
  • `contacts` - Only contacts can view the video.
  • `password` - A password is required to view the video.
  • `unlisted` - The video is not listed on Vimeo.
- * @param {module:model/VimeoDestinationPrivacyOptions.ViewEnum} view Set who can view the videos. Available options are:
  • `anybody` - Anyone can view the video.
  • `nobody` - Only the video owner can view the video.
  • `contacts` - Only contacts can view the video.
  • `password` - A password is required to view the video.
  • `unlisted` - The video is not listed on Vimeo.
- */ - }, { - key: "setView", - value: function setView(view) { - this['view'] = view; - return this; - } - /** - * Returns Set who can embed the video. Available options are:
  • `public` - Anyone can embed the video.
  • `private` - Only the video owner can embed the video.
  • `whitelist` - Only whitelisted domains can embed the video.
- * @return {module:model/VimeoDestinationPrivacyOptions.EmbedEnum} - */ - }, { - key: "getEmbed", - value: function getEmbed() { - return this.embed; - } - - /** - * Sets Set who can embed the video. Available options are:
  • `public` - Anyone can embed the video.
  • `private` - Only the video owner can embed the video.
  • `whitelist` - Only whitelisted domains can embed the video.
- * @param {module:model/VimeoDestinationPrivacyOptions.EmbedEnum} embed Set who can embed the video. Available options are:
  • `public` - Anyone can embed the video.
  • `private` - Only the video owner can embed the video.
  • `whitelist` - Only whitelisted domains can embed the video.
- */ - }, { - key: "setEmbed", - value: function setEmbed(embed) { - this['embed'] = embed; - return this; - } - /** - * Returns Set who can comment on the video. Available options are:
  • `anybody` - Anyone can comment on the video.
  • `nobody` - Only the video owner can comment on the video.
  • `contacts` - Only contacts can comment on the video.
- * @return {module:model/VimeoDestinationPrivacyOptions.CommentsEnum} - */ - }, { - key: "getComments", - value: function getComments() { - return this.comments; - } - - /** - * Sets Set who can comment on the video. Available options are:
  • `anybody` - Anyone can comment on the video.
  • `nobody` - Only the video owner can comment on the video.
  • `contacts` - Only contacts can comment on the video.
- * @param {module:model/VimeoDestinationPrivacyOptions.CommentsEnum} comments Set who can comment on the video. Available options are:
  • `anybody` - Anyone can comment on the video.
  • `nobody` - Only the video owner can comment on the video.
  • `contacts` - Only contacts can comment on the video.
- */ - }, { - key: "setComments", - value: function setComments(comments) { - this['comments'] = comments; - return this; - } - }], [{ - key: "initialize", - value: function initialize(obj) {} - - /** - * Constructs a VimeoDestinationPrivacyOptions from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/VimeoDestinationPrivacyOptions} obj Optional instance to populate. - * @return {module:model/VimeoDestinationPrivacyOptions} The populated VimeoDestinationPrivacyOptions instance. - */ - }, { - key: "constructFromObject", - value: function constructFromObject(data, obj) { - if (data) { - obj = obj || new VimeoDestinationPrivacyOptions(); - if (data.hasOwnProperty('view')) { - obj['view'] = _ApiClient["default"].convertToType(data['view'], 'String'); - } - if (data.hasOwnProperty('embed')) { - obj['embed'] = _ApiClient["default"].convertToType(data['embed'], 'String'); - } - if (data.hasOwnProperty('comments')) { - obj['comments'] = _ApiClient["default"].convertToType(data['comments'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to VimeoDestinationPrivacyOptions. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to VimeoDestinationPrivacyOptions. - */ - }, { - key: "validateJSON", - value: function validateJSON(data) { - // ensure the json data is a string - if (data['view'] && !(typeof data['view'] === 'string' || data['view'] instanceof String)) { - throw new Error("Expected the field `view` to be a primitive type in the JSON string but got " + data['view']); - } - // ensure the json data is a string - if (data['embed'] && !(typeof data['embed'] === 'string' || data['embed'] instanceof String)) { - throw new Error("Expected the field `embed` to be a primitive type in the JSON string but got " + data['embed']); - } - // ensure the json data is a string - if (data['comments'] && !(typeof data['comments'] === 'string' || data['comments'] instanceof String)) { - throw new Error("Expected the field `comments` to be a primitive type in the JSON string but got " + data['comments']); - } - return true; - } - }]); -}(); -/** - * Set who can view the videos. Available options are:
  • `anybody` - Anyone can view the video.
  • `nobody` - Only the video owner can view the video.
  • `contacts` - Only contacts can view the video.
  • `password` - A password is required to view the video.
  • `unlisted` - The video is not listed on Vimeo.
- * @member {module:model/VimeoDestinationPrivacyOptions.ViewEnum} view - */ -VimeoDestinationPrivacyOptions.prototype['view'] = undefined; - -/** - * Set who can embed the video. Available options are:
  • `public` - Anyone can embed the video.
  • `private` - Only the video owner can embed the video.
  • `whitelist` - Only whitelisted domains can embed the video.
- * @member {module:model/VimeoDestinationPrivacyOptions.EmbedEnum} embed - */ -VimeoDestinationPrivacyOptions.prototype['embed'] = undefined; - -/** - * Set who can comment on the video. Available options are:
  • `anybody` - Anyone can comment on the video.
  • `nobody` - Only the video owner can comment on the video.
  • `contacts` - Only contacts can comment on the video.
- * @member {module:model/VimeoDestinationPrivacyOptions.CommentsEnum} comments - */ -VimeoDestinationPrivacyOptions.prototype['comments'] = undefined; - -/** - * Allowed values for the view property. - * @enum {String} - * @readonly - */ -VimeoDestinationPrivacyOptions['ViewEnum'] = { - /** - * value: "anybody" - * @const - */ - "anybody": "anybody", - /** - * value: "nobody" - * @const - */ - "nobody": "nobody", - /** - * value: "contacts" - * @const - */ - "contacts": "contacts", - /** - * value: "password" - * @const - */ - "password": "password", - /** - * value: "unlisted" - * @const - */ - "unlisted": "unlisted" -}; - -/** - * Allowed values for the embed property. - * @enum {String} - * @readonly - */ -VimeoDestinationPrivacyOptions['EmbedEnum'] = { - /** - * value: "public" - * @const - */ - "public": "public", - /** - * value: "private" - * @const - */ - "private": "private", - /** - * value: "whitelist" - * @const - */ - "whitelist": "whitelist" -}; - -/** - * Allowed values for the comments property. - * @enum {String} - * @readonly - */ -VimeoDestinationPrivacyOptions['CommentsEnum'] = { - /** - * value: "anybody" - * @const - */ - "anybody": "anybody", - /** - * value: "nobody" - * @const - */ - "nobody": "nobody", - /** - * value: "contacts" - * @const - */ - "contacts": "contacts" -}; -var _default = exports["default"] = VimeoDestinationPrivacyOptions; \ No newline at end of file