@vertikalx/vtx-backend-client 3.0.0-dev.9 → 3.0.1-dev-max.1

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.
Files changed (82) hide show
  1. package/package.json +16 -3
  2. package/src/api/api-call-headers.js.map +1 -1
  3. package/src/api/api-call-headers.ts +35 -0
  4. package/src/api/backend-response.js.map +1 -1
  5. package/src/api/backend-response.ts +14 -0
  6. package/src/api/domains.js.map +1 -1
  7. package/src/api/domains.ts +6 -0
  8. package/src/api/response-builder.js.map +1 -1
  9. package/src/api/response-builder.ts +165 -0
  10. package/src/api/types.js.map +1 -1
  11. package/src/api/types.ts +9 -0
  12. package/src/api/vtx-apikey-api.js.map +1 -1
  13. package/src/api/vtx-apikey-api.ts +23 -0
  14. package/src/api/vtx-base-api.d.ts +230 -15
  15. package/src/api/vtx-base-api.js +590 -8340
  16. package/src/api/vtx-base-api.js.map +1 -1
  17. package/src/api/vtx-base-api.ts +2253 -0
  18. package/src/api/vtx-mobile-api.d.ts +3 -1
  19. package/src/api/vtx-mobile-api.js +3 -37
  20. package/src/api/vtx-mobile-api.js.map +1 -1
  21. package/src/api/vtx-mobile-api.ts +43 -0
  22. package/src/api/vtx-web-browser-api.js +1 -0
  23. package/src/api/vtx-web-browser-api.js.map +1 -1
  24. package/src/api/vtx-web-browser-api.ts +46 -0
  25. package/src/api/vtx-web-server-api.js +1 -0
  26. package/src/api/vtx-web-server-api.js.map +1 -1
  27. package/src/api/vtx-web-server-api.ts +41 -0
  28. package/src/client/index.js.map +1 -1
  29. package/src/client/index.ts +65 -0
  30. package/src/client/runtime/batcher.js.map +1 -1
  31. package/src/client/runtime/batcher.ts +275 -0
  32. package/src/client/runtime/createClient.js.map +1 -1
  33. package/src/client/runtime/createClient.ts +68 -0
  34. package/src/client/runtime/error.js.map +1 -1
  35. package/src/client/runtime/error.ts +29 -0
  36. package/src/client/runtime/fetcher.js.map +1 -1
  37. package/src/client/runtime/fetcher.ts +97 -0
  38. package/src/client/runtime/generateGraphqlOperation.js.map +1 -1
  39. package/src/client/runtime/generateGraphqlOperation.ts +225 -0
  40. package/src/client/runtime/index.js.map +1 -1
  41. package/src/client/runtime/index.ts +13 -0
  42. package/src/client/runtime/linkTypeMap.js.map +1 -1
  43. package/src/client/runtime/linkTypeMap.ts +156 -0
  44. package/src/client/runtime/typeSelection.js.map +1 -1
  45. package/src/client/runtime/typeSelection.ts +95 -0
  46. package/src/client/runtime/types.js.map +1 -1
  47. package/src/client/runtime/types.ts +69 -0
  48. package/src/client/schema.d.ts +3521 -765
  49. package/src/client/schema.graphql +4256 -0
  50. package/src/client/schema.js +693 -90
  51. package/src/client/schema.js.map +1 -1
  52. package/src/client/schema.ts +8329 -0
  53. package/src/client/types.d.ts +1817 -379
  54. package/src/client/types.js +6010 -2227
  55. package/src/client/types.js.map +1 -1
  56. package/src/client/types.ts +10578 -0
  57. package/src/generated/graphql.d.ts +13696 -0
  58. package/src/generated/graphql.js +5830 -0
  59. package/src/generated/graphql.js.map +1 -0
  60. package/src/generated/graphql.ts +12445 -0
  61. package/src/index.d.ts +2 -0
  62. package/src/index.js +3 -0
  63. package/src/index.js.map +1 -1
  64. package/src/index.ts +16 -0
  65. package/src/operations/admin.graphql +19 -0
  66. package/src/operations/ai-coach.graphql +117 -0
  67. package/src/operations/athlete.graphql +1764 -0
  68. package/src/operations/auth.graphql +301 -0
  69. package/src/operations/campaign.graphql +775 -0
  70. package/src/operations/email-campaign.graphql +160 -0
  71. package/src/operations/followers.graphql +45 -0
  72. package/src/operations/integrations.graphql +216 -0
  73. package/src/operations/leaderboard.graphql +54 -0
  74. package/src/operations/media.graphql +179 -0
  75. package/src/operations/notifications.graphql +93 -0
  76. package/src/operations/offers.graphql +368 -0
  77. package/src/operations/onboarding.graphql +29 -0
  78. package/src/operations/sponsor.graphql +368 -0
  79. package/src/operations/sport.graphql +132 -0
  80. package/src/operations/user.graphql +446 -0
  81. package/tsconfig.lib.json +10 -0
  82. package/tsconfig.lib.tsbuildinfo +1 -1
@@ -0,0 +1,775 @@
1
+ # ============================================================
2
+ # Campaign, Donation, Stripe, and Transaction Operations
3
+ # ============================================================
4
+
5
+ # --- Campaign fragment for full field selection ---
6
+ fragment CampaignFields on FundRaisingCampaign {
7
+ _id
8
+ budgetMode
9
+ status
10
+ title
11
+ slug
12
+ motivation
13
+ website
14
+ fundsRequired
15
+ initialFundsObtained
16
+ fundsObtained
17
+ vtxComissionPct
18
+ createdDate
19
+ endingDate
20
+ video {
21
+ _id
22
+ source
23
+ url
24
+ sourceData
25
+ }
26
+ location {
27
+ userProvidedLatitude
28
+ userProvidedLongitude
29
+ cityNameGeocode
30
+ stateNameGeocode
31
+ countryIso2CodeGeocode
32
+ timeZoneGeocode
33
+ latitudeGeocode
34
+ longitudeGeocode
35
+ city {
36
+ _id
37
+ name
38
+ localizedName
39
+ state {
40
+ _id
41
+ name
42
+ country {
43
+ _id
44
+ name
45
+ }
46
+ }
47
+ latitude
48
+ longitude
49
+ timezone
50
+ }
51
+ }
52
+ budget {
53
+ initialFunds
54
+ totalRequired
55
+ items {
56
+ _id
57
+ quantity
58
+ concept
59
+ itemCost
60
+ unit
61
+ }
62
+ }
63
+ competitions {
64
+ _id
65
+ event {
66
+ _id
67
+ name
68
+ mainSport {
69
+ _id
70
+ name
71
+ }
72
+ eventWebSite
73
+ startDate
74
+ endDate
75
+ verified
76
+ banner {
77
+ _id
78
+ name
79
+ contentType
80
+ size
81
+ useType
82
+ url
83
+ key
84
+ }
85
+ location {
86
+ _id
87
+ userProvidedLatitude
88
+ userProvidedLongitude
89
+ cityNameGeocode
90
+ stateNameGeocode
91
+ countryIso2CodeGeocode
92
+ timeZoneGeocode
93
+ latitudeGeocode
94
+ longitudeGeocode
95
+ city {
96
+ _id
97
+ name
98
+ localizedName
99
+ state {
100
+ _id
101
+ name
102
+ country {
103
+ _id
104
+ name
105
+ }
106
+ }
107
+ latitude
108
+ longitude
109
+ timezone
110
+ }
111
+ }
112
+ }
113
+ participationDate
114
+ competitionNumber
115
+ result {
116
+ resultType
117
+ position
118
+ score
119
+ finishTimeMS
120
+ resultWebLink
121
+ }
122
+ fundRaisingCampaignIds
123
+ }
124
+ coverImage {
125
+ _id
126
+ url
127
+ key
128
+ name
129
+ contentType
130
+ size
131
+ useType
132
+ }
133
+ }
134
+
135
+ # --- Browse campaign fragment (lighter selection for lists) ---
136
+ fragment BrowseCampaignFields on FundRaisingCampaign {
137
+ _id
138
+ title
139
+ slug
140
+ motivation
141
+ fundsRequired
142
+ fundsObtained
143
+ website
144
+ status
145
+ createdDate
146
+ endingDate
147
+ video {
148
+ _id
149
+ url
150
+ }
151
+ location {
152
+ _id
153
+ cityNameGeocode
154
+ stateNameGeocode
155
+ countryIso2CodeGeocode
156
+ city {
157
+ _id
158
+ name
159
+ state {
160
+ _id
161
+ name
162
+ country {
163
+ _id
164
+ name
165
+ }
166
+ }
167
+ }
168
+ }
169
+ coverImage {
170
+ _id
171
+ url
172
+ key
173
+ name
174
+ contentType
175
+ size
176
+ useType
177
+ }
178
+ budgetMode
179
+ budget {
180
+ _id
181
+ items {
182
+ _id
183
+ concept
184
+ quantity
185
+ itemCost
186
+ unit
187
+ }
188
+ }
189
+ competitions {
190
+ _id
191
+ event {
192
+ _id
193
+ name
194
+ }
195
+ budget {
196
+ _id
197
+ items {
198
+ _id
199
+ concept
200
+ quantity
201
+ itemCost
202
+ unit
203
+ }
204
+ }
205
+ }
206
+ athlete {
207
+ _id
208
+ firstName
209
+ lastName
210
+ screenName
211
+ scores {
212
+ vtxScore
213
+ }
214
+ profilePicture {
215
+ _id
216
+ url
217
+ key
218
+ }
219
+ mainSport {
220
+ _id
221
+ name
222
+ }
223
+ mainSportLevel {
224
+ _id
225
+ label
226
+ index
227
+ }
228
+ country {
229
+ _id
230
+ name
231
+ }
232
+ }
233
+ }
234
+
235
+ # --- Donation fields fragment ---
236
+ fragment DonationFields on Donation {
237
+ checkoutSessionId
238
+ fundingCheckoutSessionDataId
239
+ donationMode
240
+ donorName
241
+ donorEmail
242
+ completed
243
+ confirmed
244
+ donationAmount
245
+ completedDate
246
+ createdDate
247
+ athleteId
248
+ athleteName
249
+ message
250
+ }
251
+
252
+ # --- Athlete reference fragment for donation context ---
253
+ fragment DonationAthleteRef on AthleteReference {
254
+ _id
255
+ firstName
256
+ lastName
257
+ screenName
258
+ competitionGender
259
+ country {
260
+ _id
261
+ name
262
+ }
263
+ location {
264
+ _id
265
+ city {
266
+ _id
267
+ name
268
+ state {
269
+ _id
270
+ name
271
+ country {
272
+ _id
273
+ name
274
+ }
275
+ }
276
+ }
277
+ }
278
+ mainSport {
279
+ _id
280
+ name
281
+ }
282
+ mainSportLevel {
283
+ _id
284
+ label
285
+ }
286
+ profilePicture {
287
+ _id
288
+ name
289
+ contentType
290
+ size
291
+ useType
292
+ url
293
+ key
294
+ }
295
+ }
296
+
297
+ # ============================================================
298
+ # Campaign Queries
299
+ # ============================================================
300
+
301
+ query GetAthleteCampaigns($input: GetAthleteCampaignsDto!) {
302
+ getAthleteCampaigns(input: $input) {
303
+ ...CampaignFields
304
+ athlete {
305
+ _id
306
+ firstName
307
+ lastName
308
+ screenName
309
+ }
310
+ }
311
+ }
312
+
313
+ query BrowseCampaigns($input: BrowseCampaignsDto!) {
314
+ browseCampaigns(input: $input) {
315
+ campaigns {
316
+ ...BrowseCampaignFields
317
+ }
318
+ featuredPopular {
319
+ ...BrowseCampaignFields
320
+ }
321
+ featuredEndingSoon {
322
+ ...BrowseCampaignFields
323
+ }
324
+ total
325
+ page
326
+ limit
327
+ hasMore
328
+ }
329
+ }
330
+
331
+ # ============================================================
332
+ # Campaign Mutations
333
+ # ============================================================
334
+
335
+ mutation CreateFundingCampaign($input: CreateFundingCampaignDto!) {
336
+ createFundingCampaign(input: $input) {
337
+ ...CampaignFields
338
+ }
339
+ }
340
+
341
+ mutation UpdateFundingCampaign($input: UpdateFundingCampaignDto!) {
342
+ updateFundingCampaign(input: $input) {
343
+ ...CampaignFields
344
+ }
345
+ }
346
+
347
+ mutation DeleteFundingCampaign($input: DeleteSingleValueDto!) {
348
+ deleteFundingCampaign(input: $input) {
349
+ idToDelete
350
+ deleted
351
+ failureReason {
352
+ code
353
+ message
354
+ }
355
+ }
356
+ }
357
+
358
+ mutation DeleteFundingCampaigns($input: DeleteValuesDto!) {
359
+ deleteFundingCampaigns(input: $input) {
360
+ deleted
361
+ failedToDelete
362
+ failureReason {
363
+ code
364
+ message
365
+ }
366
+ result
367
+ }
368
+ }
369
+
370
+ mutation SetFundingStatus($input: SetFundingStatusDto!) {
371
+ setFundingStatus(input: $input) {
372
+ ...CampaignFields
373
+ }
374
+ }
375
+
376
+ mutation SetCurrentCampaign($input: SetCurrentCampaignDto!) {
377
+ setCurrentCampaign(input: $input) {
378
+ ...CampaignFields
379
+ }
380
+ }
381
+
382
+ # ============================================================
383
+ # Donation Queries
384
+ # ============================================================
385
+
386
+ query GetDonationsByAthlete {
387
+ getDonationsByAthlete {
388
+ receiptId
389
+ campaignName
390
+ athleteName
391
+ donorName
392
+ amount
393
+ currency
394
+ dateIssued
395
+ confirmed
396
+ message
397
+ }
398
+ }
399
+
400
+ query GetDonationsByMember {
401
+ getDonationsByMember {
402
+ ...DonationFields
403
+ athleteReference {
404
+ ...DonationAthleteRef
405
+ }
406
+ campaignReference {
407
+ _id
408
+ athlete {
409
+ ...DonationAthleteRef
410
+ }
411
+ status
412
+ title
413
+ motivation
414
+ website
415
+ fundsRequired
416
+ initialFundsObtained
417
+ fundsObtained
418
+ endingDate
419
+ video {
420
+ _id
421
+ source
422
+ url
423
+ sourceData
424
+ }
425
+ }
426
+ }
427
+ }
428
+
429
+ query GetDonationsToAthlete($athleteId: String!) {
430
+ getDonationsToAthlete(athleteId: $athleteId) {
431
+ ...DonationFields
432
+ campaignReference {
433
+ _id
434
+ title
435
+ status
436
+ website
437
+ }
438
+ }
439
+ }
440
+
441
+ query GetDonationsToMe {
442
+ getDonationsToMe {
443
+ ...DonationFields
444
+ campaignReference {
445
+ _id
446
+ title
447
+ status
448
+ website
449
+ }
450
+ }
451
+ }
452
+
453
+ query GetDonationsByUser($email: String!) {
454
+ getDonationsByUser(email: $email) {
455
+ ...DonationFields
456
+ campaignReference {
457
+ _id
458
+ title
459
+ status
460
+ website
461
+ }
462
+ }
463
+ }
464
+
465
+ query GetDonationDatesForCalendar($campaignId: String) {
466
+ getDonationDatesForCalendar(campaignId: $campaignId) {
467
+ dates
468
+ totalDonations
469
+ }
470
+ }
471
+
472
+ query GetDonationsPaginated($query: DonationQueryDto) {
473
+ getDonationsPaginated(query: $query) {
474
+ donations {
475
+ ...DonationFields
476
+ }
477
+ pagination {
478
+ currentPage
479
+ itemsPerPage
480
+ totalItems
481
+ totalPages
482
+ hasNextPage
483
+ hasPreviousPage
484
+ }
485
+ }
486
+ }
487
+
488
+ # ============================================================
489
+ # Stripe Queries
490
+ # ============================================================
491
+
492
+ query GetStripeBalance {
493
+ getStripeBalance {
494
+ availableUSD
495
+ pendingUSD
496
+ currency
497
+ availableBalances {
498
+ amount
499
+ currency
500
+ }
501
+ pendingBalances {
502
+ amount
503
+ currency
504
+ }
505
+ }
506
+ }
507
+
508
+ query StripeQuery($input: StripeQueryDto!) {
509
+ stripeQuery(input: $input) {
510
+ type
511
+ json
512
+ }
513
+ }
514
+
515
+ # ============================================================
516
+ # Stripe Mutations
517
+ # ============================================================
518
+
519
+ mutation CreateStripeAccount($input: CreateStripeAccountDto!) {
520
+ createStripeAccount(input: $input) {
521
+ _id
522
+ stripeAccountId
523
+ account {
524
+ id
525
+ object
526
+ business_type
527
+ country
528
+ email
529
+ capabilities {
530
+ acss_debit_payments
531
+ affirm_payments
532
+ afterpay_clearpay_payments
533
+ alma_payments
534
+ amazon_pay_payments
535
+ au_becs_debit_payments
536
+ bacs_debit_payments
537
+ bancontact_payments
538
+ bank_transfer_payments
539
+ blik_payments
540
+ boleto_payments
541
+ card_issuing
542
+ card_payments
543
+ cartes_bancaires_payments
544
+ cashapp_payments
545
+ eps_payments
546
+ fpx_payments
547
+ gb_bank_transfer_payments
548
+ giropay_payments
549
+ grabpay_payments
550
+ ideal_payments
551
+ india_international_payments
552
+ jcb_payments
553
+ jp_bank_transfer_payments
554
+ kakao_pay_payments
555
+ klarna_payments
556
+ konbini_payments
557
+ kr_card_payments
558
+ legacy_payments
559
+ link_payments
560
+ mobilepay_payments
561
+ multibanco_payments
562
+ mx_bank_transfer_payments
563
+ naver_pay_payments
564
+ oxxo_payments
565
+ p24_payments
566
+ pay_by_bank_payments
567
+ payco_payments
568
+ paynow_payments
569
+ promptpay_payments
570
+ revolut_pay_payments
571
+ samsung_pay_payments
572
+ sepa_bank_transfer_payments
573
+ sepa_debit_payments
574
+ sofort_payments
575
+ swish_payments
576
+ tax_reporting_us_1099_k
577
+ tax_reporting_us_1099_misc
578
+ transfers
579
+ treasury
580
+ twint_payments
581
+ us_bank_account_ach_payments
582
+ us_bank_transfer_payments
583
+ zip_payments
584
+ }
585
+ requirements {
586
+ alternatives {
587
+ alternative_fields_due
588
+ original_fields_due
589
+ }
590
+ current_deadline
591
+ currently_due
592
+ disabled_reason
593
+ errors {
594
+ code
595
+ reason
596
+ requirement
597
+ }
598
+ eventually_due
599
+ past_due
600
+ pending_verification
601
+ }
602
+ future_requirements {
603
+ alternatives {
604
+ alternative_fields_due
605
+ original_fields_due
606
+ }
607
+ current_deadline
608
+ currently_due
609
+ disabled_reason
610
+ errors {
611
+ code
612
+ reason
613
+ requirement
614
+ }
615
+ eventually_due
616
+ past_due
617
+ pending_verification
618
+ }
619
+ type
620
+ charges_enabled
621
+ payouts_enabled
622
+ created
623
+ default_currency
624
+ }
625
+ }
626
+ }
627
+
628
+ mutation CreateAthleteStripeSession {
629
+ createAthleteStripeSession {
630
+ account
631
+ client_secret
632
+ expires_at
633
+ livemode
634
+ }
635
+ }
636
+
637
+ mutation CreateStripeCheckoutSession($input: DonationCheckoutDto!) {
638
+ createStripeCheckoutSession(input: $input) {
639
+ id
640
+ vtxCheckoutSessionId
641
+ client_secret
642
+ expires_at
643
+ livemode
644
+ url
645
+ }
646
+ }
647
+
648
+ mutation CreateStripeLoginLink {
649
+ createStripeLoginLink
650
+ }
651
+
652
+ mutation CreateStripeAccountLink {
653
+ createStripeAccountLink
654
+ }
655
+
656
+ # ============================================================
657
+ # Receipt Queries
658
+ # ============================================================
659
+
660
+ query GetReceiptUrl($input: GetReceiptDto!) {
661
+ getReceiptUrl(input: $input) {
662
+ receiptId
663
+ }
664
+ }
665
+
666
+ query GetReceipt($input: GetReceiptDto!) {
667
+ getReceipt(input: $input) {
668
+ receiptId
669
+ athleteName
670
+ campaignName
671
+ donorName
672
+ amount
673
+ currency
674
+ dateIssued
675
+ message
676
+ confirmed
677
+ }
678
+ }
679
+
680
+ # ============================================================
681
+ # Transaction Queries
682
+ # ============================================================
683
+
684
+ query GetTransactionDetails($input: GetTransactionDetailsDto!) {
685
+ getTransactionDetails(input: $input) {
686
+ stripeCheckoutSessionId
687
+ vtxCheckoutSessionId
688
+ checkoutSessionType
689
+ transactionType
690
+ confirmed
691
+ completed
692
+ currency
693
+ createdDate
694
+ email
695
+ name
696
+ phone
697
+ payment_status
698
+ status
699
+ amount_subtotal
700
+ amount_total
701
+ completedDate
702
+ athleteDonationReceipt {
703
+ receiptId
704
+ campaignName
705
+ athleteName
706
+ donorName
707
+ amount
708
+ currency
709
+ dateIssued
710
+ confirmed
711
+ message
712
+ }
713
+ }
714
+ }
715
+
716
+ query GetAllTransactions {
717
+ getAllTransactions {
718
+ _id
719
+ createdDate
720
+ stripeSessionId
721
+ concept
722
+ donationAmount
723
+ fromEmail
724
+ type
725
+ confirmed
726
+ completed
727
+ completedDate
728
+ stripeAccountId
729
+ fundingDetails {
730
+ paidToVtx
731
+ paidToAthlete
732
+ athleteId
733
+ athleteName
734
+ fromName
735
+ fromPhone
736
+ message
737
+ mode
738
+ }
739
+ }
740
+ }
741
+
742
+ query GetTransactionsPaginated($query: TransactionQueryDto) {
743
+ getTransactionsPaginated(query: $query) {
744
+ items {
745
+ _id
746
+ createdDate
747
+ stripeSessionId
748
+ donationAmount
749
+ fromEmail
750
+ type
751
+ confirmed
752
+ completed
753
+ completedDate
754
+ stripeAccountId
755
+ fundingDetails {
756
+ paidToVtx
757
+ paidToAthlete
758
+ athleteId
759
+ athleteName
760
+ fromName
761
+ fromPhone
762
+ message
763
+ mode
764
+ }
765
+ }
766
+ pagination {
767
+ currentPage
768
+ totalPages
769
+ totalItems
770
+ itemsPerPage
771
+ hasNextPage
772
+ hasPreviousPage
773
+ }
774
+ }
775
+ }