heartraite 1.0.157 → 1.0.159

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.
@@ -5,5 +5,10 @@ interface Params<T extends keyof CloudFunctionTypes> {
5
5
  functions: Functions;
6
6
  payload?: CloudFunctionTypes[T]["payload"];
7
7
  }
8
+ /**
9
+ * @deprecated This function is deprecated.
10
+ * Use `callCloudFunction` inside application code instead.
11
+ * This function will be removed in future versions.
12
+ */
8
13
  export declare const callCloudFunction: <T extends keyof CloudFunctionTypes>({ payload, functions, functionName, }: Params<T>) => Promise<CloudFunctionTypes[T]["response"]>;
9
14
  export {};
@@ -2,7 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.callCloudFunction = void 0;
4
4
  const functions_1 = require("firebase/functions");
5
- // Generic function to call any Firebase Cloud Function
5
+ /**
6
+ * @deprecated This function is deprecated.
7
+ * Use `callCloudFunction` inside application code instead.
8
+ * This function will be removed in future versions.
9
+ */
6
10
  const callCloudFunction = async ({ payload, functions, functionName, }) => {
7
11
  const fn = (0, functions_1.httpsCallable)(functions, functionName);
8
12
  const res = payload ? await fn(payload) : await fn();
@@ -1,6 +1,11 @@
1
1
  import { CloudFunction } from "../enum";
2
2
  import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, DeleteUserRequest, GetCARequest, GetLikesRequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetAdvancedMatchRequest, GetMessagesRequest, GetPLSSubmissionRequest, GetProductsRequest, GetSelfAwarenessRequest, GetUserRequest, HandleLastMessageSeenRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitAnswerRequest, SubmitCategoryFeedbackRequest, SubmitPLSCategoryFeedbackRequest, SubmitPLSDemographicsRequest, UpdatePLSAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest, SubmitFeedbackRequest, SyncAffiliateRequest, JoinEventRequest, GetEventRequest, GetEventMatchRequest, SendEventFeedbackRequest, GetEventParticipantsRequest } from "./request.types";
3
3
  import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse, CreateBillingPortalResponse, CreateCheckoutSessionResponse, CreateLikeResponse, CreatePLSInputResponse, CreatePLSSubmissionResponse, CreateReportResponse, DeleteUserResponse, GetCAResponse, GetLikesResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetAdvancedMatchResponse, GetMessagesResponse, GetPLSSubmissionResponse, GetProductsResponse, GetSelfAwarenessReponse, GetUserResponse, HandleLastMessageSeenResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitAnswerResponse, SubmitCategoryFeedbackResponse, SubmitPLSCategoryFeedbackResponse, SubmitPLSDemographicsResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse, SubmitFeedbackResponse, SyncAffiliateResponse, GetUserEventsResponse, JoinEventResponse, GetEventResponse, GetEventMatchResponse, SendEventFeedbackResponse, GetEventParticipantsResponse } from "./response.types";
4
+ /**
5
+ * @deprecated This function is deprecated.
6
+ * Use `CloudFunctionTypes` inside application code instead.
7
+ * This type will be removed in future versions.
8
+ */
4
9
  export type CloudFunctionTypes = {
5
10
  [CloudFunction.SYNC_AFFILIATE]: {
6
11
  payload: SyncAffiliateRequest;
@@ -6,7 +6,6 @@ export type SyncAffiliateRequest = {
6
6
  affiliateCode: string;
7
7
  };
8
8
  export type RegisterUserRequest = {
9
- userId: string;
10
9
  email: string;
11
10
  provider: ProviderType;
12
11
  created: string;
@@ -152,10 +151,6 @@ export type RegisterOnboardingRequest = {
152
151
  images: string[];
153
152
  interestedIn: Gender[];
154
153
  gender: Gender;
155
- coordinates?: {
156
- lat: number;
157
- lng: number;
158
- };
159
154
  };
160
155
  export type GetUserRequest = undefined;
161
156
  export type UpdateUserRequest = {
@@ -34,16 +34,16 @@ export type UserPermissions = {
34
34
  export type ProfileInput = Record<string, string>;
35
35
  export type UserProfile = {
36
36
  intro: string;
37
- firstName: string;
38
- state: string;
39
- birth: string;
40
- age: number;
41
- gender: Gender;
42
- zodiacSign: string;
37
+ firstName?: string;
38
+ state?: string;
39
+ birth?: string;
40
+ age?: number;
41
+ gender?: Gender;
42
+ zodiacSign?: string;
43
43
  images: string[];
44
- thumbnail: string;
45
- thumbnailBlurred: string;
46
- image: string;
44
+ thumbnail?: string;
45
+ thumbnailBlurred?: string;
46
+ image?: string;
47
47
  aiSummary?: string;
48
48
  attachedSummary: boolean;
49
49
  profileInput: ProfileInput;
@@ -58,8 +58,8 @@ export type UserNotifications = {
58
58
  };
59
59
  export type DatingPreferences = {
60
60
  mode: MatchmakingMode;
61
- minAge: number;
62
- maxAge: number;
61
+ minAge?: number;
62
+ maxAge?: number;
63
63
  interestedIn: Gender[];
64
64
  distanceRadius: number;
65
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.157",
3
+ "version": "1.0.159",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,11 @@ interface Params<T extends keyof CloudFunctionTypes> {
8
8
  payload?: CloudFunctionTypes[T]["payload"];
9
9
  }
10
10
 
11
- // Generic function to call any Firebase Cloud Function
11
+ /**
12
+ * @deprecated This function is deprecated.
13
+ * Use `callCloudFunction` inside application code instead.
14
+ * This function will be removed in future versions.
15
+ */
12
16
  export const callCloudFunction = async <T extends keyof CloudFunctionTypes>({
13
17
  payload,
14
18
  functions,
@@ -90,7 +90,11 @@ import {
90
90
  GetEventParticipantsResponse,
91
91
  } from "./response.types";
92
92
 
93
- // Define a mapping of Cloud Functions to payload and response types
93
+ /**
94
+ * @deprecated This function is deprecated.
95
+ * Use `CloudFunctionTypes` inside application code instead.
96
+ * This type will be removed in future versions.
97
+ */
94
98
  export type CloudFunctionTypes = {
95
99
  // affiliate
96
100
  [CloudFunction.SYNC_AFFILIATE]: {
@@ -26,7 +26,6 @@ export type SyncAffiliateRequest = {
26
26
 
27
27
  // auth
28
28
  export type RegisterUserRequest = {
29
- userId: string;
30
29
  email: string;
31
30
  provider: ProviderType;
32
31
  created: string;
@@ -174,10 +173,6 @@ export type RegisterOnboardingRequest = {
174
173
  images: string[];
175
174
  interestedIn: Gender[];
176
175
  gender: Gender;
177
- coordinates?: {
178
- lat: number;
179
- lng: number;
180
- };
181
176
  };
182
177
  export type GetUserRequest = undefined;
183
178
  export type UpdateUserRequest = {
@@ -49,16 +49,16 @@ export type ProfileInput = Record<string, string>;
49
49
 
50
50
  export type UserProfile = {
51
51
  intro: string;
52
- firstName: string;
53
- state: string;
54
- birth: string;
55
- age: number;
56
- gender: Gender;
57
- zodiacSign: string;
52
+ firstName?: string;
53
+ state?: string;
54
+ birth?: string;
55
+ age?: number;
56
+ gender?: Gender;
57
+ zodiacSign?: string;
58
58
  images: string[];
59
- thumbnail: string;
60
- thumbnailBlurred: string;
61
- image: string;
59
+ thumbnail?: string;
60
+ thumbnailBlurred?: string;
61
+ image?: string;
62
62
  aiSummary?: string;
63
63
  attachedSummary: boolean;
64
64
  profileInput: ProfileInput;
@@ -76,8 +76,8 @@ export type UserNotifications = {
76
76
 
77
77
  export type DatingPreferences = {
78
78
  mode: MatchmakingMode;
79
- minAge: number;
80
- maxAge: number;
79
+ minAge?: number;
80
+ maxAge?: number;
81
81
  interestedIn: Gender[];
82
82
  distanceRadius: number;
83
83
  };