@plus45/types 1.2.1 → 1.2.3

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/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { ScheduleRecurrence } from "./types/schedule/schedule_recurrence";
9
9
  import { UserSessionInfo } from "./types/user/session_info";
10
10
  import { CompletedExercise, WorkoutExecution } from "./types/workout/workout_execution";
11
11
  import { WeekLayout } from "./types/generics/week_layout";
12
- import { AuthType } from "./types/authorization/authorization";
12
+ import { AuthorizationActionData, AuthType } from "./types/authorization/authorization";
13
13
  import Exercise from "./types/exercise/exercise";
14
- export { type User, type UserSessionInfo, type AccessToken, type Exercise, type CompletedExercise, type Workout, type WorkoutExecution, type Schedule, type AssignedSchedule, WeekLayout, ExerciseType, ExerciseUnit, ScheduleDay, ScheduleRecurrence, AuthType, WeightUnits, DistanceUnits, TimeUnits };
14
+ import { ResetPasswordAuthorizationData } from "./types/authorization/password_auth";
15
+ export { type User, type UserSessionInfo, type AccessToken, type Exercise, type CompletedExercise, type Workout, type WorkoutExecution, type Schedule, type AssignedSchedule, AuthorizationActionData, ResetPasswordAuthorizationData, WeekLayout, ExerciseType, ExerciseUnit, ScheduleDay, ScheduleRecurrence, AuthType, WeightUnits, DistanceUnits, TimeUnits };
@@ -1,4 +1,9 @@
1
1
  export declare const AuthType: {
2
2
  readonly PASSWORD_CHANGE: "PASSWORD_CHANGE";
3
+ readonly EMAIL_VERIFICATION: "VERIFY_EMAIL";
3
4
  };
4
5
  export type AuthType = (typeof AuthType)[keyof typeof AuthType];
6
+ export type AuthorizationActionData<T = any> = {
7
+ action: AuthType;
8
+ data: T;
9
+ };
@@ -2,5 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AuthType = void 0;
4
4
  exports.AuthType = {
5
- PASSWORD_CHANGE: "PASSWORD_CHANGE"
5
+ PASSWORD_CHANGE: "PASSWORD_CHANGE",
6
+ EMAIL_VERIFICATION: "VERIFY_EMAIL"
6
7
  };
@@ -0,0 +1,5 @@
1
+ import { AuthorizationActionData } from "./authorization";
2
+ export type ResetPasswordData = {
3
+ new_password: string;
4
+ };
5
+ export type ResetPasswordAuthorizationData = AuthorizationActionData<ResetPasswordData>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plus45/types",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [