@junobuild/ic-client 7.2.0 → 8.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 (33) 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 +21 -13
  6. package/declarations/console/console.factory.certified.did.js +23 -9
  7. package/declarations/console/console.factory.did.js +23 -9
  8. package/declarations/console/console.factory.did.mjs +23 -9
  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 +90 -12
  27. package/declarations/satellite/satellite.factory.certified.did.js +90 -8
  28. package/declarations/satellite/satellite.factory.did.js +90 -8
  29. package/declarations/satellite/satellite.factory.did.mjs +90 -8
  30. package/declarations/sputnik/sputnik.did.d.ts +90 -12
  31. package/declarations/sputnik/sputnik.factory.certified.did.js +90 -8
  32. package/declarations/sputnik/sputnik.factory.did.js +90 -8
  33. package/package.json +1 -1
@@ -65,7 +65,8 @@ export const idlFactory = ({IDL}) => {
65
65
  GetCachedJwks: IDL.Null,
66
66
  JwtVerify: JwtVerifyError,
67
67
  GetOrFetchJwks: GetOrRefreshJwksError,
68
- DeriveSeedFailed: IDL.Text
68
+ DeriveSeedFailed: IDL.Text,
69
+ InvalidObservatoryId: IDL.Text
69
70
  });
70
71
  const AuthenticationError = IDL.Variant({
71
72
  PrepareDelegation: PrepareDelegationError,
@@ -75,6 +76,41 @@ export const idlFactory = ({IDL}) => {
75
76
  Ok: Authentication,
76
77
  Err: AuthenticationError
77
78
  });
79
+ const OpenIdPrepareAutomationArgs = IDL.Record({
80
+ jwt: IDL.Text,
81
+ salt: IDL.Vec(IDL.Nat8)
82
+ });
83
+ const AuthenticateAutomationArgs = IDL.Variant({
84
+ OpenId: OpenIdPrepareAutomationArgs
85
+ });
86
+ const AutomationScope = IDL.Variant({
87
+ Write: IDL.Null,
88
+ Submit: IDL.Null
89
+ });
90
+ const AutomationController = IDL.Record({
91
+ scope: AutomationScope,
92
+ expires_at: IDL.Nat64
93
+ });
94
+ const PrepareAutomationError = IDL.Variant({
95
+ JwtFindProvider: JwtFindProviderError,
96
+ InvalidController: IDL.Text,
97
+ GetCachedJwks: IDL.Null,
98
+ JwtVerify: JwtVerifyError,
99
+ GetOrFetchJwks: GetOrRefreshJwksError,
100
+ ControllerAlreadyExists: IDL.Null,
101
+ InvalidObservatoryId: IDL.Text,
102
+ TooManyControllers: IDL.Text
103
+ });
104
+ const AuthenticationAutomationError = IDL.Variant({
105
+ PrepareAutomation: PrepareAutomationError,
106
+ RegisterController: IDL.Text,
107
+ SaveWorkflowMetadata: IDL.Text,
108
+ SaveUniqueJtiToken: IDL.Text
109
+ });
110
+ const AuthenticateAutomationResultResponse = IDL.Variant({
111
+ Ok: IDL.Tuple(IDL.Principal, AutomationController),
112
+ Err: AuthenticationAutomationError
113
+ });
78
114
  const CommitBatch = IDL.Record({
79
115
  batch_id: IDL.Nat,
80
116
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
@@ -115,6 +151,10 @@ export const idlFactory = ({IDL}) => {
115
151
  const DeleteControllersArgs = IDL.Record({
116
152
  controllers: IDL.Vec(IDL.Principal)
117
153
  });
154
+ const ControllerKind = IDL.Variant({
155
+ Emulator: IDL.Null,
156
+ Automation: IDL.Null
157
+ });
118
158
  const ControllerScope = IDL.Variant({
119
159
  Write: IDL.Null,
120
160
  Admin: IDL.Null,
@@ -123,6 +163,7 @@ export const idlFactory = ({IDL}) => {
123
163
  const Controller = IDL.Record({
124
164
  updated_at: IDL.Nat64,
125
165
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
166
+ kind: IDL.Opt(ControllerKind),
126
167
  created_at: IDL.Nat64,
127
168
  scope: ControllerScope,
128
169
  expires_at: IDL.Opt(IDL.Nat64)
@@ -158,18 +199,21 @@ export const idlFactory = ({IDL}) => {
158
199
  created_at: IDL.Nat64,
159
200
  version: IDL.Opt(IDL.Nat64)
160
201
  });
161
- const OpenIdProvider = IDL.Variant({Google: IDL.Null});
162
- const OpenIdProviderDelegationConfig = IDL.Record({
202
+ const OpenIdDelegationProvider = IDL.Variant({
203
+ GitHub: IDL.Null,
204
+ Google: IDL.Null
205
+ });
206
+ const OpenIdAuthProviderDelegationConfig = IDL.Record({
163
207
  targets: IDL.Opt(IDL.Vec(IDL.Principal)),
164
208
  max_time_to_live: IDL.Opt(IDL.Nat64)
165
209
  });
166
- const OpenIdProviderConfig = IDL.Record({
167
- delegation: IDL.Opt(OpenIdProviderDelegationConfig),
210
+ const OpenIdAuthProviderConfig = IDL.Record({
211
+ delegation: IDL.Opt(OpenIdAuthProviderDelegationConfig),
168
212
  client_id: IDL.Text
169
213
  });
170
214
  const AuthenticationConfigOpenId = IDL.Record({
171
215
  observatory_id: IDL.Opt(IDL.Principal),
172
- providers: IDL.Vec(IDL.Tuple(OpenIdProvider, OpenIdProviderConfig))
216
+ providers: IDL.Vec(IDL.Tuple(OpenIdDelegationProvider, OpenIdAuthProviderConfig))
173
217
  });
174
218
  const AuthenticationConfigInternetIdentity = IDL.Record({
175
219
  derivation_origin: IDL.Opt(IDL.Text),
@@ -186,6 +230,29 @@ export const idlFactory = ({IDL}) => {
186
230
  internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity),
187
231
  rules: IDL.Opt(AuthenticationRules)
188
232
  });
233
+ const OpenIdAutomationProvider = IDL.Variant({GitHub: IDL.Null});
234
+ const OpenIdAutomationProviderControllerConfig = IDL.Record({
235
+ scope: IDL.Opt(AutomationScope),
236
+ max_time_to_live: IDL.Opt(IDL.Nat64)
237
+ });
238
+ const RepositoryKey = IDL.Record({owner: IDL.Text, name: IDL.Text});
239
+ const OpenIdAutomationRepositoryConfig = IDL.Record({
240
+ refs: IDL.Opt(IDL.Vec(IDL.Text))
241
+ });
242
+ const OpenIdAutomationProviderConfig = IDL.Record({
243
+ controller: IDL.Opt(OpenIdAutomationProviderControllerConfig),
244
+ repositories: IDL.Vec(IDL.Tuple(RepositoryKey, OpenIdAutomationRepositoryConfig))
245
+ });
246
+ const AutomationConfigOpenId = IDL.Record({
247
+ observatory_id: IDL.Opt(IDL.Principal),
248
+ providers: IDL.Vec(IDL.Tuple(OpenIdAutomationProvider, OpenIdAutomationProviderConfig))
249
+ });
250
+ const AutomationConfig = IDL.Record({
251
+ updated_at: IDL.Opt(IDL.Nat64),
252
+ openid: IDL.Opt(AutomationConfigOpenId),
253
+ created_at: IDL.Opt(IDL.Nat64),
254
+ version: IDL.Opt(IDL.Nat64)
255
+ });
189
256
  const ConfigMaxMemorySize = IDL.Record({
190
257
  stable: IDL.Opt(IDL.Nat64),
191
258
  heap: IDL.Opt(IDL.Nat64)
@@ -223,7 +290,8 @@ export const idlFactory = ({IDL}) => {
223
290
  const Config = IDL.Record({
224
291
  db: IDL.Opt(DbConfig),
225
292
  authentication: IDL.Opt(AuthenticationConfig),
226
- storage: StorageConfig
293
+ storage: StorageConfig,
294
+ automation: IDL.Opt(AutomationConfig)
227
295
  });
228
296
  const OpenIdGetDelegationArgs = IDL.Record({
229
297
  jwt: IDL.Text,
@@ -247,7 +315,8 @@ export const idlFactory = ({IDL}) => {
247
315
  NoSuchDelegation: IDL.Null,
248
316
  JwtVerify: JwtVerifyError,
249
317
  GetOrFetchJwks: GetOrRefreshJwksError,
250
- DeriveSeedFailed: IDL.Text
318
+ DeriveSeedFailed: IDL.Text,
319
+ InvalidObservatoryId: IDL.Text
251
320
  });
252
321
  const GetDelegationResultResponse = IDL.Variant({
253
322
  Ok: SignedDelegation,
@@ -396,8 +465,13 @@ export const idlFactory = ({IDL}) => {
396
465
  internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity),
397
466
  rules: IDL.Opt(AuthenticationRules)
398
467
  });
468
+ const SetAutomationConfig = IDL.Record({
469
+ openid: IDL.Opt(AutomationConfigOpenId),
470
+ version: IDL.Opt(IDL.Nat64)
471
+ });
399
472
  const SetController = IDL.Record({
400
473
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
474
+ kind: IDL.Opt(ControllerKind),
401
475
  scope: ControllerScope,
402
476
  expires_at: IDL.Opt(IDL.Nat64)
403
477
  });
@@ -443,6 +517,11 @@ export const idlFactory = ({IDL}) => {
443
517
 
444
518
  return IDL.Service({
445
519
  authenticate: IDL.Func([AuthenticationArgs], [AuthenticateResultResponse], []),
520
+ authenticate_automation: IDL.Func(
521
+ [AuthenticateAutomationArgs],
522
+ [AuthenticateAutomationResultResponse],
523
+ []
524
+ ),
446
525
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
447
526
  commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
448
527
  commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
@@ -454,6 +533,7 @@ export const idlFactory = ({IDL}) => {
454
533
  count_proposals: IDL.Func([], [IDL.Nat64], ['query']),
455
534
  del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
456
535
  del_assets: IDL.Func([IDL.Text], [], []),
536
+ del_controller_self: IDL.Func([], [], []),
457
537
  del_controllers: IDL.Func(
458
538
  [DeleteControllersArgs],
459
539
  [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
@@ -471,6 +551,7 @@ export const idlFactory = ({IDL}) => {
471
551
  deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
472
552
  get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], ['query']),
473
553
  get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']),
554
+ get_automation_config: IDL.Func([], [IDL.Opt(AutomationConfig)], ['query']),
474
555
  get_config: IDL.Func([], [Config], []),
475
556
  get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], ['query']),
476
557
  get_delegation: IDL.Func([GetDelegationArgs], [GetDelegationResultResponse], ['query']),
@@ -512,6 +593,7 @@ export const idlFactory = ({IDL}) => {
512
593
  reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
513
594
  set_asset_token: IDL.Func([IDL.Text, IDL.Text, IDL.Opt(IDL.Text)], [], []),
514
595
  set_auth_config: IDL.Func([SetAuthenticationConfig], [AuthenticationConfig], []),
596
+ set_automation_config: IDL.Func([SetAutomationConfig], [AutomationConfig], []),
515
597
  set_controllers: IDL.Func(
516
598
  [SetControllersArgs],
517
599
  [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
@@ -65,7 +65,8 @@ export const idlFactory = ({IDL}) => {
65
65
  GetCachedJwks: IDL.Null,
66
66
  JwtVerify: JwtVerifyError,
67
67
  GetOrFetchJwks: GetOrRefreshJwksError,
68
- DeriveSeedFailed: IDL.Text
68
+ DeriveSeedFailed: IDL.Text,
69
+ InvalidObservatoryId: IDL.Text
69
70
  });
70
71
  const AuthenticationError = IDL.Variant({
71
72
  PrepareDelegation: PrepareDelegationError,
@@ -75,6 +76,41 @@ export const idlFactory = ({IDL}) => {
75
76
  Ok: Authentication,
76
77
  Err: AuthenticationError
77
78
  });
79
+ const OpenIdPrepareAutomationArgs = IDL.Record({
80
+ jwt: IDL.Text,
81
+ salt: IDL.Vec(IDL.Nat8)
82
+ });
83
+ const AuthenticateAutomationArgs = IDL.Variant({
84
+ OpenId: OpenIdPrepareAutomationArgs
85
+ });
86
+ const AutomationScope = IDL.Variant({
87
+ Write: IDL.Null,
88
+ Submit: IDL.Null
89
+ });
90
+ const AutomationController = IDL.Record({
91
+ scope: AutomationScope,
92
+ expires_at: IDL.Nat64
93
+ });
94
+ const PrepareAutomationError = IDL.Variant({
95
+ JwtFindProvider: JwtFindProviderError,
96
+ InvalidController: IDL.Text,
97
+ GetCachedJwks: IDL.Null,
98
+ JwtVerify: JwtVerifyError,
99
+ GetOrFetchJwks: GetOrRefreshJwksError,
100
+ ControllerAlreadyExists: IDL.Null,
101
+ InvalidObservatoryId: IDL.Text,
102
+ TooManyControllers: IDL.Text
103
+ });
104
+ const AuthenticationAutomationError = IDL.Variant({
105
+ PrepareAutomation: PrepareAutomationError,
106
+ RegisterController: IDL.Text,
107
+ SaveWorkflowMetadata: IDL.Text,
108
+ SaveUniqueJtiToken: IDL.Text
109
+ });
110
+ const AuthenticateAutomationResultResponse = IDL.Variant({
111
+ Ok: IDL.Tuple(IDL.Principal, AutomationController),
112
+ Err: AuthenticationAutomationError
113
+ });
78
114
  const CommitBatch = IDL.Record({
79
115
  batch_id: IDL.Nat,
80
116
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
@@ -115,6 +151,10 @@ export const idlFactory = ({IDL}) => {
115
151
  const DeleteControllersArgs = IDL.Record({
116
152
  controllers: IDL.Vec(IDL.Principal)
117
153
  });
154
+ const ControllerKind = IDL.Variant({
155
+ Emulator: IDL.Null,
156
+ Automation: IDL.Null
157
+ });
118
158
  const ControllerScope = IDL.Variant({
119
159
  Write: IDL.Null,
120
160
  Admin: IDL.Null,
@@ -123,6 +163,7 @@ export const idlFactory = ({IDL}) => {
123
163
  const Controller = IDL.Record({
124
164
  updated_at: IDL.Nat64,
125
165
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
166
+ kind: IDL.Opt(ControllerKind),
126
167
  created_at: IDL.Nat64,
127
168
  scope: ControllerScope,
128
169
  expires_at: IDL.Opt(IDL.Nat64)
@@ -158,18 +199,21 @@ export const idlFactory = ({IDL}) => {
158
199
  created_at: IDL.Nat64,
159
200
  version: IDL.Opt(IDL.Nat64)
160
201
  });
161
- const OpenIdProvider = IDL.Variant({Google: IDL.Null});
162
- const OpenIdProviderDelegationConfig = IDL.Record({
202
+ const OpenIdDelegationProvider = IDL.Variant({
203
+ GitHub: IDL.Null,
204
+ Google: IDL.Null
205
+ });
206
+ const OpenIdAuthProviderDelegationConfig = IDL.Record({
163
207
  targets: IDL.Opt(IDL.Vec(IDL.Principal)),
164
208
  max_time_to_live: IDL.Opt(IDL.Nat64)
165
209
  });
166
- const OpenIdProviderConfig = IDL.Record({
167
- delegation: IDL.Opt(OpenIdProviderDelegationConfig),
210
+ const OpenIdAuthProviderConfig = IDL.Record({
211
+ delegation: IDL.Opt(OpenIdAuthProviderDelegationConfig),
168
212
  client_id: IDL.Text
169
213
  });
170
214
  const AuthenticationConfigOpenId = IDL.Record({
171
215
  observatory_id: IDL.Opt(IDL.Principal),
172
- providers: IDL.Vec(IDL.Tuple(OpenIdProvider, OpenIdProviderConfig))
216
+ providers: IDL.Vec(IDL.Tuple(OpenIdDelegationProvider, OpenIdAuthProviderConfig))
173
217
  });
174
218
  const AuthenticationConfigInternetIdentity = IDL.Record({
175
219
  derivation_origin: IDL.Opt(IDL.Text),
@@ -186,6 +230,29 @@ export const idlFactory = ({IDL}) => {
186
230
  internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity),
187
231
  rules: IDL.Opt(AuthenticationRules)
188
232
  });
233
+ const OpenIdAutomationProvider = IDL.Variant({GitHub: IDL.Null});
234
+ const OpenIdAutomationProviderControllerConfig = IDL.Record({
235
+ scope: IDL.Opt(AutomationScope),
236
+ max_time_to_live: IDL.Opt(IDL.Nat64)
237
+ });
238
+ const RepositoryKey = IDL.Record({owner: IDL.Text, name: IDL.Text});
239
+ const OpenIdAutomationRepositoryConfig = IDL.Record({
240
+ refs: IDL.Opt(IDL.Vec(IDL.Text))
241
+ });
242
+ const OpenIdAutomationProviderConfig = IDL.Record({
243
+ controller: IDL.Opt(OpenIdAutomationProviderControllerConfig),
244
+ repositories: IDL.Vec(IDL.Tuple(RepositoryKey, OpenIdAutomationRepositoryConfig))
245
+ });
246
+ const AutomationConfigOpenId = IDL.Record({
247
+ observatory_id: IDL.Opt(IDL.Principal),
248
+ providers: IDL.Vec(IDL.Tuple(OpenIdAutomationProvider, OpenIdAutomationProviderConfig))
249
+ });
250
+ const AutomationConfig = IDL.Record({
251
+ updated_at: IDL.Opt(IDL.Nat64),
252
+ openid: IDL.Opt(AutomationConfigOpenId),
253
+ created_at: IDL.Opt(IDL.Nat64),
254
+ version: IDL.Opt(IDL.Nat64)
255
+ });
189
256
  const ConfigMaxMemorySize = IDL.Record({
190
257
  stable: IDL.Opt(IDL.Nat64),
191
258
  heap: IDL.Opt(IDL.Nat64)
@@ -223,7 +290,8 @@ export const idlFactory = ({IDL}) => {
223
290
  const Config = IDL.Record({
224
291
  db: IDL.Opt(DbConfig),
225
292
  authentication: IDL.Opt(AuthenticationConfig),
226
- storage: StorageConfig
293
+ storage: StorageConfig,
294
+ automation: IDL.Opt(AutomationConfig)
227
295
  });
228
296
  const OpenIdGetDelegationArgs = IDL.Record({
229
297
  jwt: IDL.Text,
@@ -247,7 +315,8 @@ export const idlFactory = ({IDL}) => {
247
315
  NoSuchDelegation: IDL.Null,
248
316
  JwtVerify: JwtVerifyError,
249
317
  GetOrFetchJwks: GetOrRefreshJwksError,
250
- DeriveSeedFailed: IDL.Text
318
+ DeriveSeedFailed: IDL.Text,
319
+ InvalidObservatoryId: IDL.Text
251
320
  });
252
321
  const GetDelegationResultResponse = IDL.Variant({
253
322
  Ok: SignedDelegation,
@@ -396,8 +465,13 @@ export const idlFactory = ({IDL}) => {
396
465
  internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity),
397
466
  rules: IDL.Opt(AuthenticationRules)
398
467
  });
468
+ const SetAutomationConfig = IDL.Record({
469
+ openid: IDL.Opt(AutomationConfigOpenId),
470
+ version: IDL.Opt(IDL.Nat64)
471
+ });
399
472
  const SetController = IDL.Record({
400
473
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
474
+ kind: IDL.Opt(ControllerKind),
401
475
  scope: ControllerScope,
402
476
  expires_at: IDL.Opt(IDL.Nat64)
403
477
  });
@@ -443,6 +517,11 @@ export const idlFactory = ({IDL}) => {
443
517
 
444
518
  return IDL.Service({
445
519
  authenticate: IDL.Func([AuthenticationArgs], [AuthenticateResultResponse], []),
520
+ authenticate_automation: IDL.Func(
521
+ [AuthenticateAutomationArgs],
522
+ [AuthenticateAutomationResultResponse],
523
+ []
524
+ ),
446
525
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
447
526
  commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
448
527
  commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
@@ -454,6 +533,7 @@ export const idlFactory = ({IDL}) => {
454
533
  count_proposals: IDL.Func([], [IDL.Nat64], ['query']),
455
534
  del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
456
535
  del_assets: IDL.Func([IDL.Text], [], []),
536
+ del_controller_self: IDL.Func([], [], []),
457
537
  del_controllers: IDL.Func(
458
538
  [DeleteControllersArgs],
459
539
  [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
@@ -471,6 +551,7 @@ export const idlFactory = ({IDL}) => {
471
551
  deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
472
552
  get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], ['query']),
473
553
  get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']),
554
+ get_automation_config: IDL.Func([], [IDL.Opt(AutomationConfig)], ['query']),
474
555
  get_config: IDL.Func([], [Config], []),
475
556
  get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], ['query']),
476
557
  get_delegation: IDL.Func([GetDelegationArgs], [GetDelegationResultResponse], ['query']),
@@ -512,6 +593,7 @@ export const idlFactory = ({IDL}) => {
512
593
  reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
513
594
  set_asset_token: IDL.Func([IDL.Text, IDL.Text, IDL.Opt(IDL.Text)], [], []),
514
595
  set_auth_config: IDL.Func([SetAuthenticationConfig], [AuthenticationConfig], []),
596
+ set_automation_config: IDL.Func([SetAutomationConfig], [AutomationConfig], []),
515
597
  set_controllers: IDL.Func(
516
598
  [SetControllersArgs],
517
599
  [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
@@ -34,12 +34,27 @@ 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
+ | {
42
+ Ok: [Principal, AutomationController];
43
+ }
44
+ | { Err: AuthenticationAutomationError };
37
45
  export type AuthenticateResultResponse = { Ok: Authentication } | { Err: AuthenticationError };
38
46
  export interface Authentication {
39
47
  doc: Doc;
40
48
  delegation: PreparedDelegation;
41
49
  }
42
50
  export type AuthenticationArgs = { OpenId: OpenIdPrepareDelegationArgs };
51
+ export type AuthenticationAutomationError =
52
+ | {
53
+ PrepareAutomation: PrepareAutomationError;
54
+ }
55
+ | { RegisterController: string }
56
+ | { SaveWorkflowMetadata: string }
57
+ | { SaveUniqueJtiToken: string };
43
58
  export interface AuthenticationConfig {
44
59
  updated_at: [] | [bigint];
45
60
  openid: [] | [AuthenticationConfigOpenId];
@@ -54,7 +69,7 @@ export interface AuthenticationConfigInternetIdentity {
54
69
  }
55
70
  export interface AuthenticationConfigOpenId {
56
71
  observatory_id: [] | [Principal];
57
- providers: Array<[OpenIdProvider, OpenIdProviderConfig]>;
72
+ providers: Array<[OpenIdDelegationProvider, OpenIdAuthProviderConfig]>;
58
73
  }
59
74
  export type AuthenticationError =
60
75
  | {
@@ -64,6 +79,21 @@ export type AuthenticationError =
64
79
  export interface AuthenticationRules {
65
80
  allowed_callers: Array<Principal>;
66
81
  }
82
+ export interface AutomationConfig {
83
+ updated_at: [] | [bigint];
84
+ openid: [] | [AutomationConfigOpenId];
85
+ created_at: [] | [bigint];
86
+ version: [] | [bigint];
87
+ }
88
+ export interface AutomationConfigOpenId {
89
+ observatory_id: [] | [Principal];
90
+ providers: Array<[OpenIdAutomationProvider, OpenIdAutomationProviderConfig]>;
91
+ }
92
+ export interface AutomationController {
93
+ scope: AutomationScope;
94
+ expires_at: bigint;
95
+ }
96
+ export type AutomationScope = { Write: null } | { Submit: null };
67
97
  export type CollectionType = { Db: null } | { Storage: null };
68
98
  export interface CommitBatch {
69
99
  batch_id: bigint;
@@ -78,6 +108,7 @@ export interface Config {
78
108
  db: [] | [DbConfig];
79
109
  authentication: [] | [AuthenticationConfig];
80
110
  storage: StorageConfig;
111
+ automation: [] | [AutomationConfig];
81
112
  }
82
113
  export interface ConfigMaxMemorySize {
83
114
  stable: [] | [bigint];
@@ -86,10 +117,12 @@ export interface ConfigMaxMemorySize {
86
117
  export interface Controller {
87
118
  updated_at: bigint;
88
119
  metadata: Array<[string, string]>;
120
+ kind: [] | [ControllerKind];
89
121
  created_at: bigint;
90
122
  scope: ControllerScope;
91
123
  expires_at: [] | [bigint];
92
124
  }
125
+ export type ControllerKind = { Emulator: null } | { Automation: null };
93
126
  export type ControllerScope = { Write: null } | { Admin: null } | { Submit: null };
94
127
  export interface CustomDomain {
95
128
  updated_at: bigint;
@@ -139,7 +172,8 @@ export type GetDelegationError =
139
172
  | { NoSuchDelegation: null }
140
173
  | { JwtVerify: JwtVerifyError }
141
174
  | { GetOrFetchJwks: GetOrRefreshJwksError }
142
- | { DeriveSeedFailed: string };
175
+ | { DeriveSeedFailed: string }
176
+ | { InvalidObservatoryId: string };
143
177
  export type GetDelegationResultResponse = { Ok: SignedDelegation } | { Err: GetDelegationError };
144
178
  export type GetOrRefreshJwksError =
145
179
  | { InvalidConfig: string }
@@ -259,31 +293,58 @@ export interface MemorySize {
259
293
  stable: bigint;
260
294
  heap: bigint;
261
295
  }
296
+ export interface OpenIdAuthProviderConfig {
297
+ delegation: [] | [OpenIdAuthProviderDelegationConfig];
298
+ client_id: string;
299
+ }
300
+ export interface OpenIdAuthProviderDelegationConfig {
301
+ targets: [] | [Array<Principal>];
302
+ max_time_to_live: [] | [bigint];
303
+ }
304
+ export type OpenIdAutomationProvider = { GitHub: null };
305
+ export interface OpenIdAutomationProviderConfig {
306
+ controller: [] | [OpenIdAutomationProviderControllerConfig];
307
+ repositories: Array<[RepositoryKey, OpenIdAutomationRepositoryConfig]>;
308
+ }
309
+ export interface OpenIdAutomationProviderControllerConfig {
310
+ scope: [] | [AutomationScope];
311
+ max_time_to_live: [] | [bigint];
312
+ }
313
+ export interface OpenIdAutomationRepositoryConfig {
314
+ refs: [] | [Array<string>];
315
+ }
316
+ export type OpenIdDelegationProvider = { GitHub: null } | { Google: null };
262
317
  export interface OpenIdGetDelegationArgs {
263
318
  jwt: string;
264
319
  session_key: Uint8Array;
265
320
  salt: Uint8Array;
266
321
  expiration: bigint;
267
322
  }
323
+ export interface OpenIdPrepareAutomationArgs {
324
+ jwt: string;
325
+ salt: Uint8Array;
326
+ }
268
327
  export interface OpenIdPrepareDelegationArgs {
269
328
  jwt: string;
270
329
  session_key: Uint8Array;
271
330
  salt: Uint8Array;
272
331
  }
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
332
  export type Permission =
283
333
  | { Controllers: null }
284
334
  | { Private: null }
285
335
  | { Public: null }
286
336
  | { Managed: null };
337
+ export type PrepareAutomationError =
338
+ | {
339
+ JwtFindProvider: JwtFindProviderError;
340
+ }
341
+ | { InvalidController: string }
342
+ | { GetCachedJwks: null }
343
+ | { JwtVerify: JwtVerifyError }
344
+ | { GetOrFetchJwks: GetOrRefreshJwksError }
345
+ | { ControllerAlreadyExists: null }
346
+ | { InvalidObservatoryId: string }
347
+ | { TooManyControllers: string };
287
348
  export type PrepareDelegationError =
288
349
  | {
289
350
  JwtFindProvider: JwtFindProviderError;
@@ -291,7 +352,8 @@ export type PrepareDelegationError =
291
352
  | { GetCachedJwks: null }
292
353
  | { JwtVerify: JwtVerifyError }
293
354
  | { GetOrFetchJwks: GetOrRefreshJwksError }
294
- | { DeriveSeedFailed: string };
355
+ | { DeriveSeedFailed: string }
356
+ | { InvalidObservatoryId: string };
295
357
  export interface PreparedDelegation {
296
358
  user_key: Uint8Array;
297
359
  expiration: bigint;
@@ -323,6 +385,10 @@ export interface RateConfig {
323
385
  max_tokens: bigint;
324
386
  time_per_token_ns: bigint;
325
387
  }
388
+ export interface RepositoryKey {
389
+ owner: string;
390
+ name: string;
391
+ }
326
392
  export interface Rule {
327
393
  max_capacity: [] | [number];
328
394
  memory: [] | [Memory];
@@ -347,8 +413,13 @@ export interface SetAuthenticationConfig {
347
413
  internet_identity: [] | [AuthenticationConfigInternetIdentity];
348
414
  rules: [] | [AuthenticationRules];
349
415
  }
416
+ export interface SetAutomationConfig {
417
+ openid: [] | [AutomationConfigOpenId];
418
+ version: [] | [bigint];
419
+ }
350
420
  export interface SetController {
351
421
  metadata: Array<[string, string]>;
422
+ kind: [] | [ControllerKind];
352
423
  scope: ControllerScope;
353
424
  expires_at: [] | [bigint];
354
425
  }
@@ -440,6 +511,10 @@ export interface UploadChunkResult {
440
511
  }
441
512
  export interface _SERVICE {
442
513
  authenticate: ActorMethod<[AuthenticationArgs], AuthenticateResultResponse>;
514
+ authenticate_automation: ActorMethod<
515
+ [AuthenticateAutomationArgs],
516
+ AuthenticateAutomationResultResponse
517
+ >;
443
518
  commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
444
519
  commit_proposal: ActorMethod<[CommitProposal], null>;
445
520
  commit_proposal_asset_upload: ActorMethod<[CommitBatch], undefined>;
@@ -451,6 +526,7 @@ export interface _SERVICE {
451
526
  count_proposals: ActorMethod<[], bigint>;
452
527
  del_asset: ActorMethod<[string, string], undefined>;
453
528
  del_assets: ActorMethod<[string], undefined>;
529
+ del_controller_self: ActorMethod<[], undefined>;
454
530
  del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
455
531
  del_custom_domain: ActorMethod<[string], undefined>;
456
532
  del_doc: ActorMethod<[string, string, DelDoc], undefined>;
@@ -464,6 +540,7 @@ export interface _SERVICE {
464
540
  deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
465
541
  get_asset: ActorMethod<[string, string], [] | [AssetNoContent]>;
466
542
  get_auth_config: ActorMethod<[], [] | [AuthenticationConfig]>;
543
+ get_automation_config: ActorMethod<[], [] | [AutomationConfig]>;
467
544
  get_config: ActorMethod<[], Config>;
468
545
  get_db_config: ActorMethod<[], [] | [DbConfig]>;
469
546
  get_delegation: ActorMethod<[GetDelegationArgs], GetDelegationResultResponse>;
@@ -495,6 +572,7 @@ export interface _SERVICE {
495
572
  reject_proposal: ActorMethod<[CommitProposal], null>;
496
573
  set_asset_token: ActorMethod<[string, string, [] | [string]], undefined>;
497
574
  set_auth_config: ActorMethod<[SetAuthenticationConfig], AuthenticationConfig>;
575
+ set_automation_config: ActorMethod<[SetAutomationConfig], AutomationConfig>;
498
576
  set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
499
577
  set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
500
578
  set_db_config: ActorMethod<[SetDbConfig], DbConfig>;