@inklok/api-spec 7.9.3 → 7.11.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 (2) hide show
  1. package/openapi.yaml +277 -4
  2. package/package.json +1 -1
package/openapi.yaml CHANGED
@@ -8,7 +8,7 @@ info:
8
8
  Authenticate using an API key or bearer token, then use the resources below to manage
9
9
  templates, agreements, documents, and signing. For your first integration, start with
10
10
  the Quick Start guide.
11
- version: "7.9.3"
11
+ version: "7.11.0"
12
12
  contact:
13
13
  name: Inklok API Support
14
14
  email: support@inklok.com
@@ -746,6 +746,100 @@ paths:
746
746
  '500':
747
747
  $ref: '#/components/responses/InternalServerError'
748
748
 
749
+ /v1/platform/feature-flags:
750
+ get:
751
+ operationId: listPlatformFeatureFlags
752
+ summary: List feature flags
753
+ x-internal: true
754
+ x-visibility: internal
755
+ x-required-global-roles: [PLATFORM_ADMIN]
756
+ tags: [Platform]
757
+ responses:
758
+ '200':
759
+ description: Feature flag definitions
760
+ content:
761
+ application/json:
762
+ schema:
763
+ type: object
764
+ required: [featureFlags]
765
+ properties:
766
+ featureFlags:
767
+ type: array
768
+ items: { $ref: '#/components/schemas/FeatureFlag' }
769
+ '401': { $ref: '#/components/responses/Unauthorized' }
770
+ '403': { $ref: '#/components/responses/Forbidden' }
771
+ '500': { $ref: '#/components/responses/InternalServerError' }
772
+ post:
773
+ operationId: createPlatformFeatureFlag
774
+ summary: Create a feature flag
775
+ x-internal: true
776
+ x-visibility: internal
777
+ x-required-global-roles: [PLATFORM_ADMIN]
778
+ tags: [Platform]
779
+ requestBody:
780
+ required: true
781
+ content:
782
+ application/json:
783
+ schema: { $ref: '#/components/schemas/CreateFeatureFlagRequest' }
784
+ responses:
785
+ '201':
786
+ description: Created feature flag
787
+ content:
788
+ application/json:
789
+ schema: { $ref: '#/components/schemas/FeatureFlag' }
790
+ '400': { $ref: '#/components/responses/BadRequest' }
791
+ '401': { $ref: '#/components/responses/Unauthorized' }
792
+ '403': { $ref: '#/components/responses/Forbidden' }
793
+ '409': { description: A feature flag with the key already exists }
794
+ '500': { $ref: '#/components/responses/InternalServerError' }
795
+
796
+ /v1/platform/feature-flags/{key}:
797
+ parameters:
798
+ - in: path
799
+ name: key
800
+ required: true
801
+ schema: { type: string, pattern: '^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$' }
802
+ get:
803
+ operationId: getPlatformFeatureFlag
804
+ summary: Get a feature flag
805
+ x-internal: true
806
+ x-visibility: internal
807
+ x-required-global-roles: [PLATFORM_ADMIN]
808
+ tags: [Platform]
809
+ responses:
810
+ '200':
811
+ description: Feature flag
812
+ content:
813
+ application/json:
814
+ schema: { $ref: '#/components/schemas/FeatureFlag' }
815
+ '401': { $ref: '#/components/responses/Unauthorized' }
816
+ '403': { $ref: '#/components/responses/Forbidden' }
817
+ '404': { $ref: '#/components/responses/NotFound' }
818
+ '500': { $ref: '#/components/responses/InternalServerError' }
819
+ patch:
820
+ operationId: updatePlatformFeatureFlag
821
+ summary: Update a feature flag
822
+ x-internal: true
823
+ x-visibility: internal
824
+ x-required-global-roles: [PLATFORM_ADMIN]
825
+ tags: [Platform]
826
+ requestBody:
827
+ required: true
828
+ content:
829
+ application/json:
830
+ schema: { $ref: '#/components/schemas/UpdateFeatureFlagRequest' }
831
+ responses:
832
+ '200':
833
+ description: Updated feature flag
834
+ content:
835
+ application/json:
836
+ schema: { $ref: '#/components/schemas/FeatureFlag' }
837
+ '400': { $ref: '#/components/responses/BadRequest' }
838
+ '401': { $ref: '#/components/responses/Unauthorized' }
839
+ '403': { $ref: '#/components/responses/Forbidden' }
840
+ '404': { $ref: '#/components/responses/NotFound' }
841
+ '500': { $ref: '#/components/responses/InternalServerError' }
842
+
749
843
  /platform/api-usage:
750
844
  get:
751
845
  operationId: getPlatformApiUsage
@@ -2473,6 +2567,38 @@ paths:
2473
2567
  '500':
2474
2568
  $ref: '#/components/responses/InternalServerError'
2475
2569
 
2570
+ /v1/templates/{workflowId}/agreements/prepare:
2571
+ post:
2572
+ operationId: prepareAgreementGuestInvitationsV1
2573
+ summary: Prepare an agreement cryptographic context
2574
+ description: |
2575
+ First stage of agreement creation. Reserves the authoritative execution and party IDs,
2576
+ then returns short-lived one-time bootstrap material used by the client to construct the
2577
+ guest invitation capabilities required by the create/finalize request. Preparation does
2578
+ not create a Vault-visible agreement or consume agreement creation usage.
2579
+
2580
+ The response must be finalized against the same workflow, organization, and authenticated
2581
+ principal before `expiresIn` elapses. Raw bootstrap values are never persisted by Inklok.
2582
+ x-required-roles: [workflow-operator, organization-admin]
2583
+ x-required-scopes: [agreements:write]
2584
+ tags: [Agreements]
2585
+ parameters:
2586
+ - name: workflowId
2587
+ in: path
2588
+ required: true
2589
+ schema: { type: string }
2590
+ responses:
2591
+ '200':
2592
+ description: Short-lived authoritative context and one-time material for agreement creation
2593
+ content:
2594
+ application/json:
2595
+ schema:
2596
+ $ref: '#/components/schemas/PrepareGuestInvitationsResponse'
2597
+ '401': { $ref: '#/components/responses/Unauthorized' }
2598
+ '403': { $ref: '#/components/responses/Forbidden' }
2599
+ '404': { $ref: '#/components/responses/NotFound' }
2600
+ '500': { $ref: '#/components/responses/InternalServerError' }
2601
+
2476
2602
  /v1/agreements/{executionId}:
2477
2603
  get:
2478
2604
  operationId: getAgreementV1
@@ -2981,6 +3107,10 @@ paths:
2981
3107
  properties:
2982
3108
  execution_id:
2983
3109
  type: string
3110
+ expires_at:
3111
+ type: string
3112
+ format: date-time
3113
+ description: Immutable agreement deadline; signing is rejected at or after this instant.
2984
3114
  agreement_title:
2985
3115
  type: string
2986
3116
  nullable: true
@@ -3037,6 +3167,19 @@ paths:
3037
3167
  type: string
3038
3168
  example: RSA-OAEP-256
3039
3169
  description: Encrypted document key metadata for this signer
3170
+ key_scopes:
3171
+ type: array
3172
+ items:
3173
+ $ref: '#/components/schemas/KeyScope'
3174
+ key_envelopes:
3175
+ type: array
3176
+ items:
3177
+ $ref: '#/components/schemas/KeyEnvelope'
3178
+ invitation_capabilities:
3179
+ type: array
3180
+ description: Active agreement-specific guest capabilities. Only the authenticated party receives its encrypted private-key package; other parties expose public addressing data only.
3181
+ items:
3182
+ $ref: '#/components/schemas/GuestInvitationCapability'
3040
3183
  parties:
3041
3184
  type: array
3042
3185
  items:
@@ -3905,6 +4048,7 @@ components:
3905
4048
  - orgs
3906
4049
  - emails
3907
4050
  - profile
4051
+ - featureFlags
3908
4052
  properties:
3909
4053
  orgs:
3910
4054
  type: array
@@ -3923,6 +4067,50 @@ components:
3923
4067
  - PLATFORM_ADMIN
3924
4068
  profile:
3925
4069
  $ref: '#/components/schemas/BootstrapProfile'
4070
+ featureFlags:
4071
+ type: object
4072
+ additionalProperties:
4073
+ type: boolean
4074
+ description: Effective feature availability for this principal; targeting and audit fields are not included.
4075
+
4076
+ FeatureFlag:
4077
+ type: object
4078
+ additionalProperties: false
4079
+ required: [key, name, enabledForTestUsers, enabledForCustomers, enabledForApiKeys, createdAt, createdBy, updatedAt, updatedBy]
4080
+ properties:
4081
+ key: { type: string, pattern: '^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$' }
4082
+ name: { type: string, minLength: 2, maxLength: 120 }
4083
+ description: { type: string, maxLength: 1000 }
4084
+ enabledForTestUsers: { type: boolean }
4085
+ enabledForCustomers: { type: boolean }
4086
+ enabledForApiKeys: { type: boolean }
4087
+ createdAt: { type: string, format: date-time }
4088
+ createdBy: { type: string }
4089
+ updatedAt: { type: string, format: date-time }
4090
+ updatedBy: { type: string }
4091
+
4092
+ CreateFeatureFlagRequest:
4093
+ type: object
4094
+ additionalProperties: false
4095
+ required: [key, name]
4096
+ properties:
4097
+ key: { type: string, minLength: 2, maxLength: 80, pattern: '^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$' }
4098
+ name: { type: string, minLength: 2, maxLength: 120 }
4099
+ description: { type: string, maxLength: 1000 }
4100
+ enabledForTestUsers: { type: boolean, default: false }
4101
+ enabledForCustomers: { type: boolean, default: false }
4102
+ enabledForApiKeys: { type: boolean, default: false }
4103
+
4104
+ UpdateFeatureFlagRequest:
4105
+ type: object
4106
+ additionalProperties: false
4107
+ minProperties: 1
4108
+ properties:
4109
+ name: { type: string, minLength: 2, maxLength: 120 }
4110
+ description: { type: string, nullable: true, maxLength: 1000 }
4111
+ enabledForTestUsers: { type: boolean }
4112
+ enabledForCustomers: { type: boolean }
4113
+ enabledForApiKeys: { type: boolean }
3926
4114
 
3927
4115
  MeBillingSubscription:
3928
4116
  type: object
@@ -6044,7 +6232,7 @@ components:
6044
6232
 
6045
6233
  ExecutionStatus:
6046
6234
  type: string
6047
- enum: [pending, in_progress, completed, cancelled]
6235
+ enum: [pending, in_progress, completed, cancelled, expired]
6048
6236
 
6049
6237
  ParticipantStatus:
6050
6238
  type: string
@@ -6149,8 +6337,16 @@ components:
6149
6337
 
6150
6338
  CreateExecutionRequest:
6151
6339
  type: object
6152
- required: [agreementTitle, participants, crypto]
6340
+ required: [agreementTitle, participants, crypto, preparedExecutionId, guestInvitations]
6153
6341
  properties:
6342
+ preparedExecutionId:
6343
+ type: string
6344
+ format: uuid
6345
+ guestInvitations:
6346
+ type: array
6347
+ minItems: 1
6348
+ items:
6349
+ $ref: '#/components/schemas/CreateGuestInvitationInput'
6154
6350
  agreementTitle:
6155
6351
  type: string
6156
6352
  minLength: 1
@@ -6185,6 +6381,65 @@ components:
6185
6381
  items:
6186
6382
  $ref: '#/components/schemas/ManagedRecoveryCapability'
6187
6383
 
6384
+ PrepareGuestInvitationsResponse:
6385
+ type: object
6386
+ required: [executionId, expiresIn, parties]
6387
+ properties:
6388
+ executionId: { type: string, format: uuid }
6389
+ expiresIn: { type: integer }
6390
+ parties:
6391
+ type: array
6392
+ items:
6393
+ type: object
6394
+ required: [roleId, partyId, authorizationCode, bootstrapSecret]
6395
+ properties:
6396
+ roleId: { type: string }
6397
+ partyId: { type: string }
6398
+ authorizationCode: { type: string, writeOnly: true }
6399
+ bootstrapSecret: { type: string, writeOnly: true }
6400
+
6401
+ CreateGuestInvitationInput:
6402
+ type: object
6403
+ required: [partyId, authorizationCode, bootstrapSecret, capability]
6404
+ properties:
6405
+ partyId: { type: string }
6406
+ authorizationCode: { type: string, writeOnly: true }
6407
+ bootstrapSecret: { type: string, writeOnly: true }
6408
+ capability:
6409
+ $ref: '#/components/schemas/GuestInvitationCapabilityInput'
6410
+
6411
+ GuestInvitationCapabilityInput:
6412
+ type: object
6413
+ required: [protocol, invitationKeyId, publicKeySpki, encryptedPrivateKey, iv, salt, aad, kdf, cipher]
6414
+ properties:
6415
+ protocol: { type: string, enum: [inklok-guest-invitation-v1] }
6416
+ invitationKeyId: { type: string }
6417
+ publicKeySpki: { type: string }
6418
+ encryptedPrivateKey: { type: string }
6419
+ iv: { type: string }
6420
+ salt: { type: string }
6421
+ aad: { type: string }
6422
+ kdf: { type: string, enum: [HKDF-SHA-256] }
6423
+ cipher: { type: string, enum: [AES-256-GCM] }
6424
+
6425
+ GuestInvitationCapability:
6426
+ type: object
6427
+ required: [protocol, partyId, invitationKeyId, invitationPrincipalId, publicKeySpki, status]
6428
+ properties:
6429
+ protocol: { type: string, enum: [inklok-guest-invitation-v1] }
6430
+ partyId: { type: string }
6431
+ invitationKeyId: { type: string }
6432
+ invitationPrincipalId: { type: string }
6433
+ publicKeySpki: { type: string }
6434
+ encryptedPrivateKey: { type: string }
6435
+ iv: { type: string }
6436
+ salt: { type: string }
6437
+ aad: { type: string }
6438
+ kdf: { type: string, enum: [HKDF-SHA-256] }
6439
+ cipher: { type: string, enum: [AES-256-GCM] }
6440
+ status: { type: string, enum: [active] }
6441
+ createdAt: { type: string, format: date-time }
6442
+
6188
6443
  KeyScope:
6189
6444
  type: object
6190
6445
  required: [keyScopeId, type, version]
@@ -6203,6 +6458,13 @@ components:
6203
6458
  type: array
6204
6459
  items:
6205
6460
  type: string
6461
+ fieldIds:
6462
+ type: array
6463
+ minItems: 1
6464
+ uniqueItems: true
6465
+ description: Protected workflow fields assigned to this scope. Required by new agreement creation clients so one party may own multiple scopes with different sharing policies.
6466
+ items:
6467
+ type: string
6206
6468
  authorizationPolicy:
6207
6469
  type: object
6208
6470
  additionalProperties: true
@@ -6216,7 +6478,7 @@ components:
6216
6478
  protectionMode:
6217
6479
  type: string
6218
6480
  enum: [MANAGED, STRICT_ZK]
6219
- description: Current signing creation accepts MANAGED only. STRICT_ZK is reserved and not enabled.
6481
+ description: Agreement signing creation requires STRICT_ZK. MANAGED remains in the response model for legacy records.
6220
6482
  createdAt:
6221
6483
  type: string
6222
6484
  format: date-time
@@ -6773,6 +7035,7 @@ components:
6773
7035
  currentStep,
6774
7036
  totalSteps,
6775
7037
  createdAt,
7038
+ expiresAt,
6776
7039
  updatedAt,
6777
7040
  pdfEngineVersion,
6778
7041
  agreementTitle,
@@ -6805,6 +7068,11 @@ components:
6805
7068
  type: string
6806
7069
  format: date-time
6807
7070
  readOnly: true
7071
+ expiresAt:
7072
+ type: string
7073
+ format: date-time
7074
+ readOnly: true
7075
+ description: Immutable deadline exactly 30 days after agreement creation.
6808
7076
  updatedAt:
6809
7077
  type: string
6810
7078
  format: date-time
@@ -6897,6 +7165,11 @@ components:
6897
7165
  executionId:
6898
7166
  type: string
6899
7167
  description: The identifier of an agreement instance.
7168
+ expiresAt:
7169
+ type: string
7170
+ format: date-time
7171
+ nullable: true
7172
+ description: Immutable agreement deadline for active agreements.
6900
7173
  organizationId:
6901
7174
  type: string
6902
7175
  nullable: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inklok/api-spec",
3
- "version": "7.9.3",
3
+ "version": "7.11.0",
4
4
  "description": "Canonical OpenAPI specification for the Inklok public API.",
5
5
  "main": "openapi.yaml",
6
6
  "license": "MIT",