@verdocs/js-sdk 1.1.11 → 1.1.12

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.
@@ -0,0 +1,14 @@
1
+ export interface IInitials {
2
+ id?: string;
3
+ profile_id: string;
4
+ url: string;
5
+ created_at?: Date;
6
+ updated_at?: Date;
7
+ }
8
+ /**
9
+ * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
10
+ * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to
11
+ * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field
12
+ * to be "stamped" by the user.
13
+ */
14
+ export declare const createInitials: (name: string, initials: string | Blob) => Promise<IInitials>;
@@ -0,0 +1,14 @@
1
+ import { getEndpoint } from '../HTTP/Transport';
2
+ /**
3
+ * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
4
+ * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to
5
+ * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field
6
+ * to be "stamped" by the user.
7
+ */
8
+ export var createInitials = function (name, initials) {
9
+ var data = new FormData();
10
+ data.append('initial', initials, name);
11
+ return getEndpoint()
12
+ .api.post("/initials", data)
13
+ .then(function (r) { return r.data; });
14
+ };
@@ -5,7 +5,13 @@ export interface ISignature {
5
5
  created_at?: Date;
6
6
  updated_at?: Date;
7
7
  }
8
- export declare const createSignature: (params: any) => Promise<ISignature>;
8
+ /**
9
+ * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
10
+ * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to
11
+ * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field
12
+ * to be "stamped" by the user.
13
+ */
14
+ export declare const createSignature: (name: string, signature: string | Blob) => Promise<ISignature>;
9
15
  export declare const getSignatures: () => Promise<ISignature[]>;
10
16
  export declare const getSignature: (signatureId: string) => Promise<any>;
11
17
  export declare const deleteSignature: (signatureId: string) => Promise<any>;
@@ -1,7 +1,15 @@
1
1
  import { getEndpoint } from '../HTTP/Transport';
2
- export var createSignature = function (params) {
2
+ /**
3
+ * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
4
+ * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to
5
+ * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field
6
+ * to be "stamped" by the user.
7
+ */
8
+ export var createSignature = function (name, signature) {
9
+ var data = new FormData();
10
+ data.append('signature', signature, name);
3
11
  return getEndpoint()
4
- .api.post('/signatures', params)
12
+ .api.post("/signatures", data)
5
13
  .then(function (r) { return r.data; });
6
14
  };
7
15
  export var getSignatures = function () {
@@ -2,4 +2,5 @@ export * as Documents from './Documents';
2
2
  export * as Recipients from './Recipients';
3
3
  export * as Stars from './Stars';
4
4
  export * as Signatures from './Signatures';
5
+ export * as Initials from './Initials';
5
6
  export * as Types from './Types';
@@ -2,4 +2,5 @@ export * as Documents from './Documents';
2
2
  export * as Recipients from './Recipients';
3
3
  export * as Stars from './Stars';
4
4
  export * as Signatures from './Signatures';
5
+ export * as Initials from './Initials';
5
6
  export * as Types from './Types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",