-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7dc521c
commit ef27b92
Showing
13 changed files
with
461 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Criipto.Signatures; | ||
using Criipto.Signatures.Models; | ||
|
||
using (var client = new CriiptoSignaturesClient("{YOUR_CRIIPTO_CLIENT_ID}", "{YOUR_CRIIPTO_CLIENT_SECRET}")) { | ||
// Setup document input | ||
var documents = new List<DocumentInput>{ | ||
new DocumentInput { | ||
pdf = new PadesDocumentInput { | ||
title = "PDF Form Sample", | ||
blob = new Byte[64], // Should be the bytes of a PDF file | ||
storageMode = DocumentStorageMode.Temporary, | ||
form = new PadesDocumentFormInput { | ||
enabled = true | ||
} | ||
} | ||
} | ||
}; | ||
|
||
// Setup signature order input | ||
var createSignatureOrderInput = new CreateSignatureOrderInput | ||
{ | ||
title = "PDF Form Sample", | ||
documents = documents, | ||
|
||
}; | ||
|
||
// Create signature order | ||
var signatureOrder = await client.CreateSignatureOrder(createSignatureOrderInput); | ||
} |
24 changes: 24 additions & 0 deletions
24
src/examples/createSignatureOrder/pdfFormFilling.graphql.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import CriiptoSignatures from "@criipto/signatures"; | ||
|
||
const client = new CriiptoSignatures("{YOUR_CRIIPTO_CLIENT_ID}", "{YOUR_CRIIPTO_CLIENT_SECRET}"); | ||
|
||
const signatureOrder = await client.createSignatureOrder({ | ||
title: "PDF Form Sample", | ||
documents: [ | ||
{ | ||
pdf: { | ||
title: "PDF Form Sample", | ||
blob: Buffer.from("..."), // Should be the buffer of a PDF file with form fields | ||
storageMode: 'Temporary', | ||
form: { | ||
enabled: true | ||
} | ||
} | ||
} | ||
], | ||
}); | ||
|
||
console.log(signatureOrder.id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import csharp from '!!raw-loader!./pdfFormFilling.cs'; | ||
import nodejs from '!!raw-loader!./pdfFormFilling.node.ts'; | ||
import { Example } from '../misc'; | ||
import { query, variables } from './pdfFormFilling.graphql'; | ||
|
||
const example : Example[] = [ | ||
{ | ||
query, | ||
variables | ||
}, | ||
{ | ||
csharp | ||
}, | ||
{ | ||
nodejs | ||
} | ||
]; | ||
|
||
export default example; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.