@textrp/briij-js-sdk 42.0.0 → 43.1.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/CHANGELOG.md +7 -4
- package/README.md +71 -0
- package/lib/@types/auth.d.ts +57 -2
- package/lib/@types/auth.d.ts.map +1 -1
- package/lib/@types/auth.js +2 -0
- package/lib/@types/auth.js.map +1 -1
- package/lib/@types/event.d.ts +3 -0
- package/lib/@types/event.d.ts.map +1 -1
- package/lib/@types/event.js.map +1 -1
- package/lib/@types/synapse.d.ts +64 -0
- package/lib/@types/synapse.d.ts.map +1 -1
- package/lib/@types/synapse.js.map +1 -1
- package/lib/briij.d.ts +2 -0
- package/lib/briij.d.ts.map +1 -1
- package/lib/briij.js +2 -0
- package/lib/briij.js.map +1 -1
- package/lib/client.d.ts +100 -7
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +469 -213
- package/lib/client.js.map +1 -1
- package/lib/wallet-recovery.d.ts +24 -0
- package/lib/wallet-recovery.d.ts.map +1 -0
- package/lib/wallet-recovery.js +256 -0
- package/lib/wallet-recovery.js.map +1 -0
- package/lib/xrpl/identity.d.ts +2 -1
- package/lib/xrpl/identity.d.ts.map +1 -1
- package/lib/xrpl/identity.js +70 -47
- package/lib/xrpl/identity.js.map +1 -1
- package/lib/xrpl/trust.d.ts +4 -2
- package/lib/xrpl/trust.d.ts.map +1 -1
- package/lib/xrpl/trust.js +31 -19
- package/lib/xrpl/trust.js.map +1 -1
- package/lib/xrpl/verification.js +17 -6
- package/lib/xrpl/verification.js.map +1 -1
- package/package.json +1 -1
- package/src/@types/auth.ts +61 -2
- package/src/@types/event.ts +3 -0
- package/src/@types/synapse.ts +77 -0
- package/src/briij.ts +2 -0
- package/src/client.ts +344 -46
- package/src/wallet-recovery.ts +327 -0
- package/src/xrpl/identity.ts +66 -39
- package/src/xrpl/trust.ts +35 -18
- package/src/xrpl/verification.ts +19 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
Changes in [
|
|
1
|
+
Changes in [43.1.0] (Unreleased - Briij JavaScript SDK)
|
|
2
2
|
==================================================================================================
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
BREAKING CHANGES
|
|
4
|
+
----------------
|
|
5
|
+
* Added XRPL wallet login and recovery envelope support in the SDK.
|
|
6
|
+
* Enhanced README with examples and documentation for new features, including wallet-backed encryption recovery.
|
|
7
|
+
* Introduced new types and methods in the client for mCredits management and admin features.
|
|
5
8
|
---
|
|
6
9
|
Changes in [42.0.0]
|
|
7
|
-
* **Xrpl/Xahau Auth**:
|
|
10
|
+
* **Xrpl/Xahau Auth**: Initial support for Xrpl/Xahau authentication, including API entry points and data structures.
|
|
8
11
|
* Added initial support for Xrpl/Xahau authentication, including API entry points and data structures. Further enhancements and stability improvements are expected.
|
|
9
12
|
* Migrated all documentation, file structures, and references from `Matrix` to `Briij` throughout the codebase.
|
|
10
13
|
* Updated package metadata: package is now called `briij-js-sdk`, primary entry point and typings renamed accordingly.
|
package/README.md
CHANGED
|
@@ -110,6 +110,77 @@ For `acceptVerification()`, configure either:
|
|
|
110
110
|
|
|
111
111
|
The SDK signs `NFTokenModify` via Xaman and emits Matrix verification events with the resulting transaction hash.
|
|
112
112
|
|
|
113
|
+
## XRPL wallet login and recovery envelope
|
|
114
|
+
|
|
115
|
+
The SDK supports the custom login type `io.briij.login.xrpl` with two-step challenge flow:
|
|
116
|
+
|
|
117
|
+
- `client.getXrplAuthChallenge({ address, network, preferred_localpart, username, display_name })`
|
|
118
|
+
- `client.completeXrplAuth({ session, address, signature, public_key, network, wallet_e2ee_recovery })`
|
|
119
|
+
|
|
120
|
+
For wallet-backed encryption recovery, the SDK exports:
|
|
121
|
+
|
|
122
|
+
- account-data constants:
|
|
123
|
+
- `WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE` (`org.textrp.wallet.e2ee_recovery.v1`)
|
|
124
|
+
- `WALLET_IDENTITY_ACCOUNT_DATA_TYPE` (`org.textrp.wallet.identity`)
|
|
125
|
+
- helper methods on `BriijClient`:
|
|
126
|
+
- `setWalletRecoveryEnvelope(envelope)`
|
|
127
|
+
- `getWalletRecoveryEnvelopeFromServer()`
|
|
128
|
+
- `getWalletIdentityFromServer()`
|
|
129
|
+
- chain-agnostic utilities in `wallet-recovery.ts`:
|
|
130
|
+
- `createDualWrapEnvelope(...)`
|
|
131
|
+
- `validateRecoveryEnvelopeShape(...)`
|
|
132
|
+
- `unwrapWithWallet(...)`
|
|
133
|
+
- `unwrapWithPassword(...)`
|
|
134
|
+
- `deriveWalletWrapKeyFromSecret(...)`
|
|
135
|
+
|
|
136
|
+
This is additive and does not alter core Olm/Megolm behavior.
|
|
137
|
+
|
|
138
|
+
### Example: XRPL two-step login with wallet recovery envelope
|
|
139
|
+
|
|
140
|
+
```javascript
|
|
141
|
+
import {
|
|
142
|
+
createClient,
|
|
143
|
+
createDualWrapEnvelope,
|
|
144
|
+
deriveWalletWrapKeyFromSecret,
|
|
145
|
+
} from "@textrp/briij-js-sdk";
|
|
146
|
+
|
|
147
|
+
const homeserver = "http://127.0.0.1:8008";
|
|
148
|
+
const network = "xrpl";
|
|
149
|
+
const address = "rYourClassicAddress";
|
|
150
|
+
const publicKey = "ED...";
|
|
151
|
+
const backupPassword = "your-backup-password";
|
|
152
|
+
const walletSecret = "wallet-secret-used-for-wrap-key";
|
|
153
|
+
|
|
154
|
+
const client = createClient({ baseUrl: homeserver });
|
|
155
|
+
const { session, challenge } = await client.getXrplAuthChallenge({
|
|
156
|
+
address,
|
|
157
|
+
network,
|
|
158
|
+
username: "alice_wallet",
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// Use your wallet integration for this step.
|
|
162
|
+
const signature = await signChallengeWithWallet(challenge);
|
|
163
|
+
|
|
164
|
+
const walletWrapKey = await deriveWalletWrapKeyFromSecret(walletSecret, "xrpl", address, homeserver);
|
|
165
|
+
const wallet_e2ee_recovery = await createDualWrapEnvelope({
|
|
166
|
+
chainId: "xrpl",
|
|
167
|
+
accountId: address,
|
|
168
|
+
backupPassword,
|
|
169
|
+
walletWrapKey,
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
await client.completeXrplAuth({
|
|
173
|
+
session,
|
|
174
|
+
address,
|
|
175
|
+
signature,
|
|
176
|
+
public_key: publicKey,
|
|
177
|
+
network,
|
|
178
|
+
wallet_e2ee_recovery,
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
There is a full Node example at `examples/node/xrpl-login-recovery.js`.
|
|
183
|
+
|
|
113
184
|
## Authenticated media
|
|
114
185
|
|
|
115
186
|
Servers supporting [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/pull/3916) (spec 1.11) will require clients, like
|
package/lib/@types/auth.d.ts
CHANGED
|
@@ -15,6 +15,12 @@ export interface ILoginFlowsResponse {
|
|
|
15
15
|
flows: LoginFlow[];
|
|
16
16
|
}
|
|
17
17
|
export declare const XRPL_WALLET_LOGIN_TYPE = "io.briij.login.xrpl";
|
|
18
|
+
export declare const WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.e2ee_recovery.v1";
|
|
19
|
+
export declare const WALLET_IDENTITY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.identity";
|
|
20
|
+
export type KnownXrplAlgorithm = "secp256k1" | "ed25519";
|
|
21
|
+
export type XrplAlgorithm = KnownXrplAlgorithm | (string & {
|
|
22
|
+
__brand?: "XrplAlgorithm";
|
|
23
|
+
});
|
|
18
24
|
export type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;
|
|
19
25
|
export interface ILoginFlow {
|
|
20
26
|
type: string;
|
|
@@ -158,15 +164,64 @@ export interface LoginRequest {
|
|
|
158
164
|
}
|
|
159
165
|
export type ILoginParams = LoginRequest;
|
|
160
166
|
export interface XrplWalletChallengePayload {
|
|
167
|
+
session?: string;
|
|
161
168
|
nonce: string;
|
|
162
169
|
timestamp: number | string;
|
|
163
170
|
message: string;
|
|
164
171
|
public_key: string;
|
|
165
|
-
algorithm?:
|
|
172
|
+
algorithm?: XrplAlgorithm;
|
|
173
|
+
}
|
|
174
|
+
export interface XrplAuthChallengeRequest extends Omit<LoginRequest, "type"> {
|
|
175
|
+
type: typeof XRPL_WALLET_LOGIN_TYPE;
|
|
176
|
+
address: string;
|
|
177
|
+
network: string;
|
|
178
|
+
preferred_localpart?: string;
|
|
179
|
+
username?: string;
|
|
180
|
+
display_name?: string;
|
|
181
|
+
}
|
|
182
|
+
export interface XrplAuthChallengeResponse {
|
|
183
|
+
session: string;
|
|
184
|
+
challenge: string;
|
|
185
|
+
}
|
|
186
|
+
export interface XrplAuthCompleteRequest extends Omit<LoginRequest, "type"> {
|
|
187
|
+
type: typeof XRPL_WALLET_LOGIN_TYPE;
|
|
188
|
+
session: string;
|
|
189
|
+
address: string;
|
|
190
|
+
signature: string;
|
|
191
|
+
public_key?: string;
|
|
192
|
+
network?: string;
|
|
193
|
+
wallet_e2ee_recovery?: WalletE2eeRecoveryEnvelope;
|
|
194
|
+
}
|
|
195
|
+
export interface WalletRecoveryWrap {
|
|
196
|
+
alg: string;
|
|
197
|
+
kdf: string;
|
|
198
|
+
salt: string;
|
|
199
|
+
nonce: string;
|
|
200
|
+
ciphertext: string;
|
|
201
|
+
aad?: string;
|
|
202
|
+
params?: Record<string, unknown>;
|
|
203
|
+
}
|
|
204
|
+
export interface WalletRecoveryPasswordWrap extends WalletRecoveryWrap {
|
|
205
|
+
}
|
|
206
|
+
export interface WalletE2eeRecoveryEnvelope {
|
|
207
|
+
envelope_version: number;
|
|
208
|
+
chain_id: string;
|
|
209
|
+
account_id: string;
|
|
210
|
+
created_at_ms: number;
|
|
211
|
+
key_id: string;
|
|
212
|
+
wallet_wrap: WalletRecoveryWrap;
|
|
213
|
+
password_wrap: WalletRecoveryPasswordWrap;
|
|
214
|
+
}
|
|
215
|
+
export interface WalletIdentityAccountData {
|
|
216
|
+
chain_id: string;
|
|
217
|
+
account_id: string;
|
|
218
|
+
public_key?: string | null;
|
|
219
|
+
network?: string | null;
|
|
220
|
+
key_type?: string | null;
|
|
166
221
|
}
|
|
167
222
|
export interface XrplWalletLoginRequest extends Omit<LoginRequest, "type"> {
|
|
168
223
|
type: typeof XRPL_WALLET_LOGIN_TYPE;
|
|
169
|
-
|
|
224
|
+
address: string;
|
|
170
225
|
signature: string;
|
|
171
226
|
challenge: string | XrplWalletChallengePayload;
|
|
172
227
|
network?: string;
|
package/lib/@types/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/@types/auth.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACzB;AAID;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,SAAS,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/@types/auth.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACzB;AAID;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,SAAS,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,sBAAsB,wB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AC,EAAE,gBAAgB,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACzB"}
|
package/lib/@types/auth.js
CHANGED
|
@@ -30,6 +30,8 @@ import { UnstableValue } from "../NamespacedValue.js";
|
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
export var XRPL_WALLET_LOGIN_TYPE = "io.briij.login.xrpl";
|
|
33
|
+
export var WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.e2ee_recovery.v1";
|
|
34
|
+
export var WALLET_IDENTITY_ACCOUNT_DATA_TYPE = "org.textrp.wallet.identity";
|
|
33
35
|
export var OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue("oauth_aware_preferred", "org.matrix.msc3824.delegated_oidc_compatibility");
|
|
34
36
|
|
|
35
37
|
/**
|
package/lib/@types/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","names":["UnstableValue","XRPL_WALLET_LOGIN_TYPE","OAUTH_AWARE_PREFERRED_FLOW_FIELD","DELEGATED_OIDC_COMPATIBILITY","IdentityProviderBrand","SSOAction"],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type IClientWellKnown } from \"../client.ts\";\n\n// disable lint because these are wire responses\n/* eslint-disable camelcase */\n\n/**\n * Represents a response to the CSAPI `/refresh` endpoint.\n */\nexport interface IRefreshTokenResponse {\n access_token: string;\n expires_in_ms: number;\n refresh_token: string;\n}\n\n/* eslint-enable camelcase */\n\n/**\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\n */\nexport interface ILoginFlowsResponse {\n flows: LoginFlow[];\n}\n\nexport const XRPL_WALLET_LOGIN_TYPE = \"io.briij.login.xrpl\";\n\nexport type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;\n\nexport interface ILoginFlow {\n type: string;\n}\n\nexport interface IPasswordFlow extends ILoginFlow {\n type: \"m.login.password\";\n}\n\nexport interface IXrplWalletLoginFlow extends ILoginFlow {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n}\n\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\n \"oauth_aware_preferred\",\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\n);\n\n/**\n * @alias\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\n */\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\n\n/**\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\n */\nexport interface ISSOFlow extends ILoginFlow {\n type: \"m.login.sso\" | \"m.login.cas\";\n // eslint-disable-next-line camelcase\n identity_providers?: IIdentityProvider[];\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\n}\n\nexport enum IdentityProviderBrand {\n Gitlab = \"gitlab\",\n Github = \"github\",\n Apple = \"apple\",\n Google = \"google\",\n Facebook = \"facebook\",\n Twitter = \"twitter\",\n}\n\nexport interface IIdentityProvider {\n id: string;\n name: string;\n icon?: string;\n brand?: IdentityProviderBrand | string;\n}\n\nexport enum SSOAction {\n /** The user intends to login to an existing account */\n LOGIN = \"login\",\n\n /** The user intends to register for a new account */\n REGISTER = \"register\",\n}\n\n/**\n * A client can identify a user using their Matrix ID.\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\n */\ntype UserLoginIdentifier = {\n type: \"m.id.user\";\n user: string;\n};\n\n/**\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\n * where the 3PID was previously associated using the /account/3pid API.\n * See the 3PID Types Appendix for a list of Third-party ID media.\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\n */\ntype ThirdPartyLoginIdentifier = {\n type: \"m.id.thirdparty\";\n medium: string;\n address: string;\n};\n\n/**\n * A client can identify a user using a phone number associated with the user’s account,\n * where the phone number was previously associated using the /account/3pid API.\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\n * If the client wishes to canonicalise the phone number,\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\n *\n * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.\n *\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\n */\ntype PhoneLoginIdentifier = {\n type: \"m.id.phone\";\n country: string;\n phone: string;\n};\n\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\n\n/**\n * User Identifiers usable for login & user-interactive authentication.\n *\n * Extensibly allows more than Matrix specified identifiers.\n */\nexport type UserIdentifier =\n | SpecUserIdentifier\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\n\n/**\n * Request body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginRequest {\n /**\n * The login type being used.\n */\n type: \"m.login.password\" | \"m.login.token\" | string;\n /**\n * ID of the client device.\n * If this does not correspond to a known client device, a new device will be created.\n * The given device ID must not be the same as a cross-signing key ID.\n * The server will auto-generate a device_id if this is not specified.\n */\n device_id?: string;\n /**\n * Identification information for a user\n */\n identifier?: UserIdentifier;\n /**\n * A display name to assign to the newly-created device.\n * Ignored if device_id corresponds to a known device.\n */\n initial_device_display_name?: string;\n /**\n * When logging in using a third-party identifier, the medium of the identifier.\n * Must be `email`.\n * @deprecated in favour of `identifier`.\n */\n medium?: \"email\";\n /**\n * Required when type is `m.login.password`. The user’s password.\n */\n password?: string;\n /**\n * If true, the client supports refresh tokens.\n */\n refresh_token?: boolean;\n /**\n * Required when type is `m.login.token`. Part of Token-based login.\n */\n token?: string;\n /**\n * The fully qualified user ID or just local part of the user ID, to log in.\n * @deprecated in favour of identifier.\n */\n user?: string;\n // Extensible\n [key: string]: any;\n}\n\n// Export for backwards compatibility\nexport type ILoginParams = LoginRequest;\n\nexport interface XrplWalletChallengePayload {\n nonce: string;\n timestamp: number | string;\n message: string;\n public_key: string;\n algorithm?: \"secp256k1\" | \"ed25519\" | string;\n}\n\nexport interface XrplWalletLoginRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n wallet_address: string;\n signature: string;\n challenge: string | XrplWalletChallengePayload;\n network?: string;\n}\n\n/**\n * Response body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginResponse {\n /**\n * An access token for the account.\n * This access token can then be used to authorize other requests.\n */\n access_token: string;\n /**\n * ID of the logged-in device.\n * Will be the same as the corresponding parameter in the request, if one was specified.\n */\n device_id: string;\n /**\n * The fully-qualified Matrix ID for the account.\n */\n user_id: string;\n /**\n * The lifetime of the access token, in milliseconds.\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\n * If not given, the client can assume that the access token will not expire.\n */\n expires_in_ms?: number;\n /**\n * A refresh token for the account.\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\n */\n refresh_token?: string;\n /**\n * Optional client configuration provided by the server.\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\n * This object takes the same form as the one returned from .well-known autodiscovery.\n */\n well_known?: IClientWellKnown;\n /**\n * The server_name of the homeserver on which the account has been registered.\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\n */\n home_server?: string;\n}\n\n/**\n * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token\n */\nexport interface LoginTokenPostResponse {\n /**\n * The token to use with `m.login.token` to authenticate.\n */\n login_token: string;\n /**\n * Expiration in milliseconds.\n */\n expires_in_ms: number;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAKA,OAAO,IAAMC,sBAAsB,GAAG,qBAAqB;AAgB3D,OAAO,IAAMC,gCAAgC,GAAG,IAAIF,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAMG,4BAA4B,GAAGD,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAYE,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAgBjC,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAIjB;EAJQA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AAmBA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"auth.js","names":["UnstableValue","XRPL_WALLET_LOGIN_TYPE","WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE","WALLET_IDENTITY_ACCOUNT_DATA_TYPE","OAUTH_AWARE_PREFERRED_FLOW_FIELD","DELEGATED_OIDC_COMPATIBILITY","IdentityProviderBrand","SSOAction"],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type IClientWellKnown } from \"../client.ts\";\n\n// disable lint because these are wire responses\n/* eslint-disable camelcase */\n\n/**\n * Represents a response to the CSAPI `/refresh` endpoint.\n */\nexport interface IRefreshTokenResponse {\n access_token: string;\n expires_in_ms: number;\n refresh_token: string;\n}\n\n/* eslint-enable camelcase */\n\n/**\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\n */\nexport interface ILoginFlowsResponse {\n flows: LoginFlow[];\n}\n\nexport const XRPL_WALLET_LOGIN_TYPE = \"io.briij.login.xrpl\";\nexport const WALLET_E2EE_RECOVERY_ACCOUNT_DATA_TYPE = \"org.textrp.wallet.e2ee_recovery.v1\";\nexport const WALLET_IDENTITY_ACCOUNT_DATA_TYPE = \"org.textrp.wallet.identity\";\nexport type KnownXrplAlgorithm = \"secp256k1\" | \"ed25519\";\nexport type XrplAlgorithm = KnownXrplAlgorithm | (string & { __brand?: \"XrplAlgorithm\" });\n\nexport type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;\n\nexport interface ILoginFlow {\n type: string;\n}\n\nexport interface IPasswordFlow extends ILoginFlow {\n type: \"m.login.password\";\n}\n\nexport interface IXrplWalletLoginFlow extends ILoginFlow {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n}\n\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\n \"oauth_aware_preferred\",\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\n);\n\n/**\n * @alias\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\n */\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\n\n/**\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\n */\nexport interface ISSOFlow extends ILoginFlow {\n type: \"m.login.sso\" | \"m.login.cas\";\n // eslint-disable-next-line camelcase\n identity_providers?: IIdentityProvider[];\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\n}\n\nexport enum IdentityProviderBrand {\n Gitlab = \"gitlab\",\n Github = \"github\",\n Apple = \"apple\",\n Google = \"google\",\n Facebook = \"facebook\",\n Twitter = \"twitter\",\n}\n\nexport interface IIdentityProvider {\n id: string;\n name: string;\n icon?: string;\n brand?: IdentityProviderBrand | string;\n}\n\nexport enum SSOAction {\n /** The user intends to login to an existing account */\n LOGIN = \"login\",\n\n /** The user intends to register for a new account */\n REGISTER = \"register\",\n}\n\n/**\n * A client can identify a user using their Matrix ID.\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\n */\ntype UserLoginIdentifier = {\n type: \"m.id.user\";\n user: string;\n};\n\n/**\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\n * where the 3PID was previously associated using the /account/3pid API.\n * See the 3PID Types Appendix for a list of Third-party ID media.\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\n */\ntype ThirdPartyLoginIdentifier = {\n type: \"m.id.thirdparty\";\n medium: string;\n address: string;\n};\n\n/**\n * A client can identify a user using a phone number associated with the user’s account,\n * where the phone number was previously associated using the /account/3pid API.\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\n * If the client wishes to canonicalise the phone number,\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\n *\n * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.\n *\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\n */\ntype PhoneLoginIdentifier = {\n type: \"m.id.phone\";\n country: string;\n phone: string;\n};\n\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\n\n/**\n * User Identifiers usable for login & user-interactive authentication.\n *\n * Extensibly allows more than Matrix specified identifiers.\n */\nexport type UserIdentifier =\n | SpecUserIdentifier\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\n\n/**\n * Request body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginRequest {\n /**\n * The login type being used.\n */\n type: \"m.login.password\" | \"m.login.token\" | string;\n /**\n * ID of the client device.\n * If this does not correspond to a known client device, a new device will be created.\n * The given device ID must not be the same as a cross-signing key ID.\n * The server will auto-generate a device_id if this is not specified.\n */\n device_id?: string;\n /**\n * Identification information for a user\n */\n identifier?: UserIdentifier;\n /**\n * A display name to assign to the newly-created device.\n * Ignored if device_id corresponds to a known device.\n */\n initial_device_display_name?: string;\n /**\n * When logging in using a third-party identifier, the medium of the identifier.\n * Must be `email`.\n * @deprecated in favour of `identifier`.\n */\n medium?: \"email\";\n /**\n * Required when type is `m.login.password`. The user’s password.\n */\n password?: string;\n /**\n * If true, the client supports refresh tokens.\n */\n refresh_token?: boolean;\n /**\n * Required when type is `m.login.token`. Part of Token-based login.\n */\n token?: string;\n /**\n * The fully qualified user ID or just local part of the user ID, to log in.\n * @deprecated in favour of identifier.\n */\n user?: string;\n // Extensible\n [key: string]: any;\n}\n\n// Export for backwards compatibility\nexport type ILoginParams = LoginRequest;\n\nexport interface XrplWalletChallengePayload {\n session?: string;\n nonce: string;\n timestamp: number | string;\n message: string;\n public_key: string;\n algorithm?: XrplAlgorithm;\n}\n\nexport interface XrplAuthChallengeRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n address: string;\n network: string;\n preferred_localpart?: string;\n username?: string;\n display_name?: string;\n}\n\nexport interface XrplAuthChallengeResponse {\n session: string;\n challenge: string;\n}\n\nexport interface XrplAuthCompleteRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n session: string;\n address: string;\n signature: string;\n public_key?: string;\n network?: string;\n wallet_e2ee_recovery?: WalletE2eeRecoveryEnvelope;\n}\n\nexport interface WalletRecoveryWrap {\n alg: string;\n kdf: string;\n salt: string;\n nonce: string;\n ciphertext: string;\n aad?: string;\n params?: Record<string, unknown>;\n}\n\nexport interface WalletRecoveryPasswordWrap extends WalletRecoveryWrap {}\n\nexport interface WalletE2eeRecoveryEnvelope {\n envelope_version: number;\n chain_id: string;\n account_id: string;\n created_at_ms: number;\n key_id: string;\n wallet_wrap: WalletRecoveryWrap;\n password_wrap: WalletRecoveryPasswordWrap;\n}\n\nexport interface WalletIdentityAccountData {\n chain_id: string;\n account_id: string;\n public_key?: string | null;\n network?: string | null;\n key_type?: string | null;\n}\n\nexport interface XrplWalletLoginRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n address: string;\n signature: string;\n challenge: string | XrplWalletChallengePayload;\n network?: string;\n}\n\n/**\n * Response body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginResponse {\n /**\n * An access token for the account.\n * This access token can then be used to authorize other requests.\n */\n access_token: string;\n /**\n * ID of the logged-in device.\n * Will be the same as the corresponding parameter in the request, if one was specified.\n */\n device_id: string;\n /**\n * The fully-qualified Matrix ID for the account.\n */\n user_id: string;\n /**\n * The lifetime of the access token, in milliseconds.\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\n * If not given, the client can assume that the access token will not expire.\n */\n expires_in_ms?: number;\n /**\n * A refresh token for the account.\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\n */\n refresh_token?: string;\n /**\n * Optional client configuration provided by the server.\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\n * This object takes the same form as the one returned from .well-known autodiscovery.\n */\n well_known?: IClientWellKnown;\n /**\n * The server_name of the homeserver on which the account has been registered.\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\n */\n home_server?: string;\n}\n\n/**\n * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token\n */\nexport interface LoginTokenPostResponse {\n /**\n * The token to use with `m.login.token` to authenticate.\n */\n login_token: string;\n /**\n * Expiration in milliseconds.\n */\n expires_in_ms: number;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAKA,OAAO,IAAMC,sBAAsB,GAAG,qBAAqB;AAC3D,OAAO,IAAMC,sCAAsC,GAAG,oCAAoC;AAC1F,OAAO,IAAMC,iCAAiC,GAAG,4BAA4B;AAkB7E,OAAO,IAAMC,gCAAgC,GAAG,IAAIJ,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAMK,4BAA4B,GAAGD,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAYE,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAgBjC,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAIjB;EAJQA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AA0EA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
|
package/lib/@types/event.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { type LocalNotificationSettings } from "./local_notifications.ts";
|
|
|
14
14
|
import { type IPushRules } from "./PushRules.ts";
|
|
15
15
|
import { type SecretInfo, type SecretStorageKeyDescription } from "../secret-storage.ts";
|
|
16
16
|
import { type POLICIES_ACCOUNT_EVENT_TYPE } from "../models/invites-ignorer-types.ts";
|
|
17
|
+
import { type WalletE2eeRecoveryEnvelope, type WalletIdentityAccountData } from "./auth.ts";
|
|
17
18
|
export declare enum EventType {
|
|
18
19
|
RoomCanonicalAlias = "m.room.canonical_alias",
|
|
19
20
|
RoomCreate = "m.room.create",
|
|
@@ -363,6 +364,8 @@ export interface AccountDataEvents extends SecretStorageAccountDataEvents {
|
|
|
363
364
|
[EventType.InvitePermissionConfig]: {
|
|
364
365
|
default_action?: string;
|
|
365
366
|
};
|
|
367
|
+
"org.textrp.wallet.e2ee_recovery.v1": WalletE2eeRecoveryEnvelope;
|
|
368
|
+
"org.textrp.wallet.identity": WalletIdentityAccountData;
|
|
366
369
|
}
|
|
367
370
|
/**
|
|
368
371
|
* Subset of AccountDataEvents, excluding events specified in https://spec.matrix.org/v1.17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AC,iBAAiB,EAAE,cAAc,GAAG,cAAc,CAAC,CAAC;AAEpG;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC3C,oBAAoB,EAAE,UAAU,CAAC;IACjC,wBAAwB,EAAE,UAAU,CAAC;IACrC,8BAA8B,EAAE,UAAU,CAAC;IAC3C,8BAA8B,EAAE,UAAU,CAAC;IAC3C,oBAAoB,EAAE,UAAU,CAAC;CACpC"}
|
package/lib/@types/event.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.js","names":["NamespacedValue","UnstableValue","EventType","RelationType","MsgType","RoomCreateTypeField","RoomType","ToDeviceMessageId","UNSTABLE_MSC3088_PURPOSE","UNSTABLE_MSC3088_ENABLED","UNSTABLE_MSC3089_TREE_SUBTYPE","UNSTABLE_MSC3089_LEAF","UNSTABLE_MSC3089_BRANCH","UNSTABLE_MSC2716_MARKER","MSC3912_RELATION_BASED_REDACTIONS_PROP","UNSTABLE_ELEMENT_FUNCTIONAL_USERS","EVENT_VISIBILITY_CHANGE_TYPE","PUSHER_ENABLED","PUSHER_DEVICE_ID","LOCAL_NOTIFICATION_SETTINGS_PREFIX","UNSIGNED_THREAD_ID_FIELD","UNSIGNED_MEMBERSHIP_FIELD"],"sources":["../../src/@types/event.ts"],"sourcesContent":["/*\nCopyright 2020-2026 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type EitherAnd } from \"matrix-events-sdk\";\n\nimport { NamespacedValue, UnstableValue } from \"../NamespacedValue.ts\";\nimport {\n type PolicyRuleEventContent,\n type RoomAvatarEventContent,\n type RoomCanonicalAliasEventContent,\n type RoomCreateEventContent,\n type RoomEncryptionEventContent,\n type RoomGuestAccessEventContent,\n type RoomHistoryVisibilityEventContent,\n type RoomJoinRulesEventContent,\n type RoomMemberEventContent,\n type RoomNameEventContent,\n type RoomPinnedEventsEventContent,\n type RoomPolicyContent,\n type RoomPowerLevelsEventContent,\n type RoomServerAclEventContent,\n type RoomThirdPartyInviteEventContent,\n type RoomTombstoneEventContent,\n type RoomTopicEventContent,\n type SpaceChildEventContent,\n type SpaceParentEventContent,\n} from \"./state_events.ts\";\nimport { type IGroupCallRoomMemberState, type IGroupCallRoomState } from \"../webrtc/groupCall.ts\";\nimport { type MSC3089EventContent } from \"../models/MSC3089Branch.ts\";\nimport { type M_BEACON, type M_BEACON_INFO, type MBeaconEventContent, type MBeaconInfoEventContent } from \"./beacon.ts\";\nimport { type EmptyObject } from \"./common.ts\";\nimport { type ReactionEventContent, type RoomMessageEventContent, type StickerEventContent } from \"./events.ts\";\nimport {\n type MCallAnswer,\n type MCallBase,\n type MCallCandidates,\n type MCallHangupReject,\n type MCallInviteNegotiate,\n type MCallReplacesEvent,\n type MCallSelectAnswer,\n type SDPStreamMetadata,\n} from \"../webrtc/callEventTypes.ts\";\nimport {\n type IRTCNotificationContent,\n type IRTCDeclineContent,\n type EncryptionKeysEventContent,\n type ICallNotifyContent,\n} from \"../matrixrtc/types.ts\";\nimport { type M_POLL_END, type M_POLL_START, type PollEndEventContent, type PollStartEventContent } from \"./polls.ts\";\nimport { type RtcMembershipData, type SessionMembershipData } from \"../matrixrtc/membershipData/index.ts\";\nimport { type LocalNotificationSettings } from \"./local_notifications.ts\";\nimport { type IPushRules } from \"./PushRules.ts\";\nimport { type SecretInfo, type SecretStorageKeyDescription } from \"../secret-storage.ts\";\nimport { type POLICIES_ACCOUNT_EVENT_TYPE } from \"../models/invites-ignorer-types.ts\";\n\nexport enum EventType {\n // Room state events\n RoomCanonicalAlias = \"m.room.canonical_alias\",\n RoomCreate = \"m.room.create\",\n RoomJoinRules = \"m.room.join_rules\",\n RoomMember = \"m.room.member\",\n RoomThirdPartyInvite = \"m.room.third_party_invite\",\n RoomPowerLevels = \"m.room.power_levels\",\n RoomName = \"m.room.name\",\n RoomTopic = \"m.room.topic\",\n RoomAvatar = \"m.room.avatar\",\n RoomPinnedEvents = \"m.room.pinned_events\",\n RoomEncryption = \"m.room.encryption\",\n RoomHistoryVisibility = \"m.room.history_visibility\",\n RoomGuestAccess = \"m.room.guest_access\",\n RoomServerAcl = \"m.room.server_acl\",\n RoomTombstone = \"m.room.tombstone\",\n RoomPredecessor = \"org.matrix.msc3946.room_predecessor\",\n\n // Moderation policy lists\n PolicyRuleUser = \"m.policy.rule.user\",\n PolicyRuleRoom = \"m.policy.rule.room\",\n PolicyRuleServer = \"m.policy.rule.server\",\n\n SpaceChild = \"m.space.child\",\n SpaceParent = \"m.space.parent\",\n\n // Room timeline events\n RoomRedaction = \"m.room.redaction\",\n RoomMessage = \"m.room.message\",\n RoomMessageEncrypted = \"m.room.encrypted\",\n Sticker = \"m.sticker\",\n CallInvite = \"m.call.invite\",\n CallCandidates = \"m.call.candidates\",\n CallAnswer = \"m.call.answer\",\n CallHangup = \"m.call.hangup\",\n CallReject = \"m.call.reject\",\n CallSelectAnswer = \"m.call.select_answer\",\n CallNegotiate = \"m.call.negotiate\",\n CallSDPStreamMetadataChanged = \"m.call.sdp_stream_metadata_changed\",\n CallSDPStreamMetadataChangedPrefix = \"org.matrix.call.sdp_stream_metadata_changed\",\n CallReplaces = \"m.call.replaces\",\n CallAssertedIdentity = \"m.call.asserted_identity\",\n CallAssertedIdentityPrefix = \"org.matrix.call.asserted_identity\",\n CallEncryptionKeysPrefix = \"io.element.call.encryption_keys\",\n KeyVerificationRequest = \"m.key.verification.request\",\n KeyVerificationStart = \"m.key.verification.start\",\n KeyVerificationCancel = \"m.key.verification.cancel\",\n KeyVerificationMac = \"m.key.verification.mac\",\n KeyVerificationDone = \"m.key.verification.done\",\n KeyVerificationKey = \"m.key.verification.key\",\n KeyVerificationAccept = \"m.key.verification.accept\",\n // Not used directly - see READY_TYPE in VerificationRequest.\n KeyVerificationReady = \"m.key.verification.ready\",\n // use of this is discouraged https://matrix.org/docs/spec/client_server/r0.6.1#m-room-message-feedback\n RoomMessageFeedback = \"m.room.message.feedback\",\n Reaction = \"m.reaction\",\n PollStart = \"org.matrix.msc3381.poll.start\",\n UserVerifyRequest = \"m.user.verify.request\",\n UserVerifyAccept = \"m.user.verify.accept\",\n UserVerified = \"m.user.verified\",\n\n // Room ephemeral events\n Typing = \"m.typing\",\n Receipt = \"m.receipt\",\n Presence = \"m.presence\",\n\n // Room account_data events\n FullyRead = \"m.fully_read\",\n Tag = \"m.tag\",\n SpaceOrder = \"org.matrix.msc3230.space_order\", // MSC3230\n MarkedUnread = \"m.marked_unread\",\n\n // User account_data events\n PushRules = \"m.push_rules\",\n Direct = \"m.direct\",\n IgnoredUserList = \"m.ignored_user_list\",\n InvitePermissionConfig = \"m.invite_permission_config\", // MSC4380\n\n // to_device events\n RoomKey = \"m.room_key\",\n RoomKeyRequest = \"m.room_key_request\",\n ForwardedRoomKey = \"m.forwarded_room_key\",\n Dummy = \"m.dummy\",\n SecretRequest = \"m.secret.request\",\n SecretSend = \"m.secret.send\",\n\n // Group call events\n GroupCallPrefix = \"org.matrix.msc3401.call\",\n GroupCallMemberPrefix = \"org.matrix.msc3401.call.member\",\n\n // MatrixRTC events\n RTCMembership = \"org.matrix.msc4143.rtc.member\",\n CallNotify = \"org.matrix.msc4075.call.notify\",\n RTCNotification = \"org.matrix.msc4075.rtc.notification\",\n RTCDecline = \"org.matrix.msc4310.rtc.decline\",\n\n // Policy servers\n RoomPolicy = \"org.matrix.msc4284.policy\",\n}\n\nexport enum RelationType {\n Annotation = \"m.annotation\",\n Replace = \"m.replace\",\n Reference = \"m.reference\",\n\n // Don't use this yet: it's only the stable version. The code still assumes we support the unstable prefix and,\n // moreover, our tests currently use the unstable prefix. Use THREAD_RELATION_TYPE.name.\n // Once we support *only* the stable prefix, THREAD_RELATION_TYPE can die and we can switch to this.\n Thread = \"m.thread\",\n}\n\nexport enum MsgType {\n Text = \"m.text\",\n Emote = \"m.emote\",\n Notice = \"m.notice\",\n Image = \"m.image\",\n File = \"m.file\",\n Audio = \"m.audio\",\n Location = \"m.location\",\n Video = \"m.video\",\n KeyVerificationRequest = \"m.key.verification.request\",\n}\n\nexport const RoomCreateTypeField = \"type\";\n\nexport enum RoomType {\n Space = \"m.space\",\n UnstableCall = \"org.matrix.msc3417.call\",\n ElementVideo = \"io.element.video\",\n}\n\nexport const ToDeviceMessageId = \"org.matrix.msgid\";\n\n/**\n * Identifier for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_PURPOSE = new UnstableValue(\"m.room.purpose\", \"org.matrix.msc3088.purpose\");\n\n/**\n * Enabled flag for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_ENABLED = new UnstableValue(\"m.enabled\", \"org.matrix.msc3088.enabled\");\n\n/**\n * Subtype for an [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_TREE_SUBTYPE = new UnstableValue(\"m.data_tree\", \"org.matrix.msc3089.data_tree\");\n\n/**\n * Leaf type for an event in a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_LEAF = new UnstableValue(\"m.leaf\", \"org.matrix.msc3089.leaf\");\n\n/**\n * Branch (Leaf Reference) type for the index approach in a\n * [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. Note that this reference is\n * UNSTABLE and subject to breaking changes, including its eventual removal.\n */\nexport const UNSTABLE_MSC3089_BRANCH = new UnstableValue(\"m.branch\", \"org.matrix.msc3089.branch\");\n\n/**\n * Marker event type to point back at imported historical content in a room. See\n * [MSC2716](https://github.com/matrix-org/matrix-spec-proposals/pull/2716).\n * Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC2716_MARKER = new UnstableValue(\"m.room.marker\", \"org.matrix.msc2716.marker\");\n\n/**\n * Name of the request property for relation based redactions.\n * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}\n */\nexport const MSC3912_RELATION_BASED_REDACTIONS_PROP = new UnstableValue(\n \"with_rel_types\",\n \"org.matrix.msc3912.with_relations\",\n);\n\n/**\n * Functional members type for declaring a purpose of room members (e.g. helpful bots).\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n *\n * Schema (TypeScript):\n * ```\n * {\n * service_members?: string[]\n * }\n * ```\n *\n * @example\n * ```\n * {\n * \"service_members\": [\n * \"@helperbot:localhost\",\n * \"@reminderbot:alice.tdl\"\n * ]\n * }\n * ```\n */\nexport const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new UnstableValue(\n \"io.element.functional_members\",\n \"io.element.functional_members\",\n);\n\n/**\n * A type of message that affects visibility of a message,\n * as per https://github.com/matrix-org/matrix-doc/pull/3531\n *\n * @experimental\n */\nexport const EVENT_VISIBILITY_CHANGE_TYPE = new UnstableValue(\"m.visibility\", \"org.matrix.msc3531.visibility\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_ENABLED = new UnstableValue(\"enabled\", \"org.matrix.msc3881.enabled\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_DEVICE_ID = new UnstableValue(\"device_id\", \"org.matrix.msc3881.device_id\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3890\n *\n * @experimental\n */\nexport const LOCAL_NOTIFICATION_SETTINGS_PREFIX = new UnstableValue(\n \"m.local_notification_settings\",\n \"org.matrix.msc3890.local_notification_settings\",\n);\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/4023\n *\n * @experimental\n */\nexport const UNSIGNED_THREAD_ID_FIELD = new UnstableValue(\"thread_id\", \"org.matrix.msc4023.thread_id\");\n\n/**\n * https://github.com/matrix-org/matrix-spec-proposals/pull/4115\n *\n * @experimental\n */\nexport const UNSIGNED_MEMBERSHIP_FIELD = new NamespacedValue(\"membership\", \"io.element.msc4115.membership\");\n\n/**\n * Mapped type from event type to content type for all specified non-state room events.\n */\nexport interface TimelineEvents {\n [EventType.RoomMessage]: RoomMessageEventContent;\n [EventType.Sticker]: StickerEventContent;\n [EventType.Reaction]: ReactionEventContent;\n [EventType.CallReplaces]: MCallReplacesEvent;\n [EventType.CallAnswer]: MCallAnswer;\n [EventType.CallSelectAnswer]: MCallSelectAnswer;\n [EventType.CallNegotiate]: Omit<MCallInviteNegotiate, \"offer\">;\n [EventType.CallInvite]: MCallInviteNegotiate;\n [EventType.CallCandidates]: MCallCandidates;\n [EventType.CallHangup]: MCallHangupReject;\n [EventType.CallReject]: MCallHangupReject;\n [EventType.CallSDPStreamMetadataChangedPrefix]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallSDPStreamMetadataChanged]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallEncryptionKeysPrefix]: EncryptionKeysEventContent;\n [EventType.CallNotify]: ICallNotifyContent;\n [EventType.RTCNotification]: IRTCNotificationContent;\n [EventType.RTCDecline]: IRTCDeclineContent;\n [M_BEACON.name]: MBeaconEventContent;\n [M_POLL_START.name]: PollStartEventContent;\n [M_POLL_END.name]: PollEndEventContent;\n [EventType.RTCMembership]: RtcMembershipData | { msc4354_sticky_key: string }; // An object containing just the sticky key is empty.\n [EventType.UserVerifyRequest]: {\n tx_hash: string;\n issuer_xrpl_address: string;\n target_xrpl_address: string;\n credential_type_bytes?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n };\n [EventType.UserVerifyAccept]: {\n tx_hash: string;\n issuer_xrpl_address: string;\n accepter_xrpl_address: string;\n credential_type_bytes?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n nft_token_id?: string;\n ipfs_uri?: string;\n };\n}\n\n/**\n * Mapped type from event type to content type for all specified room state events.\n */\nexport interface StateEvents {\n [EventType.RoomCanonicalAlias]: RoomCanonicalAliasEventContent;\n [EventType.RoomCreate]: RoomCreateEventContent;\n [EventType.RoomJoinRules]: RoomJoinRulesEventContent;\n [EventType.RoomMember]: RoomMemberEventContent;\n // XXX: Spec says this event has 3 required fields but kicking such an invitation requires sending `{}`\n [EventType.RoomThirdPartyInvite]: RoomThirdPartyInviteEventContent | EmptyObject;\n [EventType.RoomPowerLevels]: RoomPowerLevelsEventContent;\n [EventType.RoomName]: RoomNameEventContent;\n [EventType.RoomTopic]: RoomTopicEventContent;\n [EventType.RoomAvatar]: RoomAvatarEventContent;\n [EventType.RoomPinnedEvents]: RoomPinnedEventsEventContent;\n [EventType.RoomEncryption]: RoomEncryptionEventContent;\n [EventType.RoomHistoryVisibility]: RoomHistoryVisibilityEventContent;\n [EventType.RoomGuestAccess]: RoomGuestAccessEventContent;\n [EventType.RoomServerAcl]: RoomServerAclEventContent;\n [EventType.RoomTombstone]: RoomTombstoneEventContent;\n [EventType.SpaceChild]: SpaceChildEventContent;\n [EventType.SpaceParent]: SpaceParentEventContent;\n\n [EventType.PolicyRuleUser]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleRoom]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleServer]: PolicyRuleEventContent | EmptyObject;\n\n // MSC4284: Policy servers\n [EventType.RoomPolicy]: RoomPolicyContent | EmptyObject;\n\n // MSC3401\n [EventType.GroupCallPrefix]: IGroupCallRoomState;\n [EventType.GroupCallMemberPrefix]: IGroupCallRoomMemberState | SessionMembershipData | EmptyObject;\n [EventType.RTCMembership]: RtcMembershipData | EmptyObject;\n // MSC3089\n [UNSTABLE_MSC3089_BRANCH.name]: MSC3089EventContent;\n\n // MSC3672\n [M_BEACON_INFO.name]: MBeaconInfoEventContent;\n [EventType.UserVerified]: {\n status: \"requested\" | \"verified\";\n credential_type?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n tx_hash: string;\n validated: boolean;\n [key: string]: unknown;\n };\n}\n\n/**\n * Mapped type from event type to content type for all specified room-specific account_data events.\n */\nexport interface RoomAccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.FullyRead]: { event_id: string };\n [EventType.Tag]: { tags: { [name: string]: { order?: number } } };\n [EventType.SpaceOrder]: { order: string };\n [EventType.MarkedUnread]: { unread: boolean };\n}\n\n/**\n * Mapped type from event type to content type for all specified global account_data events.\n */\nexport interface AccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.PushRules]: IPushRules;\n [EventType.Direct]: { [userId: string]: string[] };\n [EventType.IgnoredUserList]: { ignored_users: { [userId: string]: EmptyObject } };\n \"m.secret_storage.default_key\": { key: string };\n // Flag set by the rust SDK (Element X) and also used by us to mark that the user opted out of backup\n // (I don't know why it's m.org.matrix...)\n \"m.org.matrix.custom.backup_disabled\": { disabled: boolean };\n \"m.identity_server\": { base_url: string | null };\n [key: `${typeof LOCAL_NOTIFICATION_SETTINGS_PREFIX.name}.${string}`]: LocalNotificationSettings;\n [key: `m.secret_storage.key.${string}`]: SecretStorageKeyDescription;\n\n // Invites-ignorer events\n [POLICIES_ACCOUNT_EVENT_TYPE.name]: { [key: string]: any };\n [POLICIES_ACCOUNT_EVENT_TYPE.altName]: { [key: string]: any };\n\n [EventType.InvitePermissionConfig]: { default_action?: string };\n}\n\n/**\n * Subset of AccountDataEvents, excluding events specified in https://spec.matrix.org/v1.17/client-server-api/#server-behaviour-12\n */\nexport type WritableAccountDataEvents = Exclude<AccountDataEvents, \"m.fully_read\" | \"m.push_rules\">;\n\n/**\n * Mapped type from event type to content type for all specified global events encrypted by secret storage.\n *\n * See https://spec.matrix.org/v1.13/client-server-api/#msecret_storagev1aes-hmac-sha2-1\n */\nexport interface SecretStorageAccountDataEvents {\n \"m.megolm_backup.v1\": SecretInfo;\n \"m.cross_signing.master\": SecretInfo;\n \"m.cross_signing.self_signing\": SecretInfo;\n \"m.cross_signing.user_signing\": SecretInfo;\n \"org.matrix.msc3814\": SecretInfo;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,eAAe,EAAEC,aAAa,QAAQ,uBAAuB;AAkDtE,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAmBjB;EAnBQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EA2BjB;EA3BQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAoDjB;EApDQA,SAAS;EAsDjB;EAtDQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;E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EAAE,+BAA+B,CAAC;;AAE3G;AACA;AACA;;AAiDA;AACA;AACA;;AA+CA;AACA;AACA;;AAQA;AACA;AACA;;AAoBA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"event.js","names":["NamespacedValue","UnstableValue","EventType","RelationType","MsgType","RoomCreateTypeField","RoomType","ToDeviceMessageId","UNSTABLE_MSC3088_PURPOSE","UNSTABLE_MSC3088_ENABLED","UNSTABLE_MSC3089_TREE_SUBTYPE","UNSTABLE_MSC3089_LEAF","UNSTABLE_MSC3089_BRANCH","UNSTABLE_MSC2716_MARKER","MSC3912_RELATION_BASED_REDACTIONS_PROP","UNSTABLE_ELEMENT_FUNCTIONAL_USERS","EVENT_VISIBILITY_CHANGE_TYPE","PUSHER_ENABLED","PUSHER_DEVICE_ID","LOCAL_NOTIFICATION_SETTINGS_PREFIX","UNSIGNED_THREAD_ID_FIELD","UNSIGNED_MEMBERSHIP_FIELD"],"sources":["../../src/@types/event.ts"],"sourcesContent":["/*\nCopyright 2020-2026 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type EitherAnd } from \"matrix-events-sdk\";\n\nimport { NamespacedValue, UnstableValue } from \"../NamespacedValue.ts\";\nimport {\n type PolicyRuleEventContent,\n type RoomAvatarEventContent,\n type RoomCanonicalAliasEventContent,\n type RoomCreateEventContent,\n type RoomEncryptionEventContent,\n type RoomGuestAccessEventContent,\n type RoomHistoryVisibilityEventContent,\n type RoomJoinRulesEventContent,\n type RoomMemberEventContent,\n type RoomNameEventContent,\n type RoomPinnedEventsEventContent,\n type RoomPolicyContent,\n type RoomPowerLevelsEventContent,\n type RoomServerAclEventContent,\n type RoomThirdPartyInviteEventContent,\n type RoomTombstoneEventContent,\n type RoomTopicEventContent,\n type SpaceChildEventContent,\n type SpaceParentEventContent,\n} from \"./state_events.ts\";\nimport { type IGroupCallRoomMemberState, type IGroupCallRoomState } from \"../webrtc/groupCall.ts\";\nimport { type MSC3089EventContent } from \"../models/MSC3089Branch.ts\";\nimport { type M_BEACON, type M_BEACON_INFO, type MBeaconEventContent, type MBeaconInfoEventContent } from \"./beacon.ts\";\nimport { type EmptyObject } from \"./common.ts\";\nimport { type ReactionEventContent, type RoomMessageEventContent, type StickerEventContent } from \"./events.ts\";\nimport {\n type MCallAnswer,\n type MCallBase,\n type MCallCandidates,\n type MCallHangupReject,\n type MCallInviteNegotiate,\n type MCallReplacesEvent,\n type MCallSelectAnswer,\n type SDPStreamMetadata,\n} from \"../webrtc/callEventTypes.ts\";\nimport {\n type IRTCNotificationContent,\n type IRTCDeclineContent,\n type EncryptionKeysEventContent,\n type ICallNotifyContent,\n} from \"../matrixrtc/types.ts\";\nimport { type M_POLL_END, type M_POLL_START, type PollEndEventContent, type PollStartEventContent } from \"./polls.ts\";\nimport { type RtcMembershipData, type SessionMembershipData } from \"../matrixrtc/membershipData/index.ts\";\nimport { type LocalNotificationSettings } from \"./local_notifications.ts\";\nimport { type IPushRules } from \"./PushRules.ts\";\nimport { type SecretInfo, type SecretStorageKeyDescription } from \"../secret-storage.ts\";\nimport { type POLICIES_ACCOUNT_EVENT_TYPE } from \"../models/invites-ignorer-types.ts\";\nimport { type WalletE2eeRecoveryEnvelope, type WalletIdentityAccountData } from \"./auth.ts\";\n\nexport enum EventType {\n // Room state events\n RoomCanonicalAlias = \"m.room.canonical_alias\",\n RoomCreate = \"m.room.create\",\n RoomJoinRules = \"m.room.join_rules\",\n RoomMember = \"m.room.member\",\n RoomThirdPartyInvite = \"m.room.third_party_invite\",\n RoomPowerLevels = \"m.room.power_levels\",\n RoomName = \"m.room.name\",\n RoomTopic = \"m.room.topic\",\n RoomAvatar = \"m.room.avatar\",\n RoomPinnedEvents = \"m.room.pinned_events\",\n RoomEncryption = \"m.room.encryption\",\n RoomHistoryVisibility = \"m.room.history_visibility\",\n RoomGuestAccess = \"m.room.guest_access\",\n RoomServerAcl = \"m.room.server_acl\",\n RoomTombstone = \"m.room.tombstone\",\n RoomPredecessor = \"org.matrix.msc3946.room_predecessor\",\n\n // Moderation policy lists\n PolicyRuleUser = \"m.policy.rule.user\",\n PolicyRuleRoom = \"m.policy.rule.room\",\n PolicyRuleServer = \"m.policy.rule.server\",\n\n SpaceChild = \"m.space.child\",\n SpaceParent = \"m.space.parent\",\n\n // Room timeline events\n RoomRedaction = \"m.room.redaction\",\n RoomMessage = \"m.room.message\",\n RoomMessageEncrypted = \"m.room.encrypted\",\n Sticker = \"m.sticker\",\n CallInvite = \"m.call.invite\",\n CallCandidates = \"m.call.candidates\",\n CallAnswer = \"m.call.answer\",\n CallHangup = \"m.call.hangup\",\n CallReject = \"m.call.reject\",\n CallSelectAnswer = \"m.call.select_answer\",\n CallNegotiate = \"m.call.negotiate\",\n CallSDPStreamMetadataChanged = \"m.call.sdp_stream_metadata_changed\",\n CallSDPStreamMetadataChangedPrefix = \"org.matrix.call.sdp_stream_metadata_changed\",\n CallReplaces = \"m.call.replaces\",\n CallAssertedIdentity = \"m.call.asserted_identity\",\n CallAssertedIdentityPrefix = \"org.matrix.call.asserted_identity\",\n CallEncryptionKeysPrefix = \"io.element.call.encryption_keys\",\n KeyVerificationRequest = \"m.key.verification.request\",\n KeyVerificationStart = \"m.key.verification.start\",\n KeyVerificationCancel = \"m.key.verification.cancel\",\n KeyVerificationMac = \"m.key.verification.mac\",\n KeyVerificationDone = \"m.key.verification.done\",\n KeyVerificationKey = \"m.key.verification.key\",\n KeyVerificationAccept = \"m.key.verification.accept\",\n // Not used directly - see READY_TYPE in VerificationRequest.\n KeyVerificationReady = \"m.key.verification.ready\",\n // use of this is discouraged https://matrix.org/docs/spec/client_server/r0.6.1#m-room-message-feedback\n RoomMessageFeedback = \"m.room.message.feedback\",\n Reaction = \"m.reaction\",\n PollStart = \"org.matrix.msc3381.poll.start\",\n UserVerifyRequest = \"m.user.verify.request\",\n UserVerifyAccept = \"m.user.verify.accept\",\n UserVerified = \"m.user.verified\",\n\n // Room ephemeral events\n Typing = \"m.typing\",\n Receipt = \"m.receipt\",\n Presence = \"m.presence\",\n\n // Room account_data events\n FullyRead = \"m.fully_read\",\n Tag = \"m.tag\",\n SpaceOrder = \"org.matrix.msc3230.space_order\", // MSC3230\n MarkedUnread = \"m.marked_unread\",\n\n // User account_data events\n PushRules = \"m.push_rules\",\n Direct = \"m.direct\",\n IgnoredUserList = \"m.ignored_user_list\",\n InvitePermissionConfig = \"m.invite_permission_config\", // MSC4380\n\n // to_device events\n RoomKey = \"m.room_key\",\n RoomKeyRequest = \"m.room_key_request\",\n ForwardedRoomKey = \"m.forwarded_room_key\",\n Dummy = \"m.dummy\",\n SecretRequest = \"m.secret.request\",\n SecretSend = \"m.secret.send\",\n\n // Group call events\n GroupCallPrefix = \"org.matrix.msc3401.call\",\n GroupCallMemberPrefix = \"org.matrix.msc3401.call.member\",\n\n // MatrixRTC events\n RTCMembership = \"org.matrix.msc4143.rtc.member\",\n CallNotify = \"org.matrix.msc4075.call.notify\",\n RTCNotification = \"org.matrix.msc4075.rtc.notification\",\n RTCDecline = \"org.matrix.msc4310.rtc.decline\",\n\n // Policy servers\n RoomPolicy = \"org.matrix.msc4284.policy\",\n}\n\nexport enum RelationType {\n Annotation = \"m.annotation\",\n Replace = \"m.replace\",\n Reference = \"m.reference\",\n\n // Don't use this yet: it's only the stable version. The code still assumes we support the unstable prefix and,\n // moreover, our tests currently use the unstable prefix. Use THREAD_RELATION_TYPE.name.\n // Once we support *only* the stable prefix, THREAD_RELATION_TYPE can die and we can switch to this.\n Thread = \"m.thread\",\n}\n\nexport enum MsgType {\n Text = \"m.text\",\n Emote = \"m.emote\",\n Notice = \"m.notice\",\n Image = \"m.image\",\n File = \"m.file\",\n Audio = \"m.audio\",\n Location = \"m.location\",\n Video = \"m.video\",\n KeyVerificationRequest = \"m.key.verification.request\",\n}\n\nexport const RoomCreateTypeField = \"type\";\n\nexport enum RoomType {\n Space = \"m.space\",\n UnstableCall = \"org.matrix.msc3417.call\",\n ElementVideo = \"io.element.video\",\n}\n\nexport const ToDeviceMessageId = \"org.matrix.msgid\";\n\n/**\n * Identifier for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_PURPOSE = new UnstableValue(\"m.room.purpose\", \"org.matrix.msc3088.purpose\");\n\n/**\n * Enabled flag for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_ENABLED = new UnstableValue(\"m.enabled\", \"org.matrix.msc3088.enabled\");\n\n/**\n * Subtype for an [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_TREE_SUBTYPE = new UnstableValue(\"m.data_tree\", \"org.matrix.msc3089.data_tree\");\n\n/**\n * Leaf type for an event in a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_LEAF = new UnstableValue(\"m.leaf\", \"org.matrix.msc3089.leaf\");\n\n/**\n * Branch (Leaf Reference) type for the index approach in a\n * [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. Note that this reference is\n * UNSTABLE and subject to breaking changes, including its eventual removal.\n */\nexport const UNSTABLE_MSC3089_BRANCH = new UnstableValue(\"m.branch\", \"org.matrix.msc3089.branch\");\n\n/**\n * Marker event type to point back at imported historical content in a room. See\n * [MSC2716](https://github.com/matrix-org/matrix-spec-proposals/pull/2716).\n * Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC2716_MARKER = new UnstableValue(\"m.room.marker\", \"org.matrix.msc2716.marker\");\n\n/**\n * Name of the request property for relation based redactions.\n * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}\n */\nexport const MSC3912_RELATION_BASED_REDACTIONS_PROP = new UnstableValue(\n \"with_rel_types\",\n \"org.matrix.msc3912.with_relations\",\n);\n\n/**\n * Functional members type for declaring a purpose of room members (e.g. helpful bots).\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n *\n * Schema (TypeScript):\n * ```\n * {\n * service_members?: string[]\n * }\n * ```\n *\n * @example\n * ```\n * {\n * \"service_members\": [\n * \"@helperbot:localhost\",\n * \"@reminderbot:alice.tdl\"\n * ]\n * }\n * ```\n */\nexport const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new UnstableValue(\n \"io.element.functional_members\",\n \"io.element.functional_members\",\n);\n\n/**\n * A type of message that affects visibility of a message,\n * as per https://github.com/matrix-org/matrix-doc/pull/3531\n *\n * @experimental\n */\nexport const EVENT_VISIBILITY_CHANGE_TYPE = new UnstableValue(\"m.visibility\", \"org.matrix.msc3531.visibility\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_ENABLED = new UnstableValue(\"enabled\", \"org.matrix.msc3881.enabled\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_DEVICE_ID = new UnstableValue(\"device_id\", \"org.matrix.msc3881.device_id\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3890\n *\n * @experimental\n */\nexport const LOCAL_NOTIFICATION_SETTINGS_PREFIX = new UnstableValue(\n \"m.local_notification_settings\",\n \"org.matrix.msc3890.local_notification_settings\",\n);\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/4023\n *\n * @experimental\n */\nexport const UNSIGNED_THREAD_ID_FIELD = new UnstableValue(\"thread_id\", \"org.matrix.msc4023.thread_id\");\n\n/**\n * https://github.com/matrix-org/matrix-spec-proposals/pull/4115\n *\n * @experimental\n */\nexport const UNSIGNED_MEMBERSHIP_FIELD = new NamespacedValue(\"membership\", \"io.element.msc4115.membership\");\n\n/**\n * Mapped type from event type to content type for all specified non-state room events.\n */\nexport interface TimelineEvents {\n [EventType.RoomMessage]: RoomMessageEventContent;\n [EventType.Sticker]: StickerEventContent;\n [EventType.Reaction]: ReactionEventContent;\n [EventType.CallReplaces]: MCallReplacesEvent;\n [EventType.CallAnswer]: MCallAnswer;\n [EventType.CallSelectAnswer]: MCallSelectAnswer;\n [EventType.CallNegotiate]: Omit<MCallInviteNegotiate, \"offer\">;\n [EventType.CallInvite]: MCallInviteNegotiate;\n [EventType.CallCandidates]: MCallCandidates;\n [EventType.CallHangup]: MCallHangupReject;\n [EventType.CallReject]: MCallHangupReject;\n [EventType.CallSDPStreamMetadataChangedPrefix]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallSDPStreamMetadataChanged]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallEncryptionKeysPrefix]: EncryptionKeysEventContent;\n [EventType.CallNotify]: ICallNotifyContent;\n [EventType.RTCNotification]: IRTCNotificationContent;\n [EventType.RTCDecline]: IRTCDeclineContent;\n [M_BEACON.name]: MBeaconEventContent;\n [M_POLL_START.name]: PollStartEventContent;\n [M_POLL_END.name]: PollEndEventContent;\n [EventType.RTCMembership]: RtcMembershipData | { msc4354_sticky_key: string }; // An object containing just the sticky key is empty.\n [EventType.UserVerifyRequest]: {\n tx_hash: string;\n issuer_xrpl_address: string;\n target_xrpl_address: string;\n credential_type_bytes?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n };\n [EventType.UserVerifyAccept]: {\n tx_hash: string;\n issuer_xrpl_address: string;\n accepter_xrpl_address: string;\n credential_type_bytes?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n nft_token_id?: string;\n ipfs_uri?: string;\n };\n}\n\n/**\n * Mapped type from event type to content type for all specified room state events.\n */\nexport interface StateEvents {\n [EventType.RoomCanonicalAlias]: RoomCanonicalAliasEventContent;\n [EventType.RoomCreate]: RoomCreateEventContent;\n [EventType.RoomJoinRules]: RoomJoinRulesEventContent;\n [EventType.RoomMember]: RoomMemberEventContent;\n // XXX: Spec says this event has 3 required fields but kicking such an invitation requires sending `{}`\n [EventType.RoomThirdPartyInvite]: RoomThirdPartyInviteEventContent | EmptyObject;\n [EventType.RoomPowerLevels]: RoomPowerLevelsEventContent;\n [EventType.RoomName]: RoomNameEventContent;\n [EventType.RoomTopic]: RoomTopicEventContent;\n [EventType.RoomAvatar]: RoomAvatarEventContent;\n [EventType.RoomPinnedEvents]: RoomPinnedEventsEventContent;\n [EventType.RoomEncryption]: RoomEncryptionEventContent;\n [EventType.RoomHistoryVisibility]: RoomHistoryVisibilityEventContent;\n [EventType.RoomGuestAccess]: RoomGuestAccessEventContent;\n [EventType.RoomServerAcl]: RoomServerAclEventContent;\n [EventType.RoomTombstone]: RoomTombstoneEventContent;\n [EventType.SpaceChild]: SpaceChildEventContent;\n [EventType.SpaceParent]: SpaceParentEventContent;\n\n [EventType.PolicyRuleUser]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleRoom]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleServer]: PolicyRuleEventContent | EmptyObject;\n\n // MSC4284: Policy servers\n [EventType.RoomPolicy]: RoomPolicyContent | EmptyObject;\n\n // MSC3401\n [EventType.GroupCallPrefix]: IGroupCallRoomState;\n [EventType.GroupCallMemberPrefix]: IGroupCallRoomMemberState | SessionMembershipData | EmptyObject;\n [EventType.RTCMembership]: RtcMembershipData | EmptyObject;\n // MSC3089\n [UNSTABLE_MSC3089_BRANCH.name]: MSC3089EventContent;\n\n // MSC3672\n [M_BEACON_INFO.name]: MBeaconInfoEventContent;\n [EventType.UserVerified]: {\n status: \"requested\" | \"verified\";\n credential_type?: \"textrp_verify\";\n trust_model?: \"nft_metadata\";\n tx_hash: string;\n validated: boolean;\n [key: string]: unknown;\n };\n}\n\n/**\n * Mapped type from event type to content type for all specified room-specific account_data events.\n */\nexport interface RoomAccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.FullyRead]: { event_id: string };\n [EventType.Tag]: { tags: { [name: string]: { order?: number } } };\n [EventType.SpaceOrder]: { order: string };\n [EventType.MarkedUnread]: { unread: boolean };\n}\n\n/**\n * Mapped type from event type to content type for all specified global account_data events.\n */\nexport interface AccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.PushRules]: IPushRules;\n [EventType.Direct]: { [userId: string]: string[] };\n [EventType.IgnoredUserList]: { ignored_users: { [userId: string]: EmptyObject } };\n \"m.secret_storage.default_key\": { key: string };\n // Flag set by the rust SDK (Element X) and also used by us to mark that the user opted out of backup\n // (I don't know why it's m.org.matrix...)\n \"m.org.matrix.custom.backup_disabled\": { disabled: boolean };\n \"m.identity_server\": { base_url: string | null };\n [key: `${typeof LOCAL_NOTIFICATION_SETTINGS_PREFIX.name}.${string}`]: LocalNotificationSettings;\n [key: `m.secret_storage.key.${string}`]: SecretStorageKeyDescription;\n\n // Invites-ignorer events\n [POLICIES_ACCOUNT_EVENT_TYPE.name]: { [key: string]: any };\n [POLICIES_ACCOUNT_EVENT_TYPE.altName]: { [key: string]: any };\n\n [EventType.InvitePermissionConfig]: { default_action?: string };\n \"org.textrp.wallet.e2ee_recovery.v1\": WalletE2eeRecoveryEnvelope;\n \"org.textrp.wallet.identity\": WalletIdentityAccountData;\n}\n\n/**\n * Subset of AccountDataEvents, excluding events specified in https://spec.matrix.org/v1.17/client-server-api/#server-behaviour-12\n */\nexport type WritableAccountDataEvents = Exclude<AccountDataEvents, \"m.fully_read\" | \"m.push_rules\">;\n\n/**\n * Mapped type from event type to content type for all specified global events encrypted by secret storage.\n *\n * See https://spec.matrix.org/v1.13/client-server-api/#msecret_storagev1aes-hmac-sha2-1\n */\nexport interface SecretStorageAccountDataEvents {\n \"m.megolm_backup.v1\": SecretInfo;\n \"m.cross_signing.master\": SecretInfo;\n \"m.cross_signing.self_signing\": SecretInfo;\n \"m.cross_signing.user_signing\": SecretInfo;\n \"org.matrix.msc3814\": SecretInfo;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,eAAe,EAAEC,aAAa,QAAQ,uBAAuB;AAmDtE,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAmBjB;EAnBQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EA2BjB;EA3BQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAoDjB;EApDQA,SAAS;EAsDjB;EAtDQA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EA8DjB;EA9DQA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CAAC;;AAE3G;AACA;AACA;;AAiDA;AACA;AACA;;AA+CA;AACA;AACA;;AAQA;AACA;AACA;;AAsBA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
package/lib/@types/synapse.d.ts
CHANGED
|
@@ -16,4 +16,68 @@ export interface ISynapseAdminWhoisResponse {
|
|
|
16
16
|
export interface ISynapseAdminDeactivateResponse {
|
|
17
17
|
id_server_unbind_result: IdServerUnbindResult;
|
|
18
18
|
}
|
|
19
|
+
export interface IBriijPremiumFeature {
|
|
20
|
+
feature_id: number;
|
|
21
|
+
feature_key: string;
|
|
22
|
+
name: string;
|
|
23
|
+
description: string | null;
|
|
24
|
+
mcredits_cost: number;
|
|
25
|
+
category: string | null;
|
|
26
|
+
is_active: boolean;
|
|
27
|
+
created_ts: number;
|
|
28
|
+
}
|
|
29
|
+
export interface IBriijMcreditsFeature {
|
|
30
|
+
feature_key: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string | null;
|
|
33
|
+
mcredits_cost: number;
|
|
34
|
+
category: string | null;
|
|
35
|
+
is_active: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface IBriijMcreditsFeaturesResponse {
|
|
38
|
+
features: IBriijMcreditsFeature[];
|
|
39
|
+
}
|
|
40
|
+
export interface IBriijMcreditsBalanceResponse {
|
|
41
|
+
balance: number;
|
|
42
|
+
}
|
|
43
|
+
export interface IBriijMcreditsSpendResponse {
|
|
44
|
+
feature_key: string;
|
|
45
|
+
balance: number;
|
|
46
|
+
}
|
|
47
|
+
export interface IBriijLegacyMyAddressUserCredit {
|
|
48
|
+
balance?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface IBriijLegacyMyAddressUser {
|
|
51
|
+
address?: string;
|
|
52
|
+
discount?: Record<string, unknown>;
|
|
53
|
+
subscriptions?: unknown[];
|
|
54
|
+
credit?: IBriijLegacyMyAddressUserCredit;
|
|
55
|
+
}
|
|
56
|
+
export interface IBriijLegacyMyAddressResponse {
|
|
57
|
+
user: IBriijLegacyMyAddressUser;
|
|
58
|
+
address: string;
|
|
59
|
+
}
|
|
60
|
+
export interface IBriijLegacyEnabledFeature {
|
|
61
|
+
feature: string;
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
}
|
|
64
|
+
export interface IBriijLegacyEnabledFeaturesResponse {
|
|
65
|
+
nfts?: IBriijLegacyEnabledFeature[];
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
}
|
|
68
|
+
export interface IBriijAdminPremiumFeaturesResponse {
|
|
69
|
+
premium_features: IBriijPremiumFeature[];
|
|
70
|
+
}
|
|
71
|
+
export interface IBriijAdminCreatePremiumFeatureRequest {
|
|
72
|
+
feature_key: string;
|
|
73
|
+
name: string;
|
|
74
|
+
description?: string | null;
|
|
75
|
+
mcredits_cost: number;
|
|
76
|
+
category?: string | null;
|
|
77
|
+
}
|
|
78
|
+
export interface IBriijAdminUpdatePremiumFeatureRequest {
|
|
79
|
+
mcredits_cost?: number;
|
|
80
|
+
description?: string | null;
|
|
81
|
+
is_active?: boolean;
|
|
82
|
+
}
|
|
19
83
|
//# sourceMappingURL=synapse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synapse.d.ts","sourceRoot":"","sources":["../../src/@types/synapse.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAK1D,MAAM,WAAW,0BAA0B;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACL,CAAC,QAAQ,EAAE,MAAM,GAAG;YAChB,QAAQ,EAAE;gBACN,WAAW,EAAE;oBACT,EAAE,EAAE,MAAM,CAAC;oBACX,SAAS,EAAE,MAAM,CAAC;oBAClB,UAAU,EAAE,MAAM,CAAC;iBACtB,EAAE,CAAC;aACP,EAAE,CAAC;SACP,CAAC;KACL,CAAC;CACL;AAED,MAAM,WAAW,+BAA+B;IAC5C,uBAAuB,EAAE,oBAAoB,CAAC;CACjD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CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,+BAA+B;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,+BAA+B,CAAC;CAC5C;AAED,MAAM,WAAW,6BAA6B;IAC1C,IAAI,EAAE,yBAAyB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,mCAAmC;IAChD,IAAI,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,kCAAkC;IAC/C,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,sCAAsC;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,sCAAsC;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synapse.js","names":[],"sources":["../../src/@types/synapse.ts"],"sourcesContent":["/*\nCopyright 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type IdServerUnbindResult } from \"./partials.ts\";\n\n// Types relating to Synapse Admin APIs\n\n/* eslint-disable camelcase */\nexport interface ISynapseAdminWhoisResponse {\n user_id: string;\n devices: {\n [deviceId: string]: {\n sessions: {\n connections: {\n ip: string;\n last_seen: number; // millis since epoch\n user_agent: string;\n }[];\n }[];\n };\n };\n}\n\nexport interface ISynapseAdminDeactivateResponse {\n id_server_unbind_result: IdServerUnbindResult;\n}\n/* eslint-enable camelcase */\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"synapse.js","names":[],"sources":["../../src/@types/synapse.ts"],"sourcesContent":["/*\nCopyright 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type IdServerUnbindResult } from \"./partials.ts\";\n\n// Types relating to Synapse Admin APIs\n\n/* eslint-disable camelcase */\nexport interface ISynapseAdminWhoisResponse {\n user_id: string;\n devices: {\n [deviceId: string]: {\n sessions: {\n connections: {\n ip: string;\n last_seen: number; // millis since epoch\n user_agent: string;\n }[];\n }[];\n };\n };\n}\n\nexport interface ISynapseAdminDeactivateResponse {\n id_server_unbind_result: IdServerUnbindResult;\n}\n\nexport interface IBriijPremiumFeature {\n feature_id: number;\n feature_key: string;\n name: string;\n description: string | null;\n mcredits_cost: number;\n category: string | null;\n is_active: boolean;\n created_ts: number;\n}\n\nexport interface IBriijMcreditsFeature {\n feature_key: string;\n name: string;\n description: string | null;\n mcredits_cost: number;\n category: string | null;\n is_active: boolean;\n}\n\nexport interface IBriijMcreditsFeaturesResponse {\n features: IBriijMcreditsFeature[];\n}\n\nexport interface IBriijMcreditsBalanceResponse {\n balance: number;\n}\n\nexport interface IBriijMcreditsSpendResponse {\n feature_key: string;\n balance: number;\n}\n\nexport interface IBriijLegacyMyAddressUserCredit {\n balance?: string;\n}\n\nexport interface IBriijLegacyMyAddressUser {\n address?: string;\n discount?: Record<string, unknown>;\n subscriptions?: unknown[];\n credit?: IBriijLegacyMyAddressUserCredit;\n}\n\nexport interface IBriijLegacyMyAddressResponse {\n user: IBriijLegacyMyAddressUser;\n address: string;\n}\n\nexport interface IBriijLegacyEnabledFeature {\n feature: string;\n [key: string]: unknown;\n}\n\nexport interface IBriijLegacyEnabledFeaturesResponse {\n nfts?: IBriijLegacyEnabledFeature[];\n [key: string]: unknown;\n}\n\nexport interface IBriijAdminPremiumFeaturesResponse {\n premium_features: IBriijPremiumFeature[];\n}\n\nexport interface IBriijAdminCreatePremiumFeatureRequest {\n feature_key: string;\n name: string;\n description?: string | null;\n mcredits_cost: number;\n category?: string | null;\n}\n\nexport interface IBriijAdminUpdatePremiumFeatureRequest {\n mcredits_cost?: number;\n description?: string | null;\n is_active?: boolean;\n}\n/* eslint-enable camelcase */\n"],"mappings":"","ignoreList":[]}
|
package/lib/briij.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export * from "./interactive-auth.ts";
|
|
|
31
31
|
export * from "./xrpl/identity.ts";
|
|
32
32
|
export * from "./xrpl/trust.ts";
|
|
33
33
|
export * from "./xrpl/verification.ts";
|
|
34
|
+
export * from "./wallet-recovery.ts";
|
|
34
35
|
export * from "./version-support.ts";
|
|
35
36
|
export * from "./service-types.ts";
|
|
36
37
|
export * from "./store/memory.ts";
|
|
@@ -52,6 +53,7 @@ export * from "./@types/topic.ts";
|
|
|
52
53
|
export * from "./@types/location.ts";
|
|
53
54
|
export * from "./@types/threepids.ts";
|
|
54
55
|
export * from "./@types/auth.ts";
|
|
56
|
+
export * from "./@types/synapse.ts";
|
|
55
57
|
export * from "./@types/polls.ts";
|
|
56
58
|
export type * from "./@types/local_notifications.ts";
|
|
57
59
|
export type * from "./@types/registration.ts";
|
package/lib/briij.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"briij.d.ts","sourceRoot":"","sources":["../src/briij.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,c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AS,EACpB,YAAY,EAAE,aAAa,EAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,iBAAiB,EACvB,iBAAiB,UAAO,GACzB,WAAW,CAEb"}
|
package/lib/briij.js
CHANGED
|
@@ -48,6 +48,7 @@ export * from "./interactive-auth.js";
|
|
|
48
48
|
export * from "./xrpl/identity.js";
|
|
49
49
|
export * from "./xrpl/trust.js";
|
|
50
50
|
export * from "./xrpl/verification.js";
|
|
51
|
+
export * from "./wallet-recovery.js";
|
|
51
52
|
export * from "./version-support.js";
|
|
52
53
|
export * from "./service-types.js";
|
|
53
54
|
export * from "./store/memory.js";
|
|
@@ -66,6 +67,7 @@ export * from "./@types/topic.js";
|
|
|
66
67
|
export * from "./@types/location.js";
|
|
67
68
|
export * from "./@types/threepids.js";
|
|
68
69
|
export * from "./@types/auth.js";
|
|
70
|
+
export * from "./@types/synapse.js";
|
|
69
71
|
export * from "./@types/polls.js";
|
|
70
72
|
export * from "./@types/read_receipts.js";
|
|
71
73
|
export * from "./@types/crypto.js";
|