@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.
- package/actor.js +1 -1
- package/actor.js.map +3 -3
- package/actor.mjs +1 -1
- package/actor.mjs.map +3 -3
- package/declarations/console/console.did.d.ts +17 -11
- package/declarations/console/console.factory.certified.did.js +19 -7
- package/declarations/console/console.factory.did.js +19 -7
- package/declarations/console/console.factory.did.mjs +19 -7
- package/declarations/deprecated/console-0-3-3.did.d.ts +529 -0
- package/declarations/deprecated/console-0-3-3.factory.did.js +567 -0
- package/declarations/deprecated/observatory-0-4-0.did.d.ts +145 -0
- package/declarations/deprecated/observatory-0-4-0.factory.did.js +149 -0
- package/declarations/deprecated/satellite-0-1-6.did.d.ts +511 -0
- package/declarations/deprecated/satellite-0-1-6.factory.did.js +546 -0
- package/declarations/mission_control/mission_control.did.d.ts +3 -0
- package/declarations/mission_control/mission_control.factory.certified.did.js +6 -0
- package/declarations/mission_control/mission_control.factory.did.js +6 -0
- package/declarations/observatory/observatory.did.d.ts +7 -4
- package/declarations/observatory/observatory.factory.certified.did.js +14 -4
- package/declarations/observatory/observatory.factory.did.js +14 -4
- package/declarations/observatory/observatory.factory.did.mjs +14 -4
- package/declarations/orbiter/orbiter.did.d.ts +3 -0
- package/declarations/orbiter/orbiter.factory.certified.did.js +6 -0
- package/declarations/orbiter/orbiter.factory.did.js +6 -0
- package/declarations/orbiter/orbiter.factory.did.mjs +6 -0
- package/declarations/satellite/satellite.did.d.ts +77 -10
- package/declarations/satellite/satellite.factory.certified.did.js +78 -5
- package/declarations/satellite/satellite.factory.did.js +78 -5
- package/declarations/satellite/satellite.factory.did.mjs +78 -5
- package/declarations/sputnik/sputnik.did.d.ts +77 -10
- package/declarations/sputnik/sputnik.factory.certified.did.js +78 -5
- package/declarations/sputnik/sputnik.factory.did.js +78 -5
- package/dev/_constants.d.ts +1 -0
- package/dev/errors.d.ts +9 -0
- package/dev/identity.d.ts +43 -0
- package/dev/types/identity.d.ts +48 -0
- package/dev.d.ts +3 -0
- package/dev.js +2 -0
- package/dev.js.map +7 -0
- package/dev.mjs +4 -0
- package/dev.mjs.map +7 -0
- package/package.json +10 -4
|
@@ -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
|
|
162
|
-
|
|
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
|
|
167
|
-
delegation: IDL.Opt(
|
|
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(
|
|
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)], ['query']),
|
|
473
544
|
get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']),
|
|
545
|
+
get_automation_config: IDL.Func([], [IDL.Opt(AutomationConfig)], ['query']),
|
|
474
546
|
get_config: IDL.Func([], [Config], []),
|
|
475
547
|
get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], ['query']),
|
|
476
548
|
get_delegation: IDL.Func([GetDelegationArgs], [GetDelegationResultResponse], ['query']),
|
|
@@ -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))],
|
|
@@ -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
|
|
162
|
-
|
|
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
|
|
167
|
-
delegation: IDL.Opt(
|
|
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(
|
|
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)], ['query']),
|
|
473
544
|
get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']),
|
|
545
|
+
get_automation_config: IDL.Func([], [IDL.Opt(AutomationConfig)], ['query']),
|
|
474
546
|
get_config: IDL.Func([], [Config], []),
|
|
475
547
|
get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], ['query']),
|
|
476
548
|
get_delegation: IDL.Func([GetDelegationArgs], [GetDelegationResultResponse], ['query']),
|
|
@@ -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))],
|
|
@@ -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<[
|
|
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
|
|
162
|
-
|
|
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
|
|
167
|
-
delegation: IDL.Opt(
|
|
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(
|
|
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))],
|