rettiwt-api 6.0.0 → 6.0.2
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/README.md +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/models/RettiwtConfig.d.ts +0 -2
- package/dist/models/RettiwtConfig.js +2 -4
- package/dist/models/RettiwtConfig.js.map +1 -1
- package/dist/services/public/FetcherService.d.ts +0 -2
- package/dist/services/public/FetcherService.js +24 -18
- package/dist/services/public/FetcherService.js.map +1 -1
- package/dist/types/RettiwtConfig.d.ts +0 -3
- package/dist/types/auth/TransactionHeader.d.ts +6 -0
- package/dist/types/auth/TransactionHeader.js +4 -0
- package/dist/types/auth/TransactionHeader.js.map +1 -0
- package/package.json +3 -2
- package/src/index.ts +0 -1
- package/src/models/RettiwtConfig.ts +2 -5
- package/src/services/public/FetcherService.ts +30 -22
- package/src/types/RettiwtConfig.ts +0 -4
- package/src/types/auth/TransactionHeader.ts +8 -0
- package/dist/helper/TidUtils.d.ts +0 -4
- package/dist/helper/TidUtils.js +0 -171
- package/dist/helper/TidUtils.js.map +0 -1
- package/dist/services/internal/TidService.d.ts +0 -43
- package/dist/services/internal/TidService.js +0 -156
- package/dist/services/internal/TidService.js.map +0 -1
- package/dist/types/auth/TidDynamicArgs.d.ts +0 -10
- package/dist/types/auth/TidDynamicArgs.js +0 -3
- package/dist/types/auth/TidDynamicArgs.js.map +0 -1
- package/dist/types/auth/TidHeader.d.ts +0 -8
- package/dist/types/auth/TidHeader.js +0 -3
- package/dist/types/auth/TidHeader.js.map +0 -1
- package/dist/types/auth/TidParams.d.ts +0 -27
- package/dist/types/auth/TidParams.js +0 -3
- package/dist/types/auth/TidParams.js.map +0 -1
- package/dist/types/auth/TidProvider.d.ts +0 -18
- package/dist/types/auth/TidProvider.js +0 -3
- package/dist/types/auth/TidProvider.js.map +0 -1
- package/src/helper/TidUtils.ts +0 -198
- package/src/services/internal/TidService.ts +0 -140
- package/src/types/auth/TidDynamicArgs.ts +0 -10
- package/src/types/auth/TidHeader.ts +0 -12
- package/src/types/auth/TidParams.ts +0 -36
- package/src/types/auth/TidProvider.ts +0 -19
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The header for the transaction ID.
|
|
3
|
-
*
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export interface ITidHeader {
|
|
7
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
8
|
-
|
|
9
|
-
'x-client-transaction-id': string;
|
|
10
|
-
|
|
11
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
12
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The parameters for generating the transaction ID.
|
|
3
|
-
*
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export interface ITidParams {
|
|
7
|
-
/** Secret used for transaction ID calculation. */
|
|
8
|
-
keyword: string;
|
|
9
|
-
|
|
10
|
-
/** Request method. */
|
|
11
|
-
method: string;
|
|
12
|
-
|
|
13
|
-
/** Endpoint path without query parameters. */
|
|
14
|
-
path: string;
|
|
15
|
-
|
|
16
|
-
/** Twitter verification key received from HTML. */
|
|
17
|
-
verificationKey: string;
|
|
18
|
-
|
|
19
|
-
/** Animation frames extracted from HTML. */
|
|
20
|
-
frames: number[][][];
|
|
21
|
-
|
|
22
|
-
/** Indices used for getting the correct verification key bytes during animation key calculation. */
|
|
23
|
-
indices: number[];
|
|
24
|
-
|
|
25
|
-
/** Final byte of the transaction ID. */
|
|
26
|
-
extraByte: number;
|
|
27
|
-
|
|
28
|
-
/** Current time */
|
|
29
|
-
time?: number;
|
|
30
|
-
|
|
31
|
-
/** XOR byte used for final hash calculation, must be in 0-255 range. */
|
|
32
|
-
xorByte?: number;
|
|
33
|
-
|
|
34
|
-
/** Precomputed animation key. */
|
|
35
|
-
animationKey?: string;
|
|
36
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Service responsible for generating the `x-client-transaction-id` header.
|
|
3
|
-
*
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export interface ITidProvider {
|
|
7
|
-
/**
|
|
8
|
-
* Generates new `x-client-transaction-id` header.
|
|
9
|
-
*
|
|
10
|
-
* @param method - Request method.
|
|
11
|
-
* @param path - Endpoint path without query parameters.
|
|
12
|
-
*/
|
|
13
|
-
generate(method: string, path: string): Promise<string | undefined>;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Refresh arguments obtained from parsing the HTML page, if any.
|
|
17
|
-
*/
|
|
18
|
-
refreshDynamicArgs(): Promise<void>;
|
|
19
|
-
}
|