@junobuild/core 0.1.13 → 0.1.15-next-2025-05-23

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.
@@ -0,0 +1,70 @@
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[];
@@ -0,0 +1,76 @@
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
+ };
@@ -0,0 +1,245 @@
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 AnalyticsWebVitalsPageMetrics {
41
+ cls: [] | [number];
42
+ fcp: [] | [number];
43
+ inp: [] | [number];
44
+ lcp: [] | [number];
45
+ ttfb: [] | [number];
46
+ }
47
+ export interface AnalyticsWebVitalsPerformanceMetrics {
48
+ overall: AnalyticsWebVitalsPageMetrics;
49
+ pages: Array<[string, AnalyticsWebVitalsPageMetrics]>;
50
+ }
51
+ export interface CalendarDate {
52
+ day: number;
53
+ month: number;
54
+ year: number;
55
+ }
56
+ export interface Controller {
57
+ updated_at: bigint;
58
+ metadata: Array<[string, string]>;
59
+ created_at: bigint;
60
+ scope: ControllerScope;
61
+ expires_at: [] | [bigint];
62
+ }
63
+ export type ControllerScope = {Write: null} | {Admin: null};
64
+ export interface DelSatelliteConfig {
65
+ version: [] | [bigint];
66
+ }
67
+ export interface DeleteControllersArgs {
68
+ controllers: Array<Principal>;
69
+ }
70
+ export interface DepositCyclesArgs {
71
+ cycles: bigint;
72
+ destination_id: Principal;
73
+ }
74
+ export interface GetAnalytics {
75
+ to: [] | [bigint];
76
+ from: [] | [bigint];
77
+ satellite_id: [] | [Principal];
78
+ }
79
+ export interface HttpRequest {
80
+ url: string;
81
+ method: string;
82
+ body: Uint8Array | number[];
83
+ headers: Array<[string, string]>;
84
+ certificate_version: [] | [number];
85
+ }
86
+ export interface HttpResponse {
87
+ body: Uint8Array | number[];
88
+ headers: Array<[string, string]>;
89
+ upgrade: [] | [boolean];
90
+ status_code: number;
91
+ }
92
+ export interface MemorySize {
93
+ stable: bigint;
94
+ heap: bigint;
95
+ }
96
+ export type NavigationType =
97
+ | {Navigate: null}
98
+ | {Restore: null}
99
+ | {Reload: null}
100
+ | {BackForward: null}
101
+ | {BackForwardCache: null}
102
+ | {Prerender: null};
103
+ export interface OrbiterSatelliteConfig {
104
+ updated_at: bigint;
105
+ features: [] | [OrbiterSatelliteFeatures];
106
+ restricted_origin: [] | [string];
107
+ created_at: bigint;
108
+ version: [] | [bigint];
109
+ }
110
+ export interface OrbiterSatelliteFeatures {
111
+ performance_metrics: boolean;
112
+ track_events: boolean;
113
+ page_views: boolean;
114
+ }
115
+ export interface PageView {
116
+ title: string;
117
+ updated_at: bigint;
118
+ referrer: [] | [string];
119
+ time_zone: string;
120
+ session_id: string;
121
+ href: string;
122
+ created_at: bigint;
123
+ satellite_id: Principal;
124
+ device: PageViewDevice;
125
+ version: [] | [bigint];
126
+ user_agent: [] | [string];
127
+ }
128
+ export interface PageViewDevice {
129
+ inner_height: number;
130
+ inner_width: number;
131
+ }
132
+ export type PerformanceData = {WebVitalsMetric: WebVitalsMetric};
133
+ export interface PerformanceMetric {
134
+ updated_at: bigint;
135
+ session_id: string;
136
+ data: PerformanceData;
137
+ href: string;
138
+ metric_name: PerformanceMetricName;
139
+ created_at: bigint;
140
+ satellite_id: Principal;
141
+ version: [] | [bigint];
142
+ }
143
+ export type PerformanceMetricName =
144
+ | {CLS: null}
145
+ | {FCP: null}
146
+ | {INP: null}
147
+ | {LCP: null}
148
+ | {TTFB: null};
149
+ export type Result = {Ok: PageView} | {Err: string};
150
+ export type Result_1 = {Ok: null} | {Err: Array<[AnalyticKey, string]>};
151
+ export type Result_2 = {Ok: PerformanceMetric} | {Err: string};
152
+ export type Result_3 = {Ok: TrackEvent} | {Err: string};
153
+ export interface SetController {
154
+ metadata: Array<[string, string]>;
155
+ scope: ControllerScope;
156
+ expires_at: [] | [bigint];
157
+ }
158
+ export interface SetControllersArgs {
159
+ controller: SetController;
160
+ controllers: Array<Principal>;
161
+ }
162
+ export interface SetPageView {
163
+ title: string;
164
+ updated_at: [] | [bigint];
165
+ referrer: [] | [string];
166
+ time_zone: string;
167
+ session_id: string;
168
+ href: string;
169
+ satellite_id: Principal;
170
+ device: PageViewDevice;
171
+ version: [] | [bigint];
172
+ user_agent: [] | [string];
173
+ }
174
+ export interface SetPerformanceMetric {
175
+ session_id: string;
176
+ data: PerformanceData;
177
+ href: string;
178
+ metric_name: PerformanceMetricName;
179
+ satellite_id: Principal;
180
+ version: [] | [bigint];
181
+ user_agent: [] | [string];
182
+ }
183
+ export interface SetSatelliteConfig {
184
+ features: [] | [OrbiterSatelliteFeatures];
185
+ restricted_origin: [] | [string];
186
+ version: [] | [bigint];
187
+ }
188
+ export interface SetTrackEvent {
189
+ updated_at: [] | [bigint];
190
+ session_id: string;
191
+ metadata: [] | [Array<[string, string]>];
192
+ name: string;
193
+ satellite_id: Principal;
194
+ version: [] | [bigint];
195
+ user_agent: [] | [string];
196
+ }
197
+ export interface TrackEvent {
198
+ updated_at: bigint;
199
+ session_id: string;
200
+ metadata: [] | [Array<[string, string]>];
201
+ name: string;
202
+ created_at: bigint;
203
+ satellite_id: Principal;
204
+ version: [] | [bigint];
205
+ }
206
+ export interface WebVitalsMetric {
207
+ id: string;
208
+ value: number;
209
+ navigation_type: [] | [NavigationType];
210
+ delta: number;
211
+ }
212
+ export interface _SERVICE {
213
+ del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
214
+ del_satellite_config: ActorMethod<[Principal, DelSatelliteConfig], undefined>;
215
+ deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
216
+ get_page_views: ActorMethod<[GetAnalytics], Array<[AnalyticKey, PageView]>>;
217
+ get_page_views_analytics_clients: ActorMethod<[GetAnalytics], AnalyticsClientsPageViews>;
218
+ get_page_views_analytics_metrics: ActorMethod<[GetAnalytics], AnalyticsMetricsPageViews>;
219
+ get_page_views_analytics_top_10: ActorMethod<[GetAnalytics], AnalyticsTop10PageViews>;
220
+ get_performance_metrics: ActorMethod<[GetAnalytics], Array<[AnalyticKey, PerformanceMetric]>>;
221
+ get_performance_metrics_analytics_web_vitals: ActorMethod<
222
+ [GetAnalytics],
223
+ AnalyticsWebVitalsPerformanceMetrics
224
+ >;
225
+ get_track_events: ActorMethod<[GetAnalytics], Array<[AnalyticKey, TrackEvent]>>;
226
+ get_track_events_analytics: ActorMethod<[GetAnalytics], AnalyticsTrackEvents>;
227
+ http_request: ActorMethod<[HttpRequest], HttpResponse>;
228
+ http_request_update: ActorMethod<[HttpRequest], HttpResponse>;
229
+ list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
230
+ list_satellite_configs: ActorMethod<[], Array<[Principal, OrbiterSatelliteConfig]>>;
231
+ memory_size: ActorMethod<[], MemorySize>;
232
+ set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
233
+ set_page_view: ActorMethod<[AnalyticKey, SetPageView], Result>;
234
+ set_page_views: ActorMethod<[Array<[AnalyticKey, SetPageView]>], Result_1>;
235
+ set_performance_metric: ActorMethod<[AnalyticKey, SetPerformanceMetric], Result_2>;
236
+ set_performance_metrics: ActorMethod<[Array<[AnalyticKey, SetPerformanceMetric]>], Result_1>;
237
+ set_satellite_configs: ActorMethod<
238
+ [Array<[Principal, SetSatelliteConfig]>],
239
+ Array<[Principal, OrbiterSatelliteConfig]>
240
+ >;
241
+ set_track_event: ActorMethod<[AnalyticKey, SetTrackEvent], Result_3>;
242
+ set_track_events: ActorMethod<[Array<[AnalyticKey, SetTrackEvent]>], Result_1>;
243
+ }
244
+ export declare const idlFactory: IDL.InterfaceFactory;
245
+ export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
@@ -0,0 +1,287 @@
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({version: 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
+ version: IDL.Opt(IDL.Nat64),
46
+ user_agent: IDL.Opt(IDL.Text)
47
+ });
48
+ const AnalyticsBrowsersPageViews = IDL.Record({
49
+ safari: IDL.Float64,
50
+ opera: IDL.Float64,
51
+ others: IDL.Float64,
52
+ firefox: IDL.Float64,
53
+ chrome: IDL.Float64
54
+ });
55
+ const AnalyticsDevicesPageViews = IDL.Record({
56
+ desktop: IDL.Float64,
57
+ others: IDL.Float64,
58
+ mobile: IDL.Float64
59
+ });
60
+ const AnalyticsClientsPageViews = IDL.Record({
61
+ browsers: AnalyticsBrowsersPageViews,
62
+ devices: AnalyticsDevicesPageViews
63
+ });
64
+ const CalendarDate = IDL.Record({
65
+ day: IDL.Nat8,
66
+ month: IDL.Nat8,
67
+ year: IDL.Int32
68
+ });
69
+ const AnalyticsMetricsPageViews = IDL.Record({
70
+ bounce_rate: IDL.Float64,
71
+ average_page_views_per_session: IDL.Float64,
72
+ daily_total_page_views: IDL.Vec(IDL.Tuple(CalendarDate, IDL.Nat32)),
73
+ total_page_views: IDL.Nat32,
74
+ unique_page_views: IDL.Nat64,
75
+ unique_sessions: IDL.Nat64
76
+ });
77
+ const AnalyticsTop10PageViews = IDL.Record({
78
+ referrers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)),
79
+ pages: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))
80
+ });
81
+ const NavigationType = IDL.Variant({
82
+ Navigate: IDL.Null,
83
+ Restore: IDL.Null,
84
+ Reload: IDL.Null,
85
+ BackForward: IDL.Null,
86
+ BackForwardCache: IDL.Null,
87
+ Prerender: IDL.Null
88
+ });
89
+ const WebVitalsMetric = IDL.Record({
90
+ id: IDL.Text,
91
+ value: IDL.Float64,
92
+ navigation_type: IDL.Opt(NavigationType),
93
+ delta: IDL.Float64
94
+ });
95
+ const PerformanceData = IDL.Variant({WebVitalsMetric: WebVitalsMetric});
96
+ const PerformanceMetricName = IDL.Variant({
97
+ CLS: IDL.Null,
98
+ FCP: IDL.Null,
99
+ INP: IDL.Null,
100
+ LCP: IDL.Null,
101
+ TTFB: IDL.Null
102
+ });
103
+ const PerformanceMetric = IDL.Record({
104
+ updated_at: IDL.Nat64,
105
+ session_id: IDL.Text,
106
+ data: PerformanceData,
107
+ href: IDL.Text,
108
+ metric_name: PerformanceMetricName,
109
+ created_at: IDL.Nat64,
110
+ satellite_id: IDL.Principal,
111
+ version: IDL.Opt(IDL.Nat64)
112
+ });
113
+ const AnalyticsWebVitalsPageMetrics = IDL.Record({
114
+ cls: IDL.Opt(IDL.Float64),
115
+ fcp: IDL.Opt(IDL.Float64),
116
+ inp: IDL.Opt(IDL.Float64),
117
+ lcp: IDL.Opt(IDL.Float64),
118
+ ttfb: IDL.Opt(IDL.Float64)
119
+ });
120
+ const AnalyticsWebVitalsPerformanceMetrics = IDL.Record({
121
+ overall: AnalyticsWebVitalsPageMetrics,
122
+ pages: IDL.Vec(IDL.Tuple(IDL.Text, AnalyticsWebVitalsPageMetrics))
123
+ });
124
+ const TrackEvent = IDL.Record({
125
+ updated_at: IDL.Nat64,
126
+ session_id: IDL.Text,
127
+ metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
128
+ name: IDL.Text,
129
+ created_at: IDL.Nat64,
130
+ satellite_id: IDL.Principal,
131
+ version: IDL.Opt(IDL.Nat64)
132
+ });
133
+ const AnalyticsTrackEvents = IDL.Record({
134
+ total: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))
135
+ });
136
+ const HttpRequest = IDL.Record({
137
+ url: IDL.Text,
138
+ method: IDL.Text,
139
+ body: IDL.Vec(IDL.Nat8),
140
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
141
+ certificate_version: IDL.Opt(IDL.Nat16)
142
+ });
143
+ const HttpResponse = IDL.Record({
144
+ body: IDL.Vec(IDL.Nat8),
145
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
146
+ upgrade: IDL.Opt(IDL.Bool),
147
+ status_code: IDL.Nat16
148
+ });
149
+ const OrbiterSatelliteFeatures = IDL.Record({
150
+ performance_metrics: IDL.Bool,
151
+ track_events: IDL.Bool,
152
+ page_views: IDL.Bool
153
+ });
154
+ const OrbiterSatelliteConfig = IDL.Record({
155
+ updated_at: IDL.Nat64,
156
+ features: IDL.Opt(OrbiterSatelliteFeatures),
157
+ restricted_origin: IDL.Opt(IDL.Text),
158
+ created_at: IDL.Nat64,
159
+ version: IDL.Opt(IDL.Nat64)
160
+ });
161
+ const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
162
+ const SetController = IDL.Record({
163
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
164
+ scope: ControllerScope,
165
+ expires_at: IDL.Opt(IDL.Nat64)
166
+ });
167
+ const SetControllersArgs = IDL.Record({
168
+ controller: SetController,
169
+ controllers: IDL.Vec(IDL.Principal)
170
+ });
171
+ const SetPageView = IDL.Record({
172
+ title: IDL.Text,
173
+ updated_at: IDL.Opt(IDL.Nat64),
174
+ referrer: IDL.Opt(IDL.Text),
175
+ time_zone: IDL.Text,
176
+ session_id: IDL.Text,
177
+ href: IDL.Text,
178
+ satellite_id: IDL.Principal,
179
+ device: PageViewDevice,
180
+ version: IDL.Opt(IDL.Nat64),
181
+ user_agent: IDL.Opt(IDL.Text)
182
+ });
183
+ const Result = IDL.Variant({Ok: PageView, Err: IDL.Text});
184
+ const Result_1 = IDL.Variant({
185
+ Ok: IDL.Null,
186
+ Err: IDL.Vec(IDL.Tuple(AnalyticKey, IDL.Text))
187
+ });
188
+ const SetPerformanceMetric = IDL.Record({
189
+ session_id: IDL.Text,
190
+ data: PerformanceData,
191
+ href: IDL.Text,
192
+ metric_name: PerformanceMetricName,
193
+ satellite_id: IDL.Principal,
194
+ version: IDL.Opt(IDL.Nat64),
195
+ user_agent: IDL.Opt(IDL.Text)
196
+ });
197
+ const Result_2 = IDL.Variant({Ok: PerformanceMetric, Err: IDL.Text});
198
+ const SetSatelliteConfig = IDL.Record({
199
+ features: IDL.Opt(OrbiterSatelliteFeatures),
200
+ restricted_origin: IDL.Opt(IDL.Text),
201
+ version: IDL.Opt(IDL.Nat64)
202
+ });
203
+ const SetTrackEvent = IDL.Record({
204
+ updated_at: IDL.Opt(IDL.Nat64),
205
+ session_id: IDL.Text,
206
+ metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
207
+ name: IDL.Text,
208
+ satellite_id: IDL.Principal,
209
+ version: IDL.Opt(IDL.Nat64),
210
+ user_agent: IDL.Opt(IDL.Text)
211
+ });
212
+ const Result_3 = IDL.Variant({Ok: TrackEvent, Err: IDL.Text});
213
+ return IDL.Service({
214
+ del_controllers: IDL.Func(
215
+ [DeleteControllersArgs],
216
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
217
+ []
218
+ ),
219
+ del_satellite_config: IDL.Func([IDL.Principal, DelSatelliteConfig], [], []),
220
+ deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
221
+ get_page_views: IDL.Func(
222
+ [GetAnalytics],
223
+ [IDL.Vec(IDL.Tuple(AnalyticKey, PageView))],
224
+ ['query']
225
+ ),
226
+ get_page_views_analytics_clients: IDL.Func(
227
+ [GetAnalytics],
228
+ [AnalyticsClientsPageViews],
229
+ ['query']
230
+ ),
231
+ get_page_views_analytics_metrics: IDL.Func(
232
+ [GetAnalytics],
233
+ [AnalyticsMetricsPageViews],
234
+ ['query']
235
+ ),
236
+ get_page_views_analytics_top_10: IDL.Func([GetAnalytics], [AnalyticsTop10PageViews], ['query']),
237
+ get_performance_metrics: IDL.Func(
238
+ [GetAnalytics],
239
+ [IDL.Vec(IDL.Tuple(AnalyticKey, PerformanceMetric))],
240
+ ['query']
241
+ ),
242
+ get_performance_metrics_analytics_web_vitals: IDL.Func(
243
+ [GetAnalytics],
244
+ [AnalyticsWebVitalsPerformanceMetrics],
245
+ ['query']
246
+ ),
247
+ get_track_events: IDL.Func(
248
+ [GetAnalytics],
249
+ [IDL.Vec(IDL.Tuple(AnalyticKey, TrackEvent))],
250
+ ['query']
251
+ ),
252
+ get_track_events_analytics: IDL.Func([GetAnalytics], [AnalyticsTrackEvents], ['query']),
253
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
254
+ http_request_update: IDL.Func([HttpRequest], [HttpResponse], []),
255
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
256
+ list_satellite_configs: IDL.Func(
257
+ [],
258
+ [IDL.Vec(IDL.Tuple(IDL.Principal, OrbiterSatelliteConfig))],
259
+ ['query']
260
+ ),
261
+ memory_size: IDL.Func([], [MemorySize], ['query']),
262
+ set_controllers: IDL.Func(
263
+ [SetControllersArgs],
264
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
265
+ []
266
+ ),
267
+ set_page_view: IDL.Func([AnalyticKey, SetPageView], [Result], []),
268
+ set_page_views: IDL.Func([IDL.Vec(IDL.Tuple(AnalyticKey, SetPageView))], [Result_1], []),
269
+ set_performance_metric: IDL.Func([AnalyticKey, SetPerformanceMetric], [Result_2], []),
270
+ set_performance_metrics: IDL.Func(
271
+ [IDL.Vec(IDL.Tuple(AnalyticKey, SetPerformanceMetric))],
272
+ [Result_1],
273
+ []
274
+ ),
275
+ set_satellite_configs: IDL.Func(
276
+ [IDL.Vec(IDL.Tuple(IDL.Principal, SetSatelliteConfig))],
277
+ [IDL.Vec(IDL.Tuple(IDL.Principal, OrbiterSatelliteConfig))],
278
+ []
279
+ ),
280
+ set_track_event: IDL.Func([AnalyticKey, SetTrackEvent], [Result_3], []),
281
+ set_track_events: IDL.Func([IDL.Vec(IDL.Tuple(AnalyticKey, SetTrackEvent))], [Result_1], [])
282
+ });
283
+ };
284
+ // @ts-ignore
285
+ export const init = ({IDL}) => {
286
+ return [];
287
+ };
@@ -143,6 +143,10 @@ export interface ListResults_1 {
143
143
  items_length: bigint;
144
144
  }
145
145
  export type Memory = {Heap: null} | {Stable: null};
146
+ export interface MemorySize {
147
+ stable: bigint;
148
+ heap: bigint;
149
+ }
146
150
  export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
147
151
  export interface RateConfig {
148
152
  max_tokens: bigint;
@@ -270,6 +274,7 @@ export interface _SERVICE {
270
274
  list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
271
275
  list_docs: ActorMethod<[string, ListParams], ListResults_1>;
272
276
  list_rules: ActorMethod<[CollectionType], Array<[string, Rule]>>;
277
+ memory_size: ActorMethod<[], MemorySize>;
273
278
  set_auth_config: ActorMethod<[AuthenticationConfig], undefined>;
274
279
  set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
275
280
  set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;