@junobuild/admin 0.0.44 → 0.0.45

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 (29) hide show
  1. package/declarations/ic/ic.did.d.ts +32 -20
  2. package/declarations/mission_control/mission_control.did.d.ts +9 -7
  3. package/declarations/mission_control/mission_control.factory.did.js +2 -2
  4. package/declarations/orbiter/orbiter.did.d.ts +42 -0
  5. package/declarations/orbiter/orbiter.factory.did.js +48 -0
  6. package/declarations/orbiter/orbiter.factory.did.mjs +192 -0
  7. package/declarations/satellite/satellite.did.d.ts +5 -0
  8. package/declarations/satellite/satellite.factory.did.js +27 -20
  9. package/declarations/satellite/satellite.factory.did.mjs +27 -20
  10. package/dist/browser/index.js +7 -7
  11. package/dist/browser/index.js.map +4 -4
  12. package/dist/declarations/ic/ic.did.d.ts +32 -20
  13. package/dist/declarations/mission_control/mission_control.did.d.ts +9 -7
  14. package/dist/declarations/mission_control/mission_control.factory.did.js +2 -2
  15. package/dist/declarations/orbiter/orbiter.did.d.ts +42 -0
  16. package/dist/declarations/orbiter/orbiter.factory.did.js +48 -0
  17. package/dist/declarations/orbiter/orbiter.factory.did.mjs +192 -0
  18. package/dist/declarations/satellite/satellite.did.d.ts +5 -0
  19. package/dist/declarations/satellite/satellite.factory.did.js +27 -20
  20. package/dist/declarations/satellite/satellite.factory.did.mjs +27 -20
  21. package/dist/node/index.mjs +7 -7
  22. package/dist/node/index.mjs.map +4 -4
  23. package/dist/types/api/ic.api.d.ts +5 -0
  24. package/dist/types/api/satellite.api.d.ts +3 -0
  25. package/dist/types/index.d.ts +8 -7
  26. package/dist/types/services/satellite.services.d.ts +7 -0
  27. package/dist/types/types/build.types.d.ts +1 -0
  28. package/dist/types/utils/actor.utils.d.ts +3 -1
  29. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
1
  import type {ActorMethod} from '@dfinity/agent';
2
+ import type {IDL} from '@dfinity/candid';
2
3
  import type {Principal} from '@dfinity/principal';
3
4
 
4
5
  export type bitcoin_address = string;
5
6
  export type bitcoin_network = {mainnet: null} | {testnet: null};
6
- export type block_hash = Uint8Array;
7
+ export type block_hash = Uint8Array | number[];
7
8
  export type canister_id = Principal;
8
9
  export interface canister_settings {
9
10
  freezing_threshold: [] | [bigint];
@@ -24,7 +25,7 @@ export type change_details =
24
25
  | {
25
26
  code_deployment: {
26
27
  mode: {reinstall: null} | {upgrade: null} | {install: null};
27
- module_hash: Uint8Array;
28
+ module_hash: Uint8Array | number[];
28
29
  };
29
30
  }
30
31
  | {controllers_change: {controllers: Array<Principal>}}
@@ -54,11 +55,11 @@ export interface get_current_fee_percentiles_request {
54
55
  }
55
56
  export interface get_utxos_request {
56
57
  network: bitcoin_network;
57
- filter: [] | [{page: Uint8Array} | {min_confirmations: number}];
58
+ filter: [] | [{page: Uint8Array | number[]} | {min_confirmations: number}];
58
59
  address: bitcoin_address;
59
60
  }
60
61
  export interface get_utxos_response {
61
- next_page: [] | [Uint8Array];
62
+ next_page: [] | [Uint8Array | number[]];
62
63
  tip_height: number;
63
64
  tip_block_hash: block_hash;
64
65
  utxos: Array<utxo>;
@@ -69,17 +70,17 @@ export interface http_header {
69
70
  }
70
71
  export interface http_response {
71
72
  status: bigint;
72
- body: Uint8Array;
73
+ body: Uint8Array | number[];
73
74
  headers: Array<http_header>;
74
75
  }
75
76
  export type millisatoshi_per_byte = bigint;
76
77
  export interface outpoint {
77
- txid: Uint8Array;
78
+ txid: Uint8Array | number[];
78
79
  vout: number;
79
80
  }
80
81
  export type satoshi = bigint;
81
82
  export interface send_transaction_request {
82
- transaction: Uint8Array;
83
+ transaction: Uint8Array | number[];
83
84
  network: bitcoin_network;
84
85
  }
85
86
  export interface utxo {
@@ -87,12 +88,12 @@ export interface utxo {
87
88
  value: satoshi;
88
89
  outpoint: outpoint;
89
90
  }
90
- export type wasm_module = Uint8Array;
91
+ export type wasm_module = Uint8Array | number[];
91
92
  export interface _SERVICE {
92
93
  bitcoin_get_balance: ActorMethod<[get_balance_request], satoshi>;
93
94
  bitcoin_get_current_fee_percentiles: ActorMethod<
94
95
  [get_current_fee_percentiles_request],
95
- BigUint64Array
96
+ BigUint64Array | bigint[]
96
97
  >;
97
98
  bitcoin_get_utxos: ActorMethod<[get_utxos_request], get_utxos_response>;
98
99
  bitcoin_send_transaction: ActorMethod<[send_transaction_request], undefined>;
@@ -100,7 +101,7 @@ export interface _SERVICE {
100
101
  [{canister_id: canister_id; num_requested_changes: [] | [bigint]}],
101
102
  {
102
103
  controllers: Array<Principal>;
103
- module_hash: [] | [Uint8Array];
104
+ module_hash: [] | [Uint8Array | number[]];
104
105
  recent_changes: Array<change>;
105
106
  total_num_changes: bigint;
106
107
  }
@@ -113,7 +114,7 @@ export interface _SERVICE {
113
114
  cycles: bigint;
114
115
  settings: definite_canister_settings;
115
116
  idle_cycles_burned_per_day: bigint;
116
- module_hash: [] | [Uint8Array];
117
+ module_hash: [] | [Uint8Array | number[]];
117
118
  }
118
119
  >;
119
120
  create_canister: ActorMethod<
@@ -132,10 +133,13 @@ export interface _SERVICE {
132
133
  {
133
134
  key_id: {name: string; curve: ecdsa_curve};
134
135
  canister_id: [] | [canister_id];
135
- derivation_path: Array<Uint8Array>;
136
+ derivation_path: Array<Uint8Array | number[]>;
136
137
  }
137
138
  ],
138
- {public_key: Uint8Array; chain_code: Uint8Array}
139
+ {
140
+ public_key: Uint8Array | number[];
141
+ chain_code: Uint8Array | number[];
142
+ }
139
143
  >;
140
144
  http_request: ActorMethod<
141
145
  [
@@ -143,8 +147,15 @@ export interface _SERVICE {
143
147
  url: string;
144
148
  method: {get: null} | {head: null} | {post: null};
145
149
  max_response_bytes: [] | [bigint];
146
- body: [] | [Uint8Array];
147
- transform: [] | [{function: [Principal, string]; context: Uint8Array}];
150
+ body: [] | [Uint8Array | number[]];
151
+ transform:
152
+ | []
153
+ | [
154
+ {
155
+ function: [Principal, string];
156
+ context: Uint8Array | number[];
157
+ }
158
+ ];
148
159
  headers: Array<http_header>;
149
160
  }
150
161
  ],
@@ -153,7 +164,7 @@ export interface _SERVICE {
153
164
  install_code: ActorMethod<
154
165
  [
155
166
  {
156
- arg: Uint8Array;
167
+ arg: Uint8Array | number[];
157
168
  wasm_module: wasm_module;
158
169
  mode: {reinstall: null} | {upgrade: null} | {install: null};
159
170
  canister_id: canister_id;
@@ -173,16 +184,16 @@ export interface _SERVICE {
173
184
  {canister_id: canister_id}
174
185
  >;
175
186
  provisional_top_up_canister: ActorMethod<[{canister_id: canister_id; amount: bigint}], undefined>;
176
- raw_rand: ActorMethod<[], Uint8Array>;
187
+ raw_rand: ActorMethod<[], Uint8Array | number[]>;
177
188
  sign_with_ecdsa: ActorMethod<
178
189
  [
179
190
  {
180
191
  key_id: {name: string; curve: ecdsa_curve};
181
- derivation_path: Array<Uint8Array>;
182
- message_hash: Uint8Array;
192
+ derivation_path: Array<Uint8Array | number[]>;
193
+ message_hash: Uint8Array | number[];
183
194
  }
184
195
  ],
185
- {signature: Uint8Array}
196
+ {signature: Uint8Array | number[]}
186
197
  >;
187
198
  start_canister: ActorMethod<[{canister_id: canister_id}], undefined>;
188
199
  stop_canister: ActorMethod<[{canister_id: canister_id}], undefined>;
@@ -206,3 +217,4 @@ export interface _SERVICE {
206
217
  undefined
207
218
  >;
208
219
  }
220
+ export declare const idlFactory: IDL.InterfaceFactory;
@@ -1,4 +1,5 @@
1
1
  import type {ActorMethod} from '@dfinity/agent';
2
+ import type {IDL} from '@dfinity/candid';
2
3
  import type {Principal} from '@dfinity/principal';
3
4
 
4
5
  export type CanisterStatusType = {stopped: null} | {stopping: null} | {running: null};
@@ -14,12 +15,6 @@ export interface CronJobStatusesConfig {
14
15
  enabled: boolean;
15
16
  cycles_threshold: [] | [bigint];
16
17
  }
17
- export interface DefiniteCanisterSettings {
18
- freezing_threshold: bigint;
19
- controllers: Array<Principal>;
20
- memory_allocation: bigint;
21
- compute_allocation: bigint;
22
- }
23
18
  export interface DepositCyclesArgs {
24
19
  cycles: bigint;
25
20
  destination_id: Principal;
@@ -37,11 +32,17 @@ export interface Satellite {
37
32
  created_at: bigint;
38
33
  satellite_id: Principal;
39
34
  }
35
+ export interface SegmentCanisterSettings {
36
+ freezing_threshold: bigint;
37
+ controllers: Array<Principal>;
38
+ memory_allocation: bigint;
39
+ compute_allocation: bigint;
40
+ }
40
41
  export interface SegmentCanisterStatus {
41
42
  status: CanisterStatusType;
42
43
  memory_size: bigint;
43
44
  cycles: bigint;
44
- settings: DefiniteCanisterSettings;
45
+ settings: SegmentCanisterSettings;
45
46
  idle_cycles_burned_per_day: bigint;
46
47
  module_hash: [] | [Uint8Array | number[]];
47
48
  }
@@ -107,3 +108,4 @@ export interface _SERVICE {
107
108
  top_up: ActorMethod<[Principal, Tokens], undefined>;
108
109
  version: ActorMethod<[], string>;
109
110
  }
111
+ export declare const idlFactory: IDL.InterfaceFactory;
@@ -32,7 +32,7 @@ export const idlFactory = ({IDL}) => {
32
32
  stopping: IDL.Null,
33
33
  running: IDL.Null
34
34
  });
35
- const DefiniteCanisterSettings = IDL.Record({
35
+ const SegmentCanisterSettings = IDL.Record({
36
36
  freezing_threshold: IDL.Nat,
37
37
  controllers: IDL.Vec(IDL.Principal),
38
38
  memory_allocation: IDL.Nat,
@@ -42,7 +42,7 @@ export const idlFactory = ({IDL}) => {
42
42
  status: CanisterStatusType,
43
43
  memory_size: IDL.Nat,
44
44
  cycles: IDL.Nat,
45
- settings: DefiniteCanisterSettings,
45
+ settings: SegmentCanisterSettings,
46
46
  idle_cycles_burned_per_day: IDL.Nat,
47
47
  module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
48
48
  });
@@ -1,10 +1,47 @@
1
1
  import type {ActorMethod} from '@dfinity/agent';
2
+ import type {IDL} from '@dfinity/candid';
2
3
  import type {Principal} from '@dfinity/principal';
3
4
 
4
5
  export interface AnalyticKey {
5
6
  key: string;
6
7
  collected_at: bigint;
7
8
  }
9
+ export interface AnalyticsBrowsersPageViews {
10
+ safari: number;
11
+ opera: number;
12
+ others: number;
13
+ firefox: number;
14
+ chrome: number;
15
+ }
16
+ export interface AnalyticsClientsPageViews {
17
+ browsers: AnalyticsBrowsersPageViews;
18
+ devices: AnalyticsDevicesPageViews;
19
+ }
20
+ export interface AnalyticsDevicesPageViews {
21
+ desktop: number;
22
+ others: number;
23
+ mobile: number;
24
+ }
25
+ export interface AnalyticsMetricsPageViews {
26
+ bounce_rate: number;
27
+ average_page_views_per_session: number;
28
+ daily_total_page_views: Array<[CalendarDate, number]>;
29
+ total_page_views: number;
30
+ unique_page_views: bigint;
31
+ unique_sessions: bigint;
32
+ }
33
+ export interface AnalyticsTop10PageViews {
34
+ referrers: Array<[string, number]>;
35
+ pages: Array<[string, number]>;
36
+ }
37
+ export interface AnalyticsTrackEvents {
38
+ total: Array<[string, number]>;
39
+ }
40
+ export interface CalendarDate {
41
+ day: number;
42
+ month: number;
43
+ year: number;
44
+ }
8
45
  export interface Controller {
9
46
  updated_at: bigint;
10
47
  metadata: Array<[string, string]>;
@@ -101,7 +138,11 @@ export interface _SERVICE {
101
138
  del_satellite_config: ActorMethod<[Principal, DelSatelliteConfig], undefined>;
102
139
  deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
103
140
  get_page_views: ActorMethod<[GetAnalytics], Array<[AnalyticKey, PageView]>>;
141
+ get_page_views_analytics_clients: ActorMethod<[GetAnalytics], AnalyticsClientsPageViews>;
142
+ get_page_views_analytics_metrics: ActorMethod<[GetAnalytics], AnalyticsMetricsPageViews>;
143
+ get_page_views_analytics_top_10: ActorMethod<[GetAnalytics], AnalyticsTop10PageViews>;
104
144
  get_track_events: ActorMethod<[GetAnalytics], Array<[AnalyticKey, TrackEvent]>>;
145
+ get_track_events_analytics: ActorMethod<[GetAnalytics], AnalyticsTrackEvents>;
105
146
  list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
106
147
  list_satellite_configs: ActorMethod<[], Array<[Principal, OrbiterSatelliteConfig]>>;
107
148
  memory_size: ActorMethod<[], MemorySize>;
@@ -116,3 +157,4 @@ export interface _SERVICE {
116
157
  set_track_events: ActorMethod<[Array<[AnalyticKey, SetTrackEvent]>], Result_1>;
117
158
  version: ActorMethod<[], string>;
118
159
  }
160
+ export declare const idlFactory: IDL.InterfaceFactory;
@@ -44,6 +44,39 @@ export const idlFactory = ({IDL}) => {
44
44
  device: PageViewDevice,
45
45
  user_agent: IDL.Opt(IDL.Text)
46
46
  });
47
+ const AnalyticsBrowsersPageViews = IDL.Record({
48
+ safari: IDL.Float64,
49
+ opera: IDL.Float64,
50
+ others: IDL.Float64,
51
+ firefox: IDL.Float64,
52
+ chrome: IDL.Float64
53
+ });
54
+ const AnalyticsDevicesPageViews = IDL.Record({
55
+ desktop: IDL.Float64,
56
+ others: IDL.Float64,
57
+ mobile: IDL.Float64
58
+ });
59
+ const AnalyticsClientsPageViews = IDL.Record({
60
+ browsers: AnalyticsBrowsersPageViews,
61
+ devices: AnalyticsDevicesPageViews
62
+ });
63
+ const CalendarDate = IDL.Record({
64
+ day: IDL.Nat8,
65
+ month: IDL.Nat8,
66
+ year: IDL.Int32
67
+ });
68
+ const AnalyticsMetricsPageViews = IDL.Record({
69
+ bounce_rate: IDL.Float64,
70
+ average_page_views_per_session: IDL.Float64,
71
+ daily_total_page_views: IDL.Vec(IDL.Tuple(CalendarDate, IDL.Nat32)),
72
+ total_page_views: IDL.Nat32,
73
+ unique_page_views: IDL.Nat64,
74
+ unique_sessions: IDL.Nat64
75
+ });
76
+ const AnalyticsTop10PageViews = IDL.Record({
77
+ referrers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)),
78
+ pages: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))
79
+ });
47
80
  const TrackEvent = IDL.Record({
48
81
  updated_at: IDL.Nat64,
49
82
  session_id: IDL.Text,
@@ -52,6 +85,9 @@ export const idlFactory = ({IDL}) => {
52
85
  created_at: IDL.Nat64,
53
86
  satellite_id: IDL.Principal
54
87
  });
88
+ const AnalyticsTrackEvents = IDL.Record({
89
+ total: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))
90
+ });
55
91
  const OrbiterSatelliteConfig = IDL.Record({
56
92
  updated_at: IDL.Nat64,
57
93
  created_at: IDL.Nat64,
@@ -109,11 +145,23 @@ export const idlFactory = ({IDL}) => {
109
145
  [IDL.Vec(IDL.Tuple(AnalyticKey, PageView))],
110
146
  ['query']
111
147
  ),
148
+ get_page_views_analytics_clients: IDL.Func(
149
+ [GetAnalytics],
150
+ [AnalyticsClientsPageViews],
151
+ ['query']
152
+ ),
153
+ get_page_views_analytics_metrics: IDL.Func(
154
+ [GetAnalytics],
155
+ [AnalyticsMetricsPageViews],
156
+ ['query']
157
+ ),
158
+ get_page_views_analytics_top_10: IDL.Func([GetAnalytics], [AnalyticsTop10PageViews], ['query']),
112
159
  get_track_events: IDL.Func(
113
160
  [GetAnalytics],
114
161
  [IDL.Vec(IDL.Tuple(AnalyticKey, TrackEvent))],
115
162
  ['query']
116
163
  ),
164
+ get_track_events_analytics: IDL.Func([GetAnalytics], [AnalyticsTrackEvents], ['query']),
117
165
  list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
118
166
  list_satellite_configs: IDL.Func(
119
167
  [],
@@ -0,0 +1,192 @@
1
+ // @ts-ignore
2
+ export const idlFactory = ({IDL}) => {
3
+ const DeleteControllersArgs = IDL.Record({
4
+ controllers: IDL.Vec(IDL.Principal)
5
+ });
6
+ const ControllerScope = IDL.Variant({
7
+ Write: IDL.Null,
8
+ Admin: IDL.Null
9
+ });
10
+ const Controller = IDL.Record({
11
+ updated_at: IDL.Nat64,
12
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
13
+ created_at: IDL.Nat64,
14
+ scope: ControllerScope,
15
+ expires_at: IDL.Opt(IDL.Nat64)
16
+ });
17
+ const DelSatelliteConfig = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
18
+ const DepositCyclesArgs = IDL.Record({
19
+ cycles: IDL.Nat,
20
+ destination_id: IDL.Principal
21
+ });
22
+ const GetAnalytics = IDL.Record({
23
+ to: IDL.Opt(IDL.Nat64),
24
+ from: IDL.Opt(IDL.Nat64),
25
+ satellite_id: IDL.Opt(IDL.Principal)
26
+ });
27
+ const AnalyticKey = IDL.Record({
28
+ key: IDL.Text,
29
+ collected_at: IDL.Nat64
30
+ });
31
+ const PageViewDevice = IDL.Record({
32
+ inner_height: IDL.Nat16,
33
+ inner_width: IDL.Nat16
34
+ });
35
+ const PageView = IDL.Record({
36
+ title: IDL.Text,
37
+ updated_at: IDL.Nat64,
38
+ referrer: IDL.Opt(IDL.Text),
39
+ time_zone: IDL.Text,
40
+ session_id: IDL.Text,
41
+ href: IDL.Text,
42
+ created_at: IDL.Nat64,
43
+ satellite_id: IDL.Principal,
44
+ device: PageViewDevice,
45
+ user_agent: IDL.Opt(IDL.Text)
46
+ });
47
+ const AnalyticsBrowsersPageViews = IDL.Record({
48
+ safari: IDL.Float64,
49
+ opera: IDL.Float64,
50
+ others: IDL.Float64,
51
+ firefox: IDL.Float64,
52
+ chrome: IDL.Float64
53
+ });
54
+ const AnalyticsDevicesPageViews = IDL.Record({
55
+ desktop: IDL.Float64,
56
+ others: IDL.Float64,
57
+ mobile: IDL.Float64
58
+ });
59
+ const AnalyticsClientsPageViews = IDL.Record({
60
+ browsers: AnalyticsBrowsersPageViews,
61
+ devices: AnalyticsDevicesPageViews
62
+ });
63
+ const CalendarDate = IDL.Record({
64
+ day: IDL.Nat8,
65
+ month: IDL.Nat8,
66
+ year: IDL.Int32
67
+ });
68
+ const AnalyticsMetricsPageViews = IDL.Record({
69
+ bounce_rate: IDL.Float64,
70
+ average_page_views_per_session: IDL.Float64,
71
+ daily_total_page_views: IDL.Vec(IDL.Tuple(CalendarDate, IDL.Nat32)),
72
+ total_page_views: IDL.Nat32,
73
+ unique_page_views: IDL.Nat64,
74
+ unique_sessions: IDL.Nat64
75
+ });
76
+ const AnalyticsTop10PageViews = IDL.Record({
77
+ referrers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)),
78
+ pages: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))
79
+ });
80
+ const TrackEvent = IDL.Record({
81
+ updated_at: IDL.Nat64,
82
+ session_id: IDL.Text,
83
+ metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
84
+ name: IDL.Text,
85
+ created_at: IDL.Nat64,
86
+ satellite_id: IDL.Principal
87
+ });
88
+ const AnalyticsTrackEvents = IDL.Record({
89
+ total: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))
90
+ });
91
+ const OrbiterSatelliteConfig = IDL.Record({
92
+ updated_at: IDL.Nat64,
93
+ created_at: IDL.Nat64,
94
+ enabled: IDL.Bool
95
+ });
96
+ const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
97
+ const SetController = IDL.Record({
98
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
99
+ scope: ControllerScope,
100
+ expires_at: IDL.Opt(IDL.Nat64)
101
+ });
102
+ const SetControllersArgs = IDL.Record({
103
+ controller: SetController,
104
+ controllers: IDL.Vec(IDL.Principal)
105
+ });
106
+ const SetPageView = IDL.Record({
107
+ title: IDL.Text,
108
+ updated_at: IDL.Opt(IDL.Nat64),
109
+ referrer: IDL.Opt(IDL.Text),
110
+ time_zone: IDL.Text,
111
+ session_id: IDL.Text,
112
+ href: IDL.Text,
113
+ satellite_id: IDL.Principal,
114
+ device: PageViewDevice,
115
+ user_agent: IDL.Opt(IDL.Text)
116
+ });
117
+ const Result = IDL.Variant({Ok: PageView, Err: IDL.Text});
118
+ const Result_1 = IDL.Variant({
119
+ Ok: IDL.Null,
120
+ Err: IDL.Vec(IDL.Tuple(AnalyticKey, IDL.Text))
121
+ });
122
+ const SetSatelliteConfig = IDL.Record({
123
+ updated_at: IDL.Opt(IDL.Nat64),
124
+ enabled: IDL.Bool
125
+ });
126
+ const SetTrackEvent = IDL.Record({
127
+ updated_at: IDL.Opt(IDL.Nat64),
128
+ session_id: IDL.Text,
129
+ metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
130
+ name: IDL.Text,
131
+ satellite_id: IDL.Principal,
132
+ user_agent: IDL.Opt(IDL.Text)
133
+ });
134
+ const Result_2 = IDL.Variant({Ok: TrackEvent, Err: IDL.Text});
135
+ return IDL.Service({
136
+ del_controllers: IDL.Func(
137
+ [DeleteControllersArgs],
138
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
139
+ []
140
+ ),
141
+ del_satellite_config: IDL.Func([IDL.Principal, DelSatelliteConfig], [], []),
142
+ deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
143
+ get_page_views: IDL.Func(
144
+ [GetAnalytics],
145
+ [IDL.Vec(IDL.Tuple(AnalyticKey, PageView))],
146
+ ['query']
147
+ ),
148
+ get_page_views_analytics_clients: IDL.Func(
149
+ [GetAnalytics],
150
+ [AnalyticsClientsPageViews],
151
+ ['query']
152
+ ),
153
+ get_page_views_analytics_metrics: IDL.Func(
154
+ [GetAnalytics],
155
+ [AnalyticsMetricsPageViews],
156
+ ['query']
157
+ ),
158
+ get_page_views_analytics_top_10: IDL.Func([GetAnalytics], [AnalyticsTop10PageViews], ['query']),
159
+ get_track_events: IDL.Func(
160
+ [GetAnalytics],
161
+ [IDL.Vec(IDL.Tuple(AnalyticKey, TrackEvent))],
162
+ ['query']
163
+ ),
164
+ get_track_events_analytics: IDL.Func([GetAnalytics], [AnalyticsTrackEvents], ['query']),
165
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
166
+ list_satellite_configs: IDL.Func(
167
+ [],
168
+ [IDL.Vec(IDL.Tuple(IDL.Principal, OrbiterSatelliteConfig))],
169
+ ['query']
170
+ ),
171
+ memory_size: IDL.Func([], [MemorySize], ['query']),
172
+ set_controllers: IDL.Func(
173
+ [SetControllersArgs],
174
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
175
+ []
176
+ ),
177
+ set_page_view: IDL.Func([AnalyticKey, SetPageView], [Result], []),
178
+ set_page_views: IDL.Func([IDL.Vec(IDL.Tuple(AnalyticKey, SetPageView))], [Result_1], []),
179
+ set_satellite_configs: IDL.Func(
180
+ [IDL.Vec(IDL.Tuple(IDL.Principal, SetSatelliteConfig))],
181
+ [IDL.Vec(IDL.Tuple(IDL.Principal, OrbiterSatelliteConfig))],
182
+ []
183
+ ),
184
+ set_track_event: IDL.Func([AnalyticKey, SetTrackEvent], [Result_2], []),
185
+ set_track_events: IDL.Func([IDL.Vec(IDL.Tuple(AnalyticKey, SetTrackEvent))], [Result_1], []),
186
+ version: IDL.Func([], [IDL.Text], ['query'])
187
+ });
188
+ };
189
+ // @ts-ignore
190
+ export const init = ({IDL}) => {
191
+ return [];
192
+ };
@@ -1,4 +1,5 @@
1
1
  import type {ActorMethod} from '@dfinity/agent';
2
+ import type {IDL} from '@dfinity/candid';
2
3
  import type {Principal} from '@dfinity/principal';
3
4
 
4
5
  export interface AssetEncodingNoContent {
@@ -193,6 +194,7 @@ export interface UploadChunkResult {
193
194
  chunk_id: bigint;
194
195
  }
195
196
  export interface _SERVICE {
197
+ build_version: ActorMethod<[], string>;
196
198
  commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
197
199
  count_assets: ActorMethod<[string], bigint>;
198
200
  count_docs: ActorMethod<[string], bigint>;
@@ -206,8 +208,10 @@ export interface _SERVICE {
206
208
  del_many_docs: ActorMethod<[Array<[string, string, DelDoc]>], undefined>;
207
209
  del_rule: ActorMethod<[RulesType, string, DelDoc], undefined>;
208
210
  deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
211
+ get_asset: ActorMethod<[string, string], [] | [AssetNoContent]>;
209
212
  get_config: ActorMethod<[], Config>;
210
213
  get_doc: ActorMethod<[string, string], [] | [Doc]>;
214
+ get_many_assets: ActorMethod<[Array<[string, string]>], Array<[string, [] | [AssetNoContent]]>>;
211
215
  get_many_docs: ActorMethod<[Array<[string, string]>], Array<[string, [] | [Doc]]>>;
212
216
  http_request: ActorMethod<[HttpRequest], HttpResponse>;
213
217
  http_request_streaming_callback: ActorMethod<
@@ -230,3 +234,4 @@ export interface _SERVICE {
230
234
  upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
231
235
  version: ActorMethod<[], string>;
232
236
  }
237
+ export declare const idlFactory: IDL.InterfaceFactory;
@@ -25,6 +25,26 @@ export const idlFactory = ({IDL}) => {
25
25
  cycles: IDL.Nat,
26
26
  destination_id: IDL.Principal
27
27
  });
28
+ const AssetKey = IDL.Record({
29
+ token: IDL.Opt(IDL.Text),
30
+ collection: IDL.Text,
31
+ owner: IDL.Principal,
32
+ name: IDL.Text,
33
+ description: IDL.Opt(IDL.Text),
34
+ full_path: IDL.Text
35
+ });
36
+ const AssetEncodingNoContent = IDL.Record({
37
+ modified: IDL.Nat64,
38
+ sha256: IDL.Vec(IDL.Nat8),
39
+ total_length: IDL.Nat
40
+ });
41
+ const AssetNoContent = IDL.Record({
42
+ key: AssetKey,
43
+ updated_at: IDL.Nat64,
44
+ encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
45
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
46
+ created_at: IDL.Nat64
47
+ });
28
48
  const StorageConfigIFrame = IDL.Variant({
29
49
  Deny: IDL.Null,
30
50
  AllowAny: IDL.Null,
@@ -110,26 +130,6 @@ export const idlFactory = ({IDL}) => {
110
130
  matcher: IDL.Opt(ListMatcher),
111
131
  paginate: IDL.Opt(ListPaginate)
112
132
  });
113
- const AssetKey = IDL.Record({
114
- token: IDL.Opt(IDL.Text),
115
- collection: IDL.Text,
116
- owner: IDL.Principal,
117
- name: IDL.Text,
118
- description: IDL.Opt(IDL.Text),
119
- full_path: IDL.Text
120
- });
121
- const AssetEncodingNoContent = IDL.Record({
122
- modified: IDL.Nat64,
123
- sha256: IDL.Vec(IDL.Nat8),
124
- total_length: IDL.Nat
125
- });
126
- const AssetNoContent = IDL.Record({
127
- key: AssetKey,
128
- updated_at: IDL.Nat64,
129
- encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
130
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
131
- created_at: IDL.Nat64
132
- });
133
133
  const ListResults = IDL.Record({
134
134
  matches_pages: IDL.Opt(IDL.Nat64),
135
135
  matches_length: IDL.Nat64,
@@ -194,6 +194,7 @@ export const idlFactory = ({IDL}) => {
194
194
  });
195
195
  const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
196
196
  return IDL.Service({
197
+ build_version: IDL.Func([], [IDL.Text], ['query']),
197
198
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
198
199
  count_assets: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
199
200
  count_docs: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
@@ -211,8 +212,14 @@ export const idlFactory = ({IDL}) => {
211
212
  del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
212
213
  del_rule: IDL.Func([RulesType, IDL.Text, DelDoc], [], []),
213
214
  deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
215
+ get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], ['query']),
214
216
  get_config: IDL.Func([], [Config], []),
215
217
  get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
218
+ get_many_assets: IDL.Func(
219
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
220
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(AssetNoContent)))],
221
+ ['query']
222
+ ),
216
223
  get_many_docs: IDL.Func(
217
224
  [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
218
225
  [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],