@allthings/sdk 6.6.0 → 7.0.0

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.
@@ -1,4 +1,3 @@
1
- export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore, parameterStore, } from './aws';
2
1
  export { default as createTokenStore } from './oauth/createTokenStore';
3
2
  export { EnumCommunicationPreferenceChannel, EnumUnitObjectType, EnumUnitType, EnumUserPermissionObjectType, EnumUserPermissionRole, EnumUserRelationType, EnumUtilisationPeriodType, default as restClient, } from './rest';
4
3
  export { IApp } from './rest/methods/app';
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { EnumCommunicationMethodType, EnumInputChannel, IAllthingsRestClient } from '../types';
3
4
  export interface IConversation {
4
5
  readonly createdAt: string;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { IAllthingsRestClient } from '../types';
3
4
  export type FileResult = Promise<IFile>;
4
5
  interface IFileUrl {
@@ -12,8 +12,9 @@ export interface IGroup {
12
12
  }>;
13
13
  readonly billingPeriodEndDate: string;
14
14
  readonly billingPeriodStartDate: string;
15
- readonly description: string | null;
16
- readonly externalId: string | null;
15
+ readonly dataSource?: string;
16
+ readonly description?: string;
17
+ readonly externalId?: string;
17
18
  readonly id: string;
18
19
  readonly name: string;
19
20
  readonly propertyManagerId: string;
@@ -3,7 +3,8 @@ export interface IProperty {
3
3
  readonly _embedded: any;
4
4
  readonly billingPeriodEndDate: string;
5
5
  readonly billingPeriodStartDate: string;
6
- readonly externalId: string;
6
+ readonly dataSource?: string;
7
+ readonly externalId?: string;
7
8
  readonly id: string;
8
9
  readonly label: string;
9
10
  readonly name: string;
@@ -5,6 +5,7 @@ export interface IRegistrationCodeTenant {
5
5
  readonly phone?: string;
6
6
  }
7
7
  export interface IRegistrationCodeOptions {
8
+ readonly dataSource?: string;
8
9
  readonly externalId?: string;
9
10
  readonly instantTenantInviteActive?: boolean;
10
11
  readonly permanent?: boolean;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { IAllthingsRestClient } from '../types';
3
4
  import { IMessage } from './conversation';
4
5
  import { IFile } from './file';
@@ -78,6 +78,7 @@ export declare enum EnumUnitType {
78
78
  export interface IUnit {
79
79
  readonly billingPeriodEndDate: string;
80
80
  readonly billingPeriodStartDate: string;
81
+ readonly dataSource?: string;
81
82
  readonly externalId?: string;
82
83
  readonly id: string;
83
84
  readonly name: string;
@@ -16,6 +16,12 @@ export declare enum EnumCommunicationPreferenceChannel {
16
16
  push = "push",
17
17
  email = "email"
18
18
  }
19
+ export interface IExternalData {
20
+ dataSource: string;
21
+ externalId: string;
22
+ name?: string;
23
+ phoneNumber?: string;
24
+ }
19
25
  export interface IUser {
20
26
  readonly communicationPreferences: readonly {
21
27
  readonly channels: readonly EnumCommunicationPreferenceChannel[];
@@ -26,7 +32,9 @@ export interface IUser {
26
32
  readonly description: string;
27
33
  readonly email: string;
28
34
  readonly emailValidated: boolean;
35
+ readonly externalAgentsData: IExternalData[] | null;
29
36
  readonly externalId: string | null;
37
+ readonly externalTenantsData: IExternalData[] | null;
30
38
  readonly gender: EnumGender;
31
39
  readonly id: string;
32
40
  readonly inviteEmailSent: boolean;
@@ -11,8 +11,9 @@ export interface IUtilisationPeriod {
11
11
  readonly [key: string]: any;
12
12
  readonly invitations: readonly any[];
13
13
  };
14
+ readonly dataSource?: string;
14
15
  readonly endDate: string | null;
15
- readonly externalId: string | null;
16
+ readonly externalId?: string;
16
17
  readonly id: string;
17
18
  readonly invitations: readonly IUtilisationPeriodInvite[];
18
19
  readonly name: string;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { IAllthingsRestClient } from '..';
3
4
  import { IFile } from '../rest/methods/file';
4
5
  export declare const createManyFiles: (attachments: readonly {
@@ -5,6 +5,7 @@ export type CreateUserAndClientResult = Promise<{
5
5
  readonly client: IAllthingsRestClient;
6
6
  readonly user: IUser;
7
7
  }>;
8
+ export declare const generateId: () => string;
8
9
  export declare function createUserAndClient(): CreateUserAndClientResult;
9
10
  export declare function createUtilisationPeriod(): Promise<IUtilisationPeriod>;
10
11
  export declare function createUserWithUtilizationPeriod(): CreateUserAndClientResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allthings/sdk",
3
- "version": "6.6.0",
3
+ "version": "7.0.0",
4
4
  "description": "",
5
5
  "author": "Allthings GmbH",
6
6
  "keywords": [
@@ -52,7 +52,6 @@
52
52
  "test:authorization-code": "open http://localhost:3333/test/fixtures/authorization-code?clientId=$ALLTHINGS_OAUTH_CLIENT_ID&clientSecret=$ALLTHINGS_OAUTH_CLIENT_SECRET"
53
53
  },
54
54
  "dependencies": {
55
- "@aws-sdk/client-ssm": "3.654.0",
56
55
  "bottleneck": "2.19.5",
57
56
  "cross-fetch": "4.0.0",
58
57
  "query-string": "7.1.3"
@@ -61,27 +60,26 @@
61
60
  "@allthings/eslint-config": "1.1.0",
62
61
  "@commitlint/cli": "19.5.0",
63
62
  "@commitlint/config-conventional": "19.5.0",
64
- "@rollup/plugin-commonjs": "26.0.1",
63
+ "@rollup/plugin-commonjs": "28.0.1",
65
64
  "@rollup/plugin-json": "6.1.0",
66
- "@rollup/plugin-node-resolve": "15.2.3",
67
- "@rollup/plugin-replace": "5.0.7",
65
+ "@rollup/plugin-node-resolve": "15.3.0",
66
+ "@rollup/plugin-replace": "6.0.1",
68
67
  "@rollup/plugin-terser": "0.4.4",
69
- "@types/form-data": "2.5.0",
68
+ "@types/form-data": "2.5.2",
70
69
  "@types/jest": "26.0.24",
71
- "@types/node": "18.19.48",
70
+ "@types/node": "22.9.0",
72
71
  "@types/query-string": "6.3.0",
73
- "aws-sdk-client-mock": "4.0.1",
72
+ "aws-sdk-client-mock": "4.1.0",
74
73
  "coveralls": "3.1.1",
75
74
  "eslint": "8.57.1",
76
- "form-data": "4.0.0",
75
+ "form-data": "4.0.1",
77
76
  "husky": "9.1.6",
78
77
  "jest": "26.6.3",
79
78
  "jest-environment-jsdom": "26.6.2",
80
79
  "lint-staged": "15.2.10",
81
- "nanoid": "3.3.7",
82
80
  "prettier": "3.3.3",
83
81
  "rimraf": "5.0.10",
84
- "rollup": "4.22.4",
82
+ "rollup": "4.24.4",
85
83
  "rollup-plugin-hashbang": "2.2.2",
86
84
  "semantic-release": "19.0.5",
87
85
  "ts-jest": "26.5.6",
@@ -1,2 +0,0 @@
1
- import parameterStore, { DEFAULT_CLIENT_CONFIG as DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore } from './parameterStore';
2
- export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore, parameterStore, };
@@ -1,16 +0,0 @@
1
- import { SSMClient, SSMClientConfig } from '@aws-sdk/client-ssm';
2
- export interface IParameterStore {
3
- clientConfig?: SSMClientConfig;
4
- endpoint?: string;
5
- logger?: (message: string) => void;
6
- onlyDefault?: boolean;
7
- prefix?: string;
8
- }
9
- export declare const DEFAULT_CLIENT_CONFIG: IParameterStore;
10
- declare const getSecrets: (ssm: SSMClient, config: IParameterStore, params: string[], defaultValue: string) => Promise<string[]>;
11
- declare const getSecret: (ssm: SSMClient, config: IParameterStore, param: string, defaultValue: string) => Promise<string>;
12
- declare const parameterStore: (userConfig: IParameterStore) => {
13
- getSecret: (param: string, defaultValue?: string) => Promise<string>;
14
- getSecrets: (params: string[], defaultValue?: string) => Promise<string[]>;
15
- };
16
- export default parameterStore;
@@ -1 +0,0 @@
1
- export {};