instasign 1.0.0 → 1.0.3

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.0.1] - 2026-02-27
6
+
7
+ ### Fixed
8
+ - **Type Emission**: Renamed `schema.d.ts` to `schema.ts` to ensure TypeScript correctly emits the declaration file to the `dist` folder. This fixes the issue where types were missing in the published package.
9
+ - **Entry Point Exports**: Explicitly exported `schema` types from the main entry point for better consumer accessibility.
10
+
11
+
12
+ ### Changed
13
+ - **Branding**: Renamed the package from `instasign-api-sdk` to `instasign`.
14
+ - **Documentation**: Significant updates to `README.md` including a critical security warning about frontend usage and improved service descriptions.
15
+ - **Type Visibility**: All internal parameter and response types for resources (Envelopes, SignRequests, Webhooks) are now explicitly exported to fix "any" return types in consumer applications.
16
+ - **Metadata**: Improved `package.json` keywords and descriptions for better discoverability.
17
+
5
18
  ## [1.0.0] - 2026-02-27
6
19
 
7
20
  ### Added
package/dist/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import { Envelopes } from './resources/Envelopes.js';
2
2
  import { SignRequests } from './resources/SignRequests.js';
3
3
  import { Webhooks } from './resources/Webhooks.js';
4
+ export * from './resources/Envelopes.js';
5
+ export * from './resources/SignRequests.js';
6
+ export * from './resources/Webhooks.js';
7
+ export type * from './schema.js';
4
8
  export interface IInstasignConfig {
5
9
  apiKey: string;
6
10
  appId?: string;
package/dist/index.js CHANGED
@@ -2,6 +2,9 @@ import axios from 'axios';
2
2
  import { Envelopes } from './resources/Envelopes.js';
3
3
  import { SignRequests } from './resources/SignRequests.js';
4
4
  import { Webhooks } from './resources/Webhooks.js';
5
+ export * from './resources/Envelopes.js';
6
+ export * from './resources/SignRequests.js';
7
+ export * from './resources/Webhooks.js';
5
8
  export class Instasign {
6
9
  client;
7
10
  envelopes;
@@ -1,20 +1,48 @@
1
1
  import { AxiosInstance } from 'axios';
2
- import { paths } from '../schema.js';
3
- type CreateEnvelopeParams = NonNullable<paths["/functions/createEnvelope"]["post"]["requestBody"]>["content"]["application/json"];
4
- type CreateEnvelopeResponse = NonNullable<NonNullable<paths["/functions/createEnvelope"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
5
- type GetEnvelopesParams = NonNullable<paths["/functions/getEnvelopes"]["post"]["requestBody"]>["content"]["application/json"];
6
- type GetEnvelopesResponse = NonNullable<NonNullable<paths["/functions/getEnvelopes"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
7
- type GetEnvelopeResponse = NonNullable<NonNullable<paths["/functions/getEnvelope"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
8
- type CompleteEnvelopeResponse = NonNullable<NonNullable<paths["/functions/completeEnvelope"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
9
- type DeleteEnvelopeResponse = NonNullable<NonNullable<paths["/functions/deleteEnvelope"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
10
- type UpdateEnvelopeMetadataParams = NonNullable<paths["/functions/updateEnvelopeMetadata"]["post"]["requestBody"]>["content"]["application/json"];
11
- type UpdateEnvelopeMetadataResponse = NonNullable<NonNullable<paths["/functions/updateEnvelopeMetadata"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
12
- type RemoveSignRequestFromEnvelopeParams = NonNullable<paths["/functions/removeSignRequestFromEnvelope"]["post"]["requestBody"]>["content"]["application/json"];
13
- type RemoveSignRequestFromEnvelopeResponse = NonNullable<NonNullable<paths["/functions/removeSignRequestFromEnvelope"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
14
- type AddSignRequestToEnvelopeParams = NonNullable<paths["/functions/addSignRequestToEnvelope"]["post"]["requestBody"]>["content"]["application/json"];
15
- type AddSignRequestToEnvelopeResponse = NonNullable<NonNullable<paths["/functions/addSignRequestToEnvelope"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
16
- type AddSignRequestsToEnvelopeParams = AddSignRequestToEnvelopeParams[];
17
- type AddSignRequestsToEnvelopeResponse = AddSignRequestToEnvelopeResponse[];
2
+ import type { paths } from '../schema.js';
3
+ type _CreateEnvelopeParams = NonNullable<paths["/functions/createEnvelope"]["post"]["requestBody"]>["content"]["application/json"];
4
+ export interface CreateEnvelopeParams extends _CreateEnvelopeParams {
5
+ }
6
+ type _CreateEnvelopeResponse = NonNullable<NonNullable<paths["/functions/createEnvelope"]["post"]["responses"][200]["content"]>["application/json"]["result"]>;
7
+ export interface CreateEnvelopeResponse extends _CreateEnvelopeResponse {
8
+ }
9
+ type _GetEnvelopesParams = NonNullable<paths["/functions/getEnvelopes"]["post"]["requestBody"]>["content"]["application/json"];
10
+ export interface GetEnvelopesParams extends _GetEnvelopesParams {
11
+ }
12
+ type _GetEnvelopesResponse = NonNullable<paths["/functions/getEnvelopes"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
13
+ export interface GetEnvelopesResponse extends _GetEnvelopesResponse {
14
+ }
15
+ type _GetEnvelopeResponse = NonNullable<paths["/functions/getEnvelope"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
16
+ export interface GetEnvelopeResponse extends _GetEnvelopeResponse {
17
+ }
18
+ type _CompleteEnvelopeResponse = NonNullable<paths["/functions/completeEnvelope"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
19
+ export interface CompleteEnvelopeResponse extends _CompleteEnvelopeResponse {
20
+ }
21
+ type _DeleteEnvelopeResponse = NonNullable<paths["/functions/deleteEnvelope"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
22
+ export interface DeleteEnvelopeResponse extends _DeleteEnvelopeResponse {
23
+ }
24
+ type _UpdateEnvelopeMetadataParams = NonNullable<paths["/functions/updateEnvelopeMetadata"]["post"]["requestBody"]>["content"]["application/json"];
25
+ export interface UpdateEnvelopeMetadataParams extends _UpdateEnvelopeMetadataParams {
26
+ }
27
+ type _UpdateEnvelopeMetadataResponse = NonNullable<paths["/functions/updateEnvelopeMetadata"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
28
+ export interface UpdateEnvelopeMetadataResponse extends _UpdateEnvelopeMetadataResponse {
29
+ }
30
+ type _RemoveSignRequestFromEnvelopeParams = NonNullable<paths["/functions/removeSignRequestFromEnvelope"]["post"]["requestBody"]>["content"]["application/json"];
31
+ export interface RemoveSignRequestFromEnvelopeParams extends _RemoveSignRequestFromEnvelopeParams {
32
+ }
33
+ type _RemoveSignRequestFromEnvelopeResponse = NonNullable<paths["/functions/removeSignRequestFromEnvelope"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
34
+ export interface RemoveSignRequestFromEnvelopeResponse extends _RemoveSignRequestFromEnvelopeResponse {
35
+ }
36
+ type _AddSignRequestToEnvelopeParams = NonNullable<paths["/functions/addSignRequestToEnvelope"]["post"]["requestBody"]>["content"]["application/json"];
37
+ export interface AddSignRequestToEnvelopeParams extends _AddSignRequestToEnvelopeParams {
38
+ }
39
+ type _AddSignRequestToEnvelopeResponse = NonNullable<paths["/functions/addSignRequestToEnvelope"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
40
+ export interface AddSignRequestToEnvelopeResponse extends _AddSignRequestToEnvelopeResponse {
41
+ }
42
+ export interface AddSignRequestsToEnvelopeParams extends Array<AddSignRequestToEnvelopeParams> {
43
+ }
44
+ export interface AddSignRequestsToEnvelopeResponse extends Array<AddSignRequestToEnvelopeResponse> {
45
+ }
18
46
  export declare class Envelopes {
19
47
  private client;
20
48
  constructor(client: AxiosInstance);
@@ -1,10 +1,20 @@
1
1
  import { AxiosInstance } from 'axios';
2
- import { paths } from '../schema.js';
3
- type CreateSignRequestParams = NonNullable<paths["/functions/createSignRequest"]["post"]["requestBody"]>["content"]["application/json"];
4
- type CreateSignRequestResponse = NonNullable<NonNullable<paths["/functions/createSignRequest"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
5
- type CompleteSignRequestParams = NonNullable<paths["/functions/completeSignRequest"]["post"]["requestBody"]>["content"]["application/json"];
6
- type CompleteSignRequestResponse = NonNullable<NonNullable<paths["/functions/completeSignRequest"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
7
- type GetFileFromRequestIdResponse = NonNullable<NonNullable<paths["/functions/getFileFromRequestId"]["post"]["responses"]>["200"]["content"]>["application/json"]["result"];
2
+ import type { paths } from '../schema.js';
3
+ type _CreateSignRequestParams = NonNullable<paths["/functions/createSignRequest"]["post"]["requestBody"]>["content"]["application/json"];
4
+ export interface CreateSignRequestParams extends _CreateSignRequestParams {
5
+ }
6
+ type _CreateSignRequestResponse = NonNullable<paths["/functions/createSignRequest"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
7
+ export interface CreateSignRequestResponse extends _CreateSignRequestResponse {
8
+ }
9
+ type _CompleteSignRequestParams = NonNullable<paths["/functions/completeSignRequest"]["post"]["requestBody"]>["content"]["application/json"];
10
+ export interface CompleteSignRequestParams extends _CompleteSignRequestParams {
11
+ }
12
+ type _CompleteSignRequestResponse = NonNullable<paths["/functions/completeSignRequest"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
13
+ export interface CompleteSignRequestResponse extends _CompleteSignRequestResponse {
14
+ }
15
+ type _GetFileFromRequestIdResponse = NonNullable<paths["/functions/getFileFromRequestId"]["post"]["responses"][200]["content"]["application/json"]["result"]>;
16
+ export interface GetFileFromRequestIdResponse extends _GetFileFromRequestIdResponse {
17
+ }
8
18
  export declare class SignRequests {
9
19
  private client;
10
20
  constructor(client: AxiosInstance);
@@ -1,8 +1,9 @@
1
+ export type WebhookEvent = any;
1
2
  export declare class Webhooks {
2
3
  private tolerance;
3
4
  constructor(tolerance?: number);
4
5
  /**
5
6
  * Verify and parse a webhook event
6
7
  */
7
- constructEvent(payload: string, signatureHeader: string, webhookSecret: string): any;
8
+ constructEvent(payload: string, signatureHeader: string, webhookSecret: string): WebhookEvent;
8
9
  }
@@ -0,0 +1,1187 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/functions/addSignRequestToEnvelope": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ get?: never;
14
+ put?: never;
15
+ /** Cloud Function: addSignRequestToEnvelope */
16
+ post: {
17
+ parameters: {
18
+ query?: never;
19
+ header?: never;
20
+ path?: never;
21
+ cookie?: never;
22
+ };
23
+ requestBody?: {
24
+ content: {
25
+ "application/json": {
26
+ /** @description The unique identifier of the envelope */
27
+ envelopeId: string;
28
+ /** @description The name of the file to be signed */
29
+ filename: string;
30
+ /** @description The base64 encoded content of the file */
31
+ base64File?: string;
32
+ /** @description Remote URL of the file. MUST be publicly accessible. */
33
+ fileUrl?: string;
34
+ /** @description Associated metadata for the sign request */
35
+ metadata?: {
36
+ [key: string]: unknown;
37
+ };
38
+ };
39
+ };
40
+ };
41
+ responses: {
42
+ /** @description Successful response */
43
+ 200: {
44
+ headers: {
45
+ [name: string]: unknown;
46
+ };
47
+ content: {
48
+ "application/json": {
49
+ result?: {
50
+ requestId?: string;
51
+ signUrl?: string;
52
+ envelopeSignUrl?: string;
53
+ };
54
+ };
55
+ };
56
+ };
57
+ };
58
+ };
59
+ delete?: never;
60
+ options?: never;
61
+ head?: never;
62
+ patch?: never;
63
+ trace?: never;
64
+ };
65
+ "/functions/completeEnvelope": {
66
+ parameters: {
67
+ query?: never;
68
+ header?: never;
69
+ path?: never;
70
+ cookie?: never;
71
+ };
72
+ get?: never;
73
+ put?: never;
74
+ /** Cloud Function: completeEnvelope */
75
+ post: {
76
+ parameters: {
77
+ query?: never;
78
+ header?: never;
79
+ path?: never;
80
+ cookie?: never;
81
+ };
82
+ requestBody?: {
83
+ content: {
84
+ "application/json": {
85
+ /** @description The unique identifier of the envelope to mark as completed */
86
+ envelopeId: string;
87
+ };
88
+ };
89
+ };
90
+ responses: {
91
+ /** @description Successful response */
92
+ 200: {
93
+ headers: {
94
+ [name: string]: unknown;
95
+ };
96
+ content: {
97
+ "application/json": {
98
+ result?: {
99
+ success?: boolean;
100
+ message?: string;
101
+ };
102
+ };
103
+ };
104
+ };
105
+ };
106
+ };
107
+ delete?: never;
108
+ options?: never;
109
+ head?: never;
110
+ patch?: never;
111
+ trace?: never;
112
+ };
113
+ "/functions/createEnvelope": {
114
+ parameters: {
115
+ query?: never;
116
+ header?: never;
117
+ path?: never;
118
+ cookie?: never;
119
+ };
120
+ get?: never;
121
+ put?: never;
122
+ /** Cloud Function: createEnvelope */
123
+ post: {
124
+ parameters: {
125
+ query?: never;
126
+ header?: never;
127
+ path?: never;
128
+ cookie?: never;
129
+ };
130
+ requestBody?: {
131
+ content: {
132
+ "application/json": {
133
+ /** @description The name of the envelope */
134
+ name: string;
135
+ /** @description The description of the envelope */
136
+ description?: string;
137
+ /** @description Associated metadata for the envelope */
138
+ metadata?: {
139
+ [key: string]: unknown;
140
+ };
141
+ /**
142
+ * Format: date-time
143
+ * @description The expiration date of the envelope
144
+ */
145
+ expirationDate?: string;
146
+ /** @description External reference ID for the client */
147
+ clientReferenceId?: string;
148
+ };
149
+ };
150
+ };
151
+ responses: {
152
+ /** @description Successful response */
153
+ 200: {
154
+ headers: {
155
+ [name: string]: unknown;
156
+ };
157
+ content: {
158
+ "application/json": {
159
+ result?: {
160
+ envelopeId?: string;
161
+ };
162
+ };
163
+ };
164
+ };
165
+ };
166
+ };
167
+ delete?: never;
168
+ options?: never;
169
+ head?: never;
170
+ patch?: never;
171
+ trace?: never;
172
+ };
173
+ "/functions/deleteEnvelope": {
174
+ parameters: {
175
+ query?: never;
176
+ header?: never;
177
+ path?: never;
178
+ cookie?: never;
179
+ };
180
+ get?: never;
181
+ put?: never;
182
+ /** Cloud Function: deleteEnvelope */
183
+ post: {
184
+ parameters: {
185
+ query?: never;
186
+ header?: never;
187
+ path?: never;
188
+ cookie?: never;
189
+ };
190
+ requestBody?: {
191
+ content: {
192
+ "application/json": {
193
+ /** @description The unique identifier of the envelope to delete */
194
+ envelopeId: string;
195
+ };
196
+ };
197
+ };
198
+ responses: {
199
+ /** @description Successful response */
200
+ 200: {
201
+ headers: {
202
+ [name: string]: unknown;
203
+ };
204
+ content: {
205
+ "application/json": {
206
+ result?: {
207
+ success?: boolean;
208
+ };
209
+ };
210
+ };
211
+ };
212
+ };
213
+ };
214
+ delete?: never;
215
+ options?: never;
216
+ head?: never;
217
+ patch?: never;
218
+ trace?: never;
219
+ };
220
+ "/functions/getEnvelope": {
221
+ parameters: {
222
+ query?: never;
223
+ header?: never;
224
+ path?: never;
225
+ cookie?: never;
226
+ };
227
+ get?: never;
228
+ put?: never;
229
+ /** Cloud Function: getEnvelope */
230
+ post: {
231
+ parameters: {
232
+ query?: never;
233
+ header?: never;
234
+ path?: never;
235
+ cookie?: never;
236
+ };
237
+ requestBody?: {
238
+ content: {
239
+ "application/json": {
240
+ /** @description The unique identifier of the envelope */
241
+ envelopeId: string;
242
+ };
243
+ };
244
+ };
245
+ responses: {
246
+ /** @description Successful response */
247
+ 200: {
248
+ headers: {
249
+ [name: string]: unknown;
250
+ };
251
+ content: {
252
+ "application/json": {
253
+ result?: {
254
+ signUrl?: string;
255
+ envelopeId?: string;
256
+ name?: string;
257
+ description?: string;
258
+ status?: {
259
+ [key: string]: unknown;
260
+ };
261
+ clientReferenceId?: string;
262
+ signRequests?: {
263
+ requestId?: string;
264
+ status?: {
265
+ [key: string]: unknown;
266
+ };
267
+ fileName?: string;
268
+ fileUrl?: string;
269
+ signedFileUrl?: string;
270
+ metadata?: {
271
+ [key: string]: unknown;
272
+ };
273
+ clientReferenceId?: string;
274
+ }[];
275
+ };
276
+ };
277
+ };
278
+ };
279
+ };
280
+ };
281
+ delete?: never;
282
+ options?: never;
283
+ head?: never;
284
+ patch?: never;
285
+ trace?: never;
286
+ };
287
+ "/functions/getEnvelopes": {
288
+ parameters: {
289
+ query?: never;
290
+ header?: never;
291
+ path?: never;
292
+ cookie?: never;
293
+ };
294
+ get?: never;
295
+ put?: never;
296
+ /** Cloud Function: getEnvelopes */
297
+ post: {
298
+ parameters: {
299
+ query?: never;
300
+ header?: never;
301
+ path?: never;
302
+ cookie?: never;
303
+ };
304
+ requestBody?: {
305
+ content: {
306
+ "application/json": {
307
+ /** @description Filter by envelope name (case-insensitive regex) */
308
+ name?: string;
309
+ /** @description Filter by envelope status */
310
+ status?: string;
311
+ /** @description Filter by client reference ID */
312
+ clientReferenceId?: string;
313
+ /** @description Filter by a list of sign request IDs */
314
+ signRequests?: {
315
+ [key: string]: unknown;
316
+ }[];
317
+ /** @description Field to order by (createdAt or updatedAt) */
318
+ orderBy?: string;
319
+ /** @description Order direction (asc or desc) */
320
+ orderDirection?: string;
321
+ /** @description Filter by expiration date greater than or equal to */
322
+ expirationDateStart?: string;
323
+ /** @description Filter by expiration date less than or equal to */
324
+ expirationDateEnd?: string;
325
+ /** @description Number of items to skip for pagination */
326
+ skip?: number;
327
+ /** @description Maximum number of items to return */
328
+ limit?: number;
329
+ };
330
+ };
331
+ };
332
+ responses: {
333
+ /** @description Successful response */
334
+ 200: {
335
+ headers: {
336
+ [name: string]: unknown;
337
+ };
338
+ content: {
339
+ "application/json": {
340
+ result?: {
341
+ signUrl?: string;
342
+ envelopeId?: string;
343
+ name?: string;
344
+ description?: string;
345
+ status?: {
346
+ [key: string]: unknown;
347
+ };
348
+ clientReferenceId?: string;
349
+ signRequests?: {
350
+ requestId?: {
351
+ [key: string]: unknown;
352
+ };
353
+ status?: {
354
+ [key: string]: unknown;
355
+ };
356
+ fileName?: {
357
+ [key: string]: unknown;
358
+ };
359
+ fileUrl?: {
360
+ [key: string]: unknown;
361
+ };
362
+ signedFileUrl?: {
363
+ [key: string]: unknown;
364
+ };
365
+ metadata?: {
366
+ [key: string]: unknown;
367
+ };
368
+ clientReferenceId?: {
369
+ [key: string]: unknown;
370
+ };
371
+ }[];
372
+ createdAt?: {
373
+ toDateString?: {
374
+ [key: string]: unknown;
375
+ };
376
+ toTimeString?: {
377
+ [key: string]: unknown;
378
+ };
379
+ toLocaleDateString?: {
380
+ [key: string]: unknown;
381
+ };
382
+ toLocaleTimeString?: {
383
+ [key: string]: unknown;
384
+ };
385
+ getTime?: {
386
+ [key: string]: unknown;
387
+ };
388
+ getFullYear?: {
389
+ [key: string]: unknown;
390
+ };
391
+ getUTCFullYear?: {
392
+ [key: string]: unknown;
393
+ };
394
+ getMonth?: {
395
+ [key: string]: unknown;
396
+ };
397
+ getUTCMonth?: {
398
+ [key: string]: unknown;
399
+ };
400
+ getDate?: {
401
+ [key: string]: unknown;
402
+ };
403
+ getUTCDate?: {
404
+ [key: string]: unknown;
405
+ };
406
+ getDay?: {
407
+ [key: string]: unknown;
408
+ };
409
+ getUTCDay?: {
410
+ [key: string]: unknown;
411
+ };
412
+ getHours?: {
413
+ [key: string]: unknown;
414
+ };
415
+ getUTCHours?: {
416
+ [key: string]: unknown;
417
+ };
418
+ getMinutes?: {
419
+ [key: string]: unknown;
420
+ };
421
+ getUTCMinutes?: {
422
+ [key: string]: unknown;
423
+ };
424
+ getSeconds?: {
425
+ [key: string]: unknown;
426
+ };
427
+ getUTCSeconds?: {
428
+ [key: string]: unknown;
429
+ };
430
+ getMilliseconds?: {
431
+ [key: string]: unknown;
432
+ };
433
+ getUTCMilliseconds?: {
434
+ [key: string]: unknown;
435
+ };
436
+ getTimezoneOffset?: {
437
+ [key: string]: unknown;
438
+ };
439
+ setTime?: {
440
+ [key: string]: unknown;
441
+ };
442
+ setMilliseconds?: {
443
+ [key: string]: unknown;
444
+ };
445
+ setUTCMilliseconds?: {
446
+ [key: string]: unknown;
447
+ };
448
+ setSeconds?: {
449
+ [key: string]: unknown;
450
+ };
451
+ setUTCSeconds?: {
452
+ [key: string]: unknown;
453
+ };
454
+ setMinutes?: {
455
+ [key: string]: unknown;
456
+ };
457
+ setUTCMinutes?: {
458
+ [key: string]: unknown;
459
+ };
460
+ setHours?: {
461
+ [key: string]: unknown;
462
+ };
463
+ setUTCHours?: {
464
+ [key: string]: unknown;
465
+ };
466
+ setDate?: {
467
+ [key: string]: unknown;
468
+ };
469
+ setUTCDate?: {
470
+ [key: string]: unknown;
471
+ };
472
+ setMonth?: {
473
+ [key: string]: unknown;
474
+ };
475
+ setUTCMonth?: {
476
+ [key: string]: unknown;
477
+ };
478
+ setFullYear?: {
479
+ [key: string]: unknown;
480
+ };
481
+ setUTCFullYear?: {
482
+ [key: string]: unknown;
483
+ };
484
+ toUTCString?: {
485
+ [key: string]: unknown;
486
+ };
487
+ toISOString?: {
488
+ [key: string]: unknown;
489
+ };
490
+ toJSON?: {
491
+ [key: string]: unknown;
492
+ };
493
+ getVarDate?: {
494
+ [key: string]: unknown;
495
+ };
496
+ };
497
+ updatedAt?: {
498
+ toDateString?: {
499
+ [key: string]: unknown;
500
+ };
501
+ toTimeString?: {
502
+ [key: string]: unknown;
503
+ };
504
+ toLocaleDateString?: {
505
+ [key: string]: unknown;
506
+ };
507
+ toLocaleTimeString?: {
508
+ [key: string]: unknown;
509
+ };
510
+ getTime?: {
511
+ [key: string]: unknown;
512
+ };
513
+ getFullYear?: {
514
+ [key: string]: unknown;
515
+ };
516
+ getUTCFullYear?: {
517
+ [key: string]: unknown;
518
+ };
519
+ getMonth?: {
520
+ [key: string]: unknown;
521
+ };
522
+ getUTCMonth?: {
523
+ [key: string]: unknown;
524
+ };
525
+ getDate?: {
526
+ [key: string]: unknown;
527
+ };
528
+ getUTCDate?: {
529
+ [key: string]: unknown;
530
+ };
531
+ getDay?: {
532
+ [key: string]: unknown;
533
+ };
534
+ getUTCDay?: {
535
+ [key: string]: unknown;
536
+ };
537
+ getHours?: {
538
+ [key: string]: unknown;
539
+ };
540
+ getUTCHours?: {
541
+ [key: string]: unknown;
542
+ };
543
+ getMinutes?: {
544
+ [key: string]: unknown;
545
+ };
546
+ getUTCMinutes?: {
547
+ [key: string]: unknown;
548
+ };
549
+ getSeconds?: {
550
+ [key: string]: unknown;
551
+ };
552
+ getUTCSeconds?: {
553
+ [key: string]: unknown;
554
+ };
555
+ getMilliseconds?: {
556
+ [key: string]: unknown;
557
+ };
558
+ getUTCMilliseconds?: {
559
+ [key: string]: unknown;
560
+ };
561
+ getTimezoneOffset?: {
562
+ [key: string]: unknown;
563
+ };
564
+ setTime?: {
565
+ [key: string]: unknown;
566
+ };
567
+ setMilliseconds?: {
568
+ [key: string]: unknown;
569
+ };
570
+ setUTCMilliseconds?: {
571
+ [key: string]: unknown;
572
+ };
573
+ setSeconds?: {
574
+ [key: string]: unknown;
575
+ };
576
+ setUTCSeconds?: {
577
+ [key: string]: unknown;
578
+ };
579
+ setMinutes?: {
580
+ [key: string]: unknown;
581
+ };
582
+ setUTCMinutes?: {
583
+ [key: string]: unknown;
584
+ };
585
+ setHours?: {
586
+ [key: string]: unknown;
587
+ };
588
+ setUTCHours?: {
589
+ [key: string]: unknown;
590
+ };
591
+ setDate?: {
592
+ [key: string]: unknown;
593
+ };
594
+ setUTCDate?: {
595
+ [key: string]: unknown;
596
+ };
597
+ setMonth?: {
598
+ [key: string]: unknown;
599
+ };
600
+ setUTCMonth?: {
601
+ [key: string]: unknown;
602
+ };
603
+ setFullYear?: {
604
+ [key: string]: unknown;
605
+ };
606
+ setUTCFullYear?: {
607
+ [key: string]: unknown;
608
+ };
609
+ toUTCString?: {
610
+ [key: string]: unknown;
611
+ };
612
+ toISOString?: {
613
+ [key: string]: unknown;
614
+ };
615
+ toJSON?: {
616
+ [key: string]: unknown;
617
+ };
618
+ getVarDate?: {
619
+ [key: string]: unknown;
620
+ };
621
+ };
622
+ expirationDate?: {
623
+ toDateString?: {
624
+ [key: string]: unknown;
625
+ };
626
+ toTimeString?: {
627
+ [key: string]: unknown;
628
+ };
629
+ toLocaleDateString?: {
630
+ [key: string]: unknown;
631
+ };
632
+ toLocaleTimeString?: {
633
+ [key: string]: unknown;
634
+ };
635
+ getTime?: {
636
+ [key: string]: unknown;
637
+ };
638
+ getFullYear?: {
639
+ [key: string]: unknown;
640
+ };
641
+ getUTCFullYear?: {
642
+ [key: string]: unknown;
643
+ };
644
+ getMonth?: {
645
+ [key: string]: unknown;
646
+ };
647
+ getUTCMonth?: {
648
+ [key: string]: unknown;
649
+ };
650
+ getDate?: {
651
+ [key: string]: unknown;
652
+ };
653
+ getUTCDate?: {
654
+ [key: string]: unknown;
655
+ };
656
+ getDay?: {
657
+ [key: string]: unknown;
658
+ };
659
+ getUTCDay?: {
660
+ [key: string]: unknown;
661
+ };
662
+ getHours?: {
663
+ [key: string]: unknown;
664
+ };
665
+ getUTCHours?: {
666
+ [key: string]: unknown;
667
+ };
668
+ getMinutes?: {
669
+ [key: string]: unknown;
670
+ };
671
+ getUTCMinutes?: {
672
+ [key: string]: unknown;
673
+ };
674
+ getSeconds?: {
675
+ [key: string]: unknown;
676
+ };
677
+ getUTCSeconds?: {
678
+ [key: string]: unknown;
679
+ };
680
+ getMilliseconds?: {
681
+ [key: string]: unknown;
682
+ };
683
+ getUTCMilliseconds?: {
684
+ [key: string]: unknown;
685
+ };
686
+ getTimezoneOffset?: {
687
+ [key: string]: unknown;
688
+ };
689
+ setTime?: {
690
+ [key: string]: unknown;
691
+ };
692
+ setMilliseconds?: {
693
+ [key: string]: unknown;
694
+ };
695
+ setUTCMilliseconds?: {
696
+ [key: string]: unknown;
697
+ };
698
+ setSeconds?: {
699
+ [key: string]: unknown;
700
+ };
701
+ setUTCSeconds?: {
702
+ [key: string]: unknown;
703
+ };
704
+ setMinutes?: {
705
+ [key: string]: unknown;
706
+ };
707
+ setUTCMinutes?: {
708
+ [key: string]: unknown;
709
+ };
710
+ setHours?: {
711
+ [key: string]: unknown;
712
+ };
713
+ setUTCHours?: {
714
+ [key: string]: unknown;
715
+ };
716
+ setDate?: {
717
+ [key: string]: unknown;
718
+ };
719
+ setUTCDate?: {
720
+ [key: string]: unknown;
721
+ };
722
+ setMonth?: {
723
+ [key: string]: unknown;
724
+ };
725
+ setUTCMonth?: {
726
+ [key: string]: unknown;
727
+ };
728
+ setFullYear?: {
729
+ [key: string]: unknown;
730
+ };
731
+ setUTCFullYear?: {
732
+ [key: string]: unknown;
733
+ };
734
+ toUTCString?: {
735
+ [key: string]: unknown;
736
+ };
737
+ toISOString?: {
738
+ [key: string]: unknown;
739
+ };
740
+ toJSON?: {
741
+ [key: string]: unknown;
742
+ };
743
+ getVarDate?: {
744
+ [key: string]: unknown;
745
+ };
746
+ };
747
+ }[];
748
+ };
749
+ };
750
+ };
751
+ };
752
+ };
753
+ delete?: never;
754
+ options?: never;
755
+ head?: never;
756
+ patch?: never;
757
+ trace?: never;
758
+ };
759
+ "/functions/removeSignRequestFromEnvelope": {
760
+ parameters: {
761
+ query?: never;
762
+ header?: never;
763
+ path?: never;
764
+ cookie?: never;
765
+ };
766
+ get?: never;
767
+ put?: never;
768
+ /** Cloud Function: removeSignRequestFromEnvelope */
769
+ post: {
770
+ parameters: {
771
+ query?: never;
772
+ header?: never;
773
+ path?: never;
774
+ cookie?: never;
775
+ };
776
+ requestBody?: {
777
+ content: {
778
+ "application/json": {
779
+ /** @description The unique identifier of the envelope */
780
+ envelopeId: string;
781
+ /** @description The unique identifier of the sign request */
782
+ requestId: string;
783
+ };
784
+ };
785
+ };
786
+ responses: {
787
+ /** @description Successful response */
788
+ 200: {
789
+ headers: {
790
+ [name: string]: unknown;
791
+ };
792
+ content: {
793
+ "application/json": {
794
+ result?: {
795
+ success?: boolean;
796
+ message?: string;
797
+ };
798
+ };
799
+ };
800
+ };
801
+ };
802
+ };
803
+ delete?: never;
804
+ options?: never;
805
+ head?: never;
806
+ patch?: never;
807
+ trace?: never;
808
+ };
809
+ "/functions/updateEnvelopeMetadata": {
810
+ parameters: {
811
+ query?: never;
812
+ header?: never;
813
+ path?: never;
814
+ cookie?: never;
815
+ };
816
+ get?: never;
817
+ put?: never;
818
+ /** Cloud Function: updateEnvelopeMetadata */
819
+ post: {
820
+ parameters: {
821
+ query?: never;
822
+ header?: never;
823
+ path?: never;
824
+ cookie?: never;
825
+ };
826
+ requestBody?: {
827
+ content: {
828
+ "application/json": {
829
+ /** @description The unique identifier of the envelope */
830
+ envelopeId: string;
831
+ /** @description The metadata to be merged into the existing envelope metadata */
832
+ metadata: {
833
+ [key: string]: unknown;
834
+ };
835
+ };
836
+ };
837
+ };
838
+ responses: {
839
+ /** @description Successful response */
840
+ 200: {
841
+ headers: {
842
+ [name: string]: unknown;
843
+ };
844
+ content: {
845
+ "application/json": {
846
+ result?: {
847
+ envelopeId?: string;
848
+ metadata?: {
849
+ [key: string]: unknown;
850
+ };
851
+ };
852
+ };
853
+ };
854
+ };
855
+ };
856
+ };
857
+ delete?: never;
858
+ options?: never;
859
+ head?: never;
860
+ patch?: never;
861
+ trace?: never;
862
+ };
863
+ "/functions/completeSignRequest": {
864
+ parameters: {
865
+ query?: never;
866
+ header?: never;
867
+ path?: never;
868
+ cookie?: never;
869
+ };
870
+ get?: never;
871
+ put?: never;
872
+ /** Cloud Function: completeSignRequest */
873
+ post: {
874
+ parameters: {
875
+ query?: never;
876
+ header?: never;
877
+ path?: never;
878
+ cookie?: never;
879
+ };
880
+ requestBody?: {
881
+ content: {
882
+ "application/json": {
883
+ /** @description The unique identifier of the sign request to complete */
884
+ requestId: string;
885
+ /** @description The base64 encoded content of the signed file */
886
+ signedFileDataBase64: string;
887
+ };
888
+ };
889
+ };
890
+ responses: {
891
+ /** @description Successful response */
892
+ 200: {
893
+ headers: {
894
+ [name: string]: unknown;
895
+ };
896
+ content: {
897
+ "application/json": {
898
+ result?: {
899
+ signedFileUrl?: string;
900
+ };
901
+ };
902
+ };
903
+ };
904
+ };
905
+ };
906
+ delete?: never;
907
+ options?: never;
908
+ head?: never;
909
+ patch?: never;
910
+ trace?: never;
911
+ };
912
+ "/functions/createSignRequest": {
913
+ parameters: {
914
+ query?: never;
915
+ header?: never;
916
+ path?: never;
917
+ cookie?: never;
918
+ };
919
+ get?: never;
920
+ put?: never;
921
+ /** Cloud Function: createSignRequest */
922
+ post: {
923
+ parameters: {
924
+ query?: never;
925
+ header?: never;
926
+ path?: never;
927
+ cookie?: never;
928
+ };
929
+ requestBody?: {
930
+ content: {
931
+ "application/json": {
932
+ /** @description The name of the file to be signed */
933
+ filename: string;
934
+ /** @description The base64 encoded content of the file */
935
+ base64File?: string;
936
+ /** @description Remote URL of the file. MUST be publicly accessible. */
937
+ fileUrl?: string;
938
+ /** @description Associated metadata for the sign request */
939
+ metadata?: {
940
+ [key: string]: unknown;
941
+ };
942
+ };
943
+ };
944
+ };
945
+ responses: {
946
+ /** @description Successful response */
947
+ 200: {
948
+ headers: {
949
+ [name: string]: unknown;
950
+ };
951
+ content: {
952
+ "application/json": {
953
+ result?: {
954
+ requestId?: string;
955
+ signUrl?: string;
956
+ };
957
+ };
958
+ };
959
+ };
960
+ };
961
+ };
962
+ delete?: never;
963
+ options?: never;
964
+ head?: never;
965
+ patch?: never;
966
+ trace?: never;
967
+ };
968
+ "/functions/getFileFromRequestId": {
969
+ parameters: {
970
+ query?: never;
971
+ header?: never;
972
+ path?: never;
973
+ cookie?: never;
974
+ };
975
+ get?: never;
976
+ put?: never;
977
+ /** Cloud Function: getFileFromRequestId */
978
+ post: {
979
+ parameters: {
980
+ query?: never;
981
+ header?: never;
982
+ path?: never;
983
+ cookie?: never;
984
+ };
985
+ requestBody?: {
986
+ content: {
987
+ "application/json": {
988
+ /** @description The unique identifier of the sign request */
989
+ requestId: string;
990
+ };
991
+ };
992
+ };
993
+ responses: {
994
+ /** @description Successful response */
995
+ 200: {
996
+ headers: {
997
+ [name: string]: unknown;
998
+ };
999
+ content: {
1000
+ "application/json": {
1001
+ result?: {
1002
+ requestId?: string;
1003
+ name?: string;
1004
+ originalFile?: string;
1005
+ signedFile?: string;
1006
+ metadata?: {
1007
+ [key: string]: unknown;
1008
+ };
1009
+ status?: string;
1010
+ };
1011
+ };
1012
+ };
1013
+ };
1014
+ };
1015
+ };
1016
+ delete?: never;
1017
+ options?: never;
1018
+ head?: never;
1019
+ patch?: never;
1020
+ trace?: never;
1021
+ };
1022
+ "/functions/getSignedFile": {
1023
+ parameters: {
1024
+ query?: never;
1025
+ header?: never;
1026
+ path?: never;
1027
+ cookie?: never;
1028
+ };
1029
+ get?: never;
1030
+ put?: never;
1031
+ /** Cloud Function: getSignedFile */
1032
+ post: {
1033
+ parameters: {
1034
+ query?: never;
1035
+ header?: never;
1036
+ path?: never;
1037
+ cookie?: never;
1038
+ };
1039
+ requestBody?: {
1040
+ content: {
1041
+ "application/json": {
1042
+ /** @description The unique identifier of the sign request */
1043
+ requestId: string;
1044
+ };
1045
+ };
1046
+ };
1047
+ responses: {
1048
+ /** @description Successful response */
1049
+ 200: {
1050
+ headers: {
1051
+ [name: string]: unknown;
1052
+ };
1053
+ content: {
1054
+ "application/json": {
1055
+ result?: {
1056
+ fileName?: string;
1057
+ fileUrl?: string;
1058
+ signedFileUrl?: string;
1059
+ };
1060
+ };
1061
+ };
1062
+ };
1063
+ };
1064
+ };
1065
+ delete?: never;
1066
+ options?: never;
1067
+ head?: never;
1068
+ patch?: never;
1069
+ trace?: never;
1070
+ };
1071
+ "/functions/updateSignRequestMetadata": {
1072
+ parameters: {
1073
+ query?: never;
1074
+ header?: never;
1075
+ path?: never;
1076
+ cookie?: never;
1077
+ };
1078
+ get?: never;
1079
+ put?: never;
1080
+ /** Cloud Function: updateSignRequestMetadata */
1081
+ post: {
1082
+ parameters: {
1083
+ query?: never;
1084
+ header?: never;
1085
+ path?: never;
1086
+ cookie?: never;
1087
+ };
1088
+ requestBody?: {
1089
+ content: {
1090
+ "application/json": {
1091
+ /** @description The unique identifier of the sign request */
1092
+ requestId: string;
1093
+ /** @description The metadata to be merged into the existing sign request metadata */
1094
+ metadata: {
1095
+ [key: string]: unknown;
1096
+ };
1097
+ };
1098
+ };
1099
+ };
1100
+ responses: {
1101
+ /** @description Successful response */
1102
+ 200: {
1103
+ headers: {
1104
+ [name: string]: unknown;
1105
+ };
1106
+ content: {
1107
+ "application/json": {
1108
+ result?: {
1109
+ requestId?: string;
1110
+ metadata?: {
1111
+ [key: string]: unknown;
1112
+ };
1113
+ };
1114
+ };
1115
+ };
1116
+ };
1117
+ };
1118
+ };
1119
+ delete?: never;
1120
+ options?: never;
1121
+ head?: never;
1122
+ patch?: never;
1123
+ trace?: never;
1124
+ };
1125
+ }
1126
+ export type webhooks = Record<string, never>;
1127
+ export interface components {
1128
+ schemas: {
1129
+ ApiLog: {
1130
+ apiKey?: string;
1131
+ functionName?: string;
1132
+ statusCode?: string;
1133
+ statusMessage?: string;
1134
+ };
1135
+ Authentication: {
1136
+ apiKey?: string;
1137
+ name?: string;
1138
+ status?: string;
1139
+ expirationDate?: string;
1140
+ callbackUrl?: string;
1141
+ webhookSecret?: string;
1142
+ };
1143
+ Envelope: {
1144
+ name?: string;
1145
+ description?: string;
1146
+ envelopeId?: string;
1147
+ signRequests?: string;
1148
+ status?: string;
1149
+ metadata?: string;
1150
+ apiKey?: string;
1151
+ expirationDate?: string;
1152
+ isDeleted?: string;
1153
+ clientReferenceId?: string;
1154
+ };
1155
+ SignRequest: {
1156
+ status?: string;
1157
+ file?: string;
1158
+ fileName?: string;
1159
+ signedFile?: string;
1160
+ requestId?: string;
1161
+ metadata?: string;
1162
+ apiKey?: string;
1163
+ expirationDate?: string;
1164
+ isDeleted?: string;
1165
+ clientReferenceId?: string;
1166
+ };
1167
+ WebhookLog: {
1168
+ status?: string;
1169
+ message?: string;
1170
+ signRequest?: string;
1171
+ envelope?: string;
1172
+ eventType?: string;
1173
+ delivered?: string;
1174
+ retryCount?: string;
1175
+ nextRetryAt?: string;
1176
+ payload?: string;
1177
+ apiKey?: string;
1178
+ };
1179
+ };
1180
+ responses: never;
1181
+ parameters: never;
1182
+ requestBodies: never;
1183
+ headers: never;
1184
+ pathItems: never;
1185
+ }
1186
+ export type $defs = Record<string, never>;
1187
+ export type operations = Record<string, never>;
package/dist/schema.js ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instasign",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Instasign API wrapper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",