@allthings/sdk
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
import { InterfaceAllthingsRestClientOptions } from './rest/types'; | ||
import { IAllthingsRestClientOptions } from './rest/types'; | ||
export declare const QUEUE_CONCURRENCY: undefined; | ||
@@ -8,3 +8,3 @@ export declare const QUEUE_DELAY = 0; | ||
export declare const REQUEST_MAX_RETRIES = 50; | ||
export declare const DEFAULT_API_WRAPPER_OPTIONS: InterfaceAllthingsRestClientOptions; | ||
export declare const DEFAULT_API_WRAPPER_OPTIONS: IAllthingsRestClientOptions; | ||
export declare const USER_AGENT: string; |
export { default as restClient, EnumUserPermissionRole, EnumUnitType, EnumUserPermissionObjectType, EnumUserRelationType, } from './rest'; | ||
export { EnumCountryCode, EnumLocale, EnumResource, EnumTimezone, InterfaceAllthingsRestClient, InterfaceAllthingsRestClientOptions, } from './rest/types'; | ||
export { EnumCountryCode, EnumLocale, EnumResource, EnumTimezone, IAllthingsRestClient, IAllthingsRestClientOptions, } from './rest/types'; |
import { EnumUnitType } from './methods/unit'; | ||
import { EnumUserPermissionObjectType, EnumUserPermissionRole } from './methods/user'; | ||
import { EnumUserRelationType } from './methods/userRelation'; | ||
import { InterfaceAllthingsRestClient, InterfaceAllthingsRestClientOptions } from './types'; | ||
import { IAllthingsRestClient, IAllthingsRestClientOptions } from './types'; | ||
export { EnumUserPermissionRole, EnumUnitType, EnumUserPermissionObjectType, EnumUserRelationType, }; | ||
export default function restClient(userOptions?: Partial<InterfaceAllthingsRestClientOptions>): InterfaceAllthingsRestClient; | ||
export default function restClient(userOptions?: Partial<IAllthingsRestClientOptions>): IAllthingsRestClient; |
@@ -1,2 +0,2 @@ | ||
import { EnumLocale, InterfaceAllthingsRestClient } from '../types'; | ||
import { EnumLocale, IAllthingsRestClient } from '../types'; | ||
import { EnumUserPermissionObjectType, EnumUserPermissionRole, IUserPermission, PartialUser, UserResult } from './user'; | ||
@@ -8,3 +8,3 @@ export declare type AgentPermissionsResult = Promise<ReadonlyArray<IUserPermission>>; | ||
}) => UserResult; | ||
export declare function agentCreate(client: InterfaceAllthingsRestClient, appId: string, propertyManagerId: string, username: string, data: PartialUser & { | ||
export declare function agentCreate(client: IAllthingsRestClient, appId: string, propertyManagerId: string, username: string, data: PartialUser & { | ||
readonly email: string; | ||
@@ -14,2 +14,2 @@ readonly locale: EnumLocale; | ||
export declare type MethodAgentCreatePermissions = (agentId: string, objectId: string, objectType: EnumUserPermissionObjectType, permissions: ReadonlyArray<EnumUserPermissionRole>, startDate?: Date, endDate?: Date) => Promise<boolean>; | ||
export declare function agentCreatePermissions(client: InterfaceAllthingsRestClient, agentId: string, objectId: string, objectType: EnumUserPermissionObjectType, permissions: ReadonlyArray<EnumUserPermissionRole>, startDate?: Date, endDate?: Date): Promise<boolean>; | ||
export declare function agentCreatePermissions(client: IAllthingsRestClient, agentId: string, objectId: string, objectType: EnumUserPermissionObjectType, permissions: ReadonlyArray<EnumUserPermissionRole>, startDate?: Date, endDate?: Date): Promise<boolean>; |
@@ -1,2 +0,2 @@ | ||
import { InterfaceAllthingsRestClient } from '../types'; | ||
import { IAllthingsRestClient } from '../types'; | ||
export interface IApp { | ||
@@ -13,5 +13,5 @@ readonly id: string; | ||
}) => CreateAppResult; | ||
export declare function appCreate(client: InterfaceAllthingsRestClient, userId: string, data: PartialApp & { | ||
export declare function appCreate(client: IAllthingsRestClient, userId: string, data: PartialApp & { | ||
readonly name: string; | ||
readonly siteUrl: string; | ||
}): CreateAppResult; |
@@ -1,2 +0,2 @@ | ||
import { InterfaceAllthingsRestClient } from '../types'; | ||
import { IAllthingsRestClient } from '../types'; | ||
export declare type BucketResult = Promise<IBucket>; | ||
@@ -10,3 +10,3 @@ export interface IBucket { | ||
export declare type MethodBucketGet = (bucketId: string) => BucketResult; | ||
export declare function bucketGet(client: InterfaceAllthingsRestClient, bucketId: string): BucketResult; | ||
export declare function bucketGet(client: IAllthingsRestClient, bucketId: string): BucketResult; | ||
export declare type MethodBucketCreate = (data: { | ||
@@ -16,3 +16,3 @@ readonly channels: ReadonlyArray<string>; | ||
}) => BucketResult; | ||
export declare function bucketCreate(client: InterfaceAllthingsRestClient, data: { | ||
export declare function bucketCreate(client: IAllthingsRestClient, data: { | ||
readonly channels: ReadonlyArray<string>; | ||
@@ -22,10 +22,10 @@ readonly name: string; | ||
export declare type MethodBucketAddFile = (bucketId: string, fileId: string) => Promise<boolean>; | ||
export declare function bucketAddFile(client: InterfaceAllthingsRestClient, bucketId: string, fileId: string): Promise<boolean>; | ||
export declare function bucketAddFile(client: IAllthingsRestClient, bucketId: string, fileId: string): Promise<boolean>; | ||
export declare type MethodBucketRemoveFile = (bucketId: string, fileId: string) => Promise<boolean>; | ||
export declare function bucketRemoveFile(client: InterfaceAllthingsRestClient, bucketId: string, fileId: string): Promise<boolean>; | ||
export declare function bucketRemoveFile(client: IAllthingsRestClient, bucketId: string, fileId: string): Promise<boolean>; | ||
export declare type MethodBucketRemoveFilesInPath = (bucketId: string, data: { | ||
readonly path: string; | ||
}) => Promise<boolean>; | ||
export declare function bucketRemoveFilesInPath(client: InterfaceAllthingsRestClient, bucketId: string, data: { | ||
export declare function bucketRemoveFilesInPath(client: IAllthingsRestClient, bucketId: string, data: { | ||
readonly path: string; | ||
}): Promise<boolean>; |
/// <reference types="node" /> | ||
import { InterfaceAllthingsRestClient } from '../types'; | ||
import { IAllthingsRestClient } from '../types'; | ||
export declare type FileResult = Promise<IFile>; | ||
@@ -34,3 +34,3 @@ interface IFileUrl { | ||
}) => FileResult; | ||
export declare function fileCreate(client: InterfaceAllthingsRestClient, data: { | ||
export declare function fileCreate(client: IAllthingsRestClient, data: { | ||
readonly file: Blob | Buffer | ReadableStream; | ||
@@ -41,3 +41,3 @@ readonly name: string; | ||
export declare type MethodFileDelete = (fileId: string) => Promise<boolean>; | ||
export declare function fileDelete(client: InterfaceAllthingsRestClient, fileId: string): Promise<boolean>; | ||
export declare function fileDelete(client: IAllthingsRestClient, fileId: string): Promise<boolean>; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { EnumCountryCode, InterfaceAllthingsRestClient } from '../types'; | ||
import { EnumCountryCode, IAllthingsRestClient } from '../types'; | ||
export interface IGroup { | ||
@@ -32,3 +32,3 @@ readonly address: Partial<{ | ||
}) => GroupResult; | ||
export declare function groupCreate(client: InterfaceAllthingsRestClient, propertyId: string, data: PartialGroup & { | ||
export declare function groupCreate(client: IAllthingsRestClient, propertyId: string, data: PartialGroup & { | ||
readonly name: string; | ||
@@ -38,4 +38,4 @@ readonly propertyManagerId: string; | ||
export declare type MethodGroupGetById = (id: string) => GroupResult; | ||
export declare function groupGetById(client: InterfaceAllthingsRestClient, groupId: string): GroupResult; | ||
export declare function groupGetById(client: IAllthingsRestClient, groupId: string): GroupResult; | ||
export declare type MethodGroupUpdateById = (groupId: string, data: PartialGroup) => GroupResult; | ||
export declare function groupUpdateById(client: InterfaceAllthingsRestClient, groupId: string, data: PartialGroup): GroupResult; | ||
export declare function groupUpdateById(client: IAllthingsRestClient, groupId: string, data: PartialGroup): GroupResult; |
@@ -1,2 +0,2 @@ | ||
import { EnumResource, InterfaceAllthingsRestClient } from '../types'; | ||
import { EnumResource, IAllthingsRestClient } from '../types'; | ||
export declare type LookupIdResult = Promise<{ | ||
@@ -9,5 +9,5 @@ readonly [externalId: string]: string | null; | ||
}) => LookupIdResult; | ||
export declare function lookupIds(client: InterfaceAllthingsRestClient, appId: string, data: { | ||
export declare function lookupIds(client: IAllthingsRestClient, appId: string, data: { | ||
readonly resource: EnumResource; | ||
readonly externalIds: string | ReadonlyArray<string>; | ||
}): LookupIdResult; |
@@ -1,2 +0,2 @@ | ||
import { InterfaceAllthingsRestClient } from '../types'; | ||
import { IAllthingsRestClient } from '../types'; | ||
export declare enum EnumNotificationCategory { | ||
@@ -59,8 +59,8 @@ events = "events", | ||
export declare type MethodNotificationsGetByUser = (userId: string, page?: number, limit?: number) => NotificationResultList; | ||
export declare function notificationsGetByUser(client: InterfaceAllthingsRestClient, userId: string, page?: number, limit?: number): NotificationResultList; | ||
export declare function notificationsGetByUser(client: IAllthingsRestClient, userId: string, page?: number, limit?: number): NotificationResultList; | ||
export declare type NotificationsUpdateReadByUserResult = Promise<null>; | ||
export declare type MethodNotificationsUpdateReadByUser = (userId: string, lastReadAt?: Date) => NotificationsUpdateReadByUserResult; | ||
export declare function notificationsUpdateReadByUser(client: InterfaceAllthingsRestClient, userId: string, lastReadAt?: Date): NotificationsUpdateReadByUserResult; | ||
export declare function notificationsUpdateReadByUser(client: IAllthingsRestClient, userId: string, lastReadAt?: Date): NotificationsUpdateReadByUserResult; | ||
export declare type NotificationUpdateReadResult = Promise<INotification>; | ||
export declare type MethodNotificationUpdateRead = (notificationId: string) => NotificationUpdateReadResult; | ||
export declare function notificationUpdateRead(client: InterfaceAllthingsRestClient, notificationId: string): NotificationUpdateReadResult; | ||
export declare function notificationUpdateRead(client: IAllthingsRestClient, notificationId: string): NotificationUpdateReadResult; |
@@ -1,2 +0,2 @@ | ||
import { InterfaceAllthingsRestClient } from '../types'; | ||
import { IAllthingsRestClient } from '../types'; | ||
export interface IProperty { | ||
@@ -15,3 +15,3 @@ readonly externalId: string; | ||
}) => PropertyResult; | ||
export declare function propertyCreate(client: InterfaceAllthingsRestClient, appId: string, data: PartialProperty & { | ||
export declare function propertyCreate(client: IAllthingsRestClient, appId: string, data: PartialProperty & { | ||
readonly name: string; | ||
@@ -21,4 +21,4 @@ readonly timezone: string; | ||
export declare type MethodPropertyGetById = (propertyId: string) => PropertyResult; | ||
export declare function propertyGetById(client: InterfaceAllthingsRestClient, propertyId: string): PropertyResult; | ||
export declare function propertyGetById(client: IAllthingsRestClient, propertyId: string): PropertyResult; | ||
export declare type MethodPropertyUpdateById = (propertyId: string, data: PartialProperty) => PropertyResult; | ||
export declare function propertyUpdateById(client: InterfaceAllthingsRestClient, propertyId: string, data: PartialProperty): PropertyResult; | ||
export declare function propertyUpdateById(client: IAllthingsRestClient, propertyId: string, data: PartialProperty): PropertyResult; |
@@ -1,2 +0,2 @@ | ||
import { InterfaceAllthingsRestClient } from '../types'; | ||
import { IAllthingsRestClient } from '../types'; | ||
export interface IRegistrationCodeOptions { | ||
@@ -20,6 +20,6 @@ readonly expiresAt?: string | null; | ||
export declare type MethodRegistrationCodeCreate = (code: string, utilisationPeriods: string | ReadonlyArray<string>, options?: IRegistrationCodeOptions) => RegistrationCodeResult; | ||
export declare function registrationCodeCreate(client: InterfaceAllthingsRestClient, code: string, utilisationPeriods: string | ReadonlyArray<string>, options?: IRegistrationCodeOptions): RegistrationCodeResult; | ||
export declare function registrationCodeCreate(client: IAllthingsRestClient, code: string, utilisationPeriods: string | ReadonlyArray<string>, options?: IRegistrationCodeOptions): RegistrationCodeResult; | ||
export declare type MethodRegistrationCodeGetById = (registrationCodeId: string) => RegistrationCodeResult; | ||
export declare function registrationCodeGetById(client: InterfaceAllthingsRestClient, registrationCodeId: string): RegistrationCodeResult; | ||
export declare function registrationCodeGetById(client: IAllthingsRestClient, registrationCodeId: string): RegistrationCodeResult; | ||
export declare type MethodRegistrationCodeDelete = (registrationCodeId: string) => RegistrationCodeResult; | ||
export declare function registrationCodeDelete(client: InterfaceAllthingsRestClient, registrationCodeId: string): Promise<boolean>; | ||
export declare function registrationCodeDelete(client: IAllthingsRestClient, registrationCodeId: string): Promise<boolean>; |
@@ -1,2 +0,2 @@ | ||
import { InterfaceAllthingsRestClient } from '../types'; | ||
import { IAllthingsRestClient } from '../types'; | ||
export declare enum EnumUnitType { | ||
@@ -22,3 +22,3 @@ rented = "rented", | ||
}) => UnitResult; | ||
export declare function unitCreate(client: InterfaceAllthingsRestClient, groupId: string, data: PartialUnit & { | ||
export declare function unitCreate(client: IAllthingsRestClient, groupId: string, data: PartialUnit & { | ||
readonly name: string; | ||
@@ -28,4 +28,4 @@ readonly type: EnumUnitType; | ||
export declare type MethodUnitGetById = (id: string) => UnitResult; | ||
export declare function unitGetById(client: InterfaceAllthingsRestClient, unitId: string): UnitResult; | ||
export declare function unitGetById(client: IAllthingsRestClient, unitId: string): UnitResult; | ||
export declare type MethodUnitUpdateById = (unitId: string, data: PartialUnit) => UnitResult; | ||
export declare function unitUpdateById(client: InterfaceAllthingsRestClient, unitId: string, data: PartialUnit): UnitResult; | ||
export declare function unitUpdateById(client: IAllthingsRestClient, unitId: string, data: PartialUnit): UnitResult; |
@@ -1,2 +0,2 @@ | ||
import { EnumLocale, InterfaceAllthingsRestClient } from '../types'; | ||
import { EnumLocale, IAllthingsRestClient } from '../types'; | ||
import { UtilisationPeriodResult, UtilisationPeriodResults } from './utilisationPeriod'; | ||
@@ -97,3 +97,3 @@ export declare enum EnumGender { | ||
}) => UserResult; | ||
export declare function userCreate(client: InterfaceAllthingsRestClient, appId: string, username: string, data: PartialUser & { | ||
export declare function userCreate(client: IAllthingsRestClient, appId: string, username: string, data: PartialUser & { | ||
readonly email: string; | ||
@@ -104,9 +104,9 @@ readonly locale: EnumLocale; | ||
export declare type MethodGetUsers = (page?: number, limit?: number, filter?: IndexSignature) => UserResultList; | ||
export declare function getUsers(client: InterfaceAllthingsRestClient, page?: number, limit?: number, filter?: {}): UserResultList; | ||
export declare function getUsers(client: IAllthingsRestClient, page?: number, limit?: number, filter?: {}): UserResultList; | ||
export declare type MethodGetCurrentUser = () => UserResult; | ||
export declare function getCurrentUser(client: InterfaceAllthingsRestClient): UserResult; | ||
export declare function getCurrentUser(client: IAllthingsRestClient): UserResult; | ||
export declare type MethodUserGetById = (id: string) => UserResult; | ||
export declare function userGetById(client: InterfaceAllthingsRestClient, userId: string): UserResult; | ||
export declare function userGetById(client: IAllthingsRestClient, userId: string): UserResult; | ||
export declare type MethodUserUpdateById = (userId: string, data: PartialUser) => UserResult; | ||
export declare function userUpdateById(client: InterfaceAllthingsRestClient, userId: string, data: PartialUser): UserResult; | ||
export declare function userUpdateById(client: IAllthingsRestClient, userId: string, data: PartialUser): UserResult; | ||
export declare type MethodUserCreatePermission = (userId: string, permission: PartialUserPermission & { | ||
@@ -120,3 +120,3 @@ readonly objectId: string; | ||
}) => UserPermissionResult; | ||
export declare function userCreatePermission(client: InterfaceAllthingsRestClient, userId: string, data: PartialUserPermission & { | ||
export declare function userCreatePermission(client: IAllthingsRestClient, userId: string, data: PartialUserPermission & { | ||
readonly objectId: string; | ||
@@ -137,3 +137,3 @@ readonly objectType: EnumUserPermissionObjectType; | ||
}) => Promise<boolean>; | ||
export declare function userCreatePermissionBatch(client: InterfaceAllthingsRestClient, userId: string, permissions: PartialUserPermission & { | ||
export declare function userCreatePermissionBatch(client: IAllthingsRestClient, userId: string, permissions: PartialUserPermission & { | ||
readonly objectId: string; | ||
@@ -147,8 +147,8 @@ readonly objectType: EnumUserPermissionObjectType; | ||
export declare type MethodUserGetPermissions = (userId: string) => Promise<ReadonlyArray<IUserPermission>>; | ||
export declare function userGetPermissions(client: InterfaceAllthingsRestClient, userId: string): Promise<ReadonlyArray<IUserPermission>>; | ||
export declare function userGetPermissions(client: IAllthingsRestClient, userId: string): Promise<ReadonlyArray<IUserPermission>>; | ||
export declare type MethodUserDeletePermission = (permissionId: string) => Promise<boolean>; | ||
export declare function userDeletePermission(client: InterfaceAllthingsRestClient, permissionId: string): Promise<boolean>; | ||
export declare function userDeletePermission(client: IAllthingsRestClient, permissionId: string): Promise<boolean>; | ||
export declare type MethodUserGetUtilisationPeriods = (userId: string) => UtilisationPeriodResults; | ||
export declare function userGetUtilisationPeriods(client: InterfaceAllthingsRestClient, userId: string): UtilisationPeriodResults; | ||
export declare function userGetUtilisationPeriods(client: IAllthingsRestClient, userId: string): UtilisationPeriodResults; | ||
export declare type MethodUserCheckInToUtilisationPeriod = (userId: string, utilisationPeriodId: string) => UtilisationPeriodResults; | ||
export declare function userCheckInToUtilisationPeriod(client: InterfaceAllthingsRestClient, userId: string, utilisationPeriodId: string): UtilisationPeriodResult; | ||
export declare function userCheckInToUtilisationPeriod(client: IAllthingsRestClient, userId: string, utilisationPeriodId: string): UtilisationPeriodResult; |
@@ -1,2 +0,2 @@ | ||
import { InterfaceAllthingsRestClient } from '../types'; | ||
import { IAllthingsRestClient } from '../types'; | ||
export interface IUserRelation { | ||
@@ -20,9 +20,9 @@ readonly id: string; | ||
}) => UserRelationResult; | ||
export declare function userRelationCreate(client: InterfaceAllthingsRestClient, userId: string, data: { | ||
export declare function userRelationCreate(client: IAllthingsRestClient, userId: string, data: { | ||
readonly properties: ReadonlyArray<string>; | ||
readonly type: EnumUserRelationType; | ||
}): UserRelationResult; | ||
export declare function userRelationDelete(client: InterfaceAllthingsRestClient, userId: string, data: { | ||
export declare function userRelationDelete(client: IAllthingsRestClient, userId: string, data: { | ||
readonly properties: ReadonlyArray<string>; | ||
readonly type: EnumUserRelationType; | ||
}): UserRelationResult; |
@@ -1,2 +0,2 @@ | ||
import { InterfaceAllthingsRestClient } from '../types'; | ||
import { IAllthingsRestClient } from '../types'; | ||
import { IUser } from './user'; | ||
@@ -43,9 +43,9 @@ export interface IUtilisationPeriod { | ||
}) => UtilisationPeriodResult; | ||
export declare function utilisationPeriodCreate(client: InterfaceAllthingsRestClient, unitId: string, data: PartialUtilisationPeriod & { | ||
export declare function utilisationPeriodCreate(client: IAllthingsRestClient, unitId: string, data: PartialUtilisationPeriod & { | ||
readonly startDate: string; | ||
}): UtilisationPeriodResult; | ||
export declare type MethodUtilisationPeriodGetById = (id: string) => UtilisationPeriodResult; | ||
export declare function utilisationPeriodGetById(client: InterfaceAllthingsRestClient, utilisationPeriodId: string): UtilisationPeriodResult; | ||
export declare function utilisationPeriodGetById(client: IAllthingsRestClient, utilisationPeriodId: string): UtilisationPeriodResult; | ||
export declare type MethodUtilisationPeriodUpdateById = (unitId: string, data: PartialUtilisationPeriod) => UtilisationPeriodResult; | ||
export declare function utilisationPeriodUpdateById(client: InterfaceAllthingsRestClient, utilisationPeriodId: string, data: PartialUtilisationPeriod & { | ||
export declare function utilisationPeriodUpdateById(client: IAllthingsRestClient, utilisationPeriodId: string, data: PartialUtilisationPeriod & { | ||
readonly startDate: string; | ||
@@ -56,6 +56,6 @@ }): UtilisationPeriodResult; | ||
}) => UtilisationPeriodResult; | ||
export declare function utilisationPeriodCheckInUser(client: InterfaceAllthingsRestClient, utilisationPeriodId: string, data: { | ||
export declare function utilisationPeriodCheckInUser(client: IAllthingsRestClient, utilisationPeriodId: string, data: { | ||
readonly email: string; | ||
}): UtilisationPeriodResult; | ||
export declare type MethodUtilisationPeriodCheckOutUser = (utilisationPeriodId: string, userId: string) => UtilisationPeriodResult; | ||
export declare function utilisationPeriodCheckOutUser(client: InterfaceAllthingsRestClient, utilisationPeriodId: string, userId: string): Promise<boolean>; | ||
export declare function utilisationPeriodCheckOutUser(client: IAllthingsRestClient, utilisationPeriodId: string, userId: string): Promise<boolean>; |
@@ -1,4 +0,4 @@ | ||
import { InterfaceAllthingsRestClientOptions } from './types'; | ||
export declare const getNewTokenUsingPasswordGrant: (clientOptions: InterfaceAllthingsRestClientOptions) => Promise<string | undefined>; | ||
export declare const unmemoizedGetNewTokenUsingImplicitFlow: (clientOptions: InterfaceAllthingsRestClientOptions) => Promise<string | undefined>; | ||
export declare const getNewTokenUsingImplicitFlow: (clientOptions: InterfaceAllthingsRestClientOptions) => Promise<string | undefined>; | ||
import { IAllthingsRestClientOptions } from './types'; | ||
export declare const getNewTokenUsingPasswordGrant: (clientOptions: IAllthingsRestClientOptions) => Promise<string | undefined>; | ||
export declare const unmemoizedGetNewTokenUsingImplicitFlow: (clientOptions: IAllthingsRestClientOptions) => Promise<string | undefined>; | ||
export declare const getNewTokenUsingImplicitFlow: (clientOptions: IAllthingsRestClientOptions) => Promise<string | undefined>; |
/// <reference types="node" /> | ||
import { InterfaceAllthingsRestClientOptions } from './types'; | ||
import { IAllthingsRestClientOptions } from './types'; | ||
interface IFormOptions { | ||
@@ -26,4 +26,4 @@ readonly [key: string]: ReadonlyArray<any>; | ||
export declare function responseWasSuccessful(response: Response): boolean; | ||
export declare function makeApiRequest(options: InterfaceAllthingsRestClientOptions, httpMethod: HttpVerb, apiUrl: string, apiMethod: string, accessToken: string, payload?: IRequestOptions): (previousResult: any, iteration: number) => Promise<Response>; | ||
export default function request(options: InterfaceAllthingsRestClientOptions, httpMethod: HttpVerb, apiMethod: string, payload?: IRequestOptions): RequestResult; | ||
export declare function makeApiRequest(options: IAllthingsRestClientOptions, httpMethod: HttpVerb, apiUrl: string, apiMethod: string, accessToken: string, payload?: IRequestOptions): (previousResult: any, iteration: number) => Promise<Response>; | ||
export default function request(options: IAllthingsRestClientOptions, httpMethod: HttpVerb, apiMethod: string, payload?: IRequestOptions): RequestResult; | ||
export {}; |
@@ -52,3 +52,3 @@ import { MethodHttpDelete } from './delete'; | ||
} | ||
export interface InterfaceAllthingsRestClientOptions { | ||
export interface IAllthingsRestClientOptions { | ||
readonly apiUrl: string; | ||
@@ -67,4 +67,4 @@ readonly accessToken?: string; | ||
} | ||
export interface InterfaceAllthingsRestClient { | ||
readonly options: Required<InterfaceAllthingsRestClientOptions>; | ||
export interface IAllthingsRestClient { | ||
readonly options: Required<IAllthingsRestClientOptions>; | ||
readonly delete: MethodHttpDelete; | ||
@@ -71,0 +71,0 @@ readonly get: MethodHttpGet; |
import { IUser } from '../src/rest/methods/user'; | ||
import { IUtilisationPeriod } from '../src/rest/methods/utilisationPeriod'; | ||
import { InterfaceAllthingsRestClient } from '../src/rest/types'; | ||
import { IAllthingsRestClient } from '../src/rest/types'; | ||
export declare type CreateUserAndClientResult = Promise<{ | ||
readonly client: InterfaceAllthingsRestClient; | ||
readonly client: IAllthingsRestClient; | ||
readonly user: IUser; | ||
@@ -7,0 +7,0 @@ }>; |
{ | ||
"name": "@allthings/sdk", | ||
"version": "0.14.4", | ||
"version": "1.0.0", | ||
"description": "", | ||
@@ -61,3 +61,3 @@ "author": "Allthings GmbH", | ||
"bottleneck": "2.18.0", | ||
"cross-fetch": "2.2.3", | ||
"cross-fetch": "3.0.2", | ||
"mem": "4.3.0", | ||
@@ -68,9 +68,9 @@ "query-string": "6.5.0" | ||
"@allthings/tslint-preset": "1.10.1", | ||
"@commitlint/cli": "7.5.2", | ||
"@commitlint/config-conventional": "7.5.0", | ||
"@commitlint/cli": "7.6.0", | ||
"@commitlint/config-conventional": "7.6.0", | ||
"@types/form-data": "2.2.1", | ||
"@types/jest": "23.3.14", | ||
"@types/jest": "24.0.12", | ||
"@types/mem": "1.1.2", | ||
"@types/nanoid": "1.2.1", | ||
"@types/node": "10.14.4", | ||
"@types/node": "10.14.6", | ||
"@types/query-string": "6.2.0", | ||
@@ -81,18 +81,18 @@ "coveralls": "3.0.3", | ||
"jest": "23.6.0", | ||
"lint-staged": "8.1.5", | ||
"lint-staged": "8.1.6", | ||
"nanoid": "2.0.1", | ||
"nyc": "13.3.0", | ||
"nyc": "14.1.0", | ||
"prettier": "1.17.0", | ||
"rimraf": "2.6.3", | ||
"rollup": "0.68.2", | ||
"rollup": "1.11.3", | ||
"rollup-plugin-commonjs": "9.3.4", | ||
"rollup-plugin-hashbang": "1.0.1", | ||
"rollup-plugin-json": "3.1.0", | ||
"rollup-plugin-hashbang": "2.2.2", | ||
"rollup-plugin-json": "4.0.0", | ||
"rollup-plugin-node-resolve": "3.4.0", | ||
"rollup-plugin-replace": "2.2.0", | ||
"rollup-plugin-terser": "3.0.0", | ||
"rollup-plugin-terser": "4.0.4", | ||
"semantic-release": "15.13.3", | ||
"ts-jest": "24.0.2", | ||
"tslint": "5.13.1", | ||
"typescript": "3.4.3" | ||
"tslint": "5.16.0", | ||
"typescript": "3.4.5" | ||
}, | ||
@@ -99,0 +99,0 @@ "prettier": { |
@@ -174,3 +174,3 @@ Allthings Node/Javascript SDK | ||
// Describes the API wrapper's resulting interface | ||
export interface InterfaceAllthingsRestClient { | ||
export interface IAllthingsRestClient { | ||
readonly delete: MethodHttpDelete | ||
@@ -177,0 +177,0 @@ readonly get: MethodHttpGet |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
35529
0.01%1
-50%813458
-0.04%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated