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