@spritz-finance/api-client 0.0.11 → 0.1.0

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.
@@ -30,16 +30,18 @@ declare enum DirectPaymentStatus {
30
30
  }
31
31
  declare enum ModuleStatus {
32
32
  ACTIVE = "ACTIVE",
33
+ DISABLED = "DISABLED",
33
34
  FAILED = "FAILED",
34
35
  INITIALIZED = "INITIALIZED",
35
36
  LOADING = "LOADING",
37
+ RETRY = "RETRY",
36
38
  UNAVAILABLE = "UNAVAILABLE",
37
39
  UNINITIALIZED = "UNINITIALIZED"
38
40
  }
39
41
  declare enum PayableAccountType {
40
42
  BankAccount = "BankAccount",
41
43
  Bill = "Bill",
42
- DebitCard = "DebitCard"
44
+ VirtualCard = "VirtualCard"
43
45
  }
44
46
  declare enum PaymentStatus {
45
47
  CANCELLED = "CANCELLED",
@@ -53,6 +55,9 @@ declare enum PaymentStatus {
53
55
  SCHEDULED = "SCHEDULED",
54
56
  SENT = "SENT"
55
57
  }
58
+ declare enum VirtualCardType {
59
+ USVirtualDebitCard = "USVirtualDebitCard"
60
+ }
56
61
  interface CreateDirectPaymentInput {
57
62
  accountId: string;
58
63
  amount: number;
@@ -73,84 +78,6 @@ interface USBankAccountInput {
73
78
  subType: BankAccountSubType;
74
79
  }
75
80
 
76
- interface DeleteBankAccount_deletePayableAccount_Bill {
77
- __typename: 'Bill';
78
- }
79
- interface DeleteBankAccount_deletePayableAccount_BankAccount_bankAccountDetails_CanadianBankAccountDetails {
80
- __typename: 'CanadianBankAccountDetails';
81
- }
82
- interface DeleteBankAccount_deletePayableAccount_BankAccount_bankAccountDetails_USBankAccountDetails {
83
- __typename: 'USBankAccountDetails';
84
- routingNumber: string;
85
- }
86
- type DeleteBankAccount_deletePayableAccount_BankAccount_bankAccountDetails = DeleteBankAccount_deletePayableAccount_BankAccount_bankAccountDetails_CanadianBankAccountDetails | DeleteBankAccount_deletePayableAccount_BankAccount_bankAccountDetails_USBankAccountDetails;
87
- interface DeleteBankAccount_deletePayableAccount_BankAccount_institution {
88
- __typename: 'BankAccountInstitution' | 'BillInstitution';
89
- id: string;
90
- name: string;
91
- logo: string;
92
- country: string;
93
- currency: string;
94
- }
95
- interface DeleteBankAccount_deletePayableAccount_BankAccount {
96
- __typename: 'BankAccount';
97
- id: string;
98
- name: string | null;
99
- userId: string;
100
- country: string;
101
- currency: string;
102
- createdAt: any;
103
- type: PayableAccountType;
104
- accountNumber: string;
105
- bankAccountType: BankAccountType;
106
- bankAccountSubType: BankAccountSubType;
107
- holder: string;
108
- email: string;
109
- ownedByUser: boolean;
110
- bankAccountDetails: DeleteBankAccount_deletePayableAccount_BankAccount_bankAccountDetails;
111
- institution: DeleteBankAccount_deletePayableAccount_BankAccount_institution | null;
112
- }
113
- type DeleteBankAccount_deletePayableAccount = DeleteBankAccount_deletePayableAccount_Bill | DeleteBankAccount_deletePayableAccount_BankAccount;
114
-
115
- interface RenameBankAccount_renamePayableAccount_Bill {
116
- __typename: 'Bill';
117
- }
118
- interface RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails_CanadianBankAccountDetails {
119
- __typename: 'CanadianBankAccountDetails';
120
- }
121
- interface RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails_USBankAccountDetails {
122
- __typename: 'USBankAccountDetails';
123
- routingNumber: string;
124
- }
125
- type RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails = RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails_CanadianBankAccountDetails | RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails_USBankAccountDetails;
126
- interface RenameBankAccount_renamePayableAccount_BankAccount_institution {
127
- __typename: 'BankAccountInstitution' | 'BillInstitution';
128
- id: string;
129
- name: string;
130
- logo: string;
131
- country: string;
132
- currency: string;
133
- }
134
- interface RenameBankAccount_renamePayableAccount_BankAccount {
135
- __typename: 'BankAccount';
136
- id: string;
137
- name: string | null;
138
- userId: string;
139
- country: string;
140
- currency: string;
141
- createdAt: any;
142
- type: PayableAccountType;
143
- accountNumber: string;
144
- bankAccountType: BankAccountType;
145
- bankAccountSubType: BankAccountSubType;
146
- holder: string;
147
- email: string;
148
- ownedByUser: boolean;
149
- bankAccountDetails: RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails;
150
- institution: RenameBankAccount_renamePayableAccount_BankAccount_institution | null;
151
- }
152
- type RenameBankAccount_renamePayableAccount = RenameBankAccount_renamePayableAccount_Bill | RenameBankAccount_renamePayableAccount_BankAccount;
153
-
154
81
  interface AccountPayments_paymentsForAccount {
155
82
  __typename: 'Payment';
156
83
  id: string;
@@ -180,7 +107,7 @@ interface BankAccountFragment_institution {
180
107
  __typename: 'BankAccountInstitution' | 'BillInstitution';
181
108
  id: string;
182
109
  name: string;
183
- logo: string;
110
+ logo: string | null;
184
111
  country: string;
185
112
  currency: string;
186
113
  }
@@ -242,7 +169,7 @@ interface PayableAccountFragment_Bill_institution {
242
169
  __typename: 'BankAccountInstitution' | 'BillInstitution';
243
170
  id: string;
244
171
  name: string;
245
- logo: string;
172
+ logo: string | null;
246
173
  country: string;
247
174
  currency: string;
248
175
  }
@@ -269,7 +196,7 @@ interface PayableAccountFragment_BankAccount_institution {
269
196
  __typename: 'BankAccountInstitution' | 'BillInstitution';
270
197
  id: string;
271
198
  name: string;
272
- logo: string;
199
+ logo: string | null;
273
200
  country: string;
274
201
  currency: string;
275
202
  }
@@ -291,7 +218,47 @@ interface PayableAccountFragment_BankAccount {
291
218
  bankAccountDetails: PayableAccountFragment_BankAccount_bankAccountDetails;
292
219
  institution: PayableAccountFragment_BankAccount_institution | null;
293
220
  }
294
- type PayableAccountFragment = PayableAccountFragment_Bill | PayableAccountFragment_BankAccount;
221
+ interface PayableAccountFragment_VirtualCard_billingInfo_address {
222
+ __typename: 'CardHolderAddress';
223
+ street: string | null;
224
+ street2: string | null;
225
+ city: string | null;
226
+ subdivision: string | null;
227
+ postalCode: string | null;
228
+ countryCode: string | null;
229
+ }
230
+ interface PayableAccountFragment_VirtualCard_billingInfo {
231
+ __typename: 'BillingInfo';
232
+ holder: string;
233
+ phone: string;
234
+ email: string;
235
+ address: PayableAccountFragment_VirtualCard_billingInfo_address | null;
236
+ }
237
+ interface PayableAccountFragment_VirtualCard_institution {
238
+ __typename: 'BankAccountInstitution' | 'BillInstitution';
239
+ id: string;
240
+ name: string;
241
+ logo: string | null;
242
+ country: string;
243
+ currency: string;
244
+ }
245
+ interface PayableAccountFragment_VirtualCard {
246
+ __typename: 'VirtualCard';
247
+ id: string;
248
+ name: string | null;
249
+ userId: string;
250
+ country: string;
251
+ currency: string;
252
+ createdAt: any;
253
+ type: PayableAccountType;
254
+ mask: string | null;
255
+ balance: number;
256
+ renderSecret: string | null;
257
+ virtualCardType: VirtualCardType;
258
+ billingInfo: PayableAccountFragment_VirtualCard_billingInfo | null;
259
+ institution: PayableAccountFragment_VirtualCard_institution | null;
260
+ }
261
+ type PayableAccountFragment = PayableAccountFragment_Bill | PayableAccountFragment_BankAccount | PayableAccountFragment_VirtualCard;
295
262
 
296
263
  interface PaymentFragment {
297
264
  __typename: 'Payment';
@@ -364,23 +331,23 @@ interface TransactionPriceVariables {
364
331
  amount: number;
365
332
  }
366
333
 
367
- interface UserBankAccounts_userBankAccounts_bankAccountDetails_CanadianBankAccountDetails {
334
+ interface UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails {
368
335
  __typename: 'CanadianBankAccountDetails';
369
336
  }
370
- interface UserBankAccounts_userBankAccounts_bankAccountDetails_USBankAccountDetails {
337
+ interface UserBankAccounts_bankAccounts_bankAccountDetails_USBankAccountDetails {
371
338
  __typename: 'USBankAccountDetails';
372
339
  routingNumber: string;
373
340
  }
374
- type UserBankAccounts_userBankAccounts_bankAccountDetails = UserBankAccounts_userBankAccounts_bankAccountDetails_CanadianBankAccountDetails | UserBankAccounts_userBankAccounts_bankAccountDetails_USBankAccountDetails;
375
- interface UserBankAccounts_userBankAccounts_institution {
341
+ type UserBankAccounts_bankAccounts_bankAccountDetails = UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails | UserBankAccounts_bankAccounts_bankAccountDetails_USBankAccountDetails;
342
+ interface UserBankAccounts_bankAccounts_institution {
376
343
  __typename: 'BankAccountInstitution' | 'BillInstitution';
377
344
  id: string;
378
345
  name: string;
379
- logo: string;
346
+ logo: string | null;
380
347
  country: string;
381
348
  currency: string;
382
349
  }
383
- interface UserBankAccounts_userBankAccounts {
350
+ interface UserBankAccounts_bankAccounts {
384
351
  __typename: 'BankAccount';
385
352
  id: string;
386
353
  name: string | null;
@@ -395,11 +362,11 @@ interface UserBankAccounts_userBankAccounts {
395
362
  holder: string;
396
363
  email: string;
397
364
  ownedByUser: boolean;
398
- bankAccountDetails: UserBankAccounts_userBankAccounts_bankAccountDetails;
399
- institution: UserBankAccounts_userBankAccounts_institution | null;
365
+ bankAccountDetails: UserBankAccounts_bankAccounts_bankAccountDetails;
366
+ institution: UserBankAccounts_bankAccounts_institution | null;
400
367
  }
401
368
  interface UserBankAccounts {
402
- userBankAccounts: UserBankAccounts_userBankAccounts[];
369
+ bankAccounts: UserBankAccounts_bankAccounts[];
403
370
  }
404
371
 
405
372
  interface UserFragment {
@@ -419,7 +386,7 @@ interface UserPayableAccounts_payableAccounts_Bill_institution {
419
386
  __typename: 'BankAccountInstitution' | 'BillInstitution';
420
387
  id: string;
421
388
  name: string;
422
- logo: string;
389
+ logo: string | null;
423
390
  country: string;
424
391
  currency: string;
425
392
  }
@@ -438,7 +405,7 @@ interface UserPayableAccounts_payableAccounts_BankAccount_institution {
438
405
  __typename: 'BankAccountInstitution' | 'BillInstitution';
439
406
  id: string;
440
407
  name: string;
441
- logo: string;
408
+ logo: string | null;
442
409
  country: string;
443
410
  currency: string;
444
411
  }
@@ -468,24 +435,64 @@ interface UserPayableAccounts_payableAccounts_BankAccount {
468
435
  ownedByUser: boolean;
469
436
  bankAccountDetails: UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails;
470
437
  }
471
- type UserPayableAccounts_payableAccounts = UserPayableAccounts_payableAccounts_Bill | UserPayableAccounts_payableAccounts_BankAccount;
438
+ interface UserPayableAccounts_payableAccounts_VirtualCard_institution {
439
+ __typename: 'BankAccountInstitution' | 'BillInstitution';
440
+ id: string;
441
+ name: string;
442
+ logo: string | null;
443
+ country: string;
444
+ currency: string;
445
+ }
446
+ interface UserPayableAccounts_payableAccounts_VirtualCard_billingInfo_address {
447
+ __typename: 'CardHolderAddress';
448
+ street: string | null;
449
+ street2: string | null;
450
+ city: string | null;
451
+ subdivision: string | null;
452
+ postalCode: string | null;
453
+ countryCode: string | null;
454
+ }
455
+ interface UserPayableAccounts_payableAccounts_VirtualCard_billingInfo {
456
+ __typename: 'BillingInfo';
457
+ holder: string;
458
+ phone: string;
459
+ email: string;
460
+ address: UserPayableAccounts_payableAccounts_VirtualCard_billingInfo_address | null;
461
+ }
462
+ interface UserPayableAccounts_payableAccounts_VirtualCard {
463
+ __typename: 'VirtualCard';
464
+ id: string;
465
+ name: string | null;
466
+ userId: string;
467
+ country: string;
468
+ currency: string;
469
+ createdAt: any;
470
+ type: PayableAccountType;
471
+ institution: UserPayableAccounts_payableAccounts_VirtualCard_institution | null;
472
+ mask: string | null;
473
+ balance: number;
474
+ renderSecret: string | null;
475
+ virtualCardType: VirtualCardType;
476
+ billingInfo: UserPayableAccounts_payableAccounts_VirtualCard_billingInfo | null;
477
+ }
478
+ type UserPayableAccounts_payableAccounts = UserPayableAccounts_payableAccounts_Bill | UserPayableAccounts_payableAccounts_BankAccount | UserPayableAccounts_payableAccounts_VirtualCard;
472
479
  interface UserPayableAccounts {
473
480
  payableAccounts: UserPayableAccounts_payableAccounts[];
474
481
  }
475
482
 
476
483
  interface UserVerification_verification_identity_user {
477
484
  __typename: 'UserIdentity';
478
- firstName: string;
479
- lastName: string;
480
- email: string;
481
- completedAt: string;
485
+ firstName: string | null;
486
+ lastName: string | null;
487
+ email: string | null;
488
+ completedAt: string | null;
482
489
  }
483
490
  interface UserVerification_verification_identity {
484
491
  __typename: 'IdentityModule';
485
492
  status: ModuleStatus;
486
- country: string;
493
+ country: string | null;
487
494
  verificationUrl: string | null;
488
- user: UserVerification_verification_identity_user;
495
+ user: UserVerification_verification_identity_user | null;
489
496
  }
490
497
  interface UserVerification_verification {
491
498
  __typename: 'Verification';
@@ -493,7 +500,74 @@ interface UserVerification_verification {
493
500
  identity: UserVerification_verification_identity;
494
501
  }
495
502
  interface UserVerification {
496
- verification: UserVerification_verification;
503
+ verification: UserVerification_verification | null;
504
+ }
505
+
506
+ interface UserVirtualDebitCard_virtualDebitCard_billingInfo_address {
507
+ __typename: 'CardHolderAddress';
508
+ street: string | null;
509
+ street2: string | null;
510
+ city: string | null;
511
+ subdivision: string | null;
512
+ postalCode: string | null;
513
+ countryCode: string | null;
514
+ }
515
+ interface UserVirtualDebitCard_virtualDebitCard_billingInfo {
516
+ __typename: 'BillingInfo';
517
+ holder: string;
518
+ phone: string;
519
+ email: string;
520
+ address: UserVirtualDebitCard_virtualDebitCard_billingInfo_address | null;
521
+ }
522
+ interface UserVirtualDebitCard_virtualDebitCard {
523
+ __typename: 'VirtualCard';
524
+ id: string;
525
+ name: string | null;
526
+ userId: string;
527
+ country: string;
528
+ currency: string;
529
+ createdAt: any;
530
+ type: PayableAccountType;
531
+ mask: string | null;
532
+ balance: number;
533
+ renderSecret: string | null;
534
+ virtualCardType: VirtualCardType;
535
+ billingInfo: UserVirtualDebitCard_virtualDebitCard_billingInfo | null;
536
+ }
537
+ interface UserVirtualDebitCard {
538
+ virtualDebitCard: UserVirtualDebitCard_virtualDebitCard | null;
539
+ }
540
+
541
+ interface VirtualDebitCardFragment_billingInfo_address {
542
+ __typename: 'CardHolderAddress';
543
+ street: string | null;
544
+ street2: string | null;
545
+ city: string | null;
546
+ subdivision: string | null;
547
+ postalCode: string | null;
548
+ countryCode: string | null;
549
+ }
550
+ interface VirtualDebitCardFragment_billingInfo {
551
+ __typename: 'BillingInfo';
552
+ holder: string;
553
+ phone: string;
554
+ email: string;
555
+ address: VirtualDebitCardFragment_billingInfo_address | null;
556
+ }
557
+ interface VirtualDebitCardFragment {
558
+ __typename: 'VirtualCard';
559
+ id: string;
560
+ name: string | null;
561
+ userId: string;
562
+ country: string;
563
+ currency: string;
564
+ createdAt: any;
565
+ type: PayableAccountType;
566
+ mask: string | null;
567
+ balance: number;
568
+ renderSecret: string | null;
569
+ virtualCardType: VirtualCardType;
570
+ billingInfo: VirtualDebitCardFragment_billingInfo | null;
497
571
  }
498
572
 
499
573
  interface WalletTokenBalances_tokenBalances {
@@ -538,7 +612,7 @@ interface CreateUSBankAccount_createUSBankAccount_institution {
538
612
  __typename: 'BankAccountInstitution' | 'BillInstitution';
539
613
  id: string;
540
614
  name: string;
541
- logo: string;
615
+ logo: string | null;
542
616
  country: string;
543
617
  currency: string;
544
618
  }
@@ -567,6 +641,76 @@ interface CreateUSBankAccountVariables {
567
641
  createUSAccountInput: USBankAccountInput;
568
642
  }
569
643
 
644
+ interface DeletePayableAccount_deletePayableAccount_BankAccount_institution {
645
+ __typename: 'BankAccountInstitution' | 'BillInstitution';
646
+ id: string;
647
+ name: string;
648
+ logo: string | null;
649
+ country: string;
650
+ currency: string;
651
+ }
652
+ interface DeletePayableAccount_deletePayableAccount_BankAccount_bankAccountDetails_CanadianBankAccountDetails {
653
+ __typename: 'CanadianBankAccountDetails';
654
+ }
655
+ interface DeletePayableAccount_deletePayableAccount_BankAccount_bankAccountDetails_USBankAccountDetails {
656
+ __typename: 'USBankAccountDetails';
657
+ routingNumber: string;
658
+ }
659
+ type DeletePayableAccount_deletePayableAccount_BankAccount_bankAccountDetails = DeletePayableAccount_deletePayableAccount_BankAccount_bankAccountDetails_CanadianBankAccountDetails | DeletePayableAccount_deletePayableAccount_BankAccount_bankAccountDetails_USBankAccountDetails;
660
+ interface DeletePayableAccount_deletePayableAccount_BankAccount {
661
+ __typename: 'BankAccount';
662
+ id: string;
663
+ name: string | null;
664
+ userId: string;
665
+ country: string;
666
+ currency: string;
667
+ createdAt: any;
668
+ type: PayableAccountType;
669
+ institution: DeletePayableAccount_deletePayableAccount_BankAccount_institution | null;
670
+ accountNumber: string;
671
+ bankAccountType: BankAccountType;
672
+ bankAccountSubType: BankAccountSubType;
673
+ holder: string;
674
+ email: string;
675
+ ownedByUser: boolean;
676
+ bankAccountDetails: DeletePayableAccount_deletePayableAccount_BankAccount_bankAccountDetails;
677
+ }
678
+
679
+ interface RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails_CanadianBankAccountDetails {
680
+ __typename: 'CanadianBankAccountDetails';
681
+ }
682
+ interface RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails_USBankAccountDetails {
683
+ __typename: 'USBankAccountDetails';
684
+ routingNumber: string;
685
+ }
686
+ type RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails = RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails_CanadianBankAccountDetails | RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails_USBankAccountDetails;
687
+ interface RenameBankAccount_renamePayableAccount_BankAccount_institution {
688
+ __typename: 'BankAccountInstitution' | 'BillInstitution';
689
+ id: string;
690
+ name: string;
691
+ logo: string | null;
692
+ country: string;
693
+ currency: string;
694
+ }
695
+ interface RenameBankAccount_renamePayableAccount_BankAccount {
696
+ __typename: 'BankAccount';
697
+ id: string;
698
+ name: string | null;
699
+ userId: string;
700
+ country: string;
701
+ currency: string;
702
+ createdAt: any;
703
+ type: PayableAccountType;
704
+ accountNumber: string;
705
+ bankAccountType: BankAccountType;
706
+ bankAccountSubType: BankAccountSubType;
707
+ holder: string;
708
+ email: string;
709
+ ownedByUser: boolean;
710
+ bankAccountDetails: RenameBankAccount_renamePayableAccount_BankAccount_bankAccountDetails;
711
+ institution: RenameBankAccount_renamePayableAccount_BankAccount_institution | null;
712
+ }
713
+
570
714
  interface QueryParams<V = any> {
571
715
  query: DocumentNode;
572
716
  variables?: V;
@@ -578,10 +722,10 @@ declare class GraphClient {
578
722
  query<Q = any, V = any>({ query, variables }: QueryParams<V>): Promise<Q>;
579
723
  }
580
724
 
581
- type CreateInputMapping = {
725
+ type CreateInputMapping$1 = {
582
726
  [BankAccountType.USBankAccount]: USBankAccountInput;
583
727
  };
584
- type CreateMutationMapping = {
728
+ type CreateMutationMapping$1 = {
585
729
  [BankAccountType.USBankAccount]: {
586
730
  query: CreateUSBankAccount;
587
731
  variables: CreateUSBankAccountVariables;
@@ -591,10 +735,10 @@ type CreateMutationMapping = {
591
735
  declare class BankAccountService {
592
736
  private client;
593
737
  constructor(client: GraphClient);
594
- list(): Promise<UserBankAccounts_userBankAccounts[]>;
595
- rename(accountId: string, name: string): Promise<RenameBankAccount_renamePayableAccount>;
596
- delete(accountId: string): Promise<DeleteBankAccount_deletePayableAccount>;
597
- create<T extends BankAccountType>(type: T, input: CreateInputMapping[T]): Promise<NonNullable<CreateMutationMapping[T]["query"][keyof CreateMutationMapping[T]["query"]]> | null>;
738
+ list(): Promise<UserBankAccounts_bankAccounts[]>;
739
+ rename(accountId: string, name: string): Promise<RenameBankAccount_renamePayableAccount_BankAccount>;
740
+ delete(accountId: string): Promise<DeletePayableAccount_deletePayableAccount_BankAccount>;
741
+ create<T extends BankAccountType>(type: T, input: CreateInputMapping$1[T]): Promise<NonNullable<CreateMutationMapping$1[T]["query"][keyof CreateMutationMapping$1[T]["query"]]> | null>;
598
742
  }
599
743
 
600
744
  declare class PaymentService {
@@ -660,8 +804,61 @@ declare class UserService {
660
804
  private client;
661
805
  constructor(client: GraphClient);
662
806
  createUser(args: CreateUserArgs): Promise<CreateUserResponse>;
807
+ create(args: CreateUserArgs): Promise<CreateUserResponse>;
663
808
  getCurrentUser(): Promise<CurrentUser_me>;
664
- getUserVerification(): Promise<UserVerification_verification>;
809
+ getUserVerification(): Promise<UserVerification_verification | null>;
810
+ }
811
+
812
+ interface CreateUSVirtualDebitCard_createUSVirtualDebitCard_billingInfo_address {
813
+ __typename: 'CardHolderAddress';
814
+ street: string | null;
815
+ street2: string | null;
816
+ city: string | null;
817
+ subdivision: string | null;
818
+ postalCode: string | null;
819
+ countryCode: string | null;
820
+ }
821
+ interface CreateUSVirtualDebitCard_createUSVirtualDebitCard_billingInfo {
822
+ __typename: 'BillingInfo';
823
+ holder: string;
824
+ phone: string;
825
+ email: string;
826
+ address: CreateUSVirtualDebitCard_createUSVirtualDebitCard_billingInfo_address | null;
827
+ }
828
+ interface CreateUSVirtualDebitCard_createUSVirtualDebitCard {
829
+ __typename: 'VirtualCard';
830
+ id: string;
831
+ name: string | null;
832
+ userId: string;
833
+ country: string;
834
+ currency: string;
835
+ createdAt: any;
836
+ type: PayableAccountType;
837
+ mask: string | null;
838
+ balance: number;
839
+ renderSecret: string | null;
840
+ virtualCardType: VirtualCardType;
841
+ billingInfo: CreateUSVirtualDebitCard_createUSVirtualDebitCard_billingInfo | null;
842
+ }
843
+ interface CreateUSVirtualDebitCard {
844
+ createUSVirtualDebitCard: CreateUSVirtualDebitCard_createUSVirtualDebitCard;
845
+ }
846
+
847
+ type CreateInputMapping = {
848
+ [VirtualCardType.USVirtualDebitCard]: undefined;
849
+ };
850
+ type CreateMutationMapping = {
851
+ [VirtualCardType.USVirtualDebitCard]: {
852
+ query: CreateUSVirtualDebitCard;
853
+ variables: undefined;
854
+ response: keyof CreateUSVirtualDebitCard;
855
+ };
856
+ };
857
+ declare class VirtualCardService {
858
+ private client;
859
+ constructor(client: GraphClient);
860
+ fetch(): Promise<UserVirtualDebitCard_virtualDebitCard | null>;
861
+ create<T extends VirtualCardType>(type: T, input: CreateInputMapping[T]): Promise<NonNullable<CreateMutationMapping[T]["query"][keyof CreateMutationMapping[T]["query"]]> | null>;
665
862
  }
666
863
 
667
864
  type ClientParams = {
@@ -678,10 +875,11 @@ declare class SpritzApiClient {
678
875
  bankAccount: BankAccountService;
679
876
  paymentRequest: PaymentRequestService;
680
877
  payment: PaymentService;
878
+ virtualCard: VirtualCardService;
681
879
  constructor(apiKey: string, integrationKey: string, environment: Environment);
682
880
  static initialize({ environment, apiKey, integrationKey }: ClientParams): SpritzApiClient;
683
881
  private init;
684
882
  setApiKey(_apiKey: string): this;
685
883
  }
686
884
 
687
- export { AccountPayments, AccountPaymentsVariables, AccountPayments_paymentsForAccount, AccountProvider, BankAccountFragment, BankAccountFragment_bankAccountDetails, BankAccountFragment_bankAccountDetails_CanadianBankAccountDetails, BankAccountFragment_bankAccountDetails_USBankAccountDetails, BankAccountFragment_institution, BankAccountSubType, BankAccountType, CreateDirectPaymentInput, CreatePaymentRequestInput, CurrentUser, CurrentUser_me, DirectPaymentStatus, Environment, GetSpritzPayParams, GetSpritzPayParamsVariables, GetSpritzPayParams_spritzPayParams, ModuleStatus, PayableAccountFragment, PayableAccountFragment_BankAccount, PayableAccountFragment_BankAccount_bankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_CanadianBankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_USBankAccountDetails, PayableAccountFragment_BankAccount_institution, PayableAccountFragment_Bill, PayableAccountFragment_Bill_institution, PayableAccountType, PaymentFragment, PaymentNetwork, PaymentRequestFragment, PaymentRequestPayment, PaymentRequestPaymentVariables, PaymentRequestPayment_paymentForPaymentRequest, PaymentStatus, SpritzApiClient, TokenBalanceFragment, TransactionPrice, TransactionPriceVariables, USBankAccountInput, UserBankAccounts, UserBankAccounts_userBankAccounts, UserBankAccounts_userBankAccounts_bankAccountDetails, UserBankAccounts_userBankAccounts_bankAccountDetails_CanadianBankAccountDetails, UserBankAccounts_userBankAccounts_bankAccountDetails_USBankAccountDetails, UserBankAccounts_userBankAccounts_institution, UserFragment, UserPayableAccounts, UserPayableAccounts_payableAccounts, UserPayableAccounts_payableAccounts_BankAccount, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_CanadianBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_USBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_institution, UserPayableAccounts_payableAccounts_Bill, UserPayableAccounts_payableAccounts_Bill_institution, UserVerification, UserVerification_verification, UserVerification_verification_identity, UserVerification_verification_identity_user, WalletTokenBalances, WalletTokenBalancesVariables, WalletTokenBalances_tokenBalances };
885
+ export { AccountPayments, AccountPaymentsVariables, AccountPayments_paymentsForAccount, BankAccountFragment, BankAccountFragment_bankAccountDetails, BankAccountFragment_bankAccountDetails_CanadianBankAccountDetails, BankAccountFragment_bankAccountDetails_USBankAccountDetails, BankAccountFragment_institution, BankAccountSubType, BankAccountType, CreateDirectPaymentInput, CreatePaymentRequestInput, CurrentUser, CurrentUser_me, Environment, GetSpritzPayParams, GetSpritzPayParamsVariables, GetSpritzPayParams_spritzPayParams, PayableAccountFragment, PayableAccountFragment_BankAccount, PayableAccountFragment_BankAccount_bankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_CanadianBankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_USBankAccountDetails, PayableAccountFragment_BankAccount_institution, PayableAccountFragment_Bill, PayableAccountFragment_Bill_institution, PayableAccountFragment_VirtualCard, PayableAccountFragment_VirtualCard_billingInfo, PayableAccountFragment_VirtualCard_billingInfo_address, PayableAccountFragment_VirtualCard_institution, PayableAccountType, PaymentFragment, PaymentNetwork, PaymentRequestFragment, PaymentRequestPayment, PaymentRequestPaymentVariables, PaymentRequestPayment_paymentForPaymentRequest, DirectPaymentStatus as PaymentRequestStatus, PaymentStatus, SpritzApiClient, TokenBalanceFragment, TransactionPrice, TransactionPriceVariables, USBankAccountInput, UserBankAccounts, UserBankAccounts_bankAccounts, UserBankAccounts_bankAccounts_bankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_USBankAccountDetails, UserBankAccounts_bankAccounts_institution, UserFragment, UserPayableAccounts, UserPayableAccounts_payableAccounts, UserPayableAccounts_payableAccounts_BankAccount, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_CanadianBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_USBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_institution, UserPayableAccounts_payableAccounts_Bill, UserPayableAccounts_payableAccounts_Bill_institution, UserPayableAccounts_payableAccounts_VirtualCard, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo_address, UserPayableAccounts_payableAccounts_VirtualCard_institution, UserVerification, UserVerification_verification, UserVerification_verification_identity, UserVerification_verification_identity_user, UserVirtualDebitCard, UserVirtualDebitCard_virtualDebitCard, UserVirtualDebitCard_virtualDebitCard_billingInfo, UserVirtualDebitCard_virtualDebitCard_billingInfo_address, VirtualCardType, VirtualDebitCardFragment, VirtualDebitCardFragment_billingInfo, VirtualDebitCardFragment_billingInfo_address, WalletTokenBalances, WalletTokenBalancesVariables, WalletTokenBalances_tokenBalances };