{"version":3,"sources":["views/security/client/dr2am.tasks.permissions-js/src/ApiClient.js","core/public/ApiClient.js","views/security/client/dr2am.tasks.orders-js/src/ApiClient.js","views/security/client/dr2am.tasks.roles-js/src/ApiClient.js","views/security/client/dr2am.tasks.preferences-js/src/ApiClient.js","register.js","sdk/collection/ApiClient.js","reportWebVitals.js","core/public/application/public/app_not_found.tsx","core/public/application/public/app_container.tsx","core/public/application/public/app_router.tsx","core/public/application/application_service.tsx","components/EventEmitter.ts","components/layout.tsx","core/public/rendering/rendering_service.tsx","core/utils/context.ts","core/public/context/context.ts","components/sidebar/section.ts","core/public/chrome/EventEmitter.ts","core/public/chrome/chrome.tsx","core/public/plugins/plugins.ts","core/public/plugins/plugins_context.ts","core/public/plugins/plugins_service.ts","core/store.ts","core/event_emitter.ts","core/public/core_system.ts","i18n.ts","security/authentication/configure.ts","security/authentication/rbac/index.js","security/authentication/configuration.ts","views/security/oauth.ts","views/security/client/dr2am.tasks.permissions-js/src/model/PbPaginate.js","views/security/client/dr2am.tasks.permissions-js/src/model/PbPermissionNode.js","views/security/client/dr2am.tasks.permissions-js/src/model/PbPermissionCondition.js","views/security/client/dr2am.tasks.permissions-js/src/model/PbPermissionRole.js","views/security/client/dr2am.tasks.permissions-js/src/model/ResponseStateState.js","views/security/client/dr2am.tasks.permissions-js/src/model/PbResponseState.js","views/security/client/dr2am.tasks.permissions-js/src/model/ProtobufAny.js","views/security/client/dr2am.tasks.permissions-js/src/model/ProtobufFieldMask.js","views/security/client/dr2am.tasks.permissions-js/src/model/RuntimeError.js","views/security/client/dr2am.tasks.permissions-js/src/model/ServiceCreatePermissionsRequest.js","views/security/client/dr2am.tasks.permissions-js/src/model/ServiceCreatePermissionsResponse.js","views/security/client/dr2am.tasks.permissions-js/src/model/ServiceDeletePermissionResponse.js","views/security/client/dr2am.tasks.permissions-js/src/model/ServiceListPermissionsResponse.js","views/security/client/dr2am.tasks.permissions-js/src/model/ServiceUpdatePermissionRequest.js","views/security/client/dr2am.tasks.permissions-js/src/model/ServiceUpdatePermissionResponse.js","views/security/client/dr2am.tasks.permissions-js/src/api/PermissionsServiceApi.js","views/security/permissions.tsx","views/security/index.tsx","views/analysis/index.tsx","views/locales/index.tsx","sentry.js","sdk/collection/model/CollectionCollectionBase.js","sdk/collection/model/CollectionCreateCollectionRequest.js","sdk/collection/model/CollectionResponseResponseState.js","sdk/collection/model/CollectionCreateCollectionResponse.js","sdk/collection/model/CollectionDeleteCollectionRequest.js","sdk/collection/model/CollectionDeleteCollectionResponse.js","sdk/collection/model/CollectionResponseCount.js","sdk/collection/model/CollectionListCollectionResponse.js","sdk/collection/model/ListCollectionRequestPaginate.js","sdk/collection/model/ProtobufAny.js","sdk/collection/model/RuntimeError.js","sdk/collection/api/CollectionApi.js","sdk/locales/model/PbPaginate.js","sdk/locales/model/ResponseStateState.js","sdk/locales/model/PbResponseState.js","sdk/locales/model/ProtobufAny.js","sdk/locales/model/ProtobufFieldMask.js","sdk/locales/model/ProtobufNullValue.js","sdk/locales/model/RuntimeError.js","sdk/locales/model/ServiceAddLocaleLanguageRequest.js","sdk/locales/model/ServiceAddLocaleLanguageResponse.js","sdk/locales/model/ServiceAddLocaleNameSpaceRequest.js","sdk/locales/model/ServiceAddLocaleNameSpaceResponse.js","sdk/locales/model/ServiceAddLocaleResponse.js","sdk/locales/model/ServiceListLocaleLanguagesRequest.js","sdk/locales/model/ServiceLocaleLanguage.js","sdk/locales/model/ServiceListLocaleLanguagesResponse.js","sdk/locales/model/ServiceListLocaleNameSpacesRequest.js","sdk/locales/model/ServiceLocaleNameSpace.js","sdk/locales/model/ServiceListLocaleNameSpacesResponse.js","sdk/locales/model/ServiceListLocalesRequest.js","sdk/locales/model/ServiceLocale.js","sdk/locales/model/ServiceListLocalesResponse.js","sdk/locales/model/ServicePublishLocalesRequest.js","sdk/locales/model/ServicePublishLocalesResponse.js","sdk/locales/model/ServiceRemoveLocaleNameSpaceResponse.js","sdk/locales/model/ServiceRemoveLocaleResponse.js","sdk/locales/model/ServiceUpdateLocaleRequest.js","sdk/locales/model/ServiceUpdateLocaleResponse.js","sdk/locales/api/LocalesApi.js","sdk/index.js","index.jsx","views/security/components/table.tsx","views/security/utils.ts","security/authentication/utils.ts","views/security/event_emitter.ts","views/security/client/dr2am.tasks.orders-js/src/model/PbOrder.js","views/security/client/dr2am.tasks.orders-js/src/model/PbPaginate.js","views/security/client/dr2am.tasks.orders-js/src/model/ResponseStateState.js","views/security/client/dr2am.tasks.orders-js/src/model/PbResponseState.js","views/security/client/dr2am.tasks.orders-js/src/model/ProtobufAny.js","views/security/client/dr2am.tasks.orders-js/src/model/ProtobufFieldMask.js","views/security/client/dr2am.tasks.orders-js/src/model/ProtobufNullValue.js","views/security/client/dr2am.tasks.orders-js/src/model/RuntimeError.js","views/security/client/dr2am.tasks.orders-js/src/model/ServiceCreateOrdersRequest.js","views/security/client/dr2am.tasks.orders-js/src/model/ServiceCreateOrdersResponse.js","views/security/client/dr2am.tasks.orders-js/src/model/ServiceDeleteOrdersResponse.js","views/security/client/dr2am.tasks.orders-js/src/model/ServiceGetOrdersWithUserResponse.js","views/security/client/dr2am.tasks.orders-js/src/model/ServiceListOrderssResponse.js","views/security/client/dr2am.tasks.orders-js/src/model/ServiceUpdateOrdersRequest.js","views/security/client/dr2am.tasks.orders-js/src/model/ServiceUpdateOrdersResponse.js","views/security/client/dr2am.tasks.orders-js/src/api/OrdersServiceApi.js","views/security/client/dr2am.tasks.preferences-js/src/model/PbPaginate.js","views/security/client/dr2am.tasks.preferences-js/src/model/PbPreference.js","views/security/client/dr2am.tasks.preferences-js/src/model/ResponseStateState.js","views/security/client/dr2am.tasks.preferences-js/src/model/PbResponseState.js","views/security/client/dr2am.tasks.preferences-js/src/model/ProtobufAny.js","views/security/client/dr2am.tasks.preferences-js/src/model/ProtobufFieldMask.js","views/security/client/dr2am.tasks.preferences-js/src/model/RuntimeError.js","views/security/client/dr2am.tasks.preferences-js/src/model/ServiceCreatePreferenceRequest.js","views/security/client/dr2am.tasks.preferences-js/src/model/ServiceCreatePreferenceResponse.js","views/security/client/dr2am.tasks.preferences-js/src/model/ServiceDeletePreferenceResponse.js","views/security/client/dr2am.tasks.preferences-js/src/model/ServiceGetPreferenceWithUserResponse.js","views/security/client/dr2am.tasks.preferences-js/src/model/ServiceListPreferencesResponse.js","views/security/client/dr2am.tasks.preferences-js/src/model/ServiceUpdatePreferenceRequest.js","views/security/client/dr2am.tasks.preferences-js/src/model/ServiceUpdatePreferenceResponse.js","views/security/client/dr2am.tasks.preferences-js/src/api/PreferencesServiceApi.js","views/security/api.ts","views/security/client/ApiClient.js","views/security/components/portal/portal.tsx","views/security/components/details.tsx","views/knowledge/store.ts","views/knowledge/event_emitter.ts","security/authentication/authentication.ts","security/authentication/sdk/members/ApiClient.js","sdk/ApiClient.js","views/knowledge/index.tsx","views/security/components/form.tsx","views/security/components/input.tsx","sdk/locales/ApiClient.js","views/security/client/dr2am.tasks.roles-js/src/model/PbPaginate.js","views/security/client/dr2am.tasks.roles-js/src/model/ResponseStateState.js","views/security/client/dr2am.tasks.roles-js/src/model/PbResponseState.js","views/security/client/dr2am.tasks.roles-js/src/model/PbRole.js","views/security/client/dr2am.tasks.roles-js/src/model/ProtobufAny.js","views/security/client/dr2am.tasks.roles-js/src/model/ProtobufFieldMask.js","views/security/client/dr2am.tasks.roles-js/src/model/RuntimeError.js","views/security/client/dr2am.tasks.roles-js/src/model/ServiceCreateRoleRequest.js","views/security/client/dr2am.tasks.roles-js/src/model/ServiceCreateRoleResponse.js","views/security/client/dr2am.tasks.roles-js/src/model/ServiceDeleteRoleResponse.js","views/security/client/dr2am.tasks.roles-js/src/model/ServiceGetRolesWithUserResponse.js","views/security/client/dr2am.tasks.roles-js/src/model/ServiceListRolessResponse.js","views/security/client/dr2am.tasks.roles-js/src/model/ServiceUpdateRoleRequest.js","views/security/client/dr2am.tasks.roles-js/src/model/ServiceUpdateRoleResponse.js","views/security/client/dr2am.tasks.roles-js/src/api/RolesServiceApi.js","views/security/condition_expr.ts","views/security/permissions/import.tsx","views/security/roles.tsx"],"names":["ApiClient","this","basePath","replace","authentications","defaultHeaders","timeout","cache","enableCookies","window","agent","superagent","requestAgent","param","undefined","Date","toJSON","toString","path","pathParams","match","url","fullMatch","key","value","hasOwnProperty","paramToString","encodeURIComponent","contentType","Boolean","contentTypes","i","length","isJsonMime","fs","require","err","ReadStream","Buffer","Blob","File","params","newParams","isFileParam","Array","isArray","collectionFormat","map","join","Error","request","authNames","forEach","authName","auth","type","username","password","apiKey","data","apiKeyPrefix","name","set","query","accessToken","response","returnType","status","body","Object","keys","text","convertToType","httpMethod","queryParams","headerParams","formParams","bodyParam","accepts","buildUrl","applyAuthToRequest","toUpperCase","getTime","normalizeParams","jsonPreferredMime","header","send","querystring","stringify","_formParams","attach","field","accept","responseType","attachCookies","withCredentials","Promise","resolve","reject","end","error","deserialize","saveCookies","str","parseInt","parseFloat","String","parseDate","constructFromObject","itemType","item","keyType","valueType","k","result","obj","CollectionFormatEnum","CSV","SSV","TSV","PIPES","MULTI","instance","plugins","registerPlugin","id","plugin","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","AppNotFound","AppContainer","containerDiv","React","createRef","unmountFunc","state","appNotFound","mountApp","unmountApp","prevProps","appId","props","subAppId","a","apps","store","mount","get","setState","appBasePath","element","current","location","history","console","debug","Fragment","style","height","ref","Component","AppRouter","otherProps","render","pathname","startsWith","matchPath","ApplicationService","apps$","Map","mountContext","createStore","createBrowserHistory","basename","context","createContextContainer","register","app","appBox","createHandler","registerRoute","ids","split","parentApp","subApps","Symbol","registerMountContext","registerContext","appUnmountFn","capabilities","getComponent","appMounters","getStore","getHistory","getRoute","parent","appPath","matchId","EventEmitter","callback","callbacks","push","event","children","useState","openModal","setModelOpen","setModalBody","chrome","on","maskWithClick","className","RenderingService","core","application","targetDomElement","appUI","getHeaderComponent","getToastComponent","getModalComponent","_props","ReactDOM","legacyTargetDomElement","ContextContainer","pluginDependencies","coreId","contextProviders","contextNamesBySource","source","contextName","provider","has","handler","args","buildContext","getContextNamesForCore","getContextNamesForPluginId","Set","pluginId","ContextService","SideBarSection","options","display","href","icon","items","onClick","dispatch","idx","findIndex","splice","is","ChromeService","SideBarSections","events","getBreadcrumbs","setBreadcrumbs","newBreadcrumbs","setSubNavs","navs","addNavs","getSideNavs","setGlobalModal","action","open","close","bind","PluginWrapper","discoveredPlugin","opaqueId","initializerContext","initializer","setupContext","createPluginInstance","setup","startContext","start","stop","createPluginSetupContext","coreContext","deps","registerApp","http","getServiceStart","api","i18n","coreStore","createPluginStartContext","omit","PluginsService","satupPlugins","opaqueIds","p","opaqueid","requiredPlugins","pluginManifest","env","createPluginInitializerContext","contracts","entries","pluginName","pluginDepContracts","deps2","reduce","depContracts","dependencyName","reverse","CoreStore","_i18n","storage","localStorage","_","onid","c","r","Math","floor","random","generateId","CoreSystem","rendering","pluginsStart","pluginsSetup","rootDomElement","coreStart","mode","packageInfo","fetch","method","opts","postBody","client","callApi","redirect","post","fatalErrors","coreUiTargetDomElement","document","createElement","classList","add","textContent","ct","use","Backend","LanguageDetector","initReactI18next","init","fallbackLng","interpolation","escapeValue","detection","order","react","bindI18n","bindI18nStore","transEmptyNodeValue","transSupportBasicHtmlNodes","transKeepBasicHtmlNodesFor","useSuspense","saveMissing","backend","loadPath","useTranslation","configure","w","prefix","queryKey","fallback","qs","parse","search","getItem","setItem","remove","removeItem","v","origin","polics","pattran","isString","policy","RegExp","test","Can","allow","group","resource","deny","resources","actions","log","description","yes","no","defaultProps","Configuration","features","process","REACT_APP_FEATURES","filter","hydraEnabled","featureEnabled","oathkeeperEnabled","feature","indexOf","oauth2","clientId","accessTokenUri","authorizationUri","redirectUri","protocol","host","scopes","servicesUrl","REACT_APP_OAUTH2_CLIENT_ID","clientSecret","uj","REACT_APP_OAUTH2_REDIRECT_URL","clear","config","Authentication","AUTHORIZED_USER","AUTHORIZE_STATE","AUTHORIZE_REDIRECT","AUTHORIZE_NONCE","refreshProcess","tokenClient","authorizeClient","storeToken","token","payload","expires_in","expires","JSON","authorizeCode","return_url","nonce","code","getUri","authorizeToken","uniqueId","authorizePw","owner","getToken","authorizationCallback","authorizationCallback2","revoke","user","access_token","createToken","expiresIn","expired","refresh","catch","revokeUri","mergedOptions","ClientOAuth2","req","sign","headers","assign","res","nToken","PbPaginate","offset","limit","nextPageToken","prototype","PbPermissionNode","left","right","typeof","parens","operator","operatorStr","reference","literal","ident","base","int64","float","isint","isfloat","bool","PbPermissionCondition","gid","accessType","expressions","PbPermissionRole","scope","database","roles","conditions","createAt","modifyAt","ResponseStateState","object","PbResponseState","msg","ProtobufAny","typeUrl","ProtobufFieldMask","paths","RuntimeError","message","details","ServiceCreatePermissionsRequest","permission","ServiceCreatePermissionsResponse","ServiceDeletePermissionResponse","ServiceListPermissionsResponse","permissions","total","ServiceUpdatePermissionRequest","updateMask","ServiceUpdatePermissionResponse","PermissionsServiceApi","apiClient","permissionsServiceCreateWithHttpInfo","response_and_data","permissionsServiceDeleteWithHttpInfo","permissionsServiceListWithHttpInfo","permissionsServiceUpdateWithHttpInfo","permissionsStore","prex","permissionsStr","role","includes","dataset","policyPermissions","update","nPermissions","handlePbError","localPermissionsStore","permissionsStoreRemote","authc","apiUrl","wfConfig","apiURL","permissionsServiceCreate","permissionsServiceDelete","permissionsServiceUpdate","pick","update_mask","permissionsServiceList","paginateLimit","file","Plugin","security","title","renderApp","oauth","rolesStore","RolesStore","xmlns","viewBox","width","fillRule","d","SecurityPlugin","getStartServices","home","configPath","action_creaetCollection","other","createCollection","CollectionList","collection","dsn","enabled","transport","sendEvent","level","flush","beforeSend","hit","CollectionCollectionBase","CollectionCreateCollectionRequest","CollectionResponseResponseState","CollectionCreateCollectionResponse","CollectionDeleteCollectionRequest","CollectionDeleteCollectionResponse","CollectionResponseCount","num","CollectionListCollectionResponse","count","ListCollectionRequestPaginate","ServiceAddLocaleLanguageRequest","ServiceAddLocaleLanguageResponse","ServiceAddLocaleNameSpaceRequest","ServiceAddLocaleNameSpaceResponse","ServiceAddLocaleResponse","ServiceListLocaleLanguagesRequest","paginate","ServiceLocaleLanguage","language","ServiceListLocaleLanguagesResponse","ServiceListLocaleNameSpacesRequest","ServiceLocaleNameSpace","ServiceListLocaleNameSpacesResponse","ServiceListLocalesRequest","ServiceLocale","lang","nameSpaces","languages","ServiceListLocalesResponse","ServicePublishLocalesResponse","ServiceRemoveLocaleNameSpaceResponse","ServiceRemoveLocaleResponse","ServiceUpdateLocaleRequest","locale","ServiceUpdateLocaleResponse","LocalesApi","localeLang","localeNameSpaces","localesAddLocaleWithHttpInfo","localesAddLocaleLanguageWithHttpInfo","localesAddLocaleNameSpaceWithHttpInfo","localesListLocaleLanguagesWithHttpInfo","localesListLocalesWithHttpInfo","localesListLocalesNameSpacesWithHttpInfo","localesPublishLocalesWithHttpInfo","localesRemoveLocaleWithHttpInfo","localesRemoveLocaleLanguageWithHttpInfo","localesRemoveLocaleNameSpaceWithHttpInfo","localesUpdateLocaleWithHttpInfo","locales","security_settings","knowledge","analysis","coreSystem","getElementById","URL","bootstrap","TableHeader","styled","thead","TableHeaderColumn","th","TableRow","tr","TableColumn","td","TableBody","tbody","DataTable","table","isEmail","email","ValidationErrors","USERNAME_REQUIRED","INVALID_LENGTH","INVALID_CHARACTERS","INVALID_FIRST_CHARACTER","RESERVED_NAME","INVALID_LAST_CHARACTER","Constants","isValidUsername","charAt","getPasswordConfig","minimumLength","PasswordMinimumLength","requireLowercase","PasswordRequireLowercase","requireUppercase","PasswordRequireUppercase","requireNumber","PasswordRequireNumber","requireSymbol","PasswordRequireSymbol","isValidPassword","passwordConfig","intl","valid","PbOrder","userId","userGid","orderType","orderValue","expireAt","ServiceCreateOrdersRequest","ServiceCreateOrdersResponse","ServiceDeleteOrdersResponse","ServiceGetOrdersWithUserResponse","ServiceListOrderssResponse","orders","ServiceUpdateOrdersRequest","ServiceUpdateOrdersResponse","OrdersServiceApi","ordersServiceCreateWithHttpInfo","ordersServiceDeleteWithHttpInfo","ordersServiceGetWithUserWithHttpInfo","ordersServiceListWithHttpInfo","ordersServiceUpdateWithHttpInfo","PbPreference","category","ServiceCreatePreferenceRequest","preference","ServiceCreatePreferenceResponse","ServiceDeletePreferenceResponse","ServiceGetPreferenceWithUserResponse","ServiceListPreferencesResponse","preferences","ServiceUpdatePreferenceRequest","ServiceUpdatePreferenceResponse","PreferencesServiceApi","preferencesServiceCreateWithHttpInfo","preferencesServiceDeleteWithHttpInfo","preferencesServiceGetWithUserWithHttpInfo","preferencesServiceListWithHttpInfo","preferencesServiceUpdateWithHttpInfo","getHeaders","Headers","Endpoint","defaultPath","getEndpointWithId","endpoint","useOAuth","APIURL","tokenFetch","tt","tokenType","getEndpoint","credentials","json","status_code","createOAuthApp","getOAuthApps","deleteOAuthApp","updateOAuthApp","useUserWithOAuth","hostname","preferencesApi","ordersApi","inviteId","redirectTo","_token","getMe","login_id","setToken","t","userRes","getUserPreference","preferenceRes","fieldMask","reqdata","client_id","preferencesServiceUpdate","preferencesServiceGetWithUser","preferencesServiceList","ordersServiceGetWithUser","ordersServiceCreate","ordersServiceUpdate","ordersServiceDelete","createUser","loginById","login","logout","loginForToken","getUsers","getUserById","deleteUser","updateUser","updateUserRoles","loadMe","updatePreference","listPreference","getUserOrders","CreateUserOrder","updateUserOrder","removeOrder","useConditionExpression","expression","formData","FormData","append","check","useIsomorphicLayoutEffect","useLayoutEffect","useEffect","PRIMER_PORTAL_ROOT_ID","DEFAULT_PORTAL_CONTAINER_NAME","portalRootRegistry","ensureDefaultPortal","existingDefaultPortalContainer","contains","defaultPortalContainer","Element","setAttribute","position","top","suitablePortalRoot","querySelector","appendChild","root","registerPortalRoot","Portal","onMount","_containerName","containerName","hostElement","zIndex","elementRef","useRef","parentElement","removeChild","createPortal","DetailDialog","div","fullscreen","OverlayBackdroCenter","Details","trigger","onClose","onOpen","setIsOpen","docCookies","sKey","decodeURIComponent","cookie","sValue","option","vEnd","sPath","sDomain","bSecure","sExpires","constructor","Number","Infinity","toUTCString","hasItem","aKeys","nIdx","KnowledgeStore","warn","selections","self","newLocal","addAll","removeAll","getAll","AUTHORIZE_SESSION_ID","isAuthorized","uuid","authorizeWithTenant","form","hiddenField","submit","authorizePlugin","recaptcha","authorizePassword","authorizationCallbackImplict","sessionId","removeAuthorizedUser","authorizedUser","e","forceUser","id_token","parts","from","refreshToken","KnowledgePlugin","knowledgeStore","src","searchAPI","Form","schemas","onSubmit","onCancel","onRemove","fn","refs","schema","label","maxLength","disabled","displayText","preventDefault","prev","curr","YearAndMonthInput","forwardRef","helpText","yearRef","monthRef","inputRef","placeholder","spellCheck","autoCapitalize","autoComplete","node","aria-label","onChange","target","KeyValuesInput","defaultValue","thisRef","keyValues","setKeyValues","handleOnChange","KeyValueInput","keyInputRef","valueInputRef","Input","selectedIndex","aria-disabled","selected","renderInput","PbRole","displayName","schemeManaged","builtIn","updateAt","deleteAt","ServiceCreateRoleRequest","ServiceCreateRoleResponse","ServiceDeleteRoleResponse","ServiceGetRolesWithUserResponse","ServiceListRolessResponse","ServiceUpdateRoleRequest","ServiceUpdateRoleResponse","RolesServiceApi","rolesServiceCreateWithHttpInfo","rolesServiceDeleteWithHttpInfo","rolesServiceGetWithUserWithHttpInfo","rolesServiceListWithHttpInfo","rolesServiceUpdateWithHttpInfo","ConditionExpression","expressionsStr","walk","insertRoot","lastPath","last","exprParent","slice","parenPath","emptyExpressionNode","expr","oExpr","typeOf","trim","first","isBoolean","isNaN","isNumber","isReference","isNull","getType","typeOfKey","val","isInteger","formatValue","list","traversal","condition","groups","ImportPermissionsForm","setOpenModal","nTrigger","cloneElement","handleDragOver","evt","handleDropFile","dataTransfer","files","upload","importPermissions","alert","reload","onDragOver","onDrop","_roleStore","rolesServiceList","playload","rolesServiceCreate","rolesServiceDelete","nameOrId","find","CreateRoleForm","handlerPolicySubmit","nData","create","each","Expr","Tree","nodeTypeOf","nodeTypeOfKey","nodeValue","RowLevelSecurity","expression1","leftValue","rightValue","isColumnMode","setColumnMode","IsColmun","IsUserAttribute","$expression","leftMode","rightMode","renderOperator","debounceonChange","debounce","handlerSelectChange","handleModeChange","htmlFor","ExpressionStr","conditionExpressionApi","setStr","RolePermissionForm","currentPermissionRef","cloneDeep","isNew","$permission","setPermission","currentPermission","confirm","updatePermissionToRole","nCurrentPermission","nCondition","handerPermissionChange","addPermissionToRole","deletePermissionToRole","updatePaths","isEqual","addAccessConditions","nConditions","handleConditionAccessTypeChange","updateCondition","handleRemoveCondition","removeCondition","handlerExpressionChange","handlerExpressionOperator","updateValue","insertExpression","insert","insertSubExpression","insertSub","removeExpression","renderExpressions","nodes","fill-rule","rTypeOfKey","renderCondition","parser","renderConditions","renderDatabaseOptions","RoleSelection","maxWidth","RoleDetail","role_name","setRole","setPermissions","handleClonePermission","getAllByRole","kill","fileName","content","link","blob","download","createObjectURL","click","writeFile","moment","format","RoleDatabases","databases","setRoles","roleName","handleRoleClick","aria-level","aria-selected","component","subProps"],"mappings":"gMA8BaA,EAAb,WACI,aAAe,oBAMXC,KAAKC,SAAW,oBAAoBC,QAAQ,OAAQ,IAMpDF,KAAKG,gBAAkB,GAQvBH,KAAKI,eAAiB,GAOtBJ,KAAKK,QAAU,IAQfL,KAAKM,OAAQ,EAObN,KAAKO,eAAgB,EAMC,qBAAXC,SACTR,KAAKS,MAAQ,IAAIC,IAAWD,OAM7BT,KAAKW,aAAe,KAxD7B,iDAiEI,SAAcC,GACV,YAAaC,GAATD,GAA+B,MAATA,EACf,GAEPA,aAAiBE,KACVF,EAAMG,SAGVH,EAAMI,aAzErB,sBAmFI,SAASC,EAAMC,GAAa,IAAD,OAClBD,EAAKE,MAAM,SACZF,EAAO,IAAMA,GAGjB,IAAIG,EAAMpB,KAAKC,SAAWgB,EAY1B,OAXAG,EAAMA,EAAIlB,QAAQ,iBAAiB,SAACmB,EAAWC,GAC3C,IAAIC,EAOJ,OALIA,EADAL,EAAWM,eAAeF,GAClB,EAAKG,cAAcP,EAAWI,IAE9BD,EAGLK,mBAAmBH,QAjGtC,wBAkHI,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,GAAD,2BAAiB74B,GAAWs6B,kB","file":"static/js/main.fbe6f840.chunk.js","sourcesContent":["/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n* @module ApiClient\n* @version version not set\n*/\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @alias module:ApiClient\n* @class\n*/\nexport class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {\n }\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n * \n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({'Authorization': 'Bearer ' + auth.accessToken});\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n \n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if(contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies){\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n }\n else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined'){\n this.agent.saveCookies(response);\n }\n\n resolve({data, response});\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n \n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n* The default API client implementation.\n* @type {module:ApiClient}\n*/\nApiClient.instance = new ApiClient();\n","/**\n * types/services/members.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n * \n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n *\n */\n\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n* @module ApiClient\n* @version version not set\n*/\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @alias module:ApiClient\n* @class\n*/\nexport default class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {\n }\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n *
    \n *
  • application/json
  • \n *
  • application/json; charset=UTF8
  • \n *
  • APPLICATION/JSON
  • \n *
\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({'Authorization': 'Bearer ' + auth.accessToken});\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n \n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if(contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies){\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n }\n else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined'){\n this.agent.saveCookies(response);\n }\n\n resolve({data, response});\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n \n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n* The default API client implementation.\n* @type {module:ApiClient}\n*/\nApiClient.instance = new ApiClient();\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n* @module ApiClient\n* @version version not set\n*/\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @alias module:ApiClient\n* @class\n*/\nexport class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {\n }\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n *
    \n *
  • application/json
  • \n *
  • application/json; charset=UTF8
  • \n *
  • APPLICATION/JSON
  • \n *
\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({'Authorization': 'Bearer ' + auth.accessToken});\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n \n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if(contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies){\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n }\n else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined'){\n this.agent.saveCookies(response);\n }\n\n resolve({data, response});\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n \n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n* The default API client implementation.\n* @type {module:ApiClient}\n*/\nApiClient.instance = new ApiClient();\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n* @module ApiClient\n* @version version not set\n*/\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @alias module:ApiClient\n* @class\n*/\nexport class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {\n }\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n *
    \n *
  • application/json
  • \n *
  • application/json; charset=UTF8
  • \n *
  • APPLICATION/JSON
  • \n *
\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({'Authorization': 'Bearer ' + auth.accessToken});\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n \n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if(contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies){\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n }\n else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined'){\n this.agent.saveCookies(response);\n }\n\n resolve({data, response});\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n \n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n* The default API client implementation.\n* @type {module:ApiClient}\n*/\nApiClient.instance = new ApiClient();\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n* @module ApiClient\n* @version version not set\n*/\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @alias module:ApiClient\n* @class\n*/\nexport class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {\n }\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n *
    \n *
  • application/json
  • \n *
  • application/json; charset=UTF8
  • \n *
  • APPLICATION/JSON
  • \n *
\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({'Authorization': 'Bearer ' + auth.accessToken});\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n \n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if(contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies){\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n }\n else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined'){\n this.agent.saveCookies(response);\n }\n\n resolve({data, response});\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n \n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n* The default API client implementation.\n* @type {module:ApiClient}\n*/\nApiClient.instance = new ApiClient();\n","// plugins records all active web app plugins by id.\nwindow.plugins = window.plugins || {};\n\n// registerPlugin, on the global window object, should be invoked by a plugin's web app bundle as\n// it is loaded.\n//\n// During the beta, plugins manipulated the global window.plugins data structure directly. This\n// remains possible, but is officially deprecated and may be removed in a future release.\nfunction registerPlugin(id, plugin) {\n window.plugins[id] = plugin;\n}\n\nwindow.registerPlugin = window.registerPlugin || registerPlugin;","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n* @module ApiClient\n* @version version not set\n*/\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @alias module:ApiClient\n* @class\n*/\nexport class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {\n }\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n *
    \n *
  • application/json
  • \n *
  • application/json; charset=UTF8
  • \n *
  • APPLICATION/JSON
  • \n *
\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({'Authorization': 'Bearer ' + auth.accessToken});\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n \n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if(contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies){\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n }\n else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined'){\n this.agent.saveCookies(response);\n }\n\n resolve({data, response});\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n \n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n* The default API client implementation.\n* @type {module:ApiClient}\n*/\nApiClient.instance = new ApiClient();\n","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from \"react\";\n\n\nexport const AppNotFound = () => (\n NotFounde\n)","import React from \"react\";\nimport { matchPath, RouteComponentProps } from \"react-router-dom\";\nimport { AppMounter, AppUnmount } from '../types';\nimport { AppNotFound } from \"./app_not_found\";\n\ninterface Props extends RouteComponentProps<{ appId: string, subAppId: string }> {\n apps: ReadonlyMap;\n // legacyApps: ReadonlyMap;\n // currentAppId$: Subject;\n location: any;\n\n basePath?: string;\n // location?: any;\n history: any;\n store: any;\n matchId?: string;\n auth?: any;\n match: any;\n}\n\ninterface State {\n appNotFound: boolean;\n}\nexport class AppContainer extends React.Component {\n private readonly containerDiv = React.createRef();\n private unmountFunc?: AppUnmount;\n\n state: State = { appNotFound: false };\n\n componentDidMount() {\n this.mountApp();\n }\n\n componentWillUnmount() {\n this.unmountApp();\n }\n\n componentDidUpdate(prevProps: Props) {\n if (prevProps.match.params.appId !== this.props.match.params.appId) {\n this.unmountApp();\n this.mountApp();\n }\n if (\n prevProps.match.params.subAppId !== this.props.match.params.subAppId) {\n this.unmountApp();\n this.mountApp();\n }\n }\n\n\n async mountApp() {\n\n const { apps, match, basePath, store, auth } = this.props;\n const { appId, subAppId } = match.params;\n let mount = apps.get(appId);\n if (!mount) {\n mount = apps.get(subAppId);\n if (!mount) {\n this.setState({ appNotFound: true });\n return\n }\n }\n this.unmountFunc = await mount({\n // appBasePath: basePath.prepend(`/app/${appId}`),\n appBasePath: `${match.url}`,\n element: this.containerDiv.current!,\n location: this.props.location,\n history: this.props.history,\n match: match,\n store: store,\n auth: auth,\n });\n // currentAppId$.next(appId);\n this.setState({ appNotFound: false });\n return;\n\n }\n\n async unmountApp() {\n if (this.unmountFunc) {\n this.unmountFunc();\n console.debug(\"unmountApp\")\n this.unmountFunc = undefined;\n }\n }\n\n render() {\n // if(\n // this.props.location.pathname !== \"/app/login\" &&\n // (!this.props.store.getState().auth || \n // !this.props.store.getState().auth.name ||\n // this.props.store.getState().auth.name !== \"\")) {\n // console.log(\"needlogin\",this.props)\n // // this.props.history.push(\"/app/login\")\n // window.location.href = \"/app/login\"\n\n // }\n const subAppId = this.props.match.params.subAppId || \"root\"\n const id = `${this.props.match.params.appId}-${subAppId}`\n return (\n \n {this.state.appNotFound && }\n
\n {/*
*/}\n
\n
\n );\n }\n}","import { History } from 'history';\nimport { Router, Route, matchPath } from \"react-router-dom\";\nimport React from \"react\";\nimport { AppContainer } from './app_container';\nimport { AppMounter } from '../types';\n\n\ninterface Props {\n apps: ReadonlyMap;\n // basePath: HttpStart['basePath'];\n // currentAppId$: Subject;\n history: History;\n store: any;\n /**\n * Only necessary for redirecting to legacy apps\n * @deprecated\n */\n redirectTo?: (path: string) => void;\n\n path?: string;\n matchId?: string;\n auth?: any;\n}\n\nexport const AppRouter: React.FunctionComponent = ({\n history,\n path,\n ...otherProps\n}) => {\n if (path && path != \"\") {\n // path = `/app/${path}/:appId`\n path = path\n } else {\n path = `/:app?/:appId?`\n }\n return (\n <>\n\n \n {\n if (!props.location.pathname.startsWith(\"/app\")) {\n props.location.pathname = \"/app\" + props.location.pathname\n props.match = matchPath(props.location.pathname, { path }) || props.match\n }\n return \n }}\n />\n \n \n )\n};","import {\n InternalApplicationSetup,\n InternalApplicationStart,\n AppMounter,\n AppMountParameters,\n AppUnmount,\n App,\n} from \"./types\";\nimport React from \"react\";\nimport { AppRouter } from \"./public\";\nimport { createBrowserHistory } from 'history';\nimport { IContextContainer } from \"../../utils/context\";\nimport { Store, AnyAction, createStore } from \"redux\";\n// import configureStore from \"../../../store/configure_store\";\nimport { ContextSetup } from \"../context/context\";\nimport { fromPairs } from \"lodash\";\n// import Authentication from \"../../../services/auth/configuration\";\n// import { setAuthUser } from \"../../../actions/auth\";\n\n\n\ninterface SetupDeps {\n context: ContextSetup;\n}\n\ninterface AppBox {\n app: App;\n mount: AppMounter;\n}\n\n\n/**\n * Service that is responsible for registering new applications.\n * @internal\n */\nexport class ApplicationService {\n private readonly apps$ = new Map(new Map());\n private mountContext?: IContextContainer;\n private store: Store;\n public history!: any;\n constructor(store?: Store) {\n\n if (!store) {\n this.store = createStore(() => { })\n } else {\n this.store = store\n }\n this.history = createBrowserHistory({ basename: \"/\" });\n }\n public setup({ context }: SetupDeps): InternalApplicationSetup {\n this.mountContext = context.createContextContainer();\n return {\n register: (plugin: symbol, app: App) => {\n\n const appBox: AppBox = {\n app,\n mount: this.mountContext!.createHandler(plugin, app.mount),\n };\n this.apps$.set(app.id, appBox)\n },\n registerRoute: (id: string, app: App) => {\n\n const ids = id.split(\":\")\n if (ids.length > 1) {\n id = ids[0]\n app.id = ids[1]\n }\n const parentApp = this.apps$.get(id)\n if (!parentApp) {\n return\n }\n if (!parentApp.app.subApps) {\n parentApp.app.subApps = new Map(new Map())\n }\n const appBox: AppBox = {\n app,\n mount: this.mountContext!.createHandler(Symbol(app.id), app.mount),\n };\n parentApp.app.subApps.set(app.id, appBox)\n\n\n },\n registerMountContext: this.mountContext!.registerContext,\n }\n }\n\n // public async start():Promise {\n public async start(): Promise {\n const history = this.history;\n const appUnmountFn: AppUnmount = () => {\n }\n const appMounter = (\n params: AppMountParameters\n ): Promise => { return Promise.resolve(appUnmountFn) }\n return {\n capabilities: \"\",\n registerMountContext: \"context\",\n getComponent: () => {\n const appMounters = new Map();\n this.apps$.forEach((value, key) => {\n appMounters.set(value.app.id, value.mount)\n })\n return (\n \n )\n },\n getStore: () => {\n return this.store;\n },\n getHistory: () => {\n return this.history;\n },\n getRoute: (id: string) => {\n debugger\n const parent = this.apps$.get(id)\n if (!parent) {\n return\n }\n\n const appMounters = new Map();\n if (!parent.app.subApps) {\n return\n }\n parent.app.subApps.forEach((value, key) => {\n if (value.app.appPath && value.app.appPath !== \"\") {\n appMounters.set(value.app.appPath, value.mount)\n\n }\n appMounters.set(value.app.id, value.mount)\n })\n\n return (\n \n )\n // return app.app.router\n },\n // getAuth: async () => {\n // // Configuration\n // return this.currentUser\n // }\n }\n }\n\n public stop() { }\n}","import { ReactElement } from \"react\";\nimport { SideBarSection } from \"./sidebar/section\";\n\nexport class EventEmitter {\n [x: string]: any;\n constructor() {\n }\n on(name: string | number, callback: any) {\n var callbacks = this[name];\n if (!callbacks) {\n this[name] = [callback];\n }\n else {\n callbacks.push(callback);\n }\n }\n\n dispatch(name: string | number, event: any) {\n var callbacks = this[name];\n if (callbacks)\n callbacks.forEach((callback: any) => callback(event));\n }\n}\n","import React, { useState, useEffect } from 'react'\nimport { withTranslation } from \"react-i18next\";\nimport Sidebar from './sidebar';\n// import '@elastic/eui/dist/eui_theme_light.css';\n// import \"./style/actionlist/index.scss\";\n\n// import \"@primer/css/actionlist/index.scss\";\n// import \"@primer/css/layout/index.scss\";\n// import \"@primer/css/base/index.scss\";\n// import \"@primer/css/utilities/index.scss\";\n// import \"@primer/css/navigation/index.scss\";\n// import { EuiOverlayMask } from '@elastic/eui';\nimport { EventEmitter } from './EventEmitter';\n\n\n\nexport class GlobalModal extends EventEmitter {\n\n}\nexport default ({ children, ...props }: any) => {\n const [openModal, setModelOpen] = useState(false)\n const [modalBody, setModalBody] = useState()\n const { chrome } = props;\n chrome.on(\"global.modal.open\", (body: any) => {\n setModalBody(body)\n setModelOpen(true)\n })\n chrome.on(\"global.modal.close\", () => {\n setModalBody(undefined)\n setModelOpen(false)\n })\n const maskWithClick = (\n <>\n {/* \n \n
\n
chrome.dispatch(\"global.modal.close\")}>\n \n \n \n\n \n 返回\n \n
\n
\n {modalBody}\n
*/}\n \n );\n\n\n return
\n {/* */}\n
\n {children}\n
\n {openModal ? maskWithClick : undefined}\n
\n}\n","import React, { Fragment, useState } from 'react';\nimport ReactDOM from 'react-dom';\nimport { InternalApplicationSetup, InternalApplicationStart } from '../application';\nimport { InternalChromeStart } from '../chrome';\nimport { Provider } from 'react-redux';\nimport \"./default.css\";\nimport { InternalCoreSetup } from '../core_system';\nimport Layout from '../../../components/layout';\n// import { ApiSetp } from '../api';\n\n\ninterface StartDeps {\n application: InternalApplicationStart;\n chrome: InternalChromeStart;\n // injectedMetadata: InjectedMetadataStart;\n // overlays: OverlayStart;\n targetDomElement: HTMLDivElement;\n api?: any;\n}\n\ninterface SetupDeps {\n application: InternalApplicationSetup;\n api?: any;\n plugins?: any;\n}\n\n// export const RenderingStart = null;\n/**\n * Renders all Core UI in a single React tree.\n *\n * @internalRemarks Currently this only renders Chrome UI. Notifications and\n * Overlays UI should be moved here as well.\n *\n * @returns a DOM element for the legacy platform to render into.\n *\n * @internal\n */\nexport class RenderingService {\n // private security?: AuthenticationServiceSetup\n // private api?: ApiSetp\n setup(core: SetupDeps) {\n // console.log(core.plugins[\"security\"])\n // this.security = core.plugins.contracts.get(\"security\")\n // this.api = core.api\n\n }\n start({\n application,\n chrome,\n targetDomElement,\n ...props\n }: StartDeps): RenderingStart {\n const appUI = application.getComponent();\n const chromeUI = chrome.getHeaderComponent();\n const msgUI = chrome.getToastComponent();\n const modalUI = chrome.getModalComponent();\n const store = application.getStore();\n const history = application.getHistory();\n\n\n const _props = {\n history: history,\n ...props\n }\n ReactDOM.render(\n \n \n {appUI}\n \n ,\n targetDomElement)\n\n return {\n\n // When in legacy mode, return legacy div, otherwise undefined.\n legacyTargetDomElement: undefined,\n };\n }\n\n};\n\n\n\n\nexport interface RenderingStart {\n legacyTargetDomElement?: HTMLDivElement;\n}\n\nexport const RenderingStart2: RenderingStart = {\n legacyTargetDomElement: undefined\n}","import { flatten,pick } from 'lodash';\nimport { PluginOpaqueId } from '../types/plugins';\n\n\n\nexport type CoreId = symbol;\nexport type ShallowPromise = Promise;\n/**\n * Extracts the type of the first argument of a {@link HandlerFunction} to represent the type of the context.\n *\n * @public\n */\nexport type HandlerContextType> = T extends HandlerFunction\n ? U\n : never;\n\n\n/**\n * A function that accepts a context object and an optional number of additional arguments. Used for the generic types\n * in {@link IContextContainer}\n *\n * @public\n */\nexport type HandlerFunction = (context: T, ...args: any[]) => any;\n\n\n/**\n * Extracts the types of the additional arguments of a {@link HandlerFunction}, excluding the\n * {@link HandlerContextType}.\n *\n * @public\n */\nexport type HandlerParameters> = T extends (\n context: any,\n ...args: infer U\n ) => any\n ? U\n : never;\n \n\n/**\n * A function that returns a context value for a specific key of given context type.\n *\n * @remarks\n * This function will be called each time a new context is built for a handler invocation.\n *\n * @param context - A partial context object containing only the keys for values provided by plugin dependencies\n * @param rest - Additional parameters provided by the service owner of this context\n * @returns The context value associated with this key. May also return a Promise which will be resolved before\n * attaching to the context object.\n *\n * @public\n */\nexport type IContextProvider<\n THandler extends HandlerFunction,\n TContextName extends keyof HandlerContextType\n> = (\n context: Partial>,\n ...rest: HandlerParameters\n) =>\n | Promise[TContextName]>\n | HandlerContextType[TContextName];\n\n\n /**\n * An object that handles registration of context providers and configuring handlers with context.\n *\n * @remarks\n * A {@link IContextContainer} can be used by any Core service or plugin (known as the \"service owner\") which wishes to\n * expose APIs in a handler function. The container object will manage registering context providers and configuring a\n * handler with all of the contexts that should be exposed to the handler's plugin. This is dependent on the\n * dependencies that the handler's plugin declares.\n *\n * Contexts providers are executed in the order they were registered. Each provider gets access to context values\n * provided by any plugins that it depends on.\n *\n * In order to configure a handler with context, you must call the {@link IContextContainer.createHandler} function and\n * use the returned handler which will automatically build a context object when called.\n *\n * When registering context or creating handlers, the _calling plugin's opaque id_ must be provided. This id is passed\n * in via the plugin's initializer and can be accessed from the {@link PluginInitializerContext.opaqueId} Note this\n * should NOT be the context service owner's id, but the plugin that is actually registering the context or handler.\n *\n * ```ts\n * // Correct\n * class MyPlugin {\n * private readonly handlers = new Map();\n *\n * setup(core) {\n * this.contextContainer = core.context.createContextContainer();\n * return {\n * registerContext(pluginOpaqueId, contextName, provider) {\n * this.contextContainer.registerContext(pluginOpaqueId, contextName, provider);\n * },\n * registerRoute(pluginOpaqueId, path, handler) {\n * this.handlers.set(\n * path,\n * this.contextContainer.createHandler(pluginOpaqueId, handler)\n * );\n * }\n * }\n * }\n * }\n *\n * // Incorrect\n * class MyPlugin {\n * private readonly handlers = new Map();\n *\n * constructor(private readonly initContext: PluginInitializerContext) {}\n *\n * setup(core) {\n * this.contextContainer = core.context.createContextContainer();\n * return {\n * registerContext(contextName, provider) {\n * // BUG!\n * // This would leak this context to all handlers rather that only plugins that depend on the calling plugin.\n * this.contextContainer.registerContext(this.initContext.opaqueId, contextName, provider);\n * },\n * registerRoute(path, handler) {\n * this.handlers.set(\n * path,\n * // BUG!\n * // This handler will not receive any contexts provided by other dependencies of the calling plugin.\n * this.contextContainer.createHandler(this.initContext.opaqueId, handler)\n * );\n * }\n * }\n * }\n * }\n * ```\n *\n * @typeParam THandler - the type of {@link HandlerFunction} this container should manage. The first argument of this\n * function will be used as the context type.\n *\n * @public\n */\nexport interface IContextContainer> {\n /**\n * Register a new context provider.\n *\n * @remarks\n * The value (or resolved Promise value) returned by the `provider` function will be attached to the context object\n * on the key specified by `contextName`.\n *\n * Throws an exception if more than one provider is registered for the same `contextName`.\n *\n * @param pluginOpaqueId - The plugin opaque ID for the plugin that registers this context.\n * @param contextName - The key of the `TContext` object this provider supplies the value for.\n * @param provider - A {@link IContextProvider} to be called each time a new context is created.\n * @returns The {@link IContextContainer} for method chaining.\n */\n registerContext>(\n pluginOpaqueId: PluginOpaqueId,\n contextName: TContextName,\n provider: IContextProvider\n ): this;\n \n /**\n * Create a new handler function pre-wired to context for the plugin.\n *\n * @param pluginOpaqueId - The plugin opaque ID for the plugin that registers this handler.\n * @param handler - Handler function to pass context object to.\n * @returns A function that takes `THandlerParameters`, calls `handler` with a new context, and returns a Promise of\n * the `handler` return value.\n */\n createHandler(\n pluginOpaqueId: PluginOpaqueId,\n handler: THandler\n ): (...rest: HandlerParameters) => ShallowPromise>;\n }\n\n\n\n /** @internal */\nexport class ContextContainer>\nimplements IContextContainer {\n/**\n * Used to map contexts to their providers and associated plugin. In registration order which is tightly coupled to\n * plugin load order.\n */\nprivate readonly contextProviders = new Map<\n keyof HandlerContextType,\n {\n provider: IContextProvider>;\n source: symbol;\n }\n>();\n/** Used to keep track of which plugins registered which contexts for dependency resolution. */\nprivate readonly contextNamesBySource: Map>>;\n\n/**\n * @param pluginDependencies - A map of plugins to an array of their dependencies.\n */\nconstructor(\n private readonly pluginDependencies: ReadonlyMap,\n private readonly coreId: CoreId\n) {\n this.contextNamesBySource = new Map>>([\n [coreId, []],\n ]);\n}\n\npublic registerContext = >(\n source: symbol,\n contextName: TContextName,\n provider: IContextProvider\n): this => {\n if (this.contextProviders.has(contextName)) {\n throw new Error(`Context provider for ${contextName} has already been registered.`);\n }\n if (source !== this.coreId && !this.pluginDependencies.has(source)) {\n throw new Error(`Cannot register context for unknown plugin: ${source.toString()}`);\n }\n\n this.contextProviders.set(contextName, { provider, source });\n this.contextNamesBySource.set(source, [\n ...(this.contextNamesBySource.get(source) || []),\n contextName,\n ]);\n\n return this;\n};\n\npublic createHandler = (source: symbol, handler: THandler) => {\n // if (source !== this.coreId && !this.pluginDependencies.has(source)) {\n // throw new Error(`Cannot create handler for unknown plugin: ${source.toString()}`);\n // }\n\n return (async (...args: HandlerParameters) => {\n const context = await this.buildContext(source, ...args);\n return handler(context, ...args);\n }) as (...args: HandlerParameters) => ShallowPromise>;\n};\n\nprivate async buildContext(\n source: symbol,\n ...contextArgs: HandlerParameters\n): Promise> {\n // const contextsToBuild: ReadonlySet> = new Set(\n // this.getContextNamesForSource(source)\n // );\n\n return Promise.resolve({}) as Promise>\n\n // return [...this.contextProviders]\n // .sort(sortByCoreFirst(this.coreId))\n // .filter(([contextName]) => contextsToBuild.has(contextName))\n // .reduce(\n // async (contextPromise, [contextName, { provider, source: providerSource }]) => {\n // const resolvedContext = await contextPromise;\n\n // // For the next provider, only expose the context available based on the dependencies of the plugin that\n // // registered that provider.\n // const exposedContext = pick(resolvedContext, [\n // ...this.getContextNamesForSource(providerSource),\n // ]) as Partial>;\n\n // return {\n // ...resolvedContext,\n // [contextName]: await provider(exposedContext, ...contextArgs),\n // };\n // },\n // Promise.resolve({}) as Promise>\n // );\n}\n\nprivate getContextNamesForSource(\n source: symbol\n): ReadonlySet> {\n if (source === this.coreId) {\n return this.getContextNamesForCore();\n } else {\n return this.getContextNamesForPluginId(source);\n }\n}\n\nprivate getContextNamesForCore() {\n return new Set(this.contextNamesBySource.get(this.coreId)!);\n}\n\nprivate getContextNamesForPluginId(pluginId: symbol) {\n // If the source is a plugin...\n const pluginDeps = this.pluginDependencies.get(pluginId);\n if (!pluginDeps) {\n // This case should never be hit, but let's be safe.\n throw new Error(`Cannot create context for unknown plugin: ${pluginId.toString()}`);\n }\n\n return new Set([\n // Core contexts\n ...this.contextNamesBySource.get(this.coreId)!,\n // Contexts source created\n ...(this.contextNamesBySource.get(pluginId) || []),\n // Contexts sources's dependencies created\n // ...flatten(pluginDeps.map(p => this.contextNamesBySource.get(p) || [])),\n ]);\n}\n}","import { IContextContainer, HandlerFunction, ContextContainer } from '../../utils/context'\nimport { CoreContext } from '../core_system';\nimport { PluginOpaqueId } from '../../types/plugins';\n\n\ninterface StartDeps {\n pluginDependencies?: ReadonlyMap;\n}\n\n\n/** @internal */\nexport class ContextService {\n constructor(private readonly core: CoreContext) { }\n\n public setup({ pluginDependencies }: StartDeps): ContextSetup {\n return {\n createContextContainer: >() => \n new ContextContainer(pluginDependencies!, this.core.coreId),\n \n };\n }\n}\n\n\n\n\n/**\n * {@inheritdoc IContextContainer}\n *\n * @example\n * Say we're creating a plugin for rendering visualizations that allows new rendering methods to be registered. If we\n * want to offer context to these rendering methods, we can leverage the ContextService to manage these contexts.\n * ```ts\n * export interface VizRenderContext {\n * core: {\n * i18n: I18nStart;\n * uiSettings: IUiSettingsClient;\n * }\n * [contextName: string]: unknown;\n * }\n *\n * export type VizRenderer = (context: VizRenderContext, domElement: HTMLElement) => () => void;\n * // When a renderer is bound via `contextContainer.createHandler` this is the type that will be returned.\n * type BoundVizRenderer = (domElement: HTMLElement) => () => void;\n *\n * class VizRenderingPlugin {\n * private readonly contextContainer?: IContextContainer;\n * private readonly vizRenderers = new Map();\n *\n * constructor(private readonly initContext: PluginInitializerContext) {}\n *\n * setup(core) {\n * this.contextContainer = core.context.createContextContainer();\n *\n * return {\n * registerContext: this.contextContainer.registerContext,\n * registerVizRenderer: (plugin: PluginOpaqueId, renderMethod: string, renderer: VizTypeRenderer) =>\n * this.vizRenderers.set(renderMethod, this.contextContainer.createHandler(plugin, renderer)),\n * };\n * }\n *\n * start(core) {\n * // Register the core context available to all renderers. Use the VizRendererContext's opaqueId as the first arg.\n * this.contextContainer.registerContext(this.initContext.opaqueId, 'core', () => ({\n * i18n: core.i18n,\n * uiSettings: core.uiSettings\n * }));\n *\n * return {\n * registerContext: this.contextContainer.registerContext,\n *\n * renderVizualization: (renderMethod: string, domElement: HTMLElement) => {\n * if (!this.vizRenderer.has(renderMethod)) {\n * throw new Error(`Render method '${renderMethod}' has not been registered`);\n * }\n *\n * // The handler can now be called directly with only an `HTMLElement` and will automatically\n * // have a new `context` object created and populated by the context container.\n * const handler = this.vizRenderers.get(renderMethod)\n * return handler(domElement);\n * }\n * };\n * }\n * }\n * ```\n *\n * @public\n */\nexport interface ContextSetup {\n /**\n * Creates a new {@link IContextContainer} for a service owner.\n */\n createContextContainer>(): IContextContainer;\n }","import { ReactElement } from \"react\";\nimport { EventEmitter } from \"../EventEmitter\";\n\nexport interface ConsoleSectionParams {\n id?: string;\n display: string | ReactElement | undefined;\n href?: string;\n icon?: any;\n items?: SideBarSection[];\n onClick?: any;\n\n}\n\n// @internal\nexport class SideBarSection extends EventEmitter {\n public id!: string\n public display?: any\n public href?: string\n public icon?: any\n public items?: SideBarSection[]\n public onClick?: any\n\n constructor(id: string, options?: ConsoleSectionParams) {\n super()\n\n this.id = id;\n this.items = []\n if (options) {\n this.href = options.href;\n this.display = options.display || id;\n this.id = id;\n this.items = options.items || [];\n this.icon = options.icon;\n this.onClick = options.onClick\n\n\n }\n }\n\n /**\n * 注册一个子section\n *\n * @param {string} id\n * @param {object} options\n * @returns {ConsoleSection}\n */\n\n register(id: string, options?: ConsoleSectionParams) {\n const item = new SideBarSection(id, options)\n this.items && this.items.push(item)\n this.dispatch(\"update\", this)\n }\n\n\n\n /**\n * 注销一个section\n *\n * @param {string} id\n */\n deregister(id: string) {\n if (!this.items) {\n return\n }\n\n const idx = this.items.findIndex(item => item.id === id)\n if (idx > -1) {\n this.items && (this.items.splice(idx, 1) || this.dispatch(\"update\", this))\n }\n }\n\n close() {\n this.dispatch(\"onclose\", this)\n }\n\n open() {\n this.dispatch(\"onopen\", this)\n }\n\n dock(is?: boolean) {\n this.dispatch(\"ondock\", is)\n }\n\n headerClose() {\n this.dispatch(\"onHeaderClose\", this)\n }\n headerOpen() {\n this.dispatch(\"onHeaderOpen\", this)\n }\n getSection(id?: string): SideBarSection {\n return this\n }\n\n}\n\n\n","import { ReactElement } from \"react\";\n\nexport class EventEmitter {\n [x: string]: any;\n constructor() {\n }\n on(name: string | number, callback: any) {\n var callbacks = this[name];\n if (!callbacks) {\n this[name] = [callback];\n }\n else {\n callbacks.push(callback);\n }\n }\n\n dispatch(name: string | number, event: any) {\n var callbacks = this[name];\n if (callbacks) {\n callbacks.forEach((callback: any) => callback(event));\n }\n }\n}\n","import React, { Fragment } from \"react\"\nimport { Header } from \"./components/header\"\n\nimport {\n EuiBreadcrumb,\n} from '@elastic/eui';\nimport { Dispatch, Store } from \"redux\";\n// import { pushToBreadcrumbs } from \"../../../actions/breadcrumbs\";\nimport { Provider } from \"react-redux\";\nimport { SideBarSection } from \"../../../components/sidebar/section\";\nimport { EventEmitter } from \"./EventEmitter\";\n// import { setSubNavs } from \"../../../actions/navs\";\n// import MSG from \"../../../components/toast\";\n// import GlobalModal, { addGlobalModal, removeGlobalModal } from \"../../../components/global_modal\";\n/** @public */\nexport type ChromeBreadcrumb = EuiBreadcrumb;\n\n/**\n * ChromeStart allows plugins to customize the global chrome header UI and\n * enrich the UX with additional information about the current location of the\n * browser.\n *\n * @remarks\n * While ChromeStart exposes many APIs, they should be used sparingly and the\n * developer should understand how they affect other plugins and applications.\n *\n * @example\n * How to add a recently accessed item to the sidebar:\n * ```ts\n * core.chrome.recentlyAccessed.add('/app/map/1234', 'Map 1234', '1234');\n * ```\n *\n * @example\n * How to set the help dropdown extension:\n * ```tsx\n * core.chrome.setHelpExtension(elem => {\n * ReactDOM.render(, elem);\n * return () => ReactDOM.unmountComponentAtNode(elem);\n * });\n * ```\n *\n * @public\n */\nexport interface ChromeStart {\n /**\n * Get an observable of the current list of breadcrumbs\n */\n getBreadcrumbs(): ChromeBreadcrumb[];\n\n /**\n * Override the current set of breadcrumbs\n */\n setBreadcrumbs(newBreadcrumbs: ChromeBreadcrumb[]): void;\n\n setSubNavs(navs: any): void;\n addNavs(id: string, options: any): void;\n getSideNavs(): SideBarSection;\n\n setGlobalModal(modal: any): any;\n // events(): EventEmitter;\n on(name: string | number, callback: any): void;\n dispatch(name: string | number, event: any): void;\n\n}\n\n/** @internal */\nexport interface InternalChromeStart extends ChromeStart {\n /**\n * Used only by MountingService to render the header UI\n * @internal\n */\n getHeaderComponent(): JSX.Element;\n getToastComponent(): JSX.Element;\n getModalComponent(): JSX.Element;\n}\n\n\n\n/** @internal */\nexport class ChromeService {\n // private readonly dispatch:Dispatch;\n // private readonly store:Store;\n private readonly SideBarSections: SideBarSection;\n constructor() {\n this.SideBarSections = new SideBarSection(\"root\")\n }\n public async start({\n dispatch,\n store,\n history,\n }: { dispatch: Dispatch, store: Store, history: any }): Promise {\n const events = new EventEmitter()\n return {\n getBreadcrumbs: () => {\n return [{\n text: (Home)\n } as ChromeBreadcrumb]\n },\n setBreadcrumbs: (newBreadcrumbs) => {\n // pushToBreadcrumbs(newBreadcrumbs)(dispatch)\n },\n setSubNavs: (navs: any) => {\n // setSubNavs(navs)(dispatch)\n },\n addNavs: (id: string, options: any) => {\n this.SideBarSections.register(id, options)\n return\n },\n getSideNavs: () => {\n return this.SideBarSections\n },\n\n getHeaderComponent: () => {\n return (\n \n \n {/*
*/}\n\n\n \n \n )\n },\n getToastComponent: () => {\n return (\n \n \n {/* */}\n\n\n \n \n )\n },\n getModalComponent: () => {\n return (\n \n \n {/* */}\n \n \n )\n },\n setGlobalModal: (body: any): any => {\n const action = {\n open: () => { },\n close: () => {\n // removeGlobalModal() \n },\n }\n if (body.props && !body.props.close) {\n body.props.close = action.close\n }\n // addGlobalModal(body)\n\n return action\n },\n // on: (name: string | number, callback: any) => events.on,\n // dispatch: (name: string | number, event: any) => { },\n on: events.on.bind(events),\n dispatch: events.dispatch.bind(events),\n\n }\n }\n public stop() {\n }\n}","import { DiscoveredPlugin, PluginOpaqueId } from \"../../types/plugins\";\nimport { PluginInitializerContext } from \"./plugins_context\";\nimport { CoreSetup, CoreStart } from \"..\";\n\n\n\n/**\n * The interface that should be returned by a `PluginInitializer`.\n *\n * @public\n */\nexport interface Plugin<\n TSetup = void,\n TStart = void,\n TPluginsSetup extends object = object,\n TPluginsStart extends object = object\n > {\n setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise;\n start(core: CoreStart, plugins: TPluginsStart): TStart | Promise;\n stop?(): void;\n}\n\n/**\n * The `plugin` export at the root of a plugin's `public` directory should conform\n * to this interface.\n *\n * @public\n */\nexport type PluginInitializer<\n TSetup,\n TStart,\n TPluginsSetup extends object = object,\n TPluginsStart extends object = object\n > = (core: PluginInitializerContext) => Plugin;\n\n\n/**\n * The `plugin` export at the root of a plugin's `public` directory should conform\n * to this interface.\n *\n * @public\n */\n// export type PluginInitializer<\n// TSetup,\n// TStart,\n// TPluginsSetup extends object = object,\n// TPluginsStart extends object = object\n// > = (core: PluginInitializerContext) => Plugin;\n\n\n/**\n * Lightweight wrapper around discovered plugin that is responsible for instantiating\n * plugin and dispatching proper context and dependencies into plugin's lifecycle hooks.\n *\n * @internal\n */\nexport class PluginWrapper<\n TSetup = unknown,\n TStart = unknown,\n TPluginsSetup extends object = object,\n TPluginsStart extends object = object\n > {\n public readonly name: DiscoveredPlugin['id'];\n // private initializer?: PluginInitializer;\n private initializer?: any;\n private instance?: Plugin;\n constructor(\n readonly discoveredPlugin: DiscoveredPlugin,\n public readonly opaqueId: PluginOpaqueId,\n private readonly initializerContext: PluginInitializerContext\n ) {\n this.name = discoveredPlugin.id;\n this.initializer = discoveredPlugin.instance;\n }\n\n public async setup(setupContext: CoreSetup, plugins: TPluginsSetup) {\n this.instance = await this.createPluginInstance();\n return await this.instance.setup(setupContext, plugins);\n }\n\n public async start(startContext: CoreStart, plugins: TPluginsStart) {\n if (this.instance === undefined) {\n throw new Error(`Plugin \"${this.name}\" can't be started since it isn't set up.`);\n }\n\n return await this.instance.start(startContext, plugins);\n }\n\n public stop() {\n if (this.instance === undefined) {\n throw new Error(`Plugin \"${this.name}\" can't be stopped since it isn't set up.`);\n }\n\n if (typeof this.instance.stop === 'function') {\n this.instance.stop();\n }\n\n this.instance = undefined;\n }\n\n private async createPluginInstance() {\n //@ts-ignore\n\n // const instance = tenants_plugin()\n const instance = this.initializer()\n //@ts-ignore\n return Promise.resolve(instance as Plugin)\n // if (this.initializer === undefined) {\n // throw new Error(`Plugin \"${this.name}\" can't be setup since its bundle isn't loaded.`);\n // }\n\n // const instance = this.initializer(this.initializerContext);\n\n // if (typeof instance.setup !== 'function') {\n // throw new Error(`Instance of plugin \"${this.name}\" does not define \"setup\" function.`);\n // } else if (typeof instance.start !== 'function') {\n // throw new Error(`Instance of plugin \"${this.name}\" does not define \"start\" function.`);\n // }\n\n // return instance;\n }\n\n}","import { PluginOpaqueId, DiscoveredPlugin } from \"../../types/plugins\";\nimport { EnvironmentMode, PackageInfo } from \"../../utils/package\";\nimport { CoreContext } from \"../core_system\";\nimport { PluginWrapper } from \"./plugins\";\nimport { CoreSetup, CoreStart } from \"..\";\nimport { PluginsServiceSetupDeps, PluginsServiceStartDeps } from \"./plugins_service\";\nimport { omit } from \"lodash\";\n\n/**\n * The available core services passed to a `PluginInitializer`\n *\n * @public\n */\nexport interface PluginInitializerContext {\n /**\n * A symbol used to identify this plugin in the system. Needed when registering handlers or context providers.\n */\n readonly opaqueId: PluginOpaqueId;\n readonly env: {\n mode: Readonly;\n packageInfo: Readonly;\n };\n}\n\n\n/**\n* Provides a plugin-specific context passed to the plugin's construtor. This is currently\n* empty but should provide static services in the future, such as config and logging.\n*\n* @param coreContext\n* @param pluginManinfest\n* @internal\n*/\nexport function createPluginInitializerContext(\n coreContext: CoreContext,\n opaqueId: PluginOpaqueId,\n pluginManifest: DiscoveredPlugin\n): PluginInitializerContext {\n return {\n opaqueId,\n env: coreContext.env,\n };\n}\n\n\n/**\n* Provides a plugin-specific context passed to the plugin's `setup` lifecycle event. Currently\n* this returns a shallow copy the service setup contracts, but in the future could provide\n* plugin-scoped versions of the service.\n*\n* @param coreContext\n* @param deps\n* @param plugin\n* @internal\n*/\nexport function createPluginSetupContext<\n TSetup,\n TStart,\n TPluginsSetup extends object,\n TPluginsStart extends object\n>(\n coreContext: CoreContext,\n deps: PluginsServiceSetupDeps,\n plugin: PluginWrapper\n): CoreSetup {\n return {\n application: {\n register: app => deps.application.register(plugin.opaqueId, app),\n registerRoute: deps.application.registerRoute,\n registerApp: app => deps.application.registerRoute(app.id, app),\n registerMountContext: (contextName, provider) => deps.application.registerMountContext(plugin.opaqueId, contextName, provider),\n },\n context: deps.context,\n // fatalErrors: deps.fatalErrors,\n http: deps.http,\n // notifications: deps.notifications,\n // uiSettings: deps.uiSettings,\n // injectedMetadata: {\n // getInjectedVar: deps.injectedMetadata.getInjectedVar,\n // },\n getServiceStart: deps.getServiceStart,\n api: deps.api,\n i18n: deps.i18n,\n coreStore: deps.coreStore,\n };\n}\n\n\n\n/**\n * Provides a plugin-specific context passed to the plugin's `start` lifecycle event. Currently\n * this returns a shallow copy the service start contracts, but in the future could provide\n * plugin-scoped versions of the service.\n *\n * @param coreContext\n * @param deps\n * @param plugin\n * @internal\n */\nexport function createPluginStartContext<\n TSetup,\n TStart,\n TPluginsSetup extends object,\n TPluginsStart extends object\n>(\n coreContext: CoreContext,\n deps: PluginsServiceStartDeps,\n plugin: PluginWrapper\n): CoreStart {\n return {\n application: {\n capabilities: null,\n registerMountContext: (contextName, provider) =>\n deps.application.registerMountContext(plugin.opaqueId, contextName, provider),\n getRoute: deps.application.getRoute\n },\n chrome: omit(deps.chrome, 'getComponent'),\n\n // docLinks: deps.docLinks,\n // http: deps.http,\n // i18n: deps.i18n,\n // notifications: deps.notifications,\n // overlays: deps.overlays,\n // uiSettings: deps.uiSettings,\n // savedObjects: deps.savedObjects,\n // injectedMetadata: {\n // getInjectedVar: deps.injectedMetadata.getInjectedVar,\n // },\n };\n}","import { CoreService } from \"../../types\";\nimport { InternalCoreSetup, InternalCoreStart, CoreContext } from \"../core_system\";\nimport { PluginName, DiscoveredPlugin, PluginOpaqueId } from \"../../types/plugins\";\nimport { PluginWrapper } from \"./plugins\";\nimport { createPluginInitializerContext, createPluginSetupContext, createPluginStartContext } from \"./plugins_context\";\n\n\n/** @internal */\nexport type PluginsServiceSetupDeps = InternalCoreSetup;\n/** @internal */\nexport type PluginsServiceStartDeps = InternalCoreStart;\n\n/** @internal */\nexport interface PluginsServiceSetup {\n contracts: ReadonlyMap;\n}\n/** @internal */\nexport interface PluginsServiceStart {\n contracts: ReadonlyMap;\n}\n\nexport class PluginsService implements CoreService {\n /** Plugin wrappers in topological order. */\n private readonly plugins = new Map>>();\n private readonly pluginDependencies = new Map();\n private readonly satupPlugins: PluginName[] = [];\n\n\n constructor(\n private readonly coreContext: CoreContext,\n plugins: Array<{ id: PluginName, plugin: DiscoveredPlugin }>\n ) {\n // 生成opaque(不透明)的ids\n const opaqueIds = new Map(plugins.map(p => [p.id, Symbol(p.id)]));\n\n plugins.forEach(({ id, plugin }) => {\n const opaqueid = opaqueIds.get(id)!;\n if (plugin.requiredPlugins && plugin.requiredPlugins.length) {\n this.pluginDependencies.set(id, [...plugin.requiredPlugins])\n }\n this.plugins.set(\n id,\n new PluginWrapper(\n plugin,\n opaqueid,\n createPluginInitializerContext(\n this.coreContext,\n opaqueid,\n plugin\n )\n ),\n );\n });\n }\n public async setup(\n deps: PluginsServiceSetupDeps\n ): Promise {\n // // Load plugin bundles\n // await this.loadPluginBundles(deps.http.basePath.prepend);\n\n // setup每个插件\n const contracts = new Map();\n //@ts-ignore\n for (const [pluginName, plugin] of this.plugins.entries()) {\n let pluginDepContracts: any = {};\n const deps2 = this.pluginDependencies.get(pluginName)\n if (deps2) {\n pluginDepContracts = [...deps2].reduce(\n (depContracts, dependencyName) => {\n // Only set if present. Could be absent if plugin does not have client-side code or is a\n // missing optional plugin.\n if (contracts.has(dependencyName)) {\n depContracts[dependencyName] = contracts.get(dependencyName);\n }\n\n return depContracts;\n },\n {} as Record\n );\n }\n\n\n contracts.set(\n pluginName as string,\n await plugin.setup(\n createPluginSetupContext(this.coreContext, deps, plugin),\n pluginDepContracts\n )\n );\n\n //Set plugin status to startup\n this.satupPlugins.push(pluginName);\n }\n return {\n contracts,\n };\n }\n\n public async start(\n deps: PluginsServiceStartDeps\n ): Promise {\n\n // setup每个插件\n const contracts = new Map();\n //@ts-ignore\n for (const [pluginName, plugin] of this.plugins.entries()) {\n contracts.set(\n pluginName,\n await plugin.start(\n createPluginStartContext(this.coreContext, deps, plugin),\n // pluginDepContracts\n )\n );\n }\n return {\n contracts\n };\n }\n\n public async stop() {\n // Stop plugins in reverse topological order.\n for (const pluginName of this.satupPlugins.reverse()) {\n this.plugins.get(pluginName)!.stop();\n }\n }\n\n /**\n * name\n */\n public getPlugin(name: string) {\n return this.plugins.get(name)\n }\n}","import _ from \"lodash\";\nimport { EventEmitter } from \"./event_emitter\";\n\n\n\n/*\\\n|*|\n|*| :: cookies.js ::\n|*|\n|*| A complete cookies reader/writer framework with full unicode support.\n|*|\n|*| https://developer.mozilla.org/en-US/docs/DOM/document.cookie\n|*|\n|*| This framework is released under the GNU Public License, version 3 or later.\n|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html\n|*|\n|*| Syntaxes:\n|*|\n|*| * docCookies.setItem(name, value[, end[, path[, domain[, secure]]]])\n|*| * docCookies.getItem(name)\n|*| * docCookies.removeItem(name[, path], domain)\n|*| * docCookies.hasItem(name)\n|*| * docCookies.keys()\n|*|\n\\*/\n\nexport const docCookies = {\n getItem: function (sKey: string) {\n return decodeURIComponent(document.cookie.replace(new RegExp(\"(?:(?:^|.*;)\\\\s*\" + encodeURIComponent(sKey).replace(/[-.+*]/g, \"\\\\$&\") + \"\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$\"), \"$1\")) || null;\n },\n setItem: function (sKey: string, sValue: any, option?: any) {\n // setItem: function (sKey: string, sValue: any, vEnd?: any, sPath?: any, sDomain?: any, bSecure?: any) {\n const { vEnd, sPath, sDomain, bSecure }: any = option\n if (!sKey || /^(?:expires|max\\-age|path|domain|secure)$/i.test(sKey)) { return false; }\n var sExpires = \"\";\n if (vEnd) {\n switch (vEnd.constructor) {\n case Number:\n sExpires = vEnd === Infinity ? \"; expires=Fri, 31 Dec 9999 23:59:59 GMT\" : \"; max-age=\" + vEnd;\n break;\n case String:\n sExpires = \"; expires=\" + vEnd;\n break;\n case Date:\n sExpires = \"; expires=\" + vEnd.toUTCString();\n break;\n }\n }\n document.cookie = encodeURIComponent(sKey) + \"=\" + encodeURIComponent(sValue) + sExpires + (sDomain ? \"; domain=\" + sDomain : \"\") + (sPath ? \"; path=\" + sPath : \"\") + (bSecure ? \"; secure\" : \"\");\n return true;\n },\n removeItem: function (sKey: string, option?: any) {\n const { sPath, sDomain } = option\n if (!sKey || !this.hasItem(sKey)) { return false; }\n document.cookie = encodeURIComponent(sKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 GMT\" + (sDomain ? \"; domain=\" + sDomain : \"\") + (sPath ? \"; path=\" + sPath : \"\");\n return true;\n },\n hasItem: function (sKey: string) {\n return (new RegExp(\"(?:^|;\\\\s*)\" + encodeURIComponent(sKey).replace(/[-.+*]/g, \"\\\\$&\") + \"\\\\s*\\\\=\")).test(document.cookie);\n },\n keys: /* optional method: you can safely remove it! */ function () {\n var aKeys = document.cookie.replace(/((?:^|\\s*;)[^\\=]+)(?=;|$)|^\\s*|\\s*(?:\\=[^;]*)?(?:\\1|$)/g, \"\").split(/\\s*(?:\\=[^;]*)?;\\s*/);\n for (var nIdx = 0; nIdx < aKeys.length; nIdx++) { aKeys[nIdx] = decodeURIComponent(aKeys[nIdx]); }\n return aKeys;\n }\n};\n\n\n\nclass coreStore extends EventEmitter {\n private store: any = {}\n private _i18n: any\n private storage = window.localStorage\n constructor() {\n super()\n\n }\n /**\n * update\n key:string,value:any */\n public update(key: string, value: any) {\n this.store[key] = value\n this.dispatch(key, value)\n }\n /**\n * get\n */\n public get(key: string) {\n return _.get(this.store, key)\n }\n\n}\n\nexport const CoreStore = new coreStore()","\nexport class EventEmitter {\n [x: string]: any;\n\n\n constructor() {\n }\n on(name: string | number, callback: any) {\n const onid = generateId()\n callback = { id: onid, callback }\n var callbacks = this[name];\n if (!callbacks) {\n this[name] = [callback];\n }\n else {\n callbacks.push(callback);\n }\n return onid\n }\n kill(name: string | number, id: string) {\n const callbacks = this[name]\n this[name] = []\n if (!callbacks) {\n return\n }\n for (let i = 0; i < callbacks.length; i++) {\n const element = callbacks[i];\n if (element.id == id) {\n continue\n }\n this[name].push(element)\n }\n }\n dispatch(name: string | number, event: any) {\n var callbacks = this[name];\n if (callbacks)\n callbacks.forEach(({ callback }: any) => callback(event));\n }\n}\n\nfunction generateId(): string {\n // implementation taken from http://stackoverflow.com/a/2117523\n let id = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n id = id.replace(/[xy]/g, (c) => {\n const r = Math.floor(Math.random() * 16);\n let v;\n\n if (c === 'x') {\n v = r;\n } else {\n // eslint-disable-next-line no-mixed-operators\n v = r & 0x3 | 0x8;\n }\n\n return v.toString(16);\n });\n return id;\n}","import { ApplicationService, InternalApplicationStart } from \"./application\";\nimport { RenderingService } from \"./rendering\";\nimport { CoreId } from \"../utils/context\";\nimport { EnvironmentMode, PackageInfo } from \"../utils/package\";\nimport { ContextService } from \"./context/context\";\nimport { ChromeService } from \"./chrome\";\nimport { Dispatch } from \"redux\";\nimport { CoreSetup, CoreStart } from \".\";\nimport { InternalApplicationSetup } from \"./application/types\";\nimport { PluginsService } from \"./plugins\";\nimport { DiscoveredPlugin, PluginName } from \"../types/plugins\";\n// import { ApiService } from \"./api\";\nimport { PluginsServiceSetup, PluginsServiceStart } from \"./plugins/plugins_service\";\nimport { Store } from 'redux';\nimport ApiClient from \"./ApiClient\";\nimport { CoreStore } from \"../store\";\ninterface Params {\n rootDomElement?: HTMLElement | null;\n dispatch?: Dispatch;\n plugins?: { id: PluginName, plugin: DiscoveredPlugin }[];\n store: Store;\n api?: any;\n i18n?: any;\n}\n// Array<{ id: PluginName, plugin: DiscoveredPlugin }>\n\n/** @internal */\nexport interface CoreContext {\n coreId: CoreId;\n env: {\n mode: Readonly;\n packageInfo: Readonly;\n };\n}\n\n/** @internal */\nexport interface InternalCoreSetup extends Omit {\n application: InternalApplicationSetup;\n getServiceStart: () => Promise;\n // injectedMetadata: InjectedMetadataSetup;\n}\n\n\n/** @internal */\nexport interface InternalCoreStart extends Omit {\n application: InternalApplicationStart;\n // injectedMetadata: InjectedMetadataStart;\n}\n\n\nexport class CoreSystem {\n private readonly application: ApplicationService;\n private readonly chrome: ChromeService;\n private readonly rendering: RenderingService;\n private readonly context: ContextService;\n private readonly plugins: PluginsService;\n private pluginsStart?: PluginsServiceStart;\n private pluginsSetup?: PluginsServiceSetup;\n\n private readonly rootDomElement: HTMLElement;\n private readonly coreContext: CoreContext;\n private coreStart!: CoreStart;\n private api?: any;\n private i18n?: any;\n public coreStore: any;\n // private readonly api: ApiService;\n\n constructor(params: Params) {\n const {\n rootDomElement,\n dispatch,\n plugins,\n store,\n api,\n i18n\n } = params;\n this.coreStore = CoreStore\n this.rootDomElement = rootDomElement!;\n // const store: any = null;//configureStore();\n this.application = new ApplicationService(store);\n this.chrome = new ChromeService();\n this.rendering = new RenderingService();\n // this.api = new ApiService();\n\n this.coreContext = {\n coreId: Symbol('core'), env: {\n mode: ({} as EnvironmentMode),\n packageInfo: ({} as PackageInfo),\n }\n };\n\n this.context = new ContextService(this.coreContext);\n\n this.plugins = new PluginsService(\n this.coreContext,\n plugins!\n );\n this.api = api\n this.i18n = i18n\n // console.log(this.plugins.getPlugin(\"security\"))\n }\n\n\n public async setup() {\n\n try {\n const context = this.context.setup({\n pluginDependencies: new Map(),\n })\n const application = this.application.setup({ context })\n // const api = await this.api.setup()\n const fetch = async (method: string, url: string, opts?: any, postBody?: any) => {\n opts = opts || {}\n\n let pathParams = {\n // 'parent': parent\n };\n let queryParams = {\n // 'page_size': opts['pageSize'],\n // 'page_token': opts['pageToken'],\n // 'query': opts['query'],\n // 'order_by': opts['orderBy']\n };\n let headerParams = opts.headerParams || {};\n let formParams = opts.formParams || {};\n let contentTypes = opts.contentTypes || ['application/json'];\n let accepts = opts.accepts || ['application/json'];\n let returnType = opts.returnType || {};\n let authNames: string[] = [];\n const client = new ApiClient()\n client.basePath = \"http://localhost:82\"\n return await client.callApi(\n url, method,\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n const core: InternalCoreSetup = {\n application,\n context,\n getServiceStart: async () => this.coreStart,\n http: {\n redirect: (path: string) => {\n\n this.application.history.push(path)\n },\n get: async (url: string, opts?: any, postBody?: any) => {\n return fetch(\"GET\", url, opts, postBody)\n },\n post: async (url: string, opts?: any, postBody?: any) => {\n return fetch(\"POST\", url, opts, postBody)\n },\n },\n api: this.api,\n i18n: this.i18n,\n coreStore: this.coreStore,\n\n }\n this.pluginsSetup = await this.plugins.setup(core);\n this.rendering.setup({\n application,\n plugins: this.pluginsSetup,\n // api,\n })\n return { fatalErrors: null };\n } catch (error) {\n console.error(error)\n }\n // const context = null;\n\n }\n\n\n public async start() {\n try {\n const coreUiTargetDomElement = document.createElement('div');\n coreUiTargetDomElement.id = 'dr2am-body';\n coreUiTargetDomElement.classList.add('height-full');\n coreUiTargetDomElement.classList.add('d-flex');\n\n // ensure the rootDomElement is empty\n this.rootDomElement.textContent = '';\n this.rootDomElement.classList.add('coreSystemRootDomElement');\n this.rootDomElement.classList.add('height-full');\n // this.rootDomElement.appendChild(coreUiTargetDomElement);\n const ct = this.rootDomElement as HTMLDivElement\n const application = await this.application.start()\n\n const chrome = await this.chrome.start({\n dispatch: application.getStore().dispatch,\n store: application.getStore(),\n history: application.getHistory(),\n });\n\n const core: InternalCoreStart = {\n application,\n chrome,\n };\n this.pluginsStart = await this.plugins.start(core);\n this.coreStart = core\n this.rendering.start({\n targetDomElement: ct,// coreUiTargetDomElement,\n application: application,\n chrome: chrome,\n // api: this.api,\n })\n\n } catch (err) {\n console.error(err);\n }\n\n\n // return this.rootDomElement\n }\n\n public stop() {\n }\n}","import i18n from 'i18next';\nimport Backend from 'i18next-http-backend';\nimport LanguageDetector from 'i18next-browser-languagedetector';\nimport { initReactI18next, useTranslation } from 'react-i18next';\n\n\ni18n\n .use(Backend)\n .use(LanguageDetector)\n .use(initReactI18next) // bind react-i18next to the instance\n .init({\n // lng: 'zh-CN',\n fallbackLng: 'zh-CN',\n // debug: true,\n interpolation: {\n escapeValue: false, // not needed for react!!\n },\n\n detection: { order: ['cookie', 'localStorage', 'querystring', 'sessionStorage', 'navigator', 'htmlTag', 'path', 'subdomain'], },\n // react i18next special options (optional)\n // override if needed - omit if ok with defaults\n react: {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i'],\n useSuspense: false,\n },\n saveMissing: false,\n backend: {\n loadPath: 'https://globe.wanfangdata.com.cn/locales/{{lng}}/{{ns}}.json',\n // addPath: 'http://videos.wanfangdata.com.hk:82/v1/locales/add/{{lng}}/{{ns}}',\n\n }\n });\n\n// const { t, i18n } = useTranslation\nexport default useTranslation;","import qs from 'query-string';\nclass Configure {\n private storage: Storage;\n private window: Window;\n private prefix = 'CONFIGURATOR_SERVICE_';\n\n constructor(storage?: Storage, w?: Window) {\n if (storage) {\n this.storage = storage\n } else if (typeof localStorage !== 'undefined') {\n this.storage = localStorage\n } else {\n throw new Error('Unable to set a local storage')\n }\n\n if (w) {\n this.window = w\n } else if (typeof window !== 'undefined') {\n this.window = window\n } else {\n throw new Error('Unable to set window')\n }\n }\n\n public get = (key: string, queryKey?: string, fallback?: any) => {\n queryKey = queryKey || key\n const query = qs.parse(this.window.location.search)[queryKey] as string\n\n const item = this.storage.getItem(key)\n if (!item) {\n if (query) {\n this.storage.setItem(key, query)\n return query\n }\n\n return fallback\n }\n\n if (query) {\n this.storage.setItem(key, query)\n return query\n }\n\n return item\n };\n\n public set = (key: string, value?: string) => {\n this.storage.setItem(key, value || '')\n }\n\n public remove = (key: string) => {\n return this.storage.removeItem(key)\n }\n\n /**\n * getApiURI\n:string */\n public getApiURI(key: string): string {\n if (key && key !== \"\") {\n const v = configure.get(key);\n if (v && v != \"\") {\n return v\n }\n }\n const v = configure.get(\"api_url\")\n if (v && v != \"\") {\n return v\n }\n return window.location.origin\n }\n}\nconst configure = new Configure()\nexport default configure","import _ from \"lodash\";\n\nvar rules = [];\nconst check = (rules, role, action, data) => {\n const permissions = rules[role];\n if (!permissions) {\n // role is not present in the rules\n return false;\n }\n\n const staticPermissions = permissions.static;\n\n if (staticPermissions && staticPermissions.includes(action)) {\n // static rule not provided for action\n return true;\n }\n\n const dynamicPermissions = permissions.dynamic;\n\n if (dynamicPermissions) {\n const permissionCondition = dynamicPermissions[action];\n if (!permissionCondition) {\n // dynamic rule not provided for action\n return false;\n }\n\n return permissionCondition(data);\n }\n return false;\n};\n\nvar polics = [{\n resource: /\\/console\\/user\\/.*$/g,\n action: /.*$/g,\n effect: \"allow\"\n}];\n\nexport const DefaultAdminPolicy = {\n allow: [{\n actions: [\".*\"],\n description: \"所有\",\n effect: \"allow\",\n group: \"system_admin\",\n resources: [\".*\"],\n\n }],\n // deny: [{\n // actions: [\"view\"],\n // description: \"测试所有\",\n // effect: \"deny\",\n // group: \"system_admin\",\n // resources: [\n // \"/app/dr2am/tenant/[^/]+/analysis/resource.*\",\n // \"/app/dr2am/tenant/[^/]+/setting.*\",\n // \"/app/dr2am/tenant/[^/]+/permission.*\",\n // \"/app/dr2am/tenant/[^/]+/groups.*\",\n // \"/app/dr2am/tenant/[^/]+/dashborad.*\",\n // ],\n // }]\n};\n\nexport const Policy = (polics) => {\n return {\n ...polics,\n match: (resource, action) => {\n\n if (!polics) {\n return false\n }\n if (polics.deny) {\n for (let i = 0; i < polics.deny.length; i++) {\n const policy = polics.deny[i];\n // console.log(policy, resource, action)\n\n if (match(policy.resources, resource) &&\n match(policy.actions, action)) {\n console.log(`${policy.group} -> deny -> ${policy.description} `);\n return false\n }\n\n }\n }\n if (polics.allow) {\n for (let i = 0; i < polics.allow.length; i++) {\n const policy = polics.allow[i];\n if (match(policy.resources, resource) &&\n match(policy.actions, action)) {\n // console.log(\"allow -> \" + policy.group);\n return true\n }\n }\n }\n console.log(`deny -> not match any policy ${resource} ${action}`);\n return false\n }\n }\n}\n\nfunction match(polics, pattran) {\n if (!polics) {\n return true\n }\n if (_.isString(polics)) {\n polics = _.split(polics, \";\")\n }\n let result = false\n for (let i = 0; i < polics.length; i++) {\n let policy = polics[i];\n policy = policy.replace(\"**\", \".*\")\n if ((new RegExp(\"^\" + policy + \"$\")).test(pattran)) {\n return true\n }\n }\n return false\n}\n\nconst hydraCheck = (rules, role, resource, action, data) => {\n return match(polics, resource, action)\n const permissions = rules[role];\n if (!permissions) {\n // role is not present in the rules\n return false;\n }\n\n const staticPermissions = permissions.static;\n\n if (staticPermissions && staticPermissions.includes(action)) {\n // static rule not provided for action\n return true;\n }\n\n const dynamicPermissions = permissions.dynamic;\n\n if (dynamicPermissions) {\n const permissionCondition = dynamicPermissions[action];\n if (!permissionCondition) {\n return false;\n }\n\n return permissionCondition(data);\n }\n return false;\n};\n\n// Can({group,resource,action})=>void\nconst Can = props => {\n const allow = Policy(props.group, props.data).match(props.resource, props.action)\n if (allow) {\n return props.yes && props.yes() || allow\n } else {\n return props.no && props.no() || allow\n }\n return allow\n}\n\nCan.defaultProps = {\n yes: () => true,\n no: () => false\n};\n\nexport default Can;","// @flow\nimport { Authentication } from './authentication';\nimport uj from 'url-join';\nimport qs from 'query-string';\n// import { any } from 'prop-types';\n\n\nexport class Configuration {\n storage: Storage\n window: any\n prefix = 'CONFIGURATOR_SERVICE_'\n\n constructor({ storage, w }: { storage?: Storage, w?: any } = {}) {\n if (storage) {\n this.storage = storage\n } else if (typeof localStorage !== 'undefined') {\n this.storage = localStorage\n } else {\n throw new Error('Unable to set a local storage')\n }\n\n if (w) {\n this.window = w\n } else if (typeof window !== 'undefined') {\n this.window = window\n } else {\n throw new Error('Unable to set window')\n }\n\n if (qs.parse(this.window.location.search).clear) {\n this.storage.clear()\n }\n\n // Preload everything\n // this.features()\n // this.oauth2()\n // this.services()\n }\n\n features = () =>\n this.get('FEATURES', 'features', process.env.REACT_APP_FEATURES || '')\n .split(',')\n .filter((i: any) => Boolean(i))\n\n hydraEnabled = () => this.featureEnabled('hydra')\n oathkeeperEnabled = () => this.featureEnabled('oathkeeper')\n\n featureEnabled = (feature: string) => {\n if (this.features().length === 0) {\n return true\n }\n\n return this.features().indexOf(feature) > -1\n }\n\n get = (key: string, queryKey?: string, fallback?: any) => {\n const query = queryKey && (qs.parse(this.window.location.search)[queryKey] as string)\n\n const item = this.storage.getItem(key)\n if (!item) {\n if (query) {\n this.storage.setItem(key, query)\n return query\n }\n\n return fallback\n }\n\n if (query) {\n this.storage.setItem(key, query)\n return query\n }\n\n return item\n };\n\n // configured = () => {\n // const auth = this.oauth2()\n // const service = this.services()\n\n // if (\n // this.featureEnabled('hydra') &&\n // !(auth.clientId && auth.redirectUri && service.hydra)\n // ) {\n // return false\n // }\n\n // if (this.featureEnabled('oathkeeper') && !service.oathkeeper) {\n // return false\n // }\n\n // return true\n // }\n\n oauth2 = () => {\n const options = {\n clientId: \"8db68df5-3821-4613-a0ce-c69e70f635d7\",\n accessTokenUri: \"http://idp.dr2am.cn:8444/oauth2/token\",\n authorizationUri: \"http://idp.dr2am.cn:8444/oauth2/auth\",\n redirectUri: window.location.protocol + \"//\" + window.location.host + \"/app/login/callback\",\n scopes: undefined,\n }\n // const mergedOptions = {\n // clientId: get(\"OAUTH2_CLIENT_ID\",\"clientid\",options.clientId),\n // clientSecret: 'is-public', // workaround for https://github.com/ory/fosite/issues/217\n // accessTokenUri:uj(hydraUrl, '/oauth2/token'),\n // authorizationUri: uj(hydraUrl, '/oauth2/auth'),\n // redirectUri: options.redirectUri,\n // scopes: options.scopes || ['offline', 'openid'],\n // type:[\"token\",\"id_token\"]\n // }\n let servicesUrl = this.get(\n 'SERVICES_URL',\n 'serviceUrl',\n window.location.protocol + \"//\" + window.location.host + \"/\",\n // \"http://idp.dr2am.cn:8444\" || process.env.REACT_APP_HYDRA_URL || ''\n )\n // servicesUrl = \"http://sc.zhsti.net:85\"\n // servicesUrl = servicesUrl || \"/\"\n\n return {\n clientId: this.get(\n 'OAUTH2_CLIENT_ID',\n 'clientId',\n options.clientId || process.env.REACT_APP_OAUTH2_CLIENT_ID || ''\n ),\n clientSecret: 'is-public',\n // clientSecret: '999999',\n // clientSecret: 'RzfsnllJRYjcfsap',\n accessTokenUri: uj(servicesUrl, '/oauth2/token'),\n authorizationUri: uj(servicesUrl, '/oauth2/auth'),\n redirectUri: this.get(\n 'OAUTH2_REDIRECT_URL',\n 'redirectUrl',\n options.redirectUri || process.env.REACT_APP_OAUTH2_REDIRECT_URL || ''\n ),\n scopes: options.scopes || ['offline', 'openid'],\n type: [\"token\", \"id_token\"]\n }\n }\n\n // services = () => ({\n // hydra: this.get(\n // 'SERVICES_HYDRA_URL',\n // 'hydraUrl',\n // window.location.protocol+\"//\"+window.location.host+\"/\",\n // // process.env.REACT_APP_HYDRA_URL || ''\n // ),\n // oathkeeper: this.get(\n // 'SERVICES_OATHKEEPER_URL',\n // 'oathkeeperUrl',\n // process.env.REACT_APP_OATHKEEPER_URL || ''\n // )\n // })\n}\nconst config = new Configuration()\nexport default new Authentication(config.oauth2())","\nimport ClientOAuth2 from 'client-oauth2';\nimport _, { uniqueId } from 'lodash';\nimport { parseUrl, stringify, stringifyUrl } from 'query-string';\nimport { EventEmitter } from './event_emitter';\nimport { generateId } from './utils';\n\n\nexport const AUTHORIZED_USER = 'authorized_user'\nexport const AUTHORIZE_STATE = 'authorize_state'\nexport const AUTHORIZE_REDIRECT = 'authorize_redirect'\nexport const AUTHORIZE_NONCE = 'authorize_nonce'\nexport const AUTHORIZE_SESSION_ID = 'authorize_session_id'\n\ntype Configuration = {\n clientId: string,\n clientSecret?: string,\n accessTokenUri: string,\n authorizationUri: string,\n revokeUri?: string,\n redirectUri: string,\n scopes?: string[]\n}\n\nexport class Authentication extends EventEmitter {\n store!: Storage;\n refreshProcess?: any;\n tokenClient: ClientOAuth2\n // isAuthorized = () => Boolean(this.store.getItem(AUTHORIZED_USER) || false)\n authorizeClient: ClientOAuth2\n config: Configuration\n constructor(\n options?: Configuration,\n store?: Storage\n ) {\n super()\n if (!options) {\n options = {\n clientId: '',\n clientSecret: '',\n accessTokenUri: '',\n authorizationUri: '',\n revokeUri: '',\n redirectUri: '',\n scopes: []\n }\n }\n if (store) {\n this.store = store\n } else if (typeof localStorage !== 'undefined') {\n this.store = localStorage\n }\n const mergedOptions = {\n clientId: options.clientId,\n clientSecret: options.clientSecret,//'is-public', // workaround for https://github.com/ory/fosite/issues/217\n accessTokenUri: options.accessTokenUri,\n authorizationUri: options.authorizationUri,\n revokeUri: options.revokeUri,\n redirectUri: options.redirectUri,\n scopes: options.scopes || ['offline', 'openid', 'force-consent'],\n type: [\"token\", \"id_token\"]\n }\n this.config = mergedOptions\n this.authorizeClient = new ClientOAuth2(mergedOptions)\n this.tokenClient = new ClientOAuth2({\n ...mergedOptions,\n clientId: encodeURIComponent(mergedOptions.clientId)\n })\n }\n\n\n storeToken = (token: ClientOAuth2.Token): Promise => {\n\n const payload = {\n ...token,\n data: {\n ...token.data,\n expires_in: (token as any).expires\n // expires: token.expired()\n },\n // expiresIn: token.data.expires,\n client: null\n }\n this.store.setItem(AUTHORIZED_USER, JSON.stringify(payload.data))\n this.refreshProcess = null\n return Promise.resolve(token)\n }\n\n authorizeCode = ({ return_url, query }: any) => {\n const state = generateId()\n const nonce = generateId()\n this.store.setItem(AUTHORIZE_STATE, state)\n this.store.setItem(AUTHORIZE_NONCE, nonce)\n this.store.setItem(AUTHORIZE_REDIRECT, return_url)\n const url = this.authorizeClient.code.getUri({\n state,\n query\n })\n window.location.href = url\n }\n\n authorizeToken = () => {\n const state = uniqueId()\n const nonce = uniqueId()\n // this.store.setItem(AUTHORIZE_STATE, state)\n // this.store.setItem(AUTHORIZE_NONCE, nonce)\n const url = this.authorizeClient.token.getUri({\n state,\n })\n window.location.href = url\n }\n authorizePw = (username: string, password: string) => {\n const state = uniqueId()\n const nonce = uniqueId()\n this.store.setItem(AUTHORIZE_STATE, state)\n this.store.setItem(AUTHORIZE_NONCE, nonce)\n return this.authorizeClient.owner.getToken(username, password, {\n state,\n })\n }\n authorizationCallback = (url: string = window.location.href) => {\n const return_url = this.store.getItem(AUTHORIZE_REDIRECT)\n\n let state = this.store.getItem(AUTHORIZE_STATE) || \"\"\n return this.tokenClient.token\n .getToken(url, { state: state })\n .then(async token => {\n this.store.removeItem(AUTHORIZE_NONCE)\n this.store.removeItem(AUTHORIZE_STATE)\n this.store.removeItem(AUTHORIZE_REDIRECT)\n token = await this.storeToken(token)\n if (return_url && return_url != \"\") {\n window.location.href = return_url\n }\n return token\n })\n }\n\n authorizationCallback2 = (url: string = window.location.href) => {\n const return_url = this.store.getItem(AUTHORIZE_REDIRECT)\n const state = this.store.getItem(AUTHORIZE_STATE)\n return this.authorizeClient.code\n .getToken(url, { state: state || undefined })\n .then(async token => {\n this.store.removeItem(AUTHORIZE_NONCE)\n this.store.removeItem(AUTHORIZE_STATE)\n this.store.removeItem(AUTHORIZE_REDIRECT)\n token = await this.storeToken(token)\n if (return_url && return_url != \"\") {\n window.location.href = return_url\n }\n return token\n })\n }\n revoke = async () => {\n this.store.removeItem(AUTHORIZE_NONCE)\n const state = this.store.getItem(AUTHORIZE_STATE)\n if (state) {\n this.store.removeItem(state)\n }\n this.store.removeItem(AUTHORIZE_STATE)\n this.store.removeItem(AUTHORIZED_USER)\n this.store.removeItem(AUTHORIZE_REDIRECT)\n // return Promise.resolve(null)\n }\n token = async (): Promise => {\n let user\n try {\n // user = {\"client\":null,\"data\":{\"access_token\":\"ZBFS042LNNWVH4JIQHEKMW\",\"refresh_token\":\"D7MDWQ3MUIM5DIOIP0ULQA\",\"expires_in\":\"7200\",\"id_token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9maWxlIjp7IkNsaWVudElEIjoiNDgyOTlhNjEtNDcyYy00MzZmLWI2YTItMGJlODI2YjUwZDJlIiwiSG9zdE5hbWUiOiIiLCJJc0F1dGhlZCI6dHJ1ZSwiSXNWYWxpZCI6dHJ1ZSwiTGlicmFyeUdyb3VwIjoiIiwiTmFtZSI6InlvcmhlX2NoYW4iLCJSb2xlcyI6InN5c3RlbV9hZG1pbiIsIlRlbmFudElkcyI6IiIsIlVzZXJOYW1lIjoieW9yaGVfY2hhbkBob3RtYWlsLmNvbSJ9fQ.rrea3-IsbfKyduzWot1o1k6LlHVhpWOWBR2kqNaC3SU\",\"scope\":\"offline openid\",\"token_type\":\"Bearer\",\"expires\":\"2019-11-19T13:46:14.198Z\"},\"tokenType\":\"bearer\",\"accessToken\":\"ZBFS042LNNWVH4JIQHEKMW\",\"refreshToken\":\"D7MDWQ3MUIM5DIOIP0ULQA\",\"expires\":\"2019-11-19T13:46:14.198Z\"}\n user = JSON.parse(this.store.getItem(AUTHORIZED_USER) || 'null')\n } catch (e) {\n console.error(e)\n //log.exception(\n // `Unable to fetch and parse user information from localStore because ${\n // e.message\n // }`\n // )\n return this.revoke().then(() => Promise.reject(e))\n }\n // if (!user || !user.accessToken || !user.refreshToken) {\n if (!user || !user.access_token) {\n\n const err = new Error(\n 'Unable to retrieve authentication information from localStore.'\n )\n //log.exception(err)\n // this.authorizeCode()//.then(() => Promise.reject(err))\n // return Promise.resolve(undefined)\n // return this.authorizeClient.code.\n return\n }\n\n // console.log(expires)\n // console.log(now)\n // console.log(expires.getSeconds())\n // console.log(now.getSeconds())\n // console.log(Math.round((expires.getTime() - now.getTime()) / 1000))\n // user.expires_in = Math.round((expires.getTime() - now.getTime()) / 1000)\n const token = this.tokenClient.createToken(\n // user.accessToken,\n // // user.refreshToken,\n // user.tokenType,\n user\n )\n if (token && user && user.expires_in) {\n const now = new Date()\n const expires = new Date(user.expires_in)\n token.expiresIn(expires)\n\n }\n if (token && token.data && !token.expired()) {\n return token\n\n }\n\n // token.expiresIn(new Date(user.expires))\n\n // if (token.expired()) {\n if (!this.refreshProcess) {\n //log.info('Token is already refreshing, returning existing promise.')\n this.refreshProcess = token\n .refresh()\n .then(this.storeToken)\n .catch(err => {\n return this.revoke().then(() => Promise.reject(err))\n })\n }\n\n return this.refreshProcess\n // }\n\n return token //Promise.resolve(token)\n }\n async tokenFetch(url: string, request: any) {\n return this.token().then(async (token: ClientOAuth2.Token | void) => {\n // if (!token) {\n // return fetch(url, { ...request })\n // }\n let headers: any\n const req = token?.sign({ url, headers: request.headers })\n headers = req?.headers\n try {\n if (req) {\n request = _.assign(request, req)\n url = req.url\n }\n const res = await fetch(url, { ...request })\n if (res.status > 300) {\n this.dispatch(\"error\", res)\n }\n return res\n\n } catch (error) {\n this.dispatch(\"error\", error)\n console.error(error);\n\n }\n })\n }\n async setToken(token: string) {\n const nToken = await this.tokenClient.createToken(token, \"\", \"bearer\", {})\n return this.storeToken(nToken)\n\n }\n}","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The PbPaginate model module.\n * @module model/PbPaginate\n * @version version not set\n */\nexport class PbPaginate {\n /**\n * Constructs a new PbPaginate.\n * @alias module:model/PbPaginate\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbPaginate from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbPaginate} obj Optional instance to populate.\n * @return {module:model/PbPaginate} The populated PbPaginate instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbPaginate();\n if (data.hasOwnProperty('offset'))\n obj.offset = ApiClient.convertToType(data['offset'], 'Number');\n if (data.hasOwnProperty('limit'))\n obj.limit = ApiClient.convertToType(data['limit'], 'Number');\n if (data.hasOwnProperty('next_page_token'))\n obj.nextPageToken = ApiClient.convertToType(data['next_page_token'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {Number} offset\n */\nPbPaginate.prototype.offset = undefined;\n\n/**\n * @member {Number} limit\n */\nPbPaginate.prototype.limit = undefined;\n\n/**\n * @member {String} nextPageToken\n */\nPbPaginate.prototype.nextPageToken = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {\n ApiClient\n} from '../ApiClient';\n\n/**\n * The PbPermissionNode model module.\n * @module model/PbPermissionNode\n * @version version not set\n */\nexport class PbPermissionNode {\n /**\n * Constructs a new PbPermissionNode.\n * @alias module:model/PbPermissionNode\n * @class\n */\n constructor() {}\n\n /**\n * Constructs a PbPermissionNode from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbPermissionNode} obj Optional instance to populate.\n * @return {module:model/PbPermissionNode} The populated PbPermissionNode instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbPermissionNode();\n if (data.hasOwnProperty('left'))\n obj.left = PbPermissionNode.constructFromObject(data['left']);\n if (data.hasOwnProperty('right'))\n obj.right = PbPermissionNode.constructFromObject(data['right']);\n if (data.hasOwnProperty('typeof'))\n obj.typeof = ApiClient.convertToType(data['typeof'], 'String');\n if (data.hasOwnProperty('parens'))\n obj.parens = ApiClient.convertToType(data['parens'], 'Boolean');\n if (data.hasOwnProperty('operator'))\n obj.operator = ApiClient.convertToType(data['operator'], 'Number');\n if (data.hasOwnProperty('operator_str'))\n obj.operatorStr = ApiClient.convertToType(data['operator_str'], 'String');\n if (data.hasOwnProperty('reference'))\n obj.reference = ApiClient.convertToType(data['reference'], 'String');\n if (data.hasOwnProperty('literal'))\n obj.literal = ApiClient.convertToType(data['literal'], 'String');\n if (data.hasOwnProperty('ident'))\n obj.ident = ApiClient.convertToType(data['ident'], 'String');\n if (data.hasOwnProperty('base'))\n obj.base = ApiClient.convertToType(data['base'], 'String');\n if (data.hasOwnProperty('int64'))\n obj.int64 = ApiClient.convertToType(data['int64'], 'String');\n if (data.hasOwnProperty('float'))\n obj.float = ApiClient.convertToType(data['float'], 'Number');\n if (data.hasOwnProperty('isint'))\n obj.isint = ApiClient.convertToType(data['isint'], 'Boolean');\n if (data.hasOwnProperty('isfloat'))\n obj.isfloat = ApiClient.convertToType(data['isfloat'], 'Boolean');\n if (data.hasOwnProperty('bool'))\n obj.bool = ApiClient.convertToType(data['bool'], 'Boolean');\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbPermissionNode} left\n */\nPbPermissionNode.prototype.left = undefined;\n\n/**\n * @member {module:model/PbPermissionNode} right\n */\nPbPermissionNode.prototype.right = undefined;\n\n/**\n * @member {String} _typeof\n */\nPbPermissionNode.prototype.typeof = undefined;\n\n/**\n * @member {Boolean} parens\n */\nPbPermissionNode.prototype.parens = undefined;\n\n/**\n * @member {Number} operator\n */\nPbPermissionNode.prototype.operator = undefined;\n\n/**\n * @member {String} operatorStr\n */\nPbPermissionNode.prototype.operatorStr = undefined;\n\n/**\n * @member {String} reference\n */\nPbPermissionNode.prototype.reference = undefined;\n\n/**\n * @member {String} literal\n */\nPbPermissionNode.prototype.literal = undefined;\n\n/**\n * @member {String} ident\n */\nPbPermissionNode.prototype.ident = undefined;\n\n/**\n * @member {String} base\n */\nPbPermissionNode.prototype.base = undefined;\n\n/**\n * @member {String} int64\n */\nPbPermissionNode.prototype.int64 = undefined;\n\n/**\n * @member {Number} _float\n */\nPbPermissionNode.prototype.float = undefined;\n\n/**\n * @member {Boolean} isint\n */\nPbPermissionNode.prototype.isint = undefined;\n\n/**\n * @member {Boolean} isfloat\n */\nPbPermissionNode.prototype.isfloat = undefined;\n\n/**\n * @member {Boolean} bool\n */\nPbPermissionNode.prototype.bool = undefined;","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPermissionNode} from './PbPermissionNode';\n\n/**\n * The PbPermissionCondition model module.\n * @module model/PbPermissionCondition\n * @version version not set\n */\nexport class PbPermissionCondition {\n /**\n * Constructs a new PbPermissionCondition.\n * @alias module:model/PbPermissionCondition\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbPermissionCondition from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbPermissionCondition} obj Optional instance to populate.\n * @return {module:model/PbPermissionCondition} The populated PbPermissionCondition instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbPermissionCondition();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('gid'))\n obj.gid = ApiClient.convertToType(data['gid'], 'String');\n if (data.hasOwnProperty('access_type'))\n obj.accessType = ApiClient.convertToType(data['access_type'], 'String');\n if (data.hasOwnProperty('expressions'))\n obj.expressions = PbPermissionNode.constructFromObject(data['expressions']);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nPbPermissionCondition.prototype.id = undefined;\n\n/**\n * @member {String} gid\n */\nPbPermissionCondition.prototype.gid = undefined;\n\n/**\n * @member {String} accessType\n */\nPbPermissionCondition.prototype.accessType = undefined;\n\n/**\n * @member {module:model/PbPermissionNode} expressions\n */\nPbPermissionCondition.prototype.expressions = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPermissionCondition} from './PbPermissionCondition';\n\n/**\n * The PbPermissionRole model module.\n * @module model/PbPermissionRole\n * @version version not set\n */\nexport class PbPermissionRole {\n /**\n * Constructs a new PbPermissionRole.\n * @alias module:model/PbPermissionRole\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbPermissionRole from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbPermissionRole} obj Optional instance to populate.\n * @return {module:model/PbPermissionRole} The populated PbPermissionRole instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbPermissionRole();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('gid'))\n obj.gid = ApiClient.convertToType(data['gid'], 'String');\n if (data.hasOwnProperty('access_type'))\n obj.accessType = ApiClient.convertToType(data['access_type'], 'String');\n if (data.hasOwnProperty('scope'))\n obj.scope = ApiClient.convertToType(data['scope'], 'String');\n if (data.hasOwnProperty('database'))\n obj.database = ApiClient.convertToType(data['database'], 'String');\n if (data.hasOwnProperty('roles'))\n obj.roles = ApiClient.convertToType(data['roles'], ['String']);\n if (data.hasOwnProperty('conditions'))\n obj.conditions = ApiClient.convertToType(data['conditions'], [PbPermissionCondition]);\n if (data.hasOwnProperty('create_at'))\n obj.createAt = ApiClient.convertToType(data['create_at'], 'Date');\n if (data.hasOwnProperty('modify_at'))\n obj.modifyAt = ApiClient.convertToType(data['modify_at'], 'Date');\n if (data.hasOwnProperty('name'))\n obj.name = ApiClient.convertToType(data['name'], 'String');\n if (data.hasOwnProperty('description'))\n obj.description = ApiClient.convertToType(data['description'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nPbPermissionRole.prototype.id = undefined;\n\n/**\n * @member {String} gid\n */\nPbPermissionRole.prototype.gid = undefined;\n\n/**\n * @member {String} accessType\n */\nPbPermissionRole.prototype.accessType = undefined;\n\n/**\n * @member {String} scope\n */\nPbPermissionRole.prototype.scope = undefined;\n\n/**\n * @member {String} database\n */\nPbPermissionRole.prototype.database = undefined;\n\n/**\n * @member {Array.} roles\n */\nPbPermissionRole.prototype.roles = undefined;\n\n/**\n * @member {Array.} conditions\n */\nPbPermissionRole.prototype.conditions = undefined;\n\n/**\n * @member {Date} createAt\n */\nPbPermissionRole.prototype.createAt = undefined;\n\n/**\n * @member {Date} modifyAt\n */\nPbPermissionRole.prototype.modifyAt = undefined;\n\n/**\n * @member {String} name\n */\nPbPermissionRole.prototype.name = undefined;\n\n/**\n * @member {String} description\n */\nPbPermissionRole.prototype.description = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * Enum class ResponseStateState.\n * @enum {String}\n * @readonly\n */\nconst ResponseStateState = {\n /**\n * value: \"unknow\"\n * @const\n */\n unknow: \"unknow\",\n\n /**\n * value: \"success\"\n * @const\n */\n success: \"success\",\n\n /**\n * value: \"fail\"\n * @const\n */\n fail: \"fail\",\n\n /**\n * Returns a ResponseStateState enum value from a JavaScript object name.\n * @param {Object} data The plain JavaScript object containing the name of the enum value.\n * @return {module:model/ResponseStateState} The enum ResponseStateState value.\n */\n constructFromObject: function(object) {\n return object;\n }\n};\n\nexport {ResponseStateState};\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ResponseStateState} from './ResponseStateState';\n\n/**\n * The PbResponseState model module.\n * @module model/PbResponseState\n * @version version not set\n */\nexport class PbResponseState {\n /**\n * Constructs a new PbResponseState.\n * @alias module:model/PbResponseState\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbResponseState from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbResponseState} obj Optional instance to populate.\n * @return {module:model/PbResponseState} The populated PbResponseState instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbResponseState();\n if (data.hasOwnProperty('state'))\n obj.state = ResponseStateState.constructFromObject(data['state']);\n if (data.hasOwnProperty('msg'))\n obj.msg = ApiClient.convertToType(data['msg'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/ResponseStateState} state\n */\nPbResponseState.prototype.state = undefined;\n\n/**\n * @member {String} msg\n */\nPbResponseState.prototype.msg = undefined;\n\n/**\n * @member {Number} code\n */\nPbResponseState.prototype.code = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufAny model module.\n * @module model/ProtobufAny\n * @version version not set\n */\nexport class ProtobufAny {\n /**\n * Constructs a new ProtobufAny.\n * @alias module:model/ProtobufAny\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufAny from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufAny} obj Optional instance to populate.\n * @return {module:model/ProtobufAny} The populated ProtobufAny instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufAny();\n if (data.hasOwnProperty('type_url'))\n obj.typeUrl = ApiClient.convertToType(data['type_url'], 'String');\n if (data.hasOwnProperty('value'))\n obj.value = ApiClient.convertToType(data['value'], 'Blob');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} typeUrl\n */\nProtobufAny.prototype.typeUrl = undefined;\n\n/**\n * @member {Blob} value\n */\nProtobufAny.prototype.value = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufFieldMask model module.\n * @module model/ProtobufFieldMask\n * @version version not set\n */\nexport class ProtobufFieldMask {\n /**\n * Constructs a new ProtobufFieldMask.\n * paths: \\\"f.a\\\" paths: \\\"f.b.d\\\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, the existing repeated values in the target resource will be overwritten by the new values. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then the existing sub-message in the target resource is overwritten. Given the target message: f { b { d : 1 x : 2 } c : 1 } And an update message: f { b { d : 10 } } then if the field mask is: paths: \\\"f.b\\\" then the result will be: f { b { d : 10 } c : 1 } However, if the update mask was: paths: \\\"f.b.d\\\" then the result would be: f { b { d : 10 x : 2 } c : 1 } In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \\\"user.display_name\\\" paths: \\\"photo\\\" } In JSON, the same mask is represented as below: { mask: \\\"user.displayName,photo\\\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \\\"name\\\" } Or: mask { paths: \\\"sub_message\\\" } Note that oneof type names (\\\"test_oneof\\\" in this case) cannot be used in paths.\n * @alias module:model/ProtobufFieldMask\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufFieldMask from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufFieldMask} obj Optional instance to populate.\n * @return {module:model/ProtobufFieldMask} The populated ProtobufFieldMask instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufFieldMask();\n if (data.hasOwnProperty('paths'))\n obj.paths = ApiClient.convertToType(data['paths'], ['String']);\n }\n return obj;\n }\n}\n\n/**\n * The set of field mask paths.\n * @member {Array.} paths\n */\nProtobufFieldMask.prototype.paths = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ProtobufAny} from './ProtobufAny';\n\n/**\n * The RuntimeError model module.\n * @module model/RuntimeError\n * @version version not set\n */\nexport class RuntimeError {\n /**\n * Constructs a new RuntimeError.\n * @alias module:model/RuntimeError\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a RuntimeError from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/RuntimeError} obj Optional instance to populate.\n * @return {module:model/RuntimeError} The populated RuntimeError instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new RuntimeError();\n if (data.hasOwnProperty('error'))\n obj.error = ApiClient.convertToType(data['error'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n if (data.hasOwnProperty('message'))\n obj.message = ApiClient.convertToType(data['message'], 'String');\n if (data.hasOwnProperty('details'))\n obj.details = ApiClient.convertToType(data['details'], [ProtobufAny]);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} error\n */\nRuntimeError.prototype.error = undefined;\n\n/**\n * @member {Number} code\n */\nRuntimeError.prototype.code = undefined;\n\n/**\n * @member {String} message\n */\nRuntimeError.prototype.message = undefined;\n\n/**\n * @member {Array.} details\n */\nRuntimeError.prototype.details = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPermissionRole} from './PbPermissionRole';\n\n/**\n * The ServiceCreatePermissionsRequest model module.\n * @module model/ServiceCreatePermissionsRequest\n * @version version not set\n */\nexport class ServiceCreatePermissionsRequest {\n /**\n * Constructs a new ServiceCreatePermissionsRequest.\n * @alias module:model/ServiceCreatePermissionsRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceCreatePermissionsRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceCreatePermissionsRequest} obj Optional instance to populate.\n * @return {module:model/ServiceCreatePermissionsRequest} The populated ServiceCreatePermissionsRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceCreatePermissionsRequest();\n if (data.hasOwnProperty('permission'))\n obj.permission = PbPermissionRole.constructFromObject(data['permission']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbPermissionRole} permission\n */\nServiceCreatePermissionsRequest.prototype.permission = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPermissionRole} from './PbPermissionRole';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceCreatePermissionsResponse model module.\n * @module model/ServiceCreatePermissionsResponse\n * @version version not set\n */\nexport class ServiceCreatePermissionsResponse {\n /**\n * Constructs a new ServiceCreatePermissionsResponse.\n * @alias module:model/ServiceCreatePermissionsResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceCreatePermissionsResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceCreatePermissionsResponse} obj Optional instance to populate.\n * @return {module:model/ServiceCreatePermissionsResponse} The populated ServiceCreatePermissionsResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceCreatePermissionsResponse();\n if (data.hasOwnProperty('permission'))\n obj.permission = PbPermissionRole.constructFromObject(data['permission']);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbPermissionRole} permission\n */\nServiceCreatePermissionsResponse.prototype.permission = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceCreatePermissionsResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceDeletePermissionResponse model module.\n * @module model/ServiceDeletePermissionResponse\n * @version version not set\n */\nexport class ServiceDeletePermissionResponse {\n /**\n * Constructs a new ServiceDeletePermissionResponse.\n * @alias module:model/ServiceDeletePermissionResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceDeletePermissionResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceDeletePermissionResponse} obj Optional instance to populate.\n * @return {module:model/ServiceDeletePermissionResponse} The populated ServiceDeletePermissionResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceDeletePermissionResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceDeletePermissionResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPermissionRole} from './PbPermissionRole';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceListPermissionsResponse model module.\n * @module model/ServiceListPermissionsResponse\n * @version version not set\n */\nexport class ServiceListPermissionsResponse {\n /**\n * Constructs a new ServiceListPermissionsResponse.\n * @alias module:model/ServiceListPermissionsResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListPermissionsResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListPermissionsResponse} obj Optional instance to populate.\n * @return {module:model/ServiceListPermissionsResponse} The populated ServiceListPermissionsResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListPermissionsResponse();\n if (data.hasOwnProperty('permissions'))\n obj.permissions = ApiClient.convertToType(data['permissions'], [PbPermissionRole]);\n if (data.hasOwnProperty('next_page_token'))\n obj.nextPageToken = ApiClient.convertToType(data['next_page_token'], 'String');\n if (data.hasOwnProperty('total'))\n obj.total = ApiClient.convertToType(data['total'], 'String');\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} permissions\n */\nServiceListPermissionsResponse.prototype.permissions = undefined;\n\n/**\n * @member {String} nextPageToken\n */\nServiceListPermissionsResponse.prototype.nextPageToken = undefined;\n\n/**\n * @member {String} total\n */\nServiceListPermissionsResponse.prototype.total = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceListPermissionsResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPermissionRole} from './PbPermissionRole';\nimport {ProtobufFieldMask} from './ProtobufFieldMask';\n\n/**\n * The ServiceUpdatePermissionRequest model module.\n * @module model/ServiceUpdatePermissionRequest\n * @version version not set\n */\nexport class ServiceUpdatePermissionRequest {\n /**\n * Constructs a new ServiceUpdatePermissionRequest.\n * @alias module:model/ServiceUpdatePermissionRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdatePermissionRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdatePermissionRequest} obj Optional instance to populate.\n * @return {module:model/ServiceUpdatePermissionRequest} The populated ServiceUpdatePermissionRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdatePermissionRequest();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('permission'))\n obj.permission = PbPermissionRole.constructFromObject(data['permission']);\n if (data.hasOwnProperty('update_mask'))\n obj.updateMask = ProtobufFieldMask.constructFromObject(data['update_mask']);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nServiceUpdatePermissionRequest.prototype.id = undefined;\n\n/**\n * @member {module:model/PbPermissionRole} permission\n */\nServiceUpdatePermissionRequest.prototype.permission = undefined;\n\n/**\n * @member {module:model/ProtobufFieldMask} updateMask\n */\nServiceUpdatePermissionRequest.prototype.updateMask = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPermissionRole} from './PbPermissionRole';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceUpdatePermissionResponse model module.\n * @module model/ServiceUpdatePermissionResponse\n * @version version not set\n */\nexport class ServiceUpdatePermissionResponse {\n /**\n * Constructs a new ServiceUpdatePermissionResponse.\n * @alias module:model/ServiceUpdatePermissionResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdatePermissionResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdatePermissionResponse} obj Optional instance to populate.\n * @return {module:model/ServiceUpdatePermissionResponse} The populated ServiceUpdatePermissionResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdatePermissionResponse();\n if (data.hasOwnProperty('permission'))\n obj.permission = PbPermissionRole.constructFromObject(data['permission']);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbPermissionRole} permission\n */\nServiceUpdatePermissionResponse.prototype.permission = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceUpdatePermissionResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.permissions.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from \"../ApiClient\";\nimport {RuntimeError} from '../model/RuntimeError';\nimport {ServiceCreatePermissionsRequest} from '../model/ServiceCreatePermissionsRequest';\nimport {ServiceCreatePermissionsResponse} from '../model/ServiceCreatePermissionsResponse';\nimport {ServiceDeletePermissionResponse} from '../model/ServiceDeletePermissionResponse';\nimport {ServiceListPermissionsResponse} from '../model/ServiceListPermissionsResponse';\nimport {ServiceUpdatePermissionRequest} from '../model/ServiceUpdatePermissionRequest';\nimport {ServiceUpdatePermissionResponse} from '../model/ServiceUpdatePermissionResponse';\n\n/**\n* PermissionsService service.\n* @module api/PermissionsServiceApi\n* @version version not set\n*/\nexport class PermissionsServiceApi {\n\n /**\n * Constructs a new PermissionsServiceApi. \n * @alias module:api/PermissionsServiceApi\n * @class\n * @param {module:ApiClient} [apiClient] Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\n constructor(apiClient) {\n this.apiClient = apiClient || ApiClient.instance;\n }\n\n\n\n /**\n * Create Permissions\n * @param {module:model/ServiceCreatePermissionsRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceCreatePermissionsResponse} and HTTP response\n */\n permissionsServiceCreateWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling permissionsServiceCreate\");\n }\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceCreatePermissionsResponse;\n\n return this.apiClient.callApi(\n '/v1/permissions:create', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Create Permissions\n * @param {module:model/ServiceCreatePermissionsRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceCreatePermissionsResponse}\n */\n permissionsServiceCreate(body) {\n return this.permissionsServiceCreateWithHttpInfo(body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * Delete permission\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceDeletePermissionResponse} and HTTP response\n */\n permissionsServiceDeleteWithHttpInfo(id) {\n let postBody = null;\n\n // verify the required parameter 'id' is set\n if (id === undefined || id === null) {\n throw new Error(\"Missing the required parameter 'id' when calling permissionsServiceDelete\");\n }\n\n\n let pathParams = {\n 'id': id\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceDeletePermissionResponse;\n\n return this.apiClient.callApi(\n '/v1/permissions/{id}:delete', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Delete permission\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceDeletePermissionResponse}\n */\n permissionsServiceDelete(id) {\n return this.permissionsServiceDeleteWithHttpInfo(id)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * List Permissions\n * @param {Object} opts Optional parameters\n * @param {String} opts.action \n * @param {Number} opts.pageSize \n * @param {String} opts.pageToken \n * @param {String} opts.query \n * @param {String} opts.orderBy \n * @param {Number} opts.paginateOffset \n * @param {Number} opts.paginateLimit \n * @param {String} opts.paginateNextPageToken \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceListPermissionsResponse} and HTTP response\n */\n permissionsServiceListWithHttpInfo(opts) {\n opts = opts || {};\n let postBody = null;\n\n\n let pathParams = {\n };\n let queryParams = {\n 'action': opts['action'],\n 'page_size': opts['pageSize'],\n 'page_token': opts['pageToken'],\n 'query': opts['query'],\n 'order_by': opts['orderBy'],\n 'paginate.offset': opts['paginateOffset'],\n 'paginate.limit': opts['paginateLimit'],\n 'paginate.next_page_token': opts['paginateNextPageToken']\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceListPermissionsResponse;\n\n return this.apiClient.callApi(\n '/v1/permissions:list', 'GET',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * List Permissions\n * @param {Object} opts Optional parameters\n * @param {String} opts.action \n * @param {Number} opts.pageSize \n * @param {String} opts.pageToken \n * @param {String} opts.query \n * @param {String} opts.orderBy \n * @param {Number} opts.paginateOffset \n * @param {Number} opts.paginateLimit \n * @param {String} opts.paginateNextPageToken \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceListPermissionsResponse}\n */\n permissionsServiceList(opts) {\n return this.permissionsServiceListWithHttpInfo(opts)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * Update permission\n * @param {String} id \n * @param {module:model/ServiceUpdatePermissionRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceUpdatePermissionResponse} and HTTP response\n */\n permissionsServiceUpdateWithHttpInfo(id, body) {\n let postBody = body;\n\n // verify the required parameter 'id' is set\n if (id === undefined || id === null) {\n throw new Error(\"Missing the required parameter 'id' when calling permissionsServiceUpdate\");\n }\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling permissionsServiceUpdate\");\n }\n\n\n let pathParams = {\n 'id': id\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceUpdatePermissionResponse;\n\n return this.apiClient.callApi(\n '/v1/permissions/{id}:update', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Update permission\n * @param {String} id \n * @param {module:model/ServiceUpdatePermissionRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceUpdatePermissionResponse}\n */\n permissionsServiceUpdate(id, body) {\n return this.permissionsServiceUpdateWithHttpInfo(id, body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n}\n","import _ from \"lodash\";\nimport { wfConfig } from \"./api\";\nimport { usePermissions } from \"./api_permissions\";\nimport { ApiClient } from \"./client/ApiClient\";\nimport { PermissionsServiceApi } from \"./client/dr2am.tasks.permissions-js/src\";\nimport { EventEmitter } from \"./event_emitter\";\nimport { generateId } from \"./utils\";\n\n\n\n\n\n\nclass permissionsStore extends EventEmitter {\n prex = \"wfhk-permissions\"\n storage = window.localStorage\n permissions: any = []\n\n constructor() {\n super();\n const permissionsStr: any = this.storage.getItem(this.prex)\n try {\n this.permissions = JSON.parse(permissionsStr) || []\n } catch (error) { }\n }\n async getAll() {\n return this.permissions\n }\n async getAllByRole(role: string) {\n const permissions = _.filter(this.permissions, (permission) => {\n return _.includes(permission.roles, role)\n })\n\n return permissions\n }\n\n async create({ scope, database, dataset, roles, conditions }: any) {\n const permission: any = {\n scope, database, dataset, roles, conditions\n // \"path\": `${namespace}.${name}`,\n // \"name\": `${name}`,\n // \"namespace\": namespace,\n }\n permission.id = generateId()\n permission.createAt = new Date()\n permission.modifyAt = permission.createAt\n this.permissions.push(permission)\n this.storage.setItem(this.prex, JSON.stringify(this.permissions))\n this.dispatch(\"change\", permission);\n this.dispatch(permission.id, permission);\n return permission\n }\n async update(id: string, data: any, paths?: any) {\n const idx = _.findIndex(this.permissions, function (permission: any) {\n return permission.id == id\n })\n if (idx < 0) {\n return\n }\n for (let i = 0; i < paths.length; i++) {\n const path = paths[i];\n _.set(this.permissions[idx], path, _.get(data, path))\n }\n this.permissions[idx].modifyAt = new Date()\n if (!this.permissions[idx].createAt) {\n this.permissions[idx].createAt = this.permissions[idx].modifyAt\n }\n this.storage.setItem(this.prex, JSON.stringify(this.permissions))\n this.dispatch(\"change\", this.permissions[idx]);\n this.dispatch(id, this.permissions[idx]);\n return this.permissions[idx]\n }\n async remove(path: string) {\n _.set(this.permissions, path, undefined)\n this.storage.setItem(this.prex, JSON.stringify(this.permissions))\n this.dispatch(\"change\", null);\n this.dispatch(path, null);\n return false\n }\n\n async get(path: string) {\n return _.get(this.permissions, path)\n }\n\n async addPermissions(id: string, permissions: any[]) {\n const policy: any = await this.get(id)\n if (!policy) {\n return\n }\n const policyPermissions = policy.permissions || []\n for (let i = 0; i < permissions.length; i++) {\n const permission = permissions[i];\n if (_.includes(policyPermissions, permission)) {\n continue\n }\n policyPermissions.push(permission)\n }\n\n return this.update(id, { permissions: policyPermissions }, [\"permissions\"])\n }\n async removePermissions(id: string, permissions: any[]) {\n const policy: any = await this.get(id)\n if (!policy) {\n return\n }\n const policyPermissions = policy.permissions\n const nPermissions = []\n for (let i = 0; i < policyPermissions.length; i++) {\n const permission = policyPermissions[i];\n if (_.includes(permissions, permission)) {\n continue\n }\n nPermissions.push(permission)\n }\n\n return this.update(id, { permissions: nPermissions }, [\"permissions\"])\n }\n\n}\nfunction handlePbError(res: any) {\n if (!res) {\n return { error: { status: \"error\", msg: \"unkonw error\" } }\n }\n if (res && res.status && res.status.code != 200) {\n return { ...res, error: res.status }\n }\n return { ...res }\n}\nclass permissionsStoreRemote extends EventEmitter {\n private api: PermissionsServiceApi\n permissions: any = []\n\n constructor(authc: any, apiUrl: any) {\n super();\n const client = new ApiClient();\n client.basePath = apiUrl || `${wfConfig.apiURL.protocol}//${wfConfig.apiURL.host}/api`;\n // client.basePath = \"https://globe.wanfangdata.com.cn/api\";\n client.authc = authc;\n this.api = new PermissionsServiceApi(client);\n }\n\n async create({ scope, database, accessType, dataset, roles, conditions }: any) {\n const permission: any = {\n scope, database, accessType, dataset, roles, conditions\n // \"path\": `${namespace}.${name}`,\n // \"name\": `${name}`,\n // \"namespace\": namespace,\n }\n try {\n // new LocalesApi(client);\n const res = await this.api.permissionsServiceCreate({ permission });\n this.dispatch(\"change\", permission);\n this.dispatch(permission.id, permission);\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n\n\n\n return permission\n }\n\n async remove(id: string) {\n try {\n // new LocalesApi(client);\n const res = await this.api.permissionsServiceDelete(id);\n this.dispatch(\"change\", null);\n this.dispatch(id, null);\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n\n this.storage.setItem(this.prex, JSON.stringify(this.permissions))\n\n return false\n }\n\n\n async update(id: string, data: any, paths?: any) {\n console.log(id, data, paths);\n try {\n // new LocalesApi(client);\n const res = await this.api.permissionsServiceUpdate(id, {\n permission: _.pick(data, paths),\n update_mask: { paths: paths }\n });\n this.dispatch(\"change\", res.permission);\n this.dispatch(id, res.permission);\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n // this.storage.setItem(this.prex, JSON.stringify(this.permissions))\n // this.dispatch(\"change\", this.permissions[idx]);\n // this.dispatch(id, this.permissions[idx]);\n // return this.permissions[idx]\n }\n async getAll() {\n return this.permissions\n }\n async getAllByRole(role: string) {\n\n try {\n // new LocalesApi(client);\n let query = `+Scope:北美地区数据集 +Database:Periodical +Roles:researcher +AccessType:SELECT`\n query = `Scope:北美地区数据集 Database:peridocal AccessType:SELECT (Roles:researcher or Roles:1pk)`\n query = `Roles:${role}`\n const res = await this.api.permissionsServiceList({ query: query, paginateLimit: 100 } as any);\n return handlePbError(res)\n\n } catch (error) {\n return { error }\n }\n // const permissions = _.filter(this.permissions, (permission) => {\n // return _.includes(permission.roles, role)\n // })\n\n // return permissions\n }\n async importPermissions(permissions: any) {\n let pathParams = {};\n let queryParams = {};\n let headerParams = {};\n let formParams = {\n file: permissions\n };\n let postBody = {};\n let authNames: any = [];\n let contentTypes = ['multipart/form-data'];\n let accepts = ['application/json'];\n let returnType = {};\n\n return this.api.apiClient.callApi(\n '/v1/permissions/import', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n // client.callApi(\"/v1/locales/import\", \"POST\", {}, {}, {}, {\n // \"plugin\": files[0]\n // }, {}, [], ['multipart/form-data'], [], null)\n }\n}\n\n\n\nexport const PermissionsStore = new permissionsStore()\nvar localPermissionsStore: any\nexport const getPermissionStore = (authc: any, apiUrl: any) => {\n if (localPermissionsStore) {\n return localPermissionsStore\n }\n if (!authc) {\n return\n }\n localPermissionsStore = new permissionsStoreRemote(authc, apiUrl)\n return localPermissionsStore\n}\n\n","import { Authentication } from './oauth';\nimport { getPermissionStore } from './permissions';\nimport { RolesStore } from './roles';\n\n\n\nclass Plugin {\n constructor() {\n }\n\n setup = ({\n ...core\n }, {\n ...other\n }) => {\n const { security } = other;\n core.application.register({\n id: 'security',\n title: 'security',\n mount: async (context: any, params: any) => {\n // const oauth = new Authentication({\n // clientId: \"gjk78q7wjfgcdcdcoe86ywgrpy\",\n // clientSecret: \"m4omu4j9mfbn58md83rxakoewc\",\n // // accessTokenUri: \"https://oversea.wanfangdata.com.cn/test/oauth/token\",\n // accessTokenUri: \"https://globe.wanfangdata.com.cn/test/oauth/access_token\",\n // authorizationUri: \"https://globe.wanfangdata.com.cn/test/oauth/authorize\",\n // redirectUri: \"http://localhost:3000/app/security_settings/callback\",\n // })\n const wfConfig = core.coreStore.get(\"wfConfig\")\n const {\n renderApp\n } = await import('./application');\n return renderApp(context, {\n ...params,\n oauth: security.authc,\n permissionsStore: getPermissionStore(security.authc, wfConfig.apiURL.href),\n rolesStore: RolesStore(security.authc, wfConfig.apiURL.href),\n wfConfig: wfConfig,\n });\n }\n });\n return this\n }\n start = (core: any) => {\n const { chrome } = core\n chrome.addNavs(\"security\", {\n display: \"安全设置\",\n href: \"/app/security\",\n icon: ()\n })\n\n }\n stop = () => {\n\n }\n\n}\n\nexport class SecurityPlugin {\n private authc!: Authentication\n constructor() {\n\n }\n setup = async ({ application, getStartServices, http, config, ...core }: any) => {\n // core.application.register({\n // id: 'demo',\n // title: 'demo',\n // mount: async (context: any, params: any) => {\n // const {\n // renderApp\n // } = await import('./application');\n\n // return renderApp(context, params);\n\n // }\n // });\n // const api = await (new core.api(undefined, undefined)).setup()\n const api = {}\n this.authc = new Authentication({\n clientId: \"h9d87pgfyty9jczqoh6t9z1r1r\",\n clientSecret: \"k7kap4mtyfdcicwgaufhj9mhmw\",\n accessTokenUri: \"https://accounts.dr2am.cn/oauth/access_token\",\n authorizationUri: \"https://accounts.dr2am.cn/oauth/authorize\",\n // redirectUri: \"https://globe.wanfangdata.com.cn/oauth/authorize\",\n // authorizationUri: \"https://globe.wanfangdata.com.cn/oauth/authorize\",\n redirectUri: \"http://localhost:3000/app/security/callback\",\n })\n\n //nada\n // this.authc = new Authentication({\n // clientId: \"h9d87pgfyty9jczqoh6t9z1r1r\",\n // clientSecret: \"k7kap4mtyfdcicwgaufhj9mhmw\",\n // // accessTokenUri: \"https://oversea.wanfangdata.com.cn/test/oauth/token\",\n // accessTokenUri: \"https://accounts.dr2am.cn/oauth/access_token\",\n // authorizationUri: \"https://accounts.dr2am.cn/oauth/authorize\",\n // redirectUri: \"http://localhost:3000/app/security/callback\",\n // })\n\n this.authc = new Authentication({\n clientId: \"sfqsexdn1in4dcmweruhu6m7xe\",\n clientSecret: \"99rpyb7shj85byjk5nntu1ojjh\",\n // accessTokenUri: \"https://oversea.wanfangdata.com.cn/test/oauth/token\",\n accessTokenUri: \"https://accounts.dr2am.cn/oauth/access_token\",\n authorizationUri: \"https://accounts.dr2am.cn/oauth/authorize\",\n redirectUri: \"http://localhost:3000/app/security/callback\",\n })\n\n //oversea\n this.authc = new Authentication({\n clientId: \"1f96jzkonfbhdyzd96ny19nmwa\",\n clientSecret: \"8oaawm1jppdx7bkkr44p4oaasw\",\n // accessTokenUri: \"https://oversea.wanfangdata.com.cn/test/oauth/token\",\n accessTokenUri: \"https://oversea.wanfangdata.com.cn/oauth/access_token\",\n authorizationUri: \"https://oversea.wanfangdata.com.cn/oauth/authorize\",\n revokeUri: \"https://oversea.wanfangdata.com.cn/oauth/deauthorize\",\n redirectUri: \"http://localhost:3000/app/security/callback\",\n\n })\n\n // globe\n // this.authc = new Authentication({\n // clientId: \"ribiih6fqpgt8bkg5nf161wr5w\",\n // clientSecret: \"p63q5ymp43gq5jm57rwzjcwr4o\",\n // accessTokenUri: \"https://oversea.wanfangdata.com.cn/test/oauth/token\",\n // authorizationUri: \"https://oversea.wanfangdata.com.cn/oauth/authorize\",\n\n // // accessTokenUri: \"https://globe.wanfangdata.com.cn/oauth/access_token\",\n // // authorizationUri: \"https://globe.wanfangdata.com.cn/oauth/authorize\",\n // // redirectUri: \"https://globe.wanfangdata.com.cn/app/security/callback\",\n // // redirectUri: \"https://globe.wanfangdata.com.cn/app/security/callback\",\n // redirectUri: \"http://localhost:3000/app/security/callback\",\n // })\n\n // globehk\n this.authc = new Authentication({\n clientId: \"gqhq9ieyw7rduc61wc5367caqh\",\n clientSecret: \"zx8zru3yxf8nidgnd8mfwt14co\",\n // accessTokenUri: \"https://oversea.wanfangdata.com.cn/test/oauth/token\",\n accessTokenUri: \"https://globe.wanfangdata.com.hk/oauth/access_token\",\n authorizationUri: \"https://globe.wanfangdata.com.hk/oauth/authorize\",\n // revokeUri: \"https://oversea.wanfangdata.com.cn/oauth/deauthorize\",\n // redirectUri: \"https://globe.wanfangdata.com.cn/app/security/callback\",\n // redirectUri: \"http://localhost:3000/app/security/callback\",\n redirectUri: `${window.location.origin}/app/security/callback`,\n\n })\n\n return {\n authc: this.authc\n }\n }\n start = (core: any) => { }\n stop() { }\n\n}\n// http://localhost:3000/app/security/callback\n// https://globe.wanfangdata.com.cn/app/security/callback\n// http://globe.wanfangdata.com.cn/app/security/callback\n// https://globe.wanfangdata.com.hk/app/security/callback\n// http://globe.wanfangdata.com.hk/app/security/callback\n\nconst registerPlugin = (window: any) => {\n const security_settings = () => new Plugin();\n const security = () => new SecurityPlugin();\n window.registerPlugin(\"security\", {\n id: \"security\",\n plugin: {\n id: \"security\",\n configPath: \"\",\n instance: security,\n // requiredPlugins: [\"security\"]\n },\n })\n window.registerPlugin(\"security_settings\", {\n id: \"security_settings\",\n plugin: {\n id: \"security_settings\",\n configPath: \"\",\n instance: security_settings,\n requiredPlugins: [\"security\"]\n },\n })\n\n}\n\n// export const Home = () => new Plugin();\nconst home = {\n registerPlugin: registerPlugin\n}\nexport default home\n","\n\n\nclass Plugin {\n constructor() {\n }\n\n setup = ({\n ...core\n }, {\n ...other\n }) => {\n const { security } = other\n core.application.register({\n id: 'analysis',\n title: 'analysis',\n mount: async (context: any, params: any) => {\n const {\n renderApp\n } = await import('./application');\n return renderApp(context, {\n ...params,\n authc: security.authc,\n coreStore: core.coreStore,\n });\n }\n });\n return this\n }\n start = (core: any) => {\n const { chrome } = core\n chrome.addNavs(\"analysis\", {\n display: \"主页\",\n href: \"/app/home\",\n icon: ()\n })\n\n }\n stop = () => {\n\n }\n\n}\n\n\n\nconst registerPlugin = (window: any) => {\n const Home = () => new Plugin();\n window.registerPlugin(\"analysis\", {\n id: \"analysis\",\n plugin: {\n id: \"analysis\",\n configPath: \"\",\n instance: Home,\n requiredPlugins: [\"security\"]\n },\n })\n}\n\n// export const Home = () => new Plugin();\nconst home = {\n registerPlugin: registerPlugin\n}\nexport default home","import { SideBarSection } from '../../components/sidebar/section';\n\n\nclass Plugin {\n constructor() {\n }\n private actions: any\n setup = ({\n ...core\n }, {\n action_creaetCollection,\n ...other\n }: any) => {\n this.actions = { action_creaetCollection }\n const { api } = core\n core.application.register({\n id: 'locales',\n title: 'locales',\n mount: async (context: any, params: any) => {\n const {\n renderApp\n } = await import('./application');\n return renderApp(context, {\n ...params,\n api,\n actions: this.actions,\n authc: other.security.authc,\n });\n }\n });\n return this\n }\n start = (core: any) => {\n const { chrome } = core\n const openCreateCollectionModal = () => {\n this.actions.action_creaetCollection.action()\n // chrome.setGlobalModal(aaaa)\n }\n const createCollection = new SideBarSection(\"collection_create\", {\n display: \"新建数据集\",\n icon: ,\n onClick: openCreateCollectionModal\n })\n const CollectionList = new SideBarSection(\"collection_list\", {\n display: \"列表\",\n icon: ,\n href: \"/app/collection\"\n })\n // const collection = new SideBarSection()\n chrome.addNavs(\"collection\", {\n display: \"数据集\",\n icon: (),\n items: [CollectionList, createCollection]\n })\n\n }\n stop = () => {\n\n }\n\n}\n\n\n\nconst registerPlugin = (window: any) => {\n const collection = () => new Plugin();\n window.registerPlugin(\"locales\", {\n id: \"locales\",\n plugin: {\n id: \"locales\",\n configPath: \"\",\n instance: collection,\n requiredPlugins: [\"security\", \"action_creaetCollection\"]\n },\n })\n}\n\n// export const Home = () => new Plugin();\nconst collection = {\n registerPlugin: registerPlugin\n}\nexport default collection","import {\n init,\n captureMessage,\n} from '@sentry/browser';\n\nfunction HappyTransport() {\n async function sendEvent(event) {\n const eventType = event.level\n const url = `https://oversea.wanfangdata.com.cn/v1/analysis:push_event`\n var req = {\n method: 'POST',\n body: JSON.stringify(event),\n // type: eventType,\n };\n console.log(\"sendEvent\", req);\n\n const res = await fetch(url, req)\n console.log(res);\n return res\n }\n return {\n async send(request) {\n // console.log(\"request\");\n // console.log(request[1]);\n // console.log(request[1][0][1]);\n return sendEvent(request[1][0][1])\n },\n async flush(timeout) {}\n }\n\n\n}\n\ninit({\n dsn: 'https://363a337c11a64611be4845ad6e24f3ac@oversea.wanfangdata.com.cn/297378',\n // dsn: 'https://a@localhost:3000/297378',\n // ...\n enabled: true,\n debug: true,\n transport: HappyTransport,\n beforeSend: function (event, hit) {\n // console.log(\"event, hit\");\n // console.log(event);\n // console.log(hit);\n return event\n }\n});","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The CollectionCollectionBase model module.\n * @module model/CollectionCollectionBase\n * @version version not set\n */\nexport class CollectionCollectionBase {\n /**\n * Constructs a new CollectionCollectionBase.\n * @alias module:model/CollectionCollectionBase\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a CollectionCollectionBase from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/CollectionCollectionBase} obj Optional instance to populate.\n * @return {module:model/CollectionCollectionBase} The populated CollectionCollectionBase instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new CollectionCollectionBase();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('name'))\n obj.name = ApiClient.convertToType(data['name'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nCollectionCollectionBase.prototype.id = undefined;\n\n/**\n * @member {String} name\n */\nCollectionCollectionBase.prototype.name = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {CollectionCollectionBase} from './CollectionCollectionBase';\n\n/**\n * The CollectionCreateCollectionRequest model module.\n * @module model/CollectionCreateCollectionRequest\n * @version version not set\n */\nexport class CollectionCreateCollectionRequest {\n /**\n * Constructs a new CollectionCreateCollectionRequest.\n * @alias module:model/CollectionCreateCollectionRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a CollectionCreateCollectionRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/CollectionCreateCollectionRequest} obj Optional instance to populate.\n * @return {module:model/CollectionCreateCollectionRequest} The populated CollectionCreateCollectionRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new CollectionCreateCollectionRequest();\n if (data.hasOwnProperty('collection'))\n obj.collection = CollectionCollectionBase.constructFromObject(data['collection']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/CollectionCollectionBase} collection\n */\nCollectionCreateCollectionRequest.prototype.collection = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The CollectionResponseResponseState model module.\n * @module model/CollectionResponseResponseState\n * @version version not set\n */\nexport class CollectionResponseResponseState {\n /**\n * Constructs a new CollectionResponseResponseState.\n * @alias module:model/CollectionResponseResponseState\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a CollectionResponseResponseState from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/CollectionResponseResponseState} obj Optional instance to populate.\n * @return {module:model/CollectionResponseResponseState} The populated CollectionResponseResponseState instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new CollectionResponseResponseState();\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n if (data.hasOwnProperty('message'))\n obj.message = ApiClient.convertToType(data['message'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {Number} code\n */\nCollectionResponseResponseState.prototype.code = undefined;\n\n/**\n * @member {String} message\n */\nCollectionResponseResponseState.prototype.message = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {CollectionCollectionBase} from './CollectionCollectionBase';\nimport {CollectionResponseResponseState} from './CollectionResponseResponseState';\n\n/**\n * The CollectionCreateCollectionResponse model module.\n * @module model/CollectionCreateCollectionResponse\n * @version version not set\n */\nexport class CollectionCreateCollectionResponse {\n /**\n * Constructs a new CollectionCreateCollectionResponse.\n * @alias module:model/CollectionCreateCollectionResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a CollectionCreateCollectionResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/CollectionCreateCollectionResponse} obj Optional instance to populate.\n * @return {module:model/CollectionCreateCollectionResponse} The populated CollectionCreateCollectionResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new CollectionCreateCollectionResponse();\n if (data.hasOwnProperty('result'))\n obj.result = CollectionCollectionBase.constructFromObject(data['result']);\n if (data.hasOwnProperty('state'))\n obj.state = CollectionResponseResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/CollectionCollectionBase} result\n */\nCollectionCreateCollectionResponse.prototype.result = undefined;\n\n/**\n * @member {module:model/CollectionResponseResponseState} state\n */\nCollectionCreateCollectionResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {CollectionCollectionBase} from './CollectionCollectionBase';\n\n/**\n * The CollectionDeleteCollectionRequest model module.\n * @module model/CollectionDeleteCollectionRequest\n * @version version not set\n */\nexport class CollectionDeleteCollectionRequest {\n /**\n * Constructs a new CollectionDeleteCollectionRequest.\n * @alias module:model/CollectionDeleteCollectionRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a CollectionDeleteCollectionRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/CollectionDeleteCollectionRequest} obj Optional instance to populate.\n * @return {module:model/CollectionDeleteCollectionRequest} The populated CollectionDeleteCollectionRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new CollectionDeleteCollectionRequest();\n if (data.hasOwnProperty('collection'))\n obj.collection = CollectionCollectionBase.constructFromObject(data['collection']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/CollectionCollectionBase} collection\n */\nCollectionDeleteCollectionRequest.prototype.collection = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {CollectionResponseResponseState} from './CollectionResponseResponseState';\n\n/**\n * The CollectionDeleteCollectionResponse model module.\n * @module model/CollectionDeleteCollectionResponse\n * @version version not set\n */\nexport class CollectionDeleteCollectionResponse {\n /**\n * Constructs a new CollectionDeleteCollectionResponse.\n * @alias module:model/CollectionDeleteCollectionResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a CollectionDeleteCollectionResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/CollectionDeleteCollectionResponse} obj Optional instance to populate.\n * @return {module:model/CollectionDeleteCollectionResponse} The populated CollectionDeleteCollectionResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new CollectionDeleteCollectionResponse();\n if (data.hasOwnProperty('state'))\n obj.state = CollectionResponseResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/CollectionResponseResponseState} state\n */\nCollectionDeleteCollectionResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The CollectionResponseCount model module.\n * @module model/CollectionResponseCount\n * @version version not set\n */\nexport class CollectionResponseCount {\n /**\n * Constructs a new CollectionResponseCount.\n * @alias module:model/CollectionResponseCount\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a CollectionResponseCount from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/CollectionResponseCount} obj Optional instance to populate.\n * @return {module:model/CollectionResponseCount} The populated CollectionResponseCount instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new CollectionResponseCount();\n if (data.hasOwnProperty('Num'))\n obj.num = ApiClient.convertToType(data['Num'], 'Number');\n }\n return obj;\n }\n}\n\n/**\n * @member {Number} num\n */\nCollectionResponseCount.prototype.num = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {CollectionCollectionBase} from './CollectionCollectionBase';\nimport {CollectionResponseCount} from './CollectionResponseCount';\nimport {CollectionResponseResponseState} from './CollectionResponseResponseState';\n\n/**\n * The CollectionListCollectionResponse model module.\n * @module model/CollectionListCollectionResponse\n * @version version not set\n */\nexport class CollectionListCollectionResponse {\n /**\n * Constructs a new CollectionListCollectionResponse.\n * @alias module:model/CollectionListCollectionResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a CollectionListCollectionResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/CollectionListCollectionResponse} obj Optional instance to populate.\n * @return {module:model/CollectionListCollectionResponse} The populated CollectionListCollectionResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new CollectionListCollectionResponse();\n if (data.hasOwnProperty('result'))\n obj.result = ApiClient.convertToType(data['result'], [CollectionCollectionBase]);\n if (data.hasOwnProperty('count'))\n obj.count = CollectionResponseCount.constructFromObject(data['count']);\n if (data.hasOwnProperty('state'))\n obj.state = CollectionResponseResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} result\n */\nCollectionListCollectionResponse.prototype.result = undefined;\n\n/**\n * @member {module:model/CollectionResponseCount} count\n */\nCollectionListCollectionResponse.prototype.count = undefined;\n\n/**\n * @member {module:model/CollectionResponseResponseState} state\n */\nCollectionListCollectionResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ListCollectionRequestPaginate model module.\n * @module model/ListCollectionRequestPaginate\n * @version version not set\n */\nexport class ListCollectionRequestPaginate {\n /**\n * Constructs a new ListCollectionRequestPaginate.\n * @alias module:model/ListCollectionRequestPaginate\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ListCollectionRequestPaginate from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ListCollectionRequestPaginate} obj Optional instance to populate.\n * @return {module:model/ListCollectionRequestPaginate} The populated ListCollectionRequestPaginate instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ListCollectionRequestPaginate();\n if (data.hasOwnProperty('offset'))\n obj.offset = ApiClient.convertToType(data['offset'], 'Number');\n if (data.hasOwnProperty('limit'))\n obj.limit = ApiClient.convertToType(data['limit'], 'Number');\n }\n return obj;\n }\n}\n\n/**\n * @member {Number} offset\n */\nListCollectionRequestPaginate.prototype.offset = undefined;\n\n/**\n * @member {Number} limit\n */\nListCollectionRequestPaginate.prototype.limit = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufAny model module.\n * @module model/ProtobufAny\n * @version version not set\n */\nexport class ProtobufAny {\n /**\n * Constructs a new ProtobufAny.\n * @alias module:model/ProtobufAny\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufAny from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufAny} obj Optional instance to populate.\n * @return {module:model/ProtobufAny} The populated ProtobufAny instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufAny();\n if (data.hasOwnProperty('type_url'))\n obj.typeUrl = ApiClient.convertToType(data['type_url'], 'String');\n if (data.hasOwnProperty('value'))\n obj.value = ApiClient.convertToType(data['value'], 'Blob');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} typeUrl\n */\nProtobufAny.prototype.typeUrl = undefined;\n\n/**\n * @member {Blob} value\n */\nProtobufAny.prototype.value = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ProtobufAny} from './ProtobufAny';\n\n/**\n * The RuntimeError model module.\n * @module model/RuntimeError\n * @version version not set\n */\nexport class RuntimeError {\n /**\n * Constructs a new RuntimeError.\n * @alias module:model/RuntimeError\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a RuntimeError from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/RuntimeError} obj Optional instance to populate.\n * @return {module:model/RuntimeError} The populated RuntimeError instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new RuntimeError();\n if (data.hasOwnProperty('error'))\n obj.error = ApiClient.convertToType(data['error'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n if (data.hasOwnProperty('message'))\n obj.message = ApiClient.convertToType(data['message'], 'String');\n if (data.hasOwnProperty('details'))\n obj.details = ApiClient.convertToType(data['details'], [ProtobufAny]);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} error\n */\nRuntimeError.prototype.error = undefined;\n\n/**\n * @member {Number} code\n */\nRuntimeError.prototype.code = undefined;\n\n/**\n * @member {String} message\n */\nRuntimeError.prototype.message = undefined;\n\n/**\n * @member {Array.} details\n */\nRuntimeError.prototype.details = undefined;\n\n\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from \"../ApiClient\";\nimport {CollectionCreateCollectionRequest} from '../model/CollectionCreateCollectionRequest';\nimport {CollectionCreateCollectionResponse} from '../model/CollectionCreateCollectionResponse';\nimport {CollectionDeleteCollectionRequest} from '../model/CollectionDeleteCollectionRequest';\nimport {CollectionDeleteCollectionResponse} from '../model/CollectionDeleteCollectionResponse';\nimport {CollectionListCollectionResponse} from '../model/CollectionListCollectionResponse';\nimport {RuntimeError} from '../model/RuntimeError';\n\n/**\n* Collection service.\n* @module api/CollectionApi\n* @version version not set\n*/\nexport class CollectionApi {\n\n /**\n * Constructs a new CollectionApi. \n * @alias module:api/CollectionApi\n * @class\n * @param {module:ApiClient} [apiClient] Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\n constructor(apiClient) {\n this.apiClient = apiClient || ApiClient.instance;\n }\n\n\n\n /**\n * @param {module:model/CollectionCreateCollectionRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionCreateCollectionResponse} and HTTP response\n */\n collectionCreateWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling collectionCreate\");\n }\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = CollectionCreateCollectionResponse;\n\n return this.apiClient.callApi(\n '/v1/collection.create', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * @param {module:model/CollectionCreateCollectionRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionCreateCollectionResponse}\n */\n collectionCreate(body) {\n return this.collectionCreateWithHttpInfo(body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * @param {module:model/CollectionDeleteCollectionRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionDeleteCollectionResponse} and HTTP response\n */\n collectionDeleteWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling collectionDelete\");\n }\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = CollectionDeleteCollectionResponse;\n\n return this.apiClient.callApi(\n '/v1/collection.delete', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * @param {module:model/CollectionDeleteCollectionRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionDeleteCollectionResponse}\n */\n collectionDelete(body) {\n return this.collectionDeleteWithHttpInfo(body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionListCollectionResponse} and HTTP response\n */\n collectionListWithHttpInfo() {\n let postBody = null;\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = CollectionListCollectionResponse;\n\n return this.apiClient.callApi(\n '/v1/collection.list', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionListCollectionResponse}\n */\n collectionList() {\n return this.collectionListWithHttpInfo()\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n}\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The PbPaginate model module.\n * @module model/PbPaginate\n * @version version not set\n */\nexport class PbPaginate {\n /**\n * Constructs a new PbPaginate.\n * @alias module:model/PbPaginate\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbPaginate from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbPaginate} obj Optional instance to populate.\n * @return {module:model/PbPaginate} The populated PbPaginate instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbPaginate();\n if (data.hasOwnProperty('offset'))\n obj.offset = ApiClient.convertToType(data['offset'], 'Number');\n if (data.hasOwnProperty('limit'))\n obj.limit = ApiClient.convertToType(data['limit'], 'Number');\n if (data.hasOwnProperty('next_page_token'))\n obj.nextPageToken = ApiClient.convertToType(data['next_page_token'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {Number} offset\n */\nPbPaginate.prototype.offset = undefined;\n\n/**\n * @member {Number} limit\n */\nPbPaginate.prototype.limit = undefined;\n\n/**\n * @member {String} nextPageToken\n */\nPbPaginate.prototype.nextPageToken = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * Enum class ResponseStateState.\n * @enum {String}\n * @readonly\n */\nconst ResponseStateState = {\n /**\n * value: \"unknow\"\n * @const\n */\n unknow: \"unknow\",\n\n /**\n * value: \"success\"\n * @const\n */\n success: \"success\",\n\n /**\n * value: \"fail\"\n * @const\n */\n fail: \"fail\",\n\n /**\n * Returns a ResponseStateState enum value from a JavaScript object name.\n * @param {Object} data The plain JavaScript object containing the name of the enum value.\n * @return {module:model/ResponseStateState} The enum ResponseStateState value.\n */\n constructFromObject: function(object) {\n return object;\n }\n};\n\nexport {ResponseStateState};\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ResponseStateState} from './ResponseStateState';\n\n/**\n * The PbResponseState model module.\n * @module model/PbResponseState\n * @version version not set\n */\nexport class PbResponseState {\n /**\n * Constructs a new PbResponseState.\n * @alias module:model/PbResponseState\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbResponseState from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbResponseState} obj Optional instance to populate.\n * @return {module:model/PbResponseState} The populated PbResponseState instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbResponseState();\n if (data.hasOwnProperty('state'))\n obj.state = ResponseStateState.constructFromObject(data['state']);\n if (data.hasOwnProperty('msg'))\n obj.msg = ApiClient.convertToType(data['msg'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/ResponseStateState} state\n */\nPbResponseState.prototype.state = undefined;\n\n/**\n * @member {String} msg\n */\nPbResponseState.prototype.msg = undefined;\n\n/**\n * @member {Number} code\n */\nPbResponseState.prototype.code = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufAny model module.\n * @module model/ProtobufAny\n * @version version not set\n */\nexport class ProtobufAny {\n /**\n * Constructs a new ProtobufAny.\n * @alias module:model/ProtobufAny\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufAny from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufAny} obj Optional instance to populate.\n * @return {module:model/ProtobufAny} The populated ProtobufAny instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufAny();\n if (data.hasOwnProperty('type_url'))\n obj.typeUrl = ApiClient.convertToType(data['type_url'], 'String');\n if (data.hasOwnProperty('value'))\n obj.value = ApiClient.convertToType(data['value'], 'Blob');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} typeUrl\n */\nProtobufAny.prototype.typeUrl = undefined;\n\n/**\n * @member {Blob} value\n */\nProtobufAny.prototype.value = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufFieldMask model module.\n * @module model/ProtobufFieldMask\n * @version version not set\n */\nexport class ProtobufFieldMask {\n /**\n * Constructs a new ProtobufFieldMask.\n * paths: \\\"f.a\\\" paths: \\\"f.b.d\\\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, the existing repeated values in the target resource will be overwritten by the new values. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then the existing sub-message in the target resource is overwritten. Given the target message: f { b { d : 1 x : 2 } c : 1 } And an update message: f { b { d : 10 } } then if the field mask is: paths: \\\"f.b\\\" then the result will be: f { b { d : 10 } c : 1 } However, if the update mask was: paths: \\\"f.b.d\\\" then the result would be: f { b { d : 10 x : 2 } c : 1 } In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \\\"user.display_name\\\" paths: \\\"photo\\\" } In JSON, the same mask is represented as below: { mask: \\\"user.displayName,photo\\\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \\\"name\\\" } Or: mask { paths: \\\"sub_message\\\" } Note that oneof type names (\\\"test_oneof\\\" in this case) cannot be used in paths.\n * @alias module:model/ProtobufFieldMask\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufFieldMask from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufFieldMask} obj Optional instance to populate.\n * @return {module:model/ProtobufFieldMask} The populated ProtobufFieldMask instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufFieldMask();\n if (data.hasOwnProperty('paths'))\n obj.paths = ApiClient.convertToType(data['paths'], ['String']);\n }\n return obj;\n }\n}\n\n/**\n * The set of field mask paths.\n * @member {Array.} paths\n */\nProtobufFieldMask.prototype.paths = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * Enum class ProtobufNullValue.\n * @enum {String}\n * @readonly\n */\nconst ProtobufNullValue = {\n /**\n * value: \"NULL_VALUE\"\n * @const\n */\n NULL_VALUE: \"NULL_VALUE\",\n\n /**\n * Returns a ProtobufNullValue enum value from a JavaScript object name.\n * @param {Object} data The plain JavaScript object containing the name of the enum value.\n * @return {module:model/ProtobufNullValue} The enum ProtobufNullValue value.\n */\n constructFromObject: function(object) {\n return object;\n }\n};\n\nexport {ProtobufNullValue};\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ProtobufAny} from './ProtobufAny';\n\n/**\n * The RuntimeError model module.\n * @module model/RuntimeError\n * @version version not set\n */\nexport class RuntimeError {\n /**\n * Constructs a new RuntimeError.\n * @alias module:model/RuntimeError\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a RuntimeError from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/RuntimeError} obj Optional instance to populate.\n * @return {module:model/RuntimeError} The populated RuntimeError instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new RuntimeError();\n if (data.hasOwnProperty('error'))\n obj.error = ApiClient.convertToType(data['error'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n if (data.hasOwnProperty('message'))\n obj.message = ApiClient.convertToType(data['message'], 'String');\n if (data.hasOwnProperty('details'))\n obj.details = ApiClient.convertToType(data['details'], [ProtobufAny]);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} error\n */\nRuntimeError.prototype.error = undefined;\n\n/**\n * @member {Number} code\n */\nRuntimeError.prototype.code = undefined;\n\n/**\n * @member {String} message\n */\nRuntimeError.prototype.message = undefined;\n\n/**\n * @member {Array.} details\n */\nRuntimeError.prototype.details = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ServiceAddLocaleLanguageRequest model module.\n * @module model/ServiceAddLocaleLanguageRequest\n * @version version not set\n */\nexport class ServiceAddLocaleLanguageRequest {\n /**\n * Constructs a new ServiceAddLocaleLanguageRequest.\n * @alias module:model/ServiceAddLocaleLanguageRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceAddLocaleLanguageRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceAddLocaleLanguageRequest} obj Optional instance to populate.\n * @return {module:model/ServiceAddLocaleLanguageRequest} The populated ServiceAddLocaleLanguageRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceAddLocaleLanguageRequest();\n if (data.hasOwnProperty('name'))\n obj.name = ApiClient.convertToType(data['name'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} name\n */\nServiceAddLocaleLanguageRequest.prototype.name = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceAddLocaleLanguageResponse model module.\n * @module model/ServiceAddLocaleLanguageResponse\n * @version version not set\n */\nexport class ServiceAddLocaleLanguageResponse {\n /**\n * Constructs a new ServiceAddLocaleLanguageResponse.\n * @alias module:model/ServiceAddLocaleLanguageResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceAddLocaleLanguageResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceAddLocaleLanguageResponse} obj Optional instance to populate.\n * @return {module:model/ServiceAddLocaleLanguageResponse} The populated ServiceAddLocaleLanguageResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceAddLocaleLanguageResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceAddLocaleLanguageResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ServiceAddLocaleNameSpaceRequest model module.\n * @module model/ServiceAddLocaleNameSpaceRequest\n * @version version not set\n */\nexport class ServiceAddLocaleNameSpaceRequest {\n /**\n * Constructs a new ServiceAddLocaleNameSpaceRequest.\n * @alias module:model/ServiceAddLocaleNameSpaceRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceAddLocaleNameSpaceRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceAddLocaleNameSpaceRequest} obj Optional instance to populate.\n * @return {module:model/ServiceAddLocaleNameSpaceRequest} The populated ServiceAddLocaleNameSpaceRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceAddLocaleNameSpaceRequest();\n if (data.hasOwnProperty('name'))\n obj.name = ApiClient.convertToType(data['name'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} name\n */\nServiceAddLocaleNameSpaceRequest.prototype.name = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceAddLocaleNameSpaceResponse model module.\n * @module model/ServiceAddLocaleNameSpaceResponse\n * @version version not set\n */\nexport class ServiceAddLocaleNameSpaceResponse {\n /**\n * Constructs a new ServiceAddLocaleNameSpaceResponse.\n * @alias module:model/ServiceAddLocaleNameSpaceResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceAddLocaleNameSpaceResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceAddLocaleNameSpaceResponse} obj Optional instance to populate.\n * @return {module:model/ServiceAddLocaleNameSpaceResponse} The populated ServiceAddLocaleNameSpaceResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceAddLocaleNameSpaceResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceAddLocaleNameSpaceResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceAddLocaleResponse model module.\n * @module model/ServiceAddLocaleResponse\n * @version version not set\n */\nexport class ServiceAddLocaleResponse {\n /**\n * Constructs a new ServiceAddLocaleResponse.\n * @alias module:model/ServiceAddLocaleResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceAddLocaleResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceAddLocaleResponse} obj Optional instance to populate.\n * @return {module:model/ServiceAddLocaleResponse} The populated ServiceAddLocaleResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceAddLocaleResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceAddLocaleResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPaginate} from './PbPaginate';\n\n/**\n * The ServiceListLocaleLanguagesRequest model module.\n * @module model/ServiceListLocaleLanguagesRequest\n * @version version not set\n */\nexport class ServiceListLocaleLanguagesRequest {\n /**\n * Constructs a new ServiceListLocaleLanguagesRequest.\n * @alias module:model/ServiceListLocaleLanguagesRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListLocaleLanguagesRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListLocaleLanguagesRequest} obj Optional instance to populate.\n * @return {module:model/ServiceListLocaleLanguagesRequest} The populated ServiceListLocaleLanguagesRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListLocaleLanguagesRequest();\n if (data.hasOwnProperty('query'))\n obj.query = ApiClient.convertToType(data['query'], 'String');\n if (data.hasOwnProperty('paginate'))\n obj.paginate = PbPaginate.constructFromObject(data['paginate']);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} query\n */\nServiceListLocaleLanguagesRequest.prototype.query = undefined;\n\n/**\n * @member {module:model/PbPaginate} paginate\n */\nServiceListLocaleLanguagesRequest.prototype.paginate = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ServiceLocaleLanguage model module.\n * @module model/ServiceLocaleLanguage\n * @version version not set\n */\nexport class ServiceLocaleLanguage {\n /**\n * Constructs a new ServiceLocaleLanguage.\n * @alias module:model/ServiceLocaleLanguage\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceLocaleLanguage from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceLocaleLanguage} obj Optional instance to populate.\n * @return {module:model/ServiceLocaleLanguage} The populated ServiceLocaleLanguage instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceLocaleLanguage();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('language'))\n obj.language = ApiClient.convertToType(data['language'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nServiceLocaleLanguage.prototype.id = undefined;\n\n/**\n * @member {String} language\n */\nServiceLocaleLanguage.prototype.language = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\nimport {ServiceLocaleLanguage} from './ServiceLocaleLanguage';\n\n/**\n * The ServiceListLocaleLanguagesResponse model module.\n * @module model/ServiceListLocaleLanguagesResponse\n * @version version not set\n */\nexport class ServiceListLocaleLanguagesResponse {\n /**\n * Constructs a new ServiceListLocaleLanguagesResponse.\n * @alias module:model/ServiceListLocaleLanguagesResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListLocaleLanguagesResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListLocaleLanguagesResponse} obj Optional instance to populate.\n * @return {module:model/ServiceListLocaleLanguagesResponse} The populated ServiceListLocaleLanguagesResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListLocaleLanguagesResponse();\n if (data.hasOwnProperty('data'))\n obj.data = ApiClient.convertToType(data['data'], [ServiceLocaleLanguage]);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} data\n */\nServiceListLocaleLanguagesResponse.prototype.data = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceListLocaleLanguagesResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPaginate} from './PbPaginate';\n\n/**\n * The ServiceListLocaleNameSpacesRequest model module.\n * @module model/ServiceListLocaleNameSpacesRequest\n * @version version not set\n */\nexport class ServiceListLocaleNameSpacesRequest {\n /**\n * Constructs a new ServiceListLocaleNameSpacesRequest.\n * @alias module:model/ServiceListLocaleNameSpacesRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListLocaleNameSpacesRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListLocaleNameSpacesRequest} obj Optional instance to populate.\n * @return {module:model/ServiceListLocaleNameSpacesRequest} The populated ServiceListLocaleNameSpacesRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListLocaleNameSpacesRequest();\n if (data.hasOwnProperty('query'))\n obj.query = ApiClient.convertToType(data['query'], 'String');\n if (data.hasOwnProperty('paginate'))\n obj.paginate = PbPaginate.constructFromObject(data['paginate']);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} query\n */\nServiceListLocaleNameSpacesRequest.prototype.query = undefined;\n\n/**\n * @member {module:model/PbPaginate} paginate\n */\nServiceListLocaleNameSpacesRequest.prototype.paginate = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ServiceLocaleNameSpace model module.\n * @module model/ServiceLocaleNameSpace\n * @version version not set\n */\nexport class ServiceLocaleNameSpace {\n /**\n * Constructs a new ServiceLocaleNameSpace.\n * @alias module:model/ServiceLocaleNameSpace\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceLocaleNameSpace from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceLocaleNameSpace} obj Optional instance to populate.\n * @return {module:model/ServiceLocaleNameSpace} The populated ServiceLocaleNameSpace instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceLocaleNameSpace();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('name'))\n obj.name = ApiClient.convertToType(data['name'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nServiceLocaleNameSpace.prototype.id = undefined;\n\n/**\n * @member {String} name\n */\nServiceLocaleNameSpace.prototype.name = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\nimport {ServiceLocaleNameSpace} from './ServiceLocaleNameSpace';\n\n/**\n * The ServiceListLocaleNameSpacesResponse model module.\n * @module model/ServiceListLocaleNameSpacesResponse\n * @version version not set\n */\nexport class ServiceListLocaleNameSpacesResponse {\n /**\n * Constructs a new ServiceListLocaleNameSpacesResponse.\n * @alias module:model/ServiceListLocaleNameSpacesResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListLocaleNameSpacesResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListLocaleNameSpacesResponse} obj Optional instance to populate.\n * @return {module:model/ServiceListLocaleNameSpacesResponse} The populated ServiceListLocaleNameSpacesResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListLocaleNameSpacesResponse();\n if (data.hasOwnProperty('data'))\n obj.data = ApiClient.convertToType(data['data'], [ServiceLocaleNameSpace]);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} data\n */\nServiceListLocaleNameSpacesResponse.prototype.data = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceListLocaleNameSpacesResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPaginate} from './PbPaginate';\n\n/**\n * The ServiceListLocalesRequest model module.\n * @module model/ServiceListLocalesRequest\n * @version version not set\n */\nexport class ServiceListLocalesRequest {\n /**\n * Constructs a new ServiceListLocalesRequest.\n * @alias module:model/ServiceListLocalesRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListLocalesRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListLocalesRequest} obj Optional instance to populate.\n * @return {module:model/ServiceListLocalesRequest} The populated ServiceListLocalesRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListLocalesRequest();\n if (data.hasOwnProperty('query'))\n obj.query = ApiClient.convertToType(data['query'], 'String');\n if (data.hasOwnProperty('paginate'))\n obj.paginate = PbPaginate.constructFromObject(data['paginate']);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} query\n */\nServiceListLocalesRequest.prototype.query = undefined;\n\n/**\n * @member {module:model/PbPaginate} paginate\n */\nServiceListLocalesRequest.prototype.paginate = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ServiceLocale model module.\n * @module model/ServiceLocale\n * @version version not set\n */\nexport class ServiceLocale {\n /**\n * Constructs a new ServiceLocale.\n * @alias module:model/ServiceLocale\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceLocale from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceLocale} obj Optional instance to populate.\n * @return {module:model/ServiceLocale} The populated ServiceLocale instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceLocale();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('key'))\n obj.key = ApiClient.convertToType(data['key'], 'String');\n if (data.hasOwnProperty('value'))\n obj.value = ApiClient.convertToType(data['value'], 'String');\n if (data.hasOwnProperty('lang'))\n obj.lang = ApiClient.convertToType(data['lang'], 'String');\n if (data.hasOwnProperty('name_spaces'))\n obj.nameSpaces = ApiClient.convertToType(data['name_spaces'], 'String');\n if (data.hasOwnProperty('languages'))\n obj.languages = ApiClient.convertToType(data['languages'], {'String': 'String'});\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nServiceLocale.prototype.id = undefined;\n\n/**\n * @member {String} key\n */\nServiceLocale.prototype.key = undefined;\n\n/**\n * @member {String} value\n */\nServiceLocale.prototype.value = undefined;\n\n/**\n * @member {String} lang\n */\nServiceLocale.prototype.lang = undefined;\n\n/**\n * @member {String} nameSpaces\n */\nServiceLocale.prototype.nameSpaces = undefined;\n\n/**\n * @member {Object.} languages\n */\nServiceLocale.prototype.languages = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\nimport {ServiceLocale} from './ServiceLocale';\n\n/**\n * The ServiceListLocalesResponse model module.\n * @module model/ServiceListLocalesResponse\n * @version version not set\n */\nexport class ServiceListLocalesResponse {\n /**\n * Constructs a new ServiceListLocalesResponse.\n * @alias module:model/ServiceListLocalesResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListLocalesResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListLocalesResponse} obj Optional instance to populate.\n * @return {module:model/ServiceListLocalesResponse} The populated ServiceListLocalesResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListLocalesResponse();\n if (data.hasOwnProperty('data'))\n obj.data = ApiClient.convertToType(data['data'], [ServiceLocale]);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} data\n */\nServiceListLocalesResponse.prototype.data = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceListLocalesResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ServicePublishLocalesRequest model module.\n * @module model/ServicePublishLocalesRequest\n * @version version not set\n */\nexport class ServicePublishLocalesRequest {\n /**\n * Constructs a new ServicePublishLocalesRequest.\n * @alias module:model/ServicePublishLocalesRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServicePublishLocalesRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServicePublishLocalesRequest} obj Optional instance to populate.\n * @return {module:model/ServicePublishLocalesRequest} The populated ServicePublishLocalesRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServicePublishLocalesRequest();\n }\n return obj;\n }\n}\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServicePublishLocalesResponse model module.\n * @module model/ServicePublishLocalesResponse\n * @version version not set\n */\nexport class ServicePublishLocalesResponse {\n /**\n * Constructs a new ServicePublishLocalesResponse.\n * @alias module:model/ServicePublishLocalesResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServicePublishLocalesResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServicePublishLocalesResponse} obj Optional instance to populate.\n * @return {module:model/ServicePublishLocalesResponse} The populated ServicePublishLocalesResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServicePublishLocalesResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServicePublishLocalesResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceRemoveLocaleNameSpaceResponse model module.\n * @module model/ServiceRemoveLocaleNameSpaceResponse\n * @version version not set\n */\nexport class ServiceRemoveLocaleNameSpaceResponse {\n /**\n * Constructs a new ServiceRemoveLocaleNameSpaceResponse.\n * @alias module:model/ServiceRemoveLocaleNameSpaceResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceRemoveLocaleNameSpaceResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceRemoveLocaleNameSpaceResponse} obj Optional instance to populate.\n * @return {module:model/ServiceRemoveLocaleNameSpaceResponse} The populated ServiceRemoveLocaleNameSpaceResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceRemoveLocaleNameSpaceResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceRemoveLocaleNameSpaceResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceRemoveLocaleResponse model module.\n * @module model/ServiceRemoveLocaleResponse\n * @version version not set\n */\nexport class ServiceRemoveLocaleResponse {\n /**\n * Constructs a new ServiceRemoveLocaleResponse.\n * @alias module:model/ServiceRemoveLocaleResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceRemoveLocaleResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceRemoveLocaleResponse} obj Optional instance to populate.\n * @return {module:model/ServiceRemoveLocaleResponse} The populated ServiceRemoveLocaleResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceRemoveLocaleResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceRemoveLocaleResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ProtobufFieldMask} from './ProtobufFieldMask';\nimport {ServiceLocale} from './ServiceLocale';\n\n/**\n * The ServiceUpdateLocaleRequest model module.\n * @module model/ServiceUpdateLocaleRequest\n * @version version not set\n */\nexport class ServiceUpdateLocaleRequest {\n /**\n * Constructs a new ServiceUpdateLocaleRequest.\n * @alias module:model/ServiceUpdateLocaleRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdateLocaleRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdateLocaleRequest} obj Optional instance to populate.\n * @return {module:model/ServiceUpdateLocaleRequest} The populated ServiceUpdateLocaleRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdateLocaleRequest();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('locale'))\n obj.locale = ServiceLocale.constructFromObject(data['locale']);\n if (data.hasOwnProperty('update_mask'))\n obj.updateMask = ProtobufFieldMask.constructFromObject(data['update_mask']);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nServiceUpdateLocaleRequest.prototype.id = undefined;\n\n/**\n * @member {module:model/ServiceLocale} locale\n */\nServiceUpdateLocaleRequest.prototype.locale = undefined;\n\n/**\n * @member {module:model/ProtobufFieldMask} updateMask\n */\nServiceUpdateLocaleRequest.prototype.updateMask = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\nimport {ServiceLocale} from './ServiceLocale';\n\n/**\n * The ServiceUpdateLocaleResponse model module.\n * @module model/ServiceUpdateLocaleResponse\n * @version version not set\n */\nexport class ServiceUpdateLocaleResponse {\n /**\n * Constructs a new ServiceUpdateLocaleResponse.\n * @alias module:model/ServiceUpdateLocaleResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdateLocaleResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdateLocaleResponse} obj Optional instance to populate.\n * @return {module:model/ServiceUpdateLocaleResponse} The populated ServiceUpdateLocaleResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdateLocaleResponse();\n if (data.hasOwnProperty('locale'))\n obj.locale = ServiceLocale.constructFromObject(data['locale']);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/ServiceLocale} locale\n */\nServiceUpdateLocaleResponse.prototype.locale = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceUpdateLocaleResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {\n ApiClient\n} from \"../ApiClient\";\nimport {\n RuntimeError\n} from '../model/RuntimeError';\nimport {\n ServiceAddLocaleLanguageRequest\n} from '../model/ServiceAddLocaleLanguageRequest';\nimport {\n ServiceAddLocaleLanguageResponse\n} from '../model/ServiceAddLocaleLanguageResponse';\nimport {\n ServiceAddLocaleNameSpaceRequest\n} from '../model/ServiceAddLocaleNameSpaceRequest';\nimport {\n ServiceAddLocaleNameSpaceResponse\n} from '../model/ServiceAddLocaleNameSpaceResponse';\nimport {\n ServiceAddLocaleResponse\n} from '../model/ServiceAddLocaleResponse';\nimport {\n ServiceListLocaleLanguagesRequest\n} from '../model/ServiceListLocaleLanguagesRequest';\nimport {\n ServiceListLocaleLanguagesResponse\n} from '../model/ServiceListLocaleLanguagesResponse';\nimport {\n ServiceListLocaleNameSpacesRequest\n} from '../model/ServiceListLocaleNameSpacesRequest';\nimport {\n ServiceListLocaleNameSpacesResponse\n} from '../model/ServiceListLocaleNameSpacesResponse';\nimport {\n ServiceListLocalesRequest\n} from '../model/ServiceListLocalesRequest';\nimport {\n ServiceListLocalesResponse\n} from '../model/ServiceListLocalesResponse';\nimport {\n ServicePublishLocalesRequest\n} from '../model/ServicePublishLocalesRequest';\nimport {\n ServicePublishLocalesResponse\n} from '../model/ServicePublishLocalesResponse';\nimport {\n ServiceRemoveLocaleNameSpaceResponse\n} from '../model/ServiceRemoveLocaleNameSpaceResponse';\nimport {\n ServiceRemoveLocaleResponse\n} from '../model/ServiceRemoveLocaleResponse';\nimport {\n ServiceUpdateLocaleRequest\n} from '../model/ServiceUpdateLocaleRequest';\nimport {\n ServiceUpdateLocaleResponse\n} from '../model/ServiceUpdateLocaleResponse';\n\n/**\n * Locales service.\n * @module api/LocalesApi\n * @version version not set\n */\nexport class LocalesApi {\n\n /**\n * Constructs a new LocalesApi. \n * @alias module:api/LocalesApi\n * @class\n * @param {module:ApiClient} [apiClient] Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\n constructor(apiClient) {\n this.apiClient = apiClient || ApiClient.instance;\n }\n\n\n\n /**\n * AddLocale 创建字段\n * @param {String} localeLang \n * @param {String} localeNameSpaces \n * @param {Object} body \n * @param {Object} opts Optional parameters\n * @param {String} opts.localeId \n * @param {String} opts.localeKey \n * @param {String} opts.localeValue \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceAddLocaleResponse} and HTTP response\n */\n localesAddLocaleWithHttpInfo(localeLang, localeNameSpaces, body, opts) {\n opts = opts || {};\n let postBody = body;\n\n // verify the required parameter 'localeLang' is set\n if (localeLang === undefined || localeLang === null) {\n throw new Error(\"Missing the required parameter 'localeLang' when calling localesAddLocale\");\n }\n\n // verify the required parameter 'localeNameSpaces' is set\n if (localeNameSpaces === undefined || localeNameSpaces === null) {\n throw new Error(\"Missing the required parameter 'localeNameSpaces' when calling localesAddLocale\");\n }\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling localesAddLocale\");\n }\n\n\n let pathParams = {\n 'locale.lang': localeLang,\n 'locale.name_spaces': localeNameSpaces\n };\n let queryParams = {\n 'locale.id': opts['localeId'],\n 'locale.key': opts['localeKey'],\n 'locale.value': opts['localeValue']\n };\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceAddLocaleResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/add/{locale.lang}/{locale.name_spaces}', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * AddLocale 创建字段\n * @param {String} localeLang \n * @param {String} localeNameSpaces \n * @param {Object} body \n * @param {Object} opts Optional parameters\n * @param {String} opts.localeId \n * @param {String} opts.localeKey \n * @param {String} opts.localeValue \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceAddLocaleResponse}\n */\n localesAddLocale(localeLang, localeNameSpaces, body, opts) {\n return this.localesAddLocaleWithHttpInfo(localeLang, localeNameSpaces, body, opts)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * AddLocaleLanguage ...\n * @param {String} name \n * @param {module:model/ServiceAddLocaleLanguageRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceAddLocaleLanguageResponse} and HTTP response\n */\n localesAddLocaleLanguageWithHttpInfo(name, body) {\n let postBody = body;\n\n // verify the required parameter 'name' is set\n if (name === undefined || name === null) {\n throw new Error(\"Missing the required parameter 'name' when calling localesAddLocaleLanguage\");\n }\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling localesAddLocaleLanguage\");\n }\n\n\n let pathParams = {\n 'name': name\n };\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceAddLocaleLanguageResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/add_language/{name}', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * AddLocaleLanguage ...\n * @param {String} name \n * @param {module:model/ServiceAddLocaleLanguageRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceAddLocaleLanguageResponse}\n */\n localesAddLocaleLanguage(name, body) {\n return this.localesAddLocaleLanguageWithHttpInfo(name, body)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * AddLocaleNameSpace ...\n * @param {String} name \n * @param {module:model/ServiceAddLocaleNameSpaceRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceAddLocaleNameSpaceResponse} and HTTP response\n */\n localesAddLocaleNameSpaceWithHttpInfo(name, body) {\n let postBody = body;\n\n // verify the required parameter 'name' is set\n if (name === undefined || name === null) {\n throw new Error(\"Missing the required parameter 'name' when calling localesAddLocaleNameSpace\");\n }\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling localesAddLocaleNameSpace\");\n }\n\n\n let pathParams = {\n 'name': name\n };\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceAddLocaleNameSpaceResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/add_name_space/{name}', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * AddLocaleNameSpace ...\n * @param {String} name \n * @param {module:model/ServiceAddLocaleNameSpaceRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceAddLocaleNameSpaceResponse}\n */\n localesAddLocaleNameSpace(name, body) {\n return this.localesAddLocaleNameSpaceWithHttpInfo(name, body)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * ListLocaleLanguages ListLocalesLanguage\n * @param {module:model/ServiceListLocaleLanguagesRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceListLocaleLanguagesResponse} and HTTP response\n */\n localesListLocaleLanguagesWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling localesListLocaleLanguages\");\n }\n\n\n let pathParams = {};\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceListLocaleLanguagesResponse;\n\n return this.apiClient.callApi(\n '/api/v1/locales/list_language', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * ListLocaleLanguages ListLocalesLanguage\n * @param {module:model/ServiceListLocaleLanguagesRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceListLocaleLanguagesResponse}\n */\n localesListLocaleLanguages(body) {\n return this.localesListLocaleLanguagesWithHttpInfo(body)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * ListLocales 查找Locales\n * @param {module:model/ServiceListLocalesRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceListLocalesResponse} and HTTP response\n */\n localesListLocalesWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling localesListLocales\");\n }\n\n\n let pathParams = {};\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceListLocalesResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/list', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * ListLocales 查找Locales\n * @param {module:model/ServiceListLocalesRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceListLocalesResponse}\n */\n localesListLocales(body) {\n return this.localesListLocalesWithHttpInfo(body)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * ListLocalesNameSpaces ListLocalesNameSpace\n * @param {module:model/ServiceListLocaleNameSpacesRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceListLocaleNameSpacesResponse} and HTTP response\n */\n localesListLocalesNameSpacesWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling localesListLocalesNameSpaces\");\n }\n\n\n let pathParams = {};\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceListLocaleNameSpacesResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/list_name_space', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * ListLocalesNameSpaces ListLocalesNameSpace\n * @param {module:model/ServiceListLocaleNameSpacesRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceListLocaleNameSpacesResponse}\n */\n localesListLocalesNameSpaces(body) {\n return this.localesListLocalesNameSpacesWithHttpInfo(body)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * PublishLocales PublishLocales\n * @param {module:model/ServicePublishLocalesRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServicePublishLocalesResponse} and HTTP response\n */\n localesPublishLocalesWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling localesPublishLocales\");\n }\n\n\n let pathParams = {};\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServicePublishLocalesResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/publish', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * PublishLocales PublishLocales\n * @param {module:model/ServicePublishLocalesRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServicePublishLocalesResponse}\n */\n localesPublishLocales(body) {\n return this.localesPublishLocalesWithHttpInfo(body)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * RemoveLocale 删除字段\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceRemoveLocaleResponse} and HTTP response\n */\n localesRemoveLocaleWithHttpInfo(id) {\n let postBody = null;\n\n // verify the required parameter 'id' is set\n if (id === undefined || id === null) {\n throw new Error(\"Missing the required parameter 'id' when calling localesRemoveLocale\");\n }\n\n\n let pathParams = {\n 'id': id\n };\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceRemoveLocaleResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/remove/{id}', 'DELETE',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * RemoveLocale 删除字段\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceRemoveLocaleResponse}\n */\n localesRemoveLocale(id) {\n return this.localesRemoveLocaleWithHttpInfo(id)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * RemoveLocaleLanguage RemoveLocaleLanguage\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceRemoveLocaleNameSpaceResponse} and HTTP response\n */\n localesRemoveLocaleLanguageWithHttpInfo(id) {\n let postBody = null;\n\n // verify the required parameter 'id' is set\n if (id === undefined || id === null) {\n throw new Error(\"Missing the required parameter 'id' when calling localesRemoveLocaleLanguage\");\n }\n\n\n let pathParams = {\n 'id': id\n };\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceRemoveLocaleNameSpaceResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/remove_language/{id}', 'DELETE',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * RemoveLocaleLanguage RemoveLocaleLanguage\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceRemoveLocaleNameSpaceResponse}\n */\n localesRemoveLocaleLanguage(id) {\n return this.localesRemoveLocaleLanguageWithHttpInfo(id)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * RemoveLocaleNameSpace RemoveLocaleNameSpace\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceRemoveLocaleNameSpaceResponse} and HTTP response\n */\n localesRemoveLocaleNameSpaceWithHttpInfo(id) {\n let postBody = null;\n\n // verify the required parameter 'id' is set\n if (id === undefined || id === null) {\n throw new Error(\"Missing the required parameter 'id' when calling localesRemoveLocaleNameSpace\");\n }\n\n\n let pathParams = {\n 'id': id\n };\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceRemoveLocaleNameSpaceResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/remove_name_space/{id}', 'DELETE',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * RemoveLocaleNameSpace RemoveLocaleNameSpace\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceRemoveLocaleNameSpaceResponse}\n */\n localesRemoveLocaleNameSpace(id) {\n return this.localesRemoveLocaleNameSpaceWithHttpInfo(id)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * UpdateLocale 删除字段\n * @param {String} id \n * @param {module:model/ServiceUpdateLocaleRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceUpdateLocaleResponse} and HTTP response\n */\n localesUpdateLocaleWithHttpInfo(id, body) {\n let postBody = body;\n\n // verify the required parameter 'id' is set\n if (id === undefined || id === null) {\n throw new Error(\"Missing the required parameter 'id' when calling localesUpdateLocale\");\n }\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling localesUpdateLocale\");\n }\n\n\n let pathParams = {\n 'id': id\n };\n let queryParams = {};\n let headerParams = {};\n let formParams = {};\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceUpdateLocaleResponse;\n\n return this.apiClient.callApi(\n '/v1/locales/update/{id}', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * UpdateLocale 删除字段\n * @param {String} id \n * @param {module:model/ServiceUpdateLocaleRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceUpdateLocaleResponse}\n */\n localesUpdateLocale(id, body) {\n return this.localesUpdateLocaleWithHttpInfo(id, body)\n .then(function (response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n}","import {\n CollectionApi\n} from \"./collection\";\nimport {\n ApiClient\n} from \"./ApiClient\"\nimport {\n LocalesApi\n} from \"./locales\";\n\nconst client = new ApiClient()\nconst CollectionSDK = (c) => {\n c = c || client\n return new CollectionApi(c)\n}\nconst LocalesSDK = (c) => {\n c = c || client\n return new LocalesApi(c)\n}\nexport {\n ApiClient,\n CollectionSDK,\n LocalesSDK\n}","import './index.css';\nimport reportWebVitals from './reportWebVitals';\nimport _ from 'lodash';\nimport {\n CoreSystem\n} from './core/public';\n\nimport i18n from './i18n';\n\nimport { createStore } from \"redux\"\n\nimport './register';\nimport security from './security';\n// import home from './views/home';\nimport security_settings from './views/security';\nimport knowledge from './views/knowledge';\n// import nada from './views/nada';\n// import named from './views/named';\nimport analysis from './views/analysis';\nimport collection from './views/collection';\nimport locales from './views/locales';\nimport createCollection from './views/actions/createCollection';\nimport './sentry';\nimport './index.css'\nimport { ApiClient, LocalesSDK } from './sdk';\n// import { ApiClient, CollectionSDK } from './sdk';\n\nimport './grid.scss'\nconst apiClient = new ApiClient()\n// window.localStorage.getItem(\"searchAPI\") || \n// apiClient.basePath = \"http://localhost:82\"\nconst api = {\n locales: LocalesSDK(apiClient)\n}\n\nconst bootstrap = async () => {\n // security.registerPlugin(window)\n security_settings.registerPlugin(window)\n // createCollection.registerPlugin(window)\n // createCollection.registerPlugin(window)\n // home.registerPlugin(window)\n // collection.registerPlugin(window)\n knowledge.registerPlugin(window)\n locales.registerPlugin(window)\n analysis.registerPlugin(window)\n // nada.registerPlugin(window)\n // named.registerPlugin(window)\n const plugins = _.map(window.plugins, (plugin, _) => plugin)\n const coreSystem = new CoreSystem({\n rootDomElement: document.getElementById('root'),\n // dispatch: store.dispatch,\n i18n: i18n,\n plugins: plugins,\n store: createStore(() => { }),\n api: () => {\n return api\n }\n })\n coreSystem.coreStore.update(\"wfConfig\", {\n // apiURL: new URL(\"https://oversea.wanfangdata.com.cn/api\"),\n // apiURL: new URL(\"https://accounts.dr2am.cn/api\"),\n apiURL: new URL(\"https://globe.wanfangdata.com.hk/api\"),\n // apiURL: new URL(\"https://localhost/api\"),\n })\n await coreSystem.setup()\n await coreSystem.start()\n}\nbootstrap()\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals(); ","import styled from \"styled-components\"\n\n\nexport const TableHeader = styled.thead`\n\n`\nexport const TableHeaderColumn = styled.th`\n&.dlabel {\nborder-top: 0;\nborder-left: 0;\nleft: 0;\nz-index: 1;\nbackground-clip: padding-box;\n}\n`\nexport const TableRow = styled.tr`\n`\n\nexport const TableColumn = styled.td`\n&.dlabel {\nborder-top: 0;\nborder-left: 0;\nleft: 0;\nz-index: 1;\nbackground-clip: padding-box;\n}\n`\n\nexport const TableBody = styled.tbody`\n`\n\nexport const DataTable = styled.table`\nborder: 0;\nwidth: 100%;\npadding: 0;\nborder-spacing: 0;\nborder-collapse: separate;\nmargin: 0;\n& > ${TableHeader} {\n// position: sticky;\ntop: 0;\nz-index: 10;\n\n}\n& > ${TableHeader} > ${TableRow} > ${TableHeaderColumn} {\n background: #eff0f1;\n border-radius: 0;\n color: #37474f;\n // text-transform: uppercase;\n font-size: 11px;\n line-height: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n vertical-align: middle;\n}\n& > ${TableBody} > ${TableRow} > ${TableColumn} {\n padding-top: 10px;\n padding-bottom: 9px;\n border-bottom: 1px solid #f2f2f2 !important;\n border-color: #f2f2f2 !important;\n color: #212121;\n background: #ffffff;\n}\n\n& tr ${TableColumn}:first-child {\n padding-left: 20px;\n}\n\n& tr ${TableColumn}:last-child {\n padding-right: 20px;\n}\n`\n","// Generates a RFC-4122 version 4 compliant globally unique identifier.\nexport function generateId(): string {\n // implementation taken from http://stackoverflow.com/a/2117523\n let id = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n id = id.replace(/[xy]/g, (c) => {\n const r = Math.floor(Math.random() * 16);\n let v;\n\n if (c === 'x') {\n v = r;\n } else {\n // eslint-disable-next-line no-mixed-operators\n v = r & 0x3 | 0x8;\n }\n\n return v.toString(16);\n });\n return id;\n}\n\nexport function isEmail(email: string): boolean {\n // writing a regex to match all valid email addresses is really, really hard. (see http://stackoverflow.com/a/201378)\n // this regex ensures:\n // - at least one character that is not a space, comma, or @ symbol\n // - followed by a single @ symbol\n // - followed by at least one character that is not a space, comma, or @ symbol\n // this prevents outlook.style@domain.com addresses and multiple comma-separated addresses from being accepted\n return (/^[^ ,@]+@[^ ,@]+$/).test(email);\n}\nexport const ValidationErrors = {\n USERNAME_REQUIRED: 'USERNAME_REQUIRED',\n INVALID_LENGTH: 'INVALID_LENGTH',\n INVALID_CHARACTERS: 'INVALID_CHARACTERS',\n INVALID_FIRST_CHARACTER: 'INVALID_FIRST_CHARACTER',\n RESERVED_NAME: 'RESERVED_NAME',\n INVALID_LAST_CHARACTER: 'INVALID_LAST_CHARACTER',\n};\nexport const Constants = {\n MIN_USERNAME_LENGTH: 3,\n MAX_USERNAME_LENGTH: 22,\n MAX_NICKNAME_LENGTH: 22,\n MIN_PASSWORD_LENGTH: 5,\n MAX_PASSWORD_LENGTH: 64,\n RESERVED_USERNAMES: [\n 'valet',\n 'all',\n 'channel',\n 'here',\n 'matterbot',\n 'system',\n ],\n}\nexport function isValidUsername(name: string) {\n let error;\n if (!name) {\n error = {\n id: ValidationErrors.USERNAME_REQUIRED,\n };\n } else if (name.length < Constants.MIN_USERNAME_LENGTH || name.length > Constants.MAX_USERNAME_LENGTH) {\n error = {\n id: ValidationErrors.INVALID_LENGTH,\n };\n } else if (!(/^[a-z0-9.\\-_]+$/).test(name)) {\n error = {\n id: ValidationErrors.INVALID_CHARACTERS,\n };\n } else if (!(/[a-z]/).test(name.charAt(0))) { //eslint-disable-line no-negated-condition\n error = {\n id: ValidationErrors.INVALID_FIRST_CHARACTER,\n };\n } else {\n for (const reserved of Constants.RESERVED_USERNAMES) {\n if (name === reserved) {\n error = {\n id: ValidationErrors.RESERVED_NAME,\n };\n break;\n }\n }\n }\n\n return error;\n}\n\nexport function getPasswordConfig(config: any) {\n return {\n minimumLength: parseInt(config.PasswordMinimumLength!, 10),\n requireLowercase: config.PasswordRequireLowercase === 'true',\n requireUppercase: config.PasswordRequireUppercase === 'true',\n requireNumber: config.PasswordRequireNumber === 'true',\n requireSymbol: config.PasswordRequireSymbol === 'true',\n };\n}\n\nexport function isValidPassword(password: string, passwordConfig: ReturnType, intl?: any) {\n let valid = true;\n const minimumLength = passwordConfig.minimumLength || Constants.MIN_PASSWORD_LENGTH;\n\n if (password.length < minimumLength || password.length > Constants.MAX_PASSWORD_LENGTH) {\n valid = false;\n }\n\n var errorId = \"\"\n if (passwordConfig.requireLowercase) {\n if (!password.match(/[a-z]/)) {\n valid = false;\n }\n\n errorId += 'Lowercase';\n }\n\n if (passwordConfig.requireUppercase) {\n if (!password.match(/[A-Z]/)) {\n valid = false;\n }\n\n errorId += 'Uppercase';\n }\n\n if (passwordConfig.requireNumber) {\n if (!password.match(/[0-9]/)) {\n valid = false;\n }\n\n errorId += 'Number';\n }\n\n if (passwordConfig.requireSymbol) {\n if (!password.match(/[ !\"\\\\#$%&'()*+,-./:;<=>?@[\\]^_`|~]/)) {\n valid = false;\n }\n\n errorId += 'Symbol';\n }\n\n let error;\n if (!valid) {\n error = \"password 格式错误\"\n }\n return { valid, error };\n}","\n\n// Generates a RFC-4122 version 4 compliant globally unique identifier.\nexport function generateId() {\n // implementation taken from http://stackoverflow.com/a/2117523\n var id = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n\n id = id.replace(/[xy]/g, (c) => {\n var r = Math.floor(Math.random() * 16);\n\n var v;\n if (c === 'x') {\n v = r;\n } else {\n v = (r & 0x3) | 0x8;\n }\n\n return v.toString(16);\n });\n\n return id;\n}","\nexport class EventEmitter {\n [x: string]: any;\n\n\n constructor() {\n }\n on(name: string | number, callback: any) {\n const onid = generateId()\n callback = { id: onid, callback }\n var callbacks = this[name];\n if (!callbacks) {\n this[name] = [callback];\n }\n else {\n callbacks.push(callback);\n }\n return onid\n }\n kill(name: string | number, id: string) {\n const callbacks = this[name]\n this[name] = []\n if (!callbacks) {\n return\n }\n for (let i = 0; i < callbacks.length; i++) {\n const element = callbacks[i];\n if (element.id == id) {\n continue\n }\n this[name].push(element)\n }\n }\n dispatch(name: string | number, event: any) {\n var callbacks = this[name];\n if (callbacks)\n callbacks.forEach(({ callback }: any) => callback(event));\n }\n}\n\nfunction generateId(): string {\n // implementation taken from http://stackoverflow.com/a/2117523\n let id = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n id = id.replace(/[xy]/g, (c) => {\n const r = Math.floor(Math.random() * 16);\n let v;\n\n if (c === 'x') {\n v = r;\n } else {\n // eslint-disable-next-line no-mixed-operators\n v = r & 0x3 | 0x8;\n }\n\n return v.toString(16);\n });\n return id;\n}","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The PbOrder model module.\n * @module model/PbOrder\n * @version version not set\n */\nexport class PbOrder {\n /**\n * Constructs a new PbOrder.\n * @alias module:model/PbOrder\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbOrder from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbOrder} obj Optional instance to populate.\n * @return {module:model/PbOrder} The populated PbOrder instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbOrder();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('gid'))\n obj.gid = ApiClient.convertToType(data['gid'], 'String');\n if (data.hasOwnProperty('user_id'))\n obj.userId = ApiClient.convertToType(data['user_id'], 'String');\n if (data.hasOwnProperty('user_gid'))\n obj.userGid = ApiClient.convertToType(data['user_gid'], 'String');\n if (data.hasOwnProperty('order_type'))\n obj.orderType = ApiClient.convertToType(data['order_type'], 'String');\n if (data.hasOwnProperty('order_value'))\n obj.orderValue = ApiClient.convertToType(data['order_value'], 'String');\n if (data.hasOwnProperty('limit'))\n obj.limit = ApiClient.convertToType(data['limit'], {'String': Object});\n if (data.hasOwnProperty('create_at'))\n obj.createAt = ApiClient.convertToType(data['create_at'], 'Date');\n if (data.hasOwnProperty('modify_at'))\n obj.modifyAt = ApiClient.convertToType(data['modify_at'], 'Date');\n if (data.hasOwnProperty('expire_at'))\n obj.expireAt = ApiClient.convertToType(data['expire_at'], 'Date');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nPbOrder.prototype.id = undefined;\n\n/**\n * @member {String} gid\n */\nPbOrder.prototype.gid = undefined;\n\n/**\n * @member {String} userId\n */\nPbOrder.prototype.userId = undefined;\n\n/**\n * @member {String} userGid\n */\nPbOrder.prototype.userGid = undefined;\n\n/**\n * @member {String} orderType\n */\nPbOrder.prototype.orderType = undefined;\n\n/**\n * @member {String} orderValue\n */\nPbOrder.prototype.orderValue = undefined;\n\n/**\n * @member {Object.} limit\n */\nPbOrder.prototype.limit = undefined;\n\n/**\n * @member {Date} createAt\n */\nPbOrder.prototype.createAt = undefined;\n\n/**\n * @member {Date} modifyAt\n */\nPbOrder.prototype.modifyAt = undefined;\n\n/**\n * @member {Date} expireAt\n */\nPbOrder.prototype.expireAt = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The PbPaginate model module.\n * @module model/PbPaginate\n * @version version not set\n */\nexport class PbPaginate {\n /**\n * Constructs a new PbPaginate.\n * @alias module:model/PbPaginate\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbPaginate from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbPaginate} obj Optional instance to populate.\n * @return {module:model/PbPaginate} The populated PbPaginate instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbPaginate();\n if (data.hasOwnProperty('offset'))\n obj.offset = ApiClient.convertToType(data['offset'], 'Number');\n if (data.hasOwnProperty('limit'))\n obj.limit = ApiClient.convertToType(data['limit'], 'Number');\n if (data.hasOwnProperty('next_page_token'))\n obj.nextPageToken = ApiClient.convertToType(data['next_page_token'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {Number} offset\n */\nPbPaginate.prototype.offset = undefined;\n\n/**\n * @member {Number} limit\n */\nPbPaginate.prototype.limit = undefined;\n\n/**\n * @member {String} nextPageToken\n */\nPbPaginate.prototype.nextPageToken = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * Enum class ResponseStateState.\n * @enum {String}\n * @readonly\n */\nconst ResponseStateState = {\n /**\n * value: \"unknow\"\n * @const\n */\n unknow: \"unknow\",\n\n /**\n * value: \"success\"\n * @const\n */\n success: \"success\",\n\n /**\n * value: \"fail\"\n * @const\n */\n fail: \"fail\",\n\n /**\n * Returns a ResponseStateState enum value from a JavaScript object name.\n * @param {Object} data The plain JavaScript object containing the name of the enum value.\n * @return {module:model/ResponseStateState} The enum ResponseStateState value.\n */\n constructFromObject: function(object) {\n return object;\n }\n};\n\nexport {ResponseStateState};\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ResponseStateState} from './ResponseStateState';\n\n/**\n * The PbResponseState model module.\n * @module model/PbResponseState\n * @version version not set\n */\nexport class PbResponseState {\n /**\n * Constructs a new PbResponseState.\n * @alias module:model/PbResponseState\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbResponseState from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbResponseState} obj Optional instance to populate.\n * @return {module:model/PbResponseState} The populated PbResponseState instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbResponseState();\n if (data.hasOwnProperty('state'))\n obj.state = ResponseStateState.constructFromObject(data['state']);\n if (data.hasOwnProperty('msg'))\n obj.msg = ApiClient.convertToType(data['msg'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/ResponseStateState} state\n */\nPbResponseState.prototype.state = undefined;\n\n/**\n * @member {String} msg\n */\nPbResponseState.prototype.msg = undefined;\n\n/**\n * @member {Number} code\n */\nPbResponseState.prototype.code = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufAny model module.\n * @module model/ProtobufAny\n * @version version not set\n */\nexport class ProtobufAny {\n /**\n * Constructs a new ProtobufAny.\n * @alias module:model/ProtobufAny\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufAny from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufAny} obj Optional instance to populate.\n * @return {module:model/ProtobufAny} The populated ProtobufAny instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufAny();\n if (data.hasOwnProperty('type_url'))\n obj.typeUrl = ApiClient.convertToType(data['type_url'], 'String');\n if (data.hasOwnProperty('value'))\n obj.value = ApiClient.convertToType(data['value'], 'Blob');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} typeUrl\n */\nProtobufAny.prototype.typeUrl = undefined;\n\n/**\n * @member {Blob} value\n */\nProtobufAny.prototype.value = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufFieldMask model module.\n * @module model/ProtobufFieldMask\n * @version version not set\n */\nexport class ProtobufFieldMask {\n /**\n * Constructs a new ProtobufFieldMask.\n * paths: \\\"f.a\\\" paths: \\\"f.b.d\\\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, the existing repeated values in the target resource will be overwritten by the new values. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then the existing sub-message in the target resource is overwritten. Given the target message: f { b { d : 1 x : 2 } c : 1 } And an update message: f { b { d : 10 } } then if the field mask is: paths: \\\"f.b\\\" then the result will be: f { b { d : 10 } c : 1 } However, if the update mask was: paths: \\\"f.b.d\\\" then the result would be: f { b { d : 10 x : 2 } c : 1 } In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \\\"user.display_name\\\" paths: \\\"photo\\\" } In JSON, the same mask is represented as below: { mask: \\\"user.displayName,photo\\\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \\\"name\\\" } Or: mask { paths: \\\"sub_message\\\" } Note that oneof type names (\\\"test_oneof\\\" in this case) cannot be used in paths.\n * @alias module:model/ProtobufFieldMask\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufFieldMask from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufFieldMask} obj Optional instance to populate.\n * @return {module:model/ProtobufFieldMask} The populated ProtobufFieldMask instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufFieldMask();\n if (data.hasOwnProperty('paths'))\n obj.paths = ApiClient.convertToType(data['paths'], ['String']);\n }\n return obj;\n }\n}\n\n/**\n * The set of field mask paths.\n * @member {Array.} paths\n */\nProtobufFieldMask.prototype.paths = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * Enum class ProtobufNullValue.\n * @enum {String}\n * @readonly\n */\nconst ProtobufNullValue = {\n /**\n * value: \"NULL_VALUE\"\n * @const\n */\n NULL_VALUE: \"NULL_VALUE\",\n\n /**\n * Returns a ProtobufNullValue enum value from a JavaScript object name.\n * @param {Object} data The plain JavaScript object containing the name of the enum value.\n * @return {module:model/ProtobufNullValue} The enum ProtobufNullValue value.\n */\n constructFromObject: function(object) {\n return object;\n }\n};\n\nexport {ProtobufNullValue};\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ProtobufAny} from './ProtobufAny';\n\n/**\n * The RuntimeError model module.\n * @module model/RuntimeError\n * @version version not set\n */\nexport class RuntimeError {\n /**\n * Constructs a new RuntimeError.\n * @alias module:model/RuntimeError\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a RuntimeError from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/RuntimeError} obj Optional instance to populate.\n * @return {module:model/RuntimeError} The populated RuntimeError instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new RuntimeError();\n if (data.hasOwnProperty('error'))\n obj.error = ApiClient.convertToType(data['error'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n if (data.hasOwnProperty('message'))\n obj.message = ApiClient.convertToType(data['message'], 'String');\n if (data.hasOwnProperty('details'))\n obj.details = ApiClient.convertToType(data['details'], [ProtobufAny]);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} error\n */\nRuntimeError.prototype.error = undefined;\n\n/**\n * @member {Number} code\n */\nRuntimeError.prototype.code = undefined;\n\n/**\n * @member {String} message\n */\nRuntimeError.prototype.message = undefined;\n\n/**\n * @member {Array.} details\n */\nRuntimeError.prototype.details = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbOrder} from './PbOrder';\n\n/**\n * The ServiceCreateOrdersRequest model module.\n * @module model/ServiceCreateOrdersRequest\n * @version version not set\n */\nexport class ServiceCreateOrdersRequest {\n /**\n * Constructs a new ServiceCreateOrdersRequest.\n * @alias module:model/ServiceCreateOrdersRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceCreateOrdersRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceCreateOrdersRequest} obj Optional instance to populate.\n * @return {module:model/ServiceCreateOrdersRequest} The populated ServiceCreateOrdersRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceCreateOrdersRequest();\n if (data.hasOwnProperty('order'))\n obj.order = PbOrder.constructFromObject(data['order']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbOrder} order\n */\nServiceCreateOrdersRequest.prototype.order = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbOrder} from './PbOrder';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceCreateOrdersResponse model module.\n * @module model/ServiceCreateOrdersResponse\n * @version version not set\n */\nexport class ServiceCreateOrdersResponse {\n /**\n * Constructs a new ServiceCreateOrdersResponse.\n * @alias module:model/ServiceCreateOrdersResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceCreateOrdersResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceCreateOrdersResponse} obj Optional instance to populate.\n * @return {module:model/ServiceCreateOrdersResponse} The populated ServiceCreateOrdersResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceCreateOrdersResponse();\n if (data.hasOwnProperty('order'))\n obj.order = PbOrder.constructFromObject(data['order']);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbOrder} order\n */\nServiceCreateOrdersResponse.prototype.order = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceCreateOrdersResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceDeleteOrdersResponse model module.\n * @module model/ServiceDeleteOrdersResponse\n * @version version not set\n */\nexport class ServiceDeleteOrdersResponse {\n /**\n * Constructs a new ServiceDeleteOrdersResponse.\n * @alias module:model/ServiceDeleteOrdersResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceDeleteOrdersResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceDeleteOrdersResponse} obj Optional instance to populate.\n * @return {module:model/ServiceDeleteOrdersResponse} The populated ServiceDeleteOrdersResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceDeleteOrdersResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceDeleteOrdersResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbOrder} from './PbOrder';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceGetOrdersWithUserResponse model module.\n * @module model/ServiceGetOrdersWithUserResponse\n * @version version not set\n */\nexport class ServiceGetOrdersWithUserResponse {\n /**\n * Constructs a new ServiceGetOrdersWithUserResponse.\n * @alias module:model/ServiceGetOrdersWithUserResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceGetOrdersWithUserResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceGetOrdersWithUserResponse} obj Optional instance to populate.\n * @return {module:model/ServiceGetOrdersWithUserResponse} The populated ServiceGetOrdersWithUserResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceGetOrdersWithUserResponse();\n if (data.hasOwnProperty('order'))\n obj.order = ApiClient.convertToType(data['order'], [PbOrder]);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} order\n */\nServiceGetOrdersWithUserResponse.prototype.order = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceGetOrdersWithUserResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbOrder} from './PbOrder';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceListOrderssResponse model module.\n * @module model/ServiceListOrderssResponse\n * @version version not set\n */\nexport class ServiceListOrderssResponse {\n /**\n * Constructs a new ServiceListOrderssResponse.\n * @alias module:model/ServiceListOrderssResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListOrderssResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListOrderssResponse} obj Optional instance to populate.\n * @return {module:model/ServiceListOrderssResponse} The populated ServiceListOrderssResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListOrderssResponse();\n if (data.hasOwnProperty('orders'))\n obj.orders = ApiClient.convertToType(data['orders'], [PbOrder]);\n if (data.hasOwnProperty('next_page_token'))\n obj.nextPageToken = ApiClient.convertToType(data['next_page_token'], 'String');\n if (data.hasOwnProperty('total'))\n obj.total = ApiClient.convertToType(data['total'], 'String');\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} orders\n */\nServiceListOrderssResponse.prototype.orders = undefined;\n\n/**\n * @member {String} nextPageToken\n */\nServiceListOrderssResponse.prototype.nextPageToken = undefined;\n\n/**\n * @member {String} total\n */\nServiceListOrderssResponse.prototype.total = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceListOrderssResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbOrder} from './PbOrder';\nimport {ProtobufFieldMask} from './ProtobufFieldMask';\n\n/**\n * The ServiceUpdateOrdersRequest model module.\n * @module model/ServiceUpdateOrdersRequest\n * @version version not set\n */\nexport class ServiceUpdateOrdersRequest {\n /**\n * Constructs a new ServiceUpdateOrdersRequest.\n * @alias module:model/ServiceUpdateOrdersRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdateOrdersRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdateOrdersRequest} obj Optional instance to populate.\n * @return {module:model/ServiceUpdateOrdersRequest} The populated ServiceUpdateOrdersRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdateOrdersRequest();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('order'))\n obj.order = PbOrder.constructFromObject(data['order']);\n if (data.hasOwnProperty('update_mask'))\n obj.updateMask = ProtobufFieldMask.constructFromObject(data['update_mask']);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nServiceUpdateOrdersRequest.prototype.id = undefined;\n\n/**\n * @member {module:model/PbOrder} order\n */\nServiceUpdateOrdersRequest.prototype.order = undefined;\n\n/**\n * @member {module:model/ProtobufFieldMask} updateMask\n */\nServiceUpdateOrdersRequest.prototype.updateMask = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbOrder} from './PbOrder';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceUpdateOrdersResponse model module.\n * @module model/ServiceUpdateOrdersResponse\n * @version version not set\n */\nexport class ServiceUpdateOrdersResponse {\n /**\n * Constructs a new ServiceUpdateOrdersResponse.\n * @alias module:model/ServiceUpdateOrdersResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdateOrdersResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdateOrdersResponse} obj Optional instance to populate.\n * @return {module:model/ServiceUpdateOrdersResponse} The populated ServiceUpdateOrdersResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdateOrdersResponse();\n if (data.hasOwnProperty('order'))\n obj.order = PbOrder.constructFromObject(data['order']);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbOrder} order\n */\nServiceUpdateOrdersResponse.prototype.order = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceUpdateOrdersResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.orders.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from \"../ApiClient\";\nimport {RuntimeError} from '../model/RuntimeError';\nimport {ServiceCreateOrdersRequest} from '../model/ServiceCreateOrdersRequest';\nimport {ServiceCreateOrdersResponse} from '../model/ServiceCreateOrdersResponse';\nimport {ServiceDeleteOrdersResponse} from '../model/ServiceDeleteOrdersResponse';\nimport {ServiceGetOrdersWithUserResponse} from '../model/ServiceGetOrdersWithUserResponse';\nimport {ServiceListOrderssResponse} from '../model/ServiceListOrderssResponse';\nimport {ServiceUpdateOrdersRequest} from '../model/ServiceUpdateOrdersRequest';\nimport {ServiceUpdateOrdersResponse} from '../model/ServiceUpdateOrdersResponse';\n\n/**\n* OrdersService service.\n* @module api/OrdersServiceApi\n* @version version not set\n*/\nexport class OrdersServiceApi {\n\n /**\n * Constructs a new OrdersServiceApi. \n * @alias module:api/OrdersServiceApi\n * @class\n * @param {module:ApiClient} [apiClient] Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\n constructor(apiClient) {\n this.apiClient = apiClient || ApiClient.instance;\n }\n\n\n\n /**\n * Create Orders\n * @param {module:model/ServiceCreateOrdersRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceCreateOrdersResponse} and HTTP response\n */\n ordersServiceCreateWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling ordersServiceCreate\");\n }\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceCreateOrdersResponse;\n\n return this.apiClient.callApi(\n '/v1/orders:create', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Create Orders\n * @param {module:model/ServiceCreateOrdersRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceCreateOrdersResponse}\n */\n ordersServiceCreate(body) {\n return this.ordersServiceCreateWithHttpInfo(body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * Delete Orders\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceDeleteOrdersResponse} and HTTP response\n */\n ordersServiceDeleteWithHttpInfo(id) {\n let postBody = null;\n\n // verify the required parameter 'id' is set\n if (id === undefined || id === null) {\n throw new Error(\"Missing the required parameter 'id' when calling ordersServiceDelete\");\n }\n\n\n let pathParams = {\n 'id': id\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceDeleteOrdersResponse;\n\n return this.apiClient.callApi(\n '/v1/orders/{id}:delete', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Delete Orders\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceDeleteOrdersResponse}\n */\n ordersServiceDelete(id) {\n return this.ordersServiceDeleteWithHttpInfo(id)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * GetWithUser Orders with UserId\n * @param {String} userId \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceGetOrdersWithUserResponse} and HTTP response\n */\n ordersServiceGetWithUserWithHttpInfo(userId) {\n let postBody = null;\n\n // verify the required parameter 'userId' is set\n if (userId === undefined || userId === null) {\n throw new Error(\"Missing the required parameter 'userId' when calling ordersServiceGetWithUser\");\n }\n\n\n let pathParams = {\n 'user_id': userId\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceGetOrdersWithUserResponse;\n\n return this.apiClient.callApi(\n '/v1/users/{user_id}/order', 'GET',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * GetWithUser Orders with UserId\n * @param {String} userId \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceGetOrdersWithUserResponse}\n */\n ordersServiceGetWithUser(userId) {\n return this.ordersServiceGetWithUserWithHttpInfo(userId)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * List Orderss\n * @param {Object} opts Optional parameters\n * @param {String} opts.action \n * @param {Number} opts.pageSize \n * @param {String} opts.pageToken \n * @param {String} opts.query \n * @param {String} opts.orderBy \n * @param {Number} opts.paginateOffset \n * @param {Number} opts.paginateLimit \n * @param {String} opts.paginateNextPageToken \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceListOrderssResponse} and HTTP response\n */\n ordersServiceListWithHttpInfo(opts) {\n opts = opts || {};\n let postBody = null;\n\n\n let pathParams = {\n };\n let queryParams = {\n 'action': opts['action'],\n 'page_size': opts['pageSize'],\n 'page_token': opts['pageToken'],\n 'query': opts['query'],\n 'order_by': opts['orderBy'],\n 'paginate.offset': opts['paginateOffset'],\n 'paginate.limit': opts['paginateLimit'],\n 'paginate.next_page_token': opts['paginateNextPageToken']\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceListOrderssResponse;\n\n return this.apiClient.callApi(\n '/v1/orders:list', 'GET',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * List Orderss\n * @param {Object} opts Optional parameters\n * @param {String} opts.action \n * @param {Number} opts.pageSize \n * @param {String} opts.pageToken \n * @param {String} opts.query \n * @param {String} opts.orderBy \n * @param {Number} opts.paginateOffset \n * @param {Number} opts.paginateLimit \n * @param {String} opts.paginateNextPageToken \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceListOrderssResponse}\n */\n ordersServiceList(opts) {\n return this.ordersServiceListWithHttpInfo(opts)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * Update Orders\n * @param {module:model/ServiceUpdateOrdersRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceUpdateOrdersResponse} and HTTP response\n */\n ordersServiceUpdateWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling ordersServiceUpdate\");\n }\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceUpdateOrdersResponse;\n\n return this.apiClient.callApi(\n '/v1/orders:update', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Update Orders\n * @param {module:model/ServiceUpdateOrdersRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceUpdateOrdersResponse}\n */\n ordersServiceUpdate(body) {\n return this.ordersServiceUpdateWithHttpInfo(body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n}\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The PbPaginate model module.\n * @module model/PbPaginate\n * @version version not set\n */\nexport class PbPaginate {\n /**\n * Constructs a new PbPaginate.\n * @alias module:model/PbPaginate\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbPaginate from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbPaginate} obj Optional instance to populate.\n * @return {module:model/PbPaginate} The populated PbPaginate instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbPaginate();\n if (data.hasOwnProperty('offset'))\n obj.offset = ApiClient.convertToType(data['offset'], 'Number');\n if (data.hasOwnProperty('limit'))\n obj.limit = ApiClient.convertToType(data['limit'], 'Number');\n if (data.hasOwnProperty('next_page_token'))\n obj.nextPageToken = ApiClient.convertToType(data['next_page_token'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {Number} offset\n */\nPbPaginate.prototype.offset = undefined;\n\n/**\n * @member {Number} limit\n */\nPbPaginate.prototype.limit = undefined;\n\n/**\n * @member {String} nextPageToken\n */\nPbPaginate.prototype.nextPageToken = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The PbPreference model module.\n * @module model/PbPreference\n * @version version not set\n */\nexport class PbPreference {\n /**\n * Constructs a new PbPreference.\n * @alias module:model/PbPreference\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbPreference from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbPreference} obj Optional instance to populate.\n * @return {module:model/PbPreference} The populated PbPreference instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbPreference();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('gid'))\n obj.gid = ApiClient.convertToType(data['gid'], 'String');\n if (data.hasOwnProperty('user_id'))\n obj.userId = ApiClient.convertToType(data['user_id'], 'String');\n if (data.hasOwnProperty('user_gid'))\n obj.userGid = ApiClient.convertToType(data['user_gid'], 'String');\n if (data.hasOwnProperty('category'))\n obj.category = ApiClient.convertToType(data['category'], 'String');\n if (data.hasOwnProperty('name'))\n obj.name = ApiClient.convertToType(data['name'], 'String');\n if (data.hasOwnProperty('value'))\n obj.value = ApiClient.convertToType(data['value'], 'String');\n if (data.hasOwnProperty('create_at'))\n obj.createAt = ApiClient.convertToType(data['create_at'], 'Date');\n if (data.hasOwnProperty('modify_at'))\n obj.modifyAt = ApiClient.convertToType(data['modify_at'], 'Date');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nPbPreference.prototype.id = undefined;\n\n/**\n * @member {String} gid\n */\nPbPreference.prototype.gid = undefined;\n\n/**\n * @member {String} userId\n */\nPbPreference.prototype.userId = undefined;\n\n/**\n * @member {String} userGid\n */\nPbPreference.prototype.userGid = undefined;\n\n/**\n * @member {String} category\n */\nPbPreference.prototype.category = undefined;\n\n/**\n * @member {String} name\n */\nPbPreference.prototype.name = undefined;\n\n/**\n * @member {String} value\n */\nPbPreference.prototype.value = undefined;\n\n/**\n * @member {Date} createAt\n */\nPbPreference.prototype.createAt = undefined;\n\n/**\n * @member {Date} modifyAt\n */\nPbPreference.prototype.modifyAt = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * Enum class ResponseStateState.\n * @enum {String}\n * @readonly\n */\nconst ResponseStateState = {\n /**\n * value: \"unknow\"\n * @const\n */\n unknow: \"unknow\",\n\n /**\n * value: \"success\"\n * @const\n */\n success: \"success\",\n\n /**\n * value: \"fail\"\n * @const\n */\n fail: \"fail\",\n\n /**\n * Returns a ResponseStateState enum value from a JavaScript object name.\n * @param {Object} data The plain JavaScript object containing the name of the enum value.\n * @return {module:model/ResponseStateState} The enum ResponseStateState value.\n */\n constructFromObject: function(object) {\n return object;\n }\n};\n\nexport {ResponseStateState};\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ResponseStateState} from './ResponseStateState';\n\n/**\n * The PbResponseState model module.\n * @module model/PbResponseState\n * @version version not set\n */\nexport class PbResponseState {\n /**\n * Constructs a new PbResponseState.\n * @alias module:model/PbResponseState\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbResponseState from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbResponseState} obj Optional instance to populate.\n * @return {module:model/PbResponseState} The populated PbResponseState instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbResponseState();\n if (data.hasOwnProperty('state'))\n obj.state = ResponseStateState.constructFromObject(data['state']);\n if (data.hasOwnProperty('msg'))\n obj.msg = ApiClient.convertToType(data['msg'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/ResponseStateState} state\n */\nPbResponseState.prototype.state = undefined;\n\n/**\n * @member {String} msg\n */\nPbResponseState.prototype.msg = undefined;\n\n/**\n * @member {Number} code\n */\nPbResponseState.prototype.code = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufAny model module.\n * @module model/ProtobufAny\n * @version version not set\n */\nexport class ProtobufAny {\n /**\n * Constructs a new ProtobufAny.\n * @alias module:model/ProtobufAny\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufAny from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufAny} obj Optional instance to populate.\n * @return {module:model/ProtobufAny} The populated ProtobufAny instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufAny();\n if (data.hasOwnProperty('type_url'))\n obj.typeUrl = ApiClient.convertToType(data['type_url'], 'String');\n if (data.hasOwnProperty('value'))\n obj.value = ApiClient.convertToType(data['value'], 'Blob');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} typeUrl\n */\nProtobufAny.prototype.typeUrl = undefined;\n\n/**\n * @member {Blob} value\n */\nProtobufAny.prototype.value = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufFieldMask model module.\n * @module model/ProtobufFieldMask\n * @version version not set\n */\nexport class ProtobufFieldMask {\n /**\n * Constructs a new ProtobufFieldMask.\n * paths: \\\"f.a\\\" paths: \\\"f.b.d\\\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, the existing repeated values in the target resource will be overwritten by the new values. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then the existing sub-message in the target resource is overwritten. Given the target message: f { b { d : 1 x : 2 } c : 1 } And an update message: f { b { d : 10 } } then if the field mask is: paths: \\\"f.b\\\" then the result will be: f { b { d : 10 } c : 1 } However, if the update mask was: paths: \\\"f.b.d\\\" then the result would be: f { b { d : 10 x : 2 } c : 1 } In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \\\"user.display_name\\\" paths: \\\"photo\\\" } In JSON, the same mask is represented as below: { mask: \\\"user.displayName,photo\\\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \\\"name\\\" } Or: mask { paths: \\\"sub_message\\\" } Note that oneof type names (\\\"test_oneof\\\" in this case) cannot be used in paths.\n * @alias module:model/ProtobufFieldMask\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufFieldMask from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufFieldMask} obj Optional instance to populate.\n * @return {module:model/ProtobufFieldMask} The populated ProtobufFieldMask instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufFieldMask();\n if (data.hasOwnProperty('paths'))\n obj.paths = ApiClient.convertToType(data['paths'], ['String']);\n }\n return obj;\n }\n}\n\n/**\n * The set of field mask paths.\n * @member {Array.} paths\n */\nProtobufFieldMask.prototype.paths = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ProtobufAny} from './ProtobufAny';\n\n/**\n * The RuntimeError model module.\n * @module model/RuntimeError\n * @version version not set\n */\nexport class RuntimeError {\n /**\n * Constructs a new RuntimeError.\n * @alias module:model/RuntimeError\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a RuntimeError from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/RuntimeError} obj Optional instance to populate.\n * @return {module:model/RuntimeError} The populated RuntimeError instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new RuntimeError();\n if (data.hasOwnProperty('error'))\n obj.error = ApiClient.convertToType(data['error'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n if (data.hasOwnProperty('message'))\n obj.message = ApiClient.convertToType(data['message'], 'String');\n if (data.hasOwnProperty('details'))\n obj.details = ApiClient.convertToType(data['details'], [ProtobufAny]);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} error\n */\nRuntimeError.prototype.error = undefined;\n\n/**\n * @member {Number} code\n */\nRuntimeError.prototype.code = undefined;\n\n/**\n * @member {String} message\n */\nRuntimeError.prototype.message = undefined;\n\n/**\n * @member {Array.} details\n */\nRuntimeError.prototype.details = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPreference} from './PbPreference';\n\n/**\n * The ServiceCreatePreferenceRequest model module.\n * @module model/ServiceCreatePreferenceRequest\n * @version version not set\n */\nexport class ServiceCreatePreferenceRequest {\n /**\n * Constructs a new ServiceCreatePreferenceRequest.\n * @alias module:model/ServiceCreatePreferenceRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceCreatePreferenceRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceCreatePreferenceRequest} obj Optional instance to populate.\n * @return {module:model/ServiceCreatePreferenceRequest} The populated ServiceCreatePreferenceRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceCreatePreferenceRequest();\n if (data.hasOwnProperty('preference'))\n obj.preference = PbPreference.constructFromObject(data['preference']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbPreference} preference\n */\nServiceCreatePreferenceRequest.prototype.preference = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPreference} from './PbPreference';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceCreatePreferenceResponse model module.\n * @module model/ServiceCreatePreferenceResponse\n * @version version not set\n */\nexport class ServiceCreatePreferenceResponse {\n /**\n * Constructs a new ServiceCreatePreferenceResponse.\n * @alias module:model/ServiceCreatePreferenceResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceCreatePreferenceResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceCreatePreferenceResponse} obj Optional instance to populate.\n * @return {module:model/ServiceCreatePreferenceResponse} The populated ServiceCreatePreferenceResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceCreatePreferenceResponse();\n if (data.hasOwnProperty('preference'))\n obj.preference = PbPreference.constructFromObject(data['preference']);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbPreference} preference\n */\nServiceCreatePreferenceResponse.prototype.preference = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceCreatePreferenceResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceDeletePreferenceResponse model module.\n * @module model/ServiceDeletePreferenceResponse\n * @version version not set\n */\nexport class ServiceDeletePreferenceResponse {\n /**\n * Constructs a new ServiceDeletePreferenceResponse.\n * @alias module:model/ServiceDeletePreferenceResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceDeletePreferenceResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceDeletePreferenceResponse} obj Optional instance to populate.\n * @return {module:model/ServiceDeletePreferenceResponse} The populated ServiceDeletePreferenceResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceDeletePreferenceResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceDeletePreferenceResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPreference} from './PbPreference';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceGetPreferenceWithUserResponse model module.\n * @module model/ServiceGetPreferenceWithUserResponse\n * @version version not set\n */\nexport class ServiceGetPreferenceWithUserResponse {\n /**\n * Constructs a new ServiceGetPreferenceWithUserResponse.\n * @alias module:model/ServiceGetPreferenceWithUserResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceGetPreferenceWithUserResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceGetPreferenceWithUserResponse} obj Optional instance to populate.\n * @return {module:model/ServiceGetPreferenceWithUserResponse} The populated ServiceGetPreferenceWithUserResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceGetPreferenceWithUserResponse();\n if (data.hasOwnProperty('preference'))\n obj.preference = ApiClient.convertToType(data['preference'], [PbPreference]);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} preference\n */\nServiceGetPreferenceWithUserResponse.prototype.preference = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceGetPreferenceWithUserResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPreference} from './PbPreference';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceListPreferencesResponse model module.\n * @module model/ServiceListPreferencesResponse\n * @version version not set\n */\nexport class ServiceListPreferencesResponse {\n /**\n * Constructs a new ServiceListPreferencesResponse.\n * @alias module:model/ServiceListPreferencesResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListPreferencesResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListPreferencesResponse} obj Optional instance to populate.\n * @return {module:model/ServiceListPreferencesResponse} The populated ServiceListPreferencesResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListPreferencesResponse();\n if (data.hasOwnProperty('preferences'))\n obj.preferences = ApiClient.convertToType(data['preferences'], [PbPreference]);\n if (data.hasOwnProperty('next_page_token'))\n obj.nextPageToken = ApiClient.convertToType(data['next_page_token'], 'String');\n if (data.hasOwnProperty('total'))\n obj.total = ApiClient.convertToType(data['total'], 'String');\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} preferences\n */\nServiceListPreferencesResponse.prototype.preferences = undefined;\n\n/**\n * @member {String} nextPageToken\n */\nServiceListPreferencesResponse.prototype.nextPageToken = undefined;\n\n/**\n * @member {String} total\n */\nServiceListPreferencesResponse.prototype.total = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceListPreferencesResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPreference} from './PbPreference';\nimport {ProtobufFieldMask} from './ProtobufFieldMask';\n\n/**\n * The ServiceUpdatePreferenceRequest model module.\n * @module model/ServiceUpdatePreferenceRequest\n * @version version not set\n */\nexport class ServiceUpdatePreferenceRequest {\n /**\n * Constructs a new ServiceUpdatePreferenceRequest.\n * @alias module:model/ServiceUpdatePreferenceRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdatePreferenceRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdatePreferenceRequest} obj Optional instance to populate.\n * @return {module:model/ServiceUpdatePreferenceRequest} The populated ServiceUpdatePreferenceRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdatePreferenceRequest();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('preference'))\n obj.preference = PbPreference.constructFromObject(data['preference']);\n if (data.hasOwnProperty('update_mask'))\n obj.updateMask = ProtobufFieldMask.constructFromObject(data['update_mask']);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nServiceUpdatePreferenceRequest.prototype.id = undefined;\n\n/**\n * @member {module:model/PbPreference} preference\n */\nServiceUpdatePreferenceRequest.prototype.preference = undefined;\n\n/**\n * @member {module:model/ProtobufFieldMask} updateMask\n */\nServiceUpdatePreferenceRequest.prototype.updateMask = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbPreference} from './PbPreference';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceUpdatePreferenceResponse model module.\n * @module model/ServiceUpdatePreferenceResponse\n * @version version not set\n */\nexport class ServiceUpdatePreferenceResponse {\n /**\n * Constructs a new ServiceUpdatePreferenceResponse.\n * @alias module:model/ServiceUpdatePreferenceResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdatePreferenceResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdatePreferenceResponse} obj Optional instance to populate.\n * @return {module:model/ServiceUpdatePreferenceResponse} The populated ServiceUpdatePreferenceResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdatePreferenceResponse();\n if (data.hasOwnProperty('preference'))\n obj.preference = PbPreference.constructFromObject(data['preference']);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbPreference} preference\n */\nServiceUpdatePreferenceResponse.prototype.preference = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceUpdatePreferenceResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.preferences.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from \"../ApiClient\";\nimport {RuntimeError} from '../model/RuntimeError';\nimport {ServiceCreatePreferenceRequest} from '../model/ServiceCreatePreferenceRequest';\nimport {ServiceCreatePreferenceResponse} from '../model/ServiceCreatePreferenceResponse';\nimport {ServiceDeletePreferenceResponse} from '../model/ServiceDeletePreferenceResponse';\nimport {ServiceGetPreferenceWithUserResponse} from '../model/ServiceGetPreferenceWithUserResponse';\nimport {ServiceListPreferencesResponse} from '../model/ServiceListPreferencesResponse';\nimport {ServiceUpdatePreferenceRequest} from '../model/ServiceUpdatePreferenceRequest';\nimport {ServiceUpdatePreferenceResponse} from '../model/ServiceUpdatePreferenceResponse';\n\n/**\n* PreferencesService service.\n* @module api/PreferencesServiceApi\n* @version version not set\n*/\nexport class PreferencesServiceApi {\n\n /**\n * Constructs a new PreferencesServiceApi. \n * @alias module:api/PreferencesServiceApi\n * @class\n * @param {module:ApiClient} [apiClient] Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\n constructor(apiClient) {\n this.apiClient = apiClient || ApiClient.instance;\n }\n\n\n\n /**\n * Create Preference\n * @param {module:model/ServiceCreatePreferenceRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceCreatePreferenceResponse} and HTTP response\n */\n preferencesServiceCreateWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling preferencesServiceCreate\");\n }\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceCreatePreferenceResponse;\n\n return this.apiClient.callApi(\n '/v1/preferences:create', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Create Preference\n * @param {module:model/ServiceCreatePreferenceRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceCreatePreferenceResponse}\n */\n preferencesServiceCreate(body) {\n return this.preferencesServiceCreateWithHttpInfo(body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * Delete Preference\n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceDeletePreferenceResponse} and HTTP response\n */\n preferencesServiceDeleteWithHttpInfo() {\n let postBody = null;\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceDeletePreferenceResponse;\n\n return this.apiClient.callApi(\n '/v1/preferences:delete', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Delete Preference\n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceDeletePreferenceResponse}\n */\n preferencesServiceDelete() {\n return this.preferencesServiceDeleteWithHttpInfo()\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * GetWithUser Preference with UserId\n * @param {String} userId \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceGetPreferenceWithUserResponse} and HTTP response\n */\n preferencesServiceGetWithUserWithHttpInfo(userId) {\n let postBody = null;\n\n // verify the required parameter 'userId' is set\n if (userId === undefined || userId === null) {\n throw new Error(\"Missing the required parameter 'userId' when calling preferencesServiceGetWithUser\");\n }\n\n\n let pathParams = {\n 'user_id': userId\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceGetPreferenceWithUserResponse;\n\n return this.apiClient.callApi(\n '/v1/users/{user_id}/preferences', 'GET',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * GetWithUser Preference with UserId\n * @param {String} userId \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceGetPreferenceWithUserResponse}\n */\n preferencesServiceGetWithUser(userId) {\n return this.preferencesServiceGetWithUserWithHttpInfo(userId)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * List Preferences\n * @param {Object} opts Optional parameters\n * @param {String} opts.action \n * @param {Number} opts.pageSize \n * @param {String} opts.pageToken \n * @param {String} opts.query \n * @param {String} opts.orderBy \n * @param {Number} opts.paginateOffset \n * @param {Number} opts.paginateLimit \n * @param {String} opts.paginateNextPageToken \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceListPreferencesResponse} and HTTP response\n */\n preferencesServiceListWithHttpInfo(opts) {\n opts = opts || {};\n let postBody = null;\n\n\n let pathParams = {\n };\n let queryParams = {\n 'action': opts['action'],\n 'page_size': opts['pageSize'],\n 'page_token': opts['pageToken'],\n 'query': opts['query'],\n 'order_by': opts['orderBy'],\n 'paginate.offset': opts['paginateOffset'],\n 'paginate.limit': opts['paginateLimit'],\n 'paginate.next_page_token': opts['paginateNextPageToken']\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceListPreferencesResponse;\n\n return this.apiClient.callApi(\n '/v1/preferences:list', 'GET',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * List Preferences\n * @param {Object} opts Optional parameters\n * @param {String} opts.action \n * @param {Number} opts.pageSize \n * @param {String} opts.pageToken \n * @param {String} opts.query \n * @param {String} opts.orderBy \n * @param {Number} opts.paginateOffset \n * @param {Number} opts.paginateLimit \n * @param {String} opts.paginateNextPageToken \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceListPreferencesResponse}\n */\n preferencesServiceList(opts) {\n return this.preferencesServiceListWithHttpInfo(opts)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * Update Preference\n * @param {module:model/ServiceUpdatePreferenceRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceUpdatePreferenceResponse} and HTTP response\n */\n preferencesServiceUpdateWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling preferencesServiceUpdate\");\n }\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceUpdatePreferenceResponse;\n\n return this.apiClient.callApi(\n '/v1/preferences:update', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Update Preference\n * @param {module:model/ServiceUpdatePreferenceRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceUpdatePreferenceResponse}\n */\n preferencesServiceUpdate(body) {\n return this.preferencesServiceUpdateWithHttpInfo(body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n}\n","import { data } from \"browserslist\";\nimport { head } from \"lodash\";\nimport { stringify } from \"query-string\";\nimport { useRef } from \"react\";\nimport { ApiClient } from \"./client/ApiClient\";\nimport { OrdersServiceApi } from \"./client/dr2am.tasks.orders-js/src\";\nimport { PreferencesServiceApi } from \"./client/dr2am.tasks.preferences-js/src\";\nimport { AUTHORIZED_USER } from \"./oauth\";\n\n\nvar token: any\nfunction getHeaders() {\n const headers = new Headers({ 'content-type': 'application/json' });\n token = token || localStorage.getItem(\"wf_oversea_token\")\n if (token && token != \"\") {\n headers.set(\"Authorization\", \"token \" + token);\n }\n return headers;\n}\nexport const wfConfig = {\n // apiURL: new URL(\"https://oversea.wanfangdata.com.cn/api/v1\"),\n apiURL: new URL(\"https://globe.wanfangdata.com.cn/api/v1\"),\n}\n\nexport class Endpoint {\n private apiURL: string\n private defaultPath: string\n constructor({ apiURL, defaultPath }: any) {\n // this.apiURL = apiURL || \"https://accounts.dr2am.cn/api/v1\"\n // this.apiURL = apiURL || \"https://globe.wanfangdata.com.cn/api/v1\"\n this.apiURL = apiURL || wfConfig.apiURL.href\n this.defaultPath = defaultPath || \"\"\n }\n\n public getEndpoint(path: string = \"\") {\n return this.getEndpointWithId(\"\", path || \"\")\n }\n public getEndpointWithId(id: string = \"\", path: string = \"\") {\n const apiUrl = this.apiURL;\n let endpoint = (apiUrl + this.defaultPath)\n if (id != \"\") {\n endpoint = endpoint + `/${id}`\n }\n if (path != \"\") {\n endpoint = endpoint + `/${path}`\n }\n\n return endpoint\n }\n}\nfunction handleError(res: any) {\n if (res && res.status_code) {\n return { error: res, data: null }\n }\n return { data: res }\n}\n\nexport function useOAuth(auth: any, APIURL?: string) {\n const endpoint = new Endpoint({ apiURL: APIURL, defaultPath: \"/v1/oauth/apps\" })\n\n async function tokenFetch(url: string, request: any) {\n return auth.token().then(async (tt: any) => {\n const { accessToken, tokenType } = tt || {}\n // headers = new Headers()\n request.headers = request.headers || new Headers();\n if (accessToken) {\n const token = accessToken;//|| localStorage.getItem(\"wf_oversea_token\")\n if (token && token != \"\") {\n request.headers.set(\"Authorization\", `${tokenType} ${token}`);\n }\n }\n\n return fetch(url, request)\n })\n }\n async function createOAuthApp(app: any) {\n const url = endpoint.getEndpoint(\"\")\n try {\n const res: any = await tokenFetch(url, {\n // mode: 'cors',\n method: 'POST',\n body: JSON.stringify(app),\n credentials: 'include',\n // headers: getHeaders(),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function updateOAuthApp(app: any) {\n const url = endpoint.getEndpointWithId(app.id, \"update\")\n try {\n const res: any = await tokenFetch(url, {\n // mode: 'cors',\n method: 'POST',\n body: JSON.stringify(app),\n credentials: 'include',\n // headers: getHeaders(),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function deleteOAuthApp(id: string) {\n const url = endpoint.getEndpointWithId(id, \"delete\")\n try {\n const res: any = await tokenFetch(url, {\n method: 'GET',\n credentials: 'include',\n\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function getOAuthApps() {\n const url = endpoint.getEndpoint(\"\")\n try {\n const res: any = await tokenFetch(url, {\n // mode: 'cors',\n method: 'GET',\n credentials: 'include',\n headers: getHeaders(),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n return { createOAuthApp, getOAuthApps, deleteOAuthApp, updateOAuthApp }\n}\n\nexport function useUser(apiUrl?: string) {\n const token = useRef()\n // const [results, setResults] = useState()\n const endpoint = new Endpoint({ defaultPath: \"/users\" })\n\n async function createUser(user: any, token: any, inviteId: any, redirectTo: any) {\n const endpoint = apiUrl + \"/users\"\n try {\n const res: any = await fetch(endpoint + \"?\" + `r=${redirectTo}`, {\n method: 'POST',\n body: JSON.stringify(user),\n credentials: 'include',\n })\n const data = await res.json()\n return { data }\n\n } catch (error) {\n return { error }\n\n }\n }\n async function loginById(id: any, password: any, redirectTo: any) {\n const endpoint = apiUrl + \"/users/login\"\n try {\n const res: any = await fetch(endpoint + \"?\" + \"format=old\", {\n method: 'POST',\n body: JSON.stringify({\n id: id,\n password: password\n }),\n credentials: 'include'\n })\n if (res.headers && res.headers.get(\"Token\")) {\n token.current = res.headers.get(\"Token\")\n if (token.current) {\n localStorage.setItem(\"nada_token\", token.current)\n }\n }\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n }\n async function loginForToken(_token: string) {\n\n // token = _token\n localStorage.setItem(\"nada_token\", _token)\n const { data, error } = await getMe()\n\n return { data, error }\n }\n async function login(login_id: any, password: any, redirectTo: any) {\n const url = endpoint.getEndpoint(\"login\")\n try {\n const res: any = await fetch(url, {\n method: 'POST',\n body: JSON.stringify({\n login_id: login_id,\n password: password\n }),\n credentials: 'include'\n })\n if (res.headers && res.headers.get(\"Token\")) {\n token.current = res.headers.get(\"Token\")\n if (token.current) {\n localStorage.setItem(\"wf_oversea_token\", token.current)\n }\n }\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n }\n async function getMe() {\n // const endpoint = apiUrl + \"/users/me\"\n const url = endpoint.getEndpoint(\"me\")\n try {\n const res: any = await fetch(url, {\n // mode: 'cors',\n method: 'GET',\n credentials: 'include',\n headers: getHeaders(),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function getUsers() {\n // const endpoint = apiUrl + \"/users/me\"\n const url = endpoint.getEndpoint(\"\")\n try {\n const res: any = await fetch(url, {\n // mode: 'cors',\n method: 'GET',\n credentials: 'include',\n headers: getHeaders(),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function deleteUser(id: string) {\n // const endpoint = apiUrl + \"/users/me\"\n const url = endpoint.getEndpointWithId(id, \"delete\")\n try {\n const res: any = await fetch(url + \"?permanent=true\", {\n // mode: 'cors',\n method: 'POST',\n credentials: 'include',\n headers: getHeaders(),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function logout() {\n // token = \"\"\n localStorage.removeItem(\"nada_token\")\n window.location.reload()\n }\n\n return { createUser, loginById, getMe, login, logout, loginForToken, getUsers, deleteUser }\n\n}\n\n\nexport function useUserWithOAuth(auth: any, apiUrl?: string) {\n const client = new ApiClient();\n client.basePath = apiUrl || `${wfConfig.apiURL.protocol}//${wfConfig.apiURL.hostname}/api`;\n client.authc = auth;\n const preferencesApi = new PreferencesServiceApi(client);\n const ordersApi = new OrdersServiceApi(client);\n // const [results, setResults] = useState()\n const endpoint = new Endpoint({ apiURL: apiUrl, defaultPath: \"/v1/users\" })\n\n async function createUser(user: any, token: any, inviteId: any, redirectTo: any) {\n // const endpoint = apiUrl + \"/users\"\n const url = endpoint.getEndpoint()\n try {\n const res: any = await fetch(url + \"?\" + `r=${redirectTo}`, {\n method: 'POST',\n body: JSON.stringify(user),\n credentials: 'include',\n })\n const data = await res.json()\n return { data }\n\n } catch (error) {\n return { error }\n\n }\n }\n async function loginById(id: any, password: any, redirectTo: any) {\n const endpoint = apiUrl + \"/v1/users/login\"\n try {\n const res: any = await fetch(endpoint + \"?\" + \"format=old\", {\n method: 'POST',\n body: JSON.stringify({\n id: id,\n password: password\n }),\n credentials: 'include'\n })\n if (res.headers && res.headers.get(\"Token\")) {\n token = res.headers.get(\"Token\")\n localStorage.setItem(\"nada_token\", token as string)\n }\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n }\n async function loginForToken(_token: string) {\n token = _token\n localStorage.setItem(\"nada_token\", _token)\n const { data, error } = await getMe()\n\n return { data, error }\n }\n async function login(login_id: any, password: any, redirectTo: any) {\n const url = endpoint.getEndpoint(\"login\")\n try {\n const res: any = await fetch(url, {\n method: 'POST',\n body: JSON.stringify({\n login_id: login_id,\n password: password\n }),\n credentials: 'include'\n })\n if (res.headers && res.headers.get(\"Token\")) {\n token = res.headers.get(\"Token\")\n localStorage.setItem(\"wf_oversea_token\", token as string)\n await auth.setToken(token)\n }\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n }\n async function tokenFetch(url: string, request: any) {\n return auth.token().then(async (tt: any) => {\n const { accessToken, tokenType } = tt || {}\n\n // headers = new Headers()\n request.headers = request.headers || new Headers();\n if (accessToken) {\n\n const token = accessToken;//|| localStorage.getItem(\"wf_oversea_token\")\n if (token && token != \"\") {\n request.headers.set(\"Authorization\", `${tokenType} ${token}`);\n }\n }\n\n return fetch(url, request)\n })\n }\n async function getMe() {\n // const endpoint = apiUrl + \"/users/me\"\n return auth.token().then(async (t: any) => {\n // headers = new Headers()\n const { accessToken, tokenType } = t || {}\n const headers = new Headers({ 'content-type': 'application/json' });\n const token = accessToken;//|| localStorage.getItem(\"wf_oversea_token\")\n if (token && token != \"\") {\n\n headers.set(\"Authorization\", `${tokenType} ${token}`);\n }\n const url = endpoint.getEndpoint(\"me\")\n try {\n const res: any = await auth.tokenFetch(url, {\n // mode: 'cors',\n method: 'GET',\n // credentials: 'include',\n // headers: headers,\n })\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n })\n }\n\n async function loadMe() {\n // const data: any = {}\n // async function dispatch(name: string, fn: any) {\n // const { data, error } = await fn()\n // data[name] = { data, error }\n // }\n // const promises = [\n // dispatch(\"user\", getMe),\n // ];\n\n const userRes = await getMe()\n if (userRes.error) {\n return userRes\n }\n const preferenceRes = await getUserPreference()\n return {\n user: userRes,\n preference: preferenceRes\n }\n }\n async function getUsers(name?: string) {\n // const endpoint = apiUrl + \"/users/me\"\n const url = endpoint.getEndpoint(\"\")\n try {\n\n const res: any = await auth.tokenFetch(`${url}${name ? \"?name=\" + name : \"\"}`, {\n // mode: 'cors',\n method: 'GET',\n credentials: 'include',\n // headers: getHeaders(),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function getUserById(id: string) {\n // const endpoint = apiUrl + \"/users/me\"\n const url = endpoint.getEndpoint(id)\n try {\n\n const res: any = await tokenFetch(`${url}`, {\n // mode: 'cors',\n method: 'GET',\n credentials: 'include',\n // headers: getHeaders(),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function deleteUser(id: string) {\n // const endpoint = apiUrl + \"/users/me\"\n const url = endpoint.getEndpointWithId(id, \"delete\")\n try {\n const res: any = await tokenFetch(url + \"?permanent=true\", {\n method: 'POST',\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n\n async function updateUserRoles(id: string, roles: any) {\n // const endpoint = apiUrl + \"/users/me\"\n const url = endpoint.getEndpointWithId(id, \"roles\")\n try {\n const res: any = await tokenFetch(url + \"?permanent=true\", {\n method: 'POST',\n body: JSON.stringify({ roles }),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function updateUser(id: string, user: any, paths: any) {\n // const endpoint = apiUrl + \"/users/me\"\n const url = endpoint.getEndpointWithId(id, \"update\")\n try {\n user.id = id\n const res: any = await tokenFetch(url + \"?permanent=true\", {\n method: 'POST',\n body: JSON.stringify({ fieldMask: { paths }, user }),\n })\n\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n async function logout(reqdata?: any) {\n // token = \"\"\n // localStorage.removeItem(\"nada_token\")\n // window.location.reload()\n debugger\n try {\n\n // \"https://globe.wanfangdata.com.cn/api/v1\"\n // const url = \"https://accounts.dr2am.cn/oauth/deauthorize\";// + stringify(reqdata)\n // const url = \"https://globe.wanfangdata.com.cn/oauth/deauthorize\";// + stringify(reqdata)\n let url = apiUrl || `${wfConfig.apiURL.protocol}//${wfConfig.apiURL.host}/oauth/deauthorize`;// + stringify(reqdata)\n // const url = endpoint1.getEndpoint(\"logout\")\n if (apiUrl) {\n const a = new URL(apiUrl)\n url = `${a.protocol}//${a.host}/oauth/deauthorize`\n }\n const req = {\n method: 'POST',\n body: JSON.stringify({\n ...reqdata,\n client_id: auth.config.clientId\n })\n }\n const res: any = await auth.tokenFetch(url, {\n // mode: 'cors',\n method: 'POST',\n credentials: 'include',\n body: JSON.stringify({\n ...reqdata,\n client_id: auth.config.clientId\n })\n // headers: headers,\n })\n // const res: any = await tokenFetch(url, req)\n // const data = await res.json()\n // if (data && data.status_code) {\n // return { error: data, data: {} }\n // }\n // localStorage.removeItem(AUTHORIZED_USER)\n // return { data: data || {} }\n\n } catch (error) {\n\n } finally {\n return auth.revoke()\n }\n\n }\n async function updatePreference(preference: any) {\n try {\n // new LocalesApi(client);\n const res = preferencesApi.preferencesServiceUpdate({ preference, update_mask: { paths: [\"value\"] } });\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n\n\n }\n\n async function getUserPreference(userId?: string) {\n try {\n // new LocalesApi(client);\n const res = await preferencesApi.preferencesServiceGetWithUser(userId || \"me\");\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n }\n async function listPreference(query: any) {\n try {\n // new LocalesApi(client);\n const res = await preferencesApi.preferencesServiceList({\n query: query,\n paginateLimit: 100\n } as any);\n\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n }\n\n async function getUserOrders(userId?: string) {\n try {\n const res = await ordersApi.ordersServiceGetWithUser(userId || \"me\");\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n }\n\n async function CreateUserOrder(userId: string, order: any) {\n try {\n const res = await ordersApi.ordersServiceCreate({\n order: {\n ...order,\n userId: userId\n }\n });\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n }\n async function updateUserOrder(userId: string, order: any, paths: any) {\n try {\n const res = await ordersApi.ordersServiceUpdate({\n order: {\n ...order,\n userId: userId\n },\n update_mask: { paths }\n });\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n }\n async function removeOrder(id: string) {\n try {\n const res = await ordersApi.ordersServiceDelete(id);\n return handlePbError(res)\n } catch (error) {\n return { error }\n }\n }\n return {\n createUser, loginById, getMe, login, logout, loginForToken, getUsers, getUserById, deleteUser, updateUser, updateUserRoles, loadMe,\n //preferences\n updatePreference, getUserPreference, listPreference,\n //order\n getUserOrders, CreateUserOrder, updateUserOrder, removeOrder,\n }\n\n}\nexport function handlePbError(res: any) {\n if (!res) {\n return { error: { status: \"error\", msg: \"unkonw error\" } }\n }\n if (res && res.status && res.status.code != 200) {\n return { ...res, error: res.status }\n }\n return { ...res }\n}\nexport function useConditionExpression(auth: any, apiUrl?: string) {\n const endpoint = new Endpoint({ apiURL: apiUrl, defaultPath: \"/v1/condition/expression\" })\n async function check(expression: any) {\n const url = endpoint.getEndpoint(\"check\")\n try {\n let formData = new FormData();\n formData.append('expression', JSON.stringify(expression));\n // formData.append('password', 'John123');\n\n const res: any = await auth.tokenFetch(url, {\n method: 'POST',\n body: formData\n // credentials: 'include',\n // mode: 'cors'\n })\n const data = await res.json()\n if (data && data.status_code) {\n return { error: data, data: {} }\n }\n return { data: data || {} }\n\n } catch (error) {\n return { error }\n\n }\n\n }\n return { check }\n}\n\n\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n * @module ApiClient\n * @version version not set\n */\n\n/**\n * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n * application to use this class directly - the *Api and model classes provide the public API for the service. The\n * contents of this file should be regarded as internal but are documented for completeness.\n * @alias module:ApiClient\n * @class\n */\nexport class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {}\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n this.authc = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n *
    \n *
  • application/json
  • \n *
  • application/json; charset=UTF8
  • \n *
  • APPLICATION/JSON
  • \n *
\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({\n 'Authorization': 'Bearer ' + auth.accessToken\n });\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n\n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n async callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n if (this.authc) {\n const token = await this.authc.token()\n if (token) {\n\n const {\n accessToken,\n tokenType\n } = token\n if (accessToken) {\n const req = token.sign({\n url,\n headers: headerParams\n })\n let {\n headers\n } = req\n headerParams = headers\n }\n }\n // headerParams = this.authc.token.sign(headerParams)\n }\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if (contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies) {\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n } else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined') {\n this.agent.saveCookies(response);\n }\n\n resolve({\n data,\n response\n });\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n\n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n * The default API client implementation.\n * @type {module:ApiClient}\n */\nApiClient.instance = new ApiClient();","import React, { ForwardedRef, useEffect, useLayoutEffect, useRef } from \"react\"\nimport { createPortal } from \"react-dom\"\n\nexport function useCombinedRefs(...refs: (ForwardedRef | null | undefined)[]) {\n const combinedRef = useRef(null)\n\n useIsomorphicLayoutEffect(() => {\n function setRefs(current: T | null = null) {\n for (const ref of refs) {\n if (!ref) {\n return\n }\n if (typeof ref === 'function') {\n ref(current)\n } else {\n ref.current = current\n }\n }\n }\n\n setRefs(combinedRef.current)\n\n return () => {\n // ensure the refs get updated on unmount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n setRefs(combinedRef.current)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [...refs, combinedRef.current])\n\n return combinedRef\n}\nexport const useIsomorphicLayoutEffect =\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined'\n ? useLayoutEffect\n : useEffect\n\nexport default useIsomorphicLayoutEffect\nconst PRIMER_PORTAL_ROOT_ID = '__primerPortalRoot__'\nconst DEFAULT_PORTAL_CONTAINER_NAME = '__default__'\n\nconst portalRootRegistry: Partial> = {}\n\n/**\n * Register a container to serve as a portal root.\n * @param root The element that will be the root for portals created in this container\n * @param name The name of the container, to be used with the `containerName` prop on the Portal Component.\n * If name is not specified, registers the default portal root.\n */\nexport function registerPortalRoot(root: Element, name = DEFAULT_PORTAL_CONTAINER_NAME): void {\n portalRootRegistry[name] = root\n}\n// Ensures that a default portal root exists and is registered. If a DOM element exists\n// with id __primerPortalRoot__, allow that element to serve as the default portal root.\n// Otherwise, create that element and attach it to the end of document.body.\nfunction ensureDefaultPortal() {\n const existingDefaultPortalContainer = portalRootRegistry[DEFAULT_PORTAL_CONTAINER_NAME]\n if (!existingDefaultPortalContainer || !document.body.contains(existingDefaultPortalContainer)) {\n let defaultPortalContainer = document.getElementById(PRIMER_PORTAL_ROOT_ID)\n if (!(defaultPortalContainer instanceof Element)) {\n defaultPortalContainer = document.createElement('div')\n defaultPortalContainer.setAttribute('id', PRIMER_PORTAL_ROOT_ID)\n defaultPortalContainer.style.position = 'absolute'\n defaultPortalContainer.style.top = '0'\n defaultPortalContainer.style.left = '0'\n const suitablePortalRoot = document.querySelector('[data-portal-root]')\n if (suitablePortalRoot) {\n suitablePortalRoot.appendChild(defaultPortalContainer)\n } else {\n document.body.appendChild(defaultPortalContainer)\n }\n }\n\n registerPortalRoot(defaultPortalContainer)\n }\n}\nexport interface PortalProps {\n /**\n * Called when this portal is added to the DOM\n */\n onMount?: () => void\n\n /**\n * Optional. Mount this portal at the container specified\n * by this name. The container must be previously registered\n * with `registerPortal`.\n */\n containerName?: string\n}\n\n/**\n * Creates a React Portal, placing all children in a separate physical DOM root node.\n * @see https://reactjs.org/docs/portals.html\n */\nexport const Portal: React.FC = ({ children, onMount, containerName: _containerName }) => {\n const hostElement = document.createElement('div')\n\n // Portaled content should get their own stacking context so they don't interfere\n // with each other in unexpected ways. One should never find themselves tempted\n // to change the zIndex to a value other than \"1\".\n hostElement.style.position = 'relative'\n hostElement.style.zIndex = '1'\n const elementRef = React.useRef(hostElement)\n\n useIsomorphicLayoutEffect(() => {\n let containerName = _containerName\n if (containerName === undefined) {\n containerName = DEFAULT_PORTAL_CONTAINER_NAME\n ensureDefaultPortal()\n }\n const parentElement = portalRootRegistry[containerName]\n\n if (!parentElement) {\n throw new Error(\n `Portal container '${_containerName}' is not yet registered. Container must be registered with registerPortal before use.`\n )\n }\n const element = elementRef.current\n parentElement.appendChild(element)\n onMount?.()\n\n return () => {\n parentElement.removeChild(element)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [elementRef])\n\n return createPortal(children, elementRef.current)\n}","import { useState } from \"react\";\nimport styled from \"styled-components\";\nimport { Portal } from \"./portal/portal\";\n\n\nconst DetailDialog = styled.div`\nposition: fixed;\nmargin: 10vh auto;\ntop: 0;\nleft: 50%;\ntransform: translateX(-50%);\nz-index: 999;\nmax-height: 80vh;\nmax-width: 90vw;\nwidth: 448px;\noverflow: auto;\n${({ fullscreen }) => fullscreen && `\n width:100%;\n height:100%;\n max-height: unset;\n max-width: unset;\n margin: auto;\n`}\n`\n\n\nconst OverlayBackdroCenter = styled.div`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 999;\n display: flex;\n background-color: var(--color-neutral-muted);\n align-items: center;\n justify-content: center;\n`\nexport function Details({ fullscreen, trigger, children, open, onClose, onOpen, ...props }: any) {\n const [isOpen, setIsOpen] = useState(open);\n // if (!trigger) {\n // return <>not defined trigger;\n // }\n function close() {\n setIsOpen(false);\n onClose && onClose()\n }\n function toggle(e: any) {\n e.preventDefault();\n if (isOpen) {\n close()\n } else {\n setIsOpen(!isOpen);\n onOpen && onOpen()\n }\n }\n return \n \n \n {children({ close })}\n \n \n \n}\n","import _ from \"lodash\";\nimport { EventEmitter } from \"./event_emitter\";\n\n\n\n/*\\\n|*|\n|*| :: cookies.js ::\n|*|\n|*| A complete cookies reader/writer framework with full unicode support.\n|*|\n|*| https://developer.mozilla.org/en-US/docs/DOM/document.cookie\n|*|\n|*| This framework is released under the GNU Public License, version 3 or later.\n|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html\n|*|\n|*| Syntaxes:\n|*|\n|*| * docCookies.setItem(name, value[, end[, path[, domain[, secure]]]])\n|*| * docCookies.getItem(name)\n|*| * docCookies.removeItem(name[, path], domain)\n|*| * docCookies.hasItem(name)\n|*| * docCookies.keys()\n|*|\n\\*/\n\nexport const docCookies = {\n getItem: function (sKey: string) {\n return decodeURIComponent(document.cookie.replace(new RegExp(\"(?:(?:^|.*;)\\\\s*\" + encodeURIComponent(sKey).replace(/[-.+*]/g, \"\\\\$&\") + \"\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$\"), \"$1\")) || null;\n },\n setItem: function (sKey: string, sValue: any, option?: any) {\n // setItem: function (sKey: string, sValue: any, vEnd?: any, sPath?: any, sDomain?: any, bSecure?: any) {\n const { vEnd, sPath, sDomain, bSecure }: any = option\n if (!sKey || /^(?:expires|max\\-age|path|domain|secure)$/i.test(sKey)) { return false; }\n var sExpires = \"\";\n if (vEnd) {\n switch (vEnd.constructor) {\n case Number:\n sExpires = vEnd === Infinity ? \"; expires=Fri, 31 Dec 9999 23:59:59 GMT\" : \"; max-age=\" + vEnd;\n break;\n case String:\n sExpires = \"; expires=\" + vEnd;\n break;\n case Date:\n sExpires = \"; expires=\" + vEnd.toUTCString();\n break;\n }\n }\n document.cookie = encodeURIComponent(sKey) + \"=\" + encodeURIComponent(sValue) + sExpires + (sDomain ? \"; domain=\" + sDomain : \"\") + (sPath ? \"; path=\" + sPath : \"\") + (bSecure ? \"; secure\" : \"\");\n return true;\n },\n removeItem: function (sKey: string, option?: any) {\n const { sPath, sDomain } = option\n if (!sKey || !this.hasItem(sKey)) { return false; }\n document.cookie = encodeURIComponent(sKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 GMT\" + (sDomain ? \"; domain=\" + sDomain : \"\") + (sPath ? \"; path=\" + sPath : \"\");\n return true;\n },\n hasItem: function (sKey: string) {\n return (new RegExp(\"(?:^|;\\\\s*)\" + encodeURIComponent(sKey).replace(/[-.+*]/g, \"\\\\$&\") + \"\\\\s*\\\\=\")).test(document.cookie);\n },\n keys: /* optional method: you can safely remove it! */ function () {\n var aKeys = document.cookie.replace(/((?:^|\\s*;)[^\\=]+)(?=;|$)|^\\s*|\\s*(?:\\=[^;]*)?(?:\\1|$)/g, \"\").split(/\\s*(?:\\=[^;]*)?;\\s*/);\n for (var nIdx = 0; nIdx < aKeys.length; nIdx++) { aKeys[nIdx] = decodeURIComponent(aKeys[nIdx]); }\n return aKeys;\n }\n};\n\n\n\nclass knowledgeStore extends EventEmitter {\n private store: any = {}\n private _i18n: any\n private storage = window.localStorage\n constructor() {\n super()\n\n }\n /**\n * update\n key:string,value:any */\n public update(key: string, value: any) {\n if (key == \"searchReq\") {\n this.storage.setItem(\"last_search_req\", JSON.stringify(value))\n }\n this.store[key] = value\n this.dispatch(key, value)\n }\n /**\n * get\n */\n public get(key: string) {\n try {\n let value = _.get(this.store, key)\n if (!value && key == \"searchReq\") {\n const str: any = this.storage.getItem(\"last_search_req\")\n value = JSON.parse(str)\n this.store[key] = value\n }\n return value\n } catch (error) {\n console.warn(error);\n\n }\n\n\n }\n /**\n * currentUser\n */\n public currentUser() {\n return this.store[\"user\"]\n }\n /**\n * currentCollections\n */\n public currentCollections() {\n return _.get(this.store, \"searchReq.collections\")\n }\n\n /**\n * documentSelections\n */\n public documentSelections() {\n let selections = this.get(\"documentSelections\")\n if (!selections) {\n try {\n const str: any = this.storage.getItem(\"wfhk_document_selections\")\n selections = JSON.parse(str) || {}\n // if (selections) {\n this.store[\"documentSelections\"] = selections\n // }\n } catch (error) {\n selections = {}\n }\n }\n var self = this;\n return {\n has: function (id: string) {\n let selections = self.get(\"documentSelections\")\n return !!selections[id]\n },\n remove: function (id: string) {\n let selections = self.get(\"documentSelections\")\n selections[id] = undefined\n delete selections[id]\n self.storage.setItem(\"wfhk_document_selections\", JSON.stringify(selections))\n self.dispatch(\"documentSelections_change\", undefined)\n self.dispatch(\"documentSelections_\" + id, undefined)\n },\n add: function (id: string, value: any) {\n let selections = self.get(\"documentSelections\")\n selections[id] = value\n const newLocal = JSON.stringify(selections);\n self.storage.setItem(\"wfhk_document_selections\", newLocal)\n self.dispatch(\"documentSelections_change\", undefined)\n },\n addAll: function (...ids: any) {\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n selections[id] = true\n }\n const newLocal = JSON.stringify(selections);\n self.storage.setItem(\"wfhk_document_selections\", newLocal)\n self.dispatch(\"documentSelections_change\", undefined)\n self.dispatch(\"documentSelections_add\", undefined)\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n self.dispatch(\"documentSelections_\" + id, undefined)\n }\n },\n removeAll: function (...ids: any) {\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n selections[id] = undefined\n delete selections[id]\n }\n const newLocal = JSON.stringify(selections);\n self.storage.setItem(\"wfhk_document_selections\", newLocal)\n self.dispatch(\"documentSelections_change\", undefined)\n self.dispatch(\"documentSelections_add\", undefined)\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n self.dispatch(\"documentSelections_\" + id, undefined)\n }\n },\n getAll: function () {\n let selections = self.get(\"documentSelections\")\n return _.keys(selections)\n },\n clear: function () {\n const ids = this.getAll()\n let selections = self.get(\"documentSelections\")\n selections = {}\n self.store[\"documentSelections\"] = {}\n self.storage.setItem(\"wfhk_document_selections\", JSON.stringify(selections))\n self.dispatch(\"documentSelections_change\", undefined)\n self.dispatch(\"documentSelections_clear\", undefined)\n for (let i = 0; i < ids.length; i++) {\n const id = ids[i];\n self.dispatch(\"documentSelections_\" + id, undefined)\n }\n\n }\n\n }\n }\n}\n\nexport const KnowledgeStore = new knowledgeStore()","\nexport class EventEmitter {\n [x: string]: any;\n\n\n constructor() {\n }\n on(name: string | number, callback: any) {\n const onid = generateId()\n callback = { id: onid, callback }\n var callbacks = this[name];\n if (!callbacks) {\n this[name] = [callback];\n }\n else {\n callbacks.push(callback);\n }\n return onid\n }\n kill(name: string | number, id: string) {\n const callbacks = this[name]\n this[name] = []\n if (!callbacks) {\n return\n }\n for (let i = 0; i < callbacks.length; i++) {\n const element = callbacks[i];\n if (element.id == id) {\n continue\n }\n this[name].push(element)\n }\n }\n dispatch(name: string | number, event: any) {\n var callbacks = this[name];\n if (callbacks)\n callbacks.forEach(({ callback }: any) => callback(event));\n }\n}\n\nfunction generateId(): string {\n // implementation taken from http://stackoverflow.com/a/2117523\n let id = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n id = id.replace(/[xy]/g, (c) => {\n const r = Math.floor(Math.random() * 16);\n let v;\n\n if (c === 'x') {\n v = r;\n } else {\n // eslint-disable-next-line no-mixed-operators\n v = r & 0x3 | 0x8;\n }\n\n return v.toString(16);\n });\n return id;\n}","import ClientOAuth2 from 'client-oauth2';\nimport { generateId as uuid } from './utils';\n// import uuid from 'uuid';\nexport const AUTHORIZED_USER = 'authorized_user'\nexport const AUTHORIZE_STATE = 'authorize_state'\nexport const AUTHORIZE_REDIRECT = 'authorize_redirect'\nexport const AUTHORIZE_NONCE = 'authorize_nonce'\nexport const AUTHORIZE_SESSION_ID = 'authorize_session_id'\ntype Configuration = {\n clientId: string,\n clientSecret: string,\n accessTokenUri: string,\n authorizationUri: string,\n redirectUri: string,\n scopes?: string[]\n}\n\nexport class Authentication {\n store!: Storage;\n refreshProcess?: any;\n tokenClient: ClientOAuth2\n isAuthorized = () => Boolean(this.store.getItem(AUTHORIZED_USER) || false)\n authorizeClient: ClientOAuth2\n\n constructor(\n options?: Configuration,\n store?: Storage\n ) {\n if (!options) {\n options = {\n clientId: '',\n clientSecret: '',\n accessTokenUri: '',\n authorizationUri: '',\n redirectUri: '',\n scopes: []\n }\n }\n if (store) {\n this.store = store\n } else if (typeof localStorage !== 'undefined') {\n this.store = localStorage\n }\n const mergedOptions = {\n clientId: options.clientId,\n clientSecret: options.clientSecret,//'is-public', // workaround for https://github.com/ory/fosite/issues/217\n accessTokenUri: options.accessTokenUri,\n authorizationUri: options.authorizationUri,\n redirectUri: options.redirectUri,\n scopes: options.scopes || ['offline', 'openid', 'force-consent'],\n type: [\"token\", \"id_token\"]\n }\n\n this.authorizeClient = new ClientOAuth2(mergedOptions)\n this.tokenClient = new ClientOAuth2({\n ...mergedOptions,\n clientId: encodeURIComponent(mergedOptions.clientId)\n })\n }\n\n revoke = async () => {\n this.store.removeItem(AUTHORIZE_NONCE)\n const state = this.store.getItem(AUTHORIZE_STATE)\n if (state) {\n this.store.removeItem(state)\n }\n this.store.removeItem(AUTHORIZE_STATE)\n this.store.removeItem(AUTHORIZED_USER)\n return Promise.resolve()\n }\n\n authorizeCode = () => {\n const state = uuid()\n const nonce = uuid()\n this.store.setItem(AUTHORIZE_STATE, state)\n this.store.setItem(AUTHORIZE_NONCE, nonce)\n const url = this.authorizeClient.code.getUri({\n state,\n // nonce\n })\n\n window.location.href = url\n }\n\n authorizeToken = () => {\n const state = uuid()\n const nonce = uuid()\n this.store.setItem(AUTHORIZE_STATE, state)\n this.store.setItem(AUTHORIZE_NONCE, nonce)\n const url = this.authorizeClient.token.getUri({\n state,\n })\n window.location.href = url\n }\n\n authorizeWithTenant = () => {\n const state = uuid()\n const nonce = uuid()\n this.store.setItem(AUTHORIZE_STATE, state)\n this.store.setItem(AUTHORIZE_NONCE, nonce)\n // this.authorizeClient.jwt.getToken\n // const url = this.authorizeClient.code.getUri({\n // state,\n // })\n return this.tokenClient.credentials.getToken().then(\n token => {\n this.store.removeItem(AUTHORIZE_NONCE)\n this.store.removeItem(AUTHORIZE_STATE)\n return this.storeToken(token)\n }\n )\n // window.location.href = url\n }\n /**\n * sends a request to the specified url from a form. this will change the window location.\n * @param {string} path the path to send the post request to\n * @param {object} params the paramiters to add to the url\n * @param {string} [method=post] the method to use on the form\n */\n\n post = (path: string, params: any, method = 'post') => {\n\n // The rest of this code assumes you are not using a library.\n // It can be made less wordy if you use one.\n const form = document.createElement('form');\n form.method = method;\n form.action = path;\n\n for (const key in params) {\n if (params.hasOwnProperty(key)) {\n const hiddenField = document.createElement('input');\n hiddenField.type = 'hidden';\n hiddenField.name = key;\n hiddenField.value = params[key];\n\n form.appendChild(hiddenField);\n }\n }\n\n document.body.appendChild(form);\n form.submit();\n }\n authorizePlugin = async (username: string, password: string, opts: any = { redirect: window.location.href }) => {\n await this.revoke()\n return this.post(\"/auth/login?returnurl=\" + opts.redirect, {\n \"user[login]\": username,\n \"user[password]\": password,\n \"user[read_me]\": \"1\",\n \"utf8\": \"%E2%9C%93\",\n \"recaptcha_token\": opts.recaptcha,\n \"authenticity_token\": uuid(),\n\n })\n\n // return fetch(\"/auth/login\", {\n // \"headers\": {\n // \"accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\",\n // \"accept-language\": \"zh-CN,zh;q=0.9,en;q=0.8\",\n // \"cache-control\": \"max-age=0\",\n // \"content-type\": \"application/x-www-form-urlencoded\",\n // \"upgrade-insecure-requests\": \"1\"\n // },\n // \"referrerPolicy\": \"origin-when-cross-origin\",\n // \"body\": `utf8=%E2%9C%93&authenticity_token=qnvrHX2UPpLsLPbC9pr1irvAPfXxjTs8UwVA9EPOnrgqWv98CziIc7CVlWlJUYLqOaKwSIHX4BwIMT%2FPUp0L1Q%3D%3D&user%5Blogin%5D=${username}&user%5Bpassword%5D=${password}&user%5Bread_me%5D=1&commit=%E4%BA%86%E8%A7%A3%E5%B9%B6%E7%99%BB%E5%BD%95&returnrul=${redirect}`,\n // \"method\": \"POST\",\n // \"mode\": \"cors\",\n // \"credentials\": \"include\",\n // \"redirect\": 'manual'\n // })\n }\n authorizePassword = (username: string, password: string) => {\n\n const state = uuid()\n const nonce = uuid()\n this.store.setItem(AUTHORIZE_STATE, state)\n this.store.setItem(AUTHORIZE_NONCE, nonce)\n return this.authorizeClient.owner.getToken(username, password).then(\n token => {\n this.store.removeItem(AUTHORIZE_NONCE)\n this.store.removeItem(AUTHORIZE_STATE)\n return this.storeToken(token)\n }\n )\n // ////log.info('Initializing OAuth2 authorize code flow at', url)\n // // \n // // window.location.href = url\n }\n\n storeToken = (token: ClientOAuth2.Token): Promise => {\n const payload = {\n ...token,\n data: {\n ...token.data,\n expires: token.expired()\n },\n expiresIn: undefined,\n client: null\n }\n this.store.setItem(AUTHORIZED_USER, JSON.stringify(payload))\n\n this.refreshProcess = null\n return Promise.resolve(token)\n }\n\n authorizationCallback = (url: string = window.location.href) => {\n let state = this.store.getItem(AUTHORIZE_STATE) || \"\"\n return this.tokenClient.token\n .getToken(url, { state: state })\n .then(token => {\n this.store.removeItem(AUTHORIZE_NONCE)\n this.store.removeItem(AUTHORIZE_STATE)\n return this.storeToken(token)\n })\n }\n authorizationCallback2 = (url: string = window.location.href) => {\n const state = this.store.getItem(AUTHORIZE_STATE)\n\n return this.tokenClient.code\n .getToken(url, { state: state || undefined })\n .then(token => {\n this.store.removeItem(AUTHORIZE_NONCE)\n this.store.removeItem(AUTHORIZE_STATE)\n return this.storeToken(token)\n })\n }\n authorizationCallbackImplict = (url: string = window.location.href) => {\n const state = this.store.getItem(AUTHORIZE_STATE)\n // this.tokenClient.token.getToken()\n return this.tokenClient.token\n .getToken(url, { state: state || undefined })\n .then(token => {\n this.store.removeItem(AUTHORIZE_NONCE)\n this.store.removeItem(AUTHORIZE_STATE)\n return this.storeToken(token)\n })\n }\n\n sessionId = () => {\n const id = this.store.getItem(AUTHORIZE_SESSION_ID) || uuid()\n this.store.setItem(AUTHORIZE_SESSION_ID, id)\n return id\n }\n\n // authorizedUserId = () => {\n // let user\n\n // if (!this.store.getItem(AUTHORIZED_USER)) {\n // const id = this.sessionId()\n // //log.info('Detected unauthorized user, assigning session id', id)\n // return id\n // }\n\n // try {\n // user = JSON.parse(this.store.getItem(AUTHORIZED_USER) || '')\n // } catch (e) {\n // //log.info(`Unable to parse user information because: ${e.message}`)\n // return this.sessionId()\n // }\n\n // if (user.data.forceUser) {\n // return user.data.forceUser\n // }\n\n // if (!user.data.id_token) {\n // //log.error('Unable to look up user because id_token is missing.')\n // return this.sessionId()\n // }\n\n // const parts = user.data.id_token.split('.')\n // if (parts.length !== 3) {\n // //log.error('Unable to look up user id because id_token is invalid.')\n // return this.sessionId()\n // }\n\n // try {\n // return JSON.parse(Buffer.from(parts[1], 'base64').toString()).sub\n // } catch (e) {\n // //log.exception(new Error(`Unable to parse id_token because ${e.message}`))\n // return this.sessionId()\n // }\n // }\n removeAuthorizedUser = () => {\n this.store.removeItem(AUTHORIZED_USER)\n }\n\n authorizedUser = () => {\n let user\n if (!this.store.getItem(AUTHORIZED_USER)) {\n const id = this.sessionId()\n //log.info('Detected unauthorized user, assigning session id', id)\n return id\n }\n\n try {\n\n user = JSON.parse(this.store.getItem(AUTHORIZED_USER) || 'null')\n } catch (e) {\n //log.info(`Unable to parse user information because: ${e.message}`)\n return this.sessionId()\n }\n\n if (user.data.forceUser) {\n return user.data.forceUser\n }\n\n if (!user.data.id_token) {\n //log.error('Unable to look up user because id_token is missing.')\n return this.sessionId()\n }\n\n const parts = user.data.id_token.split('.')\n if (parts.length !== 3) {\n //log.error('Unable to look up user id because id_token is invalid.')\n return this.sessionId()\n }\n\n try {\n return JSON.parse(Buffer.from(parts[1], 'base64').toString())\n } catch (e) {\n //log.exception(new Error(`Unable to parse id_token because ${e.message}`))\n return this.sessionId()\n }\n }\n\n token = (): Promise => {\n let user\n try {\n // user = {\"client\":null,\"data\":{\"access_token\":\"ZBFS042LNNWVH4JIQHEKMW\",\"refresh_token\":\"D7MDWQ3MUIM5DIOIP0ULQA\",\"expires_in\":\"7200\",\"id_token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9maWxlIjp7IkNsaWVudElEIjoiNDgyOTlhNjEtNDcyYy00MzZmLWI2YTItMGJlODI2YjUwZDJlIiwiSG9zdE5hbWUiOiIiLCJJc0F1dGhlZCI6dHJ1ZSwiSXNWYWxpZCI6dHJ1ZSwiTGlicmFyeUdyb3VwIjoiIiwiTmFtZSI6InlvcmhlX2NoYW4iLCJSb2xlcyI6InN5c3RlbV9hZG1pbiIsIlRlbmFudElkcyI6IiIsIlVzZXJOYW1lIjoieW9yaGVfY2hhbkBob3RtYWlsLmNvbSJ9fQ.rrea3-IsbfKyduzWot1o1k6LlHVhpWOWBR2kqNaC3SU\",\"scope\":\"offline openid\",\"token_type\":\"Bearer\",\"expires\":\"2019-11-19T13:46:14.198Z\"},\"tokenType\":\"bearer\",\"accessToken\":\"ZBFS042LNNWVH4JIQHEKMW\",\"refreshToken\":\"D7MDWQ3MUIM5DIOIP0ULQA\",\"expires\":\"2019-11-19T13:46:14.198Z\"}\n user = JSON.parse(this.store.getItem(AUTHORIZED_USER) || 'null')\n } catch (e) {\n console.error(e)\n //log.exception(\n // `Unable to fetch and parse user information from localStore because ${\n // e.message\n // }`\n // )\n return this.revoke().then(() => Promise.reject(e))\n }\n // if (!user || !user.accessToken || !user.refreshToken) {\n if (!user || !user.accessToken) {\n\n const err = new Error(\n 'Unable to retrieve authentication information from localStore.'\n )\n //log.exception(err)\n return this.revoke().then(() => Promise.reject(err))\n // return Promise.resolve(undefined)\n }\n\n const token = this.tokenClient.createToken(\n user.accessToken,\n user.refreshToken,\n user.tokenType,\n user.data\n )\n token.expiresIn(new Date(user.expires))\n\n if (token.expired()) {\n if (!this.refreshProcess) {\n //log.info('Token is already refreshing, returning existing promise.')\n this.refreshProcess = token\n .refresh()\n .then(this.storeToken)\n .catch(err => {\n return this.revoke().then(() => Promise.reject(err))\n })\n }\n\n return this.refreshProcess\n }\n\n return Promise.resolve(token)\n }\n}\n","/**\n * types/services/members.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n * \n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n *\n */\n\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n* @module ApiClient\n* @version version not set\n*/\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @alias module:ApiClient\n* @class\n*/\nexport default class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {\n }\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n *
    \n *
  • application/json
  • \n *
  • application/json; charset=UTF8
  • \n *
  • APPLICATION/JSON
  • \n *
\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({'Authorization': 'Bearer ' + auth.accessToken});\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n \n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if(contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies){\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n }\n else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined'){\n this.agent.saveCookies(response);\n }\n\n resolve({data, response});\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n \n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n* The default API client implementation.\n* @type {module:ApiClient}\n*/\nApiClient.instance = new ApiClient();\n","/*\n * types/services/collection.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n * @module ApiClient\n * @version version not set\n */\n\n/**\n * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n * application to use this class directly - the *Api and model classes provide the public API for the service. The\n * contents of this file should be regarded as internal but are documented for completeness.\n * @alias module:ApiClient\n * @class\n */\nexport class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n // this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n this.basePath = `${window.location.origin}`;\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {}\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n *
    \n *
  • application/json
  • \n *
  • application/json; charset=UTF8
  • \n *
  • APPLICATION/JSON
  • \n *
\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({\n 'Authorization': 'Bearer ' + auth.accessToken\n });\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n\n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if (contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies) {\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n } else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined') {\n this.agent.saveCookies(response);\n }\n\n resolve({\n data,\n response\n });\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n\n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n * The default API client implementation.\n * @type {module:ApiClient}\n */\nApiClient.instance = new ApiClient();","import { KnowledgeStore } from './store';\n\nclass KnowledgePlugin {\n constructor() {\n }\n\n setup = ({\n ...core\n }, {\n ...other\n }) => {\n const { security } = other\n core.application.register({\n id: 'knowledge',\n title: '知识',\n mount: async (context: any, params: any) => {\n const { renderApp } = await import('./application');\n KnowledgeStore.i18n = core.i18n\n const wfConfig = core.coreStore.get(\"wfConfig\")\n if (wfConfig) {\n KnowledgeStore.update(\"wfConfig\", wfConfig)\n }\n return renderApp(context, {\n ...params,\n i18n: core.i18n,\n authc: security.authc,\n knowledgeStore: KnowledgeStore,\n wfConfig: wfConfig,\n coreStore: core.coreStore,\n });\n }\n });\n return this\n }\n start = (core: any) => {\n const { chrome } = core\n chrome.addNavs(\"knowledge\", {\n display: \"知识\",\n href: \"/app/knowledge\",\n icon: ()\n })\n }\n stop = () => {\n\n }\n}\n\nconst registerPlugin = (window: any) => {\n const Plant = () => new KnowledgePlugin()\n window.registerPlugin(\"knowledge\", {\n id: \"knowledge\",\n plugin: {\n id: \"knowledge\",\n instance: Plant,\n requiredPlugins: [\"security\"]\n }\n })\n}\n\nconst knowledge = {\n registerPlugin: registerPlugin\n}\n// export const searchAPI = `http://localhost:82`\n// export const searchAPI = `http://${window.location.host}`\nexport const searchAPI = localStorage.getItem(\"wfhk_analysis_api\") || `${window.location.origin}/test/api/v1`\n// export const searchAPI = `http://127.0.1:82/test/api/v1`\n// export const searchAPI = `http://videos.wanfangdata.com.hk:82/test/api/v1`\n\nexport default knowledge","import _ from \"lodash\";\nimport { any, string } from \"prop-types\";\nimport { useRef } from \"react\";\nimport { Input } from \"./input\";\n\nexport const Form = ({ schemas, onSubmit, onCancel, onRemove, fn, ...props }: any) => {\n let refs = useRef({});\n fn = fn || function (value: any, key: string, schema?: any) {\n switch (schema.type) {\n case \"select\":\n if (value == \"未指定\")\n return \"\"\n break;\n default:\n break;\n }\n return value\n }\n function handleSubmit(e: React.MouseEvent) {\n e.preventDefault()\n const paths: any = []\n const data = _.reduce(schemas, (prev, curr) => {\n const { key } = curr\n let value = refs.current[key].value\n if (fn) {\n value = fn(value, key, curr)\n }\n if (curr.value != value) {\n paths.push(key)\n }\n return { ...prev, [key]: value }\n }, {})\n onSubmit && onSubmit(data, paths)\n }\n function handleCancel(e: React.MouseEvent) {\n onCancel && onCancel(e)\n }\n function handleRemove(e: React.MouseEvent) {\n e.preventDefault()\n const data = _.reduce(schemas, (prev, curr) => {\n const { key } = curr\n let value = refs.current[key].value\n if (!value) {\n return prev\n }\n if (fn) {\n value = fn(value, key, curr)\n }\n\n return { ...prev, [key]: value }\n }, {})\n onRemove && onRemove(data)\n }\n return <>\n
\n {_.map(schemas, schema => {\n const { key, label, value, type, options, maxLength, disabled } = schema\n return
\n { return refs.current[key] = ref }}\n id={key}\n type={type || \"text\"}\n options={options}\n maxLength={maxLength || 128}\n displayText={label}\n value={value}\n disabled={disabled}\n >\n
\n })}\n

\n\n \n

\n \n \n
\n\n\n

\n
\n \n}","import _ from \"lodash\"\nimport { any } from \"prop-types\"\nimport React, { forwardRef, useRef, useState } from \"react\"\nimport { generateId } from \"../utils\"\n\n\nconst YearAndMonthInput = forwardRef((props: any, ref: any) => {\n const { id, type, displayText, helpText, maxLength, options } = props\n function handleYearChange(e: any) {\n inputRef.current.value = `${e.target.value}-${monthRef.current.value}`\n }\n function handleMonthChange(e: any) {\n inputRef.current.value = `${yearRef.current.value}-${e.target.value}`\n }\n const yearRef = useRef()\n const monthRef = useRef()\n const inputRef = useRef()\n return
\n {\n const f = ref(node)\n inputRef.current = node;\n }}\n />\n\n \n \n \n \n
\n})\n\nconst KeyValuesInput = forwardRef((props: any, ref: any) => {\n const { onChange, defaultValue } = props\n const thisRef = useRef({ value: defaultValue })\n const f = ref(thisRef.current)\n const [keyValues, setKeyValues] = useState(thisRef.current.value)\n\n function handleAdd(e: any) {\n\n }\n function handleOnChange(data: any, mode: string) {\n switch (mode) {\n case \"create\":\n case \"update\":\n thisRef.current.value = { ...thisRef.current.value, [data.key]: data.value }\n setKeyValues({ ...thisRef.current.value })\n break;\n case \"delete\":\n delete thisRef.current[\"value\"][data.key]\n setKeyValues({ ...thisRef.current[\"value\"] })\n break;\n default:\n break;\n }\n onChange && onChange()\n }\n return
\n {_.map(keyValues, (value: any, key: any) => {\n return \n })}\n
\n \n
\n})\n\nconst KeyValueInput = forwardRef((props: any, ref: any) => {\n const { data, onChange, className } = props\n const { key, value } = data || {}\n const [keyValues, setKeyValues] = useState({})\n\n function isCreate() {\n return !key && !value\n }\n\n function canSave() {\n if (!keyInputRef.current || !valueInputRef.current) {\n return false\n }\n return !keyInputRef.current.value && !valueInputRef.current.value\n }\n function handleAdd(e: any) {\n if (onChange) {\n onChange({ key: keyInputRef.current.value, value: valueInputRef.current.value }, \"create\")\n keyInputRef.current.value = \"\"\n valueInputRef.current.value = \"\"\n }\n }\n function handleDelete(e: any) {\n if (onChange) {\n onChange({ key: keyInputRef.current.value, value: valueInputRef.current.value }, \"delete\")\n }\n }\n const keyInputRef = useRef()\n const valueInputRef = useRef()\n return
\n
\n \n \n {\n isCreate()\n ? \n : \n }\n
\n\n
\n})\n\nexport const Input = forwardRef((props: any, ref: any) => {\n const { id, type, value, displayText, onChange, helpText, maxLength, options, placeholder, disabled } = props\n function handleOnChange(e: any) {\n if (onChange) {\n onChange(e)\n }\n }\n function handleSelectOnChange(options: any) {\n return function (e: any) {\n if (onChange) {\n onChange(e.target.selectedIndex)\n }\n }\n }\n\n function renderInput() {\n switch (type) {\n case \"select\":\n return \n break;\n case \"year_month\":\n return \n case \"textarea\":\n return \n case \"keyvalues\":\n return \n default:\n return \n }\n\n }\n return <>
\n {displayText}\n
\n
\n {renderInput()}\n\n \n {helpText}\n \n
\n})\n","/*\n * types/services/dr2am.locales.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport superagent from \"superagent\";\nimport querystring from \"querystring\";\n\n/**\n* @module ApiClient\n* @version version not set\n*/\n\n/**\n* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n* application to use this class directly - the *Api and model classes provide the public API for the service. The\n* contents of this file should be regarded as internal but are documented for completeness.\n* @alias module:ApiClient\n* @class\n*/\nexport class ApiClient {\n constructor() {\n /**\n * The base URL against which to resolve every API call's (relative) path.\n * @type {String}\n * @default https://localhost\n */\n this.basePath = 'https://localhost'.replace(/\\/+$/, '');\n\n /**\n * The authentication methods to be included for all API calls.\n * @type {Array.}\n */\n this.authentications = {\n }\n\n /**\n * The default HTTP headers to be included for all API calls.\n * @type {Array.}\n * @default {}\n */\n this.defaultHeaders = {};\n\n /**\n * The default HTTP timeout for all API calls.\n * @type {Number}\n * @default 60000\n */\n this.timeout = 60000;\n\n /**\n * If set to false an additional timestamp parameter is added to all API GET calls to\n * prevent browser caching\n * @type {Boolean}\n * @default true\n */\n this.cache = true;\n\n /**\n * If set to true, the client will save the cookies from each server\n * response, and return them in the next request.\n * @default false\n */\n this.enableCookies = false;\n\n /*\n * Used to save and return cookies in a node.js (non-browser) setting,\n * if this.enableCookies is set to true.\n */\n if (typeof window === 'undefined') {\n this.agent = new superagent.agent();\n }\n\n /*\n * Allow user to override superagent agent\n */\n this.requestAgent = null;\n\n }\n\n /**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of param.\n */\n paramToString(param) {\n if (param == undefined || param == null) {\n return '';\n }\n if (param instanceof Date) {\n return param.toJSON();\n }\n\n return param.toString();\n }\n\n /**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\n buildUrl(path, pathParams) {\n if (!path.match(/^\\//)) {\n path = '/' + path;\n }\n\n var url = this.basePath + path;\n url = url.replace(/\\{([\\w-]+)\\}/g, (fullMatch, key) => {\n var value;\n if (pathParams.hasOwnProperty(key)) {\n value = this.paramToString(pathParams[key]);\n } else {\n value = fullMatch;\n }\n\n return encodeURIComponent(value);\n });\n\n return url;\n }\n\n /**\n * Checks whether the given content type represents JSON.
\n * JSON content type examples:
\n *
    \n *
  • application/json
  • \n *
  • application/json; charset=UTF8
  • \n *
  • APPLICATION/JSON
  • \n *
\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} true if contentType represents JSON, otherwise false.\n */\n isJsonMime(contentType) {\n return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n }\n\n /**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\n jsonPreferredMime(contentTypes) {\n for (var i = 0; i < contentTypes.length; i++) {\n if (this.isJsonMime(contentTypes[i])) {\n return contentTypes[i];\n }\n }\n\n return contentTypes[0];\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} true if param represents a file.\n */\n isFileParam(param) {\n // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n if (typeof require === 'function') {\n let fs;\n try {\n fs = require('fs');\n } catch (err) {}\n if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n return true;\n }\n }\n\n // Buffer in Node.js\n if (typeof Buffer === 'function' && param instanceof Buffer) {\n return true;\n }\n\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Normalizes parameter values:\n *
    \n *
  • remove nils
  • \n *
  • keep files and arrays
  • \n *
  • format to string with `paramToString` for other cases
  • \n *
\n * @param {Object.} params The parameters as object properties.\n * @returns {Object.} normalized parameters.\n */\n normalizeParams(params) {\n var newParams = {};\n for (var key in params) {\n if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n var value = params[key];\n if (this.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = this.paramToString(value);\n }\n }\n }\n\n return newParams;\n }\n\n /**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\n static CollectionFormatEnum = {\n /**\n * Comma-separated values. Value: csv\n * @const\n */\n CSV: ',',\n\n /**\n * Space-separated values. Value: ssv\n * @const\n */\n SSV: ' ',\n\n /**\n * Tab-separated values. Value: tsv\n * @const\n */\n TSV: '\\t',\n\n /**\n * Pipe(|)-separated values. Value: pipes\n * @const\n */\n PIPES: '|',\n\n /**\n * Native array. Value: multi\n * @const\n */\n MULTI: 'multi'\n };\n\n /**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * param as is if collectionFormat is multi.\n */\n buildCollectionParam(param, collectionFormat) {\n if (param == null) {\n return null;\n }\n switch (collectionFormat) {\n case 'csv':\n return param.map(this.paramToString).join(',');\n case 'ssv':\n return param.map(this.paramToString).join(' ');\n case 'tsv':\n return param.map(this.paramToString).join('\\t');\n case 'pipes':\n return param.map(this.paramToString).join('|');\n case 'multi':\n //return the array directly as SuperAgent will handle it as expected\n return param.map(this.paramToString);\n default:\n throw new Error('Unknown collection format: ' + collectionFormat);\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param {Object} request The request object created by a superagent() call.\n * @param {Array.} authNames An array of authentication method names.\n */\n applyAuthToRequest(request, authNames) {\n authNames.forEach((authName) => {\n var auth = this.authentications[authName];\n switch (auth.type) {\n case 'basic':\n if (auth.username || auth.password) {\n request.auth(auth.username || '', auth.password || '');\n }\n\n break;\n case 'apiKey':\n if (auth.apiKey) {\n var data = {};\n if (auth.apiKeyPrefix) {\n data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;\n } else {\n data[auth.name] = auth.apiKey;\n }\n\n if (auth['in'] === 'header') {\n request.set(data);\n } else {\n request.query(data);\n }\n }\n\n break;\n case 'oauth2':\n if (auth.accessToken) {\n request.set({'Authorization': 'Bearer ' + auth.accessToken});\n }\n\n break;\n default:\n throw new Error('Unknown authentication type: ' + auth.type);\n }\n });\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns A value of the specified type.\n */\n deserialize(response, returnType) {\n if (response == null || returnType == null || response.status == 204) {\n return null;\n }\n\n // Rely on SuperAgent for parsing response body.\n // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n var data = response.body;\n if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n // SuperAgent does not always produce a body; use the unparsed response as a fallback\n data = response.text;\n }\n\n return ApiClient.convertToType(data, returnType);\n }\n\n \n\n /**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.} pathParams A map of path parameters and their values.\n * @param {Object.} queryParams A map of query parameters and their values.\n * @param {Object.} headerParams A map of header parameters and their values.\n * @param {Object.} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.} authNames An array of authentication type names.\n * @param {Array.} contentTypes An array of request MIME types.\n * @param {Array.} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\n callApi(path, httpMethod, pathParams,\n queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n returnType) {\n\n var url = this.buildUrl(path, pathParams);\n var request = superagent(httpMethod, url);\n\n // apply authentications\n this.applyAuthToRequest(request, authNames);\n\n // set query parameters\n if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n queryParams['_'] = new Date().getTime();\n }\n\n request.query(this.normalizeParams(queryParams));\n\n // set header parameters\n request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n // set requestAgent if it is set by user\n if (this.requestAgent) {\n request.agent(this.requestAgent);\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n var contentType = this.jsonPreferredMime(contentTypes);\n if (contentType) {\n // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n if(contentType != 'multipart/form-data') {\n request.type(contentType);\n }\n } else if (!request.header['Content-Type']) {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(querystring.stringify(this.normalizeParams(formParams)));\n } else if (contentType == 'multipart/form-data') {\n var _formParams = this.normalizeParams(formParams);\n for (var key in _formParams) {\n if (_formParams.hasOwnProperty(key)) {\n if (this.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]);\n } else {\n request.field(key, _formParams[key]);\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam);\n }\n\n var accept = this.jsonPreferredMime(accepts);\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n // Attach previously saved cookies, if enabled\n if (this.enableCookies){\n if (typeof window === 'undefined') {\n this.agent.attachCookies(request);\n }\n else {\n request.withCredentials();\n }\n }\n\n return new Promise((resolve, reject) => {\n request.end((error, response) => {\n if (error) {\n reject(error);\n } else {\n try {\n var data = this.deserialize(response, returnType);\n if (this.enableCookies && typeof window === 'undefined'){\n this.agent.saveCookies(response);\n }\n\n resolve({data, response});\n } catch (err) {\n reject(err);\n }\n }\n });\n });\n\n \n }\n\n /**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\n static parseDate(str) {\n return new Date(str);\n }\n\n /**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on data will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\n static convertToType(data, type) {\n if (data === null || data === undefined)\n return data\n\n switch (type) {\n case 'Boolean':\n return Boolean(data);\n case 'Integer':\n return parseInt(data, 10);\n case 'Number':\n return parseFloat(data);\n case 'String':\n return String(data);\n case 'Date':\n return ApiClient.parseDate(String(data));\n case 'Blob':\n return data;\n default:\n if (type === Object) {\n // generic object, return directly\n return data;\n } else if (typeof type === 'function') {\n // for model type like: User\n return type.constructFromObject(data);\n } else if (Array.isArray(type)) {\n // for array type like: ['String']\n var itemType = type[0];\n\n return data.map((item) => {\n return ApiClient.convertToType(item, itemType);\n });\n } else if (typeof type === 'object') {\n // for plain object type like: {'String': 'Integer'}\n var keyType, valueType;\n for (var k in type) {\n if (type.hasOwnProperty(k)) {\n keyType = k;\n valueType = type[k];\n break;\n }\n }\n\n var result = {};\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var key = ApiClient.convertToType(k, keyType);\n var value = ApiClient.convertToType(data[k], valueType);\n result[key] = value;\n }\n }\n\n return result;\n } else {\n // for unknown type, return the data directly\n return data;\n }\n }\n }\n\n /**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\n static constructFromObject(data, obj, itemType) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n if (data.hasOwnProperty(i))\n obj[i] = ApiClient.convertToType(data[i], itemType);\n }\n } else {\n for (var k in data) {\n if (data.hasOwnProperty(k))\n obj[k] = ApiClient.convertToType(data[k], itemType);\n }\n }\n };\n}\n\n/**\n* The default API client implementation.\n* @type {module:ApiClient}\n*/\nApiClient.instance = new ApiClient();\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The PbPaginate model module.\n * @module model/PbPaginate\n * @version version not set\n */\nexport class PbPaginate {\n /**\n * Constructs a new PbPaginate.\n * @alias module:model/PbPaginate\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbPaginate from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbPaginate} obj Optional instance to populate.\n * @return {module:model/PbPaginate} The populated PbPaginate instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbPaginate();\n if (data.hasOwnProperty('offset'))\n obj.offset = ApiClient.convertToType(data['offset'], 'Number');\n if (data.hasOwnProperty('limit'))\n obj.limit = ApiClient.convertToType(data['limit'], 'Number');\n if (data.hasOwnProperty('next_page_token'))\n obj.nextPageToken = ApiClient.convertToType(data['next_page_token'], 'String');\n }\n return obj;\n }\n}\n\n/**\n * @member {Number} offset\n */\nPbPaginate.prototype.offset = undefined;\n\n/**\n * @member {Number} limit\n */\nPbPaginate.prototype.limit = undefined;\n\n/**\n * @member {String} nextPageToken\n */\nPbPaginate.prototype.nextPageToken = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * Enum class ResponseStateState.\n * @enum {String}\n * @readonly\n */\nconst ResponseStateState = {\n /**\n * value: \"unknow\"\n * @const\n */\n unknow: \"unknow\",\n\n /**\n * value: \"success\"\n * @const\n */\n success: \"success\",\n\n /**\n * value: \"fail\"\n * @const\n */\n fail: \"fail\",\n\n /**\n * Returns a ResponseStateState enum value from a JavaScript object name.\n * @param {Object} data The plain JavaScript object containing the name of the enum value.\n * @return {module:model/ResponseStateState} The enum ResponseStateState value.\n */\n constructFromObject: function(object) {\n return object;\n }\n};\n\nexport {ResponseStateState};\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ResponseStateState} from './ResponseStateState';\n\n/**\n * The PbResponseState model module.\n * @module model/PbResponseState\n * @version version not set\n */\nexport class PbResponseState {\n /**\n * Constructs a new PbResponseState.\n * @alias module:model/PbResponseState\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbResponseState from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbResponseState} obj Optional instance to populate.\n * @return {module:model/PbResponseState} The populated PbResponseState instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbResponseState();\n if (data.hasOwnProperty('state'))\n obj.state = ResponseStateState.constructFromObject(data['state']);\n if (data.hasOwnProperty('msg'))\n obj.msg = ApiClient.convertToType(data['msg'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/ResponseStateState} state\n */\nPbResponseState.prototype.state = undefined;\n\n/**\n * @member {String} msg\n */\nPbResponseState.prototype.msg = undefined;\n\n/**\n * @member {Number} code\n */\nPbResponseState.prototype.code = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The PbRole model module.\n * @module model/PbRole\n * @version version not set\n */\nexport class PbRole {\n /**\n * Constructs a new PbRole.\n * @alias module:model/PbRole\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a PbRole from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/PbRole} obj Optional instance to populate.\n * @return {module:model/PbRole} The populated PbRole instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new PbRole();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('gid'))\n obj.gid = ApiClient.convertToType(data['gid'], 'String');\n if (data.hasOwnProperty('name'))\n obj.name = ApiClient.convertToType(data['name'], 'String');\n if (data.hasOwnProperty('display_name'))\n obj.displayName = ApiClient.convertToType(data['display_name'], 'String');\n if (data.hasOwnProperty('description'))\n obj.description = ApiClient.convertToType(data['description'], 'String');\n if (data.hasOwnProperty('permissions'))\n obj.permissions = ApiClient.convertToType(data['permissions'], ['String']);\n if (data.hasOwnProperty('scheme_managed'))\n obj.schemeManaged = ApiClient.convertToType(data['scheme_managed'], 'Boolean');\n if (data.hasOwnProperty('built_in'))\n obj.builtIn = ApiClient.convertToType(data['built_in'], 'Boolean');\n if (data.hasOwnProperty('create_at'))\n obj.createAt = ApiClient.convertToType(data['create_at'], 'Date');\n if (data.hasOwnProperty('update_at'))\n obj.updateAt = ApiClient.convertToType(data['update_at'], 'Date');\n if (data.hasOwnProperty('delete_at'))\n obj.deleteAt = ApiClient.convertToType(data['delete_at'], 'Date');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nPbRole.prototype.id = undefined;\n\n/**\n * @member {String} gid\n */\nPbRole.prototype.gid = undefined;\n\n/**\n * @member {String} name\n */\nPbRole.prototype.name = undefined;\n\n/**\n * @member {String} displayName\n */\nPbRole.prototype.displayName = undefined;\n\n/**\n * @member {String} description\n */\nPbRole.prototype.description = undefined;\n\n/**\n * @member {Array.} permissions\n */\nPbRole.prototype.permissions = undefined;\n\n/**\n * @member {Boolean} schemeManaged\n */\nPbRole.prototype.schemeManaged = undefined;\n\n/**\n * @member {Boolean} builtIn\n */\nPbRole.prototype.builtIn = undefined;\n\n/**\n * @member {Date} createAt\n */\nPbRole.prototype.createAt = undefined;\n\n/**\n * @member {Date} updateAt\n */\nPbRole.prototype.updateAt = undefined;\n\n/**\n * @member {Date} deleteAt\n */\nPbRole.prototype.deleteAt = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufAny model module.\n * @module model/ProtobufAny\n * @version version not set\n */\nexport class ProtobufAny {\n /**\n * Constructs a new ProtobufAny.\n * @alias module:model/ProtobufAny\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufAny from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufAny} obj Optional instance to populate.\n * @return {module:model/ProtobufAny} The populated ProtobufAny instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufAny();\n if (data.hasOwnProperty('type_url'))\n obj.typeUrl = ApiClient.convertToType(data['type_url'], 'String');\n if (data.hasOwnProperty('value'))\n obj.value = ApiClient.convertToType(data['value'], 'Blob');\n }\n return obj;\n }\n}\n\n/**\n * @member {String} typeUrl\n */\nProtobufAny.prototype.typeUrl = undefined;\n\n/**\n * @member {Blob} value\n */\nProtobufAny.prototype.value = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\n\n/**\n * The ProtobufFieldMask model module.\n * @module model/ProtobufFieldMask\n * @version version not set\n */\nexport class ProtobufFieldMask {\n /**\n * Constructs a new ProtobufFieldMask.\n * paths: \\\"f.a\\\" paths: \\\"f.b.d\\\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, the existing repeated values in the target resource will be overwritten by the new values. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then the existing sub-message in the target resource is overwritten. Given the target message: f { b { d : 1 x : 2 } c : 1 } And an update message: f { b { d : 10 } } then if the field mask is: paths: \\\"f.b\\\" then the result will be: f { b { d : 10 } c : 1 } However, if the update mask was: paths: \\\"f.b.d\\\" then the result would be: f { b { d : 10 x : 2 } c : 1 } In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \\\"user.display_name\\\" paths: \\\"photo\\\" } In JSON, the same mask is represented as below: { mask: \\\"user.displayName,photo\\\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \\\"name\\\" } Or: mask { paths: \\\"sub_message\\\" } Note that oneof type names (\\\"test_oneof\\\" in this case) cannot be used in paths.\n * @alias module:model/ProtobufFieldMask\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ProtobufFieldMask from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ProtobufFieldMask} obj Optional instance to populate.\n * @return {module:model/ProtobufFieldMask} The populated ProtobufFieldMask instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ProtobufFieldMask();\n if (data.hasOwnProperty('paths'))\n obj.paths = ApiClient.convertToType(data['paths'], ['String']);\n }\n return obj;\n }\n}\n\n/**\n * The set of field mask paths.\n * @member {Array.} paths\n */\nProtobufFieldMask.prototype.paths = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {ProtobufAny} from './ProtobufAny';\n\n/**\n * The RuntimeError model module.\n * @module model/RuntimeError\n * @version version not set\n */\nexport class RuntimeError {\n /**\n * Constructs a new RuntimeError.\n * @alias module:model/RuntimeError\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a RuntimeError from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/RuntimeError} obj Optional instance to populate.\n * @return {module:model/RuntimeError} The populated RuntimeError instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new RuntimeError();\n if (data.hasOwnProperty('error'))\n obj.error = ApiClient.convertToType(data['error'], 'String');\n if (data.hasOwnProperty('code'))\n obj.code = ApiClient.convertToType(data['code'], 'Number');\n if (data.hasOwnProperty('message'))\n obj.message = ApiClient.convertToType(data['message'], 'String');\n if (data.hasOwnProperty('details'))\n obj.details = ApiClient.convertToType(data['details'], [ProtobufAny]);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} error\n */\nRuntimeError.prototype.error = undefined;\n\n/**\n * @member {Number} code\n */\nRuntimeError.prototype.code = undefined;\n\n/**\n * @member {String} message\n */\nRuntimeError.prototype.message = undefined;\n\n/**\n * @member {Array.} details\n */\nRuntimeError.prototype.details = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbRole} from './PbRole';\n\n/**\n * The ServiceCreateRoleRequest model module.\n * @module model/ServiceCreateRoleRequest\n * @version version not set\n */\nexport class ServiceCreateRoleRequest {\n /**\n * Constructs a new ServiceCreateRoleRequest.\n * @alias module:model/ServiceCreateRoleRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceCreateRoleRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceCreateRoleRequest} obj Optional instance to populate.\n * @return {module:model/ServiceCreateRoleRequest} The populated ServiceCreateRoleRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceCreateRoleRequest();\n if (data.hasOwnProperty('role'))\n obj.role = PbRole.constructFromObject(data['role']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbRole} role\n */\nServiceCreateRoleRequest.prototype.role = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\nimport {PbRole} from './PbRole';\n\n/**\n * The ServiceCreateRoleResponse model module.\n * @module model/ServiceCreateRoleResponse\n * @version version not set\n */\nexport class ServiceCreateRoleResponse {\n /**\n * Constructs a new ServiceCreateRoleResponse.\n * @alias module:model/ServiceCreateRoleResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceCreateRoleResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceCreateRoleResponse} obj Optional instance to populate.\n * @return {module:model/ServiceCreateRoleResponse} The populated ServiceCreateRoleResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceCreateRoleResponse();\n if (data.hasOwnProperty('role'))\n obj.role = PbRole.constructFromObject(data['role']);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbRole} role\n */\nServiceCreateRoleResponse.prototype.role = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceCreateRoleResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\n\n/**\n * The ServiceDeleteRoleResponse model module.\n * @module model/ServiceDeleteRoleResponse\n * @version version not set\n */\nexport class ServiceDeleteRoleResponse {\n /**\n * Constructs a new ServiceDeleteRoleResponse.\n * @alias module:model/ServiceDeleteRoleResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceDeleteRoleResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceDeleteRoleResponse} obj Optional instance to populate.\n * @return {module:model/ServiceDeleteRoleResponse} The populated ServiceDeleteRoleResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceDeleteRoleResponse();\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceDeleteRoleResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\nimport {PbRole} from './PbRole';\n\n/**\n * The ServiceGetRolesWithUserResponse model module.\n * @module model/ServiceGetRolesWithUserResponse\n * @version version not set\n */\nexport class ServiceGetRolesWithUserResponse {\n /**\n * Constructs a new ServiceGetRolesWithUserResponse.\n * @alias module:model/ServiceGetRolesWithUserResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceGetRolesWithUserResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceGetRolesWithUserResponse} obj Optional instance to populate.\n * @return {module:model/ServiceGetRolesWithUserResponse} The populated ServiceGetRolesWithUserResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceGetRolesWithUserResponse();\n if (data.hasOwnProperty('roles'))\n obj.roles = ApiClient.convertToType(data['roles'], [PbRole]);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} roles\n */\nServiceGetRolesWithUserResponse.prototype.roles = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceGetRolesWithUserResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\nimport {PbRole} from './PbRole';\n\n/**\n * The ServiceListRolessResponse model module.\n * @module model/ServiceListRolessResponse\n * @version version not set\n */\nexport class ServiceListRolessResponse {\n /**\n * Constructs a new ServiceListRolessResponse.\n * @alias module:model/ServiceListRolessResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceListRolessResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceListRolessResponse} obj Optional instance to populate.\n * @return {module:model/ServiceListRolessResponse} The populated ServiceListRolessResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceListRolessResponse();\n if (data.hasOwnProperty('roles'))\n obj.roles = ApiClient.convertToType(data['roles'], [PbRole]);\n if (data.hasOwnProperty('next_page_token'))\n obj.nextPageToken = ApiClient.convertToType(data['next_page_token'], 'String');\n if (data.hasOwnProperty('total'))\n obj.total = ApiClient.convertToType(data['total'], 'String');\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {Array.} roles\n */\nServiceListRolessResponse.prototype.roles = undefined;\n\n/**\n * @member {String} nextPageToken\n */\nServiceListRolessResponse.prototype.nextPageToken = undefined;\n\n/**\n * @member {String} total\n */\nServiceListRolessResponse.prototype.total = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceListRolessResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbRole} from './PbRole';\nimport {ProtobufFieldMask} from './ProtobufFieldMask';\n\n/**\n * The ServiceUpdateRoleRequest model module.\n * @module model/ServiceUpdateRoleRequest\n * @version version not set\n */\nexport class ServiceUpdateRoleRequest {\n /**\n * Constructs a new ServiceUpdateRoleRequest.\n * @alias module:model/ServiceUpdateRoleRequest\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdateRoleRequest from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdateRoleRequest} obj Optional instance to populate.\n * @return {module:model/ServiceUpdateRoleRequest} The populated ServiceUpdateRoleRequest instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdateRoleRequest();\n if (data.hasOwnProperty('id'))\n obj.id = ApiClient.convertToType(data['id'], 'String');\n if (data.hasOwnProperty('role'))\n obj.role = PbRole.constructFromObject(data['role']);\n if (data.hasOwnProperty('update_mask'))\n obj.updateMask = ProtobufFieldMask.constructFromObject(data['update_mask']);\n }\n return obj;\n }\n}\n\n/**\n * @member {String} id\n */\nServiceUpdateRoleRequest.prototype.id = undefined;\n\n/**\n * @member {module:model/PbRole} role\n */\nServiceUpdateRoleRequest.prototype.role = undefined;\n\n/**\n * @member {module:model/ProtobufFieldMask} updateMask\n */\nServiceUpdateRoleRequest.prototype.updateMask = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from '../ApiClient';\nimport {PbResponseState} from './PbResponseState';\nimport {PbRole} from './PbRole';\n\n/**\n * The ServiceUpdateRoleResponse model module.\n * @module model/ServiceUpdateRoleResponse\n * @version version not set\n */\nexport class ServiceUpdateRoleResponse {\n /**\n * Constructs a new ServiceUpdateRoleResponse.\n * @alias module:model/ServiceUpdateRoleResponse\n * @class\n */\n constructor() {\n }\n\n /**\n * Constructs a ServiceUpdateRoleResponse from a plain JavaScript object, optionally creating a new instance.\n * Copies all relevant properties from data to obj if supplied or a new instance if not.\n * @param {Object} data The plain JavaScript object bearing properties of interest.\n * @param {module:model/ServiceUpdateRoleResponse} obj Optional instance to populate.\n * @return {module:model/ServiceUpdateRoleResponse} The populated ServiceUpdateRoleResponse instance.\n */\n static constructFromObject(data, obj) {\n if (data) {\n obj = obj || new ServiceUpdateRoleResponse();\n if (data.hasOwnProperty('role'))\n obj.role = PbRole.constructFromObject(data['role']);\n if (data.hasOwnProperty('state'))\n obj.state = PbResponseState.constructFromObject(data['state']);\n }\n return obj;\n }\n}\n\n/**\n * @member {module:model/PbRole} role\n */\nServiceUpdateRoleResponse.prototype.role = undefined;\n\n/**\n * @member {module:model/PbResponseState} state\n */\nServiceUpdateRoleResponse.prototype.state = undefined;\n\n\n","/*\n * types/services/dr2am.tasks.roles.proto\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: version not set\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.21\n *\n * Do not edit the class manually.\n *\n */\n\nimport {ApiClient} from \"../ApiClient\";\nimport {RuntimeError} from '../model/RuntimeError';\nimport {ServiceCreateRoleRequest} from '../model/ServiceCreateRoleRequest';\nimport {ServiceCreateRoleResponse} from '../model/ServiceCreateRoleResponse';\nimport {ServiceDeleteRoleResponse} from '../model/ServiceDeleteRoleResponse';\nimport {ServiceGetRolesWithUserResponse} from '../model/ServiceGetRolesWithUserResponse';\nimport {ServiceListRolessResponse} from '../model/ServiceListRolessResponse';\nimport {ServiceUpdateRoleRequest} from '../model/ServiceUpdateRoleRequest';\nimport {ServiceUpdateRoleResponse} from '../model/ServiceUpdateRoleResponse';\n\n/**\n* RolesService service.\n* @module api/RolesServiceApi\n* @version version not set\n*/\nexport class RolesServiceApi {\n\n /**\n * Constructs a new RolesServiceApi. \n * @alias module:api/RolesServiceApi\n * @class\n * @param {module:ApiClient} [apiClient] Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\n constructor(apiClient) {\n this.apiClient = apiClient || ApiClient.instance;\n }\n\n\n\n /**\n * Create Roles\n * @param {module:model/ServiceCreateRoleRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceCreateRoleResponse} and HTTP response\n */\n rolesServiceCreateWithHttpInfo(body) {\n let postBody = body;\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling rolesServiceCreate\");\n }\n\n\n let pathParams = {\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceCreateRoleResponse;\n\n return this.apiClient.callApi(\n '/v1/roles:create', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Create Roles\n * @param {module:model/ServiceCreateRoleRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceCreateRoleResponse}\n */\n rolesServiceCreate(body) {\n return this.rolesServiceCreateWithHttpInfo(body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * Delete Roles\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceDeleteRoleResponse} and HTTP response\n */\n rolesServiceDeleteWithHttpInfo(id) {\n let postBody = null;\n\n // verify the required parameter 'id' is set\n if (id === undefined || id === null) {\n throw new Error(\"Missing the required parameter 'id' when calling rolesServiceDelete\");\n }\n\n\n let pathParams = {\n 'id': id\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceDeleteRoleResponse;\n\n return this.apiClient.callApi(\n '/v1/roles/{id}:delete', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Delete Roles\n * @param {String} id \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceDeleteRoleResponse}\n */\n rolesServiceDelete(id) {\n return this.rolesServiceDeleteWithHttpInfo(id)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * GetWithUser Roles with UserId\n * @param {String} userId \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceGetRolesWithUserResponse} and HTTP response\n */\n rolesServiceGetWithUserWithHttpInfo(userId) {\n let postBody = null;\n\n // verify the required parameter 'userId' is set\n if (userId === undefined || userId === null) {\n throw new Error(\"Missing the required parameter 'userId' when calling rolesServiceGetWithUser\");\n }\n\n\n let pathParams = {\n 'user_id': userId\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceGetRolesWithUserResponse;\n\n return this.apiClient.callApi(\n '/v1/users/{user_id}/role', 'GET',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * GetWithUser Roles with UserId\n * @param {String} userId \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceGetRolesWithUserResponse}\n */\n rolesServiceGetWithUser(userId) {\n return this.rolesServiceGetWithUserWithHttpInfo(userId)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * List Roless\n * @param {Object} opts Optional parameters\n * @param {String} opts.action \n * @param {Number} opts.pageSize \n * @param {String} opts.pageToken \n * @param {String} opts.query \n * @param {String} opts.roleBy \n * @param {Number} opts.paginateOffset \n * @param {Number} opts.paginateLimit \n * @param {String} opts.paginateNextPageToken \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceListRolessResponse} and HTTP response\n */\n rolesServiceListWithHttpInfo(opts) {\n opts = opts || {};\n let postBody = null;\n\n\n let pathParams = {\n };\n let queryParams = {\n 'action': opts['action'],\n 'page_size': opts['pageSize'],\n 'page_token': opts['pageToken'],\n 'query': opts['query'],\n 'role_by': opts['roleBy'],\n 'paginate.offset': opts['paginateOffset'],\n 'paginate.limit': opts['paginateLimit'],\n 'paginate.next_page_token': opts['paginateNextPageToken']\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceListRolessResponse;\n\n return this.apiClient.callApi(\n '/v1/roles:list', 'GET',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * List Roless\n * @param {Object} opts Optional parameters\n * @param {String} opts.action \n * @param {Number} opts.pageSize \n * @param {String} opts.pageToken \n * @param {String} opts.query \n * @param {String} opts.roleBy \n * @param {Number} opts.paginateOffset \n * @param {Number} opts.paginateLimit \n * @param {String} opts.paginateNextPageToken \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceListRolessResponse}\n */\n rolesServiceList(opts) {\n return this.rolesServiceListWithHttpInfo(opts)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n /**\n * Update Roles\n * @param {String} id \n * @param {module:model/ServiceUpdateRoleRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ServiceUpdateRoleResponse} and HTTP response\n */\n rolesServiceUpdateWithHttpInfo(id, body) {\n let postBody = body;\n\n // verify the required parameter 'id' is set\n if (id === undefined || id === null) {\n throw new Error(\"Missing the required parameter 'id' when calling rolesServiceUpdate\");\n }\n\n // verify the required parameter 'body' is set\n if (body === undefined || body === null) {\n throw new Error(\"Missing the required parameter 'body' when calling rolesServiceUpdate\");\n }\n\n\n let pathParams = {\n 'id': id\n };\n let queryParams = {\n };\n let headerParams = {\n };\n let formParams = {\n };\n\n let authNames = [];\n let contentTypes = ['application/json'];\n let accepts = ['application/json'];\n let returnType = ServiceUpdateRoleResponse;\n\n return this.apiClient.callApi(\n '/v1/roles/{id}:update', 'POST',\n pathParams, queryParams, headerParams, formParams, postBody,\n authNames, contentTypes, accepts, returnType\n );\n }\n\n /**\n * Update Roles\n * @param {String} id \n * @param {module:model/ServiceUpdateRoleRequest} body \n * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ServiceUpdateRoleResponse}\n */\n rolesServiceUpdate(id, body) {\n return this.rolesServiceUpdateWithHttpInfo(id, body)\n .then(function(response_and_data) {\n return response_and_data.data;\n });\n }\n\n\n}\n","import _, { slice } from \"lodash\"\nimport { EventEmitter } from \"./event_emitter\"\nimport { generateId } from \"./utils\"\n\n\n\n\nexport class ConditionExpression extends EventEmitter {\n public accessType: string\n public id: string\n public expressions: any\n public expressionsStr: any\n private api: any\n constructor({ accessType, expressions, id }: any) {\n super()\n this.accessType = accessType\n this.id = id || generateId()\n if (expressions) {\n this.expressions = expressions\n }\n\n }\n\n static load(condition: any) {\n return new ConditionExpression(condition)\n }\n /**\n * init\n */\n public async init() {\n return this.check()\n }\n /**\n * setApi\napi:any */\n public setApi(api: any) {\n this.api = api\n }\n /**\n * check\n */\n public async check() {\n const { error, data } = await this.api.check(this.expressions)\n if (error) {\n throw error;\n }\n this.expressionsStr = data\n return data\n }\n /**\n * walk\n */\n public walk(fn: any, expression?: any) {\n if (!expression) {\n expression = this.expressions\n }\n // const out = []\n const typeOf = expression.typeof\n switch (typeOf) {\n case \"binary\":\n const isGroup = expression.parens\n const operator = expression.operatorStr\n switch (operator) {\n case \"OR\" || \"AND\":\n //walk left\n {\n if (expression.left) {\n const left: any = this.walk(fn, expression.left)\n }\n //walk right\n if (expression.right) {\n const right: any = this.walk(fn, expression.right)\n }\n }\n\n break;\n\n default:\n {\n const left: any = this.walk(fn, expression.left)\n //walk right\n const right: any = this.walk(fn, expression.right)\n fn(left, right, expression.operatorStr, expression.parens)\n return expression\n }\n break;\n }\n // console.log(operator);\n // console.log(isGroup);\n\n\n if (!isGroup) {\n // out.push(fn(left, right, expression.operatorStr, expression.parens))\n // fn(left, right, expression.operatorStr, expression.parens)\n }\n // fn(left, right, expression.operatorStr, expression.parens)\n\n break;\n case \"reference\":\n return expression.reference\n default:\n break;\n }\n // return out\n }\n /**\n * insert\n */\n public insert(path: any) {\n console.log(path, _.get(this.expressions, path));\n const node = _.get(this.expressions, path)\n\n if (node) {\n _.set(this.expressions, path, {\n left: node,\n operator: 17,\n operatorStr: \"AND\",\n parens: false,\n typeof: \"binary\",\n right:\n {\n \"left\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n }\n })\n }\n\n }\n /**\n * insert\n */\n public insertSub(path: any) {\n if (!path || !path.length) {\n return this.insertRoot(path)\n }\n console.log(path, _.get(this.expressions, path));\n const node = _.get(this.expressions, path)\n\n if (node) {\n _.set(this.expressions, path, {\n left: node,\n operator: 17,\n operatorStr: \"AND\",\n parens: true,\n typeof: \"binary\",\n right:\n {\n \"left\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n }\n })\n }\n\n }\n /**\n * remove\n */\n public remove(path: any) {\n debugger\n if (!path || !path.length) {\n this.expressions = undefined\n return\n }\n const lastPath = _.last(path)\n const expr = _.get(this.expressions, path)\n const exprParent = _.get(this.expressions, path.slice(0, path.length - 1)) || this.expressions\n const parenPath = path.slice(0, path.length - 1)\n function set(expressions: any, parenPath: any, node: any) {\n if (parenPath && parenPath.length) {\n _.set(expressions, parenPath, node)\n } else {\n expressions = node\n }\n return expressions\n }\n switch (lastPath) {\n case \"left\":\n this.expressions = set(this.expressions, parenPath, exprParent.right)\n break;\n case \"right\":\n this.expressions = set(this.expressions, parenPath, exprParent.left)\n break;\n default:\n break;\n }\n\n return false\n\n\n }\n private emptyExpressionNode() {\n return {\n \"left\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n }\n }\n public insertRoot(path: any) {\n if (!this.expressions) {\n this.expressions = this.emptyExpressionNode()\n return\n }\n const { left, right, operatorStr } = this.expressions\n switch (operatorStr) {\n case \"AND\" || \"OR\" || \"NOT\":\n if (right) {\n this.expressions.right = {\n left: right,\n operator: 17,\n operatorStr: \"AND\",\n parens: false,\n typeof: \"binary\",\n right:\n {\n \"left\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n }\n }\n }\n break;\n\n default:\n this.expressions = {\n left: this.expressions,\n operatorStr: \"AND\",\n parens: false,\n typeof: \"binary\",\n right: {\n \"left\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"new insert\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n }\n }\n break;\n }\n\n\n }\n static typeOfKey: any = {\n \"string\": \"literal\",\n \"bool\": \"bool\",\n \"identifier\": \"ident\",\n \"reference\": \"reference\",\n \"number\": \"number\"\n }\n /**\n * update\n */\n public update(path: any, expr: any) {\n const oExpr = _.get(this.expressions, path) || this.expressions\n if (!oExpr) {\n return\n }\n if (expr.left) {\n oExpr.left[oExpr.left.typeof] = expr.left\n }\n if (expr.right) {\n let typeOf = \"\"\n switch (getType(expr.right) as string) {\n // case \"isNumber\":\n // break;\n case \"isString\":\n typeOf = \"string\"\n break;\n case \"isBoolean\":\n typeOf = \"bool\"\n break;\n case \"isIdentifier\":\n typeOf = \"identifier\"\n\n break;\n case \"isReference\":\n typeOf = \"reference\"\n break;\n case \"isNumber\":\n typeOf = \"number\"\n break;\n case \"isNull\":\n typeOf = \"null\"\n break;\n default:\n break;\n }\n const typeOfKey = ConditionExpression.typeOfKey[typeOf]\n const lastTypeOfKey = ConditionExpression.typeOfKey[oExpr.right[\"typeof\"]]\n\n // oExpr.right[lastTypeOfKey] = undefined\n // delete oExpr.right[lastTypeOfKey]\n\n // oExpr.right[\"typeof\"] = typeOf\n // if (typeOf == \"string\") {\n // expr.right = _.trim(expr.right)\n // expr.right = expr.right.slice(1)\n // expr.right = expr.right.slice(0, expr.right.length - 1)\n // }\n // if (typeOf == \"number\") {\n // expr.right = +expr.right\n // if (_.isInteger(expr.right)) {\n // oExpr.right = {\n // \"base\": 10,\n // \"typeof\": \"number\",\n // \"isint\": true,\n // \"isfloat\": false,\n // \"int64\": expr.right\n // }\n // } else {\n // oExpr.right = {\n // \"base\": 10,\n // \"typeof\": \"number\",\n // \"isfloat\": true,\n // \"isint\": false,\n // \"float64\": expr.right\n // }\n // }\n // return\n // }\n oExpr.right = formatValue(typeOf, expr.right)\n // oExpr.right[typeOfKey] = expr.right\n }\n if (expr.operatorStr) {\n oExpr.operatorStr = expr.operatorStr\n }\n _.set(this.expressions, path, { ...oExpr })\n }\n public updateValue(path: any, value: any) {\n _.set(this.expressions, path, value)\n }\n private current: any\n static traversal(expression: any, list: any, path?: any) {\n if (expression) {\n path = path || []\n switch (expression.operatorStr) {\n case \"==\":\n case \":\":\n case \"!=\":\n case \"!:\":\n list.push({ ...expression, path })\n break;\n\n default:\n if (expression.parens) {\n const groups: any = []\n this.traversal(expression.left, groups, [...path, \"left\"])\n if (expression.right) {\n groups.push({ operatorStr: expression.operatorStr, path: [...path, \"operatorStr\"] })\n this.traversal(expression.right, groups, [...path, \"right\"])\n }\n list.push(groups)\n } else {\n this.traversal(expression.left, list, [...path, \"left\"])\n if (expression.right) {\n list.push({ operatorStr: expression.operatorStr, path: [...path, \"operatorStr\"] })\n this.traversal(expression.right, list, [...path, \"right\"])\n }\n }\n\n break;\n }\n\n }\n }\n static clone(condition: any) {\n return new ConditionExpression(condition)\n }\n public parser() {\n if (!this.expressions) {\n return undefined\n }\n const list: any = []\n ConditionExpression.traversal(this.expressions, list)\n return list\n // if (!this.current) {\n // this.current = [\"left\"]\n // return _.get(this.expressions, this.current)\n // }\n // if (_.last(this.current) == \"left\") {\n // this.current.push(\"right\")\n // return _.get(this.expressions, this.current)\n // }\n }\n static demo() {\n return new ConditionExpression({\n accessType: \"\", expression: {\n \"left\": {\n \"left\": {\n \"reference\": \"IsOA\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"true\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n },\n \"operator\": 17,\n \"operatorStr\": \"AND\",\n \"parens\": false,\n \"right\": {\n \"left\": {\n \"left\": {\n \"reference\": \"PeriodicalClassCode\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"B\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n },\n \"operator\": 18,\n \"operatorStr\": \"OR\",\n \"parens\": true,\n \"right\": {\n \"left\": {\n \"left\": {\n \"reference\": \"PeriodicalClassCode\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"C\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n },\n \"operator\": 18,\n \"operatorStr\": \"OR\",\n \"parens\": false,\n \"right\": {\n \"left\": {\n \"reference\": \"PeriodicalClassCode\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"D\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n },\n \"typeof\": \"binary\"\n },\n \"typeof\": \"binary\"\n },\n \"typeof\": \"binary\"\n }\n })\n }\n}\n\nfunction formatValue(typeOf: string, val: any) {\n switch (typeOf) {\n case \"number\":\n if (_.isInteger(+val)) {\n return {\n \"base\": 10,\n \"typeof\": ConditionExpression.typeOfKey[typeOf],\n \"isint\": true,\n \"isfloat\": false,\n \"int64\": +val\n }\n } else {\n return {\n \"base\": 10,\n \"typeof\": ConditionExpression.typeOfKey[typeOf],\n \"isfloat\": true,\n \"isint\": false,\n \"float64\": +val\n }\n }\n case \"string\":\n val = _.trim(val)\n val = val.slice(1)\n val = val.slice(0, val.length - 1)\n return {\n \"typeof\": typeOf,\n [ConditionExpression.typeOfKey[typeOf]]: val\n }\n case \"bool\":\n return {\n \"typeof\": typeOf,\n [ConditionExpression.typeOfKey[typeOf]]: val == \"true\" ? true : false,\n }\n\n default:\n break;\n }\n return {\n \"typeof\": typeOf,\n [ConditionExpression.typeOfKey[typeOf]]: val\n }\n}\nfunction getType(str: any) {\n\n if (isString(str)) {\n return \"isString\"\n }\n\n if (isBoolean(str)) {\n return \"isBoolean\"\n }\n if (isNumber(str)) {\n return \"isNumber\"\n }\n if (isReference(str)) {\n return \"isReference\"\n }\n if (isNull(str)) {\n return \"isNull\"\n }\n return \"isIdentifier\"\n}\n\n\nfunction isString(str: any) {\n if (!_.isString(str)) {\n return false\n }\n str = _.trim(str)\n const start = _.first(str)\n const end = _.last(str)\n return start == end && (start == \"'\" || start == \"\\\"\")\n}\n\nfunction isReference(str: any) {\n if (!_.isString(str)) {\n return false\n }\n if (/[a-zA-Z]+(\\.[a-zA-Z]+)+/.test(str)) {\n return true\n }\n return false\n}\nfunction isBoolean(str: any) {\n str = _.trim(str)\n return str == \"true\" || str == \"false\"\n}\nfunction isNull(str: any) {\n str = _.trim(str)\n return str == \"null\"\n}\nfunction isNumber(str: any) {\n if (typeof str != \"string\") return false // we only process strings! \n return !isNaN(str as any) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...\n !isNaN(parseFloat(str)) // ...and ensure strings of whitespace fail\n}\nvar j = {\n \"left\": {\n \"left\": {\n \"reference\": \"IsOAaa\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"true\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n },\n \"operator\": 17,\n \"operatorStr\": \"AND\",\n \"parens\": false,\n \"right\": {\n \"left\": {\n \"left\": {\n \"reference\": \"PeriodicalClassCode\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"B\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n },\n \"operator\": 18,\n \"operatorStr\": \"OR\",\n \"parens\": true,\n \"right\": {\n \"left\": {\n \"reference\": \"PeriodicalClassCode\",\n \"typeof\": \"reference\"\n },\n \"operator\": 7,\n \"operatorStr\": \"==\",\n \"parens\": false,\n \"right\": {\n \"reference\": \"D\",\n \"typeof\": \"reference\"\n },\n \"typeof\": \"binary\"\n },\n \"typeof\": \"binary\"\n },\n \"typeof\": \"binary\"\n}\n// [{\"scope\":\"港澳台数据集\",\"database\":\"thesis\",\"roles\":[\"own_role\"],\"conditions\":{\"accessType\":\"\",\"id\":\"e5819936-bba2-4140-aa12-e3b0bc17208b\",\"expressions\":{\"left\":{\"left\":{\"reference\":\"IsOAaa\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"true\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"operator\":17,\"operatorStr\":\"AND\",\"parens\":false,\"right\":{\"left\":{\"left\":{\"left\":{\"reference\":\"PeriodicalClassCode\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"B\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"operator\":18,\"operatorStr\":\"OR\",\"parens\":true,\"right\":{\"left\":{\"left\":{\"reference\":\"PeriodicalClassCode\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"C\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"operator\":18,\"operatorStr\":\"OR\",\"parens\":false,\"right\":{\"left\":{\"left\":{\"reference\":\"PeriodicalClassCode\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"D\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"operator\":17,\"operatorStr\":\"AND\",\"parens\":false,\"typeof\":\"binary\",\"right\":{\"left\":{\"left\":{\"reference\":\"new insert\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"new insert\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"operator\":17,\"operatorStr\":\"OR\",\"parens\":false,\"typeof\":\"binary\",\"right\":{\"left\":{\"reference\":\"new inserta\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"new insert\",\"typeof\":\"reference\"},\"typeof\":\"binary\"}}},\"typeof\":\"binary\"},\"typeof\":\"binary\"},\"operator\":18,\"operatorStr\":\"AND\",\"parens\":false,\"right\":{\"left\":{\"reference\":\"IsOAa\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"true\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"typeof\":\"binary\"},\"typeof\":\"binary\"}},\"id\":\"37fb7089-5948-42dd-ab3d-caab624666c7\",\"createAt\":\"2022-08-02T07:33:38.654Z\",\"modifyAt\":\"2022-08-06T02:39:40.794Z\",\"accessType\":\"SELECT\"},{\"scope\":\"港澳台数据集\",\"database\":\"peridocal\",\"roles\":[\"own_role\"],\"conditions\":{\"accessType\":\"\",\"id\":\"5eaaff42-3154-4db0-8596-79443746f658\",\"expressions\":{\"left\":{\"left\":{\"reference\":\"IsOA\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"true\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"operator\":17,\"operatorStr\":\"AND\",\"parens\":false,\"right\":{\"left\":{\"left\":{\"reference\":\"PeriodicalClassCode\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"B\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"operator\":18,\"operatorStr\":\"OR\",\"parens\":true,\"right\":{\"left\":{\"left\":{\"reference\":\"PeriodicalClassCode\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"C\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"operator\":18,\"operatorStr\":\"OR\",\"parens\":false,\"right\":{\"left\":{\"reference\":\"PeriodicalClassCode\",\"typeof\":\"reference\"},\"operator\":7,\"operatorStr\":\"==\",\"parens\":false,\"right\":{\"reference\":\"D\",\"typeof\":\"reference\"},\"typeof\":\"binary\"},\"typeof\":\"binary\"},\"typeof\":\"binary\"},\"typeof\":\"binary\"}},\"id\":\"ad624d91-5bab-4d2d-bd3c-55553c52641c\",\"createAt\":\"2022-08-02T07:39:30.312Z\",\"modifyAt\":\"2022-08-03T02:15:52.795Z\",\"accessType\":\"SELECT\"}]\n\n","import React from \"react\";\nimport { useState } from \"react\";\nimport { Details } from \"../components/details\";\n\nexport default function ImportPermissionsForm({ open, trigger, onChange, permissionsStore, ...props }: any) {\n const [openModal, setOpenModal] = useState(open)\n\n const nTrigger = React.cloneElement(trigger, {\n onClick: function (e) {\n setOpenModal(true)\n if (trigger.onClick) {\n trigger.onClick(e)\n }\n }\n })\n\n function handleDragOver(evt: any) {\n evt.preventDefault()\n\n }\n function handleDropFile(evt: any) {\n console.log(evt.dataTransfer.files);\n evt.preventDefault()\n if (!evt.dataTransfer.files) {\n return\n }\n const file = evt.dataTransfer.files\n if (file.length) {\n onChange && onChange(file[0])\n }\n }\n\n const upload = async (evt: any) => {\n\n if (!evt.target.files) {\n return\n }\n const file = evt.target.files\n if (file.length) {\n const { error } = await permissionsStore.importPermissions(file[0])\n if (error) {\n alert(JSON.stringify(error))\n }\n onChange && onChange(file[0])\n window.location.reload()\n }\n }\n return <>{nTrigger}\n {openModal &&
\n {() => {\n return
\n 拖动文件到这里或者\n
\n \n \n }}\n\n
\n }\n \n}","import _, { cond } from \"lodash\";\nimport moment from \"moment\";\nimport React, { useRef } from \"react\";\nimport { useEffect, useState } from \"react\";\nimport { Route } from \"react-router\";\nimport styled from \"styled-components\";\nimport { handlePbError, useConditionExpression, wfConfig } from \"./api\";\nimport { ApiClient } from \"./client/ApiClient\";\nimport { RolesServiceApi } from \"./client/dr2am.tasks.roles-js/src\";\nimport { Details } from \"./components/details\";\nimport { Form } from \"./components/form\";\nimport { DataTable, TableBody, TableColumn, TableHeader, TableHeaderColumn, TableRow } from \"./components/table\";\nimport { ConditionExpression } from \"./condition_expr\";\nimport { EventEmitter } from \"./event_emitter\";\nimport ImportPermissionsForm from \"./permissions/import\";\nimport { generateId } from \"./utils\";\n\nclass rolesStore extends EventEmitter {\n prex = \"wfhk-roles\"\n storage = window.localStorage\n roles: any = []\n api: RolesServiceApi\n\n constructor(authc: any, apiURL: any) {\n super();\n const client = new ApiClient();\n client.basePath = apiURL || `${wfConfig.apiURL.protocol}//${wfConfig.apiURL.host}/api`;\n // client.basePath = \"https://globe.wanfangdata.com.cn/api\";\n client.authc = authc;\n this.api = new RolesServiceApi(client);\n // const policiesStr: any = this.storage.getItem(this.prex)\n // try {\n // this.roles = JSON.parse(policiesStr) || []\n // } catch (error) { }\n this.getAll()\n }\n async getAll() {\n try {\n // new LocalesApi(client);\n const res = await this.api.rolesServiceList({} as any)\n const playload = handlePbError(res)\n this.roles = playload.roles || []\n return playload\n } catch (error) {\n return { error }\n }\n\n }\n async create(role: any) {\n\n try {\n const res = await this.api.rolesServiceCreate({ role })\n const playload = handlePbError(res)\n console.log(playload);\n if (playload.role) {\n this.roles.push(playload.role)\n this.storage.setItem(this.prex, JSON.stringify(this.roles))\n this.dispatch(\"change\", role);\n this.dispatch(role.id, role);\n }\n return playload\n } catch (error) {\n return { error }\n }\n\n\n // const role: any = {\n // \"name\": `${name}`,\n // \"namespace\": namespace,\n // }\n role.id = generateId()\n role.createAt = new Date()\n role.modifyAt = role.createAt\n // _.set(this.roles, role.path, role)\n this.roles.push(role)\n this.storage.setItem(this.prex, JSON.stringify(this.roles))\n this.dispatch(\"change\", role);\n this.dispatch(role.id, role);\n return role\n }\n async update(id: string, data: any, paths?: any) {\n const idx = _.findIndex(this.roles, function (policy: any) {\n return policy.id == id\n })\n if (idx < 0) {\n return\n }\n for (let i = 0; i < paths.length; i++) {\n const path = paths[i];\n _.set(this.roles[idx], path, _.get(data, path))\n }\n this.roles[idx].modifyAt = new Date()\n if (!this.roles[idx].createAt) {\n this.roles[idx].createAt = this.roles[idx].modifyAt\n }\n this.storage.setItem(this.prex, JSON.stringify(this.roles))\n this.dispatch(\"change\", this.roles[idx]);\n this.dispatch(id, this.roles[idx]);\n return this.roles[idx]\n }\n async remove(path: string) {\n\n try {\n const role = await this.get(path)\n if (!role) {\n return\n }\n const res = await this.api.rolesServiceDelete(role.id)\n const playload = handlePbError(res)\n console.log(playload);\n if (!playload.error) {\n _.remove(this.roles, function ({ name }: any) { return name == path })\n this.storage.setItem(this.prex, JSON.stringify(this.roles))\n this.dispatch(\"change\", null);\n this.dispatch(path, null);\n }\n return playload\n } catch (error) {\n return { error }\n }\n\n _.remove(this.roles, function ({ name }: any) { return name == path })\n this.storage.setItem(this.prex, JSON.stringify(this.roles))\n this.dispatch(\"change\", null);\n this.dispatch(path, null);\n return false\n }\n\n async get(nameOrId: string) {\n return _.find(this.roles, function (role) {\n return role.id == nameOrId || role.name == nameOrId\n })\n }\n\n async addPermissions(id: string, permissions: any[]) {\n const policy: any = await this.get(id)\n if (!policy) {\n return\n }\n const policyPermissions = policy.permissions || []\n for (let i = 0; i < permissions.length; i++) {\n const permission = permissions[i];\n if (_.includes(policyPermissions, permission)) {\n continue\n }\n policyPermissions.push(permission)\n }\n\n return this.update(id, { permissions: policyPermissions }, [\"permissions\"])\n }\n async removePermissions(id: string, permissions: any[]) {\n const policy: any = await this.get(id)\n if (!policy) {\n return\n }\n const policyPermissions = policy.permissions\n const nPermissions = []\n for (let i = 0; i < policyPermissions.length; i++) {\n const permission = policyPermissions[i];\n if (_.includes(permissions, permission)) {\n continue\n }\n nPermissions.push(permission)\n }\n\n return this.update(id, { permissions: nPermissions }, [\"permissions\"])\n }\n\n}\nvar _roleStore: rolesStore\nexport const RolesStore = function (authc: any, apiURL: any) {\n if (_roleStore) {\n return _roleStore\n }\n if (authc) {\n _roleStore = new rolesStore(authc, apiURL)\n }\n\n return _roleStore\n}\n\n\nfunction CreateRoleForm({ open, trigger, onChange, data, ...props }: any) {\n const [openModal, setOpenModal] = useState(open)\n const [policies, setPolicies] = useState([])\n const store = props.rolesStore\n const nTrigger = React.cloneElement(trigger, {\n onClick: function (e) {\n setOpenModal(!!!openModal)\n if (trigger.onClick) {\n trigger.onClick(e)\n }\n }\n })\n\n async function handlerPolicySubmit(nData: any, paths: any) {\n if (data) {\n nData.id = data.id\n await store.update(data.id, nData, paths)\n } else {\n await store.create(nData)\n }\n if (onChange) {\n onChange()\n }\n setOpenModal(false)\n }\n return <> {nTrigger}{openModal &&
\n {() => {\n\n const schemas: any = [\n { \"key\": \"name\", \"label\": \"Role name\", \"type\": \"text\" },\n { \"key\": \"groups\", \"label\": \"Assigned groups(可选)\", \"type\": \"text\" },\n ];\n if (data) {\n _.each(schemas, (schema, i) => {\n const value = data[schema.key]\n if (value) {\n schemas[i].value = value\n }\n })\n }\n\n return
\n
\n

Create New Role

\n setOpenModal(false)}>关闭\n
\n
{\n setOpenModal(false)\n }}\n schemas={schemas}\n >
\n
\n }}\n
}\n \n}\n\nconst Expr = styled.div`\n:hover {\n background: #9d9d9d;\n}\n`\nconst Tree = styled.div`\n--ActionList-tree-depth: ${({ level }) => (level ? level : 1)};\nposition: relative;\npadding-left: calc(16px * (var(--ActionList-tree-depth)) + 7px);\n::before {\n position: absolute;\n left: 0;\n width: 1px;\n height: 100%;\n content: \"\";\n background: #9e9e9e;\n}\n`\nfunction formatValue(node: any) {\n let nodeTypeOf = node.typeof;\n\n let nodeTypeOfKey = ConditionExpression.typeOfKey[nodeTypeOf];\n\n if (nodeTypeOf == \"number\") {\n if (node.isint) {\n nodeTypeOfKey = \"int64\"\n } else if (node.isfloat) {\n nodeTypeOfKey = \"float64\"\n }\n }\n\n let nodeValue = node[nodeTypeOfKey];\n if (nodeTypeOf == \"string\") {\n nodeValue = \"\\\"\" + nodeValue + \"\\\"\";\n }\n if (nodeTypeOf == \"bool\") {\n nodeValue = nodeValue || false\n }\n return nodeValue;\n}\nfunction RowLevelSecurity({ expression, expression1, onChange, ...props }: any) {\n // let { left, right, operator, typeOf } = expression\n let { left, right, operatorStr } = expression1\n let operator = operatorStr\n let typeOf = expression1.typeof\n\n\n let leftValue = formatValue(left)\n let rightValue = formatValue(right)\n function isUserAttribute() {\n return rightValue && _.isString(rightValue) && rightValue.startsWith(\"user_attribute(\")\n }\n function isColumn() {\n return _.isString(leftValue) && (leftValue.startsWith(\"column(\") || leftValue.startsWith(\"column[\") || leftValue.startsWith(\"column.\"))\n }\n function isTags() {\n return _.isString(leftValue) && (leftValue.startsWith(\"tags[\") || leftValue.startsWith(\"tags.\"))\n }\n\n const [isColumnMode, setColumnMode] = useState(isColumn())\n const IsColmun = isColumnMode\n\n const IsUserAttribute = isUserAttribute()\n\n if (IsColmun) {\n leftValue = leftValue.slice(7, leftValue.length - 1)\n }\n const $expression = useRef({\n left: leftValue,\n leftMode: IsColmun,\n right: rightValue,\n rightMode: IsUserAttribute,\n operator: operator\n }).current\n\n\n\n function renderOperator() {\n\n const options = [\n\n // { value: \"==\", label: \"does not match user attribute\" },\n // { value: \"==\", label: \"is equal to user attribute\" },\n // { value: \"==\", label: \"is not equal to user attribute\" },\n // { value: \":\", label: \"\" }\n { value: \"==\", label: \"is equal to\" },\n { value: \"!=\", label: \"is not equal to\" },\n { value: \":\", label: \"contains\" },\n { value: \"!:\", label: \"does not contain\" },\n {\n value: \":\", label: \"matches user attribute\", selected: function (option: any) {\n const { value, label } = option\n return IsUserAttribute && value == operator\n }\n },\n ]\n return _.map(options, ({ value, label, selected }: any) => {\n if (!selected) {\n selected = function ({ value, label }: any) {\n return !IsUserAttribute && value == operator\n }\n }\n return \n })\n }\n\n\n const debounceonChange = _.debounce(onChange, 300)\n function handlerSelectChange(key: string) {\n return function (e: any) {\n\n let value = e.target.value;\n if ($expression.leftMode && key == \"left\") {\n value = `column(${value})`\n }\n $expression[key] = value\n if (onChange) {\n debounceonChange($expression, key)\n }\n }\n }\n function handleModeChange(e: any) {\n if (e.target.value == \"Column\") {\n $expression.leftMode = true\n setColumnMode(true)\n handlerSelectChange(\"left\")({ target: { value: $expression[\"left\"] } })\n } else {\n $expression.leftMode = false\n setColumnMode(false)\n handlerSelectChange(\"left\")({ target: { value: $expression[\"left\"] } })\n\n }\n }\n function unit() {\n return < >\n
\n Only grant access to data WHERE...\n \n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n {/* */}\n
\n
\n
\n \n }\n return
\n {unit()}\n
\n}\nfunction ExpressionStr({ expression, ...props }: any) {\n const conditionExpressionApi = props.useConditionExpression();\n const [str, setStr] = useState(\"\")\n useEffect(() => {\n if (expression) {\n JSON.stringify(expression)\n conditionExpressionApi.check(expression).then(({ data, error }: any): any => {\n if (error) {\n setStr(JSON.stringify(error))\n return\n }\n setStr(data.data)\n return\n })\n }\n }, [JSON.stringify(expression)])\n return {str}\n}\nfunction RolePermissionForm({ permission, role, open, trigger, onChange, data, ...props }: any) {\n // const conditionExpressionApi = props.useConditionExpression;\n const [openModal, setOpenModal] = useState(open)\n const currentPermissionRef = useRef(_.cloneDeep(permission))\n const isNew = !!!permission\n\n\n const [$permission, setPermission] = useState()\n\n\n const store = props.permissionsStore\n useEffect(() => {\n let nCurrentPermission = _.cloneDeep(permission)// { ...permission }\n const isNew = !!!permission\n\n if (isNew) {\n nCurrentPermission = {}\n nCurrentPermission[\"roles\"] = [role]\n\n } else {\n if (nCurrentPermission.conditions) {\n const conditions: any = []\n _.each(nCurrentPermission.conditions, (condition) => {\n const nCondition = new ConditionExpression(condition)\n conditions.push(nCondition)\n })\n nCurrentPermission.conditions = conditions\n }\n }\n currentPermissionRef.current = nCurrentPermission\n setPermission({\n ..._.cloneDeep(nCurrentPermission)\n })\n return function () {\n\n }\n }, [permission])\n\n function close() {\n const currentPermission = currentPermissionRef.current\n // $permission\n if (JSON.stringify($permission) != JSON.stringify(currentPermission)) {\n\n if (window.confirm(\"你有修改未保存,是否保存?\")) {\n updatePermissionToRole()\n } else {\n debugger\n console.log({ ..._.cloneDeep(currentPermission) });\n\n setPermission({ ..._.cloneDeep(currentPermission) })\n }\n }\n setOpenModal(!!!openModal)\n }\n\n const nTrigger = React.cloneElement(trigger, {\n onClick: function (e) {\n setOpenModal(true)\n if (trigger.onClick) {\n trigger.onClick(e)\n }\n }\n })\n\n function handerPermissionChange(key: string) {\n return function (e: any) {\n let value = e.target.value\n\n switch (key) {\n case \"roles\":\n if (!_.isArray(value)) {\n value = [value]\n }\n\n }\n setPermission({ ...$permission, [key]: value })\n\n }\n }\n\n async function addPermissionToRole() {\n await store.create({\n ...$permission,\n // conditions\n })\n setOpenModal(!!!openModal)\n }\n\n async function deletePermissionToRole() {\n const currentPermission = currentPermissionRef.current\n if (window.confirm(\"删除后不可恢复,确定要删除吗?\")) {\n await store.remove(currentPermission.id)\n setOpenModal(!!!openModal)\n }\n\n }\n async function updatePermissionToRole() {\n const currentPermission = currentPermissionRef.current\n const keys = _.keys($permission)\n const updatePaths = []\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n\n if (!_.isEqual($permission[key], currentPermission[key])) {\n updatePaths.push(key)\n }\n }\n\n await store.update(currentPermission.id, $permission, updatePaths)\n currentPermissionRef.current = _.cloneDeep($permission)\n setPermission({ ..._.cloneDeep($permission) })\n setOpenModal(!!!openModal)\n\n }\n async function addAccessConditions() {\n const nCondition = new ConditionExpression({})\n $permission.conditions = $permission.conditions || []\n const nConditions = [...$permission.conditions, nCondition]\n setPermission({ ...$permission, \"conditions\": nConditions })\n }\n async function updateAccessConditions(id: string, field: string, value: any) {\n return function () {\n }\n }\n function handleConditionAccessTypeChange(id: string) {\n return function (e: any) {\n const condition = updateCondition(id, \"accessType\", e.target.value)\n if (condition && !condition.expressions) {\n }\n\n }\n }\n function handleRemoveCondition(id: string) {\n return function (e: any) {\n removeCondition(id)\n }\n }\n function removeCondition(id: string) {\n const conditions: any = $permission.conditions;\n _.remove(conditions, (condition: any) => {\n return condition.id == id\n })\n setPermission({ ...$permission, \"conditions\": conditions })\n }\n function updateCondition(id: string, field: string, value: any) {\n const conditions: any = $permission.conditions;\n for (let i = 0; i < conditions.length; i++) {\n const condition = conditions[i];\n if (condition.id == id) {\n conditions[i][field] = value\n setPermission({ ...$permission, \"conditions\": conditions })\n return conditions[i]\n }\n }\n return\n\n }\n function handlerExpressionChange(condition: any, path: any, oExpr?: any) {\n return async function (expr: any, key: string) {\n const { left, right, operator } = expr\n if (key != \"right\") {\n\n }\n condition.update(path, { left, right, operatorStr: operator })\n setPermission({ ...$permission })\n }\n }\n function handlerExpressionOperator(condition: any, path: any, operator?: any) {\n return async function (e: any) {\n condition.updateValue(path, e.target.value)\n setPermission({ ...$permission })\n }\n }\n function insertExpression(condition: any, path: any) {\n return function () {\n\n if (!path) {\n condition.insertRoot()\n } else {\n condition.insert(path, {})\n }\n setPermission({ ...$permission })\n }\n }\n function insertSubExpression(condition: any, path: any) {\n return function () {\n if (!path) {\n return\n } else {\n condition.insertSub(path, {})\n }\n setPermission({ ...$permission })\n }\n }\n function removeExpression(condition: any, path: any) {\n return function () {\n condition.remove(path, {})\n setPermission({ ...$permission })\n\n }\n }\n function renderExpressions(condition: any, list: any) {\n const nodes: any = []\n for (let i = 0; i < list.length; i++) {\n const expr = list[i];\n if (expr.typeof == \"binary\") {\n\n const { left, right, operatorStr } = expr\n const rTypeOfKey = ConditionExpression.typeOfKey[right.typeof]\n nodes.push(\n \n \n \n \n\n \n \n \n )\n continue\n\n }\n\n if (expr.operatorStr == \"AND\" || expr.operatorStr == \"OR\" || expr.operatorStr == \"NOT\" || expr.operatorStr == \"Not\") {\n nodes.push()\n continue\n }\n\n if (_.isArray(expr)) {\n nodes.push(\n
Condition Group
\n {renderExpressions(condition, expr)}\n \n
)\n }\n\n\n\n }\n // nodes.push()\n return nodes\n }\n function renderCondition(condition: any) {\n if (!condition || !condition.walk) {\n return\n }\n const list = condition.parser() || []\n // console.log(list);\n // if (!list || !list.length) {\n // return\n // }\n\n const nodes: any = renderExpressions(condition, list)\n\n return
\n
\n
\n \n \n
\n
\n \n
\n
\n {nodes}\n \n\n\n
\n }\n function renderConditions() {\n const conditions = $permission.conditions\n return _.map(conditions, condition => {\n return renderCondition(condition)\n })\n }\n async function handlerPolicySubmit(nData: any, paths: any) {\n console.log(nData, paths);\n if (data) {\n nData.id = data.id\n await store.update(data.id, nData, paths)\n } else {\n await store.create(nData)\n }\n if (onChange) {\n onChange()\n }\n setOpenModal(false)\n }\n function renderScopeOptions() {\n const scopes = [\"北美地区数据集\", \"港澳台数据集\", \"Guest数据集\", \"系统管理\"]\n return <>\n {_.map(scopes, scope => {\n return \n })}\n \n }\n function renderDatabaseOptions() {\n\n if ($permission.scope == \"系统管理\") {\n return <>\n }\n const databases = [\n { value: \"OpenPeriodical\", label: \"期刊库\" },\n { value: \"OpenThesis\", label: \"学位库\" },\n { value: \"OpenConference\", label: \"会议库\" },\n { value: \"OpenPatent\", label: \"专利库\" },\n { value: \"OpenStandard\", label: \"标准库\" },\n { value: \"OpenMagazine\", label: \"刊名库\" },\n { value: \"OpenMeeting\", label: \"会议名录\" },\n { value: \"OpenClaw\", label: \"法律法规\" },\n ]\n return \n\n }\n\n function renderAccessTypeOptions() {\n const accessTypes = [\"SELECT\", \"DELIVERY\", \"FULLTEXT\", \"DETAIL\", \"DISCOVERY\"]\n return <>\n {_.map(accessTypes, accessType => {\n return \n })}\n \n }\n return <> {nTrigger}{openModal &&
\n {() => {\n\n const schemas: any = [\n { \"key\": \"name\", \"label\": \"Role name\", \"type\": \"text\" },\n { \"key\": \"groups\", \"label\": \"Assigned groups(可选)\", \"type\": \"text\" },\n ];\n if (data) {\n _.each(schemas, (schema, i) => {\n const value = data[schema.key]\n if (value) {\n schemas[i].value = value\n }\n })\n }\n\n\n\n return
\n
\n
\n

Add permission to role

\n setOpenModal(false)}>关闭\n
\n
\n
\n
\n
\n {/* Basic information */}\n
\n
1
\n
\n
Basic information
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
用户应该有权访问哪些对象?
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n {renderDatabaseOptions()}\n
\n
\n
\n
\n\n
\n
应授予那种类型的访问权限?
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n\n\n
\n
此权限应适用于哪个角色?
\n
\n
\n\n
\n
\n\n {/* Access conditions */}\n\n
\n
2
\n
\n
Access conditions
\n\n\n\n
\n
指定此角色的访问条件(可选)
\n {renderConditions()}\n\n
\n
\n \n
\n\n
\n
\n\n
\n
\n\n
\n
\n {$permission && $permission.conditions &&\n _.map($permission.conditions, (condition) => {\n if (!condition || !condition.expressions) {\n return undefined\n }\n return \n })\n }\n\n
\n
\n
\n \n {isNew\n ? \n : <>\n \n \n \n }\n\n
\n {/*
{\n setOpenModal(false)\n }}\n schemas={schemas}\n >
*/}\n
\n }}\n
\n }\n \n}\nconst writeFile = (fileName: string, content: any) => {\n const link = document.createElement(\"a\");\n const blob = new Blob([content], {\n type: \"application/json;charset=utf-8;\"\n });\n link.download = fileName;\n link.href = URL.createObjectURL(blob);\n link.click();\n};\n\n\nfunction RoleDetail({ ...props }: any) {\n const { match, appBasePath, permissionsStore } = props\n const { role_name } = match.params\n const store = props.rolesStore\n\n // const permissionsStore = PermissionsStore\n const [role, setRole] = useState()\n const [permissions, setPermissions] = useState()\n useEffect(() => {\n if (role_name) {\n store.get(role_name).then(setRole)\n permissionsStore.getAllByRole(role_name).then((res: any) => {\n if (res.error) {\n setPermissions([])\n } else {\n setPermissions(res.permissions)\n }\n })\n\n const id = permissionsStore.on(\"change\", function () {\n permissionsStore.getAllByRole(role_name).then((res: any) => {\n if (res.error) {\n setPermissions([])\n } else {\n setPermissions(res.permissions)\n }\n })\n })\n return function () {\n permissionsStore.kill(\"change\", id)\n }\n }\n\n }, [role_name])\n\n function handleClonePermission(permission: any) {\n return async function () {\n await permissionsStore.create({\n ...permission,\n id: undefined,\n // conditions\n })\n }\n }\n function remove(path: string) {\n return async function () {\n store.remove(path)\n }\n }\n function handleExportPermission() {\n writeFile(\"permission.json\", JSON.stringify({ permissions }))\n }\n\n if (!role) {\n return <>\n }\n return
\n \n
\n
{role.name}
\n
\n {/*
\n
Groups(1)
\n
abc
\n
*/}\n
\n
\n Permissions({permissions && permissions.length || \"-\"})\n
\n\n \n \n 导入\n }>\n \n \n \n Add Permission\n )}>\n
\n\n
\n \n \n \n Enabled\n Scope\n Object\n Conditions\n 上次修改时间\n 状态\n \n \n \n {\n _.map(permissions, (permission) => {\n return \n {permission.name}\n {permission.scope}\n {permission.database}\n {permission.conditions && permission.conditions.length || \"-\"}\n {moment(permission.modifyAt).format(\"lll\")}\n \n edit)}\n >\n clone\n \n\n \n })\n }\n \n \n
\n
\n}\nfunction RoleDatabases({ role, ...props }: any) {\n const permissionsStore = props.permissionsStore\n const [permissions, setPermissions] = useState()\n useEffect(() => {\n if (role.name) {\n permissionsStore.getAllByRole(role.name).then((res: any) => {\n if (res.error) {\n setPermissions([])\n } else {\n setPermissions(res.permissions)\n }\n })\n\n const id = permissionsStore.on(\"change\", function () {\n permissionsStore.getAllByRole(role.name).then((res: any) => {\n if (res.error) {\n setPermissions([])\n } else {\n setPermissions(res.permissions)\n }\n })\n })\n return function () {\n permissionsStore.kill(\"change\", id)\n }\n }\n\n }, [role.name])\n const databases: any = {}\n _.each(permissions, ({ database }) => {\n if (databases[database]) {\n ++databases[database]\n } else {\n databases[database] = 1\n }\n })\n return <>{\n _.map(databases, (value, key) => {\n return \n \n {key}\n \n })\n }\n}\nfunction RoleSelection({ value, onChange, ...props }: any) {\n const store = props.rolesStore\n const [roles, setRoles] = useState([])\n useEffect(() => {\n store.getAll().then(({ roles }: any) => setRoles(roles))\n }, [])\n\n function handleOnChange(e: any) {\n if (onChange) {\n onChange(e)\n }\n }\n if (!roles) {\n return <>\n }\n return <>\n \n \n}\nexport default function ({ ...props }: any) {\n\n const { match, appBasePath } = props\n const { role: roleName } = match.params\n const store = props.rolesStore\n const [roles, setRoles] = useState()\n const [expanded, setExpanded] = useState({})\n\n useEffect(() => {\n store.getAll().then(({ roles }: any) => {\n setRoles(roles)\n })\n const id = store.on(\"change\", function () {\n store.getAll().then(({ roles }: any) => setRoles(roles))\n })\n return function () {\n store.kill(\"change\", id)\n }\n }, [])\n\n function detail(path: string) {\n return function () {\n props.history.push(`${appBasePath}/tags/${path}`)\n }\n }\n function handleRoleClick(key: string) {\n return function () {\n props.history.push(`${appBasePath}/roles/${key}`)\n }\n }\n function randerRolesTrees() {\n return
    \n {_.map(roles, (role, key) => {\n const { name } = role\n return <>
  • \n \n\n \n {name}\n \n \n 1 groups: researcher\n
    \n\n \n
    \n \n\n
  • \n \n })}\n\n
\n }\n return
\n
\n
\n Roles\n
{roles && roles.length || \"-\"} roles
\n
\n
\n \n \n 导入\n }>\n \n \n Create New Role\n )} >\n
\n\n
\n
\n
\n \n \n \n
\n
\n\n
\n
\n\n\n
\n {randerRolesTrees()}\n
\n
\n {\n return
\n \n
\n }}>\n\n
\n
\n
\n}\n\n"],"sourceRoot":""}