@junobuild/core 0.0.6 → 0.0.8
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/browser/canisterStatus-CMO3J52U.js +2 -0
- package/dist/browser/chunk-A53P2AD6.js +35 -0
- package/dist/browser/chunk-A53P2AD6.js.map +7 -0
- package/dist/browser/index.js +33 -0
- package/dist/browser/index.js.map +7 -0
- package/dist/declarations/cmc/cmc.did.d.ts +2 -2
- package/dist/declarations/console/console.did.d.ts +1 -1
- package/dist/declarations/frontend/frontend.did +42 -1
- package/dist/declarations/frontend/frontend.did.d.ts +58 -14
- package/dist/declarations/frontend/frontend.factory.did.js +45 -2
- package/dist/declarations/internet_identity/internet_identity.did.d.ts +9 -9
- package/dist/declarations/ledger/ledger.did.d.ts +4 -4
- package/dist/declarations/satellite/satellite.did.d.ts +19 -17
- package/dist/declarations/satellite/satellite.factory.did.js +9 -4
- package/dist/declarations/satellite/satellite.factory.did.mjs +9 -4
- package/dist/node/index.mjs +73 -0
- package/dist/node/index.mjs.map +7 -0
- package/dist/types/constants/auth.constants.d.ts +1 -0
- package/dist/types/index.d.ts +7 -4
- package/dist/types/services/auth-timout.services.d.ts +3 -0
- package/dist/types/stores/auth.store.d.ts +2 -1
- package/dist/types/types/env.types.d.ts +6 -0
- package/dist/types/types/list.types.d.ts +6 -4
- package/dist/types/types/post-message.d.ts +5 -0
- package/dist/types/types/subscription.types.d.ts +1 -0
- package/dist/types/utils/auth.utils.d.ts +2 -0
- package/dist/types/utils/did.utils.d.ts +1 -1
- package/dist/types/utils/events.utils.d.ts +4 -0
- package/dist/types/utils/list.utils.d.ts +2 -8
- package/dist/types/workers/auth.worker.d.ts +6 -0
- package/dist/workers/auth.worker.js +32 -0
- package/dist/workers/auth.worker.js.map +7 -0
- package/package.json +8 -7
- package/dist/cjs/index.cjs.js +0 -71
- package/dist/cjs/index.cjs.js.map +0 -7
- package/dist/esm/canisterStatus-UMNLFNN3.js +0 -2
- package/dist/esm/chunk-QVUY65GN.js +0 -63
- package/dist/esm/chunk-QVUY65GN.js.map +0 -7
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +0 -7
- /package/dist/{esm/canisterStatus-UMNLFNN3.js.map → browser/canisterStatus-CMO3J52U.js.map} +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import type { User } from './types/auth.types';
|
|
1
2
|
import type { Environment } from './types/env.types';
|
|
3
|
+
import type { Unsubscribe } from './types/subscription.types';
|
|
2
4
|
export { signIn, signOut } from './services/auth.services';
|
|
3
5
|
export * from './services/doc.services';
|
|
4
6
|
export * from './services/storage.services';
|
|
5
7
|
export * from './types/auth.types';
|
|
6
8
|
export * from './types/doc.types';
|
|
7
|
-
export
|
|
9
|
+
export * from './types/env.types';
|
|
10
|
+
export { ListOrder, ListPaginate, ListParams, ListResults } from './types/list.types';
|
|
8
11
|
export * from './types/satellite.types';
|
|
9
12
|
export * from './types/storage.types';
|
|
10
|
-
|
|
11
|
-
export declare const initJuno: (env: Environment) => Promise<
|
|
12
|
-
export declare const authSubscribe: (callback: (authUser: User | null) => void) =>
|
|
13
|
+
export * from './types/subscription.types';
|
|
14
|
+
export declare const initJuno: (env: Environment) => Promise<Unsubscribe[]>;
|
|
15
|
+
export declare const authSubscribe: (callback: (authUser: User | null) => void) => Unsubscribe;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { User } from '../types/auth.types';
|
|
2
|
+
import type { Unsubscribe } from '../types/subscription.types';
|
|
2
3
|
import { Store } from './store';
|
|
3
4
|
export declare class AuthStore extends Store<User | null> {
|
|
4
5
|
private static instance;
|
|
@@ -7,7 +8,7 @@ export declare class AuthStore extends Store<User | null> {
|
|
|
7
8
|
static getInstance(): AuthStore;
|
|
8
9
|
set(authUser: User | null): void;
|
|
9
10
|
get(): User | null;
|
|
10
|
-
subscribe(callback: (data: User | null) => void):
|
|
11
|
+
subscribe(callback: (data: User | null) => void): Unsubscribe;
|
|
11
12
|
isLoggedIn(): boolean;
|
|
12
13
|
reset(): void;
|
|
13
14
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { Satellite } from './satellite.types';
|
|
2
|
+
export type EnvironmentWorkerPath = string;
|
|
3
|
+
export type EnvironmentWorker = true | EnvironmentWorkerPath;
|
|
4
|
+
export interface EnvironmentWorkers {
|
|
5
|
+
auth?: EnvironmentWorker;
|
|
6
|
+
}
|
|
2
7
|
export type Environment = {
|
|
3
8
|
localIdentityCanisterId?: string;
|
|
9
|
+
workers?: EnvironmentWorkers;
|
|
4
10
|
} & Required<Pick<Satellite, 'satelliteId'>>;
|
|
@@ -3,15 +3,17 @@ export interface ListResults<T> {
|
|
|
3
3
|
length: bigint;
|
|
4
4
|
matches_length: bigint;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface ListPaginate {
|
|
7
7
|
startAfter?: string;
|
|
8
8
|
limit?: number;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type ListOrderField = 'keys' | 'updated_at' | 'created_at';
|
|
11
|
+
export interface ListOrder {
|
|
11
12
|
desc: boolean;
|
|
13
|
+
field: ListOrderField;
|
|
12
14
|
}
|
|
13
15
|
export interface ListParams {
|
|
14
16
|
matcher?: string;
|
|
15
|
-
paginate?:
|
|
16
|
-
order?:
|
|
17
|
+
paginate?: ListPaginate;
|
|
18
|
+
order?: ListOrder;
|
|
17
19
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Unsubscribe = () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const toNullable: <T>(value?: T | undefined) => [] | [T];
|
|
2
2
|
export declare const fromNullable: <T>(value: [] | [T]) => T | undefined;
|
|
3
3
|
export declare const toArray: <T>(data: T) => Promise<Uint8Array>;
|
|
4
|
-
export declare const fromArray: <T>(data: Uint8Array) => Promise<T>;
|
|
4
|
+
export declare const fromArray: <T>(data: Uint8Array | number[]) => Promise<T>;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
+
import type { ListParams as ListParamsApi } from '../../declarations/satellite/satellite.did';
|
|
1
2
|
import type { ListParams } from '../types/list.types';
|
|
2
|
-
export declare const toListParams: ({ matcher, paginate, order }: ListParams) =>
|
|
3
|
-
matcher: [] | [string];
|
|
4
|
-
paginate: [] | [{
|
|
5
|
-
start_after: [] | [string];
|
|
6
|
-
limit: [] | [bigint];
|
|
7
|
-
}];
|
|
8
|
-
order: [] | [import("../types/list.types").OrderDocs];
|
|
9
|
-
};
|
|
3
|
+
export declare const toListParams: ({ matcher, paginate, order }: ListParams) => ListParamsApi;
|