@junobuild/ic-client 7.1.1 → 7.2.0-next-2026-02-10

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 (42) hide show
  1. package/actor.js +1 -1
  2. package/actor.js.map +3 -3
  3. package/actor.mjs +1 -1
  4. package/actor.mjs.map +3 -3
  5. package/declarations/console/console.did.d.ts +17 -11
  6. package/declarations/console/console.factory.certified.did.js +19 -7
  7. package/declarations/console/console.factory.did.js +19 -7
  8. package/declarations/console/console.factory.did.mjs +19 -7
  9. package/declarations/deprecated/console-0-3-3.did.d.ts +529 -0
  10. package/declarations/deprecated/console-0-3-3.factory.did.js +567 -0
  11. package/declarations/deprecated/observatory-0-4-0.did.d.ts +145 -0
  12. package/declarations/deprecated/observatory-0-4-0.factory.did.js +149 -0
  13. package/declarations/deprecated/satellite-0-1-6.did.d.ts +511 -0
  14. package/declarations/deprecated/satellite-0-1-6.factory.did.js +546 -0
  15. package/declarations/mission_control/mission_control.did.d.ts +3 -0
  16. package/declarations/mission_control/mission_control.factory.certified.did.js +6 -0
  17. package/declarations/mission_control/mission_control.factory.did.js +6 -0
  18. package/declarations/observatory/observatory.did.d.ts +7 -4
  19. package/declarations/observatory/observatory.factory.certified.did.js +14 -4
  20. package/declarations/observatory/observatory.factory.did.js +14 -4
  21. package/declarations/observatory/observatory.factory.did.mjs +14 -4
  22. package/declarations/orbiter/orbiter.did.d.ts +3 -0
  23. package/declarations/orbiter/orbiter.factory.certified.did.js +6 -0
  24. package/declarations/orbiter/orbiter.factory.did.js +6 -0
  25. package/declarations/orbiter/orbiter.factory.did.mjs +6 -0
  26. package/declarations/satellite/satellite.did.d.ts +77 -10
  27. package/declarations/satellite/satellite.factory.certified.did.js +78 -5
  28. package/declarations/satellite/satellite.factory.did.js +78 -5
  29. package/declarations/satellite/satellite.factory.did.mjs +78 -5
  30. package/declarations/sputnik/sputnik.did.d.ts +77 -10
  31. package/declarations/sputnik/sputnik.factory.certified.did.js +78 -5
  32. package/declarations/sputnik/sputnik.factory.did.js +78 -5
  33. package/dev/_constants.d.ts +1 -0
  34. package/dev/errors.d.ts +9 -0
  35. package/dev/identity.d.ts +43 -0
  36. package/dev/types/identity.d.ts +48 -0
  37. package/dev.d.ts +3 -0
  38. package/dev.js +2 -0
  39. package/dev.js.map +7 -0
  40. package/dev.mjs +4 -0
  41. package/dev.mjs.map +7 -0
  42. package/package.json +10 -4
@@ -20,7 +20,11 @@ export const idlFactory = ({IDL}) => {
20
20
  sent: IDL.Nat64,
21
21
  failed: IDL.Nat64
22
22
  });
23
- const OpenIdProvider = IDL.Variant({Google: IDL.Null});
23
+ const OpenIdProvider = IDL.Variant({
24
+ GitHubActions: IDL.Null,
25
+ Google: IDL.Null,
26
+ GitHubAuth: IDL.Null
27
+ });
24
28
  const GetOpenIdCertificateArgs = IDL.Record({provider: OpenIdProvider});
25
29
  const JwkType = IDL.Variant({
26
30
  EC: IDL.Null,
@@ -55,6 +59,10 @@ export const idlFactory = ({IDL}) => {
55
59
  created_at: IDL.Nat64,
56
60
  version: IDL.Opt(IDL.Nat64)
57
61
  });
62
+ const ControllerKind = IDL.Variant({
63
+ Emulator: IDL.Null,
64
+ Automation: IDL.Null
65
+ });
58
66
  const ControllerScope = IDL.Variant({
59
67
  Write: IDL.Null,
60
68
  Admin: IDL.Null,
@@ -63,6 +71,7 @@ export const idlFactory = ({IDL}) => {
63
71
  const Controller = IDL.Record({
64
72
  updated_at: IDL.Nat64,
65
73
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
74
+ kind: IDL.Opt(ControllerKind),
66
75
  created_at: IDL.Nat64,
67
76
  scope: ControllerScope,
68
77
  expires_at: IDL.Opt(IDL.Nat64)
@@ -111,6 +120,7 @@ export const idlFactory = ({IDL}) => {
111
120
  });
112
121
  const SetController = IDL.Record({
113
122
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
123
+ kind: IDL.Opt(ControllerKind),
114
124
  scope: ControllerScope,
115
125
  expires_at: IDL.Opt(IDL.Nat64)
116
126
  });
@@ -129,15 +139,15 @@ export const idlFactory = ({IDL}) => {
129
139
  del_controllers: IDL.Func([DeleteControllersArgs], [], []),
130
140
  get_notify_status: IDL.Func([GetNotifications], [NotifyStatus], []),
131
141
  get_openid_certificate: IDL.Func([GetOpenIdCertificateArgs], [IDL.Opt(OpenIdCertificate)], []),
132
- is_openid_monitoring_enabled: IDL.Func([], [IDL.Bool], []),
142
+ is_openid_monitoring_enabled: IDL.Func([OpenIdProvider], [IDL.Bool], []),
133
143
  list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], []),
134
144
  notify: IDL.Func([NotifyArgs], [], []),
135
145
  ping: IDL.Func([NotifyArgs], [], []),
136
146
  set_controllers: IDL.Func([SetControllersArgs], [], []),
137
147
  set_env: IDL.Func([Env], [], []),
138
148
  set_rate_config: IDL.Func([RateKind, RateConfig], [], []),
139
- start_openid_monitoring: IDL.Func([], [], []),
140
- stop_openid_monitoring: IDL.Func([], [], [])
149
+ start_openid_monitoring: IDL.Func([OpenIdProvider], [], []),
150
+ stop_openid_monitoring: IDL.Func([OpenIdProvider], [], [])
141
151
  });
142
152
  };
143
153
 
@@ -20,7 +20,11 @@ export const idlFactory = ({IDL}) => {
20
20
  sent: IDL.Nat64,
21
21
  failed: IDL.Nat64
22
22
  });
23
- const OpenIdProvider = IDL.Variant({Google: IDL.Null});
23
+ const OpenIdProvider = IDL.Variant({
24
+ GitHubActions: IDL.Null,
25
+ Google: IDL.Null,
26
+ GitHubAuth: IDL.Null
27
+ });
24
28
  const GetOpenIdCertificateArgs = IDL.Record({provider: OpenIdProvider});
25
29
  const JwkType = IDL.Variant({
26
30
  EC: IDL.Null,
@@ -55,6 +59,10 @@ export const idlFactory = ({IDL}) => {
55
59
  created_at: IDL.Nat64,
56
60
  version: IDL.Opt(IDL.Nat64)
57
61
  });
62
+ const ControllerKind = IDL.Variant({
63
+ Emulator: IDL.Null,
64
+ Automation: IDL.Null
65
+ });
58
66
  const ControllerScope = IDL.Variant({
59
67
  Write: IDL.Null,
60
68
  Admin: IDL.Null,
@@ -63,6 +71,7 @@ export const idlFactory = ({IDL}) => {
63
71
  const Controller = IDL.Record({
64
72
  updated_at: IDL.Nat64,
65
73
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
74
+ kind: IDL.Opt(ControllerKind),
66
75
  created_at: IDL.Nat64,
67
76
  scope: ControllerScope,
68
77
  expires_at: IDL.Opt(IDL.Nat64)
@@ -111,6 +120,7 @@ export const idlFactory = ({IDL}) => {
111
120
  });
112
121
  const SetController = IDL.Record({
113
122
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
123
+ kind: IDL.Opt(ControllerKind),
114
124
  scope: ControllerScope,
115
125
  expires_at: IDL.Opt(IDL.Nat64)
116
126
  });
@@ -129,15 +139,15 @@ export const idlFactory = ({IDL}) => {
129
139
  del_controllers: IDL.Func([DeleteControllersArgs], [], []),
130
140
  get_notify_status: IDL.Func([GetNotifications], [NotifyStatus], ['query']),
131
141
  get_openid_certificate: IDL.Func([GetOpenIdCertificateArgs], [IDL.Opt(OpenIdCertificate)], []),
132
- is_openid_monitoring_enabled: IDL.Func([], [IDL.Bool], []),
142
+ is_openid_monitoring_enabled: IDL.Func([OpenIdProvider], [IDL.Bool], []),
133
143
  list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
134
144
  notify: IDL.Func([NotifyArgs], [], []),
135
145
  ping: IDL.Func([NotifyArgs], [], []),
136
146
  set_controllers: IDL.Func([SetControllersArgs], [], []),
137
147
  set_env: IDL.Func([Env], [], []),
138
148
  set_rate_config: IDL.Func([RateKind, RateConfig], [], []),
139
- start_openid_monitoring: IDL.Func([], [], []),
140
- stop_openid_monitoring: IDL.Func([], [], [])
149
+ start_openid_monitoring: IDL.Func([OpenIdProvider], [], []),
150
+ stop_openid_monitoring: IDL.Func([OpenIdProvider], [], [])
141
151
  });
142
152
  };
143
153
 
@@ -20,7 +20,11 @@ export const idlFactory = ({IDL}) => {
20
20
  sent: IDL.Nat64,
21
21
  failed: IDL.Nat64
22
22
  });
23
- const OpenIdProvider = IDL.Variant({Google: IDL.Null});
23
+ const OpenIdProvider = IDL.Variant({
24
+ GitHubActions: IDL.Null,
25
+ Google: IDL.Null,
26
+ GitHubAuth: IDL.Null
27
+ });
24
28
  const GetOpenIdCertificateArgs = IDL.Record({provider: OpenIdProvider});
25
29
  const JwkType = IDL.Variant({
26
30
  EC: IDL.Null,
@@ -55,6 +59,10 @@ export const idlFactory = ({IDL}) => {
55
59
  created_at: IDL.Nat64,
56
60
  version: IDL.Opt(IDL.Nat64)
57
61
  });
62
+ const ControllerKind = IDL.Variant({
63
+ Emulator: IDL.Null,
64
+ Automation: IDL.Null
65
+ });
58
66
  const ControllerScope = IDL.Variant({
59
67
  Write: IDL.Null,
60
68
  Admin: IDL.Null,
@@ -63,6 +71,7 @@ export const idlFactory = ({IDL}) => {
63
71
  const Controller = IDL.Record({
64
72
  updated_at: IDL.Nat64,
65
73
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
74
+ kind: IDL.Opt(ControllerKind),
66
75
  created_at: IDL.Nat64,
67
76
  scope: ControllerScope,
68
77
  expires_at: IDL.Opt(IDL.Nat64)
@@ -111,6 +120,7 @@ export const idlFactory = ({IDL}) => {
111
120
  });
112
121
  const SetController = IDL.Record({
113
122
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
123
+ kind: IDL.Opt(ControllerKind),
114
124
  scope: ControllerScope,
115
125
  expires_at: IDL.Opt(IDL.Nat64)
116
126
  });
@@ -129,15 +139,15 @@ export const idlFactory = ({IDL}) => {
129
139
  del_controllers: IDL.Func([DeleteControllersArgs], [], []),
130
140
  get_notify_status: IDL.Func([GetNotifications], [NotifyStatus], ['query']),
131
141
  get_openid_certificate: IDL.Func([GetOpenIdCertificateArgs], [IDL.Opt(OpenIdCertificate)], []),
132
- is_openid_monitoring_enabled: IDL.Func([], [IDL.Bool], []),
142
+ is_openid_monitoring_enabled: IDL.Func([OpenIdProvider], [IDL.Bool], []),
133
143
  list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
134
144
  notify: IDL.Func([NotifyArgs], [], []),
135
145
  ping: IDL.Func([NotifyArgs], [], []),
136
146
  set_controllers: IDL.Func([SetControllersArgs], [], []),
137
147
  set_env: IDL.Func([Env], [], []),
138
148
  set_rate_config: IDL.Func([RateKind, RateConfig], [], []),
139
- start_openid_monitoring: IDL.Func([], [], []),
140
- stop_openid_monitoring: IDL.Func([], [], [])
149
+ start_openid_monitoring: IDL.Func([OpenIdProvider], [], []),
150
+ stop_openid_monitoring: IDL.Func([OpenIdProvider], [], [])
141
151
  });
142
152
  };
143
153
 
@@ -78,10 +78,12 @@ export interface CalendarDate {
78
78
  export interface Controller {
79
79
  updated_at: bigint;
80
80
  metadata: Array<[string, string]>;
81
+ kind: [] | [ControllerKind];
81
82
  created_at: bigint;
82
83
  scope: ControllerScope;
83
84
  expires_at: [] | [bigint];
84
85
  }
86
+ export type ControllerKind = { Emulator: null } | { Automation: null };
85
87
  export type ControllerScope = { Write: null } | { Admin: null } | { Submit: null };
86
88
  export interface DelSatelliteConfig {
87
89
  version: [] | [bigint];
@@ -193,6 +195,7 @@ export type Result_2 = { Ok: PerformanceMetric } | { Err: string };
193
195
  export type Result_3 = { Ok: TrackEvent } | { Err: string };
194
196
  export interface SetController {
195
197
  metadata: Array<[string, string]>;
198
+ kind: [] | [ControllerKind];
196
199
  scope: ControllerScope;
197
200
  expires_at: [] | [bigint];
198
201
  }
@@ -13,6 +13,10 @@ export const idlFactory = ({IDL}) => {
13
13
  const DeleteControllersArgs = IDL.Record({
14
14
  controllers: IDL.Vec(IDL.Principal)
15
15
  });
16
+ const ControllerKind = IDL.Variant({
17
+ Emulator: IDL.Null,
18
+ Automation: IDL.Null
19
+ });
16
20
  const ControllerScope = IDL.Variant({
17
21
  Write: IDL.Null,
18
22
  Admin: IDL.Null,
@@ -21,6 +25,7 @@ export const idlFactory = ({IDL}) => {
21
25
  const Controller = IDL.Record({
22
26
  updated_at: IDL.Nat64,
23
27
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
28
+ kind: IDL.Opt(ControllerKind),
24
29
  created_at: IDL.Nat64,
25
30
  scope: ControllerScope,
26
31
  expires_at: IDL.Opt(IDL.Nat64)
@@ -202,6 +207,7 @@ export const idlFactory = ({IDL}) => {
202
207
  const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
203
208
  const SetController = IDL.Record({
204
209
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
210
+ kind: IDL.Opt(ControllerKind),
205
211
  scope: ControllerScope,
206
212
  expires_at: IDL.Opt(IDL.Nat64)
207
213
  });
@@ -13,6 +13,10 @@ export const idlFactory = ({IDL}) => {
13
13
  const DeleteControllersArgs = IDL.Record({
14
14
  controllers: IDL.Vec(IDL.Principal)
15
15
  });
16
+ const ControllerKind = IDL.Variant({
17
+ Emulator: IDL.Null,
18
+ Automation: IDL.Null
19
+ });
16
20
  const ControllerScope = IDL.Variant({
17
21
  Write: IDL.Null,
18
22
  Admin: IDL.Null,
@@ -21,6 +25,7 @@ export const idlFactory = ({IDL}) => {
21
25
  const Controller = IDL.Record({
22
26
  updated_at: IDL.Nat64,
23
27
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
28
+ kind: IDL.Opt(ControllerKind),
24
29
  created_at: IDL.Nat64,
25
30
  scope: ControllerScope,
26
31
  expires_at: IDL.Opt(IDL.Nat64)
@@ -202,6 +207,7 @@ export const idlFactory = ({IDL}) => {
202
207
  const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
203
208
  const SetController = IDL.Record({
204
209
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
210
+ kind: IDL.Opt(ControllerKind),
205
211
  scope: ControllerScope,
206
212
  expires_at: IDL.Opt(IDL.Nat64)
207
213
  });
@@ -13,6 +13,10 @@ export const idlFactory = ({IDL}) => {
13
13
  const DeleteControllersArgs = IDL.Record({
14
14
  controllers: IDL.Vec(IDL.Principal)
15
15
  });
16
+ const ControllerKind = IDL.Variant({
17
+ Emulator: IDL.Null,
18
+ Automation: IDL.Null
19
+ });
16
20
  const ControllerScope = IDL.Variant({
17
21
  Write: IDL.Null,
18
22
  Admin: IDL.Null,
@@ -21,6 +25,7 @@ export const idlFactory = ({IDL}) => {
21
25
  const Controller = IDL.Record({
22
26
  updated_at: IDL.Nat64,
23
27
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
28
+ kind: IDL.Opt(ControllerKind),
24
29
  created_at: IDL.Nat64,
25
30
  scope: ControllerScope,
26
31
  expires_at: IDL.Opt(IDL.Nat64)
@@ -202,6 +207,7 @@ export const idlFactory = ({IDL}) => {
202
207
  const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
203
208
  const SetController = IDL.Record({
204
209
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
210
+ kind: IDL.Opt(ControllerKind),
205
211
  scope: ControllerScope,
206
212
  expires_at: IDL.Opt(IDL.Nat64)
207
213
  });
@@ -34,12 +34,25 @@ export interface AssetNoContent {
34
34
  export interface AssetsUpgradeOptions {
35
35
  clear_existing_assets: [] | [boolean];
36
36
  }
37
+ export type AuthenticateAutomationArgs = {
38
+ OpenId: OpenIdPrepareAutomationArgs;
39
+ };
40
+ export type AuthenticateAutomationResultResponse =
41
+ | { Ok: null }
42
+ | { Err: AuthenticationAutomationError };
37
43
  export type AuthenticateResultResponse = { Ok: Authentication } | { Err: AuthenticationError };
38
44
  export interface Authentication {
39
45
  doc: Doc;
40
46
  delegation: PreparedDelegation;
41
47
  }
42
48
  export type AuthenticationArgs = { OpenId: OpenIdPrepareDelegationArgs };
49
+ export type AuthenticationAutomationError =
50
+ | {
51
+ PrepareAutomation: PrepareAutomationError;
52
+ }
53
+ | { RegisterController: string }
54
+ | { SaveWorkflowMetadata: string }
55
+ | { SaveUniqueJtiToken: string };
43
56
  export interface AuthenticationConfig {
44
57
  updated_at: [] | [bigint];
45
58
  openid: [] | [AuthenticationConfigOpenId];
@@ -54,7 +67,7 @@ export interface AuthenticationConfigInternetIdentity {
54
67
  }
55
68
  export interface AuthenticationConfigOpenId {
56
69
  observatory_id: [] | [Principal];
57
- providers: Array<[OpenIdProvider, OpenIdProviderConfig]>;
70
+ providers: Array<[OpenIdDelegationProvider, OpenIdAuthProviderConfig]>;
58
71
  }
59
72
  export type AuthenticationError =
60
73
  | {
@@ -64,6 +77,17 @@ export type AuthenticationError =
64
77
  export interface AuthenticationRules {
65
78
  allowed_callers: Array<Principal>;
66
79
  }
80
+ export interface AutomationConfig {
81
+ updated_at: [] | [bigint];
82
+ openid: [] | [AutomationConfigOpenId];
83
+ created_at: [] | [bigint];
84
+ version: [] | [bigint];
85
+ }
86
+ export interface AutomationConfigOpenId {
87
+ observatory_id: [] | [Principal];
88
+ providers: Array<[OpenIdAutomationProvider, OpenIdAutomationProviderConfig]>;
89
+ }
90
+ export type AutomationScope = { Write: null } | { Submit: null };
67
91
  export type CollectionType = { Db: null } | { Storage: null };
68
92
  export interface CommitBatch {
69
93
  batch_id: bigint;
@@ -86,10 +110,12 @@ export interface ConfigMaxMemorySize {
86
110
  export interface Controller {
87
111
  updated_at: bigint;
88
112
  metadata: Array<[string, string]>;
113
+ kind: [] | [ControllerKind];
89
114
  created_at: bigint;
90
115
  scope: ControllerScope;
91
116
  expires_at: [] | [bigint];
92
117
  }
118
+ export type ControllerKind = { Emulator: null } | { Automation: null };
93
119
  export type ControllerScope = { Write: null } | { Admin: null } | { Submit: null };
94
120
  export interface CustomDomain {
95
121
  updated_at: bigint;
@@ -259,31 +285,57 @@ export interface MemorySize {
259
285
  stable: bigint;
260
286
  heap: bigint;
261
287
  }
288
+ export interface OpenIdAuthProviderConfig {
289
+ delegation: [] | [OpenIdAuthProviderDelegationConfig];
290
+ client_id: string;
291
+ }
292
+ export interface OpenIdAuthProviderDelegationConfig {
293
+ targets: [] | [Array<Principal>];
294
+ max_time_to_live: [] | [bigint];
295
+ }
296
+ export type OpenIdAutomationProvider = { GitHub: null };
297
+ export interface OpenIdAutomationProviderConfig {
298
+ controller: [] | [OpenIdAutomationProviderControllerConfig];
299
+ repositories: Array<[RepositoryKey, OpenIdAutomationRepositoryConfig]>;
300
+ }
301
+ export interface OpenIdAutomationProviderControllerConfig {
302
+ scope: [] | [AutomationScope];
303
+ max_time_to_live: [] | [bigint];
304
+ }
305
+ export interface OpenIdAutomationRepositoryConfig {
306
+ branches: [] | [Array<string>];
307
+ }
308
+ export type OpenIdDelegationProvider = { GitHub: null } | { Google: null };
262
309
  export interface OpenIdGetDelegationArgs {
263
310
  jwt: string;
264
311
  session_key: Uint8Array;
265
312
  salt: Uint8Array;
266
313
  expiration: bigint;
267
314
  }
315
+ export interface OpenIdPrepareAutomationArgs {
316
+ jwt: string;
317
+ salt: Uint8Array;
318
+ }
268
319
  export interface OpenIdPrepareDelegationArgs {
269
320
  jwt: string;
270
321
  session_key: Uint8Array;
271
322
  salt: Uint8Array;
272
323
  }
273
- export type OpenIdProvider = { Google: null };
274
- export interface OpenIdProviderConfig {
275
- delegation: [] | [OpenIdProviderDelegationConfig];
276
- client_id: string;
277
- }
278
- export interface OpenIdProviderDelegationConfig {
279
- targets: [] | [Array<Principal>];
280
- max_time_to_live: [] | [bigint];
281
- }
282
324
  export type Permission =
283
325
  | { Controllers: null }
284
326
  | { Private: null }
285
327
  | { Public: null }
286
328
  | { Managed: null };
329
+ export type PrepareAutomationError =
330
+ | {
331
+ JwtFindProvider: JwtFindProviderError;
332
+ }
333
+ | { InvalidController: string }
334
+ | { GetCachedJwks: null }
335
+ | { JwtVerify: JwtVerifyError }
336
+ | { GetOrFetchJwks: GetOrRefreshJwksError }
337
+ | { ControllerAlreadyExists: null }
338
+ | { TooManyControllers: string };
287
339
  export type PrepareDelegationError =
288
340
  | {
289
341
  JwtFindProvider: JwtFindProviderError;
@@ -323,6 +375,10 @@ export interface RateConfig {
323
375
  max_tokens: bigint;
324
376
  time_per_token_ns: bigint;
325
377
  }
378
+ export interface RepositoryKey {
379
+ owner: string;
380
+ name: string;
381
+ }
326
382
  export interface Rule {
327
383
  max_capacity: [] | [number];
328
384
  memory: [] | [Memory];
@@ -347,8 +403,13 @@ export interface SetAuthenticationConfig {
347
403
  internet_identity: [] | [AuthenticationConfigInternetIdentity];
348
404
  rules: [] | [AuthenticationRules];
349
405
  }
406
+ export interface SetAutomationConfig {
407
+ openid: [] | [AutomationConfigOpenId];
408
+ version: [] | [bigint];
409
+ }
350
410
  export interface SetController {
351
411
  metadata: Array<[string, string]>;
412
+ kind: [] | [ControllerKind];
352
413
  scope: ControllerScope;
353
414
  expires_at: [] | [bigint];
354
415
  }
@@ -440,6 +501,10 @@ export interface UploadChunkResult {
440
501
  }
441
502
  export interface _SERVICE {
442
503
  authenticate: ActorMethod<[AuthenticationArgs], AuthenticateResultResponse>;
504
+ authenticate_automation: ActorMethod<
505
+ [AuthenticateAutomationArgs],
506
+ AuthenticateAutomationResultResponse
507
+ >;
443
508
  commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
444
509
  commit_proposal: ActorMethod<[CommitProposal], null>;
445
510
  commit_proposal_asset_upload: ActorMethod<[CommitBatch], undefined>;
@@ -464,6 +529,7 @@ export interface _SERVICE {
464
529
  deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
465
530
  get_asset: ActorMethod<[string, string], [] | [AssetNoContent]>;
466
531
  get_auth_config: ActorMethod<[], [] | [AuthenticationConfig]>;
532
+ get_automation_config: ActorMethod<[], [] | [AutomationConfig]>;
467
533
  get_config: ActorMethod<[], Config>;
468
534
  get_db_config: ActorMethod<[], [] | [DbConfig]>;
469
535
  get_delegation: ActorMethod<[GetDelegationArgs], GetDelegationResultResponse>;
@@ -495,6 +561,7 @@ export interface _SERVICE {
495
561
  reject_proposal: ActorMethod<[CommitProposal], null>;
496
562
  set_asset_token: ActorMethod<[string, string, [] | [string]], undefined>;
497
563
  set_auth_config: ActorMethod<[SetAuthenticationConfig], AuthenticationConfig>;
564
+ set_automation_config: ActorMethod<[SetAutomationConfig], AutomationConfig>;
498
565
  set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
499
566
  set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
500
567
  set_db_config: ActorMethod<[SetDbConfig], DbConfig>;
@@ -75,6 +75,32 @@ export const idlFactory = ({IDL}) => {
75
75
  Ok: Authentication,
76
76
  Err: AuthenticationError
77
77
  });
78
+ const OpenIdPrepareAutomationArgs = IDL.Record({
79
+ jwt: IDL.Text,
80
+ salt: IDL.Vec(IDL.Nat8)
81
+ });
82
+ const AuthenticateAutomationArgs = IDL.Variant({
83
+ OpenId: OpenIdPrepareAutomationArgs
84
+ });
85
+ const PrepareAutomationError = IDL.Variant({
86
+ JwtFindProvider: JwtFindProviderError,
87
+ InvalidController: IDL.Text,
88
+ GetCachedJwks: IDL.Null,
89
+ JwtVerify: JwtVerifyError,
90
+ GetOrFetchJwks: GetOrRefreshJwksError,
91
+ ControllerAlreadyExists: IDL.Null,
92
+ TooManyControllers: IDL.Text
93
+ });
94
+ const AuthenticationAutomationError = IDL.Variant({
95
+ PrepareAutomation: PrepareAutomationError,
96
+ RegisterController: IDL.Text,
97
+ SaveWorkflowMetadata: IDL.Text,
98
+ SaveUniqueJtiToken: IDL.Text
99
+ });
100
+ const AuthenticateAutomationResultResponse = IDL.Variant({
101
+ Ok: IDL.Null,
102
+ Err: AuthenticationAutomationError
103
+ });
78
104
  const CommitBatch = IDL.Record({
79
105
  batch_id: IDL.Nat,
80
106
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
@@ -115,6 +141,10 @@ export const idlFactory = ({IDL}) => {
115
141
  const DeleteControllersArgs = IDL.Record({
116
142
  controllers: IDL.Vec(IDL.Principal)
117
143
  });
144
+ const ControllerKind = IDL.Variant({
145
+ Emulator: IDL.Null,
146
+ Automation: IDL.Null
147
+ });
118
148
  const ControllerScope = IDL.Variant({
119
149
  Write: IDL.Null,
120
150
  Admin: IDL.Null,
@@ -123,6 +153,7 @@ export const idlFactory = ({IDL}) => {
123
153
  const Controller = IDL.Record({
124
154
  updated_at: IDL.Nat64,
125
155
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
156
+ kind: IDL.Opt(ControllerKind),
126
157
  created_at: IDL.Nat64,
127
158
  scope: ControllerScope,
128
159
  expires_at: IDL.Opt(IDL.Nat64)
@@ -158,18 +189,21 @@ export const idlFactory = ({IDL}) => {
158
189
  created_at: IDL.Nat64,
159
190
  version: IDL.Opt(IDL.Nat64)
160
191
  });
161
- const OpenIdProvider = IDL.Variant({Google: IDL.Null});
162
- const OpenIdProviderDelegationConfig = IDL.Record({
192
+ const OpenIdDelegationProvider = IDL.Variant({
193
+ GitHub: IDL.Null,
194
+ Google: IDL.Null
195
+ });
196
+ const OpenIdAuthProviderDelegationConfig = IDL.Record({
163
197
  targets: IDL.Opt(IDL.Vec(IDL.Principal)),
164
198
  max_time_to_live: IDL.Opt(IDL.Nat64)
165
199
  });
166
- const OpenIdProviderConfig = IDL.Record({
167
- delegation: IDL.Opt(OpenIdProviderDelegationConfig),
200
+ const OpenIdAuthProviderConfig = IDL.Record({
201
+ delegation: IDL.Opt(OpenIdAuthProviderDelegationConfig),
168
202
  client_id: IDL.Text
169
203
  });
170
204
  const AuthenticationConfigOpenId = IDL.Record({
171
205
  observatory_id: IDL.Opt(IDL.Principal),
172
- providers: IDL.Vec(IDL.Tuple(OpenIdProvider, OpenIdProviderConfig))
206
+ providers: IDL.Vec(IDL.Tuple(OpenIdDelegationProvider, OpenIdAuthProviderConfig))
173
207
  });
174
208
  const AuthenticationConfigInternetIdentity = IDL.Record({
175
209
  derivation_origin: IDL.Opt(IDL.Text),
@@ -186,6 +220,33 @@ export const idlFactory = ({IDL}) => {
186
220
  internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity),
187
221
  rules: IDL.Opt(AuthenticationRules)
188
222
  });
223
+ const OpenIdAutomationProvider = IDL.Variant({GitHub: IDL.Null});
224
+ const AutomationScope = IDL.Variant({
225
+ Write: IDL.Null,
226
+ Submit: IDL.Null
227
+ });
228
+ const OpenIdAutomationProviderControllerConfig = IDL.Record({
229
+ scope: IDL.Opt(AutomationScope),
230
+ max_time_to_live: IDL.Opt(IDL.Nat64)
231
+ });
232
+ const RepositoryKey = IDL.Record({owner: IDL.Text, name: IDL.Text});
233
+ const OpenIdAutomationRepositoryConfig = IDL.Record({
234
+ branches: IDL.Opt(IDL.Vec(IDL.Text))
235
+ });
236
+ const OpenIdAutomationProviderConfig = IDL.Record({
237
+ controller: IDL.Opt(OpenIdAutomationProviderControllerConfig),
238
+ repositories: IDL.Vec(IDL.Tuple(RepositoryKey, OpenIdAutomationRepositoryConfig))
239
+ });
240
+ const AutomationConfigOpenId = IDL.Record({
241
+ observatory_id: IDL.Opt(IDL.Principal),
242
+ providers: IDL.Vec(IDL.Tuple(OpenIdAutomationProvider, OpenIdAutomationProviderConfig))
243
+ });
244
+ const AutomationConfig = IDL.Record({
245
+ updated_at: IDL.Opt(IDL.Nat64),
246
+ openid: IDL.Opt(AutomationConfigOpenId),
247
+ created_at: IDL.Opt(IDL.Nat64),
248
+ version: IDL.Opt(IDL.Nat64)
249
+ });
189
250
  const ConfigMaxMemorySize = IDL.Record({
190
251
  stable: IDL.Opt(IDL.Nat64),
191
252
  heap: IDL.Opt(IDL.Nat64)
@@ -396,8 +457,13 @@ export const idlFactory = ({IDL}) => {
396
457
  internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity),
397
458
  rules: IDL.Opt(AuthenticationRules)
398
459
  });
460
+ const SetAutomationConfig = IDL.Record({
461
+ openid: IDL.Opt(AutomationConfigOpenId),
462
+ version: IDL.Opt(IDL.Nat64)
463
+ });
399
464
  const SetController = IDL.Record({
400
465
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
466
+ kind: IDL.Opt(ControllerKind),
401
467
  scope: ControllerScope,
402
468
  expires_at: IDL.Opt(IDL.Nat64)
403
469
  });
@@ -443,6 +509,11 @@ export const idlFactory = ({IDL}) => {
443
509
 
444
510
  return IDL.Service({
445
511
  authenticate: IDL.Func([AuthenticationArgs], [AuthenticateResultResponse], []),
512
+ authenticate_automation: IDL.Func(
513
+ [AuthenticateAutomationArgs],
514
+ [AuthenticateAutomationResultResponse],
515
+ []
516
+ ),
446
517
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
447
518
  commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
448
519
  commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
@@ -471,6 +542,7 @@ export const idlFactory = ({IDL}) => {
471
542
  deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
472
543
  get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], []),
473
544
  get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], []),
545
+ get_automation_config: IDL.Func([], [IDL.Opt(AutomationConfig)], []),
474
546
  get_config: IDL.Func([], [Config], []),
475
547
  get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], []),
476
548
  get_delegation: IDL.Func([GetDelegationArgs], [GetDelegationResultResponse], []),
@@ -512,6 +584,7 @@ export const idlFactory = ({IDL}) => {
512
584
  reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
513
585
  set_asset_token: IDL.Func([IDL.Text, IDL.Text, IDL.Opt(IDL.Text)], [], []),
514
586
  set_auth_config: IDL.Func([SetAuthenticationConfig], [AuthenticationConfig], []),
587
+ set_automation_config: IDL.Func([SetAutomationConfig], [AutomationConfig], []),
515
588
  set_controllers: IDL.Func(
516
589
  [SetControllersArgs],
517
590
  [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],