@wireapp/api-client 27.81.0 → 27.83.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.
- package/lib/conversation/ConversationError.d.ts +5 -0
- package/lib/conversation/ConversationError.d.ts.map +1 -1
- package/lib/conversation/ConversationError.js +11 -1
- package/lib/http/BackendErrorLabel.d.ts +1 -0
- package/lib/http/BackendErrorLabel.d.ts.map +1 -1
- package/lib/http/BackendErrorLabel.js +1 -0
- package/lib/http/BackendErrorMapper.d.ts +2 -0
- package/lib/http/BackendErrorMapper.d.ts.map +1 -1
- package/lib/http/BackendErrorMapper.js +17 -0
- package/lib/team/search/TeamContact.d.ts +1 -1
- package/lib/team/search/TeamContact.d.ts.map +1 -1
- package/lib/user/User.d.ts +1 -0
- package/lib/user/User.d.ts.map +1 -1
- package/lib/userGroups/UserGroupSearchOptions.d.ts +1 -0
- package/lib/userGroups/UserGroupSearchOptions.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BackendError, BackendErrorLabel, StatusCode } from '../http/';
|
|
2
|
+
import { QualifiedId } from '../user';
|
|
2
3
|
export declare class ConversationError extends BackendError {
|
|
3
4
|
constructor(message: string, label: BackendErrorLabel, code: StatusCode);
|
|
4
5
|
}
|
|
@@ -26,4 +27,8 @@ export declare class MLSInvalidLeafNodeIndexError extends ConversationError {
|
|
|
26
27
|
export declare class MLSStaleMessageError extends ConversationError {
|
|
27
28
|
constructor(message: string, label?: BackendErrorLabel, code?: StatusCode);
|
|
28
29
|
}
|
|
30
|
+
export declare class MLSGroupOutOfSyncError extends ConversationError {
|
|
31
|
+
missing_users: QualifiedId[];
|
|
32
|
+
constructor(code: StatusCode | undefined, missingUsers: QualifiedId[] | undefined, message: string, label?: BackendErrorLabel);
|
|
33
|
+
}
|
|
29
34
|
//# sourceMappingURL=ConversationError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationError.d.ts","sourceRoot":"","sources":["../../src/conversation/ConversationError.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ConversationError.d.ts","sourceRoot":"","sources":["../../src/conversation/ConversationError.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEpC,qBAAa,iBAAkB,SAAQ,YAAY;gBACrC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,UAAU;CAKxE;AAED,qBAAa,0BAA2B,SAAQ,iBAAiB;gBAE7D,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAkD,EACzD,IAAI,GAAE,UAAmC;CAM5C;AAED,qBAAa,0BAA2B,SAAQ,iBAAiB;gBAE7D,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAuD,EAC9D,IAAI,GAAE,UAAiC;CAM1C;AAED,qBAAa,wCAAyC,SAAQ,iBAAiB;gBAE3E,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAgE,EACvE,IAAI,GAAE,UAA2C;CAMpD;AAED,qBAAa,6BAA8B,SAAQ,iBAAiB;gBAEhE,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAA0D,EACjE,IAAI,GAAE,UAAiC;CAM1C;AAED,qBAAa,qBAAsB,SAAQ,iBAAiB;gBAExD,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAsD,EAC7D,IAAI,GAAE,UAAiC;CAM1C;AAED,qBAAa,gCAAiC,SAAQ,iBAAiB;gBAEnE,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAqE,EAC5E,IAAI,GAAE,UAAmC;CAM5C;AAED,qBAAa,4BAA6B,SAAQ,iBAAiB;gBAE/D,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAiE,EACxE,IAAI,GAAE,UAAmC;CAM5C;AAED,qBAAa,oBAAqB,SAAQ,iBAAiB;gBAEvD,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAuD,EAC9D,IAAI,GAAE,UAAgC;CAMzC;AAED,qBAAa,sBAAuB,SAAQ,iBAAiB;IACpD,aAAa,EAAE,WAAW,EAAE,CAAC;gBAGlC,IAAI,EAAE,UAAU,YAAsB,EACtC,YAAY,EAAE,WAAW,EAAE,YAAK,EAChC,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAA2D;CAOrE"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.MLSStaleMessageError = exports.MLSInvalidLeafNodeIndexError = exports.MLSInvalidLeafNodeSignatureError = exports.ConversationFullError = exports.ConversationCodeNotFoundError = exports.ConversationLegalholdMissingConsentError = exports.ConversationOperationError = exports.ConversationIsUnknownError = exports.ConversationError = void 0;
|
|
21
|
+
exports.MLSGroupOutOfSyncError = exports.MLSStaleMessageError = exports.MLSInvalidLeafNodeIndexError = exports.MLSInvalidLeafNodeSignatureError = exports.ConversationFullError = exports.ConversationCodeNotFoundError = exports.ConversationLegalholdMissingConsentError = exports.ConversationOperationError = exports.ConversationIsUnknownError = exports.ConversationError = void 0;
|
|
22
22
|
const http_1 = require("../http/");
|
|
23
23
|
class ConversationError extends http_1.BackendError {
|
|
24
24
|
constructor(message, label, code) {
|
|
@@ -92,3 +92,13 @@ class MLSStaleMessageError extends ConversationError {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
exports.MLSStaleMessageError = MLSStaleMessageError;
|
|
95
|
+
class MLSGroupOutOfSyncError extends ConversationError {
|
|
96
|
+
missing_users;
|
|
97
|
+
constructor(code = http_1.StatusCode.CONFLICT, missingUsers = [], message, label = http_1.BackendErrorLabel.MLS_GROUP_OUT_OF_SYNC) {
|
|
98
|
+
super(message, label, code);
|
|
99
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
100
|
+
this.name = 'MLSGroupOutOfSyncError';
|
|
101
|
+
this.missing_users = missingUsers;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.MLSGroupOutOfSyncError = MLSGroupOutOfSyncError;
|
|
@@ -41,6 +41,7 @@ export declare enum BackendErrorLabel {
|
|
|
41
41
|
NOT_CONNECTED = "not-connected",
|
|
42
42
|
INVALID_CONVERSATION_PASSWORD = "invalid-conversation-password",
|
|
43
43
|
MLS_STALE_MESSAGE = "mls-stale-message",
|
|
44
|
+
MLS_GROUP_OUT_OF_SYNC = "mls-group-out-of-sync",
|
|
44
45
|
MLS_INVALID_LEAF_NODE_SIGNATURE = "mls-invalid-leaf-node-signature",
|
|
45
46
|
MLS_INVALID_LEAF_NODE_INDEX = "mls-invalid-leaf-node-index",
|
|
46
47
|
HANDLE_EXISTS = "handle-exists",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendErrorLabel.d.ts","sourceRoot":"","sources":["../../src/http/BackendErrorLabel.ts"],"names":[],"mappings":"AAmBA;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,wBAAwB,6BAA6B;IACrD,cAAc,mBAAmB;IACjC,iBAAiB,eAAe;IAChC,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,SAAS,cAAc;IACvB,gBAAgB,qBAAqB;IACrC,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAG7B,iBAAiB,sBAAsB;IACvC,+BAA+B,oCAAoC;IACnE,YAAY,iBAAiB;IAC7B,mBAAmB,wBAAwB;IAC3C,aAAa,kBAAkB;IAC/B,uBAAuB,4BAA4B;IACnD,UAAU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,oBAAY,mBAAmB;IAC7B,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,eAAe,sBAAsB;IACrC,wBAAwB,6BAA6B;IACrD,oBAAoB,yBAAyB;IAC7C,yBAAyB,8BAA8B;IACvD,OAAO,kBAAkB;IACzB,iBAAiB,sBAAsB;IACvC,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;CAC1C"}
|
|
@@ -66,6 +66,7 @@ var BackendErrorLabel;
|
|
|
66
66
|
BackendErrorLabel["NOT_CONNECTED"] = "not-connected";
|
|
67
67
|
BackendErrorLabel["INVALID_CONVERSATION_PASSWORD"] = "invalid-conversation-password";
|
|
68
68
|
BackendErrorLabel["MLS_STALE_MESSAGE"] = "mls-stale-message";
|
|
69
|
+
BackendErrorLabel["MLS_GROUP_OUT_OF_SYNC"] = "mls-group-out-of-sync";
|
|
69
70
|
BackendErrorLabel["MLS_INVALID_LEAF_NODE_SIGNATURE"] = "mls-invalid-leaf-node-signature";
|
|
70
71
|
BackendErrorLabel["MLS_INVALID_LEAF_NODE_INDEX"] = "mls-invalid-leaf-node-index";
|
|
71
72
|
// Handle errors
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StatusCodes as StatusCode } from 'http-status-codes';
|
|
2
|
+
import { MLSGroupOutOfSyncError } from '../conversation/';
|
|
2
3
|
import { BackendError, BackendErrorLabel } from './';
|
|
3
4
|
type BackendErrorWithLabel = BackendError & {
|
|
4
5
|
label: BackendErrorLabel;
|
|
@@ -17,6 +18,7 @@ export declare class BackendErrorMapper {
|
|
|
17
18
|
*/
|
|
18
19
|
private static messageVariantHandlers;
|
|
19
20
|
private static logUnmapped;
|
|
21
|
+
static isMlsGroupOutOfSyncError(error: BackendError): error is MLSGroupOutOfSyncError;
|
|
20
22
|
static map(error: BackendError): BackendError;
|
|
21
23
|
}
|
|
22
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendErrorMapper.d.ts","sourceRoot":"","sources":["../../src/http/BackendErrorMapper.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"BackendErrorMapper.d.ts","sourceRoot":"","sources":["../../src/http/BackendErrorMapper.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAc5D,OAAO,EAGL,sBAAsB,EAIvB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,IAAI,CAAC;AAEnD,KAAK,qBAAqB,GAAG,YAAY,GAAG;IAAC,KAAK,EAAE,iBAAiB,CAAA;CAAC,CAAC;AACvE,KAAK,YAAY,GAAG,CAAC,CAAC,EAAE,qBAAqB,KAAK,YAAY,CAAC;AAG/D,KAAK,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC,CAAC;AAE/E,KAAK,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC;AAQhF,qBAAa,kBAAkB;IAC7B;;OAEG;IACH,OAAc,eAAe,EAAE,oBAAoB,CAmDjD;IAEF;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB,CA6CnC;IAEF,OAAO,CAAC,MAAM,CAAC,WAAW;WAWZ,wBAAwB,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,IAAI,sBAAsB;WAQ9E,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY;CAyBrD"}
|
|
@@ -20,11 +20,13 @@
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.BackendErrorMapper = void 0;
|
|
22
22
|
const http_status_codes_1 = require("http-status-codes");
|
|
23
|
+
const commons_1 = require("@wireapp/commons");
|
|
23
24
|
const auth_1 = require("../auth/");
|
|
24
25
|
const conversation_1 = require("../conversation/");
|
|
25
26
|
const team_1 = require("../team/");
|
|
26
27
|
const user_1 = require("../user/");
|
|
27
28
|
const _1 = require("./");
|
|
29
|
+
const logger = commons_1.LogFactory.getLogger('@wireapp/api-client/http/BackendErrorMapper');
|
|
28
30
|
class BackendErrorMapper {
|
|
29
31
|
/**
|
|
30
32
|
* Baseline/default handler for each (code, label). Used when no message variant matches.
|
|
@@ -50,6 +52,13 @@ class BackendErrorMapper {
|
|
|
50
52
|
[_1.BackendErrorLabel.INVITE_EMAIL_EXISTS]: e => new team_1.InviteEmailInUseError('The given e-mail address is in use.', e.label, e.code),
|
|
51
53
|
[_1.BackendErrorLabel.KEY_EXISTS]: e => new auth_1.IdentifierExistsError('The given e-mail address is in use.', e.label, e.code),
|
|
52
54
|
[_1.BackendErrorLabel.MLS_STALE_MESSAGE]: e => new conversation_1.MLSStaleMessageError('The conversation epoch in a message is too old', e.label, e.code),
|
|
55
|
+
[_1.BackendErrorLabel.MLS_GROUP_OUT_OF_SYNC]: error => {
|
|
56
|
+
if (BackendErrorMapper.isMlsGroupOutOfSyncError(error)) {
|
|
57
|
+
return new conversation_1.MLSGroupOutOfSyncError(error.code, error.missing_users, error.message);
|
|
58
|
+
}
|
|
59
|
+
logger.warn('Failed to detect missing_users field in MLSGroupOutOfSyncError, using empty array for missing_users', { error });
|
|
60
|
+
return new conversation_1.MLSGroupOutOfSyncError(error.code, [], error.message);
|
|
61
|
+
},
|
|
53
62
|
},
|
|
54
63
|
[http_status_codes_1.StatusCodes.NOT_FOUND]: {
|
|
55
64
|
[_1.BackendErrorLabel.NOT_FOUND]: e => new team_1.ServiceNotFoundError('Service not found', e.label, e.code),
|
|
@@ -100,10 +109,18 @@ class BackendErrorMapper {
|
|
|
100
109
|
});
|
|
101
110
|
}
|
|
102
111
|
}
|
|
112
|
+
static isMlsGroupOutOfSyncError(error) {
|
|
113
|
+
return (error.code === http_status_codes_1.StatusCodes.CONFLICT &&
|
|
114
|
+
error.label === _1.BackendErrorLabel.MLS_GROUP_OUT_OF_SYNC &&
|
|
115
|
+
'missing_users' in error);
|
|
116
|
+
}
|
|
103
117
|
static map(error) {
|
|
104
118
|
const code = Number(error.code);
|
|
105
119
|
const label = error.label;
|
|
106
120
|
const message = error.message ?? '';
|
|
121
|
+
if (BackendErrorMapper.isMlsGroupOutOfSyncError(error)) {
|
|
122
|
+
return new conversation_1.MLSGroupOutOfSyncError(error.code, error.missing_users, error.message);
|
|
123
|
+
}
|
|
107
124
|
// 1) Message-specific variant
|
|
108
125
|
const messageVariantHandler = BackendErrorMapper.messageVariantHandlers[code]?.[label]?.[message];
|
|
109
126
|
if (messageVariantHandler) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Role } from '..';
|
|
2
2
|
import { User, ManagedSource } from '../../user/';
|
|
3
|
-
export type TeamContact = Pick<User, 'id' | 'email' | 'accent_id' | 'handle' | 'name' | 'team' | 'searchable'> & {
|
|
3
|
+
export type TeamContact = Pick<User, 'id' | 'email' | 'accent_id' | 'handle' | 'name' | 'team' | 'searchable' | 'user_groups'> & {
|
|
4
4
|
/** Timestamp of invitation creation. */
|
|
5
5
|
created_at?: string;
|
|
6
6
|
email_unvalidated: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamContact.d.ts","sourceRoot":"","sources":["../../../src/team/search/TeamContact.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AACxB,OAAO,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,WAAW,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"TeamContact.d.ts","sourceRoot":"","sources":["../../../src/team/search/TeamContact.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AACxB,OAAO,EAAC,IAAI,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,IAAI,EACJ,IAAI,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,aAAa,CACzF,GAAG;IACF,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
package/lib/user/User.d.ts
CHANGED
package/lib/user/User.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../src/user/User.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAC,oBAAoB,EAAE,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AACjC,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,MAAM,WAAW,IAAI;IACnB,SAAS,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC;IACtC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAC9C"}
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../src/user/User.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAC,oBAAoB,EAAE,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AACjC,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,MAAM,WAAW,IAAI;IACnB,SAAS,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC;IACtC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserGroupSearchOptions.d.ts","sourceRoot":"","sources":["../../src/userGroups/UserGroupSearchOptions.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAChC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"UserGroupSearchOptions.d.ts","sourceRoot":"","sources":["../../src/userGroups/UserGroupSearchOptions.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAChC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC"}
|
package/package.json
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@aws-sdk/client-s3": "3.908.0",
|
|
17
17
|
"@aws-sdk/lib-storage": "3.908.0",
|
|
18
|
-
"@wireapp/commons": "^5.4.
|
|
19
|
-
"@wireapp/priority-queue": "^2.1.
|
|
18
|
+
"@wireapp/commons": "^5.4.9",
|
|
19
|
+
"@wireapp/priority-queue": "^2.1.16",
|
|
20
20
|
"@wireapp/protocol-messaging": "1.53.0",
|
|
21
21
|
"axios": "1.12.2",
|
|
22
22
|
"axios-retry": "4.5.0",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@types/spark-md5": "3.0.5",
|
|
42
42
|
"@types/tough-cookie": "4.0.5",
|
|
43
43
|
"@types/ws": "8.5.14",
|
|
44
|
-
"@wireapp/store-engine": "^5.1.
|
|
45
|
-
"@wireapp/store-engine-fs": "^3.1.
|
|
44
|
+
"@wireapp/store-engine": "^5.1.16",
|
|
45
|
+
"@wireapp/store-engine-fs": "^3.1.18",
|
|
46
46
|
"browser-sync": "3.0.4",
|
|
47
47
|
"concurrently": "9.2.1",
|
|
48
48
|
"cross-env": "10.1.0",
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"watch": "webpack serve --config webpack.browser.js",
|
|
71
71
|
"prepare": "yarn dist"
|
|
72
72
|
},
|
|
73
|
-
"version": "27.
|
|
74
|
-
"gitHead": "
|
|
73
|
+
"version": "27.83.0",
|
|
74
|
+
"gitHead": "5e0809cae872c8f565e8ddbd08cd02c77575755c"
|
|
75
75
|
}
|