@allthings/sdk
Advanced tools
Comparing version 0.1.0-5 to 0.1.0-6
@@ -14,3 +14,3 @@ #!/usr/bin/env node | ||
const name = "@allthings/sdk"; | ||
const version = "0.1.0-4"; | ||
const version = "0.1.0-6"; | ||
const description = ""; | ||
@@ -556,2 +556,19 @@ const author = "Allthings GmbH"; | ||
var EnumResource; | ||
(function (EnumResource) { | ||
EnumResource["property"] = "property"; | ||
EnumResource["group"] = "group"; | ||
EnumResource["unit"] = "unit"; | ||
EnumResource["utilisationPeriod"] = "utilisationPeriod"; | ||
EnumResource["user"] = "user"; | ||
})(EnumResource || (EnumResource = {})); | ||
var EnumLocale; | ||
(function (EnumLocale) { | ||
EnumLocale["de_DE"] = "de_DE"; | ||
EnumLocale["it_IT"] = "it_IT"; | ||
EnumLocale["fr_FR"] = "fr_FR"; | ||
EnumLocale["pt_PT"] = "pt_PT"; | ||
EnumLocale["en_US"] = "en_US"; | ||
})(EnumLocale || (EnumLocale = {})); | ||
async function main$1() { | ||
@@ -558,0 +575,0 @@ const [, , action, ...args] = process.argv; |
@@ -13,3 +13,3 @@ 'use strict'; | ||
const name = "@allthings/sdk"; | ||
const version = "0.1.0-4"; | ||
const version = "0.1.0-6"; | ||
const description = ""; | ||
@@ -233,8 +233,6 @@ const author = "Allthings GmbH"; | ||
})(EnumUserType || (EnumUserType = {})); | ||
var EnumUserPermissionRole; | ||
(function (EnumUserPermissionRole) { | ||
EnumUserPermissionRole["admin"] = "admin"; | ||
EnumUserPermissionRole["pinboard"] = "community-article-admin"; | ||
})(EnumUserPermissionRole || (EnumUserPermissionRole = {})); | ||
var EnumUserPermissionObjectType; | ||
})(exports.EnumUserPermissionRole || (exports.EnumUserPermissionRole = {})); | ||
(function (EnumUserPermissionObjectType) { | ||
@@ -245,3 +243,3 @@ EnumUserPermissionObjectType["app"] = "App"; | ||
EnumUserPermissionObjectType["unit"] = "Unit"; | ||
})(EnumUserPermissionObjectType || (EnumUserPermissionObjectType = {})); | ||
})(exports.EnumUserPermissionObjectType || (exports.EnumUserPermissionObjectType = {})); | ||
async function createUser(post, appId, username, plainPassword, data) { | ||
@@ -292,3 +290,3 @@ return post(`/users`, Object.assign({}, data, { creationContext: appId, plainPassword, | ||
restrictions: [], | ||
role: EnumUserPermissionRole.admin, | ||
role: exports.EnumUserPermissionRole.admin, | ||
}), | ||
@@ -299,3 +297,3 @@ createUserPermission(post, agentId, { | ||
restrictions: [], | ||
role: EnumUserPermissionRole.pinboard, | ||
role: exports.EnumUserPermissionRole.pinboard, | ||
}), | ||
@@ -559,2 +557,17 @@ ]); | ||
(function (EnumResource) { | ||
EnumResource["property"] = "property"; | ||
EnumResource["group"] = "group"; | ||
EnumResource["unit"] = "unit"; | ||
EnumResource["utilisationPeriod"] = "utilisationPeriod"; | ||
EnumResource["user"] = "user"; | ||
})(exports.EnumResource || (exports.EnumResource = {})); | ||
(function (EnumLocale) { | ||
EnumLocale["de_DE"] = "de_DE"; | ||
EnumLocale["it_IT"] = "it_IT"; | ||
EnumLocale["fr_FR"] = "fr_FR"; | ||
EnumLocale["pt_PT"] = "pt_PT"; | ||
EnumLocale["en_US"] = "en_US"; | ||
})(exports.EnumLocale || (exports.EnumLocale = {})); | ||
exports.restSdk = restSdk; |
@@ -8,3 +8,3 @@ import { generate } from 'shortid'; | ||
const name = "@allthings/sdk"; | ||
const version = "0.1.0-4"; | ||
const version = "0.1.0-6"; | ||
const description = ""; | ||
@@ -550,2 +550,19 @@ const author = "Allthings GmbH"; | ||
export { restSdk }; | ||
var EnumResource; | ||
(function (EnumResource) { | ||
EnumResource["property"] = "property"; | ||
EnumResource["group"] = "group"; | ||
EnumResource["unit"] = "unit"; | ||
EnumResource["utilisationPeriod"] = "utilisationPeriod"; | ||
EnumResource["user"] = "user"; | ||
})(EnumResource || (EnumResource = {})); | ||
var EnumLocale; | ||
(function (EnumLocale) { | ||
EnumLocale["de_DE"] = "de_DE"; | ||
EnumLocale["it_IT"] = "it_IT"; | ||
EnumLocale["fr_FR"] = "fr_FR"; | ||
EnumLocale["pt_PT"] = "pt_PT"; | ||
EnumLocale["en_US"] = "en_US"; | ||
})(EnumLocale || (EnumLocale = {})); | ||
export { restSdk, EnumUserPermissionObjectType, EnumUserPermissionRole, EnumResource, EnumLocale }; |
{ | ||
"name": "@allthings/sdk", | ||
"version": "0.1.0-4", | ||
"version": "0.1.0-6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Allthings GmbH", |
@@ -1,1 +0,2 @@ | ||
export { default as restSdk, InterfaceAllthingsRestClient, InterfaceAllthingsRestClientOptions, } from './rest'; | ||
export { default as restSdk, EnumUserPermissionObjectType, EnumUserPermissionRole, } from './rest'; | ||
export { EnumResource, EnumLocale, InterfaceAllthingsRestClient, InterfaceAllthingsRestClientOptions, } from './rest/types'; |
@@ -1,1 +0,2 @@ | ||
export { default as restSdk, } from './rest'; | ||
export { default as restSdk, EnumUserPermissionObjectType, EnumUserPermissionRole, } from './rest'; | ||
export { EnumResource, EnumLocale, } from './rest/types'; |
@@ -0,3 +1,4 @@ | ||
import { EnumUserPermissionObjectType, EnumUserPermissionRole } from './methods/user'; | ||
import { InterfaceAllthingsRestClient, InterfaceAllthingsRestClientOptions } from './types'; | ||
export { InterfaceAllthingsRestClient, InterfaceAllthingsRestClientOptions }; | ||
export { EnumUserPermissionObjectType, EnumUserPermissionRole }; | ||
export default function restSdk(userOptions?: InterfaceAllthingsRestClientOptions): InterfaceAllthingsRestClient; |
@@ -12,3 +12,3 @@ import { DEFAULT_API_WRAPPER_OPTIONS } from '../constants'; | ||
import { createUnit, getUnitById, updateUnitById } from './methods/unit'; | ||
import { createUser, createUserPermission, deleteUserPermission, getCurrentUser, getUserById, getUserPermissions, getUsers, updateUserById, } from './methods/user'; | ||
import { createUser, createUserPermission, deleteUserPermission, EnumUserPermissionObjectType, EnumUserPermissionRole, getCurrentUser, getUserById, getUserPermissions, getUsers, updateUserById, } from './methods/user'; | ||
import { createUtilisationPeriod, getUtilisationPeriodById, updateUtilisationPeriodById, } from './methods/utilisationPeriod'; | ||
@@ -45,2 +45,3 @@ import httpPatch from './patch'; | ||
]; | ||
export { EnumUserPermissionObjectType, EnumUserPermissionRole }; | ||
export default function restSdk(userOptions = DEFAULT_API_WRAPPER_OPTIONS) { | ||
@@ -47,0 +48,0 @@ const options = Object.assign({}, DEFAULT_API_WRAPPER_OPTIONS, userOptions); |
{ | ||
"name": "@allthings/sdk", | ||
"version": "0.1.0-5", | ||
"version": "0.1.0-6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Allthings GmbH", |
144052
3028