@junobuild/core 1.0.3 → 1.1.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 (53) hide show
  1. package/dist/browser/index.js +1 -1
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/node/index.mjs +1 -1
  4. package/dist/node/index.mjs.map +4 -4
  5. package/dist/types/api/actor.api.d.ts +1 -1
  6. package/dist/types/api/storage.api.d.ts +4 -4
  7. package/dist/types/services/storage.services.d.ts +3 -3
  8. package/dist/types/stores/actor.store.d.ts +1 -2
  9. package/dist/types/types/storage.types.d.ts +2 -2
  10. package/dist/types/utils/data.utils.d.ts +2 -2
  11. package/dist/types/utils/doc.utils.d.ts +4 -4
  12. package/dist/types/utils/list.utils.d.ts +2 -2
  13. package/package.json +4 -3
  14. package/dist/declarations/deprecated/console-0-0-14.did.d.ts +0 -267
  15. package/dist/declarations/deprecated/console-0-0-14.factory.did.js +0 -285
  16. package/dist/declarations/deprecated/console-0-0-8-patch1.did.d.ts +0 -75
  17. package/dist/declarations/deprecated/console-0-0-8-patch1.factory.did.js +0 -80
  18. package/dist/declarations/deprecated/mission_control-0-0-13.did.d.ts +0 -246
  19. package/dist/declarations/deprecated/mission_control-0-0-13.factory.did.js +0 -280
  20. package/dist/declarations/deprecated/mission_control-0-0-14.did.d.ts +0 -241
  21. package/dist/declarations/deprecated/mission_control-0-0-14.factory.did.js +0 -258
  22. package/dist/declarations/deprecated/mission_control-0-0-4.did.d.ts +0 -80
  23. package/dist/declarations/deprecated/mission_control-0-0-4.factory.did.js +0 -99
  24. package/dist/declarations/deprecated/observatory-0-0-9.did.d.ts +0 -70
  25. package/dist/declarations/deprecated/observatory-0-0-9.factory.did.js +0 -76
  26. package/dist/declarations/deprecated/orbiter-0-0-6.did.d.ts +0 -161
  27. package/dist/declarations/deprecated/orbiter-0-0-6.factory.did.js +0 -192
  28. package/dist/declarations/deprecated/orbiter-0-0-7.did.d.ts +0 -166
  29. package/dist/declarations/deprecated/orbiter-0-0-7.factory.did.js +0 -197
  30. package/dist/declarations/deprecated/orbiter-0-0-8.did.d.ts +0 -245
  31. package/dist/declarations/deprecated/orbiter-0-0-8.factory.did.js +0 -287
  32. package/dist/declarations/deprecated/orbiter-0-2-0.did.d.ts +0 -277
  33. package/dist/declarations/deprecated/orbiter-0-2-0.factory.did.js +0 -319
  34. package/dist/declarations/deprecated/satellite-0-0-16.did.d.ts +0 -240
  35. package/dist/declarations/deprecated/satellite-0-0-16.factory.did.js +0 -264
  36. package/dist/declarations/deprecated/satellite-0-0-17.did.d.ts +0 -254
  37. package/dist/declarations/deprecated/satellite-0-0-17.factory.did.js +0 -281
  38. package/dist/declarations/deprecated/satellite-0-0-21.did.d.ts +0 -299
  39. package/dist/declarations/deprecated/satellite-0-0-21.factory.did.js +0 -333
  40. package/dist/declarations/deprecated/satellite-0-0-22.did.d.ts +0 -290
  41. package/dist/declarations/deprecated/satellite-0-0-22.factory.did.js +0 -318
  42. package/dist/declarations/deprecated/satellite-0-0-8.did.d.ts +0 -183
  43. package/dist/declarations/deprecated/satellite-0-0-8.factory.did.js +0 -194
  44. package/dist/declarations/deprecated/satellite-0-0-9.did.d.ts +0 -199
  45. package/dist/declarations/deprecated/satellite-0-0-9.factory.did.js +0 -213
  46. package/dist/declarations/satellite/satellite.did.d.ts +0 -396
  47. package/dist/declarations/satellite/satellite.factory.certified.did.js +0 -419
  48. package/dist/declarations/satellite/satellite.factory.did.js +0 -419
  49. package/dist/declarations/satellite/satellite.factory.did.mjs +0 -419
  50. package/dist/declarations/sputnik/sputnik.did.d.ts +0 -396
  51. package/dist/declarations/sputnik/sputnik.factory.certified.did.js +0 -419
  52. package/dist/declarations/sputnik/sputnik.factory.did.js +0 -419
  53. package/dist/types/api/_actor.factory.d.ts +0 -5
@@ -1,70 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
4
-
5
- export interface Controller {
6
- updated_at: bigint;
7
- metadata: Array<[string, string]>;
8
- created_at: bigint;
9
- scope: ControllerScope;
10
- expires_at: [] | [bigint];
11
- }
12
- export type ControllerScope = {Write: null} | {Admin: null};
13
- export interface CyclesBalance {
14
- timestamp: bigint;
15
- amount: bigint;
16
- }
17
- export interface DeleteControllersArgs {
18
- controllers: Array<Principal>;
19
- }
20
- export interface DepositedCyclesEmailNotification {
21
- to: string;
22
- deposited_cycles: CyclesBalance;
23
- }
24
- export interface Env {
25
- email_api_key: [] | [string];
26
- }
27
- export interface GetNotifications {
28
- to: [] | [bigint];
29
- from: [] | [bigint];
30
- segment_id: [] | [Principal];
31
- }
32
- export type NotificationKind = {
33
- DepositedCyclesEmail: DepositedCyclesEmailNotification;
34
- };
35
- export interface NotifyArgs {
36
- kind: NotificationKind;
37
- user: Principal;
38
- segment: Segment;
39
- }
40
- export interface NotifyStatus {
41
- pending: bigint;
42
- sent: bigint;
43
- failed: bigint;
44
- }
45
- export interface Segment {
46
- id: Principal;
47
- metadata: [] | [Array<[string, string]>];
48
- kind: SegmentKind;
49
- }
50
- export type SegmentKind = {Orbiter: null} | {MissionControl: null} | {Satellite: null};
51
- export interface SetController {
52
- metadata: Array<[string, string]>;
53
- scope: ControllerScope;
54
- expires_at: [] | [bigint];
55
- }
56
- export interface SetControllersArgs {
57
- controller: SetController;
58
- controllers: Array<Principal>;
59
- }
60
- export interface _SERVICE {
61
- del_controllers: ActorMethod<[DeleteControllersArgs], undefined>;
62
- get_notify_status: ActorMethod<[GetNotifications], NotifyStatus>;
63
- list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
64
- notify: ActorMethod<[NotifyArgs], undefined>;
65
- ping: ActorMethod<[NotifyArgs], undefined>;
66
- set_controllers: ActorMethod<[SetControllersArgs], undefined>;
67
- set_env: ActorMethod<[Env], undefined>;
68
- }
69
- export declare const idlFactory: IDL.InterfaceFactory;
70
- export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
@@ -1,76 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const DeleteControllersArgs = IDL.Record({
4
- controllers: IDL.Vec(IDL.Principal)
5
- });
6
- const GetNotifications = IDL.Record({
7
- to: IDL.Opt(IDL.Nat64),
8
- from: IDL.Opt(IDL.Nat64),
9
- segment_id: IDL.Opt(IDL.Principal)
10
- });
11
- const NotifyStatus = IDL.Record({
12
- pending: IDL.Nat64,
13
- sent: IDL.Nat64,
14
- failed: IDL.Nat64
15
- });
16
- const ControllerScope = IDL.Variant({
17
- Write: IDL.Null,
18
- Admin: IDL.Null
19
- });
20
- const Controller = IDL.Record({
21
- updated_at: IDL.Nat64,
22
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
23
- created_at: IDL.Nat64,
24
- scope: ControllerScope,
25
- expires_at: IDL.Opt(IDL.Nat64)
26
- });
27
- const CyclesBalance = IDL.Record({
28
- timestamp: IDL.Nat64,
29
- amount: IDL.Nat
30
- });
31
- const DepositedCyclesEmailNotification = IDL.Record({
32
- to: IDL.Text,
33
- deposited_cycles: CyclesBalance
34
- });
35
- const NotificationKind = IDL.Variant({
36
- DepositedCyclesEmail: DepositedCyclesEmailNotification
37
- });
38
- const SegmentKind = IDL.Variant({
39
- Orbiter: IDL.Null,
40
- MissionControl: IDL.Null,
41
- Satellite: IDL.Null
42
- });
43
- const Segment = IDL.Record({
44
- id: IDL.Principal,
45
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
46
- kind: SegmentKind
47
- });
48
- const NotifyArgs = IDL.Record({
49
- kind: NotificationKind,
50
- user: IDL.Principal,
51
- segment: Segment
52
- });
53
- const SetController = IDL.Record({
54
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
55
- scope: ControllerScope,
56
- expires_at: IDL.Opt(IDL.Nat64)
57
- });
58
- const SetControllersArgs = IDL.Record({
59
- controller: SetController,
60
- controllers: IDL.Vec(IDL.Principal)
61
- });
62
- const Env = IDL.Record({email_api_key: IDL.Opt(IDL.Text)});
63
- return IDL.Service({
64
- del_controllers: IDL.Func([DeleteControllersArgs], [], []),
65
- get_notify_status: IDL.Func([GetNotifications], [NotifyStatus], ['query']),
66
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
67
- notify: IDL.Func([NotifyArgs], [], []),
68
- ping: IDL.Func([NotifyArgs], [], []),
69
- set_controllers: IDL.Func([SetControllersArgs], [], []),
70
- set_env: IDL.Func([Env], [], [])
71
- });
72
- };
73
- // @ts-ignore
74
- export const init = ({IDL}) => {
75
- return [];
76
- };
@@ -1,161 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
4
-
5
- export interface AnalyticKey {
6
- key: string;
7
- collected_at: bigint;
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
- }
45
- export interface Controller {
46
- updated_at: bigint;
47
- metadata: Array<[string, string]>;
48
- created_at: bigint;
49
- scope: ControllerScope;
50
- expires_at: [] | [bigint];
51
- }
52
- export type ControllerScope = {Write: null} | {Admin: null};
53
- export interface DelSatelliteConfig {
54
- updated_at: [] | [bigint];
55
- }
56
- export interface DeleteControllersArgs {
57
- controllers: Array<Principal>;
58
- }
59
- export interface DepositCyclesArgs {
60
- cycles: bigint;
61
- destination_id: Principal;
62
- }
63
- export interface GetAnalytics {
64
- to: [] | [bigint];
65
- from: [] | [bigint];
66
- satellite_id: [] | [Principal];
67
- }
68
- export interface MemorySize {
69
- stable: bigint;
70
- heap: bigint;
71
- }
72
- export interface OrbiterSatelliteConfig {
73
- updated_at: bigint;
74
- created_at: bigint;
75
- enabled: boolean;
76
- }
77
- export interface PageView {
78
- title: string;
79
- updated_at: bigint;
80
- referrer: [] | [string];
81
- time_zone: string;
82
- session_id: string;
83
- href: string;
84
- created_at: bigint;
85
- satellite_id: Principal;
86
- device: PageViewDevice;
87
- user_agent: [] | [string];
88
- }
89
- export interface PageViewDevice {
90
- inner_height: number;
91
- inner_width: number;
92
- }
93
- export type Result = {Ok: PageView} | {Err: string};
94
- export type Result_1 = {Ok: null} | {Err: Array<[AnalyticKey, string]>};
95
- export type Result_2 = {Ok: TrackEvent} | {Err: string};
96
- export interface SetController {
97
- metadata: Array<[string, string]>;
98
- scope: ControllerScope;
99
- expires_at: [] | [bigint];
100
- }
101
- export interface SetControllersArgs {
102
- controller: SetController;
103
- controllers: Array<Principal>;
104
- }
105
- export interface SetPageView {
106
- title: string;
107
- updated_at: [] | [bigint];
108
- referrer: [] | [string];
109
- time_zone: string;
110
- session_id: string;
111
- href: string;
112
- satellite_id: Principal;
113
- device: PageViewDevice;
114
- user_agent: [] | [string];
115
- }
116
- export interface SetSatelliteConfig {
117
- updated_at: [] | [bigint];
118
- enabled: boolean;
119
- }
120
- export interface SetTrackEvent {
121
- updated_at: [] | [bigint];
122
- session_id: string;
123
- metadata: [] | [Array<[string, string]>];
124
- name: string;
125
- satellite_id: Principal;
126
- user_agent: [] | [string];
127
- }
128
- export interface TrackEvent {
129
- updated_at: bigint;
130
- session_id: string;
131
- metadata: [] | [Array<[string, string]>];
132
- name: string;
133
- created_at: bigint;
134
- satellite_id: Principal;
135
- }
136
- export interface _SERVICE {
137
- del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
138
- del_satellite_config: ActorMethod<[Principal, DelSatelliteConfig], undefined>;
139
- deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
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>;
144
- get_track_events: ActorMethod<[GetAnalytics], Array<[AnalyticKey, TrackEvent]>>;
145
- get_track_events_analytics: ActorMethod<[GetAnalytics], AnalyticsTrackEvents>;
146
- list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
147
- list_satellite_configs: ActorMethod<[], Array<[Principal, OrbiterSatelliteConfig]>>;
148
- memory_size: ActorMethod<[], MemorySize>;
149
- set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
150
- set_page_view: ActorMethod<[AnalyticKey, SetPageView], Result>;
151
- set_page_views: ActorMethod<[Array<[AnalyticKey, SetPageView]>], Result_1>;
152
- set_satellite_configs: ActorMethod<
153
- [Array<[Principal, SetSatelliteConfig]>],
154
- Array<[Principal, OrbiterSatelliteConfig]>
155
- >;
156
- set_track_event: ActorMethod<[AnalyticKey, SetTrackEvent], Result_2>;
157
- set_track_events: ActorMethod<[Array<[AnalyticKey, SetTrackEvent]>], Result_1>;
158
- version: ActorMethod<[], string>;
159
- }
160
- export declare const idlFactory: IDL.InterfaceFactory;
161
- export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
@@ -1,192 +0,0 @@
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,166 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
4
-
5
- export interface AnalyticKey {
6
- key: string;
7
- collected_at: bigint;
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
- }
45
- export interface Controller {
46
- updated_at: bigint;
47
- metadata: Array<[string, string]>;
48
- created_at: bigint;
49
- scope: ControllerScope;
50
- expires_at: [] | [bigint];
51
- }
52
- export type ControllerScope = {Write: null} | {Admin: null};
53
- export interface DelSatelliteConfig {
54
- version: [] | [bigint];
55
- }
56
- export interface DeleteControllersArgs {
57
- controllers: Array<Principal>;
58
- }
59
- export interface DepositCyclesArgs {
60
- cycles: bigint;
61
- destination_id: Principal;
62
- }
63
- export interface GetAnalytics {
64
- to: [] | [bigint];
65
- from: [] | [bigint];
66
- satellite_id: [] | [Principal];
67
- }
68
- export interface MemorySize {
69
- stable: bigint;
70
- heap: bigint;
71
- }
72
- export interface OrbiterSatelliteConfig {
73
- updated_at: bigint;
74
- created_at: bigint;
75
- version: [] | [bigint];
76
- enabled: boolean;
77
- }
78
- export interface PageView {
79
- title: string;
80
- updated_at: bigint;
81
- referrer: [] | [string];
82
- time_zone: string;
83
- session_id: string;
84
- href: string;
85
- created_at: bigint;
86
- satellite_id: Principal;
87
- device: PageViewDevice;
88
- version: [] | [bigint];
89
- user_agent: [] | [string];
90
- }
91
- export interface PageViewDevice {
92
- inner_height: number;
93
- inner_width: number;
94
- }
95
- export type Result = {Ok: PageView} | {Err: string};
96
- export type Result_1 = {Ok: null} | {Err: Array<[AnalyticKey, string]>};
97
- export type Result_2 = {Ok: TrackEvent} | {Err: string};
98
- export interface SetController {
99
- metadata: Array<[string, string]>;
100
- scope: ControllerScope;
101
- expires_at: [] | [bigint];
102
- }
103
- export interface SetControllersArgs {
104
- controller: SetController;
105
- controllers: Array<Principal>;
106
- }
107
- export interface SetPageView {
108
- title: string;
109
- updated_at: [] | [bigint];
110
- referrer: [] | [string];
111
- time_zone: string;
112
- session_id: string;
113
- href: string;
114
- satellite_id: Principal;
115
- device: PageViewDevice;
116
- version: [] | [bigint];
117
- user_agent: [] | [string];
118
- }
119
- export interface SetSatelliteConfig {
120
- version: [] | [bigint];
121
- enabled: boolean;
122
- }
123
- export interface SetTrackEvent {
124
- updated_at: [] | [bigint];
125
- session_id: string;
126
- metadata: [] | [Array<[string, string]>];
127
- name: string;
128
- satellite_id: Principal;
129
- version: [] | [bigint];
130
- user_agent: [] | [string];
131
- }
132
- export interface TrackEvent {
133
- updated_at: bigint;
134
- session_id: string;
135
- metadata: [] | [Array<[string, string]>];
136
- name: string;
137
- created_at: bigint;
138
- satellite_id: Principal;
139
- version: [] | [bigint];
140
- }
141
- export interface _SERVICE {
142
- del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
143
- del_satellite_config: ActorMethod<[Principal, DelSatelliteConfig], undefined>;
144
- deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
145
- get_page_views: ActorMethod<[GetAnalytics], Array<[AnalyticKey, PageView]>>;
146
- get_page_views_analytics_clients: ActorMethod<[GetAnalytics], AnalyticsClientsPageViews>;
147
- get_page_views_analytics_metrics: ActorMethod<[GetAnalytics], AnalyticsMetricsPageViews>;
148
- get_page_views_analytics_top_10: ActorMethod<[GetAnalytics], AnalyticsTop10PageViews>;
149
- get_track_events: ActorMethod<[GetAnalytics], Array<[AnalyticKey, TrackEvent]>>;
150
- get_track_events_analytics: ActorMethod<[GetAnalytics], AnalyticsTrackEvents>;
151
- list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
152
- list_satellite_configs: ActorMethod<[], Array<[Principal, OrbiterSatelliteConfig]>>;
153
- memory_size: ActorMethod<[], MemorySize>;
154
- set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
155
- set_page_view: ActorMethod<[AnalyticKey, SetPageView], Result>;
156
- set_page_views: ActorMethod<[Array<[AnalyticKey, SetPageView]>], Result_1>;
157
- set_satellite_configs: ActorMethod<
158
- [Array<[Principal, SetSatelliteConfig]>],
159
- Array<[Principal, OrbiterSatelliteConfig]>
160
- >;
161
- set_track_event: ActorMethod<[AnalyticKey, SetTrackEvent], Result_2>;
162
- set_track_events: ActorMethod<[Array<[AnalyticKey, SetTrackEvent]>], Result_1>;
163
- version: ActorMethod<[], string>;
164
- }
165
- export declare const idlFactory: IDL.InterfaceFactory;
166
- export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];