@junobuild/core-standalone 1.2.1 → 2.0.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.
Files changed (74) hide show
  1. package/dist/browser/canisterStatus-ENEUF6W6.js +2 -0
  2. package/dist/browser/{chunk-EMF4NSTU.js → chunk-GGU5IQIJ.js} +11 -11
  3. package/dist/browser/{chunk-EMF4NSTU.js.map → chunk-GGU5IQIJ.js.map} +2 -2
  4. package/dist/browser/index.js +15 -15
  5. package/dist/browser/index.js.map +4 -4
  6. package/dist/node/index.mjs +27 -27
  7. package/dist/node/index.mjs.map +4 -4
  8. package/dist/types/{constants → auth/constants}/auth.constants.d.ts +1 -0
  9. package/dist/types/auth/helpers/progress.helpers.d.ts +6 -0
  10. package/dist/types/auth/helpers/window.helpers.d.ts +3 -0
  11. package/dist/types/auth/providers/_auth-client.providers.d.ts +74 -0
  12. package/dist/types/auth/providers/internet-identity.providers.d.ts +28 -0
  13. package/dist/types/auth/providers/nfid.providers.d.ts +28 -0
  14. package/dist/types/auth/providers/webauthn.providers.d.ts +40 -0
  15. package/dist/types/auth/services/_user.services.d.ts +11 -0
  16. package/dist/types/auth/services/auth-timout.services.d.ts +3 -0
  17. package/dist/types/{services → auth/services}/auth.services.d.ts +25 -6
  18. package/dist/types/auth/services/user-webauthn.services.d.ts +8 -0
  19. package/dist/types/{stores → auth/stores}/auth.store.d.ts +3 -3
  20. package/dist/types/auth/types/auth-client.d.ts +43 -0
  21. package/dist/types/auth/types/auth.d.ts +63 -0
  22. package/dist/types/{types → auth/types}/errors.d.ts +6 -0
  23. package/dist/types/auth/types/internet-identity.d.ts +23 -0
  24. package/dist/types/auth/types/nfid.d.ts +22 -0
  25. package/dist/types/auth/types/progress.d.ts +20 -0
  26. package/dist/types/auth/types/provider.d.ts +32 -0
  27. package/dist/types/auth/types/user.d.ts +23 -0
  28. package/dist/types/auth/types/webauthn.d.ts +74 -0
  29. package/dist/types/{utils → auth/utils}/auth.utils.d.ts +1 -0
  30. package/dist/types/{api → datastore/api}/doc.api.d.ts +2 -2
  31. package/dist/types/{services → datastore/services}/doc.services.d.ts +3 -3
  32. package/dist/types/{types → datastore/types}/doc.d.ts +1 -1
  33. package/dist/types/{services → functions/services}/functions.services.d.ts +1 -1
  34. package/dist/types/index.d.ts +32 -22
  35. package/dist/types/{api → storage/api}/storage.api.d.ts +2 -2
  36. package/dist/types/{services → storage/services}/storage.services.d.ts +4 -4
  37. package/dist/types/{types/storage.types.d.ts → storage/types/storage.d.ts} +1 -1
  38. package/dist/workers/auth.worker.js +4 -4
  39. package/dist/workers/auth.worker.js.map +3 -3
  40. package/package.json +3 -3
  41. package/dist/browser/canisterStatus-72I5GDMD.js +0 -2
  42. package/dist/types/providers/auth.providers.d.ts +0 -79
  43. package/dist/types/services/_user.services.d.ts +0 -2
  44. package/dist/types/services/auth-timout.services.d.ts +0 -3
  45. package/dist/types/types/auth.d.ts +0 -90
  46. package/dist/workers/_auth.worker.handler.js +0 -43
  47. package/dist/workers/_auth.worker.handler.js.map +0 -7
  48. /package/dist/browser/{canisterStatus-72I5GDMD.js.map → canisterStatus-ENEUF6W6.js.map} +0 -0
  49. /package/dist/types/{types → auth/types}/post-message.d.ts +0 -0
  50. /package/dist/types/{utils → auth/utils}/events.utils.d.ts +0 -0
  51. /package/dist/types/{utils → auth/utils}/window.utils.d.ts +0 -0
  52. /package/dist/types/{workers/_auth.worker.handler.d.ts → auth/workers/auth.worker.d.ts} +0 -0
  53. /package/dist/types/{api → core/api}/actor.api.d.ts +0 -0
  54. /package/dist/types/{constants → core/constants}/call-options.constants.d.ts +0 -0
  55. /package/dist/types/{constants → core/constants}/container.constants.d.ts +0 -0
  56. /package/dist/types/{services/_identity.services.d.ts → core/services/identity.services.d.ts} +0 -0
  57. /package/dist/types/{stores → core/stores}/_agent.factory.d.ts +0 -0
  58. /package/dist/types/{stores → core/stores}/_store.d.ts +0 -0
  59. /package/dist/types/{stores → core/stores}/actor.store.d.ts +0 -0
  60. /package/dist/types/{stores → core/stores}/agent.store.d.ts +0 -0
  61. /package/dist/types/{stores → core/stores}/env.store.d.ts +0 -0
  62. /package/dist/types/{types → core/types}/actor.d.ts +0 -0
  63. /package/dist/types/{types → core/types}/call-options.d.ts +0 -0
  64. /package/dist/types/{types → core/types}/env.d.ts +0 -0
  65. /package/dist/types/{types → core/types}/list.d.ts +0 -0
  66. /package/dist/types/{types → core/types}/satellite.d.ts +0 -0
  67. /package/dist/types/{types → core/types}/subscription.d.ts +0 -0
  68. /package/dist/types/{types → core/types}/utility.d.ts +0 -0
  69. /package/dist/types/{utils → core/utils}/env.utils.d.ts +0 -0
  70. /package/dist/types/{utils → core/utils}/list.utils.d.ts +0 -0
  71. /package/dist/types/{utils → core/utils}/window.env.utils.d.ts +0 -0
  72. /package/dist/types/{utils → datastore/utils}/data.utils.d.ts +0 -0
  73. /package/dist/types/{utils → datastore/utils}/doc.utils.d.ts +0 -0
  74. /package/dist/types/{utils → storage/utils}/crypto.utils.d.ts +0 -0
@@ -1,32 +1,36 @@
1
+ import { isWebAuthnAvailable } from '@junobuild/ic-client/webauthn';
1
2
  import type { Asset, AssetEncoding, AssetKey, EncodingType, Storage } from '@junobuild/storage';
2
- import type { User } from './types/auth';
3
- import type { UserEnvironment } from './types/env';
4
- import type { Unsubscribe } from './types/subscription';
5
- export * from './providers/auth.providers';
6
- export { getIdentityOnce, signIn, signOut, unsafeIdentity } from './services/auth.services';
7
- export * from './services/doc.services';
8
- export * from './services/functions.services';
9
- export * from './services/storage.services';
10
- export type * from './types/auth';
11
- export type * from './types/doc';
12
- export type * from './types/env';
13
- export * from './types/errors';
14
- export { ListOrder, ListPaginate, ListParams, ListResults } from './types/list';
15
- export type * from './types/satellite';
16
- export type * from './types/storage.types';
17
- export type * from './types/subscription';
18
- export type * from './types/utility';
3
+ import type { User } from './auth/types/user';
4
+ import type { UserEnvironment } from './core/types/env';
5
+ import type { Unsubscribe } from './core/types/subscription';
6
+ export * from './auth/providers/internet-identity.providers';
7
+ export * from './auth/providers/nfid.providers';
8
+ export { getIdentityOnce, signIn, signOut, signUp, unsafeIdentity } from './auth/services/auth.services';
9
+ export type * from './auth/types/auth';
10
+ export * from './auth/types/auth-client';
11
+ export * from './auth/types/errors';
12
+ export type * from './auth/types/progress';
13
+ export type * from './auth/types/provider';
14
+ export type * from './auth/types/user';
15
+ export * from './auth/types/webauthn';
16
+ export type * from './core/types/env';
17
+ export { ListOrder, ListPaginate, ListParams, ListResults } from './core/types/list';
18
+ export type * from './core/types/satellite';
19
+ export type * from './core/types/subscription';
20
+ export type * from './core/types/utility';
21
+ export * from './datastore/services/doc.services';
22
+ export type * from './datastore/types/doc';
23
+ export * from './functions/services/functions.services';
24
+ export * from './storage/services/storage.services';
25
+ export type * from './storage/types/storage';
26
+ export { isWebAuthnAvailable };
19
27
  export type { Asset, AssetEncoding, AssetKey, EncodingType, Storage };
20
28
  /**
21
- * Initializes Juno with the provided optional environment parameters.
22
- * If no environment is provided, the variables injected by the Vite or NextJS plugins will be used.
23
29
  * @deprecated Use {@link initSatellite} instead.
24
- * @param {UserEnvironment} [userEnv] - The optional user environment configuration.
25
- * @returns {Promise<Unsubscribe[]>} A promise that resolves to an array of unsubscribe functions.
26
30
  */
27
31
  export declare const initJuno: (userEnv?: UserEnvironment) => Promise<Unsubscribe[]>;
28
32
  /**
29
- * Initializes a Juno satellite with the provided optional environment parameters.
33
+ * Initializes a Satellite with the provided optional environment parameters.
30
34
  * If no environment is provided, the variables injected by the Vite or NextJS plugins will be used.
31
35
  * @param {UserEnvironment} [userEnv] - The optional user environment configuration.
32
36
  * @returns {Promise<Unsubscribe[]>} A promise that resolves to an array of unsubscribe functions.
@@ -37,4 +41,10 @@ export declare const initSatellite: (userEnv?: UserEnvironment) => Promise<Unsub
37
41
  * @param {function(User | null): void} callback - The callback function to execute when the authentication state changes.
38
42
  * @returns {Unsubscribe} A function to unsubscribe from the authentication state changes.
39
43
  */
44
+ export declare const onAuthStateChange: (callback: (authUser: User | null) => void) => Unsubscribe;
45
+ /**
46
+ * @deprecated Use {@link onAuthStateChange} instead.
47
+ */
40
48
  export declare const authSubscribe: (callback: (authUser: User | null) => void) => Unsubscribe;
49
+ export { InternetIdentityConfig, InternetIdentityDomain } from './auth/types/internet-identity';
50
+ export { NFIDConfig } from './auth/types/nfid';
@@ -1,7 +1,7 @@
1
1
  import type { SatelliteDid } from '@junobuild/ic-client/actor';
2
2
  import { type AssetKey, type UploadAsset } from '@junobuild/storage';
3
- import type { ActorReadParams, ActorUpdateParams } from '../types/actor';
4
- import type { ListParams, ListResults } from '../types/list';
3
+ import type { ActorReadParams, ActorUpdateParams } from '../../core/types/actor';
4
+ import type { ListParams, ListResults } from '../../core/types/list';
5
5
  export declare const uploadAsset: ({ asset, ...rest }: {
6
6
  asset: UploadAsset;
7
7
  } & ActorUpdateParams) => Promise<void>;
@@ -1,9 +1,9 @@
1
1
  import type { SatelliteDid } from '@junobuild/ic-client/actor';
2
2
  import type { Asset, AssetKey, Storage } from '@junobuild/storage';
3
- import type { ReadOptions } from '../types/call-options';
4
- import type { ListParams } from '../types/list';
5
- import type { SatelliteOptions } from '../types/satellite';
6
- import type { Assets } from '../types/storage.types';
3
+ import type { ReadOptions } from '../../core/types/call-options';
4
+ import type { ListParams } from '../../core/types/list';
5
+ import type { SatelliteOptions } from '../../core/types/satellite';
6
+ import type { Assets } from '../types/storage';
7
7
  /**
8
8
  * Uploads a blob to the storage.
9
9
  *
@@ -1,6 +1,6 @@
1
1
  import type { SatelliteDid } from '@junobuild/ic-client/actor';
2
2
  import type { Asset } from '@junobuild/storage';
3
- import type { ListResults } from './list';
3
+ import type { ListResults } from '../../core/types/list';
4
4
  /**
5
5
  * Represents a collection of assets with pagination details.
6
6
  * @interface