@vertikalx/vtx-backend-client 3.0.0-dev.8 → 3.0.1-dev-max.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 (111) hide show
  1. package/package.json +16 -3
  2. package/src/api/api-call-headers.ts +35 -0
  3. package/src/api/backend-response.ts +14 -0
  4. package/src/api/domains.ts +6 -0
  5. package/src/api/response-builder.ts +165 -0
  6. package/src/api/types.ts +9 -0
  7. package/src/api/vtx-apikey-api.ts +23 -0
  8. package/src/api/vtx-base-api.ts +2253 -0
  9. package/src/api/vtx-mobile-api.ts +43 -0
  10. package/src/api/vtx-web-browser-api.ts +46 -0
  11. package/src/api/vtx-web-server-api.ts +41 -0
  12. package/src/client/index.ts +65 -0
  13. package/src/client/runtime/batcher.ts +275 -0
  14. package/src/client/runtime/createClient.ts +68 -0
  15. package/src/client/runtime/error.ts +29 -0
  16. package/src/client/runtime/fetcher.ts +97 -0
  17. package/src/client/runtime/generateGraphqlOperation.ts +225 -0
  18. package/src/client/runtime/index.ts +13 -0
  19. package/src/client/runtime/linkTypeMap.ts +156 -0
  20. package/src/client/runtime/typeSelection.ts +95 -0
  21. package/src/client/runtime/types.ts +69 -0
  22. package/src/client/schema.graphql +4256 -0
  23. package/src/client/schema.ts +8329 -0
  24. package/src/client/{types.js → types.ts} +6016 -2230
  25. package/src/generated/graphql.ts +12445 -0
  26. package/src/{index.d.ts → index.ts} +7 -2
  27. package/src/operations/admin.graphql +19 -0
  28. package/src/operations/ai-coach.graphql +117 -0
  29. package/src/operations/athlete.graphql +1764 -0
  30. package/src/operations/auth.graphql +301 -0
  31. package/src/operations/campaign.graphql +775 -0
  32. package/src/operations/email-campaign.graphql +160 -0
  33. package/src/operations/followers.graphql +45 -0
  34. package/src/operations/integrations.graphql +216 -0
  35. package/src/operations/leaderboard.graphql +54 -0
  36. package/src/operations/media.graphql +179 -0
  37. package/src/operations/notifications.graphql +93 -0
  38. package/src/operations/offers.graphql +368 -0
  39. package/src/operations/onboarding.graphql +29 -0
  40. package/src/operations/sponsor.graphql +368 -0
  41. package/src/operations/sport.graphql +132 -0
  42. package/src/operations/user.graphql +446 -0
  43. package/tsconfig.lib.json +10 -0
  44. package/src/api/api-call-headers.d.ts +0 -12
  45. package/src/api/api-call-headers.js +0 -16
  46. package/src/api/api-call-headers.js.map +0 -1
  47. package/src/api/backend-response.d.ts +0 -10
  48. package/src/api/backend-response.js +0 -3
  49. package/src/api/backend-response.js.map +0 -1
  50. package/src/api/domains.d.ts +0 -4
  51. package/src/api/domains.js +0 -8
  52. package/src/api/domains.js.map +0 -1
  53. package/src/api/response-builder.d.ts +0 -4
  54. package/src/api/response-builder.js +0 -123
  55. package/src/api/response-builder.js.map +0 -1
  56. package/src/api/types.d.ts +0 -2
  57. package/src/api/types.js +0 -3
  58. package/src/api/types.js.map +0 -1
  59. package/src/api/vtx-apikey-api.d.ts +0 -6
  60. package/src/api/vtx-apikey-api.js +0 -19
  61. package/src/api/vtx-apikey-api.js.map +0 -1
  62. package/src/api/vtx-base-api.d.ts +0 -134
  63. package/src/api/vtx-base-api.js +0 -8586
  64. package/src/api/vtx-base-api.js.map +0 -1
  65. package/src/api/vtx-mobile-api.d.ts +0 -9
  66. package/src/api/vtx-mobile-api.js +0 -62
  67. package/src/api/vtx-mobile-api.js.map +0 -1
  68. package/src/api/vtx-web-browser-api.d.ts +0 -7
  69. package/src/api/vtx-web-browser-api.js +0 -36
  70. package/src/api/vtx-web-browser-api.js.map +0 -1
  71. package/src/api/vtx-web-server-api.d.ts +0 -7
  72. package/src/api/vtx-web-server-api.js +0 -33
  73. package/src/api/vtx-web-server-api.js.map +0 -1
  74. package/src/client/index.d.ts +0 -25
  75. package/src/client/index.js +0 -44
  76. package/src/client/index.js.map +0 -1
  77. package/src/client/runtime/batcher.d.ts +0 -36
  78. package/src/client/runtime/batcher.js +0 -123
  79. package/src/client/runtime/batcher.js.map +0 -1
  80. package/src/client/runtime/createClient.d.ts +0 -17
  81. package/src/client/runtime/createClient.js +0 -28
  82. package/src/client/runtime/createClient.js.map +0 -1
  83. package/src/client/runtime/error.d.ts +0 -15
  84. package/src/client/runtime/error.js +0 -19
  85. package/src/client/runtime/error.js.map +0 -1
  86. package/src/client/runtime/fetcher.d.ts +0 -10
  87. package/src/client/runtime/fetcher.js +0 -68
  88. package/src/client/runtime/fetcher.js.map +0 -1
  89. package/src/client/runtime/generateGraphqlOperation.d.ts +0 -30
  90. package/src/client/runtime/generateGraphqlOperation.js +0 -134
  91. package/src/client/runtime/generateGraphqlOperation.js.map +0 -1
  92. package/src/client/runtime/index.d.ts +0 -11
  93. package/src/client/runtime/index.js +0 -17
  94. package/src/client/runtime/index.js.map +0 -1
  95. package/src/client/runtime/linkTypeMap.d.ts +0 -9
  96. package/src/client/runtime/linkTypeMap.js +0 -95
  97. package/src/client/runtime/linkTypeMap.js.map +0 -1
  98. package/src/client/runtime/typeSelection.d.ts +0 -28
  99. package/src/client/runtime/typeSelection.js +0 -3
  100. package/src/client/runtime/typeSelection.js.map +0 -1
  101. package/src/client/runtime/types.d.ts +0 -55
  102. package/src/client/runtime/types.js +0 -3
  103. package/src/client/runtime/types.js.map +0 -1
  104. package/src/client/schema.d.ts +0 -4886
  105. package/src/client/schema.js +0 -1051
  106. package/src/client/schema.js.map +0 -1
  107. package/src/client/types.d.ts +0 -2601
  108. package/src/client/types.js.map +0 -1
  109. package/src/index.js +0 -28
  110. package/src/index.js.map +0 -1
  111. package/tsconfig.lib.tsbuildinfo +0 -1
@@ -0,0 +1,93 @@
1
+ # ============================================================
2
+ # Notification Operations
3
+ # ============================================================
4
+
5
+ # --- Notification fields fragment ---
6
+ fragment NotificationFields on Notification {
7
+ id
8
+ type
9
+ title
10
+ message
11
+ iconType
12
+ iconUrl
13
+ actionRoute
14
+ actionParams
15
+ actionLabel
16
+ read
17
+ dismissed
18
+ createdAt
19
+ }
20
+
21
+ # ============================================================
22
+ # Notification Queries
23
+ # ============================================================
24
+
25
+ query MyNotifications($input: NotificationQueryDto) {
26
+ myNotifications(input: $input) {
27
+ notifications {
28
+ ...NotificationFields
29
+ }
30
+ total
31
+ hasMore
32
+ }
33
+ }
34
+
35
+ query NotificationUnreadCount {
36
+ notificationUnreadCount {
37
+ count
38
+ }
39
+ }
40
+
41
+ query MyNotificationPreferences {
42
+ myNotificationPreferences {
43
+ id
44
+ emailEnabled
45
+ inAppEnabled
46
+ pushEnabled
47
+ mutedTypes
48
+ }
49
+ }
50
+
51
+ # ============================================================
52
+ # Notification Mutations
53
+ # ============================================================
54
+
55
+ mutation MarkNotificationAsRead($input: MarkNotificationReadDto!) {
56
+ markNotificationAsRead(input: $input) {
57
+ id
58
+ read
59
+ }
60
+ }
61
+
62
+ mutation MarkAllNotificationsAsRead {
63
+ markAllNotificationsAsRead
64
+ }
65
+
66
+ mutation DismissNotification($input: DismissNotificationDto!) {
67
+ dismissNotification(input: $input)
68
+ }
69
+
70
+ mutation RegisterDeviceToken($input: RegisterDeviceTokenDto!) {
71
+ registerDeviceToken(input: $input) {
72
+ id
73
+ userId
74
+ token
75
+ platform
76
+ deviceName
77
+ active
78
+ }
79
+ }
80
+
81
+ mutation UnregisterDeviceToken($input: UnregisterDeviceTokenDto!) {
82
+ unregisterDeviceToken(input: $input)
83
+ }
84
+
85
+ mutation UpdateNotificationPreferences($input: UpdateNotificationPreferenceDto!) {
86
+ updateNotificationPreferences(input: $input) {
87
+ id
88
+ emailEnabled
89
+ inAppEnabled
90
+ pushEnabled
91
+ mutedTypes
92
+ }
93
+ }
@@ -0,0 +1,368 @@
1
+ # Offer, claim, and eligibility operations
2
+ # Extracted from vtx-base-api.ts offer methods
3
+
4
+ # --- Fragments ---
5
+
6
+ fragment OfferBasicFields on Offer {
7
+ _id
8
+ name
9
+ label
10
+ decription
11
+ type
12
+ status
13
+ discountType
14
+ discountTypeData
15
+ conditions
16
+ dateStart
17
+ dateEnd
18
+ dateCreated
19
+ }
20
+
21
+ fragment OfferImageFields on AWSS3File {
22
+ _id
23
+ name
24
+ contentType
25
+ size
26
+ useType
27
+ url
28
+ key
29
+ }
30
+
31
+ fragment OfferBrandBasic on Brand {
32
+ _id
33
+ name
34
+ description
35
+ logo {
36
+ _id
37
+ url
38
+ key
39
+ }
40
+ }
41
+
42
+ fragment PaginationFields on EnhancedPaginationInfoType {
43
+ currentPage
44
+ totalPages
45
+ totalItems
46
+ itemsPerPage
47
+ hasNextPage
48
+ hasPreviousPage
49
+ }
50
+
51
+ # --- Mutations ---
52
+
53
+ mutation CreateOffer($input: CreateOfferDto!) {
54
+ createOffer(input: $input) {
55
+ _id
56
+ }
57
+ }
58
+
59
+ mutation UpdateOffer($id: String!, $input: CreateOfferDto!) {
60
+ updateOffer(id: $id, input: $input) {
61
+ _id
62
+ }
63
+ }
64
+
65
+ mutation DeleteOffer($id: String!) {
66
+ deleteOffer(id: $id)
67
+ }
68
+
69
+ mutation SetOfferStatus($id: String!, $status: String!) {
70
+ setOfferStatus(id: $id, status: $status) {
71
+ _id
72
+ status
73
+ }
74
+ }
75
+
76
+ mutation ActivateOffer($id: String!) {
77
+ activateOffer(id: $id) {
78
+ _id
79
+ status
80
+ }
81
+ }
82
+
83
+ mutation DeactivateOffer($id: String!) {
84
+ deactivateOffer(id: $id) {
85
+ _id
86
+ status
87
+ }
88
+ }
89
+
90
+ mutation UploadCouponCodes($offerId: String!, $csvContent: String!) {
91
+ uploadCouponCodes(offerId: $offerId, csvContent: $csvContent) {
92
+ addedCodes
93
+ duplicateCodes
94
+ invalidRows
95
+ }
96
+ }
97
+
98
+ mutation ClaimOffer($offerId: String!, $athleteId: String!) {
99
+ claimOffer(offerId: $offerId, athleteId: $athleteId) {
100
+ _id
101
+ claimedAt
102
+ code
103
+ offer {
104
+ _id
105
+ label
106
+ type
107
+ dateEnd
108
+ discountTypeData
109
+ offerImage {
110
+ url
111
+ }
112
+ brand {
113
+ _id
114
+ name
115
+ website
116
+ affiliateLink
117
+ logo {
118
+ url
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+
125
+ mutation RemoveOfferClaim($claimId: String!, $athleteId: String!) {
126
+ removeOfferClaim(claimId: $claimId, athleteId: $athleteId)
127
+ }
128
+
129
+ # --- Queries ---
130
+
131
+ query GetOffers {
132
+ offers {
133
+ ...OfferBasicFields
134
+ offerImage {
135
+ ...OfferImageFields
136
+ }
137
+ brand {
138
+ ...OfferBrandBasic
139
+ }
140
+ sponsor {
141
+ _id
142
+ name
143
+ description
144
+ }
145
+ }
146
+ }
147
+
148
+ query GetOffersPaginated($query: OfferQueryDto) {
149
+ getOffersPaginated(query: $query) {
150
+ items {
151
+ _id
152
+ name
153
+ label
154
+ decription
155
+ type
156
+ status
157
+ discountType
158
+ discountTypeData
159
+ conditions
160
+ dateStart
161
+ dateEnd
162
+ dateCreated
163
+ totalCodes
164
+ availableCodes
165
+ disclaimer
166
+ genericCode
167
+ featured
168
+ offerImage {
169
+ _id
170
+ name
171
+ contentType
172
+ size
173
+ useType
174
+ url
175
+ key
176
+ }
177
+ brand {
178
+ _id
179
+ name
180
+ description
181
+ website
182
+ affiliateLink
183
+ logo {
184
+ _id
185
+ url
186
+ key
187
+ }
188
+ }
189
+ sponsor {
190
+ _id
191
+ name
192
+ description
193
+ }
194
+ criteria {
195
+ _id
196
+ minAge
197
+ maxAge
198
+ allowedGenders
199
+ }
200
+ availableCountries {
201
+ _id
202
+ name
203
+ }
204
+ }
205
+ pagination {
206
+ ...PaginationFields
207
+ }
208
+ }
209
+ }
210
+
211
+ query OffersWithEligibility($query: OfferQueryDto) {
212
+ offersWithEligibility(query: $query) {
213
+ items {
214
+ _id
215
+ name
216
+ label
217
+ decription
218
+ type
219
+ status
220
+ discountType
221
+ discountTypeData
222
+ conditions
223
+ dateStart
224
+ dateEnd
225
+ dateCreated
226
+ totalCodes
227
+ availableCodes
228
+ disclaimer
229
+ featured
230
+ offerImage {
231
+ _id
232
+ name
233
+ contentType
234
+ size
235
+ useType
236
+ url
237
+ key
238
+ }
239
+ brand {
240
+ _id
241
+ name
242
+ website
243
+ affiliateLink
244
+ logo {
245
+ _id
246
+ url
247
+ }
248
+ }
249
+ sponsor {
250
+ _id
251
+ name
252
+ }
253
+ criteria {
254
+ _id
255
+ minAge
256
+ maxAge
257
+ allowedGenders
258
+ }
259
+ availableCountries {
260
+ _id
261
+ name
262
+ }
263
+ eligibility {
264
+ status
265
+ failedCriteria
266
+ missingFields
267
+ messages
268
+ }
269
+ }
270
+ pagination {
271
+ ...PaginationFields
272
+ }
273
+ }
274
+ }
275
+
276
+ query GetOfferById($id: String!) {
277
+ offer(id: $id) {
278
+ _id
279
+ name
280
+ label
281
+ decription
282
+ type
283
+ status
284
+ discountType
285
+ discountTypeData
286
+ conditions
287
+ dateStart
288
+ dateEnd
289
+ dateCreated
290
+ offerImage {
291
+ _id
292
+ url
293
+ key
294
+ }
295
+ brand {
296
+ _id
297
+ name
298
+ logo {
299
+ _id
300
+ url
301
+ }
302
+ }
303
+ sponsor {
304
+ _id
305
+ name
306
+ }
307
+ }
308
+ }
309
+
310
+ query GetOffersForAthlete($athleteId: String) {
311
+ offersForAthlete(athleteId: $athleteId) {
312
+ _id
313
+ name
314
+ label
315
+ decription
316
+ type
317
+ status
318
+ discountType
319
+ discountTypeData
320
+ conditions
321
+ dateStart
322
+ dateEnd
323
+ offerImage {
324
+ _id
325
+ url
326
+ key
327
+ }
328
+ brand {
329
+ _id
330
+ name
331
+ logo {
332
+ _id
333
+ url
334
+ }
335
+ }
336
+ sponsor {
337
+ _id
338
+ name
339
+ }
340
+ }
341
+ }
342
+
343
+ query GetMyOfferClaims($athleteId: String!, $query: OfferClaimQueryDto) {
344
+ myOfferClaims(athleteId: $athleteId, query: $query) {
345
+ _id
346
+ claimedAt
347
+ code
348
+ offer {
349
+ _id
350
+ label
351
+ type
352
+ dateEnd
353
+ discountTypeData
354
+ offerImage {
355
+ url
356
+ }
357
+ brand {
358
+ _id
359
+ name
360
+ website
361
+ affiliateLink
362
+ logo {
363
+ url
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }
@@ -0,0 +1,29 @@
1
+ # Onboarding operations
2
+ # Extracted from vtx-base-api.ts
3
+
4
+ mutation DeleteOnboardingAthlete {
5
+ deleteOnboardingAthlete {
6
+ success
7
+ athleteId
8
+ error
9
+ }
10
+ }
11
+
12
+ mutation UpdateOnboardingProgress($input: UpdateOnboardingProgressDto!) {
13
+ updateOnboardingProgress(input: $input) {
14
+ success
15
+ step
16
+ complete
17
+ error
18
+ }
19
+ }
20
+
21
+ query GetOnboardingProgress {
22
+ getOnboardingProgress {
23
+ success
24
+ step
25
+ complete
26
+ athleteId
27
+ error
28
+ }
29
+ }