@allthings/sdk 4.5.0 → 4.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,10 +12,16 @@ export declare type CreateAppResult = Promise<IApp>;
12
12
  export declare type MethodAppCreate = (userId: string, data: PartialApp & {
13
13
  readonly name: string;
14
14
  readonly siteUrl: string;
15
+ readonly notificationsEmailAddress: string;
15
16
  }) => CreateAppResult;
16
17
  export declare function appCreate(client: IAllthingsRestClient, userId: string, data: PartialApp & {
17
18
  readonly name: string;
18
19
  readonly siteUrl: string;
20
+ readonly notificationsEmailAddress: string;
19
21
  }): CreateAppResult;
20
22
  export declare type MethodAppGetById = (appId: string) => AppResult;
21
23
  export declare function appGetById(client: IAllthingsRestClient, appId: string): AppResult;
24
+ export declare type MethodActiveUnitsGetByAppId = (appId: string) => PartialApp & {
25
+ readonly activeUnitCount: number;
26
+ };
27
+ export declare function activeUnitsGetByAppId(client: IAllthingsRestClient, appId: string): AppResult;
@@ -0,0 +1,15 @@
1
+ import { IAllthingsRestClient } from '../types';
2
+ export interface IBooking {
3
+ readonly additionalInformation: string;
4
+ readonly dateFrom: string;
5
+ readonly dateTo: string;
6
+ readonly id: string;
7
+ readonly message: string;
8
+ readonly phoneNumber: string;
9
+ }
10
+ export declare type PartialBooking = Partial<IBooking>;
11
+ export declare type BookingResult = Promise<IBooking>;
12
+ export declare type MethodBookingGetById = (bookingId: string) => BookingResult;
13
+ export declare function bookingGetById(client: IAllthingsRestClient, bookingId: string): BookingResult;
14
+ export declare type MethodBookingUpdateById = (bookingId: string, data: PartialBooking) => BookingResult;
15
+ export declare function bookingUpdateById(client: IAllthingsRestClient, bookingId: string, data: PartialBooking): BookingResult;
@@ -0,0 +1 @@
1
+ export {};
@@ -19,6 +19,11 @@ export interface ITicketLabel {
19
19
  readonly key: string;
20
20
  readonly name: IMessage;
21
21
  }
22
+ export interface ICustomSettingsItem {
23
+ readonly key: string;
24
+ readonly type: string;
25
+ readonly value: string;
26
+ }
22
27
  export interface ITicketCreatePayload {
23
28
  readonly files?: ReadonlyArray<{
24
29
  readonly content: Buffer;
@@ -33,6 +38,8 @@ export interface ITicketCreatePayload {
33
38
  readonly description: string;
34
39
  readonly inputChannel: string;
35
40
  readonly title: string;
41
+ readonly phoneNumber?: string;
42
+ readonly customSettings?: ReadonlyArray<ICustomSettingsItem>;
36
43
  }
37
44
  interface ITicketParticipant extends IUser {
38
45
  readonly roles: ReadonlyArray<string>;
@@ -69,6 +76,7 @@ export interface ITicket {
69
76
  readonly commentCount: number;
70
77
  readonly createdAt: string;
71
78
  readonly customerWaitingSinceIndicator: ETrafficLightColor;
79
+ readonly customSettings?: ReadonlyArray<ICustomSettingsItem>;
72
80
  readonly description: string;
73
81
  readonly files: ReadonlyArray<string>;
74
82
  readonly id: string;
@@ -2,7 +2,7 @@ import { ITokenStore, TokenRequester } from '../oauth/types';
2
2
  import { MethodHttpDelete } from './delete';
3
3
  import { MethodHttpGet } from './get';
4
4
  import { MethodAgentCreate, MethodAgentCreatePermissions } from './methods/agent';
5
- import { MethodAppCreate, MethodAppGetById } from './methods/app';
5
+ import { MethodActiveUnitsGetByAppId, MethodAppCreate, MethodAppGetById } from './methods/app';
6
6
  import { MethodBucketAddFile, MethodBucketCreate, MethodBucketGet, MethodBucketRemoveFile, MethodBucketRemoveFilesInPath } from './methods/bucket';
7
7
  import { MethodConversationCreateMessage, MethodConversationGetById } from './methods/conversation';
8
8
  import { MethodFileCreate, MethodFileDelete } from './methods/file';
@@ -21,6 +21,7 @@ import { MethodUtilisationPeriodAddRegistrationCode, MethodUtilisationPeriodChec
21
21
  import { MethodHttpPatch } from './patch';
22
22
  import { MethodHttpPost } from './post';
23
23
  import { MethodHttpPut } from './put';
24
+ import { MethodBookingGetById, MethodBookingUpdateById } from './methods/booking';
24
25
  export declare enum EnumResource {
25
26
  group = "group",
26
27
  property = "property",
@@ -120,6 +121,7 @@ export interface IAllthingsRestClient {
120
121
  readonly agentCreatePermissions: MethodAgentCreatePermissions;
121
122
  readonly appCreate: MethodAppCreate;
122
123
  readonly appGetById: MethodAppGetById;
124
+ readonly activeUnitsGetByAppId: MethodActiveUnitsGetByAppId;
123
125
  readonly bucketCreate: MethodBucketCreate;
124
126
  readonly bucketAddFile: MethodBucketAddFile;
125
127
  readonly bucketRemoveFile: MethodBucketRemoveFile;
@@ -180,4 +182,6 @@ export interface IAllthingsRestClient {
180
182
  readonly utilisationPeriodCheckInUser: MethodUtilisationPeriodCheckInUser;
181
183
  readonly utilisationPeriodCheckOutUser: MethodUtilisationPeriodCheckOutUser;
182
184
  readonly utilisationPeriodAddRegistrationCode: MethodUtilisationPeriodAddRegistrationCode;
185
+ readonly bookingGetById: MethodBookingGetById;
186
+ readonly bookingUpdateById: MethodBookingUpdateById;
183
187
  }
@@ -13,3 +13,4 @@ export declare const INPUT_CHANNEL = EnumInputChannel.EMAIL;
13
13
  export declare const SERVICE_PROVIDER_ID = "5a818c07ef5f2f00441146a2";
14
14
  export declare const USER_ID = "50f66beaeabc88ab0e000000";
15
15
  export declare const UTILISATION_PERIOD_ID = "5a9d65cd0ecb330045742be3";
16
+ export declare const BOOKING_ID = "5aa68870d4959e00447d6f87";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allthings/sdk",
3
- "version": "4.5.0",
3
+ "version": "4.8.1",
4
4
  "description": "",
5
5
  "author": "Allthings GmbH",
6
6
  "maintainers": [
@@ -48,7 +48,7 @@
48
48
  "dev": "tsc -w",
49
49
  "prepublishOnly": "npm run build",
50
50
  "prettier": "prettier --write",
51
- "security-check": "yarn audit",
51
+ "security-check": "yarn audit --groups dependencies --level high || test $? -lt 7",
52
52
  "upgrade-dependencies": "yarn upgrade-interactive --latest --exact",
53
53
  "semantic-release": "echo \"Setting npm unsafe-perm to true due to our Docker/Buildkite root permissions\" && npm set unsafe-perm true && semantic-release",
54
54
  "serve": "npx serve -l 3333",
@@ -57,36 +57,36 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "bottleneck": "2.19.5",
60
- "cross-fetch": "3.0.6",
61
- "query-string": "6.13.8"
60
+ "cross-fetch": "3.1.4",
61
+ "query-string": "6.14.1"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@allthings/tslint-preset": "2.0.0",
65
- "@commitlint/cli": "8.3.5",
66
- "@commitlint/config-conventional": "8.3.4",
65
+ "@commitlint/cli": "8.3.6",
66
+ "@commitlint/config-conventional": "8.3.6",
67
67
  "@types/form-data": "2.2.1",
68
- "@types/jest": "26.0.20",
69
- "@types/node": "10.17.28",
68
+ "@types/jest": "26.0.24",
69
+ "@types/node": "10.17.60",
70
70
  "@types/query-string": "6.2.0",
71
- "coveralls": "3.1.0",
72
- "form-data": "3.0.0",
73
- "husky": "4.2.5",
74
- "jest": "26.1.0",
75
- "lint-staged": "10.2.11",
76
- "nanoid": "3.1.20",
77
- "prettier": "2.0.5",
71
+ "coveralls": "3.1.1",
72
+ "form-data": "3.0.1",
73
+ "husky": "4.3.8",
74
+ "jest": "26.6.3",
75
+ "lint-staged": "10.5.4",
76
+ "nanoid": "3.1.30",
77
+ "prettier": "2.4.1",
78
78
  "rimraf": "3.0.2",
79
- "rollup": "2.23.0",
79
+ "rollup": "2.60.0",
80
80
  "rollup-plugin-commonjs": "10.1.0",
81
81
  "rollup-plugin-hashbang": "2.2.2",
82
82
  "rollup-plugin-json": "4.0.0",
83
83
  "rollup-plugin-node-resolve": "5.2.0",
84
84
  "rollup-plugin-replace": "2.2.0",
85
- "rollup-plugin-terser": "5.3.0",
86
- "semantic-release": "17.2.3",
87
- "ts-jest": "26.1.3",
85
+ "rollup-plugin-terser": "5.3.1",
86
+ "semantic-release": "17.4.7",
87
+ "ts-jest": "26.5.6",
88
88
  "tslint": "5.20.1",
89
- "typescript": "3.9.7"
89
+ "typescript": "4.3.5"
90
90
  },
91
91
  "prettier": {
92
92
  "printWidth": 80,
@@ -158,15 +158,5 @@
158
158
  "release": {
159
159
  "branch": "master",
160
160
  "repositoryUrl": "https://github.com/allthings/node-sdk.git"
161
- },
162
- "resolutions": {
163
- "lodash": ">=4.17.19",
164
- "minimist": ">=1.2.3",
165
- "serialize-javascript": ">=2.1.1",
166
- "set-value": ">=2.0.1",
167
- "yargs-parser": ">=13.1.2 <14.0.0 || >=15.0.1 <16.0.0 || >=18.1.2",
168
- "dot-prop": ">=4.2.1 <5.0.0 || >=5.1.1",
169
- "ini": ">1.3.6",
170
- "node-fetch": ">=2.6.1 <3.0.0-beta.1|| >= 3.0.0-beta.9"
171
161
  }
172
162
  }