openxiangda-contracts 2.0.0-alpha.14 → 2.0.0-alpha.17

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/dist/schemas.d.ts CHANGED
@@ -431,6 +431,321 @@ export declare const nativePrincipalSchema: {
431
431
  };
432
432
  };
433
433
  };
434
+ export declare const gatewayAssertionJwksSchema: {
435
+ readonly $id: "openxiangda.gateway-assertion-jwks/v2";
436
+ readonly type: "object";
437
+ readonly additionalProperties: false;
438
+ readonly required: readonly ["schemaVersion", "keys"];
439
+ readonly properties: {
440
+ readonly schemaVersion: {
441
+ readonly const: "openxiangda.gateway-assertion-jwks/v2";
442
+ };
443
+ readonly keys: {
444
+ readonly type: "array";
445
+ readonly minItems: 1;
446
+ readonly maxItems: 3;
447
+ readonly items: {
448
+ readonly type: "object";
449
+ readonly additionalProperties: false;
450
+ readonly required: readonly ["kty", "crv", "x", "use", "alg", "kid"];
451
+ readonly properties: {
452
+ readonly kty: {
453
+ readonly const: "OKP";
454
+ };
455
+ readonly crv: {
456
+ readonly const: "Ed25519";
457
+ };
458
+ readonly x: {
459
+ readonly type: "string";
460
+ readonly minLength: 1;
461
+ };
462
+ readonly use: {
463
+ readonly const: "sig";
464
+ };
465
+ readonly alg: {
466
+ readonly const: "EdDSA";
467
+ };
468
+ readonly kid: {
469
+ readonly type: "string";
470
+ readonly minLength: 1;
471
+ readonly maxLength: 128;
472
+ readonly pattern: "^[A-Za-z0-9._-]+$";
473
+ };
474
+ };
475
+ };
476
+ };
477
+ };
478
+ };
479
+ export declare const gatewayInvocationPrincipalSchema: {
480
+ readonly $id: "openxiangda.gateway-invocation-principal/v2";
481
+ readonly type: "object";
482
+ readonly additionalProperties: false;
483
+ readonly required: readonly ["schemaVersion", "target", "principal", "roleSession", "invocationTokenId"];
484
+ readonly properties: {
485
+ readonly schemaVersion: {
486
+ readonly const: "openxiangda.gateway-invocation-principal/v2";
487
+ };
488
+ readonly target: {
489
+ readonly type: "object";
490
+ readonly additionalProperties: false;
491
+ readonly required: readonly ["tenantId", "appCode", "environmentId", "environmentKey", "appVersionId", "deploymentRunId", "headRevision", "backendRevisionId"];
492
+ readonly properties: {
493
+ readonly tenantId: {
494
+ readonly type: "string";
495
+ readonly minLength: 1;
496
+ };
497
+ readonly appCode: {
498
+ readonly type: "string";
499
+ readonly minLength: 1;
500
+ };
501
+ readonly environmentId: {
502
+ readonly type: "string";
503
+ readonly minLength: 1;
504
+ };
505
+ readonly environmentKey: {
506
+ readonly enum: readonly ["local", "preproduction", "production"];
507
+ };
508
+ readonly appVersionId: {
509
+ readonly type: "string";
510
+ readonly minLength: 1;
511
+ };
512
+ readonly deploymentRunId: {
513
+ readonly type: "string";
514
+ readonly minLength: 1;
515
+ };
516
+ readonly headRevision: {
517
+ readonly type: "integer";
518
+ readonly minimum: 1;
519
+ };
520
+ readonly backendRevisionId: {
521
+ readonly type: "string";
522
+ readonly minLength: 1;
523
+ };
524
+ };
525
+ };
526
+ readonly principal: {
527
+ readonly anyOf: readonly [{
528
+ readonly $ref: "openxiangda.native-principal/v2";
529
+ }, {
530
+ readonly type: "object";
531
+ readonly additionalProperties: false;
532
+ readonly required: readonly ["principalType", "clientRecordId", "clientId", "credentialVersion", "tenantId", "appCode", "environmentId", "environmentKey", "appVersionId", "deploymentRunId", "headRevision", "scopes", "rateLimitPerMinute", "tokenId"];
533
+ readonly properties: {
534
+ readonly principalType: {
535
+ readonly const: "application";
536
+ };
537
+ readonly clientRecordId: {
538
+ readonly type: "string";
539
+ readonly minLength: 1;
540
+ };
541
+ readonly clientId: {
542
+ readonly type: "string";
543
+ readonly minLength: 1;
544
+ };
545
+ readonly credentialVersion: {
546
+ readonly type: "integer";
547
+ readonly minimum: 1;
548
+ };
549
+ readonly runtimeContract: {
550
+ readonly const: "native-2";
551
+ };
552
+ readonly runtimeCredentialId: {
553
+ readonly type: "string";
554
+ readonly minLength: 1;
555
+ };
556
+ readonly tenantId: {
557
+ readonly type: "string";
558
+ readonly minLength: 1;
559
+ };
560
+ readonly appCode: {
561
+ readonly type: "string";
562
+ readonly minLength: 1;
563
+ };
564
+ readonly environmentId: {
565
+ readonly type: "string";
566
+ readonly minLength: 1;
567
+ };
568
+ readonly environmentKey: {
569
+ readonly enum: readonly ["local", "preproduction", "production"];
570
+ };
571
+ readonly appVersionId: {
572
+ readonly type: "string";
573
+ readonly minLength: 1;
574
+ };
575
+ readonly deploymentRunId: {
576
+ readonly type: "string";
577
+ readonly minLength: 1;
578
+ };
579
+ readonly headRevision: {
580
+ readonly type: "integer";
581
+ readonly minimum: 1;
582
+ };
583
+ readonly scopes: {
584
+ readonly type: "array";
585
+ readonly maxItems: 2000;
586
+ readonly uniqueItems: true;
587
+ readonly items: {
588
+ readonly type: "string";
589
+ readonly minLength: 1;
590
+ };
591
+ };
592
+ readonly rateLimitPerMinute: {
593
+ readonly type: "integer";
594
+ readonly minimum: 1;
595
+ };
596
+ readonly tokenId: {
597
+ readonly type: "string";
598
+ readonly minLength: 1;
599
+ };
600
+ readonly issuedAt: {
601
+ readonly type: "integer";
602
+ readonly minimum: 0;
603
+ };
604
+ readonly expiresAt: {
605
+ readonly type: "integer";
606
+ readonly minimum: 0;
607
+ };
608
+ };
609
+ }];
610
+ };
611
+ readonly roleSession: {
612
+ readonly anyOf: readonly [{
613
+ readonly $ref: "openxiangda.native-role-session/v2";
614
+ }, {
615
+ readonly type: "null";
616
+ }];
617
+ };
618
+ readonly invocationTokenId: {
619
+ readonly type: "string";
620
+ readonly minLength: 1;
621
+ };
622
+ };
623
+ };
624
+ export declare const runtimeLeaseResultSchema: {
625
+ readonly $id: "openxiangda.runtime-lease-result/v2";
626
+ readonly type: "object";
627
+ readonly additionalProperties: false;
628
+ readonly required: readonly ["schemaVersion", "granted", "released", "leaseToken", "expiresAt", "retryAfterMs", "target"];
629
+ readonly properties: {
630
+ readonly schemaVersion: {
631
+ readonly const: "openxiangda.runtime-lease-result/v2";
632
+ };
633
+ readonly granted: {
634
+ readonly type: "boolean";
635
+ };
636
+ readonly released: {
637
+ readonly type: "boolean";
638
+ };
639
+ readonly leaseToken: {
640
+ readonly anyOf: readonly [{
641
+ readonly type: "string";
642
+ readonly minLength: 1;
643
+ }, {
644
+ readonly type: "null";
645
+ }];
646
+ };
647
+ readonly expiresAt: {
648
+ readonly anyOf: readonly [{
649
+ readonly type: "string";
650
+ readonly format: "date-time";
651
+ }, {
652
+ readonly type: "null";
653
+ }];
654
+ };
655
+ readonly retryAfterMs: {
656
+ readonly type: "integer";
657
+ readonly minimum: 0;
658
+ readonly maximum: 20000;
659
+ };
660
+ readonly target: {
661
+ readonly type: "object";
662
+ readonly additionalProperties: false;
663
+ readonly required: readonly ["environmentId", "appVersionId", "deploymentRunId", "headRevision"];
664
+ readonly properties: {
665
+ readonly environmentId: {
666
+ readonly type: "string";
667
+ readonly minLength: 1;
668
+ };
669
+ readonly appVersionId: {
670
+ readonly type: "string";
671
+ readonly minLength: 1;
672
+ };
673
+ readonly deploymentRunId: {
674
+ readonly type: "string";
675
+ readonly minLength: 1;
676
+ };
677
+ readonly headRevision: {
678
+ readonly type: "integer";
679
+ readonly minimum: 1;
680
+ };
681
+ };
682
+ };
683
+ };
684
+ };
685
+ export declare const runtimeSecretValuesSchema: {
686
+ readonly $id: "openxiangda.runtime-secret-values/v2";
687
+ readonly type: "object";
688
+ readonly additionalProperties: false;
689
+ readonly required: readonly ["schemaVersion", "items", "target"];
690
+ readonly properties: {
691
+ readonly schemaVersion: {
692
+ readonly const: "openxiangda.runtime-secret-values/v2";
693
+ };
694
+ readonly items: {
695
+ readonly type: "array";
696
+ readonly maxItems: 64;
697
+ readonly items: {
698
+ readonly type: "object";
699
+ readonly additionalProperties: false;
700
+ readonly required: readonly ["name", "env", "value", "version", "revision"];
701
+ readonly properties: {
702
+ readonly name: {
703
+ readonly type: "string";
704
+ readonly minLength: 1;
705
+ };
706
+ readonly env: {
707
+ readonly type: "string";
708
+ readonly pattern: "^[A-Z][A-Z0-9_]{0,127}$";
709
+ };
710
+ readonly value: {
711
+ readonly type: "string";
712
+ };
713
+ readonly version: {
714
+ readonly type: "integer";
715
+ readonly minimum: 1;
716
+ };
717
+ readonly revision: {
718
+ readonly type: "integer";
719
+ readonly minimum: 1;
720
+ };
721
+ };
722
+ };
723
+ };
724
+ readonly target: {
725
+ readonly type: "object";
726
+ readonly additionalProperties: false;
727
+ readonly required: readonly ["environmentId", "appVersionId", "deploymentRunId", "headRevision"];
728
+ readonly properties: {
729
+ readonly environmentId: {
730
+ readonly type: "string";
731
+ readonly minLength: 1;
732
+ };
733
+ readonly appVersionId: {
734
+ readonly type: "string";
735
+ readonly minLength: 1;
736
+ };
737
+ readonly deploymentRunId: {
738
+ readonly type: "string";
739
+ readonly minLength: 1;
740
+ };
741
+ readonly headRevision: {
742
+ readonly type: "integer";
743
+ readonly minimum: 1;
744
+ };
745
+ };
746
+ };
747
+ };
748
+ };
434
749
  export declare const subjectProfileSchema: {
435
750
  readonly $id: "openxiangda.subject-profile/v2";
436
751
  readonly type: "object";
@@ -4107,7 +4422,7 @@ export declare const workflowPreparationSchema: {
4107
4422
  export declare const workflowInstanceSchema: {
4108
4423
  readonly $id: "openxiangda.workflow-instance/v2";
4109
4424
  readonly type: "object";
4110
- readonly required: readonly ["engineVersion", "id", "appCode", "workflowCode", "status", "version"];
4425
+ readonly required: readonly ["engineVersion", "id", "appCode", "environmentId", "environmentKey", "workflowCode", "status", "initiatorRoleSubjectKey", "initiatorRoleSubjectKind", "initiatorRoleCode", "initiatorRoleSubjectRevision", "version"];
4111
4426
  readonly properties: {
4112
4427
  readonly schemaVersion: {
4113
4428
  readonly const: "openxiangda.workflow-instance/v2";
@@ -4123,6 +4438,10 @@ export declare const workflowInstanceSchema: {
4123
4438
  readonly type: "string";
4124
4439
  readonly minLength: 1;
4125
4440
  };
4441
+ readonly environmentId: {
4442
+ readonly type: "string";
4443
+ readonly minLength: 1;
4444
+ };
4126
4445
  readonly environmentKey: {
4127
4446
  readonly type: "string";
4128
4447
  readonly minLength: 1;
@@ -4134,16 +4453,31 @@ export declare const workflowInstanceSchema: {
4134
4453
  readonly status: {
4135
4454
  readonly enum: readonly ["running", "returned", "approved", "rejected", "withdrawn", "terminated", "error"];
4136
4455
  };
4137
- readonly version: {
4138
- readonly type: "integer";
4139
- readonly minimum: 1;
4456
+ readonly initiatorRoleSubjectKey: {
4457
+ readonly type: "string";
4458
+ readonly minLength: 1;
4140
4459
  };
4141
- };
4460
+ readonly initiatorRoleSubjectKind: {
4461
+ readonly enum: readonly ["membership", "super_admin"];
4462
+ };
4463
+ readonly initiatorRoleCode: {
4464
+ readonly type: "string";
4465
+ readonly minLength: 1;
4466
+ };
4467
+ readonly initiatorRoleSubjectRevision: {
4468
+ readonly type: "integer";
4469
+ readonly minimum: 1;
4470
+ };
4471
+ readonly version: {
4472
+ readonly type: "integer";
4473
+ readonly minimum: 1;
4474
+ };
4475
+ };
4142
4476
  };
4143
4477
  export declare const workflowTaskSchema: {
4144
4478
  readonly $id: "openxiangda.workflow-task/v2";
4145
4479
  readonly type: "object";
4146
- readonly required: readonly ["engineVersion", "id", "instanceId", "nodeId", "status", "taskKind", "assignedRoleAssignmentId", "activeParticipantId", "participants", "originTaskId", "returnSessionId", "version"];
4480
+ readonly required: readonly ["engineVersion", "id", "instanceId", "nodeId", "status", "taskKind", "assignedRoleSubjectKey", "activeParticipantId", "participants", "originTaskId", "returnSessionId", "version"];
4147
4481
  readonly properties: {
4148
4482
  readonly schemaVersion: {
4149
4483
  readonly const: "openxiangda.workflow-task/v2";
@@ -4169,7 +4503,7 @@ export declare const workflowTaskSchema: {
4169
4503
  readonly taskKind: {
4170
4504
  readonly enum: readonly ["normal", "return_review", "resume"];
4171
4505
  };
4172
- readonly assignedRoleAssignmentId: {
4506
+ readonly assignedRoleSubjectKey: {
4173
4507
  readonly type: readonly ["string", "null"];
4174
4508
  };
4175
4509
  readonly activeParticipantId: {
@@ -4177,10 +4511,10 @@ export declare const workflowTaskSchema: {
4177
4511
  };
4178
4512
  readonly participants: {
4179
4513
  readonly type: "array";
4180
- readonly minItems: 1;
4514
+ readonly minItems: 0;
4181
4515
  readonly items: {
4182
4516
  readonly type: "object";
4183
- readonly required: readonly ["id", "userId", "roleAssignmentId", "role", "kind", "status", "required", "outcome", "sourceParticipantId", "delegationId", "delegationValidFrom", "delegationValidTo", "createdByRoleAssignmentId", "completedByRoleAssignmentId", "createdAt", "completedAt"];
4517
+ readonly required: readonly ["id", "userId", "roleSubjectKey", "roleSubjectKind", "roleSubjectRevision", "role", "kind", "status", "required", "outcome", "sourceParticipantId", "delegationId", "delegationValidFrom", "delegationValidTo", "createdByRoleSubjectKey", "completedByRoleSubjectKey", "createdAt", "completedAt"];
4184
4518
  readonly properties: {
4185
4519
  readonly id: {
4186
4520
  readonly type: "string";
@@ -4190,23 +4524,37 @@ export declare const workflowTaskSchema: {
4190
4524
  readonly type: "string";
4191
4525
  readonly minLength: 1;
4192
4526
  };
4193
- readonly roleAssignmentId: {
4194
- readonly type: "string";
4195
- readonly minLength: 1;
4527
+ readonly roleSubjectKey: {
4528
+ readonly type: readonly ["string", "null"];
4529
+ };
4530
+ readonly roleSubjectKind: {
4531
+ readonly anyOf: readonly [{
4532
+ readonly enum: readonly ["membership", "super_admin"];
4533
+ }, {
4534
+ readonly type: "null";
4535
+ }];
4536
+ };
4537
+ readonly roleSubjectRevision: {
4538
+ readonly type: readonly ["integer", "null"];
4539
+ readonly minimum: 1;
4196
4540
  };
4197
4541
  readonly role: {
4198
- readonly type: "object";
4199
- readonly required: readonly ["code", "name"];
4200
- readonly properties: {
4201
- readonly code: {
4202
- readonly type: "string";
4203
- readonly minLength: 1;
4204
- };
4205
- readonly name: {
4206
- readonly type: "string";
4207
- readonly minLength: 1;
4542
+ readonly anyOf: readonly [{
4543
+ readonly type: "object";
4544
+ readonly required: readonly ["code", "name"];
4545
+ readonly properties: {
4546
+ readonly code: {
4547
+ readonly type: "string";
4548
+ readonly minLength: 1;
4549
+ };
4550
+ readonly name: {
4551
+ readonly type: "string";
4552
+ readonly minLength: 1;
4553
+ };
4208
4554
  };
4209
- };
4555
+ }, {
4556
+ readonly type: "null";
4557
+ }];
4210
4558
  };
4211
4559
  readonly kind: {
4212
4560
  readonly enum: readonly ["primary", "add_sign", "transfer", "delegate"];
@@ -4242,11 +4590,11 @@ export declare const workflowTaskSchema: {
4242
4590
  readonly type: "null";
4243
4591
  }];
4244
4592
  };
4245
- readonly createdByRoleAssignmentId: {
4593
+ readonly createdByRoleSubjectKey: {
4246
4594
  readonly type: "string";
4247
4595
  readonly minLength: 1;
4248
4596
  };
4249
- readonly completedByRoleAssignmentId: {
4597
+ readonly completedByRoleSubjectKey: {
4250
4598
  readonly type: readonly ["string", "null"];
4251
4599
  };
4252
4600
  readonly createdAt: {
@@ -4326,7 +4674,7 @@ export declare const workflowDelegationSchema: {
4326
4674
  readonly $id: "openxiangda.workflow-delegation/v2";
4327
4675
  readonly type: "object";
4328
4676
  readonly additionalProperties: false;
4329
- readonly required: readonly ["schemaVersion", "id", "appCode", "environmentKey", "workflowCode", "delegatorUserId", "delegateUserId", "delegatorRoleAssignmentId", "delegateRoleAssignmentId", "validFrom", "validTo", "status", "reason", "createdBy", "createdAt", "revokedAt"];
4677
+ readonly required: readonly ["schemaVersion", "id", "appCode", "environmentKey", "workflowCode", "delegatorUserId", "delegateUserId", "delegatorRoleSubjectKey", "delegateRoleSubjectKey", "validFrom", "validTo", "status", "reason", "createdBy", "createdAt", "revokedAt"];
4330
4678
  readonly properties: {
4331
4679
  readonly schemaVersion: {
4332
4680
  readonly const: "openxiangda.workflow-delegation/v2";
@@ -4354,11 +4702,11 @@ export declare const workflowDelegationSchema: {
4354
4702
  readonly type: "string";
4355
4703
  readonly minLength: 1;
4356
4704
  };
4357
- readonly delegatorRoleAssignmentId: {
4705
+ readonly delegatorRoleSubjectKey: {
4358
4706
  readonly type: "string";
4359
4707
  readonly minLength: 1;
4360
4708
  };
4361
- readonly delegateRoleAssignmentId: {
4709
+ readonly delegateRoleSubjectKey: {
4362
4710
  readonly type: "string";
4363
4711
  readonly minLength: 1;
4364
4712
  };
@@ -4534,14 +4882,25 @@ export declare const workflowAssigneeResponseSchema: {
4534
4882
  readonly type: "string";
4535
4883
  readonly minLength: 1;
4536
4884
  };
4537
- readonly roleAssignmentId: {
4885
+ readonly roleSubjectKey: {
4538
4886
  readonly type: "string";
4539
4887
  readonly minLength: 1;
4540
4888
  };
4889
+ readonly roleSubjectKind: {
4890
+ readonly enum: readonly ["membership", "super_admin"];
4891
+ };
4892
+ readonly roleSubjectRevision: {
4893
+ readonly type: "integer";
4894
+ readonly minimum: 1;
4895
+ };
4541
4896
  readonly roleCode: {
4542
4897
  readonly type: "string";
4543
4898
  readonly minLength: 1;
4544
4899
  };
4900
+ readonly roleName: {
4901
+ readonly type: "string";
4902
+ readonly minLength: 1;
4903
+ };
4545
4904
  readonly displayName: {
4546
4905
  readonly type: "string";
4547
4906
  readonly minLength: 1;
@@ -4591,7 +4950,7 @@ export declare const workflowKernelDescriptorSchema: {
4591
4950
  };
4592
4951
  };
4593
4952
  readonly authorizationMode: {
4594
- readonly const: "role_session_v2";
4953
+ readonly const: "native_role_session_v2";
4595
4954
  };
4596
4955
  };
4597
4956
  };
@@ -4658,7 +5017,7 @@ export declare const workflowKernelWorkItemSchema: {
4658
5017
  readonly minLength: 1;
4659
5018
  };
4660
5019
  readonly authorizationMode: {
4661
- readonly const: "role_session_v2";
5020
+ readonly const: "native_role_session_v2";
4662
5021
  };
4663
5022
  };
4664
5023
  };
@@ -4666,7 +5025,7 @@ export declare const workflowKernelWorkCenterSchema: {
4666
5025
  readonly $id: "openxiangda.workflow-kernel-work-center/v2";
4667
5026
  readonly type: "object";
4668
5027
  readonly additionalProperties: false;
4669
- readonly required: readonly ["schemaVersion", "category", "roleSessionId", "activeRoleAssignmentId", "items", "total", "limit", "offset", "engineCounts"];
5028
+ readonly required: readonly ["schemaVersion", "category", "roleSessionId", "activeRoleSubjectKey", "items", "total", "limit", "offset", "engineCounts"];
4670
5029
  readonly properties: {
4671
5030
  readonly schemaVersion: {
4672
5031
  readonly const: "openxiangda.workflow-kernel-work-center/v2";
@@ -4678,7 +5037,7 @@ export declare const workflowKernelWorkCenterSchema: {
4678
5037
  readonly type: "string";
4679
5038
  readonly minLength: 1;
4680
5039
  };
4681
- readonly activeRoleAssignmentId: {
5040
+ readonly activeRoleSubjectKey: {
4682
5041
  readonly type: "string";
4683
5042
  readonly minLength: 1;
4684
5043
  };
@@ -5780,6 +6139,321 @@ export declare const contractSchemas: {
5780
6139
  };
5781
6140
  };
5782
6141
  };
6142
+ readonly gatewayAssertionJwks: {
6143
+ readonly $id: "openxiangda.gateway-assertion-jwks/v2";
6144
+ readonly type: "object";
6145
+ readonly additionalProperties: false;
6146
+ readonly required: readonly ["schemaVersion", "keys"];
6147
+ readonly properties: {
6148
+ readonly schemaVersion: {
6149
+ readonly const: "openxiangda.gateway-assertion-jwks/v2";
6150
+ };
6151
+ readonly keys: {
6152
+ readonly type: "array";
6153
+ readonly minItems: 1;
6154
+ readonly maxItems: 3;
6155
+ readonly items: {
6156
+ readonly type: "object";
6157
+ readonly additionalProperties: false;
6158
+ readonly required: readonly ["kty", "crv", "x", "use", "alg", "kid"];
6159
+ readonly properties: {
6160
+ readonly kty: {
6161
+ readonly const: "OKP";
6162
+ };
6163
+ readonly crv: {
6164
+ readonly const: "Ed25519";
6165
+ };
6166
+ readonly x: {
6167
+ readonly type: "string";
6168
+ readonly minLength: 1;
6169
+ };
6170
+ readonly use: {
6171
+ readonly const: "sig";
6172
+ };
6173
+ readonly alg: {
6174
+ readonly const: "EdDSA";
6175
+ };
6176
+ readonly kid: {
6177
+ readonly type: "string";
6178
+ readonly minLength: 1;
6179
+ readonly maxLength: 128;
6180
+ readonly pattern: "^[A-Za-z0-9._-]+$";
6181
+ };
6182
+ };
6183
+ };
6184
+ };
6185
+ };
6186
+ };
6187
+ readonly gatewayInvocationPrincipal: {
6188
+ readonly $id: "openxiangda.gateway-invocation-principal/v2";
6189
+ readonly type: "object";
6190
+ readonly additionalProperties: false;
6191
+ readonly required: readonly ["schemaVersion", "target", "principal", "roleSession", "invocationTokenId"];
6192
+ readonly properties: {
6193
+ readonly schemaVersion: {
6194
+ readonly const: "openxiangda.gateway-invocation-principal/v2";
6195
+ };
6196
+ readonly target: {
6197
+ readonly type: "object";
6198
+ readonly additionalProperties: false;
6199
+ readonly required: readonly ["tenantId", "appCode", "environmentId", "environmentKey", "appVersionId", "deploymentRunId", "headRevision", "backendRevisionId"];
6200
+ readonly properties: {
6201
+ readonly tenantId: {
6202
+ readonly type: "string";
6203
+ readonly minLength: 1;
6204
+ };
6205
+ readonly appCode: {
6206
+ readonly type: "string";
6207
+ readonly minLength: 1;
6208
+ };
6209
+ readonly environmentId: {
6210
+ readonly type: "string";
6211
+ readonly minLength: 1;
6212
+ };
6213
+ readonly environmentKey: {
6214
+ readonly enum: readonly ["local", "preproduction", "production"];
6215
+ };
6216
+ readonly appVersionId: {
6217
+ readonly type: "string";
6218
+ readonly minLength: 1;
6219
+ };
6220
+ readonly deploymentRunId: {
6221
+ readonly type: "string";
6222
+ readonly minLength: 1;
6223
+ };
6224
+ readonly headRevision: {
6225
+ readonly type: "integer";
6226
+ readonly minimum: 1;
6227
+ };
6228
+ readonly backendRevisionId: {
6229
+ readonly type: "string";
6230
+ readonly minLength: 1;
6231
+ };
6232
+ };
6233
+ };
6234
+ readonly principal: {
6235
+ readonly anyOf: readonly [{
6236
+ readonly $ref: "openxiangda.native-principal/v2";
6237
+ }, {
6238
+ readonly type: "object";
6239
+ readonly additionalProperties: false;
6240
+ readonly required: readonly ["principalType", "clientRecordId", "clientId", "credentialVersion", "tenantId", "appCode", "environmentId", "environmentKey", "appVersionId", "deploymentRunId", "headRevision", "scopes", "rateLimitPerMinute", "tokenId"];
6241
+ readonly properties: {
6242
+ readonly principalType: {
6243
+ readonly const: "application";
6244
+ };
6245
+ readonly clientRecordId: {
6246
+ readonly type: "string";
6247
+ readonly minLength: 1;
6248
+ };
6249
+ readonly clientId: {
6250
+ readonly type: "string";
6251
+ readonly minLength: 1;
6252
+ };
6253
+ readonly credentialVersion: {
6254
+ readonly type: "integer";
6255
+ readonly minimum: 1;
6256
+ };
6257
+ readonly runtimeContract: {
6258
+ readonly const: "native-2";
6259
+ };
6260
+ readonly runtimeCredentialId: {
6261
+ readonly type: "string";
6262
+ readonly minLength: 1;
6263
+ };
6264
+ readonly tenantId: {
6265
+ readonly type: "string";
6266
+ readonly minLength: 1;
6267
+ };
6268
+ readonly appCode: {
6269
+ readonly type: "string";
6270
+ readonly minLength: 1;
6271
+ };
6272
+ readonly environmentId: {
6273
+ readonly type: "string";
6274
+ readonly minLength: 1;
6275
+ };
6276
+ readonly environmentKey: {
6277
+ readonly enum: readonly ["local", "preproduction", "production"];
6278
+ };
6279
+ readonly appVersionId: {
6280
+ readonly type: "string";
6281
+ readonly minLength: 1;
6282
+ };
6283
+ readonly deploymentRunId: {
6284
+ readonly type: "string";
6285
+ readonly minLength: 1;
6286
+ };
6287
+ readonly headRevision: {
6288
+ readonly type: "integer";
6289
+ readonly minimum: 1;
6290
+ };
6291
+ readonly scopes: {
6292
+ readonly type: "array";
6293
+ readonly maxItems: 2000;
6294
+ readonly uniqueItems: true;
6295
+ readonly items: {
6296
+ readonly type: "string";
6297
+ readonly minLength: 1;
6298
+ };
6299
+ };
6300
+ readonly rateLimitPerMinute: {
6301
+ readonly type: "integer";
6302
+ readonly minimum: 1;
6303
+ };
6304
+ readonly tokenId: {
6305
+ readonly type: "string";
6306
+ readonly minLength: 1;
6307
+ };
6308
+ readonly issuedAt: {
6309
+ readonly type: "integer";
6310
+ readonly minimum: 0;
6311
+ };
6312
+ readonly expiresAt: {
6313
+ readonly type: "integer";
6314
+ readonly minimum: 0;
6315
+ };
6316
+ };
6317
+ }];
6318
+ };
6319
+ readonly roleSession: {
6320
+ readonly anyOf: readonly [{
6321
+ readonly $ref: "openxiangda.native-role-session/v2";
6322
+ }, {
6323
+ readonly type: "null";
6324
+ }];
6325
+ };
6326
+ readonly invocationTokenId: {
6327
+ readonly type: "string";
6328
+ readonly minLength: 1;
6329
+ };
6330
+ };
6331
+ };
6332
+ readonly runtimeLeaseResult: {
6333
+ readonly $id: "openxiangda.runtime-lease-result/v2";
6334
+ readonly type: "object";
6335
+ readonly additionalProperties: false;
6336
+ readonly required: readonly ["schemaVersion", "granted", "released", "leaseToken", "expiresAt", "retryAfterMs", "target"];
6337
+ readonly properties: {
6338
+ readonly schemaVersion: {
6339
+ readonly const: "openxiangda.runtime-lease-result/v2";
6340
+ };
6341
+ readonly granted: {
6342
+ readonly type: "boolean";
6343
+ };
6344
+ readonly released: {
6345
+ readonly type: "boolean";
6346
+ };
6347
+ readonly leaseToken: {
6348
+ readonly anyOf: readonly [{
6349
+ readonly type: "string";
6350
+ readonly minLength: 1;
6351
+ }, {
6352
+ readonly type: "null";
6353
+ }];
6354
+ };
6355
+ readonly expiresAt: {
6356
+ readonly anyOf: readonly [{
6357
+ readonly type: "string";
6358
+ readonly format: "date-time";
6359
+ }, {
6360
+ readonly type: "null";
6361
+ }];
6362
+ };
6363
+ readonly retryAfterMs: {
6364
+ readonly type: "integer";
6365
+ readonly minimum: 0;
6366
+ readonly maximum: 20000;
6367
+ };
6368
+ readonly target: {
6369
+ readonly type: "object";
6370
+ readonly additionalProperties: false;
6371
+ readonly required: readonly ["environmentId", "appVersionId", "deploymentRunId", "headRevision"];
6372
+ readonly properties: {
6373
+ readonly environmentId: {
6374
+ readonly type: "string";
6375
+ readonly minLength: 1;
6376
+ };
6377
+ readonly appVersionId: {
6378
+ readonly type: "string";
6379
+ readonly minLength: 1;
6380
+ };
6381
+ readonly deploymentRunId: {
6382
+ readonly type: "string";
6383
+ readonly minLength: 1;
6384
+ };
6385
+ readonly headRevision: {
6386
+ readonly type: "integer";
6387
+ readonly minimum: 1;
6388
+ };
6389
+ };
6390
+ };
6391
+ };
6392
+ };
6393
+ readonly runtimeSecretValues: {
6394
+ readonly $id: "openxiangda.runtime-secret-values/v2";
6395
+ readonly type: "object";
6396
+ readonly additionalProperties: false;
6397
+ readonly required: readonly ["schemaVersion", "items", "target"];
6398
+ readonly properties: {
6399
+ readonly schemaVersion: {
6400
+ readonly const: "openxiangda.runtime-secret-values/v2";
6401
+ };
6402
+ readonly items: {
6403
+ readonly type: "array";
6404
+ readonly maxItems: 64;
6405
+ readonly items: {
6406
+ readonly type: "object";
6407
+ readonly additionalProperties: false;
6408
+ readonly required: readonly ["name", "env", "value", "version", "revision"];
6409
+ readonly properties: {
6410
+ readonly name: {
6411
+ readonly type: "string";
6412
+ readonly minLength: 1;
6413
+ };
6414
+ readonly env: {
6415
+ readonly type: "string";
6416
+ readonly pattern: "^[A-Z][A-Z0-9_]{0,127}$";
6417
+ };
6418
+ readonly value: {
6419
+ readonly type: "string";
6420
+ };
6421
+ readonly version: {
6422
+ readonly type: "integer";
6423
+ readonly minimum: 1;
6424
+ };
6425
+ readonly revision: {
6426
+ readonly type: "integer";
6427
+ readonly minimum: 1;
6428
+ };
6429
+ };
6430
+ };
6431
+ };
6432
+ readonly target: {
6433
+ readonly type: "object";
6434
+ readonly additionalProperties: false;
6435
+ readonly required: readonly ["environmentId", "appVersionId", "deploymentRunId", "headRevision"];
6436
+ readonly properties: {
6437
+ readonly environmentId: {
6438
+ readonly type: "string";
6439
+ readonly minLength: 1;
6440
+ };
6441
+ readonly appVersionId: {
6442
+ readonly type: "string";
6443
+ readonly minLength: 1;
6444
+ };
6445
+ readonly deploymentRunId: {
6446
+ readonly type: "string";
6447
+ readonly minLength: 1;
6448
+ };
6449
+ readonly headRevision: {
6450
+ readonly type: "integer";
6451
+ readonly minimum: 1;
6452
+ };
6453
+ };
6454
+ };
6455
+ };
6456
+ };
5783
6457
  readonly subjectProfile: {
5784
6458
  readonly $id: "openxiangda.subject-profile/v2";
5785
6459
  readonly type: "object";
@@ -8831,7 +9505,7 @@ export declare const contractSchemas: {
8831
9505
  readonly workflowInstance: {
8832
9506
  readonly $id: "openxiangda.workflow-instance/v2";
8833
9507
  readonly type: "object";
8834
- readonly required: readonly ["engineVersion", "id", "appCode", "workflowCode", "status", "version"];
9508
+ readonly required: readonly ["engineVersion", "id", "appCode", "environmentId", "environmentKey", "workflowCode", "status", "initiatorRoleSubjectKey", "initiatorRoleSubjectKind", "initiatorRoleCode", "initiatorRoleSubjectRevision", "version"];
8835
9509
  readonly properties: {
8836
9510
  readonly schemaVersion: {
8837
9511
  readonly const: "openxiangda.workflow-instance/v2";
@@ -8847,6 +9521,10 @@ export declare const contractSchemas: {
8847
9521
  readonly type: "string";
8848
9522
  readonly minLength: 1;
8849
9523
  };
9524
+ readonly environmentId: {
9525
+ readonly type: "string";
9526
+ readonly minLength: 1;
9527
+ };
8850
9528
  readonly environmentKey: {
8851
9529
  readonly type: "string";
8852
9530
  readonly minLength: 1;
@@ -8858,6 +9536,21 @@ export declare const contractSchemas: {
8858
9536
  readonly status: {
8859
9537
  readonly enum: readonly ["running", "returned", "approved", "rejected", "withdrawn", "terminated", "error"];
8860
9538
  };
9539
+ readonly initiatorRoleSubjectKey: {
9540
+ readonly type: "string";
9541
+ readonly minLength: 1;
9542
+ };
9543
+ readonly initiatorRoleSubjectKind: {
9544
+ readonly enum: readonly ["membership", "super_admin"];
9545
+ };
9546
+ readonly initiatorRoleCode: {
9547
+ readonly type: "string";
9548
+ readonly minLength: 1;
9549
+ };
9550
+ readonly initiatorRoleSubjectRevision: {
9551
+ readonly type: "integer";
9552
+ readonly minimum: 1;
9553
+ };
8861
9554
  readonly version: {
8862
9555
  readonly type: "integer";
8863
9556
  readonly minimum: 1;
@@ -8867,7 +9560,7 @@ export declare const contractSchemas: {
8867
9560
  readonly workflowTask: {
8868
9561
  readonly $id: "openxiangda.workflow-task/v2";
8869
9562
  readonly type: "object";
8870
- readonly required: readonly ["engineVersion", "id", "instanceId", "nodeId", "status", "taskKind", "assignedRoleAssignmentId", "activeParticipantId", "participants", "originTaskId", "returnSessionId", "version"];
9563
+ readonly required: readonly ["engineVersion", "id", "instanceId", "nodeId", "status", "taskKind", "assignedRoleSubjectKey", "activeParticipantId", "participants", "originTaskId", "returnSessionId", "version"];
8871
9564
  readonly properties: {
8872
9565
  readonly schemaVersion: {
8873
9566
  readonly const: "openxiangda.workflow-task/v2";
@@ -8893,7 +9586,7 @@ export declare const contractSchemas: {
8893
9586
  readonly taskKind: {
8894
9587
  readonly enum: readonly ["normal", "return_review", "resume"];
8895
9588
  };
8896
- readonly assignedRoleAssignmentId: {
9589
+ readonly assignedRoleSubjectKey: {
8897
9590
  readonly type: readonly ["string", "null"];
8898
9591
  };
8899
9592
  readonly activeParticipantId: {
@@ -8901,10 +9594,10 @@ export declare const contractSchemas: {
8901
9594
  };
8902
9595
  readonly participants: {
8903
9596
  readonly type: "array";
8904
- readonly minItems: 1;
9597
+ readonly minItems: 0;
8905
9598
  readonly items: {
8906
9599
  readonly type: "object";
8907
- readonly required: readonly ["id", "userId", "roleAssignmentId", "role", "kind", "status", "required", "outcome", "sourceParticipantId", "delegationId", "delegationValidFrom", "delegationValidTo", "createdByRoleAssignmentId", "completedByRoleAssignmentId", "createdAt", "completedAt"];
9600
+ readonly required: readonly ["id", "userId", "roleSubjectKey", "roleSubjectKind", "roleSubjectRevision", "role", "kind", "status", "required", "outcome", "sourceParticipantId", "delegationId", "delegationValidFrom", "delegationValidTo", "createdByRoleSubjectKey", "completedByRoleSubjectKey", "createdAt", "completedAt"];
8908
9601
  readonly properties: {
8909
9602
  readonly id: {
8910
9603
  readonly type: "string";
@@ -8914,23 +9607,37 @@ export declare const contractSchemas: {
8914
9607
  readonly type: "string";
8915
9608
  readonly minLength: 1;
8916
9609
  };
8917
- readonly roleAssignmentId: {
8918
- readonly type: "string";
8919
- readonly minLength: 1;
9610
+ readonly roleSubjectKey: {
9611
+ readonly type: readonly ["string", "null"];
9612
+ };
9613
+ readonly roleSubjectKind: {
9614
+ readonly anyOf: readonly [{
9615
+ readonly enum: readonly ["membership", "super_admin"];
9616
+ }, {
9617
+ readonly type: "null";
9618
+ }];
9619
+ };
9620
+ readonly roleSubjectRevision: {
9621
+ readonly type: readonly ["integer", "null"];
9622
+ readonly minimum: 1;
8920
9623
  };
8921
9624
  readonly role: {
8922
- readonly type: "object";
8923
- readonly required: readonly ["code", "name"];
8924
- readonly properties: {
8925
- readonly code: {
8926
- readonly type: "string";
8927
- readonly minLength: 1;
8928
- };
8929
- readonly name: {
8930
- readonly type: "string";
8931
- readonly minLength: 1;
9625
+ readonly anyOf: readonly [{
9626
+ readonly type: "object";
9627
+ readonly required: readonly ["code", "name"];
9628
+ readonly properties: {
9629
+ readonly code: {
9630
+ readonly type: "string";
9631
+ readonly minLength: 1;
9632
+ };
9633
+ readonly name: {
9634
+ readonly type: "string";
9635
+ readonly minLength: 1;
9636
+ };
8932
9637
  };
8933
- };
9638
+ }, {
9639
+ readonly type: "null";
9640
+ }];
8934
9641
  };
8935
9642
  readonly kind: {
8936
9643
  readonly enum: readonly ["primary", "add_sign", "transfer", "delegate"];
@@ -8966,11 +9673,11 @@ export declare const contractSchemas: {
8966
9673
  readonly type: "null";
8967
9674
  }];
8968
9675
  };
8969
- readonly createdByRoleAssignmentId: {
9676
+ readonly createdByRoleSubjectKey: {
8970
9677
  readonly type: "string";
8971
9678
  readonly minLength: 1;
8972
9679
  };
8973
- readonly completedByRoleAssignmentId: {
9680
+ readonly completedByRoleSubjectKey: {
8974
9681
  readonly type: readonly ["string", "null"];
8975
9682
  };
8976
9683
  readonly createdAt: {
@@ -9050,7 +9757,7 @@ export declare const contractSchemas: {
9050
9757
  readonly $id: "openxiangda.workflow-delegation/v2";
9051
9758
  readonly type: "object";
9052
9759
  readonly additionalProperties: false;
9053
- readonly required: readonly ["schemaVersion", "id", "appCode", "environmentKey", "workflowCode", "delegatorUserId", "delegateUserId", "delegatorRoleAssignmentId", "delegateRoleAssignmentId", "validFrom", "validTo", "status", "reason", "createdBy", "createdAt", "revokedAt"];
9760
+ readonly required: readonly ["schemaVersion", "id", "appCode", "environmentKey", "workflowCode", "delegatorUserId", "delegateUserId", "delegatorRoleSubjectKey", "delegateRoleSubjectKey", "validFrom", "validTo", "status", "reason", "createdBy", "createdAt", "revokedAt"];
9054
9761
  readonly properties: {
9055
9762
  readonly schemaVersion: {
9056
9763
  readonly const: "openxiangda.workflow-delegation/v2";
@@ -9078,11 +9785,11 @@ export declare const contractSchemas: {
9078
9785
  readonly type: "string";
9079
9786
  readonly minLength: 1;
9080
9787
  };
9081
- readonly delegatorRoleAssignmentId: {
9788
+ readonly delegatorRoleSubjectKey: {
9082
9789
  readonly type: "string";
9083
9790
  readonly minLength: 1;
9084
9791
  };
9085
- readonly delegateRoleAssignmentId: {
9792
+ readonly delegateRoleSubjectKey: {
9086
9793
  readonly type: "string";
9087
9794
  readonly minLength: 1;
9088
9795
  };
@@ -9258,14 +9965,25 @@ export declare const contractSchemas: {
9258
9965
  readonly type: "string";
9259
9966
  readonly minLength: 1;
9260
9967
  };
9261
- readonly roleAssignmentId: {
9968
+ readonly roleSubjectKey: {
9262
9969
  readonly type: "string";
9263
9970
  readonly minLength: 1;
9264
9971
  };
9972
+ readonly roleSubjectKind: {
9973
+ readonly enum: readonly ["membership", "super_admin"];
9974
+ };
9975
+ readonly roleSubjectRevision: {
9976
+ readonly type: "integer";
9977
+ readonly minimum: 1;
9978
+ };
9265
9979
  readonly roleCode: {
9266
9980
  readonly type: "string";
9267
9981
  readonly minLength: 1;
9268
9982
  };
9983
+ readonly roleName: {
9984
+ readonly type: "string";
9985
+ readonly minLength: 1;
9986
+ };
9269
9987
  readonly displayName: {
9270
9988
  readonly type: "string";
9271
9989
  readonly minLength: 1;
@@ -9315,7 +10033,7 @@ export declare const contractSchemas: {
9315
10033
  };
9316
10034
  };
9317
10035
  readonly authorizationMode: {
9318
- readonly const: "role_session_v2";
10036
+ readonly const: "native_role_session_v2";
9319
10037
  };
9320
10038
  };
9321
10039
  };
@@ -9382,7 +10100,7 @@ export declare const contractSchemas: {
9382
10100
  readonly minLength: 1;
9383
10101
  };
9384
10102
  readonly authorizationMode: {
9385
- readonly const: "role_session_v2";
10103
+ readonly const: "native_role_session_v2";
9386
10104
  };
9387
10105
  };
9388
10106
  };
@@ -9390,7 +10108,7 @@ export declare const contractSchemas: {
9390
10108
  readonly $id: "openxiangda.workflow-kernel-work-center/v2";
9391
10109
  readonly type: "object";
9392
10110
  readonly additionalProperties: false;
9393
- readonly required: readonly ["schemaVersion", "category", "roleSessionId", "activeRoleAssignmentId", "items", "total", "limit", "offset", "engineCounts"];
10111
+ readonly required: readonly ["schemaVersion", "category", "roleSessionId", "activeRoleSubjectKey", "items", "total", "limit", "offset", "engineCounts"];
9394
10112
  readonly properties: {
9395
10113
  readonly schemaVersion: {
9396
10114
  readonly const: "openxiangda.workflow-kernel-work-center/v2";
@@ -9402,7 +10120,7 @@ export declare const contractSchemas: {
9402
10120
  readonly type: "string";
9403
10121
  readonly minLength: 1;
9404
10122
  };
9405
- readonly activeRoleAssignmentId: {
10123
+ readonly activeRoleSubjectKey: {
9406
10124
  readonly type: "string";
9407
10125
  readonly minLength: 1;
9408
10126
  };