@based/functions 1.2.0 → 1.2.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/dist/functions.d.ts +1 -4
- package/dist/geo.d.ts +1 -1
- package/package.json +1 -1
- package/src/functions.ts +9 -14
- package/src/geo.ts +1 -1
package/dist/functions.d.ts
CHANGED
|
@@ -2,10 +2,7 @@ import { Context, HttpSession } from './context';
|
|
|
2
2
|
import { BasedFunctionClient } from './client';
|
|
3
3
|
import { BasedDataStream } from './stream';
|
|
4
4
|
import { Authorize } from './auth';
|
|
5
|
-
export type ObservableUpdateFunction<K = any> =
|
|
6
|
-
(data: K, checksum?: number, diff?: any, fromChecksum?: number, isDeflate?: boolean, rawData?: K, err?: any): void;
|
|
7
|
-
__internalObs__?: true;
|
|
8
|
-
};
|
|
5
|
+
export type ObservableUpdateFunction<K = any> = (data: K, checksum?: number, err?: any, cache?: Uint8Array, diff?: any, fromChecksum?: number, isDeflate?: boolean) => void;
|
|
9
6
|
export type ObserveErrorListener = (err: any) => void;
|
|
10
7
|
export type HttpHeaders = {
|
|
11
8
|
[header: string]: number | string | (string | number)[];
|
package/dist/geo.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export type CountryCode = 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ'
|
|
|
2
2
|
type Char = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
|
|
3
3
|
export type GeoRegionISO = `${Char}${Char}` | `${Char}${Char}${Char}`;
|
|
4
4
|
export type Geo = {
|
|
5
|
-
country: CountryCode;
|
|
5
|
+
country: CountryCode | 'unknown';
|
|
6
6
|
/**
|
|
7
7
|
Ip formatted as ipv6
|
|
8
8
|
|
package/package.json
CHANGED
package/src/functions.ts
CHANGED
|
@@ -3,21 +3,16 @@ import { BasedFunctionClient } from './client'
|
|
|
3
3
|
import { BasedDataStream } from './stream'
|
|
4
4
|
import { Authorize } from './auth'
|
|
5
5
|
|
|
6
|
-
export type ObservableUpdateFunction<K = any> =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
err?: any
|
|
16
|
-
): void
|
|
17
|
-
__internalObs__?: true
|
|
18
|
-
}
|
|
6
|
+
export type ObservableUpdateFunction<K = any> = (
|
|
7
|
+
data: K,
|
|
8
|
+
checksum?: number,
|
|
9
|
+
err?: any,
|
|
10
|
+
cache?: Uint8Array,
|
|
11
|
+
diff?: any,
|
|
12
|
+
fromChecksum?: number,
|
|
13
|
+
isDeflate?: boolean
|
|
14
|
+
) => void
|
|
19
15
|
|
|
20
|
-
// TODO: use error package
|
|
21
16
|
export type ObserveErrorListener = (err: any) => void
|
|
22
17
|
|
|
23
18
|
export type HttpHeaders = {
|