hevy-shared 1.0.1000 → 1.0.1001
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/built/index.d.ts +3 -15
- package/built/normalizedWorkoutUtils.d.ts +1 -2
- package/built/schemas.d.ts +51 -0
- package/built/schemas.js +15 -1
- package/built/tests/testUtils.js +0 -1
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InstructionsLanguage } from './exerciseLocaleUtils';
|
|
2
2
|
import { WorkoutDurationMinutes } from './hevyTrainer';
|
|
3
|
-
import { postEmailBackofficeSchema } from './schemas';
|
|
3
|
+
import { BugReportQuestionSchema, CreateBugReportRequestBodySchema, postEmailBackofficeSchema } from './schemas';
|
|
4
4
|
import { Language } from './translations';
|
|
5
5
|
import { Lookup } from './typeUtils';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -887,7 +887,6 @@ export interface Workout {
|
|
|
887
887
|
biometrics?: WorkoutBiometrics;
|
|
888
888
|
is_biometrics_public: boolean;
|
|
889
889
|
trainer_program_id: string | undefined;
|
|
890
|
-
gym: Gym | undefined;
|
|
891
890
|
}
|
|
892
891
|
export interface CustomExerciseImage {
|
|
893
892
|
type: 'image';
|
|
@@ -967,7 +966,6 @@ export interface PostWorkoutRequestWorkout {
|
|
|
967
966
|
biometrics?: WorkoutBiometrics;
|
|
968
967
|
is_biometrics_public: boolean;
|
|
969
968
|
trainer_program_id: string | undefined;
|
|
970
|
-
gym: Gym | undefined;
|
|
971
969
|
}
|
|
972
970
|
export type WorkoutDataImporterReport = {
|
|
973
971
|
state: 'idle';
|
|
@@ -1620,18 +1618,6 @@ export interface UserMetadataResponse {
|
|
|
1620
1618
|
export interface NetworkInfoRequest {
|
|
1621
1619
|
networkType: NetworkType;
|
|
1622
1620
|
}
|
|
1623
|
-
export type CommercialGym = {
|
|
1624
|
-
type: 'commercial';
|
|
1625
|
-
id: string;
|
|
1626
|
-
name: string;
|
|
1627
|
-
fullAddress: string;
|
|
1628
|
-
city: string;
|
|
1629
|
-
distanceM: number;
|
|
1630
|
-
};
|
|
1631
|
-
export type HomeGym = {
|
|
1632
|
-
type: 'home';
|
|
1633
|
-
};
|
|
1634
|
-
export type Gym = CommercialGym | HomeGym;
|
|
1635
1621
|
export interface StripePrice {
|
|
1636
1622
|
product_id: string;
|
|
1637
1623
|
billing_period: 'month' | 'year' | 'pay-once';
|
|
@@ -2026,6 +2012,8 @@ export interface GetAccountsByEmailResponse {
|
|
|
2026
2012
|
}[];
|
|
2027
2013
|
}
|
|
2028
2014
|
export type PostEmailBackofficeRequest = z.infer<typeof postEmailBackofficeSchema>;
|
|
2015
|
+
export type BugReportQuestion = z.infer<typeof BugReportQuestionSchema>;
|
|
2016
|
+
export type CreateBugReportRequestBody = z.infer<typeof CreateBugReportRequestBodySchema>;
|
|
2029
2017
|
export interface UserReportSummaryBackoffice {
|
|
2030
2018
|
reported_by: string;
|
|
2031
2019
|
reported_at: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExerciseType,
|
|
1
|
+
import { ExerciseType, RPE, SetType, ShareToPlatform, WorkoutBiometrics, WorkoutMedia, WorkoutVisibility } from '.';
|
|
2
2
|
/**
|
|
3
3
|
* Events are used to determine the start time, end time and duration of a
|
|
4
4
|
* `NormalizedWorkout`, in a way that can be persisted to disk.
|
|
@@ -36,7 +36,6 @@ export interface NormalizedWorkout {
|
|
|
36
36
|
clientId: string;
|
|
37
37
|
biometrics?: WorkoutBiometrics;
|
|
38
38
|
trainerProgramId: string | undefined;
|
|
39
|
-
gym: Gym | undefined;
|
|
40
39
|
}
|
|
41
40
|
export interface NormalizedSet {
|
|
42
41
|
index: number;
|
package/built/schemas.d.ts
CHANGED
|
@@ -12,3 +12,54 @@ export declare const postEmailBackofficeSchema: z.ZodObject<{
|
|
|
12
12
|
toUserId: string;
|
|
13
13
|
subject: string;
|
|
14
14
|
}>;
|
|
15
|
+
export declare const BugReportQuestionSchema: z.ZodObject<{
|
|
16
|
+
question: z.ZodString;
|
|
17
|
+
answer: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
question: string;
|
|
20
|
+
answer: string;
|
|
21
|
+
}, {
|
|
22
|
+
question: string;
|
|
23
|
+
answer: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const AppLogLineSchema: z.ZodObject<{
|
|
26
|
+
index: z.ZodNumber;
|
|
27
|
+
text: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
text: string;
|
|
30
|
+
index: number;
|
|
31
|
+
}, {
|
|
32
|
+
text: string;
|
|
33
|
+
index: number;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const CreateBugReportRequestBodySchema: z.ZodObject<{
|
|
36
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
37
|
+
question: z.ZodString;
|
|
38
|
+
answer: z.ZodString;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
question: string;
|
|
41
|
+
answer: string;
|
|
42
|
+
}, {
|
|
43
|
+
question: string;
|
|
44
|
+
answer: string;
|
|
45
|
+
}>, "many">;
|
|
46
|
+
message: z.ZodString;
|
|
47
|
+
media_urls: z.ZodArray<z.ZodString, "many">;
|
|
48
|
+
debugInfo: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
message: string;
|
|
51
|
+
questions: {
|
|
52
|
+
question: string;
|
|
53
|
+
answer: string;
|
|
54
|
+
}[];
|
|
55
|
+
media_urls: string[];
|
|
56
|
+
debugInfo: Record<string, unknown>;
|
|
57
|
+
}, {
|
|
58
|
+
message: string;
|
|
59
|
+
questions: {
|
|
60
|
+
question: string;
|
|
61
|
+
answer: string;
|
|
62
|
+
}[];
|
|
63
|
+
media_urls: string[];
|
|
64
|
+
debugInfo: Record<string, unknown>;
|
|
65
|
+
}>;
|
package/built/schemas.js
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.postEmailBackofficeSchema = void 0;
|
|
3
|
+
exports.CreateBugReportRequestBodySchema = exports.AppLogLineSchema = exports.BugReportQuestionSchema = exports.postEmailBackofficeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.postEmailBackofficeSchema = zod_1.z.object({
|
|
6
6
|
toUserId: zod_1.z.string(),
|
|
7
7
|
subject: zod_1.z.string(),
|
|
8
8
|
message: zod_1.z.string(),
|
|
9
9
|
});
|
|
10
|
+
exports.BugReportQuestionSchema = zod_1.z.object({
|
|
11
|
+
question: zod_1.z.string(),
|
|
12
|
+
answer: zod_1.z.string(),
|
|
13
|
+
});
|
|
14
|
+
exports.AppLogLineSchema = zod_1.z.object({
|
|
15
|
+
index: zod_1.z.number(),
|
|
16
|
+
text: zod_1.z.string(),
|
|
17
|
+
});
|
|
18
|
+
exports.CreateBugReportRequestBodySchema = zod_1.z.object({
|
|
19
|
+
questions: zod_1.z.array(exports.BugReportQuestionSchema),
|
|
20
|
+
message: zod_1.z.string(),
|
|
21
|
+
media_urls: zod_1.z.array(zod_1.z.string()),
|
|
22
|
+
debugInfo: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
23
|
+
});
|
package/built/tests/testUtils.js
CHANGED