@junobuild/ic-client 1.2.0 → 2.0.0-next-2025-08-25

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