@vertikalx/vtx-backend-client 1.0.0-dev.7 → 1.0.0-dev.70

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.
@@ -1,21 +1,34 @@
1
- type ApiKey {
1
+ type User {
2
2
  _id: String!
3
- keyName: String!
4
- readAccess: Boolean!
5
- writeAccess: Boolean!
3
+ loginEmail: String!
4
+ suspended: Boolean!
5
+ domains: [DomainCredential!]
6
+ loginMethods: [String!]
6
7
  }
7
8
 
8
- type ApiKeyWithValue {
9
+ type UserWithToken {
9
10
  _id: String!
10
- keyName: String!
11
- readAccess: Boolean!
12
- writeAccess: Boolean!
13
- actualKey: String!
11
+ loginEmail: String!
12
+ suspended: Boolean!
13
+ domains: [DomainCredential!]
14
+ loginMethods: [String!]
15
+ token: UserToken!
14
16
  }
15
17
 
16
- type UserToken {
17
- actualToken: String!
18
- refreshToken: String!
18
+ type BaseTenant {
19
+ _id: String!
20
+ name: String!
21
+ tenant_uri: String!
22
+ domain: Domain!
23
+ }
24
+
25
+ type Tenant {
26
+ _id: String!
27
+ name: String!
28
+ tenant_uri: String!
29
+ domain: Domain!
30
+ email: String!
31
+ owner: User
19
32
  }
20
33
 
21
34
  type Domain {
@@ -24,26 +37,41 @@ type Domain {
24
37
  description: String
25
38
  }
26
39
 
27
- type User {
40
+ type DomainCredential {
28
41
  _id: String!
29
- loginEmail: String!
30
- suspended: Boolean!
31
- domains: [Domain!]
42
+ name: String!
43
+ description: String
44
+ tenant: BaseTenant
32
45
  }
33
46
 
34
- type UserWithToken {
35
- _id: String!
36
- loginEmail: String!
37
- suspended: Boolean!
38
- domains: [Domain!]
39
- token: UserToken!
47
+ type UserToken {
48
+ actualToken: String!
49
+ refreshToken: String!
40
50
  }
41
51
 
42
- type Tenant {
52
+ type DecodedToken {
53
+ tokenId: String!
54
+ systemId: String!
55
+ userId: String!
56
+ email: String!
57
+ refreshTokenId: String!
58
+ domains: [DomainCredential!]!
59
+ }
60
+
61
+ type DecodedRefreshToken {
62
+ userId: String!
63
+ email: String!
64
+ originalTokenId: String!
65
+ }
66
+
67
+ type TenantWithUserLogin {
43
68
  _id: String!
44
69
  name: String!
45
- email: String!
46
70
  tenant_uri: String!
71
+ domain: Domain!
72
+ email: String!
73
+ owner: User
74
+ user: UserWithToken!
47
75
  }
48
76
 
49
77
  type UriAvailableType {
@@ -51,92 +79,877 @@ type UriAvailableType {
51
79
  valid: Boolean!
52
80
  }
53
81
 
54
- type TenantWithUserLogin {
82
+ type Agreement {
55
83
  _id: String!
84
+ kind: String!
85
+ domain: String!
86
+ isActiveAgreement: Boolean!
87
+ version: String!
88
+ publishedDate: DateTime
89
+ unPublishedDate: DateTime
90
+ locked: Boolean!
56
91
  name: String!
57
- email: String!
58
- tenant_uri: String!
59
- user: UserWithToken!
92
+ description: String
93
+ content: String
94
+ createdDate: DateTime!
95
+ updatedDate: DateTime!
60
96
  }
61
97
 
62
- type TenantUserTokenWithInfo {
63
- actualToken: String!
64
- refreshToken: String!
65
- tenantId: String!
66
- tenantUri: String!
67
- loginEmail: String!
98
+ """
99
+ A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
100
+ """
101
+ scalar DateTime
102
+
103
+ type BillEntity {
104
+ name: String!
105
+ taxId: String
106
+ line1: String
107
+ line2: String
108
+ line3: String
109
+ city: String
110
+ state: String
111
+ country: String
112
+ zip: String
113
+ }
114
+
115
+ type InvoiceItem {
116
+ _id: String!
117
+ unitPrice: Float!
118
+ unitTax: Float!
119
+ quantity: Float!
120
+ unit: String!
121
+ itemPrice: Float!
122
+ itemTotal: Float!
123
+ }
124
+
125
+ type Payment {
126
+ _id: String!
127
+ amount: Float!
128
+ currency: String!
129
+ datePaid: DateTime!
130
+ paymentComment: String
131
+ transactionId: String
132
+ processorType: String
133
+ processorReference: String
134
+ paidItemReference: String
135
+ payeeReference: String
136
+ payorReference: String
137
+ paymentMethodType: String
138
+ paymentMethodReference: String
139
+ }
140
+
141
+ type PlaFeature {
142
+ _id: String!
143
+ title: String!
144
+ description: String
145
+ quantity: Float
146
+ quantityUnit: String
147
+ }
148
+
149
+ type Plan {
150
+ _id: String!
151
+ name: String
152
+ description: String
153
+ prices: [PlanPrice!]!
154
+ features: [PlaFeature!]!
155
+ isPublic: Boolean!
156
+ active: Boolean!
157
+ startOfferingDate: DateTime
158
+ endOfferingDate: DateTime
159
+ termsAndConditions: String
160
+ }
161
+
162
+ type PlanPrice {
163
+ _id: String!
164
+ currency: String!
165
+ price: Float!
166
+ taxMode: String!
167
+ period: String!
168
+ customDays: Float
169
+ plan: Plan
170
+ }
171
+
172
+ type Invoice {
173
+ _id: String!
174
+ invoiceDate: DateTime!
175
+ billedEntity: BillEntity!
176
+ dueDate: DateTime!
177
+ billAmount: Float!
178
+ tax: Float!
179
+ total: Float!
180
+ currency: String!
181
+ items: [InvoiceItem!]
182
+ payment: Payment
183
+ }
184
+
185
+ type SubscriptionInvoice {
186
+ _id: String!
187
+ invoice: Invoice!
188
+ billedPlan: PlanPrice!
189
+ subscriber: PlanSubscription!
190
+ }
191
+
192
+ type PlanSubscription {
193
+ _id: String!
194
+ currentPlan: PlanPrice!
195
+ billPrice: Float!
196
+ billCurrency: String!
197
+ billPriceComment: String
198
+ lastBillDate: DateTime!
199
+ endAccessDate: DateTime!
200
+ autoRenew: Boolean!
201
+ autoRenewPlan: PlanPrice
202
+ autoRenewDate: DateTime!
203
+ payments: [SubscriptionPayment!]!
204
+ invoices: [SubscriptionInvoice!]!
205
+ }
206
+
207
+ type SubscriptionPayment {
208
+ _id: String!
209
+ payment: Payment!
210
+ subscriber: PlanSubscription!
211
+ }
212
+
213
+ type AWSS3File {
214
+ _id: String!
215
+ name: String
216
+ contentType: String
217
+ size: Float
218
+ useType: String
219
+ url: String!
220
+ key: String!
221
+ pendingDelete: Boolean!
222
+ }
223
+
224
+ type MagicLink {
225
+ _id: String!
226
+ code: String!
227
+ type: String!
228
+ url: String!
229
+ expires: DateTime
230
+ data: String
231
+ isExpired: Boolean!
232
+ }
233
+
234
+ type VerificationCode {
235
+ _id: String!
236
+ type: String
237
+ recipient: String
238
+ expires: DateTime
239
+ data: String
240
+ isExpired: Boolean!
241
+ createdDate: DateTime!
242
+ }
243
+
244
+ type ErrorInfo {
245
+ errorCode: Float!
246
+ errorMessage: String!
247
+ }
248
+
249
+ type HttpRequestField {
250
+ key: String!
251
+ value: String!
252
+ }
253
+
254
+ type AWSS3UploadUrl {
255
+ uploadUrl: String!
256
+ fields: [HttpRequestField!]!
257
+ downloadUrl: String!
258
+ bucket: String!
259
+ key: String!
260
+ }
261
+
262
+ type AWSS3CallResult {
263
+ httpStatus: Float!
264
+ result: String!
265
+ message: String!
266
+ errors: [String!]
267
+ }
268
+
269
+ type CodeVerificationResponse {
270
+ result: String!
271
+ code: VerificationCode
272
+ error: ErrorInfo
273
+ }
274
+
275
+ type BrandStats {
276
+ campaigns: Float
277
+ sponsorships: Float
278
+ sports: Float
279
+ athletes: Float
280
+ }
281
+
282
+ type BrandTranslation {
283
+ _id: String!
284
+ brandId: String!
285
+ language: String!
286
+ name: String
287
+ slogan: String
288
+ description: String
289
+ logo: AWSS3File
290
+ banner: AWSS3File
68
291
  }
69
292
 
70
293
  type Brand {
71
294
  _id: String!
72
295
  name: String!
296
+ slogan: String
297
+ website: String
73
298
  description: String
74
299
  approved: Boolean!
75
300
  published: Boolean!
301
+ logo: AWSS3File
302
+ banner: AWSS3File
303
+ stats: BrandStats
304
+ operatorIds: [String!]
305
+ translations: [BrandTranslation!]
76
306
  }
77
307
 
78
- type Sponsor {
308
+ type City {
309
+ _id: String!
310
+ name: String!
311
+ localizedName: String!
312
+ state: State
313
+ latitude: Float
314
+ longitude: Float
315
+ timezone: String
316
+ }
317
+
318
+ type State {
79
319
  _id: String!
80
320
  name: String!
321
+ country: Country
322
+ cities: [City!]
323
+ }
324
+
325
+ type Country {
326
+ _id: String!
327
+ name: String!
328
+ states: [State!]
329
+ }
330
+
331
+ type AgeQualification {
332
+ type: String!
333
+ value: Float!
334
+ operator: String!
335
+ }
336
+
337
+ type GenderQualification {
338
+ type: String!
339
+ operator: String!
340
+ values: [String!]!
341
+ }
342
+
343
+ type ScoreQualification {
344
+ type: String!
345
+ scoreType: String!
346
+ operator: String!
347
+ value: Float!
348
+ }
349
+
350
+ type LocationQualification {
351
+ type: String!
352
+ operator: String!
353
+ countries: [Country!]!
354
+ states: [State!]!
355
+ cities: [City!]!
356
+ }
357
+
358
+ type NationalityQualification {
359
+ type: String!
360
+ operator: String!
361
+ countries: [Country!]!
362
+ }
363
+
364
+ type DistanceQualification {
365
+ type: String!
366
+ maxDistance: Float!
367
+ latitude: Float
368
+ longitude: Float
369
+ cityId: String
370
+ }
371
+
372
+ type SportsQualification {
373
+ type: String!
374
+ sports: [String!]!
375
+ operator: String!
376
+ }
377
+
378
+ type SportsLevelQualification {
379
+ type: String!
380
+ operator: String!
381
+ level: String!
382
+ }
383
+
384
+ type AthleteCriteria {
385
+ _id: String!
386
+ label: String
387
+ qualifications: [QualificationTypeUnion!]
81
388
  }
82
389
 
390
+ union QualificationTypeUnion = AgeQualification | GenderQualification | ScoreQualification | LocationQualification | NationalityQualification | DistanceQualification | SportsQualification | SportsLevelQualification
391
+
83
392
  type Industry {
84
393
  _id: String!
85
394
  name: String!
86
395
  }
87
396
 
397
+ type SponsorStats {
398
+ sponsoredAthletes: Float!
399
+ totalBrands: Float!
400
+ activeCampaigns: Float!
401
+ activeSponsorships: Float!
402
+ }
403
+
404
+ type SponsorBrand {
405
+ _id: String!
406
+ name: String!
407
+ slogan: String
408
+ website: String
409
+ description: String
410
+ approved: Boolean!
411
+ published: Boolean!
412
+ logo: AWSS3File
413
+ banner: AWSS3File
414
+ stats: BrandStats
415
+ operatorIds: [String!]
416
+ translations: [BrandTranslation!]
417
+ sponsorBrandId: String!
418
+ authorizedUse: Boolean!
419
+ isAuthorizer: Boolean!
420
+ }
421
+
422
+ type Sponsor {
423
+ _id: String!
424
+ name: String!
425
+ description: String!
426
+ tenant: Tenant!
427
+ industry: Industry
428
+ stats: SponsorStats
429
+ brands: [SponsorBrand!]
430
+ sponsorships: [Sponsorship!]
431
+ approved: Boolean!
432
+ }
433
+
434
+ type SponsorshipItem {
435
+ _id: String!
436
+ quantity: Float!
437
+ title: String!
438
+ value: Float!
439
+ type: String!
440
+ }
441
+
442
+ type SponsorshipCommitment {
443
+ _id: String!
444
+ title: String!
445
+ details: String
446
+ hashTags: String!
447
+ media: String!
448
+ actionType: String!
449
+ frequency: Float
450
+ periodicity: String!
451
+ autoMeasurable: Boolean!
452
+ }
453
+
454
+ type Duration {
455
+ length: Float!
456
+ unit: String!
457
+ }
458
+
459
+ type SponsorshipStats {
460
+ totalSponsorships: Float
461
+ totalApplications: Float
462
+ newApplications: Float
463
+ discardedApplications: Float
464
+ selectedApplications: Float
465
+ approvedApplications: Float
466
+ grantedSponsorships: Float
467
+ remainingSponsorships: Float
468
+ }
469
+
470
+ type SponsorshipTranslation {
471
+ _id: String!
472
+ sponsorshipId: String!
473
+ language: String!
474
+ title: String
475
+ description: String
476
+ terms: String
477
+ banner: AWSS3File
478
+ }
479
+
480
+ type Sponsorship {
481
+ _id: String!
482
+ title: String!
483
+ description: String
484
+ cashValue: Float!
485
+ otherValue: Float!
486
+ brand: Brand
487
+ banner: AWSS3File
488
+ criteria: AthleteCriteria
489
+ deadline: DateTime
490
+ startDate: DateTime
491
+ duration: Duration!
492
+ sponsor: Sponsor
493
+ sponsorshipItems: [SponsorshipItem!]
494
+ commitments: [SponsorshipCommitment!]
495
+ terms: String
496
+ stats: SponsorshipStats
497
+ isPrivate: Boolean!
498
+ approved: Boolean!
499
+ published: Boolean!
500
+ translations: [SponsorshipTranslation!]
501
+ }
502
+
503
+ type FollowStats {
504
+ followers: Float!
505
+ followed: Float!
506
+ raves: Float!
507
+ favorites: Float!
508
+ }
509
+
510
+ type Sport {
511
+ _id: String!
512
+ name: String!
513
+ }
514
+
515
+ type VtxScores {
516
+ vtxScore: Float!
517
+ socialScore: Float!
518
+ trainingScore: Float!
519
+ competitionScore: Float!
520
+ }
521
+
522
+ type SportLevelTranslation {
523
+ _id: String!
524
+ language: String!
525
+ label: String!
526
+ }
527
+
528
+ type SportLevel {
529
+ _id: String!
530
+ label: String!
531
+ index: Float!
532
+ translations: [SportLevelTranslation!]
533
+ }
534
+
535
+ type Ranking {
536
+ scope: String!
537
+ scopeId: String!
538
+ scopeName: String!
539
+ position: Float!
540
+ total: Float!
541
+ }
542
+
543
+ type AthleteRankings {
544
+ worldRanking: Ranking
545
+ countryRanking: Ranking
546
+ stateRanking: Ranking
547
+ cityRanking: Ranking
548
+ }
549
+
550
+ type Team {
551
+ _id: String!
552
+ name: String!
553
+ description: String
554
+ sports: [Sport!]
555
+ approved: Boolean
556
+ logo: AWSS3File
557
+ banner: AWSS3File
558
+ }
559
+
560
+ type SportsEvent {
561
+ _id: String!
562
+ name: String!
563
+ eventWebSite: String
564
+ startDate: DateTime!
565
+ endDate: DateTime
566
+ verified: Boolean!
567
+ banner: AWSS3File
568
+ }
569
+
570
+ type AthleteCompetitionResult {
571
+ _id: String!
572
+ resultType: String!
573
+ position: Float
574
+ score: String
575
+ finishTimeMS: Float
576
+ resultWebLink: String
577
+ }
578
+
579
+ type BudgetItem {
580
+ _id: String!
581
+ quantity: Float!
582
+ concept: String!
583
+ itemCost: Float!
584
+ itemTotal: Float!
585
+ }
586
+
587
+ type Budget {
588
+ _id: String!
589
+ totalRequired: Float!
590
+ initialFunds: Float!
591
+ totalRaised: Float!
592
+ items: [BudgetItem!]
593
+ }
594
+
595
+ type AthleteCompetition {
596
+ _id: String!
597
+ event: SportsEvent!
598
+ participationDate: DateTime
599
+ competitionNumber: String
600
+ result: AthleteCompetitionResult
601
+ fundRaisingCampaignId: String
602
+ budget: Budget
603
+ }
604
+
605
+ type WorldLocation {
606
+ _id: String!
607
+ userProvidedLatitude: Float
608
+ userProvidedLongitude: Float
609
+ cityNameGeocode: String
610
+ stateNameGeocode: String
611
+ countryIso2CodeGeocode: String
612
+ timeZoneGeocode: String
613
+ latitudeGeocode: Float
614
+ longitudeGeocode: Float
615
+ city: City
616
+ }
617
+
618
+ type Athlete {
619
+ _id: String!
620
+ firstName: String!
621
+ lastName: String!
622
+ screenName: String
623
+ dob: DateTime
624
+ lgbt: Boolean
625
+ competitionGender: String
626
+ country: Country
627
+ location: WorldLocation
628
+ trainer: String
629
+ trainerUrl: String
630
+ followStats: FollowStats
631
+ mainSport: Sport!
632
+ mainSportLevel: SportLevel!
633
+ scores: VtxScores!
634
+ rankings: AthleteRankings
635
+ allSports: [Sport!]
636
+ teams: [Team!]
637
+ sponsorBrands: [Brand!]
638
+ competitions: [AthleteCompetition!]
639
+ totalUpcomingCompetitions: Float
640
+ totalPastCompetitions: Float
641
+ profilePicture: AWSS3File
642
+ cardPicture: AWSS3File
643
+ aboutMe: String
644
+ }
645
+
646
+ type SponsorAthleteInvitation {
647
+ _id: String!
648
+ name: String
649
+ email: String!
650
+ dateSent: DateTime!
651
+ sponsor: Sponsor!
652
+ magicLink: MagicLink!
653
+ brand: Brand
654
+ status: String!
655
+ }
656
+
657
+ type StravaToken {
658
+ token_type: String!
659
+ expires_at: String!
660
+ refresh_token: String!
661
+ access_token: String!
662
+ }
663
+
664
+ type EditValueResponse {
665
+ field: String!
666
+ oldValue: String
667
+ newValue: String
668
+ changed: Boolean!
669
+ }
670
+
671
+ type UserImages {
672
+ profilePictureUrl: String
673
+ cardPictureUrl: String
674
+ bannerPictureUrl: String
675
+ }
676
+
677
+ type FundRaisingCampaign {
678
+ _id: String!
679
+ title: String!
680
+ motivation: String
681
+ website: String
682
+ fundsRequired: Float!
683
+ initialFundsObtained: Float!
684
+ fundsObtained: Float!
685
+ location: WorldLocation
686
+ endingDate: DateTime!
687
+ status: String!
688
+ budget: Budget
689
+ competitions: [AthleteCompetition!]
690
+ }
691
+
692
+ input CreateVerificationCodeDto {
693
+ type: String
694
+ recipient: String
695
+ expiresTime: Float = 10
696
+ expiresUnit: String = "MINUTES"
697
+ data: String
698
+ }
699
+
700
+ input VerifyCodeDto {
701
+ codeId: String!
702
+ enteredCodeValue: String!
703
+ type: String
704
+ }
705
+
706
+ input AthleteInvitationDto {
707
+ email: String!
708
+ name: String
709
+ sender: String
710
+ brandId: String
711
+ }
712
+
713
+ input InviteAthletesDto {
714
+ language: String = "en"
715
+ invitations: [AthleteInvitationDto!]!
716
+ }
717
+
718
+ input CompetitionResultDto {
719
+ resultType: String!
720
+ position: Float
721
+ score: String
722
+ finishTimeMS: Float
723
+ resultWebLink: String
724
+ }
725
+
726
+ input SetCompetitionResultDto {
727
+ resultType: String!
728
+ position: Float
729
+ score: String
730
+ finishTimeMS: Float
731
+ resultWebLink: String
732
+ competitionId: String!
733
+ }
734
+
735
+ input CreateAthleteCompetitionDto {
736
+ event: String!
737
+ date: DateTime!
738
+ eventWebsite: String
739
+ competitionNumber: String
740
+ result: CompetitionResultDto
741
+ cityId: String
742
+ }
743
+
744
+ input CreateAthleteCompetitionForDto {
745
+ event: String!
746
+ date: DateTime!
747
+ eventWebsite: String
748
+ competitionNumber: String
749
+ result: CompetitionResultDto
750
+ cityId: String
751
+ loginEmail: String!
752
+ }
753
+
754
+ input QualificationDto {
755
+ type: String!
756
+ }
757
+
758
+ input AgeQualificationDto {
759
+ type: String!
760
+ value: Float!
761
+ operator: String!
762
+ }
763
+
764
+ input GenderQualificationDto {
765
+ type: String!
766
+ operator: String!
767
+ values: [String!]!
768
+ }
769
+
770
+ input NationalityQualificationDto {
771
+ type: String!
772
+ operator: String!
773
+ countries: [String!]!
774
+ }
775
+
776
+ input ScoreQualificationDto {
777
+ type: String!
778
+ scoreType: String!
779
+ operator: String!
780
+ value: Float!
781
+ }
782
+
783
+ input LocationQualificationDto {
784
+ type: String!
785
+ operator: String!
786
+ countries: [String!]!
787
+ states: [String!]!
788
+ cities: [String!]!
789
+ }
790
+
791
+ input DistanceQualificationDto {
792
+ type: String!
793
+ maxDistance: Float!
794
+ latitude: Float
795
+ longitude: Float
796
+ cityId: String
797
+ }
798
+
799
+ input SportsQualificationDto {
800
+ type: String!
801
+ sports: [String!]!
802
+ operator: String!
803
+ }
804
+
805
+ input SportsLevelQualificationDto {
806
+ type: String!
807
+ operator: String!
808
+ level: String!
809
+ }
810
+
811
+ input RegisterUserDto {
812
+ email: String!
813
+ password: String!
814
+ inviteCode: String
815
+ }
816
+
88
817
  type Query {
89
- tenant(_id: String!): Tenant!
90
- tenantByEmail(email: String!): Tenant!
91
- tenants: [Tenant!]!
818
+ findTenantById(_id: String!): Tenant!
819
+ findTenantByEmail(email: String!, domainId: String!): Tenant!
820
+ getTenants: [Tenant!]!
92
821
  isTenantUriAvailable(tenant_uri: String!): UriAvailableType!
93
- tenantApiKeys: [ApiKey!]!
94
- nontenantedUserById(_id: String!): User!
95
- nontenantedUserByEmail(email: String!): User!
822
+ findUserById(_id: String!): User!
823
+ findUserByEmail(email: String!): User!
824
+ validateUserCredentials(username: String!, password: String!): User!
825
+ getUploadUrl(input: AWSS3GetUploadDto!): AWSS3UploadUrl!
96
826
  industries: [Industry!]!
97
827
  findIndustryById(industryId: String!): Industry!
98
828
  brands: [Brand!]!
829
+ getBrandByName(name: String!, translations: Boolean!): Brand!
830
+ getBrandTranslation(brandId: String!, language: String!): BrandTranslation!
99
831
  existsValidSponsorForEmail(loginEmail: String!): Sponsor!
832
+ sponsors: [Sponsor!]!
833
+ findSponsorAthleteInvitation(input: FindSponsorAthleteInvitationDto!): SponsorAthleteInvitation!
834
+ getAthletes: [Athlete!]!
835
+ searchAthletes(searchString: String!): [Athlete!]!
836
+ findAthleteById(athleteId: String!): Athlete!
837
+ findAthleteForUser(loginEmail: String!): Athlete!
838
+ getRecommendedAthletes(loginEmail: String!): [Athlete!]!
839
+ getSponsorAthletesForTenant: [Athlete!]!
840
+ getSports: [Sport!]!
841
+ findSportById(sportId: String!): Sport!
842
+ getSportLevels: [SportLevel!]!
843
+ getPublicSponsorships: [Sponsorship!]!
844
+ getTenantSponsorships: [Sponsorship!]!
845
+ getCountries: [Country!]!
846
+ getCountryStates(countryId: String!): [State!]!
847
+ getStateCities(stateId: String!): [City!]!
848
+ findCitiesStartingWith(text: String!): [City!]!
849
+ findCityById(cityId: String!): City!
850
+ findVtxUser(input: FindVtxUserDto!): User!
851
+ validateUserCredentialsVtx(username: String!, password: String!): User!
852
+ getUserImagesFromEmail(loginEmail: String!): UserImages!
853
+ getStravaLoginUrl: String!
854
+ getSportsEvents(input: GetSportEventsDto!): [SportsEvent!]!
855
+ }
856
+
857
+ input AWSS3GetUploadDto {
858
+ useType: String!
859
+ name: String
860
+ }
861
+
862
+ input FindSponsorAthleteInvitationDto {
863
+ code: String!
864
+ type: String
865
+ }
866
+
867
+ input FindVtxUserDto {
868
+ loginEmail: String!
869
+ }
870
+
871
+ input GetSportEventsDto {
872
+ matchString: String
100
873
  }
101
874
 
102
875
  type Mutation {
103
- createTenant(tenant: CreateTenantInput!): Tenant!
104
- createTenantApiKey(newKeyInfo: CreateApiKeyInput!): ApiKey!
105
- createTenantApiKeyWithSystemKey(newKeyInfo: CreateApiKeyInput!): ApiKeyWithValue!
106
- createTenantWithLogin(tenant: CreateTenantInput!): TenantWithUserLogin!
107
- createTenantUserToken(requestTokenDto: CreateTenantUserTokenDto!): TenantUserTokenWithInfo!
108
- createTenantUserTokenFromEmailAndUri(requestTokenInfoDto: CreateTenantUserTokenFromEmailAndUriDto!): TenantUserTokenWithInfo!
109
- createNonTenantedUserWithLogin(user: CreateActiveUserInput!): UserWithToken!
110
- createNonTenantUserTokenFromEmail(email: String!): UserToken!
876
+ registerNewDomainTenant(tenant: CreateTenantInput!): Tenant!
877
+ registerNewDomainTenantWithLogin(tenant: CreateTenantInput!): TenantWithUserLogin!
878
+ createUserAndLogin(user: CreateActiveUserInput!): UserWithToken!
879
+ loginUserFromEmail(email: String!, loginMethod: String!): UserToken!
880
+ loginUserFromCredentials(username: String!, password: String!): UserWithToken!
881
+ registerUserToDomainFromEmail(input: RegisterUserToDomainFromEmailInput!): User!
882
+ refreshToken(dto: RefreshTokenInput!): UserToken!
883
+ deleteUploadedUseTypeFile(input: AWSS3DeleteUseTypeFileDto!): AWSS3CallResult!
884
+ deleteUploadedBucketFile(input: AWSS3DeleteBucketFileDto!): AWSS3CallResult!
885
+ registerS3UploadedFile(input: AWSS3UploadedFileDto!): AWSS3File!
111
886
  createIndustry(input: CreateIndustryDto!): Industry!
112
887
  createBrand(input: CreateBrandDto!): Brand!
113
888
  registerSponsor(input: RegisterSponsorInput!): Sponsor!
889
+ createSponsor(input: CreateSponsorDto!): Sponsor!
890
+ sendAthleteInvitations(input: InviteAthletesDto!): [SponsorAthleteInvitation!]!
891
+ registerAthlete(input: RegisterAthleteDto!): Athlete!
892
+ editProfileValue(input: EditValueDto!): EditValueResponse!
893
+ addAthleteCompetition(input: CreateAthleteCompetitionDto!): AthleteCompetition!
894
+ createSport(input: CreateSportDto!): Sport!
895
+ updateSport(input: UpdateSportDto!): Sport!
896
+ createSportLevel(input: CreateSportLevelDto!): SportLevel!
897
+ createSponsorship(input: CreateSponsorshipDto!): Sponsorship!
898
+ createCountry(input: CreateCountryDto!): Country!
899
+ createState(input: CreateStateDto!): State!
900
+ createCity(input: CreateCityDto!): City!
901
+ preRegisterAthleteUser(input: RegisterUserDto!): VerificationCode!
902
+ confirmAthleteUserRegistrationAndLogin(input: VerifyCodeDto!): UserWithToken!
903
+ confirmAthleteUserRegistration(input: VerifyCodeDto!): User!
904
+ registerAthleteUser(input: RegisterUserDto!): User!
905
+ registerSponsorUser(input: RegisterUserDto!): User!
906
+ loginUserFromCredentialsVtx(username: String!, password: String!): UserWithToken!
907
+ handleStravaCallback(data: RegisterStravaDto!): StravaToken!
908
+ refreshStravaToken(input: String!): StravaToken!
909
+ createSportsEvent(input: CreateSportEventDto!): [SportsEvent!]!
114
910
  }
115
911
 
116
912
  input CreateTenantInput {
117
913
  name: String!
118
914
  email: String!
119
915
  tenant_uri: String!
916
+ domain: String!
120
917
  }
121
918
 
122
- input CreateApiKeyInput {
123
- keyName: String!
124
- readAccess: Boolean!
125
- writeAccess: Boolean!
919
+ input CreateActiveUserInput {
920
+ loginEmail: String!
921
+ password: String
922
+ loginMethod: String
126
923
  }
127
924
 
128
- input CreateTenantUserTokenDto {
129
- requestToken: String!
925
+ input RegisterUserToDomainFromEmailInput {
926
+ email: String!
927
+ domainId: String!
928
+ tenantId: String
929
+ createUserIfNotExist: Boolean = false
130
930
  }
131
931
 
132
- input CreateTenantUserTokenFromEmailAndUriDto {
133
- email: String!
134
- tenant_uri: String!
932
+ input RefreshTokenInput {
933
+ refreshToken: String!
135
934
  }
136
935
 
137
- input CreateActiveUserInput {
138
- loginEmail: String!
139
- password: String
936
+ input AWSS3DeleteUseTypeFileDto {
937
+ name: String!
938
+ useType: String!
939
+ }
940
+
941
+ input AWSS3DeleteBucketFileDto {
942
+ key: String!
943
+ bucket: String!
944
+ credentialsId: String
945
+ }
946
+
947
+ input AWSS3UploadedFileDto {
948
+ key: String!
949
+ useType: String!
950
+ contentType: String!
951
+ originalFileName: String
952
+ fileSize: Float
140
953
  }
141
954
 
142
955
  input CreateIndustryDto {
@@ -146,6 +959,21 @@ input CreateIndustryDto {
146
959
  input CreateBrandDto {
147
960
  name: String!
148
961
  description: String
962
+ slogan: String
963
+ website: String
964
+ logo: AWSS3UploadedFileDto
965
+ banner: AWSS3UploadedFileDto
966
+ translations: [BrandTranslationDto!]
967
+ }
968
+
969
+ input BrandTranslationDto {
970
+ brandId: String!
971
+ language: String!
972
+ name: String
973
+ description: String
974
+ slogan: String
975
+ logo: AWSS3UploadedFileDto
976
+ banner: AWSS3UploadedFileDto
149
977
  }
150
978
 
151
979
  input RegisterSponsorInput {
@@ -159,4 +987,170 @@ input RegisterSponsorInput {
159
987
  operatorType: String!
160
988
  numberOfAthletes: String!
161
989
  brands: [String!]!
990
+ }
991
+
992
+ input CreateSponsorDto {
993
+ name: String!
994
+ description: String
995
+ }
996
+
997
+ input RegisterAthleteDto {
998
+ email: String!
999
+ firstName: String!
1000
+ lastName: String!
1001
+ screenName: String
1002
+ nationality: String!
1003
+ cityId: String!
1004
+ locLatitude: Float
1005
+ locLongitude: Float
1006
+ dateOfBirth: DateTime!
1007
+ lgbt: Boolean = false
1008
+ trainer: String
1009
+ trainerUrl: String
1010
+ aboutMe: String
1011
+ team: String
1012
+ gender: String!
1013
+ mainSport: String!
1014
+ mainSportLevel: String!
1015
+ profilePicture: AWSS3UploadedFileDto
1016
+ cardPicture: AWSS3UploadedFileDto
1017
+ }
1018
+
1019
+ input EditValueDto {
1020
+ field: String!
1021
+ newValue: String
1022
+ }
1023
+
1024
+ input CreateSportDto {
1025
+ name: String!
1026
+ resultType: String = "POSITION"
1027
+ }
1028
+
1029
+ input UpdateSportDto {
1030
+ _id: String!
1031
+ name: String!
1032
+ }
1033
+
1034
+ input CreateSportLevelDto {
1035
+ _id: String!
1036
+ label: String!
1037
+ index: Float!
1038
+ translations: [CreateSportLevelTranslationDto!]
1039
+ }
1040
+
1041
+ input CreateSportLevelTranslationDto {
1042
+ language: String!
1043
+ label: String!
1044
+ }
1045
+
1046
+ input CreateSponsorshipDto {
1047
+ title: String!
1048
+ brandId: String!
1049
+ description: String
1050
+ cashValue: Float = 0
1051
+ otherValue: Float = 0
1052
+ banner: AWSS3UploadedFileDto
1053
+ criteria: AthleteCriteriaDto
1054
+ deadline: DateTime
1055
+ startDate: DateTime
1056
+ duration: DurationDto!
1057
+ sponsorshipItems: [SponsorshipItemDto!]
1058
+ commitments: [SponsorshipCommitmentDto!]
1059
+ terms: String
1060
+ published: Boolean = true
1061
+ isPrivate: Boolean = false
1062
+ translations: [SponsorshipTranslationDto!]
1063
+ }
1064
+
1065
+ input AthleteCriteriaDto {
1066
+ _id: String!
1067
+ label: String
1068
+ qualificationsBag: QualificationsBagDto
1069
+ }
1070
+
1071
+ input QualificationsBagDto {
1072
+ ageQualifications: [AgeQualificationDto!]
1073
+ genderQualifications: [GenderQualificationDto!]
1074
+ scoreQualifications: [ScoreQualificationDto!]
1075
+ locationQualifications: [LocationQualificationDto!]
1076
+ nationalityQualifications: [NationalityQualificationDto!]
1077
+ distanceQualifications: [DistanceQualificationDto!]
1078
+ sportsQualifications: [SportsQualificationDto!]
1079
+ levelQualifications: [SportsLevelQualificationDto!]
1080
+ }
1081
+
1082
+ input DurationDto {
1083
+ length: Float! = 1
1084
+ unit: String! = "YEARS"
1085
+ }
1086
+
1087
+ input SponsorshipItemDto {
1088
+ _id: String!
1089
+ quantity: Float! = 1
1090
+ title: String!
1091
+ value: Float! = 0
1092
+ }
1093
+
1094
+ input SponsorshipCommitmentDto {
1095
+ _id: String!
1096
+ title: String!
1097
+ details: String
1098
+ hashTags: [String!]
1099
+ media: String!
1100
+ actionType: String!
1101
+ frequency: Float = 1
1102
+ periodicity: String!
1103
+ }
1104
+
1105
+ input SponsorshipTranslationDto {
1106
+ sponsorshipId: String!
1107
+ language: String!
1108
+ title: String
1109
+ description: String
1110
+ banner: AWSS3UploadedFileDto
1111
+ terms: String
1112
+ }
1113
+
1114
+ input CreateCountryDto {
1115
+ _id: String!
1116
+ name: String!
1117
+ }
1118
+
1119
+ input CreateStateDto {
1120
+ _id: String!
1121
+ name: String!
1122
+ countryId: String!
1123
+ }
1124
+
1125
+ input CreateCityDto {
1126
+ _id: String!
1127
+ cityName: String!
1128
+ cityNameLocalized: String!
1129
+ lat: Float!
1130
+ lng: Float!
1131
+ stateId: String!
1132
+ timezone: String!
1133
+ city_alt: String
1134
+ iso3: String
1135
+ admin_type: String
1136
+ capital: String
1137
+ density: Float
1138
+ population: Float
1139
+ population_proper: Float
1140
+ ranking: Float
1141
+ same_name: String
1142
+ }
1143
+
1144
+ input RegisterStravaDto {
1145
+ idAthlete: String!
1146
+ code: String!
1147
+ }
1148
+
1149
+ input CreateSportEventDto {
1150
+ name: String!
1151
+ cityId: String
1152
+ startDate: DateTime!
1153
+ endDate: DateTime
1154
+ website: String
1155
+ banner: AWSS3UploadedFileDto
162
1156
  }