@junobuild/admin 0.0.43 → 0.0.44-next-2024-01-30

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.
@@ -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
  [],
@@ -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 {
@@ -59,6 +60,11 @@ export interface Doc {
59
60
  description: [] | [string];
60
61
  created_at: bigint;
61
62
  }
63
+ export interface DocContext {
64
+ key: string;
65
+ collection: string;
66
+ data: Doc;
67
+ }
62
68
  export interface HttpRequest {
63
69
  url: string;
64
70
  method: string;
@@ -225,8 +231,10 @@ export interface _SERVICE {
225
231
  set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
226
232
  set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
227
233
  set_doc: ActorMethod<[string, string, SetDoc], Doc>;
228
- set_many_docs: ActorMethod<[Array<[string, string, SetDoc]>], Array<[string, Doc]>>;
234
+ set_many_docs: ActorMethod<[Array<[string, string, SetDoc]>], Array<DocContext>>;
229
235
  set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
230
236
  upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
231
237
  version: ActorMethod<[], string>;
238
+ version_build: ActorMethod<[], string>;
232
239
  }
240
+ export declare const idlFactory: IDL.InterfaceFactory;
@@ -179,6 +179,11 @@ export const idlFactory = ({IDL}) => {
179
179
  data: IDL.Vec(IDL.Nat8),
180
180
  description: IDL.Opt(IDL.Text)
181
181
  });
182
+ const DocContext = IDL.Record({
183
+ key: IDL.Text,
184
+ collection: IDL.Text,
185
+ data: Doc
186
+ });
182
187
  const SetRule = IDL.Record({
183
188
  memory: IDL.Opt(Memory),
184
189
  updated_at: IDL.Opt(IDL.Nat64),
@@ -241,12 +246,13 @@ export const idlFactory = ({IDL}) => {
241
246
  set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
242
247
  set_many_docs: IDL.Func(
243
248
  [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, SetDoc))],
244
- [IDL.Vec(IDL.Tuple(IDL.Text, Doc))],
249
+ [IDL.Vec(DocContext)],
245
250
  []
246
251
  ),
247
252
  set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
248
253
  upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
249
- version: IDL.Func([], [IDL.Text], ['query'])
254
+ version: IDL.Func([], [IDL.Text], ['query']),
255
+ version_build: IDL.Func([], [IDL.Text], ['query'])
250
256
  });
251
257
  };
252
258
  // @ts-ignore
@@ -179,6 +179,11 @@ export const idlFactory = ({IDL}) => {
179
179
  data: IDL.Vec(IDL.Nat8),
180
180
  description: IDL.Opt(IDL.Text)
181
181
  });
182
+ const DocContext = IDL.Record({
183
+ key: IDL.Text,
184
+ collection: IDL.Text,
185
+ data: Doc
186
+ });
182
187
  const SetRule = IDL.Record({
183
188
  memory: IDL.Opt(Memory),
184
189
  updated_at: IDL.Opt(IDL.Nat64),
@@ -241,12 +246,13 @@ export const idlFactory = ({IDL}) => {
241
246
  set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
242
247
  set_many_docs: IDL.Func(
243
248
  [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, SetDoc))],
244
- [IDL.Vec(IDL.Tuple(IDL.Text, Doc))],
249
+ [IDL.Vec(DocContext)],
245
250
  []
246
251
  ),
247
252
  set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
248
253
  upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
249
- version: IDL.Func([], [IDL.Text], ['query'])
254
+ version: IDL.Func([], [IDL.Text], ['query']),
255
+ version_build: IDL.Func([], [IDL.Text], ['query'])
250
256
  });
251
257
  };
252
258
  // @ts-ignore