Skip to content

Commit c5a64ea

Browse files
committed
chore: update OpenAPI documentation
Update OpenAPI specs to include: - New POST /api/v1/file/{uuid}/add-file endpoint - Updated capabilities with envelope configuration - TypeScript type definitions Signed-off-by: Vitor Mattos <[email protected]>
1 parent 4fb5186 commit c5a64ea

6 files changed

Lines changed: 736 additions & 3 deletions

File tree

openapi-administration.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"config": {
3838
"type": "object",
3939
"required": [
40-
"sign-elements"
40+
"sign-elements",
41+
"envelope"
4142
],
4243
"properties": {
4344
"sign-elements": {
@@ -74,6 +75,17 @@
7475
"format": "double"
7576
}
7677
}
78+
},
79+
"envelope": {
80+
"type": "object",
81+
"required": [
82+
"is-available"
83+
],
84+
"properties": {
85+
"is-available": {
86+
"type": "boolean"
87+
}
88+
}
7789
}
7890
}
7991
},

openapi-full.json

Lines changed: 247 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"config": {
3838
"type": "object",
3939
"required": [
40-
"sign-elements"
40+
"sign-elements",
41+
"envelope"
4142
],
4243
"properties": {
4344
"sign-elements": {
@@ -74,6 +75,17 @@
7475
"format": "double"
7576
}
7677
}
78+
},
79+
"envelope": {
80+
"type": "object",
81+
"required": [
82+
"is-available"
83+
],
84+
"properties": {
85+
"is-available": {
86+
"type": "boolean"
87+
}
88+
}
7789
}
7890
}
7991
},
@@ -4627,6 +4639,240 @@
46274639
}
46284640
}
46294641
},
4642+
"/ocs/v2.php/apps/libresign/api/{apiVersion}/file/{uuid}/add-file": {
4643+
"post": {
4644+
"operationId": "file-add-file-to-envelope",
4645+
"summary": "Add file to envelope",
4646+
"description": "Add one or more files to an existing envelope that is in DRAFT status. Files must be uploaded as multipart/form-data with field name 'files'.",
4647+
"tags": [
4648+
"file"
4649+
],
4650+
"security": [
4651+
{
4652+
"bearer_auth": []
4653+
},
4654+
{
4655+
"basic_auth": []
4656+
}
4657+
],
4658+
"parameters": [
4659+
{
4660+
"name": "apiVersion",
4661+
"in": "path",
4662+
"required": true,
4663+
"schema": {
4664+
"type": "string",
4665+
"enum": [
4666+
"v1"
4667+
],
4668+
"default": "v1"
4669+
}
4670+
},
4671+
{
4672+
"name": "uuid",
4673+
"in": "path",
4674+
"description": "The UUID of the envelope",
4675+
"required": true,
4676+
"schema": {
4677+
"type": "string"
4678+
}
4679+
},
4680+
{
4681+
"name": "OCS-APIRequest",
4682+
"in": "header",
4683+
"description": "Required to be true for the API request to pass",
4684+
"required": true,
4685+
"schema": {
4686+
"type": "boolean",
4687+
"default": true
4688+
}
4689+
}
4690+
],
4691+
"responses": {
4692+
"200": {
4693+
"description": "Files added successfully",
4694+
"content": {
4695+
"application/json": {
4696+
"schema": {
4697+
"type": "object",
4698+
"required": [
4699+
"ocs"
4700+
],
4701+
"properties": {
4702+
"ocs": {
4703+
"type": "object",
4704+
"required": [
4705+
"meta",
4706+
"data"
4707+
],
4708+
"properties": {
4709+
"meta": {
4710+
"$ref": "#/components/schemas/OCSMeta"
4711+
},
4712+
"data": {
4713+
"type": "object",
4714+
"required": [
4715+
"message",
4716+
"files"
4717+
],
4718+
"properties": {
4719+
"message": {
4720+
"type": "string"
4721+
},
4722+
"files": {
4723+
"type": "array",
4724+
"items": {
4725+
"type": "object",
4726+
"required": [
4727+
"id",
4728+
"uuid",
4729+
"name",
4730+
"status"
4731+
],
4732+
"properties": {
4733+
"id": {
4734+
"type": "integer",
4735+
"format": "int64"
4736+
},
4737+
"uuid": {
4738+
"type": "string"
4739+
},
4740+
"name": {
4741+
"type": "string"
4742+
},
4743+
"status": {
4744+
"type": "integer",
4745+
"format": "int64"
4746+
}
4747+
}
4748+
}
4749+
}
4750+
}
4751+
}
4752+
}
4753+
}
4754+
}
4755+
}
4756+
}
4757+
}
4758+
},
4759+
"400": {
4760+
"description": "Invalid request",
4761+
"content": {
4762+
"application/json": {
4763+
"schema": {
4764+
"type": "object",
4765+
"required": [
4766+
"ocs"
4767+
],
4768+
"properties": {
4769+
"ocs": {
4770+
"type": "object",
4771+
"required": [
4772+
"meta",
4773+
"data"
4774+
],
4775+
"properties": {
4776+
"meta": {
4777+
"$ref": "#/components/schemas/OCSMeta"
4778+
},
4779+
"data": {
4780+
"type": "object",
4781+
"required": [
4782+
"message"
4783+
],
4784+
"properties": {
4785+
"message": {
4786+
"type": "string"
4787+
}
4788+
}
4789+
}
4790+
}
4791+
}
4792+
}
4793+
}
4794+
}
4795+
}
4796+
},
4797+
"404": {
4798+
"description": "Envelope not found",
4799+
"content": {
4800+
"application/json": {
4801+
"schema": {
4802+
"type": "object",
4803+
"required": [
4804+
"ocs"
4805+
],
4806+
"properties": {
4807+
"ocs": {
4808+
"type": "object",
4809+
"required": [
4810+
"meta",
4811+
"data"
4812+
],
4813+
"properties": {
4814+
"meta": {
4815+
"$ref": "#/components/schemas/OCSMeta"
4816+
},
4817+
"data": {
4818+
"type": "object",
4819+
"required": [
4820+
"message"
4821+
],
4822+
"properties": {
4823+
"message": {
4824+
"type": "string"
4825+
}
4826+
}
4827+
}
4828+
}
4829+
}
4830+
}
4831+
}
4832+
}
4833+
}
4834+
},
4835+
"422": {
4836+
"description": "Cannot add files (envelope not in DRAFT status or validation failed)",
4837+
"content": {
4838+
"application/json": {
4839+
"schema": {
4840+
"type": "object",
4841+
"required": [
4842+
"ocs"
4843+
],
4844+
"properties": {
4845+
"ocs": {
4846+
"type": "object",
4847+
"required": [
4848+
"meta",
4849+
"data"
4850+
],
4851+
"properties": {
4852+
"meta": {
4853+
"$ref": "#/components/schemas/OCSMeta"
4854+
},
4855+
"data": {
4856+
"type": "object",
4857+
"required": [
4858+
"message"
4859+
],
4860+
"properties": {
4861+
"message": {
4862+
"type": "string"
4863+
}
4864+
}
4865+
}
4866+
}
4867+
}
4868+
}
4869+
}
4870+
}
4871+
}
4872+
}
4873+
}
4874+
}
4875+
},
46304876
"/ocs/v2.php/apps/libresign/api/{apiVersion}/file/file_id/{fileId}": {
46314877
"delete": {
46324878
"operationId": "file-delete-all-request-signature-using-file-id",

0 commit comments

Comments
 (0)