@vertikalx/vtx-backend-client 3.0.0-dev.34 → 3.0.0-dev.36
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.
- package/package.json +16 -3
- package/src/api/vtx-base-api.d.ts +61 -33
- package/src/api/vtx-base-api.js +448 -12036
- package/src/api/vtx-base-api.js.map +1 -1
- package/src/api/vtx-mobile-api.d.ts +3 -1
- package/src/api/vtx-mobile-api.js +3 -37
- package/src/api/vtx-mobile-api.js.map +1 -1
- package/src/api/vtx-web-browser-api.js +1 -0
- package/src/api/vtx-web-browser-api.js.map +1 -1
- package/src/api/vtx-web-server-api.js +1 -0
- package/src/api/vtx-web-server-api.js.map +1 -1
- package/src/client/schema.d.ts +195 -18
- package/src/client/schema.js +43 -1
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +97 -15
- package/src/client/types.js +449 -241
- package/src/client/types.js.map +1 -1
- package/src/generated/graphql.d.ts +13684 -0
- package/src/generated/graphql.js +5823 -0
- package/src/generated/graphql.js.map +1 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +3 -0
- package/src/index.js.map +1 -1
- package/tsconfig.lib.tsbuildinfo +0 -1
|
@@ -3,7 +3,9 @@ import { APICallHeaders } from "./api-call-headers";
|
|
|
3
3
|
import { ITypedBackendResponse } from "./backend-response";
|
|
4
4
|
import { VTXBaseAPI } from "./vtx-base-api";
|
|
5
5
|
export declare class VTXMobileAPI extends VTXBaseAPI {
|
|
6
|
-
constructor(backendUrl: string, userToken?: string
|
|
6
|
+
constructor(backendUrl: string, userToken?: string, requestConfig?: {
|
|
7
|
+
fetch?: typeof fetch;
|
|
8
|
+
});
|
|
7
9
|
static getDefaultHeaders(userToken?: string): APICallHeaders;
|
|
8
10
|
getMobileToken(token: string): Promise<ITypedBackendResponse<ValidatedToken>>;
|
|
9
11
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VTXMobileAPI = void 0;
|
|
4
|
-
const client_1 = require("../client");
|
|
5
4
|
const api_call_headers_1 = require("./api-call-headers");
|
|
6
|
-
const response_builder_1 = require("./response-builder");
|
|
7
5
|
const vtx_base_api_1 = require("./vtx-base-api");
|
|
8
6
|
class VTXMobileAPI extends vtx_base_api_1.VTXBaseAPI {
|
|
9
|
-
constructor(backendUrl, userToken) {
|
|
10
|
-
super(backendUrl, VTXMobileAPI.getDefaultHeaders(userToken));
|
|
7
|
+
constructor(backendUrl, userToken, requestConfig) {
|
|
8
|
+
super(backendUrl, VTXMobileAPI.getDefaultHeaders(userToken), requestConfig);
|
|
11
9
|
}
|
|
12
10
|
static getDefaultHeaders(userToken) {
|
|
13
11
|
if (userToken) {
|
|
@@ -23,39 +21,7 @@ class VTXMobileAPI extends vtx_base_api_1.VTXBaseAPI {
|
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
23
|
async getMobileToken(token) {
|
|
26
|
-
|
|
27
|
-
url: this.backendUrl + '/graphql',
|
|
28
|
-
headers: this.headers,
|
|
29
|
-
});
|
|
30
|
-
let retValue = {};
|
|
31
|
-
const fields = {
|
|
32
|
-
accessToken: true,
|
|
33
|
-
refreshToken: true,
|
|
34
|
-
expiresAt: true,
|
|
35
|
-
refreshExpiresAt: true
|
|
36
|
-
};
|
|
37
|
-
try {
|
|
38
|
-
const response = await client.mutation({
|
|
39
|
-
validateToken: {
|
|
40
|
-
__args: {
|
|
41
|
-
input: token
|
|
42
|
-
},
|
|
43
|
-
...fields
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
vtx_base_api_1.VTXBaseAPI.Logger.debug('validateToken Response:');
|
|
47
|
-
vtx_base_api_1.VTXBaseAPI.Logger.debug(JSON.stringify(response, null, 2));
|
|
48
|
-
retValue = (0, response_builder_1.buildResponse)(response, 'validateToken', (r) => {
|
|
49
|
-
const isResponseOk = true && response?.validateToken?.accessToken;
|
|
50
|
-
return isResponseOk;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
catch (err1) {
|
|
54
|
-
vtx_base_api_1.VTXBaseAPI.Logger.error('validateToken err1:');
|
|
55
|
-
vtx_base_api_1.VTXBaseAPI.Logger.error(err1);
|
|
56
|
-
retValue = (0, response_builder_1.buildErrorResponse)(err1);
|
|
57
|
-
}
|
|
58
|
-
return retValue;
|
|
24
|
+
return this.execute(() => this.sdk.ValidateToken({ input: token }), 'validateToken', (r) => !!r?.validateToken?.accessToken, 'validateToken');
|
|
59
25
|
}
|
|
60
26
|
}
|
|
61
27
|
exports.VTXMobileAPI = VTXMobileAPI;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vtx-mobile-api.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/vtx-mobile-api.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"vtx-mobile-api.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/vtx-mobile-api.ts"],"names":[],"mappings":";;;AAGA,yDAA+H;AAG/H,iDAA4C;AAM5C,MAAa,YAAa,SAAQ,yBAAU;IAExC,YAAY,UAAiB,EAAE,SAAiB,EAAE,aAAwC;QACtF,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC,CAAC;IAChF,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,SAAiB;QAE7C,IAAI,SAAS,EAAC,CAAC;YACX,OAAO;gBAEH,CAAC,mDAAgC,CAAC,EAAE,SAAS;gBAC7C,GAAG,kCAAe;aACrB,CAAA;QACL,CAAC;aAAI,CAAC;YACF,OAAO;gBAEH,GAAG,kCAAe;aACrB,CAAA;QACL,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,KAAa;QACrC,OAAO,IAAI,CAAC,OAAO,CACf,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAC9C,eAAe,EACf,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,WAAW,EAC3C,eAAe,CAClB,CAAC;IACN,CAAC;CACJ;AA9BD,oCA8BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vtx-web-browser-api.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/vtx-web-browser-api.ts"],"names":[],"mappings":";;;AAEA,yDAA+H;AAC/H,iDAA4C;AAM5C,MAAa,gBAAiB,SAAQ,yBAAU;IAE5C,YAAY,UAAiB,EAAE,SAAiB;QAC5C,KAAK,CAAC,UAAU,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;IAErE,CAAC;IAEM,YAAY,CAAC,SAAqB;QACrC,IAAI,SAAS,EAAC,CAAC;YACX,IAAI,CAAC,OAAO,GAAG;gBACX,GAAG,IAAI,CAAC,OAAO;gBACf,CAAC,mDAAgC,CAAC,EAAE,SAAS;aAChD,CAAA;QACL,CAAC;aAAI,CAAC;YACF,OAAO,IAAI,CAAC,OAAO,CAAC,mDAAgC,CAAC,CAAC;QAC1D,CAAC;
|
|
1
|
+
{"version":3,"file":"vtx-web-browser-api.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/vtx-web-browser-api.ts"],"names":[],"mappings":";;;AAEA,yDAA+H;AAC/H,iDAA4C;AAM5C,MAAa,gBAAiB,SAAQ,yBAAU;IAE5C,YAAY,UAAiB,EAAE,SAAiB;QAC5C,KAAK,CAAC,UAAU,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;IAErE,CAAC;IAEM,YAAY,CAAC,SAAqB;QACrC,IAAI,SAAS,EAAC,CAAC;YACX,IAAI,CAAC,OAAO,GAAG;gBACX,GAAG,IAAI,CAAC,OAAO;gBACf,CAAC,mDAAgC,CAAC,EAAE,SAAS;aAChD,CAAA;QACL,CAAC;aAAI,CAAC;YACF,OAAO,IAAI,CAAC,OAAO,CAAC,mDAAgC,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,OAAiC,CAAC,CAAC;IACtE,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,SAAiB;QAE7C,IAAI,SAAS,EAAC,CAAC;YACX,OAAO;gBACH,GAAG,kCAAe;gBAClB,CAAC,mDAAgC,CAAC,EAAE,SAAS;aAChD,CAAA;QAEL,CAAC;aAAI,CAAC;YACF,OAAO;gBACH,GAAG,kCAAe;aACrB,CAAA;QAEL,CAAC;IAEL,CAAC;CAEJ;AApCD,4CAoCC"}
|
|
@@ -20,6 +20,7 @@ class VTXWebServerAPI extends vtx_base_api_1.VTXBaseAPI {
|
|
|
20
20
|
else {
|
|
21
21
|
delete this.headers[api_call_headers_1.DEFAULT_SYSTEM_USER_TOKEN_HEADER];
|
|
22
22
|
}
|
|
23
|
+
this.gqlClient.setHeaders(this.headers);
|
|
23
24
|
}
|
|
24
25
|
static getDefaultHeaders(systemKeyName, systemKeyValue) {
|
|
25
26
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vtx-web-server-api.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/vtx-web-server-api.ts"],"names":[],"mappings":";;;AAEA,yDAAgM;AAChM,iDAA4C;AAM5C,MAAa,eAAgB,SAAQ,yBAAU;IAE3C,YAAY,UAAiB,EAAE,aAAoB,EAAE,cAAqB;QACtE,KAAK,CAAC,UAAU,EAAE,eAAe,CAAC,iBAAiB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;QAEpF,IAAI,yBAAU,CAAC,SAAS,EAAE,EAAC,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;IACM,YAAY,CAAC,SAAqB;QACrC,IAAI,SAAS,EAAC,CAAC;YACX,IAAI,CAAC,OAAO,GAAG;gBACX,CAAC,mDAAgC,CAAC,EAAE,SAAS;gBAC7C,GAAG,IAAI,CAAC,OAAO;aAClB,CAAA;QACL,CAAC;aAAI,CAAC;YACF,OAAO,IAAI,CAAC,OAAO,CAAC,mDAAgC,CAAC,CAAC;QAC1D,CAAC;
|
|
1
|
+
{"version":3,"file":"vtx-web-server-api.js","sourceRoot":"","sources":["../../../../../libs/vtx-backend-client/src/api/vtx-web-server-api.ts"],"names":[],"mappings":";;;AAEA,yDAAgM;AAChM,iDAA4C;AAM5C,MAAa,eAAgB,SAAQ,yBAAU;IAE3C,YAAY,UAAiB,EAAE,aAAoB,EAAE,cAAqB;QACtE,KAAK,CAAC,UAAU,EAAE,eAAe,CAAC,iBAAiB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;QAEpF,IAAI,yBAAU,CAAC,SAAS,EAAE,EAAC,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;IACM,YAAY,CAAC,SAAqB;QACrC,IAAI,SAAS,EAAC,CAAC;YACX,IAAI,CAAC,OAAO,GAAG;gBACX,CAAC,mDAAgC,CAAC,EAAE,SAAS;gBAC7C,GAAG,IAAI,CAAC,OAAO;aAClB,CAAA;QACL,CAAC;aAAI,CAAC;YACF,OAAO,IAAI,CAAC,OAAO,CAAC,mDAAgC,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,OAAiC,CAAC,CAAC;IACtE,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,aAAoB,EAAE,cAAqB;QAEvE,OAAO;YACH,CAAC,iDAA8B,CAAC,EAAE,aAAa;YAC/C,CAAC,kDAA+B,CAAC,EAAE,cAAc;YACjD,GAAG,kCAAe;SACrB,CAAA;IAEL,CAAC;CAEJ;AA/BD,0CA+BC"}
|
package/src/client/schema.d.ts
CHANGED
|
@@ -1104,7 +1104,6 @@ export interface StravaAthleteData {
|
|
|
1104
1104
|
profile: (Scalars['String'] | null);
|
|
1105
1105
|
created_at: (Scalars['String'] | null);
|
|
1106
1106
|
updated_at: (Scalars['String'] | null);
|
|
1107
|
-
weight: (Scalars['Float'] | null);
|
|
1108
1107
|
__typename: 'StravaAthleteData';
|
|
1109
1108
|
}
|
|
1110
1109
|
export interface InstagramCursors {
|
|
@@ -1159,10 +1158,8 @@ export interface AthleteIntegrationReference {
|
|
|
1159
1158
|
_id: Scalars['String'];
|
|
1160
1159
|
athlete: AthleteReference;
|
|
1161
1160
|
hasStravaIntegration: (Scalars['Boolean'] | null);
|
|
1162
|
-
stravaTokenExpires: (Scalars['DateTime'] | null);
|
|
1163
1161
|
stravaAthleteData: (StravaAthleteData | null);
|
|
1164
1162
|
hasInstagramIntegration: (Scalars['Boolean'] | null);
|
|
1165
|
-
instagramTokenExpires: (Scalars['DateTime'] | null);
|
|
1166
1163
|
instagramUserData: (InstagramUserData | null);
|
|
1167
1164
|
instagramMediaData: (InstagramMediaData | null);
|
|
1168
1165
|
__typename: 'AthleteIntegrationReference';
|
|
@@ -2094,6 +2091,7 @@ export interface EmailCampaignPage {
|
|
|
2094
2091
|
export interface SendGridTemplate {
|
|
2095
2092
|
id: Scalars['String'];
|
|
2096
2093
|
name: Scalars['String'];
|
|
2094
|
+
subject: (Scalars['String'] | null);
|
|
2097
2095
|
updatedAt: (Scalars['String'] | null);
|
|
2098
2096
|
__typename: 'SendGridTemplate';
|
|
2099
2097
|
}
|
|
@@ -2109,6 +2107,58 @@ export interface AudiencePreview {
|
|
|
2109
2107
|
users: AudiencePreviewUser[];
|
|
2110
2108
|
__typename: 'AudiencePreview';
|
|
2111
2109
|
}
|
|
2110
|
+
export interface AiCoachMessage {
|
|
2111
|
+
_id: Scalars['ID'];
|
|
2112
|
+
threadId: Scalars['String'];
|
|
2113
|
+
role: Scalars['String'];
|
|
2114
|
+
messageType: Scalars['String'];
|
|
2115
|
+
content: Scalars['String'];
|
|
2116
|
+
tokenCount: Scalars['Int'];
|
|
2117
|
+
createdAt: Scalars['DateTime'];
|
|
2118
|
+
index: Scalars['Int'];
|
|
2119
|
+
__typename: 'AiCoachMessage';
|
|
2120
|
+
}
|
|
2121
|
+
export interface AiCoachThread {
|
|
2122
|
+
_id: Scalars['ID'];
|
|
2123
|
+
athleteId: Scalars['String'];
|
|
2124
|
+
weekStart: Scalars['String'];
|
|
2125
|
+
status: Scalars['String'];
|
|
2126
|
+
summary: (Scalars['String'] | null);
|
|
2127
|
+
contextSnapshot: (Scalars['JSON'] | null);
|
|
2128
|
+
createdAt: Scalars['DateTime'];
|
|
2129
|
+
updatedAt: Scalars['DateTime'];
|
|
2130
|
+
messages: (AiCoachMessage[] | null);
|
|
2131
|
+
__typename: 'AiCoachThread';
|
|
2132
|
+
}
|
|
2133
|
+
export interface AiCoachConfig {
|
|
2134
|
+
athleteId: Scalars['String'];
|
|
2135
|
+
enabled: Scalars['Boolean'];
|
|
2136
|
+
nudgesEnabled: Scalars['Boolean'];
|
|
2137
|
+
preferredFocus: Scalars['String'];
|
|
2138
|
+
updatedAt: Scalars['DateTime'];
|
|
2139
|
+
__typename: 'AiCoachConfig';
|
|
2140
|
+
}
|
|
2141
|
+
export interface AiCoachNudge {
|
|
2142
|
+
_id: Scalars['ID'];
|
|
2143
|
+
athleteId: Scalars['String'];
|
|
2144
|
+
nudgeType: Scalars['String'];
|
|
2145
|
+
title: Scalars['String'];
|
|
2146
|
+
body: Scalars['String'];
|
|
2147
|
+
data: (Scalars['JSON'] | null);
|
|
2148
|
+
read: Scalars['Boolean'];
|
|
2149
|
+
createdAt: Scalars['DateTime'];
|
|
2150
|
+
expiresAt: (Scalars['DateTime'] | null);
|
|
2151
|
+
__typename: 'AiCoachNudge';
|
|
2152
|
+
}
|
|
2153
|
+
export interface AiCoachNudgeListResponse {
|
|
2154
|
+
nudges: AiCoachNudge[];
|
|
2155
|
+
total: Scalars['Int'];
|
|
2156
|
+
__typename: 'AiCoachNudgeListResponse';
|
|
2157
|
+
}
|
|
2158
|
+
export interface AiCoachUnreadNudgeCountResponse {
|
|
2159
|
+
count: Scalars['Int'];
|
|
2160
|
+
__typename: 'AiCoachUnreadNudgeCountResponse';
|
|
2161
|
+
}
|
|
2112
2162
|
export type TimeRange = 'SEVEN_DAYS' | 'THIRTY_DAYS' | 'NINETY_DAYS' | 'ONE_YEAR' | 'ALL_TIME';
|
|
2113
2163
|
export type DonationMode = 'PUBLIC' | 'PRIVATE' | 'ANONYMOUS';
|
|
2114
2164
|
export type OfferClaimStatus = 'ACTIVE' | 'EXPIRED' | 'ALL';
|
|
@@ -2233,7 +2283,14 @@ export interface Query {
|
|
|
2233
2283
|
getEmailCampaign: EmailCampaign;
|
|
2234
2284
|
getAudiencePreview: AudiencePreview;
|
|
2235
2285
|
getSendGridTemplates: SendGridTemplate[];
|
|
2286
|
+
getSendGridTemplatePreview: (Scalars['String'] | null);
|
|
2236
2287
|
getEmailSegments: EmailSegment[];
|
|
2288
|
+
getAiCoachThread: (AiCoachThread | null);
|
|
2289
|
+
getAiCoachThreadHistory: AiCoachThread[];
|
|
2290
|
+
getAiCoachThreadMessages: AiCoachMessage[];
|
|
2291
|
+
getAiCoachConfig: AiCoachConfig;
|
|
2292
|
+
getAiCoachNudges: AiCoachNudgeListResponse;
|
|
2293
|
+
getAiCoachUnreadNudgeCount: AiCoachUnreadNudgeCountResponse;
|
|
2237
2294
|
__typename: 'Query';
|
|
2238
2295
|
}
|
|
2239
2296
|
export interface Mutation {
|
|
@@ -2352,6 +2409,9 @@ export interface Mutation {
|
|
|
2352
2409
|
createEmailSegment: EmailSegment;
|
|
2353
2410
|
updateEmailSegment: EmailSegment;
|
|
2354
2411
|
deleteEmailSegment: Scalars['Boolean'];
|
|
2412
|
+
sendAiCoachMessage: AiCoachMessage;
|
|
2413
|
+
updateAiCoachConfig: AiCoachConfig;
|
|
2414
|
+
markAiCoachNudgeRead: Scalars['Boolean'];
|
|
2355
2415
|
__typename: 'Mutation';
|
|
2356
2416
|
}
|
|
2357
2417
|
export interface UserGenqlSelection {
|
|
@@ -3559,7 +3619,6 @@ export interface StravaAthleteDataGenqlSelection {
|
|
|
3559
3619
|
profile?: boolean | number;
|
|
3560
3620
|
created_at?: boolean | number;
|
|
3561
3621
|
updated_at?: boolean | number;
|
|
3562
|
-
weight?: boolean | number;
|
|
3563
3622
|
__typename?: boolean | number;
|
|
3564
3623
|
__scalar?: boolean | number;
|
|
3565
3624
|
}
|
|
@@ -3622,10 +3681,8 @@ export interface AthleteIntegrationReferenceGenqlSelection {
|
|
|
3622
3681
|
_id?: boolean | number;
|
|
3623
3682
|
athlete?: AthleteReferenceGenqlSelection;
|
|
3624
3683
|
hasStravaIntegration?: boolean | number;
|
|
3625
|
-
stravaTokenExpires?: boolean | number;
|
|
3626
3684
|
stravaAthleteData?: StravaAthleteDataGenqlSelection;
|
|
3627
3685
|
hasInstagramIntegration?: boolean | number;
|
|
3628
|
-
instagramTokenExpires?: boolean | number;
|
|
3629
3686
|
instagramUserData?: InstagramUserDataGenqlSelection;
|
|
3630
3687
|
instagramMediaData?: InstagramMediaDataGenqlSelection;
|
|
3631
3688
|
__typename?: boolean | number;
|
|
@@ -4652,6 +4709,7 @@ export interface EmailCampaignPageGenqlSelection {
|
|
|
4652
4709
|
export interface SendGridTemplateGenqlSelection {
|
|
4653
4710
|
id?: boolean | number;
|
|
4654
4711
|
name?: boolean | number;
|
|
4712
|
+
subject?: boolean | number;
|
|
4655
4713
|
updatedAt?: boolean | number;
|
|
4656
4714
|
__typename?: boolean | number;
|
|
4657
4715
|
__scalar?: boolean | number;
|
|
@@ -4670,6 +4728,64 @@ export interface AudiencePreviewGenqlSelection {
|
|
|
4670
4728
|
__typename?: boolean | number;
|
|
4671
4729
|
__scalar?: boolean | number;
|
|
4672
4730
|
}
|
|
4731
|
+
export interface AiCoachMessageGenqlSelection {
|
|
4732
|
+
_id?: boolean | number;
|
|
4733
|
+
threadId?: boolean | number;
|
|
4734
|
+
role?: boolean | number;
|
|
4735
|
+
messageType?: boolean | number;
|
|
4736
|
+
content?: boolean | number;
|
|
4737
|
+
tokenCount?: boolean | number;
|
|
4738
|
+
createdAt?: boolean | number;
|
|
4739
|
+
index?: boolean | number;
|
|
4740
|
+
__typename?: boolean | number;
|
|
4741
|
+
__scalar?: boolean | number;
|
|
4742
|
+
}
|
|
4743
|
+
export interface AiCoachThreadGenqlSelection {
|
|
4744
|
+
_id?: boolean | number;
|
|
4745
|
+
athleteId?: boolean | number;
|
|
4746
|
+
weekStart?: boolean | number;
|
|
4747
|
+
status?: boolean | number;
|
|
4748
|
+
summary?: boolean | number;
|
|
4749
|
+
contextSnapshot?: boolean | number;
|
|
4750
|
+
createdAt?: boolean | number;
|
|
4751
|
+
updatedAt?: boolean | number;
|
|
4752
|
+
messages?: AiCoachMessageGenqlSelection;
|
|
4753
|
+
__typename?: boolean | number;
|
|
4754
|
+
__scalar?: boolean | number;
|
|
4755
|
+
}
|
|
4756
|
+
export interface AiCoachConfigGenqlSelection {
|
|
4757
|
+
athleteId?: boolean | number;
|
|
4758
|
+
enabled?: boolean | number;
|
|
4759
|
+
nudgesEnabled?: boolean | number;
|
|
4760
|
+
preferredFocus?: boolean | number;
|
|
4761
|
+
updatedAt?: boolean | number;
|
|
4762
|
+
__typename?: boolean | number;
|
|
4763
|
+
__scalar?: boolean | number;
|
|
4764
|
+
}
|
|
4765
|
+
export interface AiCoachNudgeGenqlSelection {
|
|
4766
|
+
_id?: boolean | number;
|
|
4767
|
+
athleteId?: boolean | number;
|
|
4768
|
+
nudgeType?: boolean | number;
|
|
4769
|
+
title?: boolean | number;
|
|
4770
|
+
body?: boolean | number;
|
|
4771
|
+
data?: boolean | number;
|
|
4772
|
+
read?: boolean | number;
|
|
4773
|
+
createdAt?: boolean | number;
|
|
4774
|
+
expiresAt?: boolean | number;
|
|
4775
|
+
__typename?: boolean | number;
|
|
4776
|
+
__scalar?: boolean | number;
|
|
4777
|
+
}
|
|
4778
|
+
export interface AiCoachNudgeListResponseGenqlSelection {
|
|
4779
|
+
nudges?: AiCoachNudgeGenqlSelection;
|
|
4780
|
+
total?: boolean | number;
|
|
4781
|
+
__typename?: boolean | number;
|
|
4782
|
+
__scalar?: boolean | number;
|
|
4783
|
+
}
|
|
4784
|
+
export interface AiCoachUnreadNudgeCountResponseGenqlSelection {
|
|
4785
|
+
count?: boolean | number;
|
|
4786
|
+
__typename?: boolean | number;
|
|
4787
|
+
__scalar?: boolean | number;
|
|
4788
|
+
}
|
|
4673
4789
|
export interface CreateDatabaseFileDto {
|
|
4674
4790
|
identifier: Scalars['String'];
|
|
4675
4791
|
version?: Scalars['String'];
|
|
@@ -5427,6 +5543,18 @@ export interface FollowedAthletesQueryInput {
|
|
|
5427
5543
|
limit?: (Scalars['Int'] | null);
|
|
5428
5544
|
offset?: (Scalars['Int'] | null);
|
|
5429
5545
|
}
|
|
5546
|
+
export interface SendChatMessageDto {
|
|
5547
|
+
threadId: Scalars['String'];
|
|
5548
|
+
message: Scalars['String'];
|
|
5549
|
+
}
|
|
5550
|
+
export interface UpdateAiCoachConfigDto {
|
|
5551
|
+
enabled?: (Scalars['Boolean'] | null);
|
|
5552
|
+
nudgesEnabled?: (Scalars['Boolean'] | null);
|
|
5553
|
+
preferredFocus?: (Scalars['String'] | null);
|
|
5554
|
+
}
|
|
5555
|
+
export interface NudgeQueryDto {
|
|
5556
|
+
unreadOnly?: (Scalars['Boolean'] | null);
|
|
5557
|
+
}
|
|
5430
5558
|
export interface QueryGenqlSelection {
|
|
5431
5559
|
findTenantById?: (TenantGenqlSelection & {
|
|
5432
5560
|
__args: {
|
|
@@ -5910,7 +6038,30 @@ export interface QueryGenqlSelection {
|
|
|
5910
6038
|
};
|
|
5911
6039
|
});
|
|
5912
6040
|
getSendGridTemplates?: SendGridTemplateGenqlSelection;
|
|
6041
|
+
getSendGridTemplatePreview?: {
|
|
6042
|
+
__args: {
|
|
6043
|
+
templateId: Scalars['String'];
|
|
6044
|
+
};
|
|
6045
|
+
};
|
|
5913
6046
|
getEmailSegments?: EmailSegmentGenqlSelection;
|
|
6047
|
+
getAiCoachThread?: AiCoachThreadGenqlSelection;
|
|
6048
|
+
getAiCoachThreadHistory?: (AiCoachThreadGenqlSelection & {
|
|
6049
|
+
__args?: {
|
|
6050
|
+
limit?: (Scalars['Int'] | null);
|
|
6051
|
+
};
|
|
6052
|
+
});
|
|
6053
|
+
getAiCoachThreadMessages?: (AiCoachMessageGenqlSelection & {
|
|
6054
|
+
__args: {
|
|
6055
|
+
threadId: Scalars['String'];
|
|
6056
|
+
};
|
|
6057
|
+
});
|
|
6058
|
+
getAiCoachConfig?: AiCoachConfigGenqlSelection;
|
|
6059
|
+
getAiCoachNudges?: (AiCoachNudgeListResponseGenqlSelection & {
|
|
6060
|
+
__args?: {
|
|
6061
|
+
input?: (NudgeQueryDto | null);
|
|
6062
|
+
};
|
|
6063
|
+
});
|
|
6064
|
+
getAiCoachUnreadNudgeCount?: AiCoachUnreadNudgeCountResponseGenqlSelection;
|
|
5914
6065
|
__typename?: boolean | number;
|
|
5915
6066
|
__scalar?: boolean | number;
|
|
5916
6067
|
}
|
|
@@ -5935,21 +6086,16 @@ export interface GetSportEventsDto {
|
|
|
5935
6086
|
}
|
|
5936
6087
|
export interface AudienceFilterDto {
|
|
5937
6088
|
userType?: (Scalars['String'] | null);
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
walletStatus?: (Scalars['String'] | null);
|
|
6089
|
+
sport?: (Scalars['String'] | null);
|
|
6090
|
+
country?: (Scalars['String'] | null);
|
|
6091
|
+
onboardingStatus?: (Scalars['String'] | null);
|
|
5942
6092
|
campaignStatus?: (Scalars['String'] | null);
|
|
6093
|
+
walletStatus?: (Scalars['String'] | null);
|
|
5943
6094
|
hasStrava?: (Scalars['Boolean'] | null);
|
|
5944
6095
|
hasInstagram?: (Scalars['Boolean'] | null);
|
|
5945
6096
|
vtxScoreMin?: (Scalars['Float'] | null);
|
|
5946
6097
|
vtxScoreMax?: (Scalars['Float'] | null);
|
|
5947
|
-
|
|
5948
|
-
tpiScoreMax?: (Scalars['Float'] | null);
|
|
5949
|
-
spiScoreMin?: (Scalars['Float'] | null);
|
|
5950
|
-
spiScoreMax?: (Scalars['Float'] | null);
|
|
5951
|
-
apiScoreMin?: (Scalars['Float'] | null);
|
|
5952
|
-
apiScoreMax?: (Scalars['Float'] | null);
|
|
6098
|
+
donorStatus?: (Scalars['String'] | null);
|
|
5953
6099
|
}
|
|
5954
6100
|
export interface MutationGenqlSelection {
|
|
5955
6101
|
registerNewDomainTenant?: (TenantGenqlSelection & {
|
|
@@ -6503,6 +6649,21 @@ export interface MutationGenqlSelection {
|
|
|
6503
6649
|
id: Scalars['String'];
|
|
6504
6650
|
};
|
|
6505
6651
|
};
|
|
6652
|
+
sendAiCoachMessage?: (AiCoachMessageGenqlSelection & {
|
|
6653
|
+
__args: {
|
|
6654
|
+
input: SendChatMessageDto;
|
|
6655
|
+
};
|
|
6656
|
+
});
|
|
6657
|
+
updateAiCoachConfig?: (AiCoachConfigGenqlSelection & {
|
|
6658
|
+
__args: {
|
|
6659
|
+
input: UpdateAiCoachConfigDto;
|
|
6660
|
+
};
|
|
6661
|
+
});
|
|
6662
|
+
markAiCoachNudgeRead?: {
|
|
6663
|
+
__args: {
|
|
6664
|
+
nudgeId: Scalars['String'];
|
|
6665
|
+
};
|
|
6666
|
+
};
|
|
6506
6667
|
__typename?: boolean | number;
|
|
6507
6668
|
__scalar?: boolean | number;
|
|
6508
6669
|
}
|
|
@@ -6711,7 +6872,6 @@ export interface CreateEmailCampaignDto {
|
|
|
6711
6872
|
audienceFilters: AudienceFilterDto;
|
|
6712
6873
|
segmentId?: (Scalars['String'] | null);
|
|
6713
6874
|
scheduledFor?: (Scalars['DateTime'] | null);
|
|
6714
|
-
status?: (Scalars['String'] | null);
|
|
6715
6875
|
}
|
|
6716
6876
|
export interface UpdateEmailCampaignDto {
|
|
6717
6877
|
subject?: (Scalars['String'] | null);
|
|
@@ -6721,7 +6881,6 @@ export interface UpdateEmailCampaignDto {
|
|
|
6721
6881
|
audienceFilters?: (AudienceFilterDto | null);
|
|
6722
6882
|
segmentId?: (Scalars['String'] | null);
|
|
6723
6883
|
scheduledFor?: (Scalars['DateTime'] | null);
|
|
6724
|
-
status?: (Scalars['String'] | null);
|
|
6725
6884
|
}
|
|
6726
6885
|
export interface CreateEmailSegmentDto {
|
|
6727
6886
|
name: Scalars['String'];
|
|
@@ -7382,6 +7541,24 @@ export declare const isAudiencePreviewUser: (obj?: {
|
|
|
7382
7541
|
export declare const isAudiencePreview: (obj?: {
|
|
7383
7542
|
__typename?: any;
|
|
7384
7543
|
} | null) => obj is AudiencePreview;
|
|
7544
|
+
export declare const isAiCoachMessage: (obj?: {
|
|
7545
|
+
__typename?: any;
|
|
7546
|
+
} | null) => obj is AiCoachMessage;
|
|
7547
|
+
export declare const isAiCoachThread: (obj?: {
|
|
7548
|
+
__typename?: any;
|
|
7549
|
+
} | null) => obj is AiCoachThread;
|
|
7550
|
+
export declare const isAiCoachConfig: (obj?: {
|
|
7551
|
+
__typename?: any;
|
|
7552
|
+
} | null) => obj is AiCoachConfig;
|
|
7553
|
+
export declare const isAiCoachNudge: (obj?: {
|
|
7554
|
+
__typename?: any;
|
|
7555
|
+
} | null) => obj is AiCoachNudge;
|
|
7556
|
+
export declare const isAiCoachNudgeListResponse: (obj?: {
|
|
7557
|
+
__typename?: any;
|
|
7558
|
+
} | null) => obj is AiCoachNudgeListResponse;
|
|
7559
|
+
export declare const isAiCoachUnreadNudgeCountResponse: (obj?: {
|
|
7560
|
+
__typename?: any;
|
|
7561
|
+
} | null) => obj is AiCoachUnreadNudgeCountResponse;
|
|
7385
7562
|
export declare const isQuery: (obj?: {
|
|
7386
7563
|
__typename?: any;
|
|
7387
7564
|
} | null) => obj is Query;
|
package/src/client/schema.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.isSponsorshipCommitment = exports.isSponsorshipItem = exports.isQualific
|
|
|
4
4
|
exports.isSponsorAthleteInvitation = exports.isFundingCheckoutSessionData = exports.isCheckoutSession = exports.isAthlete = exports.isAthleteReference = exports.isHistoricalScore = exports.isStripeAccountReference = exports.isStripeAccount = exports.isStripeFutureRequirementType = exports.isStripeRequirementType = exports.isStripeErrorType = exports.isStripeFutureRequirementAlternativeType = exports.isStripeRequirementAlternativeType = exports.isStripeCapabilityType = exports.isFundRaisingCampaign = exports.isVideo = exports.isAthletePreferences = exports.isChannel = exports.isNewsLink = exports.isAthleteMembership = exports.isMembershipOrganization = exports.isMembershipOrganizationReference = exports.isAthleteCompetition = exports.isAlbum = exports.isPhotoAlbum = exports.isBudget = exports.isBudgetItem = exports.isAthleteCompetitionResult = exports.isSportsEvent = exports.isWorldLocation = exports.isTeam = exports.isAthleteRankings = exports.isRanking = exports.isSportLevel = exports.isSportLevelTranslation = exports.isVtxScores = exports.isSport = exports.isFollowStats = exports.isStravaTpiSwimDto = exports.isStravaTpiRunDto = exports.isStravaTpiRideDto = exports.isBrand = exports.isBrandTranslation = exports.isBrandStats = exports.isSponsorBrand = exports.isSponsor = exports.isSponsorship = exports.isSponsorshipTranslation = exports.isSponsorshipStats = exports.isDuration = void 0;
|
|
5
5
|
exports.isAthleteQueryResponse = exports.isCursorPaginationResponse = exports.isSortOrder = exports.isForceScoreRefreshResponse = exports.isForceScoreRefreshResult = exports.isRefreshDiagnostics = exports.isScoreRefreshDetail = exports.isDeleteSingleValueResponse = exports.isDeleteValuesResponse = exports.isErrorType = exports.isEditValueResponse = exports.isPaginatedSponsors = exports.isPaginatedBrands = exports.isPaginatedOffersWithEligibility = exports.isOfferWithEligibility = exports.isEnhancedPaginationInfoType = exports.isEligibilityResult = exports.isOfferClaim = exports.isCoupon = exports.isCouponCode = exports.isPromotion = exports.isOffer = exports.isAdminTransactionView = exports.isAdminTransactionFundingDetails = exports.isAdminUserView = exports.isMember = exports.isDonation = exports.isBudgetConcept = exports.isBudgetItemUnit = exports.isMergeEventsResponse = exports.isBudgetData = exports.isCampaignBudgetData = exports.isCompetitionBudgetData = exports.isBaseBudgetData = exports.isCompetitionBudgetReference = exports.isBudgetReference = exports.isBudgetItemReference = exports.isReceiptUrl = exports.isReceipt = exports.isAthleteIntegrationReference = exports.isInstagramUserData = exports.isInstagramMediaData = exports.isInstagramMediaItem = exports.isInstagramInsights = exports.isInstagramMetric = exports.isInstagramPaging = exports.isInstagramCursors = exports.isStravaAthleteData = exports.isStripeCheckoutSession = exports.isStripeSession = void 0;
|
|
6
6
|
exports.isPostMetricType = exports.isSocialAggregateType = exports.isActivityDatesResponse = exports.isActivityDateEntry = exports.isComponentSummary = exports.isTopMetric = exports.isActivityDetail = exports.isScoreInfo = exports.isMetricComparison = exports.isActivitiesResponse = exports.isActivityEntry = exports.isRankContext = exports.isRankHistoryEntry = exports.isScoreHistoryEntry = exports.isDashboardSummary = exports.isUserRank = exports.isLeaderboardResponse = exports.isLeaderboardFilters = exports.isLeaderboardPagination = exports.isLeaderboardEntry = exports.isOfferAvailability = exports.isUploadResult = exports.isPaginatedOffers = exports.isPaginatedTransactions = exports.isUserDomain = exports.isStripeTransfer = exports.isStripeBalance = exports.isCurrencyAmountType = exports.isPaginatedDonations = exports.isDonationDates = exports.isPaginatedEvents = exports.isTransactionDetails = exports.isPaginatedUsers = exports.isDeleteVtxUserResponse = exports.isValidatedToken = exports.isUserImages = exports.isPaginatedSports = exports.isPublicIntegrationStatus = exports.isOnboardingProgressResponse = exports.isCheckScoreRefreshCapabilityResponse = exports.isScoreRefreshCapability = exports.isBrowseCampaignsResult = exports.isStripeObject = exports.isHistoricalScoresPeriod = exports.isCompetitionDeleteVerificationResponse = exports.isCompetitionDeleteVerificationReason = exports.isDeleteOnboardingAthleteResponse = exports.isExistValueResponse = exports.isAddValuesResponse = exports.isEditPictureResponse = void 0;
|
|
7
|
-
exports.enumPostSortOption = exports.enumOfferClaimStatus = exports.enumDonationMode = exports.enumTimeRange = exports.enumPeriodType = exports.enumContentType = exports.enumPlatform = exports.enumActivityCategory = exports.enumStripeTransferStatus = exports.enumForceScoreRefreshStatus = exports.enumEligibilityStatus = exports.enumFundingMode = exports.enumFundingStatus = exports.isMutation = exports.isQuery = exports.isAudiencePreview = exports.isAudiencePreviewUser = exports.isSendGridTemplate = exports.isEmailCampaignPage = exports.isEmailCampaign = exports.isEmailSegment = exports.isEmailCampaignDelivery = exports.isIsFollowingResponse = exports.isFollowedAthletesListResponse = exports.isFollowedAthleteInfo = exports.isDeviceTokenType = exports.isNotificationPreference = exports.isUnreadCountResponse = exports.isNotificationListResponse = exports.isNotification = exports.isPostComparisonResultType = exports.isAveragesType = void 0;
|
|
7
|
+
exports.enumPostSortOption = exports.enumOfferClaimStatus = exports.enumDonationMode = exports.enumTimeRange = exports.enumPeriodType = exports.enumContentType = exports.enumPlatform = exports.enumActivityCategory = exports.enumStripeTransferStatus = exports.enumForceScoreRefreshStatus = exports.enumEligibilityStatus = exports.enumFundingMode = exports.enumFundingStatus = exports.isMutation = exports.isQuery = exports.isAiCoachUnreadNudgeCountResponse = exports.isAiCoachNudgeListResponse = exports.isAiCoachNudge = exports.isAiCoachConfig = exports.isAiCoachThread = exports.isAiCoachMessage = exports.isAudiencePreview = exports.isAudiencePreviewUser = exports.isSendGridTemplate = exports.isEmailCampaignPage = exports.isEmailCampaign = exports.isEmailSegment = exports.isEmailCampaignDelivery = exports.isIsFollowingResponse = exports.isFollowedAthletesListResponse = exports.isFollowedAthleteInfo = exports.isDeviceTokenType = exports.isNotificationPreference = exports.isUnreadCountResponse = exports.isNotificationListResponse = exports.isNotification = exports.isPostComparisonResultType = exports.isAveragesType = void 0;
|
|
8
8
|
const User_possibleTypes = ['User'];
|
|
9
9
|
const isUser = (obj) => {
|
|
10
10
|
if (!obj?.__typename)
|
|
@@ -1524,6 +1524,48 @@ const isAudiencePreview = (obj) => {
|
|
|
1524
1524
|
return AudiencePreview_possibleTypes.includes(obj.__typename);
|
|
1525
1525
|
};
|
|
1526
1526
|
exports.isAudiencePreview = isAudiencePreview;
|
|
1527
|
+
const AiCoachMessage_possibleTypes = ['AiCoachMessage'];
|
|
1528
|
+
const isAiCoachMessage = (obj) => {
|
|
1529
|
+
if (!obj?.__typename)
|
|
1530
|
+
throw new Error('__typename is missing in "isAiCoachMessage"');
|
|
1531
|
+
return AiCoachMessage_possibleTypes.includes(obj.__typename);
|
|
1532
|
+
};
|
|
1533
|
+
exports.isAiCoachMessage = isAiCoachMessage;
|
|
1534
|
+
const AiCoachThread_possibleTypes = ['AiCoachThread'];
|
|
1535
|
+
const isAiCoachThread = (obj) => {
|
|
1536
|
+
if (!obj?.__typename)
|
|
1537
|
+
throw new Error('__typename is missing in "isAiCoachThread"');
|
|
1538
|
+
return AiCoachThread_possibleTypes.includes(obj.__typename);
|
|
1539
|
+
};
|
|
1540
|
+
exports.isAiCoachThread = isAiCoachThread;
|
|
1541
|
+
const AiCoachConfig_possibleTypes = ['AiCoachConfig'];
|
|
1542
|
+
const isAiCoachConfig = (obj) => {
|
|
1543
|
+
if (!obj?.__typename)
|
|
1544
|
+
throw new Error('__typename is missing in "isAiCoachConfig"');
|
|
1545
|
+
return AiCoachConfig_possibleTypes.includes(obj.__typename);
|
|
1546
|
+
};
|
|
1547
|
+
exports.isAiCoachConfig = isAiCoachConfig;
|
|
1548
|
+
const AiCoachNudge_possibleTypes = ['AiCoachNudge'];
|
|
1549
|
+
const isAiCoachNudge = (obj) => {
|
|
1550
|
+
if (!obj?.__typename)
|
|
1551
|
+
throw new Error('__typename is missing in "isAiCoachNudge"');
|
|
1552
|
+
return AiCoachNudge_possibleTypes.includes(obj.__typename);
|
|
1553
|
+
};
|
|
1554
|
+
exports.isAiCoachNudge = isAiCoachNudge;
|
|
1555
|
+
const AiCoachNudgeListResponse_possibleTypes = ['AiCoachNudgeListResponse'];
|
|
1556
|
+
const isAiCoachNudgeListResponse = (obj) => {
|
|
1557
|
+
if (!obj?.__typename)
|
|
1558
|
+
throw new Error('__typename is missing in "isAiCoachNudgeListResponse"');
|
|
1559
|
+
return AiCoachNudgeListResponse_possibleTypes.includes(obj.__typename);
|
|
1560
|
+
};
|
|
1561
|
+
exports.isAiCoachNudgeListResponse = isAiCoachNudgeListResponse;
|
|
1562
|
+
const AiCoachUnreadNudgeCountResponse_possibleTypes = ['AiCoachUnreadNudgeCountResponse'];
|
|
1563
|
+
const isAiCoachUnreadNudgeCountResponse = (obj) => {
|
|
1564
|
+
if (!obj?.__typename)
|
|
1565
|
+
throw new Error('__typename is missing in "isAiCoachUnreadNudgeCountResponse"');
|
|
1566
|
+
return AiCoachUnreadNudgeCountResponse_possibleTypes.includes(obj.__typename);
|
|
1567
|
+
};
|
|
1568
|
+
exports.isAiCoachUnreadNudgeCountResponse = isAiCoachUnreadNudgeCountResponse;
|
|
1527
1569
|
const Query_possibleTypes = ['Query'];
|
|
1528
1570
|
const isQuery = (obj) => {
|
|
1529
1571
|
if (!obj?.__typename)
|