@vertikalx/vtx-backend-client 3.0.0-dev.33 → 3.0.0-dev.35
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 -10
- package/src/client/schema.js +43 -1
- package/src/client/schema.js.map +1 -1
- package/src/client/types.d.ts +97 -10
- package/src/client/types.js +449 -226
- package/src/client/types.js.map +1 -1
- package/src/generated/graphql.d.ts +13696 -0
- package/src/generated/graphql.js +5830 -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
|
@@ -2094,6 +2094,7 @@ export interface EmailCampaignPage {
|
|
|
2094
2094
|
export interface SendGridTemplate {
|
|
2095
2095
|
id: Scalars['String'];
|
|
2096
2096
|
name: Scalars['String'];
|
|
2097
|
+
subject: (Scalars['String'] | null);
|
|
2097
2098
|
updatedAt: (Scalars['String'] | null);
|
|
2098
2099
|
__typename: 'SendGridTemplate';
|
|
2099
2100
|
}
|
|
@@ -2109,6 +2110,58 @@ export interface AudiencePreview {
|
|
|
2109
2110
|
users: AudiencePreviewUser[];
|
|
2110
2111
|
__typename: 'AudiencePreview';
|
|
2111
2112
|
}
|
|
2113
|
+
export interface AiCoachMessage {
|
|
2114
|
+
_id: Scalars['ID'];
|
|
2115
|
+
threadId: Scalars['String'];
|
|
2116
|
+
role: Scalars['String'];
|
|
2117
|
+
messageType: Scalars['String'];
|
|
2118
|
+
content: Scalars['String'];
|
|
2119
|
+
tokenCount: Scalars['Int'];
|
|
2120
|
+
createdAt: Scalars['DateTime'];
|
|
2121
|
+
index: Scalars['Int'];
|
|
2122
|
+
__typename: 'AiCoachMessage';
|
|
2123
|
+
}
|
|
2124
|
+
export interface AiCoachThread {
|
|
2125
|
+
_id: Scalars['ID'];
|
|
2126
|
+
athleteId: Scalars['String'];
|
|
2127
|
+
weekStart: Scalars['String'];
|
|
2128
|
+
status: Scalars['String'];
|
|
2129
|
+
summary: (Scalars['String'] | null);
|
|
2130
|
+
contextSnapshot: (Scalars['JSON'] | null);
|
|
2131
|
+
createdAt: Scalars['DateTime'];
|
|
2132
|
+
updatedAt: Scalars['DateTime'];
|
|
2133
|
+
messages: (AiCoachMessage[] | null);
|
|
2134
|
+
__typename: 'AiCoachThread';
|
|
2135
|
+
}
|
|
2136
|
+
export interface AiCoachConfig {
|
|
2137
|
+
athleteId: Scalars['String'];
|
|
2138
|
+
enabled: Scalars['Boolean'];
|
|
2139
|
+
nudgesEnabled: Scalars['Boolean'];
|
|
2140
|
+
preferredFocus: Scalars['String'];
|
|
2141
|
+
updatedAt: Scalars['DateTime'];
|
|
2142
|
+
__typename: 'AiCoachConfig';
|
|
2143
|
+
}
|
|
2144
|
+
export interface AiCoachNudge {
|
|
2145
|
+
_id: Scalars['ID'];
|
|
2146
|
+
athleteId: Scalars['String'];
|
|
2147
|
+
nudgeType: Scalars['String'];
|
|
2148
|
+
title: Scalars['String'];
|
|
2149
|
+
body: Scalars['String'];
|
|
2150
|
+
data: (Scalars['JSON'] | null);
|
|
2151
|
+
read: Scalars['Boolean'];
|
|
2152
|
+
createdAt: Scalars['DateTime'];
|
|
2153
|
+
expiresAt: (Scalars['DateTime'] | null);
|
|
2154
|
+
__typename: 'AiCoachNudge';
|
|
2155
|
+
}
|
|
2156
|
+
export interface AiCoachNudgeListResponse {
|
|
2157
|
+
nudges: AiCoachNudge[];
|
|
2158
|
+
total: Scalars['Int'];
|
|
2159
|
+
__typename: 'AiCoachNudgeListResponse';
|
|
2160
|
+
}
|
|
2161
|
+
export interface AiCoachUnreadNudgeCountResponse {
|
|
2162
|
+
count: Scalars['Int'];
|
|
2163
|
+
__typename: 'AiCoachUnreadNudgeCountResponse';
|
|
2164
|
+
}
|
|
2112
2165
|
export type TimeRange = 'SEVEN_DAYS' | 'THIRTY_DAYS' | 'NINETY_DAYS' | 'ONE_YEAR' | 'ALL_TIME';
|
|
2113
2166
|
export type DonationMode = 'PUBLIC' | 'PRIVATE' | 'ANONYMOUS';
|
|
2114
2167
|
export type OfferClaimStatus = 'ACTIVE' | 'EXPIRED' | 'ALL';
|
|
@@ -2233,7 +2286,14 @@ export interface Query {
|
|
|
2233
2286
|
getEmailCampaign: EmailCampaign;
|
|
2234
2287
|
getAudiencePreview: AudiencePreview;
|
|
2235
2288
|
getSendGridTemplates: SendGridTemplate[];
|
|
2289
|
+
getSendGridTemplatePreview: (Scalars['String'] | null);
|
|
2236
2290
|
getEmailSegments: EmailSegment[];
|
|
2291
|
+
getAiCoachThread: (AiCoachThread | null);
|
|
2292
|
+
getAiCoachThreadHistory: AiCoachThread[];
|
|
2293
|
+
getAiCoachThreadMessages: AiCoachMessage[];
|
|
2294
|
+
getAiCoachConfig: AiCoachConfig;
|
|
2295
|
+
getAiCoachNudges: AiCoachNudgeListResponse;
|
|
2296
|
+
getAiCoachUnreadNudgeCount: AiCoachUnreadNudgeCountResponse;
|
|
2237
2297
|
__typename: 'Query';
|
|
2238
2298
|
}
|
|
2239
2299
|
export interface Mutation {
|
|
@@ -2352,6 +2412,9 @@ export interface Mutation {
|
|
|
2352
2412
|
createEmailSegment: EmailSegment;
|
|
2353
2413
|
updateEmailSegment: EmailSegment;
|
|
2354
2414
|
deleteEmailSegment: Scalars['Boolean'];
|
|
2415
|
+
sendAiCoachMessage: AiCoachMessage;
|
|
2416
|
+
updateAiCoachConfig: AiCoachConfig;
|
|
2417
|
+
markAiCoachNudgeRead: Scalars['Boolean'];
|
|
2355
2418
|
__typename: 'Mutation';
|
|
2356
2419
|
}
|
|
2357
2420
|
export interface UserGenqlSelection {
|
|
@@ -4652,6 +4715,7 @@ export interface EmailCampaignPageGenqlSelection {
|
|
|
4652
4715
|
export interface SendGridTemplateGenqlSelection {
|
|
4653
4716
|
id?: boolean | number;
|
|
4654
4717
|
name?: boolean | number;
|
|
4718
|
+
subject?: boolean | number;
|
|
4655
4719
|
updatedAt?: boolean | number;
|
|
4656
4720
|
__typename?: boolean | number;
|
|
4657
4721
|
__scalar?: boolean | number;
|
|
@@ -4670,6 +4734,64 @@ export interface AudiencePreviewGenqlSelection {
|
|
|
4670
4734
|
__typename?: boolean | number;
|
|
4671
4735
|
__scalar?: boolean | number;
|
|
4672
4736
|
}
|
|
4737
|
+
export interface AiCoachMessageGenqlSelection {
|
|
4738
|
+
_id?: boolean | number;
|
|
4739
|
+
threadId?: boolean | number;
|
|
4740
|
+
role?: boolean | number;
|
|
4741
|
+
messageType?: boolean | number;
|
|
4742
|
+
content?: boolean | number;
|
|
4743
|
+
tokenCount?: boolean | number;
|
|
4744
|
+
createdAt?: boolean | number;
|
|
4745
|
+
index?: boolean | number;
|
|
4746
|
+
__typename?: boolean | number;
|
|
4747
|
+
__scalar?: boolean | number;
|
|
4748
|
+
}
|
|
4749
|
+
export interface AiCoachThreadGenqlSelection {
|
|
4750
|
+
_id?: boolean | number;
|
|
4751
|
+
athleteId?: boolean | number;
|
|
4752
|
+
weekStart?: boolean | number;
|
|
4753
|
+
status?: boolean | number;
|
|
4754
|
+
summary?: boolean | number;
|
|
4755
|
+
contextSnapshot?: boolean | number;
|
|
4756
|
+
createdAt?: boolean | number;
|
|
4757
|
+
updatedAt?: boolean | number;
|
|
4758
|
+
messages?: AiCoachMessageGenqlSelection;
|
|
4759
|
+
__typename?: boolean | number;
|
|
4760
|
+
__scalar?: boolean | number;
|
|
4761
|
+
}
|
|
4762
|
+
export interface AiCoachConfigGenqlSelection {
|
|
4763
|
+
athleteId?: boolean | number;
|
|
4764
|
+
enabled?: boolean | number;
|
|
4765
|
+
nudgesEnabled?: boolean | number;
|
|
4766
|
+
preferredFocus?: boolean | number;
|
|
4767
|
+
updatedAt?: boolean | number;
|
|
4768
|
+
__typename?: boolean | number;
|
|
4769
|
+
__scalar?: boolean | number;
|
|
4770
|
+
}
|
|
4771
|
+
export interface AiCoachNudgeGenqlSelection {
|
|
4772
|
+
_id?: boolean | number;
|
|
4773
|
+
athleteId?: boolean | number;
|
|
4774
|
+
nudgeType?: boolean | number;
|
|
4775
|
+
title?: boolean | number;
|
|
4776
|
+
body?: boolean | number;
|
|
4777
|
+
data?: boolean | number;
|
|
4778
|
+
read?: boolean | number;
|
|
4779
|
+
createdAt?: boolean | number;
|
|
4780
|
+
expiresAt?: boolean | number;
|
|
4781
|
+
__typename?: boolean | number;
|
|
4782
|
+
__scalar?: boolean | number;
|
|
4783
|
+
}
|
|
4784
|
+
export interface AiCoachNudgeListResponseGenqlSelection {
|
|
4785
|
+
nudges?: AiCoachNudgeGenqlSelection;
|
|
4786
|
+
total?: boolean | number;
|
|
4787
|
+
__typename?: boolean | number;
|
|
4788
|
+
__scalar?: boolean | number;
|
|
4789
|
+
}
|
|
4790
|
+
export interface AiCoachUnreadNudgeCountResponseGenqlSelection {
|
|
4791
|
+
count?: boolean | number;
|
|
4792
|
+
__typename?: boolean | number;
|
|
4793
|
+
__scalar?: boolean | number;
|
|
4794
|
+
}
|
|
4673
4795
|
export interface CreateDatabaseFileDto {
|
|
4674
4796
|
identifier: Scalars['String'];
|
|
4675
4797
|
version?: Scalars['String'];
|
|
@@ -5427,6 +5549,18 @@ export interface FollowedAthletesQueryInput {
|
|
|
5427
5549
|
limit?: (Scalars['Int'] | null);
|
|
5428
5550
|
offset?: (Scalars['Int'] | null);
|
|
5429
5551
|
}
|
|
5552
|
+
export interface SendChatMessageDto {
|
|
5553
|
+
threadId: Scalars['String'];
|
|
5554
|
+
message: Scalars['String'];
|
|
5555
|
+
}
|
|
5556
|
+
export interface UpdateAiCoachConfigDto {
|
|
5557
|
+
enabled?: (Scalars['Boolean'] | null);
|
|
5558
|
+
nudgesEnabled?: (Scalars['Boolean'] | null);
|
|
5559
|
+
preferredFocus?: (Scalars['String'] | null);
|
|
5560
|
+
}
|
|
5561
|
+
export interface NudgeQueryDto {
|
|
5562
|
+
unreadOnly?: (Scalars['Boolean'] | null);
|
|
5563
|
+
}
|
|
5430
5564
|
export interface QueryGenqlSelection {
|
|
5431
5565
|
findTenantById?: (TenantGenqlSelection & {
|
|
5432
5566
|
__args: {
|
|
@@ -5910,7 +6044,30 @@ export interface QueryGenqlSelection {
|
|
|
5910
6044
|
};
|
|
5911
6045
|
});
|
|
5912
6046
|
getSendGridTemplates?: SendGridTemplateGenqlSelection;
|
|
6047
|
+
getSendGridTemplatePreview?: {
|
|
6048
|
+
__args: {
|
|
6049
|
+
templateId: Scalars['String'];
|
|
6050
|
+
};
|
|
6051
|
+
};
|
|
5913
6052
|
getEmailSegments?: EmailSegmentGenqlSelection;
|
|
6053
|
+
getAiCoachThread?: AiCoachThreadGenqlSelection;
|
|
6054
|
+
getAiCoachThreadHistory?: (AiCoachThreadGenqlSelection & {
|
|
6055
|
+
__args?: {
|
|
6056
|
+
limit?: (Scalars['Int'] | null);
|
|
6057
|
+
};
|
|
6058
|
+
});
|
|
6059
|
+
getAiCoachThreadMessages?: (AiCoachMessageGenqlSelection & {
|
|
6060
|
+
__args: {
|
|
6061
|
+
threadId: Scalars['String'];
|
|
6062
|
+
};
|
|
6063
|
+
});
|
|
6064
|
+
getAiCoachConfig?: AiCoachConfigGenqlSelection;
|
|
6065
|
+
getAiCoachNudges?: (AiCoachNudgeListResponseGenqlSelection & {
|
|
6066
|
+
__args?: {
|
|
6067
|
+
input?: (NudgeQueryDto | null);
|
|
6068
|
+
};
|
|
6069
|
+
});
|
|
6070
|
+
getAiCoachUnreadNudgeCount?: AiCoachUnreadNudgeCountResponseGenqlSelection;
|
|
5914
6071
|
__typename?: boolean | number;
|
|
5915
6072
|
__scalar?: boolean | number;
|
|
5916
6073
|
}
|
|
@@ -5935,21 +6092,16 @@ export interface GetSportEventsDto {
|
|
|
5935
6092
|
}
|
|
5936
6093
|
export interface AudienceFilterDto {
|
|
5937
6094
|
userType?: (Scalars['String'] | null);
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
walletStatus?: (Scalars['String'] | null);
|
|
6095
|
+
sport?: (Scalars['String'] | null);
|
|
6096
|
+
country?: (Scalars['String'] | null);
|
|
6097
|
+
onboardingStatus?: (Scalars['String'] | null);
|
|
5942
6098
|
campaignStatus?: (Scalars['String'] | null);
|
|
6099
|
+
walletStatus?: (Scalars['String'] | null);
|
|
5943
6100
|
hasStrava?: (Scalars['Boolean'] | null);
|
|
5944
6101
|
hasInstagram?: (Scalars['Boolean'] | null);
|
|
5945
6102
|
vtxScoreMin?: (Scalars['Float'] | null);
|
|
5946
6103
|
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);
|
|
6104
|
+
donorStatus?: (Scalars['String'] | null);
|
|
5953
6105
|
}
|
|
5954
6106
|
export interface MutationGenqlSelection {
|
|
5955
6107
|
registerNewDomainTenant?: (TenantGenqlSelection & {
|
|
@@ -6503,6 +6655,21 @@ export interface MutationGenqlSelection {
|
|
|
6503
6655
|
id: Scalars['String'];
|
|
6504
6656
|
};
|
|
6505
6657
|
};
|
|
6658
|
+
sendAiCoachMessage?: (AiCoachMessageGenqlSelection & {
|
|
6659
|
+
__args: {
|
|
6660
|
+
input: SendChatMessageDto;
|
|
6661
|
+
};
|
|
6662
|
+
});
|
|
6663
|
+
updateAiCoachConfig?: (AiCoachConfigGenqlSelection & {
|
|
6664
|
+
__args: {
|
|
6665
|
+
input: UpdateAiCoachConfigDto;
|
|
6666
|
+
};
|
|
6667
|
+
});
|
|
6668
|
+
markAiCoachNudgeRead?: {
|
|
6669
|
+
__args: {
|
|
6670
|
+
nudgeId: Scalars['String'];
|
|
6671
|
+
};
|
|
6672
|
+
};
|
|
6506
6673
|
__typename?: boolean | number;
|
|
6507
6674
|
__scalar?: boolean | number;
|
|
6508
6675
|
}
|
|
@@ -7382,6 +7549,24 @@ export declare const isAudiencePreviewUser: (obj?: {
|
|
|
7382
7549
|
export declare const isAudiencePreview: (obj?: {
|
|
7383
7550
|
__typename?: any;
|
|
7384
7551
|
} | null) => obj is AudiencePreview;
|
|
7552
|
+
export declare const isAiCoachMessage: (obj?: {
|
|
7553
|
+
__typename?: any;
|
|
7554
|
+
} | null) => obj is AiCoachMessage;
|
|
7555
|
+
export declare const isAiCoachThread: (obj?: {
|
|
7556
|
+
__typename?: any;
|
|
7557
|
+
} | null) => obj is AiCoachThread;
|
|
7558
|
+
export declare const isAiCoachConfig: (obj?: {
|
|
7559
|
+
__typename?: any;
|
|
7560
|
+
} | null) => obj is AiCoachConfig;
|
|
7561
|
+
export declare const isAiCoachNudge: (obj?: {
|
|
7562
|
+
__typename?: any;
|
|
7563
|
+
} | null) => obj is AiCoachNudge;
|
|
7564
|
+
export declare const isAiCoachNudgeListResponse: (obj?: {
|
|
7565
|
+
__typename?: any;
|
|
7566
|
+
} | null) => obj is AiCoachNudgeListResponse;
|
|
7567
|
+
export declare const isAiCoachUnreadNudgeCountResponse: (obj?: {
|
|
7568
|
+
__typename?: any;
|
|
7569
|
+
} | null) => obj is AiCoachUnreadNudgeCountResponse;
|
|
7385
7570
|
export declare const isQuery: (obj?: {
|
|
7386
7571
|
__typename?: any;
|
|
7387
7572
|
} | 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)
|