@junobuild/admin 0.0.7 → 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.
Files changed (43) hide show
  1. package/dist/browser/index.js +14 -14
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/declarations/cmc/cmc.did.d.ts +30 -30
  4. package/dist/declarations/cmc/cmc.factory.did.js +63 -63
  5. package/dist/declarations/cmc/index.d.ts +18 -18
  6. package/dist/declarations/cmc/index.js +22 -22
  7. package/dist/declarations/console/console.did.d.ts +37 -37
  8. package/dist/declarations/console/console.factory.did.js +60 -60
  9. package/dist/declarations/console/console.factory.did.mjs +60 -60
  10. package/dist/declarations/console/index.d.ts +18 -18
  11. package/dist/declarations/console/index.js +22 -22
  12. package/dist/declarations/frontend/frontend.did.d.ts +136 -136
  13. package/dist/declarations/frontend/frontend.factory.did.js +206 -206
  14. package/dist/declarations/frontend/index.d.ts +18 -18
  15. package/dist/declarations/frontend/index.js +22 -22
  16. package/dist/declarations/ic/ic.did.d.ts +63 -63
  17. package/dist/declarations/ic/ic.factory.did.js +126 -126
  18. package/dist/declarations/internet_identity/index.d.ts +18 -18
  19. package/dist/declarations/internet_identity/index.js +22 -22
  20. package/dist/declarations/internet_identity/internet_identity.did.d.ts +136 -136
  21. package/dist/declarations/internet_identity/internet_identity.factory.did.js +231 -231
  22. package/dist/declarations/ledger/index.d.ts +18 -18
  23. package/dist/declarations/ledger/index.js +22 -22
  24. package/dist/declarations/ledger/ledger.did.d.ts +64 -64
  25. package/dist/declarations/ledger/ledger.factory.did.js +96 -96
  26. package/dist/declarations/mission_control/index.d.ts +18 -18
  27. package/dist/declarations/mission_control/index.js +22 -22
  28. package/dist/declarations/mission_control/mission_control.did.d.ts +30 -30
  29. package/dist/declarations/mission_control/mission_control.factory.did.js +48 -48
  30. package/dist/declarations/satellite/index.d.ts +18 -18
  31. package/dist/declarations/satellite/index.js +22 -22
  32. package/dist/declarations/satellite/satellite-deprecated.did.d.ts +186 -0
  33. package/dist/declarations/satellite/satellite-deprecated.factory.did.js +191 -0
  34. package/dist/declarations/satellite/satellite-deprecated.factory.did.mjs +191 -0
  35. package/dist/declarations/satellite/satellite.did.d.ts +124 -120
  36. package/dist/declarations/satellite/satellite.factory.did.js +189 -189
  37. package/dist/declarations/satellite/satellite.factory.did.mjs +189 -189
  38. package/dist/node/index.mjs +23 -23
  39. package/dist/node/index.mjs.map +4 -4
  40. package/dist/types/api/actor.api.d.ts +2 -0
  41. package/dist/types/api/satellite.api.d.ts +3 -0
  42. package/dist/types/services/satellite.services.d.ts +2 -1
  43. package/package.json +1 -1
@@ -1,208 +1,208 @@
1
- export const idlFactory = ({IDL}) => {
2
- const ClearArguments = IDL.Record({});
3
- const BatchId = IDL.Nat;
4
- const Key = IDL.Text;
5
- const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
6
- const CreateAssetArguments = IDL.Record({
7
- key: Key,
8
- content_type: IDL.Text,
9
- headers: IDL.Opt(IDL.Vec(HeaderField)),
10
- allow_raw_access: IDL.Opt(IDL.Bool),
11
- max_age: IDL.Opt(IDL.Nat64),
12
- enable_aliasing: IDL.Opt(IDL.Bool)
13
- });
14
- const UnsetAssetContentArguments = IDL.Record({
15
- key: Key,
16
- content_encoding: IDL.Text
17
- });
18
- const DeleteAssetArguments = IDL.Record({key: Key});
19
- const ChunkId = IDL.Nat;
20
- const SetAssetContentArguments = IDL.Record({
21
- key: Key,
22
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
23
- chunk_ids: IDL.Vec(ChunkId),
24
- content_encoding: IDL.Text
25
- });
26
- const BatchOperationKind = IDL.Variant({
27
- CreateAsset: CreateAssetArguments,
28
- UnsetAssetContent: UnsetAssetContentArguments,
29
- DeleteAsset: DeleteAssetArguments,
30
- SetAssetContent: SetAssetContentArguments,
31
- Clear: ClearArguments
32
- });
33
- const Permission = IDL.Variant({
34
- Prepare: IDL.Null,
35
- ManagePermissions: IDL.Null,
36
- Commit: IDL.Null
37
- });
38
- const GrantPermission = IDL.Record({
39
- permission: Permission,
40
- to_principal: IDL.Principal
41
- });
42
- const HttpRequest = IDL.Record({
43
- url: IDL.Text,
44
- method: IDL.Text,
45
- body: IDL.Vec(IDL.Nat8),
46
- headers: IDL.Vec(HeaderField)
47
- });
48
- const StreamingCallbackToken = IDL.Record({
49
- key: Key,
50
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
51
- index: IDL.Nat,
52
- content_encoding: IDL.Text
53
- });
54
- const StreamingCallbackHttpResponse = IDL.Record({
55
- token: IDL.Opt(StreamingCallbackToken),
56
- body: IDL.Vec(IDL.Nat8)
57
- });
58
- const StreamingStrategy = IDL.Variant({
59
- Callback: IDL.Record({
60
- token: StreamingCallbackToken,
61
- callback: IDL.Func(
62
- [StreamingCallbackToken],
63
- [IDL.Opt(StreamingCallbackHttpResponse)],
64
- ['query']
65
- )
66
- })
67
- });
68
- const HttpResponse = IDL.Record({
69
- body: IDL.Vec(IDL.Nat8),
70
- headers: IDL.Vec(HeaderField),
71
- streaming_strategy: IDL.Opt(StreamingStrategy),
72
- status_code: IDL.Nat16
73
- });
74
- const Time = IDL.Int;
75
- const ListPermitted = IDL.Record({permission: Permission});
76
- const RevokePermission = IDL.Record({
77
- permission: Permission,
78
- of_principal: IDL.Principal
79
- });
80
- const SetAssetPropertiesArguments = IDL.Record({
81
- key: Key,
82
- headers: IDL.Opt(IDL.Opt(IDL.Vec(HeaderField))),
83
- allow_raw_access: IDL.Opt(IDL.Opt(IDL.Bool)),
84
- max_age: IDL.Opt(IDL.Opt(IDL.Nat64))
85
- });
86
- const ValidationResult = IDL.Variant({Ok: IDL.Text, Err: IDL.Text});
87
- return IDL.Service({
88
- authorize: IDL.Func([IDL.Principal], [], []),
89
- certified_tree: IDL.Func(
90
- [IDL.Record({})],
91
- [
92
- IDL.Record({
93
- certificate: IDL.Vec(IDL.Nat8),
94
- tree: IDL.Vec(IDL.Nat8)
95
- })
96
- ],
97
- ['query']
98
- ),
99
- clear: IDL.Func([ClearArguments], [], []),
100
- commit_batch: IDL.Func(
101
- [
102
- IDL.Record({
103
- batch_id: BatchId,
104
- operations: IDL.Vec(BatchOperationKind)
105
- })
106
- ],
107
- [],
108
- []
109
- ),
110
- create_asset: IDL.Func([CreateAssetArguments], [], []),
111
- create_batch: IDL.Func([IDL.Record({})], [IDL.Record({batch_id: BatchId})], []),
112
- create_chunk: IDL.Func(
113
- [IDL.Record({content: IDL.Vec(IDL.Nat8), batch_id: BatchId})],
114
- [IDL.Record({chunk_id: ChunkId})],
115
- []
116
- ),
117
- deauthorize: IDL.Func([IDL.Principal], [], []),
118
- delete_asset: IDL.Func([DeleteAssetArguments], [], []),
119
- get: IDL.Func(
120
- [IDL.Record({key: Key, accept_encodings: IDL.Vec(IDL.Text)})],
121
- [
122
- IDL.Record({
123
- content: IDL.Vec(IDL.Nat8),
124
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
125
- content_type: IDL.Text,
126
- content_encoding: IDL.Text,
127
- total_length: IDL.Nat
128
- })
129
- ],
130
- ['query']
131
- ),
132
- get_asset_properties: IDL.Func(
133
- [Key],
134
- [
135
- IDL.Record({
136
- headers: IDL.Opt(IDL.Vec(HeaderField)),
137
- allow_raw_access: IDL.Opt(IDL.Bool),
138
- max_age: IDL.Opt(IDL.Nat64)
139
- })
140
- ],
141
- ['query']
142
- ),
143
- get_chunk: IDL.Func(
144
- [
145
- IDL.Record({
146
- key: Key,
147
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
148
- index: IDL.Nat,
149
- content_encoding: IDL.Text
150
- })
151
- ],
152
- [IDL.Record({content: IDL.Vec(IDL.Nat8)})],
153
- ['query']
154
- ),
155
- grant_permission: IDL.Func([GrantPermission], [], []),
156
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
157
- http_request_streaming_callback: IDL.Func(
158
- [StreamingCallbackToken],
159
- [IDL.Opt(StreamingCallbackHttpResponse)],
160
- ['query']
161
- ),
162
- list: IDL.Func(
163
- [IDL.Record({})],
164
- [
165
- IDL.Vec(
166
- IDL.Record({
167
- key: Key,
168
- encodings: IDL.Vec(
169
- IDL.Record({
170
- modified: Time,
171
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
172
- length: IDL.Nat,
173
- content_encoding: IDL.Text
174
- })
175
- ),
176
- content_type: IDL.Text
177
- })
178
- )
179
- ],
180
- ['query']
181
- ),
182
- list_authorized: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
183
- list_permitted: IDL.Func([ListPermitted], [IDL.Vec(IDL.Principal)], ['query']),
184
- revoke_permission: IDL.Func([RevokePermission], [], []),
185
- set_asset_content: IDL.Func([SetAssetContentArguments], [], []),
186
- set_asset_properties: IDL.Func([SetAssetPropertiesArguments], [], []),
187
- store: IDL.Func(
188
- [
189
- IDL.Record({
190
- key: Key,
191
- content: IDL.Vec(IDL.Nat8),
192
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
193
- content_type: IDL.Text,
194
- content_encoding: IDL.Text
195
- })
196
- ],
197
- [],
198
- []
199
- ),
200
- take_ownership: IDL.Func([], [], []),
201
- unset_asset_content: IDL.Func([UnsetAssetContentArguments], [], []),
202
- validate_grant_permission: IDL.Func([GrantPermission], [ValidationResult], []),
203
- validate_revoke_permission: IDL.Func([RevokePermission], [ValidationResult], [])
204
- });
1
+ export const idlFactory = ({ IDL }) => {
2
+ const ClearArguments = IDL.Record({});
3
+ const BatchId = IDL.Nat;
4
+ const Key = IDL.Text;
5
+ const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
6
+ const CreateAssetArguments = IDL.Record({
7
+ key: Key,
8
+ content_type: IDL.Text,
9
+ headers: IDL.Opt(IDL.Vec(HeaderField)),
10
+ allow_raw_access: IDL.Opt(IDL.Bool),
11
+ max_age: IDL.Opt(IDL.Nat64),
12
+ enable_aliasing: IDL.Opt(IDL.Bool)
13
+ });
14
+ const UnsetAssetContentArguments = IDL.Record({
15
+ key: Key,
16
+ content_encoding: IDL.Text
17
+ });
18
+ const DeleteAssetArguments = IDL.Record({ key: Key });
19
+ const ChunkId = IDL.Nat;
20
+ const SetAssetContentArguments = IDL.Record({
21
+ key: Key,
22
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
23
+ chunk_ids: IDL.Vec(ChunkId),
24
+ content_encoding: IDL.Text
25
+ });
26
+ const BatchOperationKind = IDL.Variant({
27
+ CreateAsset: CreateAssetArguments,
28
+ UnsetAssetContent: UnsetAssetContentArguments,
29
+ DeleteAsset: DeleteAssetArguments,
30
+ SetAssetContent: SetAssetContentArguments,
31
+ Clear: ClearArguments
32
+ });
33
+ const Permission = IDL.Variant({
34
+ Prepare: IDL.Null,
35
+ ManagePermissions: IDL.Null,
36
+ Commit: IDL.Null
37
+ });
38
+ const GrantPermission = IDL.Record({
39
+ permission: Permission,
40
+ to_principal: IDL.Principal
41
+ });
42
+ const HttpRequest = IDL.Record({
43
+ url: IDL.Text,
44
+ method: IDL.Text,
45
+ body: IDL.Vec(IDL.Nat8),
46
+ headers: IDL.Vec(HeaderField)
47
+ });
48
+ const StreamingCallbackToken = IDL.Record({
49
+ key: Key,
50
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
51
+ index: IDL.Nat,
52
+ content_encoding: IDL.Text
53
+ });
54
+ const StreamingCallbackHttpResponse = IDL.Record({
55
+ token: IDL.Opt(StreamingCallbackToken),
56
+ body: IDL.Vec(IDL.Nat8)
57
+ });
58
+ const StreamingStrategy = IDL.Variant({
59
+ Callback: IDL.Record({
60
+ token: StreamingCallbackToken,
61
+ callback: IDL.Func(
62
+ [StreamingCallbackToken],
63
+ [IDL.Opt(StreamingCallbackHttpResponse)],
64
+ ['query']
65
+ )
66
+ })
67
+ });
68
+ const HttpResponse = IDL.Record({
69
+ body: IDL.Vec(IDL.Nat8),
70
+ headers: IDL.Vec(HeaderField),
71
+ streaming_strategy: IDL.Opt(StreamingStrategy),
72
+ status_code: IDL.Nat16
73
+ });
74
+ const Time = IDL.Int;
75
+ const ListPermitted = IDL.Record({ permission: Permission });
76
+ const RevokePermission = IDL.Record({
77
+ permission: Permission,
78
+ of_principal: IDL.Principal
79
+ });
80
+ const SetAssetPropertiesArguments = IDL.Record({
81
+ key: Key,
82
+ headers: IDL.Opt(IDL.Opt(IDL.Vec(HeaderField))),
83
+ allow_raw_access: IDL.Opt(IDL.Opt(IDL.Bool)),
84
+ max_age: IDL.Opt(IDL.Opt(IDL.Nat64))
85
+ });
86
+ const ValidationResult = IDL.Variant({ Ok: IDL.Text, Err: IDL.Text });
87
+ return IDL.Service({
88
+ authorize: IDL.Func([IDL.Principal], [], []),
89
+ certified_tree: IDL.Func(
90
+ [IDL.Record({})],
91
+ [
92
+ IDL.Record({
93
+ certificate: IDL.Vec(IDL.Nat8),
94
+ tree: IDL.Vec(IDL.Nat8)
95
+ })
96
+ ],
97
+ ['query']
98
+ ),
99
+ clear: IDL.Func([ClearArguments], [], []),
100
+ commit_batch: IDL.Func(
101
+ [
102
+ IDL.Record({
103
+ batch_id: BatchId,
104
+ operations: IDL.Vec(BatchOperationKind)
105
+ })
106
+ ],
107
+ [],
108
+ []
109
+ ),
110
+ create_asset: IDL.Func([CreateAssetArguments], [], []),
111
+ create_batch: IDL.Func([IDL.Record({})], [IDL.Record({ batch_id: BatchId })], []),
112
+ create_chunk: IDL.Func(
113
+ [IDL.Record({ content: IDL.Vec(IDL.Nat8), batch_id: BatchId })],
114
+ [IDL.Record({ chunk_id: ChunkId })],
115
+ []
116
+ ),
117
+ deauthorize: IDL.Func([IDL.Principal], [], []),
118
+ delete_asset: IDL.Func([DeleteAssetArguments], [], []),
119
+ get: IDL.Func(
120
+ [IDL.Record({ key: Key, accept_encodings: IDL.Vec(IDL.Text) })],
121
+ [
122
+ IDL.Record({
123
+ content: IDL.Vec(IDL.Nat8),
124
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
125
+ content_type: IDL.Text,
126
+ content_encoding: IDL.Text,
127
+ total_length: IDL.Nat
128
+ })
129
+ ],
130
+ ['query']
131
+ ),
132
+ get_asset_properties: IDL.Func(
133
+ [Key],
134
+ [
135
+ IDL.Record({
136
+ headers: IDL.Opt(IDL.Vec(HeaderField)),
137
+ allow_raw_access: IDL.Opt(IDL.Bool),
138
+ max_age: IDL.Opt(IDL.Nat64)
139
+ })
140
+ ],
141
+ ['query']
142
+ ),
143
+ get_chunk: IDL.Func(
144
+ [
145
+ IDL.Record({
146
+ key: Key,
147
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
148
+ index: IDL.Nat,
149
+ content_encoding: IDL.Text
150
+ })
151
+ ],
152
+ [IDL.Record({ content: IDL.Vec(IDL.Nat8) })],
153
+ ['query']
154
+ ),
155
+ grant_permission: IDL.Func([GrantPermission], [], []),
156
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
157
+ http_request_streaming_callback: IDL.Func(
158
+ [StreamingCallbackToken],
159
+ [IDL.Opt(StreamingCallbackHttpResponse)],
160
+ ['query']
161
+ ),
162
+ list: IDL.Func(
163
+ [IDL.Record({})],
164
+ [
165
+ IDL.Vec(
166
+ IDL.Record({
167
+ key: Key,
168
+ encodings: IDL.Vec(
169
+ IDL.Record({
170
+ modified: Time,
171
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
172
+ length: IDL.Nat,
173
+ content_encoding: IDL.Text
174
+ })
175
+ ),
176
+ content_type: IDL.Text
177
+ })
178
+ )
179
+ ],
180
+ ['query']
181
+ ),
182
+ list_authorized: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
183
+ list_permitted: IDL.Func([ListPermitted], [IDL.Vec(IDL.Principal)], ['query']),
184
+ revoke_permission: IDL.Func([RevokePermission], [], []),
185
+ set_asset_content: IDL.Func([SetAssetContentArguments], [], []),
186
+ set_asset_properties: IDL.Func([SetAssetPropertiesArguments], [], []),
187
+ store: IDL.Func(
188
+ [
189
+ IDL.Record({
190
+ key: Key,
191
+ content: IDL.Vec(IDL.Nat8),
192
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
193
+ content_type: IDL.Text,
194
+ content_encoding: IDL.Text
195
+ })
196
+ ],
197
+ [],
198
+ []
199
+ ),
200
+ take_ownership: IDL.Func([], [], []),
201
+ unset_asset_content: IDL.Func([UnsetAssetContentArguments], [], []),
202
+ validate_grant_permission: IDL.Func([GrantPermission], [ValidationResult], []),
203
+ validate_revoke_permission: IDL.Func([RevokePermission], [ValidationResult], [])
204
+ });
205
205
  };
206
- export const init = ({IDL}) => {
207
- return [];
206
+ export const init = ({ IDL }) => {
207
+ return [];
208
208
  };
@@ -1,25 +1,25 @@
1
- import type {ActorConfig, ActorSubclass, Agent, HttpAgentOptions} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
1
+ import type { ActorConfig, ActorSubclass, Agent, HttpAgentOptions } from '@dfinity/agent';
2
+ import type { IDL } from '@dfinity/candid';
3
+ import type { Principal } from '@dfinity/principal';
4
4
 
5
- import {_SERVICE} from './frontend.did';
5
+ import { _SERVICE } from './frontend.did';
6
6
 
7
7
  export declare const idlFactory: IDL.InterfaceFactory;
8
8
  export declare const canisterId: string;
9
9
 
10
10
  export declare interface CreateActorOptions {
11
- /**
12
- * @see {@link Agent}
13
- */
14
- agent?: Agent;
15
- /**
16
- * @see {@link HttpAgentOptions}
17
- */
18
- agentOptions?: HttpAgentOptions;
19
- /**
20
- * @see {@link ActorConfig}
21
- */
22
- actorOptions?: ActorConfig;
11
+ /**
12
+ * @see {@link Agent}
13
+ */
14
+ agent?: Agent;
15
+ /**
16
+ * @see {@link HttpAgentOptions}
17
+ */
18
+ agentOptions?: HttpAgentOptions;
19
+ /**
20
+ * @see {@link ActorConfig}
21
+ */
22
+ actorOptions?: ActorConfig;
23
23
  }
24
24
 
25
25
  /**
@@ -34,8 +34,8 @@ export declare interface CreateActorOptions {
34
34
  * @see {@link ActorConfig}
35
35
  */
36
36
  export declare const createActor: (
37
- canisterId: string | Principal,
38
- options?: CreateActorOptions
37
+ canisterId: string | Principal,
38
+ options?: CreateActorOptions
39
39
  ) => ActorSubclass<_SERVICE>;
40
40
 
41
41
  /**
@@ -1,32 +1,32 @@
1
- import {Actor, HttpAgent} from '@dfinity/agent';
1
+ import { Actor, HttpAgent } from '@dfinity/agent';
2
2
 
3
3
  // Imports and re-exports candid interface
4
- import {idlFactory} from './frontend.did.js';
5
- export {idlFactory} from './frontend.did.js';
4
+ import { idlFactory } from './frontend.did.js';
5
+ export { idlFactory } from './frontend.did.js';
6
6
 
7
7
  // CANISTER_ID is replaced by webpack based on node environment
8
8
 
9
9
  export const createActor = (canisterId, options = {}) => {
10
- const agent = options.agent || new HttpAgent({...options.agentOptions});
10
+ const agent = options.agent || new HttpAgent({ ...options.agentOptions });
11
11
 
12
- if (options.agent && options.agentOptions) {
13
- console.warn(
14
- 'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
15
- );
16
- }
12
+ if (options.agent && options.agentOptions) {
13
+ console.warn(
14
+ 'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
15
+ );
16
+ }
17
17
 
18
- // Fetch root key for certificate validation during development
19
- if (process.env.DFX_NETWORK !== 'ic') {
20
- agent.fetchRootKey().catch((err) => {
21
- console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
22
- console.error(err);
23
- });
24
- }
18
+ // Fetch root key for certificate validation during development
19
+ if (process.env.DFX_NETWORK !== 'ic') {
20
+ agent.fetchRootKey().catch((err) => {
21
+ console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
22
+ console.error(err);
23
+ });
24
+ }
25
25
 
26
- // Creates an actor with using the candid interface and the HttpAgent
27
- return Actor.createActor(idlFactory, {
28
- agent,
29
- canisterId,
30
- ...options.actorOptions
31
- });
26
+ // Creates an actor with using the candid interface and the HttpAgent
27
+ return Actor.createActor(idlFactory, {
28
+ agent,
29
+ canisterId,
30
+ ...options.actorOptions
31
+ });
32
32
  };