heartraite 1.0.187 → 1.0.189

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.
@@ -50,5 +50,7 @@ export declare enum CloudFunction {
50
50
  UPDATE_USER = "user/update-user",
51
51
  GET_CURRENT_USER = "user/get-current-user",
52
52
  DELETE_USER = "user/delete-user",
53
- SUBMIT_MATCH_FEEDBACK = "match-outcome/submit-feedback"
53
+ SUBMIT_MATCH_FEEDBACK = "match-outcome/submit-feedback",
54
+ GENERATE_CODE = "ps/generate-code",
55
+ RESOLVE_CODE = "ps/resolve-code"
54
56
  }
@@ -55,4 +55,6 @@ var CloudFunction;
55
55
  CloudFunction["GET_CURRENT_USER"] = "user/get-current-user";
56
56
  CloudFunction["DELETE_USER"] = "user/delete-user";
57
57
  CloudFunction["SUBMIT_MATCH_FEEDBACK"] = "match-outcome/submit-feedback";
58
+ CloudFunction["GENERATE_CODE"] = "ps/generate-code";
59
+ CloudFunction["RESOLVE_CODE"] = "ps/resolve-code";
58
60
  })(CloudFunction || (exports.CloudFunction = CloudFunction = {}));
@@ -20,4 +20,5 @@ export * from "./stripe.types";
20
20
  export * from "./submission.types";
21
21
  export * from "./user.types";
22
22
  export * from "./sa.types";
23
+ export * from "./ps.types";
23
24
  export * from "./survey.types";
@@ -36,4 +36,5 @@ __exportStar(require("./stripe.types"), exports);
36
36
  __exportStar(require("./submission.types"), exports);
37
37
  __exportStar(require("./user.types"), exports);
38
38
  __exportStar(require("./sa.types"), exports);
39
+ __exportStar(require("./ps.types"), exports);
39
40
  __exportStar(require("./survey.types"), exports);
@@ -16,6 +16,10 @@ export type MatchFeedback = {
16
16
  metEligible: boolean;
17
17
  hasSubmittedMet: boolean;
18
18
  };
19
+ export type MatchEligibility = {
20
+ canLike: boolean;
21
+ reason?: string;
22
+ };
19
23
  export type MatchableUser = {
20
24
  userId: string;
21
25
  matchId?: string;
@@ -24,6 +28,7 @@ export type MatchableUser = {
24
28
  matchStatus: MatchStatus;
25
29
  matchAttributes: MatchAttributes;
26
30
  matchFeedback?: MatchFeedback;
31
+ matchEligibility?: MatchEligibility;
27
32
  };
28
33
  export type MatchStatus = {
29
34
  isMatch: boolean;
@@ -0,0 +1,10 @@
1
+ export interface PSGenerateCodeResponse {
2
+ shareCode: string;
3
+ sharingEnabled: boolean;
4
+ }
5
+ export interface PSResolveCodeRequest {
6
+ shareCode: string;
7
+ }
8
+ export interface PSResolveCodeResponse {
9
+ userId: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -170,6 +170,9 @@ export type UpdateUserRequest = {
170
170
  settings?: DeepPartial<UserSettings>;
171
171
  consent?: DeepPartial<UserConsents>;
172
172
  device?: DeepPartial<UserDevice>;
173
+ permissions?: {
174
+ profileSharingAllowed?: boolean;
175
+ };
173
176
  };
174
177
  export type DeleteUserRequest = {
175
178
  validationPhrase: string;
@@ -9,6 +9,8 @@ export type User = {
9
9
  notifications: UserNotifications;
10
10
  settings: UserSettings;
11
11
  consent: UserConsents;
12
+ /** Share code for profile sharing — only present when profileSharingAllowed is true */
13
+ shareCode?: string;
12
14
  };
13
15
  export type UserDevice = {
14
16
  deviceType: string | null;
@@ -30,6 +32,7 @@ export type UserSettings = {
30
32
  export type UserPermissions = {
31
33
  registrationReferralAllowed: boolean;
32
34
  promoCodeAllowed: boolean;
35
+ profileSharingAllowed?: boolean;
33
36
  };
34
37
  export type ProfileInput = Record<string, string>;
35
38
  export type UserProfile = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.187",
3
+ "version": "1.0.189",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,4 +51,6 @@ export enum CloudFunction {
51
51
  GET_CURRENT_USER = "user/get-current-user",
52
52
  DELETE_USER = "user/delete-user",
53
53
  SUBMIT_MATCH_FEEDBACK = "match-outcome/submit-feedback",
54
+ GENERATE_CODE = "ps/generate-code",
55
+ RESOLVE_CODE = "ps/resolve-code",
54
56
  }
@@ -20,4 +20,5 @@ export * from "./stripe.types";
20
20
  export * from "./submission.types";
21
21
  export * from "./user.types";
22
22
  export * from "./sa.types";
23
+ export * from "./ps.types";
23
24
  export * from "./survey.types";
@@ -20,6 +20,11 @@ export type MatchFeedback = {
20
20
  hasSubmittedMet: boolean;
21
21
  };
22
22
 
23
+ export type MatchEligibility = {
24
+ canLike: boolean;
25
+ reason?: string;
26
+ };
27
+
23
28
  export type MatchableUser = {
24
29
  userId: string;
25
30
  matchId?: string;
@@ -28,6 +33,7 @@ export type MatchableUser = {
28
33
  matchStatus: MatchStatus;
29
34
  matchAttributes: MatchAttributes;
30
35
  matchFeedback?: MatchFeedback;
36
+ matchEligibility?: MatchEligibility;
31
37
  };
32
38
 
33
39
  export type MatchStatus = {
@@ -0,0 +1,12 @@
1
+ export interface PSGenerateCodeResponse {
2
+ shareCode: string;
3
+ sharingEnabled: boolean;
4
+ }
5
+
6
+ export interface PSResolveCodeRequest {
7
+ shareCode: string;
8
+ }
9
+
10
+ export interface PSResolveCodeResponse {
11
+ userId: string;
12
+ }
@@ -190,6 +190,7 @@ export type UpdateUserRequest = {
190
190
  settings?: DeepPartial<UserSettings>;
191
191
  consent?: DeepPartial<UserConsents>;
192
192
  device?: DeepPartial<UserDevice>;
193
+ permissions?: { profileSharingAllowed?: boolean };
193
194
  };
194
195
  export type DeleteUserRequest = {
195
196
  validationPhrase: string;
@@ -17,6 +17,8 @@ export type User = {
17
17
  notifications: UserNotifications;
18
18
  settings: UserSettings;
19
19
  consent: UserConsents;
20
+ /** Share code for profile sharing — only present when profileSharingAllowed is true */
21
+ shareCode?: string;
20
22
  };
21
23
 
22
24
  export type UserDevice = {
@@ -44,6 +46,7 @@ export type UserSettings = {
44
46
  export type UserPermissions = {
45
47
  registrationReferralAllowed: boolean;
46
48
  promoCodeAllowed: boolean;
49
+ profileSharingAllowed?: boolean;
47
50
  };
48
51
 
49
52
  export type ProfileInput = Record<string, string>;