@anvilco/types 0.2.0 → 0.2.2
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/README.md +1 -0
- package/dist/index.d.cts +271 -56
- package/dist/index.d.ts +271 -56
- package/package.json +1 -1
- package/schema/anvil-schema.graphql +1 -1
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@ TypeScript types generated from the [Anvil](https://www.useanvil.com) OpenAPI sp
|
|
|
5
5
|
The one place for the Anvil SDK's TypeScript types:
|
|
6
6
|
|
|
7
7
|
- **REST**: `paths`, `components` and `operations`, generated from the OpenAPI spec, plus the fill-PDF request types (`FillPdfPayload`, `FillPdfData`, `FillPdfOptions`).
|
|
8
|
+
- **Etch**: `CreateEtchPacketArgs`, the createEtchPacket mutation's arguments with the ones the GraphQL schema calls `JSON` typed: `signers` (`EtchSigner`), `signaturePageOptions` (`EtchSignaturePageOptions`) and `finishPageOptions` (`EtchFinishPageOptions`). The OpenAPI spec publishes their shapes.
|
|
8
9
|
- **GraphQL**: the `GraphQL` namespace, generated from the schema.
|
|
9
10
|
- **The SDK's own types**: `AnvilOptions`, `GraphQLResponse`, `RESTResponse`, `ResponseError`, `ResponseErrorField`, `RuntimeError` and `Abortable`.
|
|
10
11
|
|
package/dist/index.d.cts
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
3
3
|
* Do not make direct changes to the file.
|
|
4
4
|
*/
|
|
5
5
|
interface paths {
|
|
6
|
+
'/api/document-group/{documentGroupEid}.zip': {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Download a document group's files as a zip
|
|
15
|
+
* @description Downloads every file in a document group as a single zip archive: for
|
|
16
|
+
* example, the signed documents of an Etch signature packet, from its
|
|
17
|
+
* `documentGroup.eid`.
|
|
18
|
+
*
|
|
19
|
+
* Instead of streaming the zip, the response may be a `302` redirect to
|
|
20
|
+
* a short-lived signed URL for it. Follow redirects to get the file.
|
|
21
|
+
*
|
|
22
|
+
* Requires API key (Basic auth) or OAuth authentication. Public OAuth
|
|
23
|
+
* clients need the `mcp:full` scope; no narrower scope covers this route.
|
|
24
|
+
*/
|
|
25
|
+
get: operations['downloadDocuments'];
|
|
26
|
+
put?: never;
|
|
27
|
+
post?: never;
|
|
28
|
+
delete?: never;
|
|
29
|
+
options?: never;
|
|
30
|
+
head?: never;
|
|
31
|
+
patch?: never;
|
|
32
|
+
trace?: never;
|
|
33
|
+
};
|
|
6
34
|
'/api/v1/fill/{castEid}.pdf': {
|
|
7
35
|
parameters: {
|
|
8
36
|
query?: never;
|
|
@@ -72,6 +100,133 @@ interface paths {
|
|
|
72
100
|
}
|
|
73
101
|
interface components {
|
|
74
102
|
schemas: {
|
|
103
|
+
/** @description A signer in createEtchPacket's `signers` argument: who signs, which fields they sign, and how. */
|
|
104
|
+
EtchSigner: {
|
|
105
|
+
id: string;
|
|
106
|
+
/** Format: displayableShortText */
|
|
107
|
+
name?: string;
|
|
108
|
+
/** Format: email */
|
|
109
|
+
email?: string;
|
|
110
|
+
routingOrder?: number;
|
|
111
|
+
isPending?: boolean;
|
|
112
|
+
/** @enum {string} */
|
|
113
|
+
signatureMode?: 'draw' | 'text';
|
|
114
|
+
acceptEachField?: boolean;
|
|
115
|
+
showFinishSigningButton?: boolean;
|
|
116
|
+
addUuidToSignatures?: boolean;
|
|
117
|
+
addTimestampToSignatures?: boolean;
|
|
118
|
+
/** @enum {string} */
|
|
119
|
+
signatureImageVerticalJustificationDefault?: 'dynamic' | 'bottom' | 'none';
|
|
120
|
+
/** @enum {string} */
|
|
121
|
+
signatureExperience?: 'signBeforeReviewing' | 'signWhileReviewing' | 'acknowledgeOnly' | 'formCompletionOnly';
|
|
122
|
+
fields?: ({
|
|
123
|
+
fileId: string;
|
|
124
|
+
fieldId: string;
|
|
125
|
+
/** @enum {string} */
|
|
126
|
+
signatureImageVerticalJustification?: 'dynamic' | 'bottom' | 'none';
|
|
127
|
+
} | {
|
|
128
|
+
payloadMaps: {
|
|
129
|
+
fileId: string;
|
|
130
|
+
fieldId: string;
|
|
131
|
+
}[];
|
|
132
|
+
ignoreWhenFilled?: boolean;
|
|
133
|
+
/** @enum {string} */
|
|
134
|
+
kind: 'form';
|
|
135
|
+
label?: string;
|
|
136
|
+
description?: string;
|
|
137
|
+
helpTip?: string;
|
|
138
|
+
placeholder?: string;
|
|
139
|
+
optional?: boolean;
|
|
140
|
+
options?: {
|
|
141
|
+
[key: string]: unknown;
|
|
142
|
+
};
|
|
143
|
+
})[];
|
|
144
|
+
fieldsAreOrdered?: boolean;
|
|
145
|
+
/** @enum {string} */
|
|
146
|
+
signerType?: 'email' | 'embedded' | 'in-person';
|
|
147
|
+
/** Format: redirectURL */
|
|
148
|
+
redirectURL?: string;
|
|
149
|
+
enableEmails?: boolean | 'etchComplete'[];
|
|
150
|
+
/** Format: date-time */
|
|
151
|
+
tokenValidUntil?: string;
|
|
152
|
+
tokenValidForMinutes?: number;
|
|
153
|
+
allowNameChange?: boolean;
|
|
154
|
+
allowEmailChange?: boolean;
|
|
155
|
+
requireNameOnLoad?: boolean;
|
|
156
|
+
requireEmailOnLoad?: boolean;
|
|
157
|
+
requireIdCheck?: boolean | ('kb' | 'sms' | 'smskb' | 'idsms');
|
|
158
|
+
requireIdCheckInTest?: boolean;
|
|
159
|
+
/** Format: phoneNumber */
|
|
160
|
+
idCheckPhone?: string;
|
|
161
|
+
accessCode?: string;
|
|
162
|
+
};
|
|
163
|
+
/** @description createEtchPacket's `signaturePageOptions` argument: text and styles for the signing page. */
|
|
164
|
+
EtchSignaturePageOptions: {
|
|
165
|
+
title?: string;
|
|
166
|
+
description?: string;
|
|
167
|
+
signatureLabel?: string;
|
|
168
|
+
initialLabel?: string;
|
|
169
|
+
acceptTitle?: string;
|
|
170
|
+
acceptDescription?: string;
|
|
171
|
+
acceptButtonText?: string;
|
|
172
|
+
drawSignatureTitle?: string;
|
|
173
|
+
drawSignatureDescription?: string;
|
|
174
|
+
drawSignatureButtonText?: string;
|
|
175
|
+
drawInitialsTitle?: string;
|
|
176
|
+
drawInitialsDescription?: string;
|
|
177
|
+
drawInitialsButtonText?: string;
|
|
178
|
+
signTitle?: string;
|
|
179
|
+
signDescription?: string;
|
|
180
|
+
signDescriptionCompleted?: string;
|
|
181
|
+
signConsentText?: string;
|
|
182
|
+
signEachDescription?: string;
|
|
183
|
+
signEachConsentText?: string;
|
|
184
|
+
signButtonText?: string;
|
|
185
|
+
reviewTitle?: string;
|
|
186
|
+
reviewDescription?: string;
|
|
187
|
+
reviewButtonText?: string;
|
|
188
|
+
signEachCompletedMessage?: string;
|
|
189
|
+
signEachNotReadyMessage?: string;
|
|
190
|
+
signEachSubmittingMessage?: string;
|
|
191
|
+
signEachSigningMessage?: string;
|
|
192
|
+
signEachErrorMessage?: string;
|
|
193
|
+
signEachStartButtonText?: string;
|
|
194
|
+
signEachNextButtonText?: string;
|
|
195
|
+
signEachFinishButtonText?: string;
|
|
196
|
+
signEachSignAllText?: string;
|
|
197
|
+
completedButtonText?: string;
|
|
198
|
+
error?: string;
|
|
199
|
+
notCurrentUserError?: string;
|
|
200
|
+
style?: {
|
|
201
|
+
/** Format: publicUri */
|
|
202
|
+
stylesheetURL?: string;
|
|
203
|
+
/** Format: hexColor */
|
|
204
|
+
primaryColor?: string;
|
|
205
|
+
/** Format: hexColor */
|
|
206
|
+
successColor?: string;
|
|
207
|
+
/** Format: hexColor */
|
|
208
|
+
infoColor?: string;
|
|
209
|
+
/** Format: hexColor */
|
|
210
|
+
linkColor?: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
/** @description createEtchPacket's `finishPageOptions` argument: text for the page signers see when they're done. */
|
|
214
|
+
EtchFinishPageOptions: {
|
|
215
|
+
zipName?: string;
|
|
216
|
+
completeTitle?: string;
|
|
217
|
+
completeDescription?: string;
|
|
218
|
+
incompleteTitle?: string;
|
|
219
|
+
incompleteDescription?: string;
|
|
220
|
+
signatureTitle?: string;
|
|
221
|
+
signatureDescription?: string;
|
|
222
|
+
signatureButtonText?: string;
|
|
223
|
+
signatureWaitingSignersBeforeTitle?: string;
|
|
224
|
+
signatureWaitingSignersBeforeDescription?: string;
|
|
225
|
+
signatureWaitingSignersAfterTitle?: string;
|
|
226
|
+
signatureWaitingSignersAfterDescription?: string;
|
|
227
|
+
signatureAsyncTitle?: string;
|
|
228
|
+
signatureAsyncDescription?: string;
|
|
229
|
+
};
|
|
75
230
|
FillPdfRequest: {
|
|
76
231
|
/** @description Custom title for the generated PDF. Overrides the template's default title. */
|
|
77
232
|
title?: string;
|
|
@@ -273,6 +428,60 @@ interface components {
|
|
|
273
428
|
pathItems: never;
|
|
274
429
|
}
|
|
275
430
|
interface operations {
|
|
431
|
+
downloadDocuments: {
|
|
432
|
+
parameters: {
|
|
433
|
+
query?: never;
|
|
434
|
+
header?: never;
|
|
435
|
+
path: {
|
|
436
|
+
/** @description The EID of the document group, e.g. an Etch packet's `documentGroup.eid`. */
|
|
437
|
+
documentGroupEid: string;
|
|
438
|
+
};
|
|
439
|
+
cookie?: never;
|
|
440
|
+
};
|
|
441
|
+
requestBody?: never;
|
|
442
|
+
responses: {
|
|
443
|
+
/**
|
|
444
|
+
* @description The zip archive. `Content-Disposition` names it after the document
|
|
445
|
+
* group's parent object, such as the Etch packet.
|
|
446
|
+
*/
|
|
447
|
+
200: {
|
|
448
|
+
headers: {
|
|
449
|
+
[name: string]: unknown;
|
|
450
|
+
};
|
|
451
|
+
content: {
|
|
452
|
+
'application/zip': string;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
/** @description Redirect to a short-lived signed URL for the zip. */
|
|
456
|
+
302: {
|
|
457
|
+
headers: {
|
|
458
|
+
[name: string]: unknown;
|
|
459
|
+
};
|
|
460
|
+
content?: never;
|
|
461
|
+
};
|
|
462
|
+
/** @description Authentication required — API key or OAuth token is missing or invalid. */
|
|
463
|
+
401: {
|
|
464
|
+
headers: {
|
|
465
|
+
[name: string]: unknown;
|
|
466
|
+
};
|
|
467
|
+
content?: never;
|
|
468
|
+
};
|
|
469
|
+
/** @description The OAuth token belongs to a public client without a scope that covers this route. */
|
|
470
|
+
403: {
|
|
471
|
+
headers: {
|
|
472
|
+
[name: string]: unknown;
|
|
473
|
+
};
|
|
474
|
+
content?: never;
|
|
475
|
+
};
|
|
476
|
+
/** @description Document group not found — no document group exists with the given EID, or the authenticated user lacks access to it. */
|
|
477
|
+
404: {
|
|
478
|
+
headers: {
|
|
479
|
+
[name: string]: unknown;
|
|
480
|
+
};
|
|
481
|
+
content?: never;
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
};
|
|
276
485
|
fillPdf: {
|
|
277
486
|
parameters: {
|
|
278
487
|
query?: {
|
|
@@ -398,56 +607,6 @@ interface operations {
|
|
|
398
607
|
};
|
|
399
608
|
}
|
|
400
609
|
|
|
401
|
-
interface AnvilOptions {
|
|
402
|
-
apiKey?: string;
|
|
403
|
-
accessToken?: string;
|
|
404
|
-
baseURL?: string;
|
|
405
|
-
userAgent?: string;
|
|
406
|
-
requestLimit?: number;
|
|
407
|
-
requestLimitMS?: number;
|
|
408
|
-
}
|
|
409
|
-
interface ResponseErrorField {
|
|
410
|
-
message: string;
|
|
411
|
-
property?: string;
|
|
412
|
-
[key: string]: unknown;
|
|
413
|
-
}
|
|
414
|
-
interface ResponseError {
|
|
415
|
-
message: string;
|
|
416
|
-
status?: number;
|
|
417
|
-
name?: string;
|
|
418
|
-
fields?: ResponseErrorField[];
|
|
419
|
-
[key: string]: unknown;
|
|
420
|
-
}
|
|
421
|
-
interface RuntimeError {
|
|
422
|
-
name: string;
|
|
423
|
-
message: string;
|
|
424
|
-
stack?: string;
|
|
425
|
-
code?: string;
|
|
426
|
-
cause?: unknown;
|
|
427
|
-
}
|
|
428
|
-
interface GraphQLResponseData {
|
|
429
|
-
[key: string]: unknown;
|
|
430
|
-
}
|
|
431
|
-
interface GraphQLResponse<TData = GraphQLResponseData> {
|
|
432
|
-
statusCode: number;
|
|
433
|
-
data?: TData;
|
|
434
|
-
errors?: Array<ResponseError | RuntimeError>;
|
|
435
|
-
}
|
|
436
|
-
interface RESTResponse<T = unknown> {
|
|
437
|
-
statusCode: number;
|
|
438
|
-
data?: T;
|
|
439
|
-
errors?: Array<ResponseError | RuntimeError>;
|
|
440
|
-
}
|
|
441
|
-
interface Abortable {
|
|
442
|
-
signal?: AbortSignal;
|
|
443
|
-
}
|
|
444
|
-
type FillPdfPayload = components['schemas']['FillPdfRequest'];
|
|
445
|
-
type FillPdfData = FillPdfPayload['data'];
|
|
446
|
-
type FillPdfVersionNumber = NonNullable<operations['fillPdf']['parameters']['query']>['versionNumber'];
|
|
447
|
-
interface FillPdfOptions extends Abortable {
|
|
448
|
-
versionNumber?: FillPdfVersionNumber;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
610
|
// Generated by scripts/generate-graphql.js (gql.tada) from schema/anvil-schema.graphql — do not edit by hand.
|
|
452
611
|
// Run `yarn workspace @anvilco/types generate:graphql` to regenerate.
|
|
453
612
|
/* eslint-disable */
|
|
@@ -4042,11 +4201,8 @@ type introspection = {
|
|
|
4042
4201
|
{
|
|
4043
4202
|
"name": "organizationEid",
|
|
4044
4203
|
"type": {
|
|
4045
|
-
"kind": "
|
|
4046
|
-
"
|
|
4047
|
-
"kind": "SCALAR",
|
|
4048
|
-
"name": "String"
|
|
4049
|
-
}
|
|
4204
|
+
"kind": "SCALAR",
|
|
4205
|
+
"name": "String"
|
|
4050
4206
|
}
|
|
4051
4207
|
},
|
|
4052
4208
|
{
|
|
@@ -10709,4 +10865,63 @@ declare namespace index {
|
|
|
10709
10865
|
export type { index_Introspection as Introspection, index_MutationArgs as MutationArgs, index_MutationName as MutationName, index_QueryArgs as QueryArgs, index_QueryName as QueryName, index_Scalars as Scalars, index_Setup as Setup, index_Type as Type, index_TypeName as TypeName };
|
|
10710
10866
|
}
|
|
10711
10867
|
|
|
10712
|
-
|
|
10868
|
+
interface AnvilOptions {
|
|
10869
|
+
apiKey?: string;
|
|
10870
|
+
accessToken?: string;
|
|
10871
|
+
baseURL?: string;
|
|
10872
|
+
userAgent?: string;
|
|
10873
|
+
requestLimit?: number;
|
|
10874
|
+
requestLimitMS?: number;
|
|
10875
|
+
}
|
|
10876
|
+
interface ResponseErrorField {
|
|
10877
|
+
message: string;
|
|
10878
|
+
property?: string;
|
|
10879
|
+
[key: string]: unknown;
|
|
10880
|
+
}
|
|
10881
|
+
interface ResponseError {
|
|
10882
|
+
message: string;
|
|
10883
|
+
status?: number;
|
|
10884
|
+
name?: string;
|
|
10885
|
+
fields?: ResponseErrorField[];
|
|
10886
|
+
[key: string]: unknown;
|
|
10887
|
+
}
|
|
10888
|
+
interface RuntimeError {
|
|
10889
|
+
name: string;
|
|
10890
|
+
message: string;
|
|
10891
|
+
stack?: string;
|
|
10892
|
+
code?: string;
|
|
10893
|
+
cause?: unknown;
|
|
10894
|
+
}
|
|
10895
|
+
interface GraphQLResponseData {
|
|
10896
|
+
[key: string]: unknown;
|
|
10897
|
+
}
|
|
10898
|
+
interface GraphQLResponse<TData = GraphQLResponseData> {
|
|
10899
|
+
statusCode: number;
|
|
10900
|
+
data?: TData;
|
|
10901
|
+
errors?: Array<ResponseError | RuntimeError>;
|
|
10902
|
+
}
|
|
10903
|
+
interface RESTResponse<T = unknown> {
|
|
10904
|
+
statusCode: number;
|
|
10905
|
+
data?: T;
|
|
10906
|
+
errors?: Array<ResponseError | RuntimeError>;
|
|
10907
|
+
}
|
|
10908
|
+
interface Abortable {
|
|
10909
|
+
signal?: AbortSignal;
|
|
10910
|
+
}
|
|
10911
|
+
type FillPdfPayload = components['schemas']['FillPdfRequest'];
|
|
10912
|
+
type FillPdfData = FillPdfPayload['data'];
|
|
10913
|
+
type FillPdfVersionNumber = NonNullable<operations['fillPdf']['parameters']['query']>['versionNumber'];
|
|
10914
|
+
interface FillPdfOptions extends Abortable {
|
|
10915
|
+
versionNumber?: FillPdfVersionNumber;
|
|
10916
|
+
}
|
|
10917
|
+
type EtchSigner = components['schemas']['EtchSigner'];
|
|
10918
|
+
type EtchSignaturePageOptions = components['schemas']['EtchSignaturePageOptions'];
|
|
10919
|
+
type EtchFinishPageOptions = components['schemas']['EtchFinishPageOptions'];
|
|
10920
|
+
/** createEtchPacket's arguments, with `signers`, `signaturePageOptions` and `finishPageOptions` typed. */
|
|
10921
|
+
type CreateEtchPacketArgs = Omit<MutationArgs<'createEtchPacket'>, 'signers' | 'signaturePageOptions' | 'finishPageOptions'> & {
|
|
10922
|
+
signers?: EtchSigner[] | null;
|
|
10923
|
+
signaturePageOptions?: EtchSignaturePageOptions | null;
|
|
10924
|
+
finishPageOptions?: EtchFinishPageOptions | null;
|
|
10925
|
+
};
|
|
10926
|
+
|
|
10927
|
+
export { type Abortable, type AnvilOptions, type CreateEtchPacketArgs, type EtchFinishPageOptions, type EtchSignaturePageOptions, type EtchSigner, type FillPdfData, type FillPdfOptions, type FillPdfPayload, type FillPdfVersionNumber, index as GraphQL, type GraphQLResponse, type GraphQLResponseData, type RESTResponse, type ResponseError, type ResponseErrorField, type RuntimeError, type components, type operations, type paths };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
3
3
|
* Do not make direct changes to the file.
|
|
4
4
|
*/
|
|
5
5
|
interface paths {
|
|
6
|
+
'/api/document-group/{documentGroupEid}.zip': {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Download a document group's files as a zip
|
|
15
|
+
* @description Downloads every file in a document group as a single zip archive: for
|
|
16
|
+
* example, the signed documents of an Etch signature packet, from its
|
|
17
|
+
* `documentGroup.eid`.
|
|
18
|
+
*
|
|
19
|
+
* Instead of streaming the zip, the response may be a `302` redirect to
|
|
20
|
+
* a short-lived signed URL for it. Follow redirects to get the file.
|
|
21
|
+
*
|
|
22
|
+
* Requires API key (Basic auth) or OAuth authentication. Public OAuth
|
|
23
|
+
* clients need the `mcp:full` scope; no narrower scope covers this route.
|
|
24
|
+
*/
|
|
25
|
+
get: operations['downloadDocuments'];
|
|
26
|
+
put?: never;
|
|
27
|
+
post?: never;
|
|
28
|
+
delete?: never;
|
|
29
|
+
options?: never;
|
|
30
|
+
head?: never;
|
|
31
|
+
patch?: never;
|
|
32
|
+
trace?: never;
|
|
33
|
+
};
|
|
6
34
|
'/api/v1/fill/{castEid}.pdf': {
|
|
7
35
|
parameters: {
|
|
8
36
|
query?: never;
|
|
@@ -72,6 +100,133 @@ interface paths {
|
|
|
72
100
|
}
|
|
73
101
|
interface components {
|
|
74
102
|
schemas: {
|
|
103
|
+
/** @description A signer in createEtchPacket's `signers` argument: who signs, which fields they sign, and how. */
|
|
104
|
+
EtchSigner: {
|
|
105
|
+
id: string;
|
|
106
|
+
/** Format: displayableShortText */
|
|
107
|
+
name?: string;
|
|
108
|
+
/** Format: email */
|
|
109
|
+
email?: string;
|
|
110
|
+
routingOrder?: number;
|
|
111
|
+
isPending?: boolean;
|
|
112
|
+
/** @enum {string} */
|
|
113
|
+
signatureMode?: 'draw' | 'text';
|
|
114
|
+
acceptEachField?: boolean;
|
|
115
|
+
showFinishSigningButton?: boolean;
|
|
116
|
+
addUuidToSignatures?: boolean;
|
|
117
|
+
addTimestampToSignatures?: boolean;
|
|
118
|
+
/** @enum {string} */
|
|
119
|
+
signatureImageVerticalJustificationDefault?: 'dynamic' | 'bottom' | 'none';
|
|
120
|
+
/** @enum {string} */
|
|
121
|
+
signatureExperience?: 'signBeforeReviewing' | 'signWhileReviewing' | 'acknowledgeOnly' | 'formCompletionOnly';
|
|
122
|
+
fields?: ({
|
|
123
|
+
fileId: string;
|
|
124
|
+
fieldId: string;
|
|
125
|
+
/** @enum {string} */
|
|
126
|
+
signatureImageVerticalJustification?: 'dynamic' | 'bottom' | 'none';
|
|
127
|
+
} | {
|
|
128
|
+
payloadMaps: {
|
|
129
|
+
fileId: string;
|
|
130
|
+
fieldId: string;
|
|
131
|
+
}[];
|
|
132
|
+
ignoreWhenFilled?: boolean;
|
|
133
|
+
/** @enum {string} */
|
|
134
|
+
kind: 'form';
|
|
135
|
+
label?: string;
|
|
136
|
+
description?: string;
|
|
137
|
+
helpTip?: string;
|
|
138
|
+
placeholder?: string;
|
|
139
|
+
optional?: boolean;
|
|
140
|
+
options?: {
|
|
141
|
+
[key: string]: unknown;
|
|
142
|
+
};
|
|
143
|
+
})[];
|
|
144
|
+
fieldsAreOrdered?: boolean;
|
|
145
|
+
/** @enum {string} */
|
|
146
|
+
signerType?: 'email' | 'embedded' | 'in-person';
|
|
147
|
+
/** Format: redirectURL */
|
|
148
|
+
redirectURL?: string;
|
|
149
|
+
enableEmails?: boolean | 'etchComplete'[];
|
|
150
|
+
/** Format: date-time */
|
|
151
|
+
tokenValidUntil?: string;
|
|
152
|
+
tokenValidForMinutes?: number;
|
|
153
|
+
allowNameChange?: boolean;
|
|
154
|
+
allowEmailChange?: boolean;
|
|
155
|
+
requireNameOnLoad?: boolean;
|
|
156
|
+
requireEmailOnLoad?: boolean;
|
|
157
|
+
requireIdCheck?: boolean | ('kb' | 'sms' | 'smskb' | 'idsms');
|
|
158
|
+
requireIdCheckInTest?: boolean;
|
|
159
|
+
/** Format: phoneNumber */
|
|
160
|
+
idCheckPhone?: string;
|
|
161
|
+
accessCode?: string;
|
|
162
|
+
};
|
|
163
|
+
/** @description createEtchPacket's `signaturePageOptions` argument: text and styles for the signing page. */
|
|
164
|
+
EtchSignaturePageOptions: {
|
|
165
|
+
title?: string;
|
|
166
|
+
description?: string;
|
|
167
|
+
signatureLabel?: string;
|
|
168
|
+
initialLabel?: string;
|
|
169
|
+
acceptTitle?: string;
|
|
170
|
+
acceptDescription?: string;
|
|
171
|
+
acceptButtonText?: string;
|
|
172
|
+
drawSignatureTitle?: string;
|
|
173
|
+
drawSignatureDescription?: string;
|
|
174
|
+
drawSignatureButtonText?: string;
|
|
175
|
+
drawInitialsTitle?: string;
|
|
176
|
+
drawInitialsDescription?: string;
|
|
177
|
+
drawInitialsButtonText?: string;
|
|
178
|
+
signTitle?: string;
|
|
179
|
+
signDescription?: string;
|
|
180
|
+
signDescriptionCompleted?: string;
|
|
181
|
+
signConsentText?: string;
|
|
182
|
+
signEachDescription?: string;
|
|
183
|
+
signEachConsentText?: string;
|
|
184
|
+
signButtonText?: string;
|
|
185
|
+
reviewTitle?: string;
|
|
186
|
+
reviewDescription?: string;
|
|
187
|
+
reviewButtonText?: string;
|
|
188
|
+
signEachCompletedMessage?: string;
|
|
189
|
+
signEachNotReadyMessage?: string;
|
|
190
|
+
signEachSubmittingMessage?: string;
|
|
191
|
+
signEachSigningMessage?: string;
|
|
192
|
+
signEachErrorMessage?: string;
|
|
193
|
+
signEachStartButtonText?: string;
|
|
194
|
+
signEachNextButtonText?: string;
|
|
195
|
+
signEachFinishButtonText?: string;
|
|
196
|
+
signEachSignAllText?: string;
|
|
197
|
+
completedButtonText?: string;
|
|
198
|
+
error?: string;
|
|
199
|
+
notCurrentUserError?: string;
|
|
200
|
+
style?: {
|
|
201
|
+
/** Format: publicUri */
|
|
202
|
+
stylesheetURL?: string;
|
|
203
|
+
/** Format: hexColor */
|
|
204
|
+
primaryColor?: string;
|
|
205
|
+
/** Format: hexColor */
|
|
206
|
+
successColor?: string;
|
|
207
|
+
/** Format: hexColor */
|
|
208
|
+
infoColor?: string;
|
|
209
|
+
/** Format: hexColor */
|
|
210
|
+
linkColor?: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
/** @description createEtchPacket's `finishPageOptions` argument: text for the page signers see when they're done. */
|
|
214
|
+
EtchFinishPageOptions: {
|
|
215
|
+
zipName?: string;
|
|
216
|
+
completeTitle?: string;
|
|
217
|
+
completeDescription?: string;
|
|
218
|
+
incompleteTitle?: string;
|
|
219
|
+
incompleteDescription?: string;
|
|
220
|
+
signatureTitle?: string;
|
|
221
|
+
signatureDescription?: string;
|
|
222
|
+
signatureButtonText?: string;
|
|
223
|
+
signatureWaitingSignersBeforeTitle?: string;
|
|
224
|
+
signatureWaitingSignersBeforeDescription?: string;
|
|
225
|
+
signatureWaitingSignersAfterTitle?: string;
|
|
226
|
+
signatureWaitingSignersAfterDescription?: string;
|
|
227
|
+
signatureAsyncTitle?: string;
|
|
228
|
+
signatureAsyncDescription?: string;
|
|
229
|
+
};
|
|
75
230
|
FillPdfRequest: {
|
|
76
231
|
/** @description Custom title for the generated PDF. Overrides the template's default title. */
|
|
77
232
|
title?: string;
|
|
@@ -273,6 +428,60 @@ interface components {
|
|
|
273
428
|
pathItems: never;
|
|
274
429
|
}
|
|
275
430
|
interface operations {
|
|
431
|
+
downloadDocuments: {
|
|
432
|
+
parameters: {
|
|
433
|
+
query?: never;
|
|
434
|
+
header?: never;
|
|
435
|
+
path: {
|
|
436
|
+
/** @description The EID of the document group, e.g. an Etch packet's `documentGroup.eid`. */
|
|
437
|
+
documentGroupEid: string;
|
|
438
|
+
};
|
|
439
|
+
cookie?: never;
|
|
440
|
+
};
|
|
441
|
+
requestBody?: never;
|
|
442
|
+
responses: {
|
|
443
|
+
/**
|
|
444
|
+
* @description The zip archive. `Content-Disposition` names it after the document
|
|
445
|
+
* group's parent object, such as the Etch packet.
|
|
446
|
+
*/
|
|
447
|
+
200: {
|
|
448
|
+
headers: {
|
|
449
|
+
[name: string]: unknown;
|
|
450
|
+
};
|
|
451
|
+
content: {
|
|
452
|
+
'application/zip': string;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
/** @description Redirect to a short-lived signed URL for the zip. */
|
|
456
|
+
302: {
|
|
457
|
+
headers: {
|
|
458
|
+
[name: string]: unknown;
|
|
459
|
+
};
|
|
460
|
+
content?: never;
|
|
461
|
+
};
|
|
462
|
+
/** @description Authentication required — API key or OAuth token is missing or invalid. */
|
|
463
|
+
401: {
|
|
464
|
+
headers: {
|
|
465
|
+
[name: string]: unknown;
|
|
466
|
+
};
|
|
467
|
+
content?: never;
|
|
468
|
+
};
|
|
469
|
+
/** @description The OAuth token belongs to a public client without a scope that covers this route. */
|
|
470
|
+
403: {
|
|
471
|
+
headers: {
|
|
472
|
+
[name: string]: unknown;
|
|
473
|
+
};
|
|
474
|
+
content?: never;
|
|
475
|
+
};
|
|
476
|
+
/** @description Document group not found — no document group exists with the given EID, or the authenticated user lacks access to it. */
|
|
477
|
+
404: {
|
|
478
|
+
headers: {
|
|
479
|
+
[name: string]: unknown;
|
|
480
|
+
};
|
|
481
|
+
content?: never;
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
};
|
|
276
485
|
fillPdf: {
|
|
277
486
|
parameters: {
|
|
278
487
|
query?: {
|
|
@@ -398,56 +607,6 @@ interface operations {
|
|
|
398
607
|
};
|
|
399
608
|
}
|
|
400
609
|
|
|
401
|
-
interface AnvilOptions {
|
|
402
|
-
apiKey?: string;
|
|
403
|
-
accessToken?: string;
|
|
404
|
-
baseURL?: string;
|
|
405
|
-
userAgent?: string;
|
|
406
|
-
requestLimit?: number;
|
|
407
|
-
requestLimitMS?: number;
|
|
408
|
-
}
|
|
409
|
-
interface ResponseErrorField {
|
|
410
|
-
message: string;
|
|
411
|
-
property?: string;
|
|
412
|
-
[key: string]: unknown;
|
|
413
|
-
}
|
|
414
|
-
interface ResponseError {
|
|
415
|
-
message: string;
|
|
416
|
-
status?: number;
|
|
417
|
-
name?: string;
|
|
418
|
-
fields?: ResponseErrorField[];
|
|
419
|
-
[key: string]: unknown;
|
|
420
|
-
}
|
|
421
|
-
interface RuntimeError {
|
|
422
|
-
name: string;
|
|
423
|
-
message: string;
|
|
424
|
-
stack?: string;
|
|
425
|
-
code?: string;
|
|
426
|
-
cause?: unknown;
|
|
427
|
-
}
|
|
428
|
-
interface GraphQLResponseData {
|
|
429
|
-
[key: string]: unknown;
|
|
430
|
-
}
|
|
431
|
-
interface GraphQLResponse<TData = GraphQLResponseData> {
|
|
432
|
-
statusCode: number;
|
|
433
|
-
data?: TData;
|
|
434
|
-
errors?: Array<ResponseError | RuntimeError>;
|
|
435
|
-
}
|
|
436
|
-
interface RESTResponse<T = unknown> {
|
|
437
|
-
statusCode: number;
|
|
438
|
-
data?: T;
|
|
439
|
-
errors?: Array<ResponseError | RuntimeError>;
|
|
440
|
-
}
|
|
441
|
-
interface Abortable {
|
|
442
|
-
signal?: AbortSignal;
|
|
443
|
-
}
|
|
444
|
-
type FillPdfPayload = components['schemas']['FillPdfRequest'];
|
|
445
|
-
type FillPdfData = FillPdfPayload['data'];
|
|
446
|
-
type FillPdfVersionNumber = NonNullable<operations['fillPdf']['parameters']['query']>['versionNumber'];
|
|
447
|
-
interface FillPdfOptions extends Abortable {
|
|
448
|
-
versionNumber?: FillPdfVersionNumber;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
610
|
// Generated by scripts/generate-graphql.js (gql.tada) from schema/anvil-schema.graphql — do not edit by hand.
|
|
452
611
|
// Run `yarn workspace @anvilco/types generate:graphql` to regenerate.
|
|
453
612
|
/* eslint-disable */
|
|
@@ -4042,11 +4201,8 @@ type introspection = {
|
|
|
4042
4201
|
{
|
|
4043
4202
|
"name": "organizationEid",
|
|
4044
4203
|
"type": {
|
|
4045
|
-
"kind": "
|
|
4046
|
-
"
|
|
4047
|
-
"kind": "SCALAR",
|
|
4048
|
-
"name": "String"
|
|
4049
|
-
}
|
|
4204
|
+
"kind": "SCALAR",
|
|
4205
|
+
"name": "String"
|
|
4050
4206
|
}
|
|
4051
4207
|
},
|
|
4052
4208
|
{
|
|
@@ -10709,4 +10865,63 @@ declare namespace index {
|
|
|
10709
10865
|
export type { index_Introspection as Introspection, index_MutationArgs as MutationArgs, index_MutationName as MutationName, index_QueryArgs as QueryArgs, index_QueryName as QueryName, index_Scalars as Scalars, index_Setup as Setup, index_Type as Type, index_TypeName as TypeName };
|
|
10710
10866
|
}
|
|
10711
10867
|
|
|
10712
|
-
|
|
10868
|
+
interface AnvilOptions {
|
|
10869
|
+
apiKey?: string;
|
|
10870
|
+
accessToken?: string;
|
|
10871
|
+
baseURL?: string;
|
|
10872
|
+
userAgent?: string;
|
|
10873
|
+
requestLimit?: number;
|
|
10874
|
+
requestLimitMS?: number;
|
|
10875
|
+
}
|
|
10876
|
+
interface ResponseErrorField {
|
|
10877
|
+
message: string;
|
|
10878
|
+
property?: string;
|
|
10879
|
+
[key: string]: unknown;
|
|
10880
|
+
}
|
|
10881
|
+
interface ResponseError {
|
|
10882
|
+
message: string;
|
|
10883
|
+
status?: number;
|
|
10884
|
+
name?: string;
|
|
10885
|
+
fields?: ResponseErrorField[];
|
|
10886
|
+
[key: string]: unknown;
|
|
10887
|
+
}
|
|
10888
|
+
interface RuntimeError {
|
|
10889
|
+
name: string;
|
|
10890
|
+
message: string;
|
|
10891
|
+
stack?: string;
|
|
10892
|
+
code?: string;
|
|
10893
|
+
cause?: unknown;
|
|
10894
|
+
}
|
|
10895
|
+
interface GraphQLResponseData {
|
|
10896
|
+
[key: string]: unknown;
|
|
10897
|
+
}
|
|
10898
|
+
interface GraphQLResponse<TData = GraphQLResponseData> {
|
|
10899
|
+
statusCode: number;
|
|
10900
|
+
data?: TData;
|
|
10901
|
+
errors?: Array<ResponseError | RuntimeError>;
|
|
10902
|
+
}
|
|
10903
|
+
interface RESTResponse<T = unknown> {
|
|
10904
|
+
statusCode: number;
|
|
10905
|
+
data?: T;
|
|
10906
|
+
errors?: Array<ResponseError | RuntimeError>;
|
|
10907
|
+
}
|
|
10908
|
+
interface Abortable {
|
|
10909
|
+
signal?: AbortSignal;
|
|
10910
|
+
}
|
|
10911
|
+
type FillPdfPayload = components['schemas']['FillPdfRequest'];
|
|
10912
|
+
type FillPdfData = FillPdfPayload['data'];
|
|
10913
|
+
type FillPdfVersionNumber = NonNullable<operations['fillPdf']['parameters']['query']>['versionNumber'];
|
|
10914
|
+
interface FillPdfOptions extends Abortable {
|
|
10915
|
+
versionNumber?: FillPdfVersionNumber;
|
|
10916
|
+
}
|
|
10917
|
+
type EtchSigner = components['schemas']['EtchSigner'];
|
|
10918
|
+
type EtchSignaturePageOptions = components['schemas']['EtchSignaturePageOptions'];
|
|
10919
|
+
type EtchFinishPageOptions = components['schemas']['EtchFinishPageOptions'];
|
|
10920
|
+
/** createEtchPacket's arguments, with `signers`, `signaturePageOptions` and `finishPageOptions` typed. */
|
|
10921
|
+
type CreateEtchPacketArgs = Omit<MutationArgs<'createEtchPacket'>, 'signers' | 'signaturePageOptions' | 'finishPageOptions'> & {
|
|
10922
|
+
signers?: EtchSigner[] | null;
|
|
10923
|
+
signaturePageOptions?: EtchSignaturePageOptions | null;
|
|
10924
|
+
finishPageOptions?: EtchFinishPageOptions | null;
|
|
10925
|
+
};
|
|
10926
|
+
|
|
10927
|
+
export { type Abortable, type AnvilOptions, type CreateEtchPacketArgs, type EtchFinishPageOptions, type EtchSignaturePageOptions, type EtchSigner, type FillPdfData, type FillPdfOptions, type FillPdfPayload, type FillPdfVersionNumber, index as GraphQL, type GraphQLResponse, type GraphQLResponseData, type RESTResponse, type ResponseError, type ResponseErrorField, type RuntimeError, type components, type operations, type paths };
|
package/package.json
CHANGED
|
@@ -1114,7 +1114,7 @@ type Mutation {
|
|
|
1114
1114
|
createWeldData(isTest: Boolean = false, webhookURL: String, weldDataGroupEid: String, weldEid: String!): WeldData
|
|
1115
1115
|
destroySubmission(eid: String!): Boolean
|
|
1116
1116
|
disconnectDocusign(organizationSlug: String!): Organization
|
|
1117
|
-
duplicateCast(eid: String!, name: String, organizationEid: String
|
|
1117
|
+
duplicateCast(eid: String!, name: String, organizationEid: String, title: String): Cast
|
|
1118
1118
|
duplicateWeld(eid: String!, name: String, organizationEid: String!, slug: String, visibility: String): Weld
|
|
1119
1119
|
|
|
1120
1120
|
"""
|