@junobuild/admin 1.0.0 → 2.0.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 (63) 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/ic.api.d.ts +1 -1
  6. package/dist/types/api/mission-control.api.d.ts +4 -5
  7. package/dist/types/api/orbiter.api.d.ts +3 -4
  8. package/dist/types/api/satellite.api.d.ts +23 -24
  9. package/dist/types/constants/rules.constants.d.ts +9 -9
  10. package/dist/types/index.d.ts +0 -1
  11. package/dist/types/services/mission-control.controllers.services.d.ts +2 -3
  12. package/dist/types/services/mission-control.upgrade.services.d.ts +1 -1
  13. package/dist/types/services/mission-control.version.services.d.ts +1 -1
  14. package/dist/types/services/module.upgrade.services.d.ts +1 -1
  15. package/dist/types/services/orbiter.controllers.services.d.ts +2 -3
  16. package/dist/types/services/orbiter.memory.services.d.ts +2 -3
  17. package/dist/types/services/orbiter.upgrade.services.d.ts +1 -1
  18. package/dist/types/services/orbiter.version.services.d.ts +1 -1
  19. package/dist/types/services/package.services.d.ts +1 -1
  20. package/dist/types/services/satellite.assets.services.d.ts +1 -1
  21. package/dist/types/services/satellite.config.services.d.ts +1 -1
  22. package/dist/types/services/satellite.controllers.services.d.ts +4 -5
  23. package/dist/types/services/satellite.docs.services.d.ts +1 -1
  24. package/dist/types/services/satellite.domains.services.d.ts +1 -1
  25. package/dist/types/services/satellite.memory.services.d.ts +2 -3
  26. package/dist/types/services/satellite.rules.services.d.ts +1 -1
  27. package/dist/types/services/satellite.upgrade.services.d.ts +1 -1
  28. package/dist/types/services/satellite.version.services.d.ts +1 -1
  29. package/dist/types/types/upgrade.d.ts +1 -1
  30. package/dist/types/utils/config.utils.d.ts +7 -7
  31. package/dist/types/utils/controllers.utils.d.ts +2 -2
  32. package/dist/types/utils/idl.utils.d.ts +2 -2
  33. package/dist/types/utils/memory.utils.d.ts +3 -3
  34. package/dist/types/utils/rule.utils.d.ts +8 -8
  35. package/package.json +3 -2
  36. package/dist/declarations/mission_control/mission_control-deprecated-version.did.d.ts +0 -231
  37. package/dist/declarations/mission_control/mission_control-deprecated-version.factory.did.js +0 -247
  38. package/dist/declarations/mission_control/mission_control.did.d.ts +0 -241
  39. package/dist/declarations/mission_control/mission_control.factory.certified.did.js +0 -259
  40. package/dist/declarations/mission_control/mission_control.factory.did.js +0 -259
  41. package/dist/declarations/orbiter/orbiter-deprecated-version.did.d.ts +0 -229
  42. package/dist/declarations/orbiter/orbiter-deprecated-version.factory.did.js +0 -271
  43. package/dist/declarations/orbiter/orbiter.did.d.ts +0 -277
  44. package/dist/declarations/orbiter/orbiter.factory.certified.did.js +0 -304
  45. package/dist/declarations/orbiter/orbiter.factory.did.js +0 -320
  46. package/dist/declarations/orbiter/orbiter.factory.did.mjs +0 -320
  47. package/dist/declarations/satellite/satellite-deprecated-no-scope.did.d.ts +0 -183
  48. package/dist/declarations/satellite/satellite-deprecated-no-scope.factory.did.js +0 -194
  49. package/dist/declarations/satellite/satellite-deprecated-no-scope.factory.did.mjs +0 -192
  50. package/dist/declarations/satellite/satellite-deprecated-version.did.d.ts +0 -291
  51. package/dist/declarations/satellite/satellite-deprecated-version.factory.did.js +0 -319
  52. package/dist/declarations/satellite/satellite-deprecated.did.d.ts +0 -182
  53. package/dist/declarations/satellite/satellite-deprecated.factory.did.js +0 -191
  54. package/dist/declarations/satellite/satellite-deprecated.factory.did.mjs +0 -191
  55. package/dist/declarations/satellite/satellite.did.d.ts +0 -396
  56. package/dist/declarations/satellite/satellite.factory.certified.did.js +0 -419
  57. package/dist/declarations/satellite/satellite.factory.did.js +0 -419
  58. package/dist/declarations/satellite/satellite.factory.did.mjs +0 -419
  59. package/dist/types/api/_actor.api.d.ts +0 -34
  60. package/dist/types/api/_actor.factory.d.ts +0 -19
  61. package/dist/types/api/_agent.api.d.ts +0 -3
  62. package/dist/types/types/actor.d.ts +0 -74
  63. package/dist/types/utils/agent.utils.d.ts +0 -6
@@ -1,304 +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
- Submit: IDL.Null
10
- });
11
- const Controller = IDL.Record({
12
- updated_at: IDL.Nat64,
13
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
14
- created_at: IDL.Nat64,
15
- scope: ControllerScope,
16
- expires_at: IDL.Opt(IDL.Nat64)
17
- });
18
- const DelSatelliteConfig = IDL.Record({version: IDL.Opt(IDL.Nat64)});
19
- const DepositCyclesArgs = IDL.Record({
20
- cycles: IDL.Nat,
21
- destination_id: IDL.Principal
22
- });
23
- const GetAnalytics = IDL.Record({
24
- to: IDL.Opt(IDL.Nat64),
25
- from: IDL.Opt(IDL.Nat64),
26
- satellite_id: IDL.Opt(IDL.Principal)
27
- });
28
- const AnalyticKey = IDL.Record({
29
- key: IDL.Text,
30
- collected_at: IDL.Nat64
31
- });
32
- const PageViewClient = IDL.Record({
33
- os: IDL.Text,
34
- device: IDL.Opt(IDL.Text),
35
- browser: IDL.Text
36
- });
37
- const PageViewCampaign = IDL.Record({
38
- utm_content: IDL.Opt(IDL.Text),
39
- utm_medium: IDL.Opt(IDL.Text),
40
- utm_source: IDL.Text,
41
- utm_term: IDL.Opt(IDL.Text),
42
- utm_campaign: IDL.Opt(IDL.Text)
43
- });
44
- const PageViewDevice = IDL.Record({
45
- inner_height: IDL.Nat16,
46
- screen_height: IDL.Opt(IDL.Nat16),
47
- screen_width: IDL.Opt(IDL.Nat16),
48
- inner_width: IDL.Nat16
49
- });
50
- const PageView = IDL.Record({
51
- client: IDL.Opt(PageViewClient),
52
- title: IDL.Text,
53
- updated_at: IDL.Nat64,
54
- referrer: IDL.Opt(IDL.Text),
55
- time_zone: IDL.Text,
56
- session_id: IDL.Text,
57
- campaign: IDL.Opt(PageViewCampaign),
58
- href: IDL.Text,
59
- created_at: IDL.Nat64,
60
- satellite_id: IDL.Principal,
61
- device: PageViewDevice,
62
- version: IDL.Opt(IDL.Nat64),
63
- user_agent: IDL.Opt(IDL.Text)
64
- });
65
- const AnalyticsBrowsersPageViews = IDL.Record({
66
- safari: IDL.Float64,
67
- opera: IDL.Float64,
68
- others: IDL.Float64,
69
- firefox: IDL.Float64,
70
- chrome: IDL.Float64
71
- });
72
- const AnalyticsOperatingSystemsPageViews = IDL.Record({
73
- ios: IDL.Float64,
74
- macos: IDL.Float64,
75
- others: IDL.Float64,
76
- linux: IDL.Float64,
77
- android: IDL.Float64,
78
- windows: IDL.Float64
79
- });
80
- const AnalyticsDevicesPageViews = IDL.Record({
81
- desktop: IDL.Float64,
82
- laptop: IDL.Opt(IDL.Float64),
83
- others: IDL.Float64,
84
- tablet: IDL.Opt(IDL.Float64),
85
- mobile: IDL.Float64
86
- });
87
- const AnalyticsClientsPageViews = IDL.Record({
88
- browsers: AnalyticsBrowsersPageViews,
89
- operating_systems: IDL.Opt(AnalyticsOperatingSystemsPageViews),
90
- devices: AnalyticsDevicesPageViews
91
- });
92
- const CalendarDate = IDL.Record({
93
- day: IDL.Nat8,
94
- month: IDL.Nat8,
95
- year: IDL.Int32
96
- });
97
- const AnalyticsMetricsPageViews = IDL.Record({
98
- bounce_rate: IDL.Float64,
99
- average_page_views_per_session: IDL.Float64,
100
- daily_total_page_views: IDL.Vec(IDL.Tuple(CalendarDate, IDL.Nat32)),
101
- total_page_views: IDL.Nat32,
102
- unique_page_views: IDL.Nat64,
103
- unique_sessions: IDL.Nat64
104
- });
105
- const AnalyticsTop10PageViews = IDL.Record({
106
- referrers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)),
107
- pages: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)),
108
- utm_campaigns: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))),
109
- utm_sources: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))),
110
- time_zones: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)))
111
- });
112
- const NavigationType = IDL.Variant({
113
- Navigate: IDL.Null,
114
- Restore: IDL.Null,
115
- Reload: IDL.Null,
116
- BackForward: IDL.Null,
117
- BackForwardCache: IDL.Null,
118
- Prerender: IDL.Null
119
- });
120
- const WebVitalsMetric = IDL.Record({
121
- id: IDL.Text,
122
- value: IDL.Float64,
123
- navigation_type: IDL.Opt(NavigationType),
124
- delta: IDL.Float64
125
- });
126
- const PerformanceData = IDL.Variant({WebVitalsMetric: WebVitalsMetric});
127
- const PerformanceMetricName = IDL.Variant({
128
- CLS: IDL.Null,
129
- FCP: IDL.Null,
130
- INP: IDL.Null,
131
- LCP: IDL.Null,
132
- TTFB: IDL.Null
133
- });
134
- const PerformanceMetric = IDL.Record({
135
- updated_at: IDL.Nat64,
136
- session_id: IDL.Text,
137
- data: PerformanceData,
138
- href: IDL.Text,
139
- metric_name: PerformanceMetricName,
140
- created_at: IDL.Nat64,
141
- satellite_id: IDL.Principal,
142
- version: IDL.Opt(IDL.Nat64)
143
- });
144
- const AnalyticsWebVitalsPageMetrics = IDL.Record({
145
- cls: IDL.Opt(IDL.Float64),
146
- fcp: IDL.Opt(IDL.Float64),
147
- inp: IDL.Opt(IDL.Float64),
148
- lcp: IDL.Opt(IDL.Float64),
149
- ttfb: IDL.Opt(IDL.Float64)
150
- });
151
- const AnalyticsWebVitalsPerformanceMetrics = IDL.Record({
152
- overall: AnalyticsWebVitalsPageMetrics,
153
- pages: IDL.Vec(IDL.Tuple(IDL.Text, AnalyticsWebVitalsPageMetrics))
154
- });
155
- const TrackEvent = IDL.Record({
156
- updated_at: IDL.Nat64,
157
- session_id: IDL.Text,
158
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
159
- name: IDL.Text,
160
- created_at: IDL.Nat64,
161
- satellite_id: IDL.Principal,
162
- version: IDL.Opt(IDL.Nat64)
163
- });
164
- const AnalyticsTrackEvents = IDL.Record({
165
- total: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))
166
- });
167
- const HttpRequest = IDL.Record({
168
- url: IDL.Text,
169
- method: IDL.Text,
170
- body: IDL.Vec(IDL.Nat8),
171
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
172
- certificate_version: IDL.Opt(IDL.Nat16)
173
- });
174
- const HttpResponse = IDL.Record({
175
- body: IDL.Vec(IDL.Nat8),
176
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
177
- upgrade: IDL.Opt(IDL.Bool),
178
- status_code: IDL.Nat16
179
- });
180
- const OrbiterSatelliteFeatures = IDL.Record({
181
- performance_metrics: IDL.Bool,
182
- track_events: IDL.Bool,
183
- page_views: IDL.Bool
184
- });
185
- const OrbiterSatelliteConfig = IDL.Record({
186
- updated_at: IDL.Nat64,
187
- features: IDL.Opt(OrbiterSatelliteFeatures),
188
- restricted_origin: IDL.Opt(IDL.Text),
189
- created_at: IDL.Nat64,
190
- version: IDL.Opt(IDL.Nat64)
191
- });
192
- const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
193
- const SetController = IDL.Record({
194
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
195
- scope: ControllerScope,
196
- expires_at: IDL.Opt(IDL.Nat64)
197
- });
198
- const SetControllersArgs = IDL.Record({
199
- controller: SetController,
200
- controllers: IDL.Vec(IDL.Principal)
201
- });
202
- const SetPageView = IDL.Record({
203
- client: IDL.Opt(PageViewClient),
204
- title: IDL.Text,
205
- updated_at: IDL.Opt(IDL.Nat64),
206
- referrer: IDL.Opt(IDL.Text),
207
- time_zone: IDL.Text,
208
- session_id: IDL.Text,
209
- campaign: IDL.Opt(PageViewCampaign),
210
- href: IDL.Text,
211
- satellite_id: IDL.Principal,
212
- device: PageViewDevice,
213
- version: IDL.Opt(IDL.Nat64),
214
- user_agent: IDL.Opt(IDL.Text)
215
- });
216
- const Result = IDL.Variant({Ok: PageView, Err: IDL.Text});
217
- const Result_1 = IDL.Variant({
218
- Ok: IDL.Null,
219
- Err: IDL.Vec(IDL.Tuple(AnalyticKey, IDL.Text))
220
- });
221
- const SetPerformanceMetric = IDL.Record({
222
- session_id: IDL.Text,
223
- data: PerformanceData,
224
- href: IDL.Text,
225
- metric_name: PerformanceMetricName,
226
- satellite_id: IDL.Principal,
227
- version: IDL.Opt(IDL.Nat64),
228
- user_agent: IDL.Opt(IDL.Text)
229
- });
230
- const Result_2 = IDL.Variant({Ok: PerformanceMetric, Err: IDL.Text});
231
- const SetSatelliteConfig = IDL.Record({
232
- features: IDL.Opt(OrbiterSatelliteFeatures),
233
- restricted_origin: IDL.Opt(IDL.Text),
234
- version: IDL.Opt(IDL.Nat64)
235
- });
236
- const SetTrackEvent = IDL.Record({
237
- updated_at: IDL.Opt(IDL.Nat64),
238
- session_id: IDL.Text,
239
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
240
- name: IDL.Text,
241
- satellite_id: IDL.Principal,
242
- version: IDL.Opt(IDL.Nat64),
243
- user_agent: IDL.Opt(IDL.Text)
244
- });
245
- const Result_3 = IDL.Variant({Ok: TrackEvent, Err: IDL.Text});
246
- return IDL.Service({
247
- del_controllers: IDL.Func(
248
- [DeleteControllersArgs],
249
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
250
- []
251
- ),
252
- del_satellite_config: IDL.Func([IDL.Principal, DelSatelliteConfig], [], []),
253
- deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
254
- get_page_views: IDL.Func([GetAnalytics], [IDL.Vec(IDL.Tuple(AnalyticKey, PageView))], []),
255
- get_page_views_analytics_clients: IDL.Func([GetAnalytics], [AnalyticsClientsPageViews], []),
256
- get_page_views_analytics_metrics: IDL.Func([GetAnalytics], [AnalyticsMetricsPageViews], []),
257
- get_page_views_analytics_top_10: IDL.Func([GetAnalytics], [AnalyticsTop10PageViews], []),
258
- get_performance_metrics: IDL.Func(
259
- [GetAnalytics],
260
- [IDL.Vec(IDL.Tuple(AnalyticKey, PerformanceMetric))],
261
- []
262
- ),
263
- get_performance_metrics_analytics_web_vitals: IDL.Func(
264
- [GetAnalytics],
265
- [AnalyticsWebVitalsPerformanceMetrics],
266
- []
267
- ),
268
- get_track_events: IDL.Func([GetAnalytics], [IDL.Vec(IDL.Tuple(AnalyticKey, TrackEvent))], []),
269
- get_track_events_analytics: IDL.Func([GetAnalytics], [AnalyticsTrackEvents], []),
270
- http_request: IDL.Func([HttpRequest], [HttpResponse], []),
271
- http_request_update: IDL.Func([HttpRequest], [HttpResponse], []),
272
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], []),
273
- list_satellite_configs: IDL.Func(
274
- [],
275
- [IDL.Vec(IDL.Tuple(IDL.Principal, OrbiterSatelliteConfig))],
276
- []
277
- ),
278
- memory_size: IDL.Func([], [MemorySize], []),
279
- set_controllers: IDL.Func(
280
- [SetControllersArgs],
281
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
282
- []
283
- ),
284
- set_page_view: IDL.Func([AnalyticKey, SetPageView], [Result], []),
285
- set_page_views: IDL.Func([IDL.Vec(IDL.Tuple(AnalyticKey, SetPageView))], [Result_1], []),
286
- set_performance_metric: IDL.Func([AnalyticKey, SetPerformanceMetric], [Result_2], []),
287
- set_performance_metrics: IDL.Func(
288
- [IDL.Vec(IDL.Tuple(AnalyticKey, SetPerformanceMetric))],
289
- [Result_1],
290
- []
291
- ),
292
- set_satellite_configs: IDL.Func(
293
- [IDL.Vec(IDL.Tuple(IDL.Principal, SetSatelliteConfig))],
294
- [IDL.Vec(IDL.Tuple(IDL.Principal, OrbiterSatelliteConfig))],
295
- []
296
- ),
297
- set_track_event: IDL.Func([AnalyticKey, SetTrackEvent], [Result_3], []),
298
- set_track_events: IDL.Func([IDL.Vec(IDL.Tuple(AnalyticKey, SetTrackEvent))], [Result_1], [])
299
- });
300
- };
301
- // @ts-ignore
302
- export const init = ({IDL}) => {
303
- return [];
304
- };
@@ -1,320 +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
- Submit: IDL.Null
10
- });
11
- const Controller = IDL.Record({
12
- updated_at: IDL.Nat64,
13
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
14
- created_at: IDL.Nat64,
15
- scope: ControllerScope,
16
- expires_at: IDL.Opt(IDL.Nat64)
17
- });
18
- const DelSatelliteConfig = IDL.Record({version: IDL.Opt(IDL.Nat64)});
19
- const DepositCyclesArgs = IDL.Record({
20
- cycles: IDL.Nat,
21
- destination_id: IDL.Principal
22
- });
23
- const GetAnalytics = IDL.Record({
24
- to: IDL.Opt(IDL.Nat64),
25
- from: IDL.Opt(IDL.Nat64),
26
- satellite_id: IDL.Opt(IDL.Principal)
27
- });
28
- const AnalyticKey = IDL.Record({
29
- key: IDL.Text,
30
- collected_at: IDL.Nat64
31
- });
32
- const PageViewClient = IDL.Record({
33
- os: IDL.Text,
34
- device: IDL.Opt(IDL.Text),
35
- browser: IDL.Text
36
- });
37
- const PageViewCampaign = IDL.Record({
38
- utm_content: IDL.Opt(IDL.Text),
39
- utm_medium: IDL.Opt(IDL.Text),
40
- utm_source: IDL.Text,
41
- utm_term: IDL.Opt(IDL.Text),
42
- utm_campaign: IDL.Opt(IDL.Text)
43
- });
44
- const PageViewDevice = IDL.Record({
45
- inner_height: IDL.Nat16,
46
- screen_height: IDL.Opt(IDL.Nat16),
47
- screen_width: IDL.Opt(IDL.Nat16),
48
- inner_width: IDL.Nat16
49
- });
50
- const PageView = IDL.Record({
51
- client: IDL.Opt(PageViewClient),
52
- title: IDL.Text,
53
- updated_at: IDL.Nat64,
54
- referrer: IDL.Opt(IDL.Text),
55
- time_zone: IDL.Text,
56
- session_id: IDL.Text,
57
- campaign: IDL.Opt(PageViewCampaign),
58
- href: IDL.Text,
59
- created_at: IDL.Nat64,
60
- satellite_id: IDL.Principal,
61
- device: PageViewDevice,
62
- version: IDL.Opt(IDL.Nat64),
63
- user_agent: IDL.Opt(IDL.Text)
64
- });
65
- const AnalyticsBrowsersPageViews = IDL.Record({
66
- safari: IDL.Float64,
67
- opera: IDL.Float64,
68
- others: IDL.Float64,
69
- firefox: IDL.Float64,
70
- chrome: IDL.Float64
71
- });
72
- const AnalyticsOperatingSystemsPageViews = IDL.Record({
73
- ios: IDL.Float64,
74
- macos: IDL.Float64,
75
- others: IDL.Float64,
76
- linux: IDL.Float64,
77
- android: IDL.Float64,
78
- windows: IDL.Float64
79
- });
80
- const AnalyticsDevicesPageViews = IDL.Record({
81
- desktop: IDL.Float64,
82
- laptop: IDL.Opt(IDL.Float64),
83
- others: IDL.Float64,
84
- tablet: IDL.Opt(IDL.Float64),
85
- mobile: IDL.Float64
86
- });
87
- const AnalyticsClientsPageViews = IDL.Record({
88
- browsers: AnalyticsBrowsersPageViews,
89
- operating_systems: IDL.Opt(AnalyticsOperatingSystemsPageViews),
90
- devices: AnalyticsDevicesPageViews
91
- });
92
- const CalendarDate = IDL.Record({
93
- day: IDL.Nat8,
94
- month: IDL.Nat8,
95
- year: IDL.Int32
96
- });
97
- const AnalyticsMetricsPageViews = IDL.Record({
98
- bounce_rate: IDL.Float64,
99
- average_page_views_per_session: IDL.Float64,
100
- daily_total_page_views: IDL.Vec(IDL.Tuple(CalendarDate, IDL.Nat32)),
101
- total_page_views: IDL.Nat32,
102
- unique_page_views: IDL.Nat64,
103
- unique_sessions: IDL.Nat64
104
- });
105
- const AnalyticsTop10PageViews = IDL.Record({
106
- referrers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)),
107
- pages: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)),
108
- utm_campaigns: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))),
109
- utm_sources: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))),
110
- time_zones: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)))
111
- });
112
- const NavigationType = IDL.Variant({
113
- Navigate: IDL.Null,
114
- Restore: IDL.Null,
115
- Reload: IDL.Null,
116
- BackForward: IDL.Null,
117
- BackForwardCache: IDL.Null,
118
- Prerender: IDL.Null
119
- });
120
- const WebVitalsMetric = IDL.Record({
121
- id: IDL.Text,
122
- value: IDL.Float64,
123
- navigation_type: IDL.Opt(NavigationType),
124
- delta: IDL.Float64
125
- });
126
- const PerformanceData = IDL.Variant({WebVitalsMetric: WebVitalsMetric});
127
- const PerformanceMetricName = IDL.Variant({
128
- CLS: IDL.Null,
129
- FCP: IDL.Null,
130
- INP: IDL.Null,
131
- LCP: IDL.Null,
132
- TTFB: IDL.Null
133
- });
134
- const PerformanceMetric = IDL.Record({
135
- updated_at: IDL.Nat64,
136
- session_id: IDL.Text,
137
- data: PerformanceData,
138
- href: IDL.Text,
139
- metric_name: PerformanceMetricName,
140
- created_at: IDL.Nat64,
141
- satellite_id: IDL.Principal,
142
- version: IDL.Opt(IDL.Nat64)
143
- });
144
- const AnalyticsWebVitalsPageMetrics = IDL.Record({
145
- cls: IDL.Opt(IDL.Float64),
146
- fcp: IDL.Opt(IDL.Float64),
147
- inp: IDL.Opt(IDL.Float64),
148
- lcp: IDL.Opt(IDL.Float64),
149
- ttfb: IDL.Opt(IDL.Float64)
150
- });
151
- const AnalyticsWebVitalsPerformanceMetrics = IDL.Record({
152
- overall: AnalyticsWebVitalsPageMetrics,
153
- pages: IDL.Vec(IDL.Tuple(IDL.Text, AnalyticsWebVitalsPageMetrics))
154
- });
155
- const TrackEvent = IDL.Record({
156
- updated_at: IDL.Nat64,
157
- session_id: IDL.Text,
158
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
159
- name: IDL.Text,
160
- created_at: IDL.Nat64,
161
- satellite_id: IDL.Principal,
162
- version: IDL.Opt(IDL.Nat64)
163
- });
164
- const AnalyticsTrackEvents = IDL.Record({
165
- total: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32))
166
- });
167
- const HttpRequest = IDL.Record({
168
- url: IDL.Text,
169
- method: IDL.Text,
170
- body: IDL.Vec(IDL.Nat8),
171
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
172
- certificate_version: IDL.Opt(IDL.Nat16)
173
- });
174
- const HttpResponse = IDL.Record({
175
- body: IDL.Vec(IDL.Nat8),
176
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
177
- upgrade: IDL.Opt(IDL.Bool),
178
- status_code: IDL.Nat16
179
- });
180
- const OrbiterSatelliteFeatures = IDL.Record({
181
- performance_metrics: IDL.Bool,
182
- track_events: IDL.Bool,
183
- page_views: IDL.Bool
184
- });
185
- const OrbiterSatelliteConfig = IDL.Record({
186
- updated_at: IDL.Nat64,
187
- features: IDL.Opt(OrbiterSatelliteFeatures),
188
- restricted_origin: IDL.Opt(IDL.Text),
189
- created_at: IDL.Nat64,
190
- version: IDL.Opt(IDL.Nat64)
191
- });
192
- const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
193
- const SetController = IDL.Record({
194
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
195
- scope: ControllerScope,
196
- expires_at: IDL.Opt(IDL.Nat64)
197
- });
198
- const SetControllersArgs = IDL.Record({
199
- controller: SetController,
200
- controllers: IDL.Vec(IDL.Principal)
201
- });
202
- const SetPageView = IDL.Record({
203
- client: IDL.Opt(PageViewClient),
204
- title: IDL.Text,
205
- updated_at: IDL.Opt(IDL.Nat64),
206
- referrer: IDL.Opt(IDL.Text),
207
- time_zone: IDL.Text,
208
- session_id: IDL.Text,
209
- campaign: IDL.Opt(PageViewCampaign),
210
- href: IDL.Text,
211
- satellite_id: IDL.Principal,
212
- device: PageViewDevice,
213
- version: IDL.Opt(IDL.Nat64),
214
- user_agent: IDL.Opt(IDL.Text)
215
- });
216
- const Result = IDL.Variant({Ok: PageView, Err: IDL.Text});
217
- const Result_1 = IDL.Variant({
218
- Ok: IDL.Null,
219
- Err: IDL.Vec(IDL.Tuple(AnalyticKey, IDL.Text))
220
- });
221
- const SetPerformanceMetric = IDL.Record({
222
- session_id: IDL.Text,
223
- data: PerformanceData,
224
- href: IDL.Text,
225
- metric_name: PerformanceMetricName,
226
- satellite_id: IDL.Principal,
227
- version: IDL.Opt(IDL.Nat64),
228
- user_agent: IDL.Opt(IDL.Text)
229
- });
230
- const Result_2 = IDL.Variant({Ok: PerformanceMetric, Err: IDL.Text});
231
- const SetSatelliteConfig = IDL.Record({
232
- features: IDL.Opt(OrbiterSatelliteFeatures),
233
- restricted_origin: IDL.Opt(IDL.Text),
234
- version: IDL.Opt(IDL.Nat64)
235
- });
236
- const SetTrackEvent = IDL.Record({
237
- updated_at: IDL.Opt(IDL.Nat64),
238
- session_id: IDL.Text,
239
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
240
- name: IDL.Text,
241
- satellite_id: IDL.Principal,
242
- version: IDL.Opt(IDL.Nat64),
243
- user_agent: IDL.Opt(IDL.Text)
244
- });
245
- const Result_3 = IDL.Variant({Ok: TrackEvent, Err: IDL.Text});
246
- return IDL.Service({
247
- del_controllers: IDL.Func(
248
- [DeleteControllersArgs],
249
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
250
- []
251
- ),
252
- del_satellite_config: IDL.Func([IDL.Principal, DelSatelliteConfig], [], []),
253
- deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
254
- get_page_views: IDL.Func(
255
- [GetAnalytics],
256
- [IDL.Vec(IDL.Tuple(AnalyticKey, PageView))],
257
- ['query']
258
- ),
259
- get_page_views_analytics_clients: IDL.Func(
260
- [GetAnalytics],
261
- [AnalyticsClientsPageViews],
262
- ['query']
263
- ),
264
- get_page_views_analytics_metrics: IDL.Func(
265
- [GetAnalytics],
266
- [AnalyticsMetricsPageViews],
267
- ['query']
268
- ),
269
- get_page_views_analytics_top_10: IDL.Func([GetAnalytics], [AnalyticsTop10PageViews], ['query']),
270
- get_performance_metrics: IDL.Func(
271
- [GetAnalytics],
272
- [IDL.Vec(IDL.Tuple(AnalyticKey, PerformanceMetric))],
273
- ['query']
274
- ),
275
- get_performance_metrics_analytics_web_vitals: IDL.Func(
276
- [GetAnalytics],
277
- [AnalyticsWebVitalsPerformanceMetrics],
278
- ['query']
279
- ),
280
- get_track_events: IDL.Func(
281
- [GetAnalytics],
282
- [IDL.Vec(IDL.Tuple(AnalyticKey, TrackEvent))],
283
- ['query']
284
- ),
285
- get_track_events_analytics: IDL.Func([GetAnalytics], [AnalyticsTrackEvents], ['query']),
286
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
287
- http_request_update: IDL.Func([HttpRequest], [HttpResponse], []),
288
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
289
- list_satellite_configs: IDL.Func(
290
- [],
291
- [IDL.Vec(IDL.Tuple(IDL.Principal, OrbiterSatelliteConfig))],
292
- ['query']
293
- ),
294
- memory_size: IDL.Func([], [MemorySize], ['query']),
295
- set_controllers: IDL.Func(
296
- [SetControllersArgs],
297
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
298
- []
299
- ),
300
- set_page_view: IDL.Func([AnalyticKey, SetPageView], [Result], []),
301
- set_page_views: IDL.Func([IDL.Vec(IDL.Tuple(AnalyticKey, SetPageView))], [Result_1], []),
302
- set_performance_metric: IDL.Func([AnalyticKey, SetPerformanceMetric], [Result_2], []),
303
- set_performance_metrics: IDL.Func(
304
- [IDL.Vec(IDL.Tuple(AnalyticKey, SetPerformanceMetric))],
305
- [Result_1],
306
- []
307
- ),
308
- set_satellite_configs: IDL.Func(
309
- [IDL.Vec(IDL.Tuple(IDL.Principal, SetSatelliteConfig))],
310
- [IDL.Vec(IDL.Tuple(IDL.Principal, OrbiterSatelliteConfig))],
311
- []
312
- ),
313
- set_track_event: IDL.Func([AnalyticKey, SetTrackEvent], [Result_3], []),
314
- set_track_events: IDL.Func([IDL.Vec(IDL.Tuple(AnalyticKey, SetTrackEvent))], [Result_1], [])
315
- });
316
- };
317
- // @ts-ignore
318
- export const init = ({IDL}) => {
319
- return [];
320
- };