@wildix/xbees-users-client 4.3.0 → 4.3.3-wms28830.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.
@@ -53,6 +53,34 @@ const defaultUsersHttpAuthSchemeProvider = (authParameters) => {
53
53
  break;
54
54
  }
55
55
  ;
56
+ case "GetAccount":
57
+ {
58
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
59
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
60
+ break;
61
+ }
62
+ ;
63
+ case "LinkIdentity":
64
+ {
65
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
66
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
67
+ break;
68
+ }
69
+ ;
70
+ case "ListIdentities":
71
+ {
72
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
73
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
74
+ break;
75
+ }
76
+ ;
77
+ case "ListWorkspaces":
78
+ {
79
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
80
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
81
+ break;
82
+ }
83
+ ;
56
84
  case "ResetUserChatHistory":
57
85
  {
58
86
  options.push(createWildixAuthPbxHttpAuthOption(authParameters));
@@ -83,12 +111,40 @@ const defaultUsersHttpAuthSchemeProvider = (authParameters) => {
83
111
  break;
84
112
  }
85
113
  ;
114
+ case "UnlinkIdentity":
115
+ {
116
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
117
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
118
+ break;
119
+ }
120
+ ;
121
+ case "UnlinkWorkspace":
122
+ {
123
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
124
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
125
+ break;
126
+ }
127
+ ;
128
+ case "UpdateAccount":
129
+ {
130
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
131
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
132
+ break;
133
+ }
134
+ ;
86
135
  case "UpdateWorkspace":
87
136
  {
88
137
  options.push(createWildixAuthS2sHttpAuthOption(authParameters));
89
138
  break;
90
139
  }
91
140
  ;
141
+ case "VerifyIdentity":
142
+ {
143
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
144
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
145
+ break;
146
+ }
147
+ ;
92
148
  default: {
93
149
  options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters));
94
150
  options.push(createWildixAuthS2sHttpAuthOption(authParameters));
@@ -1061,8 +1061,8 @@ exports.QueryColleaguesParameters$ = [3, n3, _QCP,
1061
1061
  ];
1062
1062
  exports.QueryUserInput$ = [3, n3, _QUI,
1063
1063
  0,
1064
- [_q, _pre],
1065
- [() => exports.UserQuery$, () => exports.UserQueryPredicate$], 1
1064
+ [_q, _cIo, _pre],
1065
+ [() => exports.UserQuery$, [0, { [_hQ]: _co }], () => exports.UserQueryPredicate$], 1
1066
1066
  ];
1067
1067
  exports.QueryUserOutput$ = [3, n3, _QUO,
1068
1068
  0,
@@ -1071,8 +1071,8 @@ exports.QueryUserOutput$ = [3, n3, _QUO,
1071
1071
  ];
1072
1072
  exports.QueryUsersInput$ = [3, n3, _QUIu,
1073
1073
  0,
1074
- [_qu, _pre],
1075
- [() => UsersQueryList, () => exports.UserQueryPredicate$], 1
1074
+ [_qu, _cIo, _pre],
1075
+ [() => UsersQueryList, [0, { [_hQ]: _co }], () => exports.UserQueryPredicate$], 1
1076
1076
  ];
1077
1077
  exports.QueryUsersOutput$ = [3, n3, _QUOu,
1078
1078
  0,
@@ -49,6 +49,34 @@ export const defaultUsersHttpAuthSchemeProvider = (authParameters) => {
49
49
  break;
50
50
  }
51
51
  ;
52
+ case "GetAccount":
53
+ {
54
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
55
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
56
+ break;
57
+ }
58
+ ;
59
+ case "LinkIdentity":
60
+ {
61
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
62
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
63
+ break;
64
+ }
65
+ ;
66
+ case "ListIdentities":
67
+ {
68
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
69
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
70
+ break;
71
+ }
72
+ ;
73
+ case "ListWorkspaces":
74
+ {
75
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
76
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
77
+ break;
78
+ }
79
+ ;
52
80
  case "ResetUserChatHistory":
53
81
  {
54
82
  options.push(createWildixAuthPbxHttpAuthOption(authParameters));
@@ -79,12 +107,40 @@ export const defaultUsersHttpAuthSchemeProvider = (authParameters) => {
79
107
  break;
80
108
  }
81
109
  ;
110
+ case "UnlinkIdentity":
111
+ {
112
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
113
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
114
+ break;
115
+ }
116
+ ;
117
+ case "UnlinkWorkspace":
118
+ {
119
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
120
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
121
+ break;
122
+ }
123
+ ;
124
+ case "UpdateAccount":
125
+ {
126
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
127
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
128
+ break;
129
+ }
130
+ ;
82
131
  case "UpdateWorkspace":
83
132
  {
84
133
  options.push(createWildixAuthS2sHttpAuthOption(authParameters));
85
134
  break;
86
135
  }
87
136
  ;
137
+ case "VerifyIdentity":
138
+ {
139
+ options.push(createWildixAuthS2sHttpAuthOption(authParameters));
140
+ options.push(createWildixAuthXbsHttpAuthOption(authParameters));
141
+ break;
142
+ }
143
+ ;
88
144
  default: {
89
145
  options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters));
90
146
  options.push(createWildixAuthS2sHttpAuthOption(authParameters));
@@ -1054,8 +1054,8 @@ export var QueryColleaguesParameters$ = [3, n3, _QCP,
1054
1054
  ];
1055
1055
  export var QueryUserInput$ = [3, n3, _QUI,
1056
1056
  0,
1057
- [_q, _pre],
1058
- [() => UserQuery$, () => UserQueryPredicate$], 1
1057
+ [_q, _cIo, _pre],
1058
+ [() => UserQuery$, [0, { [_hQ]: _co }], () => UserQueryPredicate$], 1
1059
1059
  ];
1060
1060
  export var QueryUserOutput$ = [3, n3, _QUO,
1061
1061
  0,
@@ -1064,8 +1064,8 @@ export var QueryUserOutput$ = [3, n3, _QUO,
1064
1064
  ];
1065
1065
  export var QueryUsersInput$ = [3, n3, _QUIu,
1066
1066
  0,
1067
- [_qu, _pre],
1068
- [() => UsersQueryList, () => UserQueryPredicate$], 1
1067
+ [_qu, _cIo, _pre],
1068
+ [() => UsersQueryList, [0, { [_hQ]: _co }], () => UserQueryPredicate$], 1
1069
1069
  ];
1070
1070
  export var QueryUsersOutput$ = [3, n3, _QUOu,
1071
1071
  0,
@@ -27,7 +27,7 @@ declare const GetAccountCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Retrieves the account.
30
+ * Retrieves the account. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -27,7 +27,7 @@ declare const LinkIdentityCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Adds a new identity (email or phone) to the account. Requires OTP verification for the new identity
30
+ * Adds a new identity (email or phone) to the account. Requires OTP verification for the new identity. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -27,7 +27,7 @@ declare const ListIdentitiesCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Lists all identities (login methods) for the current account.
30
+ * Lists all identities (login methods) for the current account. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -27,7 +27,7 @@ declare const ListWorkspacesCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Lists workspaces available to the account. Without limit, returns every workspace. With limit, returns one page of active work workspaces: query narrows that set by PBX domain before the page is sliced, offset skips into the filtered set, and each workspace includes pbxUser when a PBX record exists.
30
+ * Lists workspaces available to the account. Without limit, returns every workspace. With limit, returns one page of active work workspaces: query narrows that set by PBX domain before the page is sliced, offset skips into the filtered set, and each workspace includes pbxUser when a PBX record exists. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -37,6 +37,7 @@ declare const QueryUserCommand_base: {
37
37
  * const config = {}; // type is UsersClientConfig
38
38
  * const client = new UsersClient(config);
39
39
  * const input = { // QueryUserInput
40
+ * companyId: "STRING_VALUE",
40
41
  * query: { // UserQuery Union: only one key present
41
42
  * id: "STRING_VALUE",
42
43
  * email: "STRING_VALUE",
@@ -37,6 +37,7 @@ declare const QueryUsersCommand_base: {
37
37
  * const config = {}; // type is UsersClientConfig
38
38
  * const client = new UsersClient(config);
39
39
  * const input = { // QueryUsersInput
40
+ * companyId: "STRING_VALUE",
40
41
  * queries: [ // UsersQueryList // required
41
42
  * { // UserQuery Union: only one key present
42
43
  * id: "STRING_VALUE",
@@ -27,7 +27,7 @@ declare const UnlinkIdentityCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Removes a non-primary identity from the account. Requires step-up verification for the primary identity.
30
+ * Removes a non-primary identity from the account. Requires step-up verification for the primary identity. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -27,7 +27,7 @@ declare const UnlinkWorkspaceCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Removes the connection between the account and a workspace.
30
+ * Removes the connection between the account and a workspace. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -27,7 +27,7 @@ declare const UpdateAccountCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Updates the account. Allows changing default workspace and primary identity.
30
+ * Updates the account. Allows changing default workspace and primary identity. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -27,7 +27,7 @@ declare const VerifyIdentityCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Completes adding an identity by verifying the OTP sent to the new identity. Call after LinkIdentity.
30
+ * Completes adding an identity by verifying the OTP sent to the new identity. Call after LinkIdentity. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -105,7 +105,7 @@ export interface UserToInvite {
105
105
  */
106
106
  email?: string | undefined;
107
107
  /**
108
- * The phone number of the invited user. This phone number is used to create or find the user if an email address is not provided. On a customer messaging channel (see MessagingChannel) it is not a phone number at all: the caller passes the channel's own customer id, the Page Scoped ID on Messenger, so the identity key stays the one the supplier reports. A phone number allows up to 17 digits and a Page Scoped ID is 17, so there is no headroom left, and the Instagram scoped id has to be checked against the same limit. A WhatsApp user who hides the number is invited by the BSUID exactly as Meta spells it (see InviteePhone).
108
+ * The phone number of the invited user. This phone number is used to create or find the user if an email address is not provided. On Messenger and Instagram it is not a phone number at all: the caller passes the channel's own customer id, the Page Scoped ID on Messenger, so the identity key stays the one the supplier reports. On RCS it is the person's phone number. A phone number allows up to 17 digits and a Page Scoped ID is 17, so there is no headroom left, and the Instagram scoped id has to be checked against the same limit. A WhatsApp user who hides the number is invited by the BSUID exactly as Meta spells it (see InviteePhone).
109
109
  * @public
110
110
  */
111
111
  phone?: string | undefined;
@@ -256,7 +256,7 @@ export interface BatchGetUsersOutput {
256
256
  */
257
257
  export interface BatchGetUsersEmailNotificationsSettingsInput {
258
258
  /**
259
- * List of the unique identifier of the user
259
+ * The users to read, 1 to 500 ids. A PBX token or an API key gets the stored settings only of the users of its own company; any other id gets the default settings, as an unknown id does.
260
260
  * @public
261
261
  */
262
262
  usersIds: string[];
@@ -1870,6 +1870,11 @@ export declare namespace UserQuery {
1870
1870
  * @public
1871
1871
  */
1872
1872
  export interface QueryUserInput {
1873
+ /**
1874
+ * The unique identifier of the tenant when a service token is used. A user who has a workspace in this tenant is returned as that workspace instead of the default one. Other tokens use the tenant they were issued for.
1875
+ * @public
1876
+ */
1877
+ companyId?: string | undefined;
1873
1878
  query: UserQuery;
1874
1879
  /**
1875
1880
  * A condition that must be satisfied for the user query to be considered valid. If this predicate is not met, a UserQueryPredicateNotMetException will be thrown.
@@ -1887,6 +1892,11 @@ export interface QueryUserOutput {
1887
1892
  * @public
1888
1893
  */
1889
1894
  export interface QueryUsersInput {
1895
+ /**
1896
+ * The unique identifier of the tenant when a service token is used. A user who has a workspace in this tenant is returned as that workspace instead of the default one. Other tokens use the tenant they were issued for.
1897
+ * @public
1898
+ */
1899
+ companyId?: string | undefined;
1890
1900
  queries: UserQuery[];
1891
1901
  predicate?: UserQueryPredicate | undefined;
1892
1902
  }
@@ -1934,7 +1944,15 @@ export interface ResetUserChatHistoryInput {
1934
1944
  * @public
1935
1945
  */
1936
1946
  export interface ResetUserChatHistoryOutput {
1947
+ /**
1948
+ * The workspaces marked deleted. Empty when no workspace matched.
1949
+ * @public
1950
+ */
1937
1951
  deletedWorkspaceIds: string[];
1952
+ /**
1953
+ * The new workspaces, one for each account that lost a workspace. Empty when the user does not stay on the PBX or nothing was deleted.
1954
+ * @public
1955
+ */
1938
1956
  createdWorkspaceIds: string[];
1939
1957
  }
1940
1958
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/xbees-users-client",
3
3
  "description": "@wildix/xbees-users-client client",
4
- "version": "4.3.0",
4
+ "version": "4.3.3-wms28830.1",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -17,24 +17,24 @@
17
17
  "module": "./dist-es/index.js",
18
18
  "sideEffects": false,
19
19
  "dependencies": {
20
- "tslib": "^2.6.2",
21
20
  "@aws-crypto/sha256-browser": "5.2.0",
22
21
  "@aws-crypto/sha256-js": "5.2.0",
23
22
  "@aws-sdk/core": "^3.974.15",
24
23
  "@smithy/core": "^3.24.5",
25
24
  "@smithy/fetch-http-handler": "^5.4.5",
25
+ "@smithy/middleware-endpoint": "^4.7.2",
26
26
  "@smithy/node-http-handler": "^4.7.5",
27
27
  "@smithy/types": "^4.14.2",
28
28
  "@wildix/smithy-react-native": "^1.0.0",
29
- "@smithy/middleware-endpoint": "^4.7.2"
29
+ "tslib": "^2.6.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@tsconfig/node20": "20.1.8",
33
+ "@types/node": "^20.14.8",
33
34
  "concurrently": "7.0.0",
34
35
  "downlevel-dts": "0.10.1",
35
36
  "premove": "4.0.0",
36
- "typescript": "~5.8.3",
37
- "@types/node": "^20.14.8"
37
+ "typescript": "~5.8.3"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=20.0.0"