@anvilco/types 0.2.1 → 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 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
@@ -607,56 +607,6 @@ interface operations {
607
607
  };
608
608
  }
609
609
 
610
- interface AnvilOptions {
611
- apiKey?: string;
612
- accessToken?: string;
613
- baseURL?: string;
614
- userAgent?: string;
615
- requestLimit?: number;
616
- requestLimitMS?: number;
617
- }
618
- interface ResponseErrorField {
619
- message: string;
620
- property?: string;
621
- [key: string]: unknown;
622
- }
623
- interface ResponseError {
624
- message: string;
625
- status?: number;
626
- name?: string;
627
- fields?: ResponseErrorField[];
628
- [key: string]: unknown;
629
- }
630
- interface RuntimeError {
631
- name: string;
632
- message: string;
633
- stack?: string;
634
- code?: string;
635
- cause?: unknown;
636
- }
637
- interface GraphQLResponseData {
638
- [key: string]: unknown;
639
- }
640
- interface GraphQLResponse<TData = GraphQLResponseData> {
641
- statusCode: number;
642
- data?: TData;
643
- errors?: Array<ResponseError | RuntimeError>;
644
- }
645
- interface RESTResponse<T = unknown> {
646
- statusCode: number;
647
- data?: T;
648
- errors?: Array<ResponseError | RuntimeError>;
649
- }
650
- interface Abortable {
651
- signal?: AbortSignal;
652
- }
653
- type FillPdfPayload = components['schemas']['FillPdfRequest'];
654
- type FillPdfData = FillPdfPayload['data'];
655
- type FillPdfVersionNumber = NonNullable<operations['fillPdf']['parameters']['query']>['versionNumber'];
656
- interface FillPdfOptions extends Abortable {
657
- versionNumber?: FillPdfVersionNumber;
658
- }
659
-
660
610
  // Generated by scripts/generate-graphql.js (gql.tada) from schema/anvil-schema.graphql — do not edit by hand.
661
611
  // Run `yarn workspace @anvilco/types generate:graphql` to regenerate.
662
612
  /* eslint-disable */
@@ -10915,4 +10865,63 @@ declare namespace index {
10915
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 };
10916
10866
  }
10917
10867
 
10918
- export { type Abortable, type AnvilOptions, 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 };
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
@@ -607,56 +607,6 @@ interface operations {
607
607
  };
608
608
  }
609
609
 
610
- interface AnvilOptions {
611
- apiKey?: string;
612
- accessToken?: string;
613
- baseURL?: string;
614
- userAgent?: string;
615
- requestLimit?: number;
616
- requestLimitMS?: number;
617
- }
618
- interface ResponseErrorField {
619
- message: string;
620
- property?: string;
621
- [key: string]: unknown;
622
- }
623
- interface ResponseError {
624
- message: string;
625
- status?: number;
626
- name?: string;
627
- fields?: ResponseErrorField[];
628
- [key: string]: unknown;
629
- }
630
- interface RuntimeError {
631
- name: string;
632
- message: string;
633
- stack?: string;
634
- code?: string;
635
- cause?: unknown;
636
- }
637
- interface GraphQLResponseData {
638
- [key: string]: unknown;
639
- }
640
- interface GraphQLResponse<TData = GraphQLResponseData> {
641
- statusCode: number;
642
- data?: TData;
643
- errors?: Array<ResponseError | RuntimeError>;
644
- }
645
- interface RESTResponse<T = unknown> {
646
- statusCode: number;
647
- data?: T;
648
- errors?: Array<ResponseError | RuntimeError>;
649
- }
650
- interface Abortable {
651
- signal?: AbortSignal;
652
- }
653
- type FillPdfPayload = components['schemas']['FillPdfRequest'];
654
- type FillPdfData = FillPdfPayload['data'];
655
- type FillPdfVersionNumber = NonNullable<operations['fillPdf']['parameters']['query']>['versionNumber'];
656
- interface FillPdfOptions extends Abortable {
657
- versionNumber?: FillPdfVersionNumber;
658
- }
659
-
660
610
  // Generated by scripts/generate-graphql.js (gql.tada) from schema/anvil-schema.graphql — do not edit by hand.
661
611
  // Run `yarn workspace @anvilco/types generate:graphql` to regenerate.
662
612
  /* eslint-disable */
@@ -10915,4 +10865,63 @@ declare namespace index {
10915
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 };
10916
10866
  }
10917
10867
 
10918
- export { type Abortable, type AnvilOptions, 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 };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anvilco/types",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "TypeScript types generated from the Anvil OpenAPI spec and GraphQL schema",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",