Skip to content

Commit

Permalink
chore: update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos authored and backportbot-libresign[bot] committed Dec 23, 2024
1 parent 44ecba7 commit 1225ab7
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 21 deletions.
19 changes: 16 additions & 3 deletions lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,23 @@
* label: string,
* name: string,
* }
* @psalm-type LibresignSignatureMethodEmailToken = array{
* label: string,
* identifyMethod: "email"|"account",
* needCode: bool,
* hasConfirmCode: bool,
* blurredEmail: string,
* hashOfEmail: string,
* }
* @psalm-type LibresignSignatureMethodPassword = array{
* label: string,
* name: string,
* hasSignatureFile: bool,
* }
* @psalm-type LibresignSignatureMethods = array{
* clickToSign?: LibresignSignatureMethod,
* emailToken?: LibresignSignatureMethod,
* password?: LibresignSignatureMethod,
* emailToken?: LibresignSignatureMethodEmailToken,
* password?: LibresignSignatureMethodPassword,
* }
* @psalm-type LibresignSigner = array{
* description: ?string,
Expand All @@ -143,7 +156,7 @@
* signRequestId: non-negative-int,
* identifyMethods?: LibresignIdentifyMethod[],
* visibleElements?: LibresignVisibleElement[],
* signatureMethods?: LibresignSignatureMethods[],
* signatureMethods?: LibresignSignatureMethods,
* }
* @psalm-type LibresignValidateFile = array{
* uuid: string,
Expand Down
63 changes: 57 additions & 6 deletions openapi-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -612,17 +612,71 @@
}
}
},
"SignatureMethodEmailToken": {
"type": "object",
"required": [
"label",
"identifyMethod",
"needCode",
"hasConfirmCode",
"blurredEmail",
"hashOfEmail"
],
"properties": {
"label": {
"type": "string"
},
"identifyMethod": {
"type": "string",
"enum": [
"email",
"account"
]
},
"needCode": {
"type": "boolean"
},
"hasConfirmCode": {
"type": "boolean"
},
"blurredEmail": {
"type": "string"
},
"hashOfEmail": {
"type": "string"
}
}
},
"SignatureMethodPassword": {
"type": "object",
"required": [
"label",
"name",
"hasSignatureFile"
],
"properties": {
"label": {
"type": "string"
},
"name": {
"type": "string"
},
"hasSignatureFile": {
"type": "boolean"
}
}
},
"SignatureMethods": {
"type": "object",
"properties": {
"clickToSign": {
"$ref": "#/components/schemas/SignatureMethod"
},
"emailToken": {
"$ref": "#/components/schemas/SignatureMethod"
"$ref": "#/components/schemas/SignatureMethodEmailToken"
},
"password": {
"$ref": "#/components/schemas/SignatureMethod"
"$ref": "#/components/schemas/SignatureMethodPassword"
}
}
},
Expand Down Expand Up @@ -685,10 +739,7 @@
}
},
"signatureMethods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SignatureMethods"
}
"$ref": "#/components/schemas/SignatureMethods"
}
}
},
Expand Down
63 changes: 57 additions & 6 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,17 +516,71 @@
}
}
},
"SignatureMethodEmailToken": {
"type": "object",
"required": [
"label",
"identifyMethod",
"needCode",
"hasConfirmCode",
"blurredEmail",
"hashOfEmail"
],
"properties": {
"label": {
"type": "string"
},
"identifyMethod": {
"type": "string",
"enum": [
"email",
"account"
]
},
"needCode": {
"type": "boolean"
},
"hasConfirmCode": {
"type": "boolean"
},
"blurredEmail": {
"type": "string"
},
"hashOfEmail": {
"type": "string"
}
}
},
"SignatureMethodPassword": {
"type": "object",
"required": [
"label",
"name",
"hasSignatureFile"
],
"properties": {
"label": {
"type": "string"
},
"name": {
"type": "string"
},
"hasSignatureFile": {
"type": "boolean"
}
}
},
"SignatureMethods": {
"type": "object",
"properties": {
"clickToSign": {
"$ref": "#/components/schemas/SignatureMethod"
},
"emailToken": {
"$ref": "#/components/schemas/SignatureMethod"
"$ref": "#/components/schemas/SignatureMethodEmailToken"
},
"password": {
"$ref": "#/components/schemas/SignatureMethod"
"$ref": "#/components/schemas/SignatureMethodPassword"
}
}
},
Expand Down Expand Up @@ -589,10 +643,7 @@
}
},
"signatureMethods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SignatureMethods"
}
"$ref": "#/components/schemas/SignatureMethods"
}
}
},
Expand Down
20 changes: 17 additions & 3 deletions src/types/openapi/openapi-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1210,10 +1210,24 @@ export type components = {
label: string;
name: string;
};
SignatureMethodEmailToken: {
label: string;
/** @enum {string} */
identifyMethod: "email" | "account";
needCode: boolean;
hasConfirmCode: boolean;
blurredEmail: string;
hashOfEmail: string;
};
SignatureMethodPassword: {
label: string;
name: string;
hasSignatureFile: boolean;
};
SignatureMethods: {
clickToSign?: components["schemas"]["SignatureMethod"];
emailToken?: components["schemas"]["SignatureMethod"];
password?: components["schemas"]["SignatureMethod"];
emailToken?: components["schemas"]["SignatureMethodEmailToken"];
password?: components["schemas"]["SignatureMethodPassword"];
};
Signer: {
description: string | null;
Expand All @@ -1229,7 +1243,7 @@ export type components = {
signRequestId: number;
identifyMethods?: components["schemas"]["IdentifyMethod"][];
visibleElements?: components["schemas"]["VisibleElement"][];
signatureMethods?: components["schemas"]["SignatureMethods"][];
signatureMethods?: components["schemas"]["SignatureMethods"];
};
UserElement: {
/** Format: int64 */
Expand Down
20 changes: 17 additions & 3 deletions src/types/openapi/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1064,10 +1064,24 @@ export type components = {
label: string;
name: string;
};
SignatureMethodEmailToken: {
label: string;
/** @enum {string} */
identifyMethod: "email" | "account";
needCode: boolean;
hasConfirmCode: boolean;
blurredEmail: string;
hashOfEmail: string;
};
SignatureMethodPassword: {
label: string;
name: string;
hasSignatureFile: boolean;
};
SignatureMethods: {
clickToSign?: components["schemas"]["SignatureMethod"];
emailToken?: components["schemas"]["SignatureMethod"];
password?: components["schemas"]["SignatureMethod"];
emailToken?: components["schemas"]["SignatureMethodEmailToken"];
password?: components["schemas"]["SignatureMethodPassword"];
};
Signer: {
description: string | null;
Expand All @@ -1083,7 +1097,7 @@ export type components = {
signRequestId: number;
identifyMethods?: components["schemas"]["IdentifyMethod"][];
visibleElements?: components["schemas"]["VisibleElement"][];
signatureMethods?: components["schemas"]["SignatureMethods"][];
signatureMethods?: components["schemas"]["SignatureMethods"];
};
UserElement: {
/** Format: int64 */
Expand Down

0 comments on commit 1225ab7

Please sign in to comment.