90dc-core 1.16.6 → 1.16.8
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/dist/lib/dbmodels/coaching/ClientNote.d.ts +3 -3
- package/dist/lib/dbmodels/coaching/ClientNote.d.ts.map +1 -1
- package/dist/lib/dbmodels/coaching/ClientNote.js +1 -1
- package/dist/lib/dbmodels/coaching/ClientNote.js.map +1 -1
- package/dist/lib/dbmodels/program/Exercise.d.ts +1 -0
- package/dist/lib/dbmodels/program/Exercise.d.ts.map +1 -1
- package/dist/lib/dbmodels/program/Exercise.js +6 -0
- package/dist/lib/dbmodels/program/Exercise.js.map +1 -1
- package/package.json +10 -4
|
@@ -10,18 +10,18 @@ export declare enum ClientNoteType {
|
|
|
10
10
|
export interface ClientNoteAttributes {
|
|
11
11
|
uuid: string;
|
|
12
12
|
clientUuid: string;
|
|
13
|
-
coachUuid: string;
|
|
13
|
+
coachUuid: string | null;
|
|
14
14
|
note: string;
|
|
15
15
|
noteType: ClientNoteType;
|
|
16
16
|
createdAt?: Date;
|
|
17
17
|
updatedAt?: Date;
|
|
18
18
|
}
|
|
19
|
-
export interface ClientNoteCreationAttributes extends Optional<ClientNoteAttributes, "uuid" | "createdAt" | "updatedAt" | "noteType"> {
|
|
19
|
+
export interface ClientNoteCreationAttributes extends Optional<ClientNoteAttributes, "uuid" | "createdAt" | "updatedAt" | "noteType" | "coachUuid"> {
|
|
20
20
|
}
|
|
21
21
|
export declare class ClientNote extends Model<ClientNoteAttributes, ClientNoteCreationAttributes> {
|
|
22
22
|
uuid: string;
|
|
23
23
|
clientUuid: string;
|
|
24
|
-
coachUuid: string;
|
|
24
|
+
coachUuid: string | null;
|
|
25
25
|
note: string;
|
|
26
26
|
noteType: ClientNoteType;
|
|
27
27
|
coach: PersistedUser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientNote.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/coaching/ClientNote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,KAAK,EAAgB,MAAM,sBAAsB,CAAC;AAC7G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,oBAAY,cAAc;IACzB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,MAAM,WAAW;CACjB;AAED,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ClientNote.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/coaching/ClientNote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,KAAK,EAAgB,MAAM,sBAAsB,CAAC;AAC7G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,oBAAY,cAAc;IACzB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,MAAM,WAAW;CACjB;AAED,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,4BAA6B,SAAQ,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;CAClJ;AAED,qBAGa,UAAW,SAAQ,KAAK,CAAC,oBAAoB,EAAE,4BAA4B,CAAC;IAQhF,IAAI,EAAE,MAAM,CAAC;IAIb,UAAU,EAAE,MAAM,CAAC;IAInB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAGzB,IAAI,EAAE,MAAM,CAAC;IAOb,QAAQ,EAAE,cAAc,CAAC;IAGzB,KAAK,EAAE,aAAa,CAAC;IAErB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAEf,MAAM,IAAI,oBAAoB;CAGvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/dbmodels/coaching/ClientNote.ts"],"sourcesContent":["import { BelongsTo, Column, DataType, Default, ForeignKey, Model, Table, Index } from 'sequelize-typescript';\nimport type { Optional } from 'sequelize';\nimport { PersistedUser } from '../user/PersistedUser.js';\n\nexport enum ClientNoteType {\n\tCLOSER = 'CLOSER',\n\tHEAD_COACH = 'HEAD_COACH',\n\tCOACH = 'COACH',\n\tSYSTEM = 'SYSTEM'\n}\n\nexport interface ClientNoteAttributes {\n\tuuid: string;\n\tclientUuid: string;\n\tcoachUuid: string;\n\tnote: string;\n\tnoteType: ClientNoteType;\n\tcreatedAt?: Date;\n\tupdatedAt?: Date;\n}\n\nexport interface ClientNoteCreationAttributes extends Optional<ClientNoteAttributes, \"uuid\" | \"createdAt\" | \"updatedAt\" | \"noteType\"> {\n}\n\n@Table({timestamps: true})\n@Index(['clientUuid'])\n@Index(['coachUuid'])\nexport class ClientNote extends Model<ClientNoteAttributes, ClientNoteCreationAttributes> {\n\t@Default(DataType.UUIDV4)\n\t@Column({\n\t\ttype: DataType.UUID,\n\t\tdefaultValue: DataType.UUIDV4,\n\t\tallowNull: false,\n\t\tprimaryKey: true\n\t})\n\tdeclare uuid: string;\n\n\t@ForeignKey(() => PersistedUser)\n\t@Column({ type: DataType.UUID, allowNull: false })\n\tdeclare clientUuid: string;\n\n\t@ForeignKey(() => PersistedUser)\n\t@Column({ type: DataType.UUID, allowNull:
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/coaching/ClientNote.ts"],"sourcesContent":["import { BelongsTo, Column, DataType, Default, ForeignKey, Model, Table, Index } from 'sequelize-typescript';\nimport type { Optional } from 'sequelize';\nimport { PersistedUser } from '../user/PersistedUser.js';\n\nexport enum ClientNoteType {\n\tCLOSER = 'CLOSER',\n\tHEAD_COACH = 'HEAD_COACH',\n\tCOACH = 'COACH',\n\tSYSTEM = 'SYSTEM'\n}\n\nexport interface ClientNoteAttributes {\n\tuuid: string;\n\tclientUuid: string;\n\tcoachUuid: string | null;\n\tnote: string;\n\tnoteType: ClientNoteType;\n\tcreatedAt?: Date;\n\tupdatedAt?: Date;\n}\n\nexport interface ClientNoteCreationAttributes extends Optional<ClientNoteAttributes, \"uuid\" | \"createdAt\" | \"updatedAt\" | \"noteType\" | \"coachUuid\"> {\n}\n\n@Table({timestamps: true})\n@Index(['clientUuid'])\n@Index(['coachUuid'])\nexport class ClientNote extends Model<ClientNoteAttributes, ClientNoteCreationAttributes> {\n\t@Default(DataType.UUIDV4)\n\t@Column({\n\t\ttype: DataType.UUID,\n\t\tdefaultValue: DataType.UUIDV4,\n\t\tallowNull: false,\n\t\tprimaryKey: true\n\t})\n\tdeclare uuid: string;\n\n\t@ForeignKey(() => PersistedUser)\n\t@Column({ type: DataType.UUID, allowNull: false })\n\tdeclare clientUuid: string;\n\n\t@ForeignKey(() => PersistedUser)\n\t@Column({ type: DataType.UUID, allowNull: true })\n\tdeclare coachUuid: string | null;\n\n\t@Column({ type: DataType.TEXT, allowNull: false })\n\tdeclare note: string;\n\n\t@Default(ClientNoteType.COACH)\n\t@Column({\n\t\ttype: DataType.ENUM(...Object.values(ClientNoteType)),\n\t\tallowNull: false\n\t})\n\tdeclare noteType: ClientNoteType;\n\n\t@BelongsTo(() => PersistedUser, { foreignKey: 'coachUuid', as: 'coach' })\n\tdeclare coach: PersistedUser;\n\n\tdeclare createdAt: Date;\n\tdeclare updatedAt: Date;\n\n\toverride toJSON(): ClientNoteAttributes {\n\t\treturn super.toJSON() as ClientNoteAttributes;\n\t}\n}\n"],"names":["BelongsTo","Column","DataType","Default","ForeignKey","Model","Table","Index","PersistedUser","ClientNoteType","ClientNote","toJSON","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","ENUM","Object","values","foreignKey","as","timestamps"],"mappings":";;;;;;AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AAE7G,SAASC,aAAa,QAAQ,2BAA2B;AAEzD,OAAO,IAAA,AAAKC,wCAAAA;;;;;WAAAA;MAKX;AAkBD,OAAO,MAAMC,mBAAmBL;IAkCtBM,SAA+B;QACvC,OAAO,KAAK,CAACA;IACd;AACD;;qBApCmBC;;QAEjBC,MAAMX,SAASY,IAAI;QACnBC,cAAcb,SAASU,MAAM;QAC7BI,WAAW;QACXC,YAAY;;;;mBAIKT;;QACRK,MAAMX,SAASY,IAAI;QAAEE,WAAW;;;;mBAGxBR;;QACRK,MAAMX,SAASY,IAAI;QAAEE,WAAW;;;;;QAGhCH,MAAMX,SAASgB,IAAI;QAAEF,WAAW;;;;;;QAKzCH,MAAMX,SAASiB,IAAI,IAAIC,OAAOC,MAAM,CAACZ;QACrCO,WAAW;;;;kBAIKR;QAAiBc,YAAY;QAAaC,IAAI;;;;;QA/BxDC,YAAY;;;QACZ;;;QACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Exercise.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/program/Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAA4D,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,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AAO,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -59,6 +59,12 @@ _ts_decorate([
|
|
|
59
59
|
allowNull: true
|
|
60
60
|
})
|
|
61
61
|
], Exercise.prototype, "coachNote", void 0);
|
|
62
|
+
_ts_decorate([
|
|
63
|
+
Column({
|
|
64
|
+
type: DataType.STRING(500),
|
|
65
|
+
allowNull: true
|
|
66
|
+
})
|
|
67
|
+
], Exercise.prototype, "thumbnailUrl", void 0);
|
|
62
68
|
_ts_decorate([
|
|
63
69
|
Index,
|
|
64
70
|
ForeignKey(()=>Workout),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/dbmodels/program/Exercise.ts"],"sourcesContent":["import { Table, Column, Model, ForeignKey, Index, DataType, Default, HasMany, BelongsTo } from 'sequelize-typescript';\nimport { Workout } from './Workout.js';\nimport { Superset } from './Superset.js';\nimport { ProgressEntry } from './ProgressEntry.js';\nimport type { Progress } from '../../models/ExerciseInterfaces.js';\n\n@Table\nexport class Exercise extends Model<Exercise> {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare name: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare order: number;\n\n // DEPRECATED: Keep for backward compatibility during migration\n @Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: true })\n declare progress: Progress[];\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare reps: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare sets: string;\n\n @Column({ type: DataType.STRING, allowNull: true })\n declare restTime: string;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare coachNote: string | null;\n\n @Index\n @ForeignKey(() => Workout)\n @Column({ type: DataType.UUID, allowNull: false })\n declare workoutUuid: string;\n\n @Index\n @ForeignKey(() => Superset)\n @Column({ type: DataType.UUID, allowNull: true })\n declare supersetUuid: string | null;\n\n @HasMany(() => ProgressEntry)\n declare progressEntries: ProgressEntry[];\n\n @BelongsTo(() => Superset)\n declare superset: Superset | null;\n\n declare workout: Workout;\n}\n"],"names":["Table","Column","Model","ForeignKey","Index","DataType","Default","HasMany","BelongsTo","Workout","Superset","ProgressEntry","Exercise","UUIDV4","type","UUID","primaryKey","STRING","allowNull","INTEGER","ARRAY","JSONB","TEXT"],"mappings":";;;;;;AAAA,SAASA,KAAK,EAAEC,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,EAAEC,SAAS,QAAQ,uBAAuB;AACtH,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,aAAa,QAAQ,qBAAqB;AAInD,OAAO,MAAMC,iBAAiBV;
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/program/Exercise.ts"],"sourcesContent":["import { Table, Column, Model, ForeignKey, Index, DataType, Default, HasMany, BelongsTo } from 'sequelize-typescript';\nimport { Workout } from './Workout.js';\nimport { Superset } from './Superset.js';\nimport { ProgressEntry } from './ProgressEntry.js';\nimport type { Progress } from '../../models/ExerciseInterfaces.js';\n\n@Table\nexport class Exercise extends Model<Exercise> {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare name: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare order: number;\n\n // DEPRECATED: Keep for backward compatibility during migration\n @Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: true })\n declare progress: Progress[];\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare reps: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare sets: string;\n\n @Column({ type: DataType.STRING, allowNull: true })\n declare restTime: string;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare coachNote: string | null;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare thumbnailUrl: string | null;\n\n @Index\n @ForeignKey(() => Workout)\n @Column({ type: DataType.UUID, allowNull: false })\n declare workoutUuid: string;\n\n @Index\n @ForeignKey(() => Superset)\n @Column({ type: DataType.UUID, allowNull: true })\n declare supersetUuid: string | null;\n\n @HasMany(() => ProgressEntry)\n declare progressEntries: ProgressEntry[];\n\n @BelongsTo(() => Superset)\n declare superset: Superset | null;\n\n declare workout: Workout;\n}\n"],"names":["Table","Column","Model","ForeignKey","Index","DataType","Default","HasMany","BelongsTo","Workout","Superset","ProgressEntry","Exercise","UUIDV4","type","UUID","primaryKey","STRING","allowNull","INTEGER","ARRAY","JSONB","TEXT"],"mappings":";;;;;;AAAA,SAASA,KAAK,EAAEC,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,EAAEC,SAAS,QAAQ,uBAAuB;AACtH,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,aAAa,QAAQ,qBAAqB;AAInD,OAAO,MAAMC,iBAAiBV;AAkD9B;;qBAjDoBW;;QAEhBC,MAAMT,SAASU,IAAI;QACnBC,YAAY;;;;;QAIJF,MAAMT,SAASY,MAAM;QAAEC,WAAW;;;;;QAGlCJ,MAAMT,SAASc,OAAO;QAAED,WAAW;;;;;QAInCJ,MAAMT,SAASe,KAAK,CAACf,SAASgB,KAAK;QAAGH,WAAW;;;;;QAGjDJ,MAAMT,SAASY,MAAM;QAAEC,WAAW;;;;;QAGlCJ,MAAMT,SAASY,MAAM;QAAEC,WAAW;;;;;QAGlCJ,MAAMT,SAASY,MAAM;QAAEC,WAAW;;;;;QAGlCJ,MAAMT,SAASiB,IAAI;QAAEJ,WAAW;;;;;QAGhCJ,MAAMT,SAASY,MAAM,CAAC;QAAMC,WAAW;;;;;mBAI/BT;;QACRK,MAAMT,SAASU,IAAI;QAAEG,WAAW;;;;;mBAIxBR;;QACRI,MAAMT,SAASU,IAAI;QAAEG,WAAW;;;;gBAG3BP;;;kBAGED"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "90dc-core",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,8 +22,11 @@
|
|
|
22
22
|
"jest": "^30.2.0",
|
|
23
23
|
"koa": "^2.15.3",
|
|
24
24
|
"nodemon": "^3.1.9",
|
|
25
|
+
"pg": "^8.16.3",
|
|
25
26
|
"prettier": "^3.6.2",
|
|
27
|
+
"sequelize": "^6.37.7",
|
|
26
28
|
"sequelize-cli": "^6.6.2",
|
|
29
|
+
"sequelize-typescript": "2.1.6",
|
|
27
30
|
"ts-jest": "^29.4.6",
|
|
28
31
|
"ts-node-dev": "^2.0.0",
|
|
29
32
|
"typescript": "^5.9.3"
|
|
@@ -44,14 +47,17 @@
|
|
|
44
47
|
"google-auth-library": "^10.5.0",
|
|
45
48
|
"googleapis": "^165.0.0",
|
|
46
49
|
"ioredis": "^5.8.2",
|
|
50
|
+
"jsonwebtoken": "^9.0.2",
|
|
47
51
|
"jwks-rsa": "^3.2.0",
|
|
48
|
-
"pg": "^8.16.3",
|
|
49
|
-
"sequelize": "^6.37.7",
|
|
50
|
-
"sequelize-typescript": "2.1.6",
|
|
51
52
|
"uuid": "^11.0.3",
|
|
52
53
|
"winston": "^3.18.3",
|
|
53
54
|
"zod": "^4.1.12"
|
|
54
55
|
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"pg": "^8.16.3",
|
|
58
|
+
"sequelize": "^6.37.7",
|
|
59
|
+
"sequelize-typescript": "2.1.6"
|
|
60
|
+
},
|
|
55
61
|
"repository": {
|
|
56
62
|
"type": "git",
|
|
57
63
|
"url": "git+https://github.com/RomaPchel/90DC-core.git"
|