@signalapp/libsignal-client 0.75.1 → 0.76.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/Native.d.ts CHANGED
@@ -136,7 +136,7 @@ type ChatListener = {
136
136
  ): void;
137
137
  };
138
138
 
139
- type RegistrationSessionRequestedInformation = 'pushChallenge' | 'captcha';
139
+ type ChallengeOption = 'pushChallenge' | 'captcha';
140
140
 
141
141
  type RegistrationPushTokenType = 'apn' | 'fcm';
142
142
 
@@ -482,7 +482,7 @@ export function RegistrationSession_GetAllowedToRequestCode(session: Wrapper<Reg
482
482
  export function RegistrationSession_GetNextCallSeconds(session: Wrapper<RegistrationSession>): number | null;
483
483
  export function RegistrationSession_GetNextSmsSeconds(session: Wrapper<RegistrationSession>): number | null;
484
484
  export function RegistrationSession_GetNextVerificationAttemptSeconds(session: Wrapper<RegistrationSession>): number | null;
485
- export function RegistrationSession_GetRequestedInformation(session: Wrapper<RegistrationSession>): RegistrationSessionRequestedInformation[];
485
+ export function RegistrationSession_GetRequestedInformation(session: Wrapper<RegistrationSession>): ChallengeOption[];
486
486
  export function RegistrationSession_GetVerified(session: Wrapper<RegistrationSession>): boolean;
487
487
  export function SanitizedMetadata_GetDataLen(sanitized: Wrapper<SanitizedMetadata>): bigint;
488
488
  export function SanitizedMetadata_GetDataOffset(sanitized: Wrapper<SanitizedMetadata>): bigint;
package/dist/Errors.d.ts CHANGED
@@ -31,18 +31,19 @@ export declare enum ErrorCode {
31
31
  InvalidEntropyDataLength = 27,
32
32
  InvalidUsernameLinkEncryptedData = 28,
33
33
  RateLimitedError = 29,
34
- SvrDataMissing = 30,
35
- SvrRequestFailed = 31,
36
- SvrRestoreFailed = 32,
37
- ChatServiceInactive = 33,
38
- AppExpired = 34,
39
- DeviceDelinked = 35,
40
- ConnectionInvalidated = 36,
41
- ConnectedElsewhere = 37,
42
- BackupValidation = 38,
43
- Cancelled = 39,
44
- KeyTransparencyError = 40,
45
- KeyTransparencyVerificationFailed = 41
34
+ RateLimitChallengeError = 30,
35
+ SvrDataMissing = 31,
36
+ SvrRequestFailed = 32,
37
+ SvrRestoreFailed = 33,
38
+ ChatServiceInactive = 34,
39
+ AppExpired = 35,
40
+ DeviceDelinked = 36,
41
+ ConnectionInvalidated = 37,
42
+ ConnectedElsewhere = 38,
43
+ BackupValidation = 39,
44
+ Cancelled = 40,
45
+ KeyTransparencyError = 41,
46
+ KeyTransparencyVerificationFailed = 42
46
47
  }
47
48
  export declare class LibSignalErrorBase extends Error {
48
49
  readonly code: ErrorCode;
@@ -155,6 +156,11 @@ export type RateLimitedError = LibSignalErrorBase & {
155
156
  code: ErrorCode.RateLimitedError;
156
157
  readonly retryAfterSecs: number;
157
158
  };
159
+ export type RateLimitChallengeError = LibSignalErrorBase & {
160
+ code: ErrorCode.RateLimitChallengeError;
161
+ readonly token: string;
162
+ readonly options: Set<'pushChallenge' | 'captcha'>;
163
+ };
158
164
  export type ChatServiceInactive = LibSignalErrorBase & {
159
165
  code: ErrorCode.ChatServiceInactive;
160
166
  };
@@ -193,4 +199,4 @@ export type KeyTransparencyError = LibSignalErrorCommon & {
193
199
  export type KeyTransparencyVerificationFailed = LibSignalErrorCommon & {
194
200
  code: ErrorCode.KeyTransparencyVerificationFailed;
195
201
  };
196
- export type LibSignalError = GenericError | DuplicatedMessageError | SealedSenderSelfSendError | UntrustedIdentityError | InvalidRegistrationIdError | InvalidProtocolAddress | VerificationFailedError | InvalidSessionError | InvalidSenderKeySessionError | NicknameCannotBeEmptyError | CannotStartWithDigitError | MissingSeparatorError | BadNicknameCharacterError | NicknameTooShortError | NicknameTooLongError | DiscriminatorCannotBeEmptyError | DiscriminatorCannotBeZeroError | DiscriminatorCannotBeSingleDigitError | DiscriminatorCannotHaveLeadingZerosError | BadDiscriminatorCharacterError | DiscriminatorTooLargeError | InputDataTooLong | InvalidEntropyDataLength | InvalidUsernameLinkEncryptedData | IoError | CdsiInvalidTokenError | InvalidUriError | InvalidMediaInputError | SvrDataMissingError | SvrRestoreFailedError | SvrRequestFailedError | UnsupportedMediaInputError | ChatServiceInactive | AppExpiredError | DeviceDelinkedError | ConnectionInvalidatedError | ConnectedElsewhereError | RateLimitedError | BackupValidationError | CancellationError | KeyTransparencyError | KeyTransparencyVerificationFailed;
202
+ export type LibSignalError = GenericError | DuplicatedMessageError | SealedSenderSelfSendError | UntrustedIdentityError | InvalidRegistrationIdError | InvalidProtocolAddress | VerificationFailedError | InvalidSessionError | InvalidSenderKeySessionError | NicknameCannotBeEmptyError | CannotStartWithDigitError | MissingSeparatorError | BadNicknameCharacterError | NicknameTooShortError | NicknameTooLongError | DiscriminatorCannotBeEmptyError | DiscriminatorCannotBeZeroError | DiscriminatorCannotBeSingleDigitError | DiscriminatorCannotHaveLeadingZerosError | BadDiscriminatorCharacterError | DiscriminatorTooLargeError | InputDataTooLong | InvalidEntropyDataLength | InvalidUsernameLinkEncryptedData | IoError | CdsiInvalidTokenError | InvalidUriError | InvalidMediaInputError | SvrDataMissingError | SvrRestoreFailedError | SvrRequestFailedError | UnsupportedMediaInputError | ChatServiceInactive | AppExpiredError | DeviceDelinkedError | ConnectionInvalidatedError | ConnectedElsewhereError | RateLimitedError | RateLimitChallengeError | BackupValidationError | CancellationError | KeyTransparencyError | KeyTransparencyVerificationFailed;
package/dist/Errors.js CHANGED
@@ -38,18 +38,19 @@ var ErrorCode;
38
38
  ErrorCode[ErrorCode["InvalidEntropyDataLength"] = 27] = "InvalidEntropyDataLength";
39
39
  ErrorCode[ErrorCode["InvalidUsernameLinkEncryptedData"] = 28] = "InvalidUsernameLinkEncryptedData";
40
40
  ErrorCode[ErrorCode["RateLimitedError"] = 29] = "RateLimitedError";
41
- ErrorCode[ErrorCode["SvrDataMissing"] = 30] = "SvrDataMissing";
42
- ErrorCode[ErrorCode["SvrRequestFailed"] = 31] = "SvrRequestFailed";
43
- ErrorCode[ErrorCode["SvrRestoreFailed"] = 32] = "SvrRestoreFailed";
44
- ErrorCode[ErrorCode["ChatServiceInactive"] = 33] = "ChatServiceInactive";
45
- ErrorCode[ErrorCode["AppExpired"] = 34] = "AppExpired";
46
- ErrorCode[ErrorCode["DeviceDelinked"] = 35] = "DeviceDelinked";
47
- ErrorCode[ErrorCode["ConnectionInvalidated"] = 36] = "ConnectionInvalidated";
48
- ErrorCode[ErrorCode["ConnectedElsewhere"] = 37] = "ConnectedElsewhere";
49
- ErrorCode[ErrorCode["BackupValidation"] = 38] = "BackupValidation";
50
- ErrorCode[ErrorCode["Cancelled"] = 39] = "Cancelled";
51
- ErrorCode[ErrorCode["KeyTransparencyError"] = 40] = "KeyTransparencyError";
52
- ErrorCode[ErrorCode["KeyTransparencyVerificationFailed"] = 41] = "KeyTransparencyVerificationFailed";
41
+ ErrorCode[ErrorCode["RateLimitChallengeError"] = 30] = "RateLimitChallengeError";
42
+ ErrorCode[ErrorCode["SvrDataMissing"] = 31] = "SvrDataMissing";
43
+ ErrorCode[ErrorCode["SvrRequestFailed"] = 32] = "SvrRequestFailed";
44
+ ErrorCode[ErrorCode["SvrRestoreFailed"] = 33] = "SvrRestoreFailed";
45
+ ErrorCode[ErrorCode["ChatServiceInactive"] = 34] = "ChatServiceInactive";
46
+ ErrorCode[ErrorCode["AppExpired"] = 35] = "AppExpired";
47
+ ErrorCode[ErrorCode["DeviceDelinked"] = 36] = "DeviceDelinked";
48
+ ErrorCode[ErrorCode["ConnectionInvalidated"] = 37] = "ConnectionInvalidated";
49
+ ErrorCode[ErrorCode["ConnectedElsewhere"] = 38] = "ConnectedElsewhere";
50
+ ErrorCode[ErrorCode["BackupValidation"] = 39] = "BackupValidation";
51
+ ErrorCode[ErrorCode["Cancelled"] = 40] = "Cancelled";
52
+ ErrorCode[ErrorCode["KeyTransparencyError"] = 41] = "KeyTransparencyError";
53
+ ErrorCode[ErrorCode["KeyTransparencyVerificationFailed"] = 42] = "KeyTransparencyVerificationFailed";
53
54
  })(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
54
55
  class LibSignalErrorBase extends Error {
55
56
  constructor(message, name, operation, extraProps) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/libsignal-client",
3
- "version": "0.75.1",
3
+ "version": "0.76.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",