heartraite 1.0.215 → 1.0.217
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/enum/cloudfunction.enum.d.ts +0 -4
- package/dist/enum/cloudfunction.enum.js +0 -4
- package/dist/enum/consultation.enum.d.ts +1 -1
- package/dist/enum/consultation.enum.js +1 -1
- package/dist/enum/firestore.enum.d.ts +0 -1
- package/dist/enum/firestore.enum.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/types/cloud-function-types.d.ts +2 -14
- package/dist/types/request.types.d.ts +0 -5
- package/dist/types/response.types.d.ts +0 -8
- package/package.json +1 -3
- package/src/enum/cloudfunction.enum.ts +0 -4
- package/src/enum/consultation.enum.ts +1 -1
- package/src/enum/firestore.enum.ts +0 -1
- package/src/index.ts +0 -1
- package/src/types/cloud-function-types.ts +0 -20
- package/src/types/request.types.ts +0 -9
- package/src/types/response.types.ts +0 -6
- package/dist/firebase/function.caller.d.ts +0 -14
- package/dist/firebase/function.caller.js +0 -15
- package/dist/firebase/index.d.ts +0 -1
- package/dist/firebase/index.js +0 -17
- package/src/firebase/function.caller.ts +0 -29
- package/src/firebase/index.ts +0 -1
|
@@ -43,10 +43,6 @@ export declare enum CloudFunction {
|
|
|
43
43
|
CREATE_REPORT = "report/create-report",
|
|
44
44
|
GET_SELF_AWARENESS = "sa/get-sa",
|
|
45
45
|
ADD_IMAGES = "storage/add-images",
|
|
46
|
-
GET_PRODUCTS = "stripe/get-products",
|
|
47
|
-
STRIPE_WEBWOOK = "stripe/webhook",
|
|
48
|
-
CREATE_BILLING_PORTAL = "stripe/create-billing-portal",
|
|
49
|
-
CREATE_CHECKOUT_SESSION = "stripe/create-checkout-session",
|
|
50
46
|
GET_USER_SURVEYS = "survey/get-user-surveys",
|
|
51
47
|
SUBMIT_USER_SURVEY = "survey/submit-user-survey",
|
|
52
48
|
REGISTER_ONBOARDING = "user/register-onboarding",
|
|
@@ -47,10 +47,6 @@ var CloudFunction;
|
|
|
47
47
|
CloudFunction["CREATE_REPORT"] = "report/create-report";
|
|
48
48
|
CloudFunction["GET_SELF_AWARENESS"] = "sa/get-sa";
|
|
49
49
|
CloudFunction["ADD_IMAGES"] = "storage/add-images";
|
|
50
|
-
CloudFunction["GET_PRODUCTS"] = "stripe/get-products";
|
|
51
|
-
CloudFunction["STRIPE_WEBWOOK"] = "stripe/webhook";
|
|
52
|
-
CloudFunction["CREATE_BILLING_PORTAL"] = "stripe/create-billing-portal";
|
|
53
|
-
CloudFunction["CREATE_CHECKOUT_SESSION"] = "stripe/create-checkout-session";
|
|
54
50
|
CloudFunction["GET_USER_SURVEYS"] = "survey/get-user-surveys";
|
|
55
51
|
CloudFunction["SUBMIT_USER_SURVEY"] = "survey/submit-user-survey";
|
|
56
52
|
CloudFunction["REGISTER_ONBOARDING"] = "user/register-onboarding";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* PENDING → user expressed interest, team hasn't reached
|
|
9
9
|
* out yet. Initial state on submit.
|
|
10
10
|
* FOLLOWED_UP → team emailed the user. v1 manual; v2 may be
|
|
11
|
-
* automated after
|
|
11
|
+
* automated after payment.
|
|
12
12
|
* BOOKED → consultation session scheduled (v2 only — v1
|
|
13
13
|
* tracks this only via team-internal notes).
|
|
14
14
|
* COMPLETED → session happened.
|
|
@@ -11,7 +11,7 @@ exports.ConsultationInterestStatus = void 0;
|
|
|
11
11
|
* PENDING → user expressed interest, team hasn't reached
|
|
12
12
|
* out yet. Initial state on submit.
|
|
13
13
|
* FOLLOWED_UP → team emailed the user. v1 manual; v2 may be
|
|
14
|
-
* automated after
|
|
14
|
+
* automated after payment.
|
|
15
15
|
* BOOKED → consultation session scheduled (v2 only — v1
|
|
16
16
|
* tracks this only via team-internal notes).
|
|
17
17
|
* COMPLETED → session happened.
|
|
@@ -10,7 +10,6 @@ var FirestoreCollection;
|
|
|
10
10
|
FirestoreCollection["MESSAGES"] = "messages";
|
|
11
11
|
FirestoreCollection["USERS"] = "users";
|
|
12
12
|
FirestoreCollection["RATING"] = "ratings";
|
|
13
|
-
FirestoreCollection["STRIPE_SUBSCRIPTIONS"] = "stripe_subscriptions";
|
|
14
13
|
FirestoreCollection["REPORTS"] = "reports";
|
|
15
14
|
FirestoreCollection["MATCHES"] = "matches";
|
|
16
15
|
FirestoreCollection["REFERRALS"] = "referrals";
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./constants"), exports);
|
|
18
18
|
__exportStar(require("./enum"), exports);
|
|
19
|
-
__exportStar(require("./firebase"), exports);
|
|
20
19
|
__exportStar(require("./helpers"), exports);
|
|
21
20
|
__exportStar(require("./types"), exports);
|
|
22
21
|
__exportStar(require("./utils"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CloudFunction } from "../enum";
|
|
2
|
-
import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest,
|
|
3
|
-
import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse,
|
|
2
|
+
import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, DeleteUserRequest, GetCARequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetAdvancedMatchRequest, GetMessagesRequest, GetPLSSubmissionRequest, GetSelfAwarenessRequest, GetUserRequest, HandleLastMessageSeenRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitAnswerRequest, SubmitCategoryFeedbackRequest, SubmitPLSCategoryFeedbackRequest, SubmitPLSDemographicsRequest, UpdatePLSAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest, SubmitFeedbackRequest, ExpressConsultationInterestRequest, GetMyConsultationInterestRequest, GetConsultationInterestsRequest, UpdateConsultationInterestRequest, SyncAffiliateRequest, JoinEventRequest, GetEventRequest, GetEventMatchRequest, SendEventFeedbackRequest, GetEventParticipantsRequest } from "./request.types";
|
|
3
|
+
import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse, CreateLikeResponse, CreatePLSInputResponse, CreatePLSSubmissionResponse, CreateReportResponse, DeleteUserResponse, GetCAResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetAdvancedMatchResponse, GetMessagesResponse, GetPLSSubmissionResponse, GetSelfAwarenessReponse, GetUserResponse, HandleLastMessageSeenResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitAnswerResponse, SubmitCategoryFeedbackResponse, SubmitPLSCategoryFeedbackResponse, SubmitPLSDemographicsResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse, SubmitFeedbackResponse, ExpressConsultationInterestResponse, GetMyConsultationInterestResponse, GetConsultationInterestsResponse, UpdateConsultationInterestResponse, SyncAffiliateResponse, GetUserEventsResponse, JoinEventResponse, GetEventResponse, GetEventMatchResponse, SendEventFeedbackResponse, GetEventParticipantsResponse } from "./response.types";
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated This function is deprecated.
|
|
6
6
|
* Use `CloudFunctionTypes` inside application code instead.
|
|
@@ -167,18 +167,6 @@ export type CloudFunctionTypes = {
|
|
|
167
167
|
payload: AddImagesRequest;
|
|
168
168
|
response: AddImagesResponse;
|
|
169
169
|
};
|
|
170
|
-
[CloudFunction.GET_PRODUCTS]: {
|
|
171
|
-
payload: GetProductsRequest;
|
|
172
|
-
response: GetProductsResponse;
|
|
173
|
-
};
|
|
174
|
-
[CloudFunction.CREATE_BILLING_PORTAL]: {
|
|
175
|
-
payload: CreateBillingPortalRequest;
|
|
176
|
-
response: CreateBillingPortalResponse;
|
|
177
|
-
};
|
|
178
|
-
[CloudFunction.CREATE_CHECKOUT_SESSION]: {
|
|
179
|
-
payload: CreateCheckoutSessionRequest;
|
|
180
|
-
response: CreateCheckoutSessionResponse;
|
|
181
|
-
};
|
|
182
170
|
[CloudFunction.REGISTER_ONBOARDING]: {
|
|
183
171
|
payload: RegisterOnboardingRequest;
|
|
184
172
|
response: RegisterOnboardingResponse;
|
|
@@ -184,9 +184,6 @@ export type CreateReportRequest = {
|
|
|
184
184
|
reason: ReportReason;
|
|
185
185
|
description?: string;
|
|
186
186
|
};
|
|
187
|
-
export type CreateCheckoutSessionRequest = {
|
|
188
|
-
priceId: string;
|
|
189
|
-
};
|
|
190
187
|
export type RegisterOnboardingRequest = {
|
|
191
188
|
firstName: string;
|
|
192
189
|
state: string;
|
|
@@ -233,5 +230,3 @@ export type GetPLSScoresRequest = undefined;
|
|
|
233
230
|
export type AddImagesRequest = {
|
|
234
231
|
images: string[];
|
|
235
232
|
};
|
|
236
|
-
export type GetProductsRequest = undefined;
|
|
237
|
-
export type CreateBillingPortalRequest = undefined;
|
|
@@ -4,7 +4,6 @@ import { Event, FullParticipant, FullParticipantWithCS } from "./event.types";
|
|
|
4
4
|
import { UserMatch } from "./match.types";
|
|
5
5
|
import { MatchableUser, MatchCheck } from "./matchmaking.types";
|
|
6
6
|
import { Message } from "./message.types";
|
|
7
|
-
import { StripeProduct } from "./stripe.types";
|
|
8
7
|
import { User } from "./user.types";
|
|
9
8
|
import { OutgoingLike } from "./like.types";
|
|
10
9
|
import { CA } from "./ca.types";
|
|
@@ -82,13 +81,6 @@ export type GetSelfAwarenessReponse = SelfAwareness | {
|
|
|
82
81
|
processing: true;
|
|
83
82
|
};
|
|
84
83
|
export type GetPLSScoresResponse = PLSScore[];
|
|
85
|
-
export type CreateBillingPortalResponse = {
|
|
86
|
-
url: string;
|
|
87
|
-
};
|
|
88
|
-
export type CreateCheckoutSessionResponse = {
|
|
89
|
-
url: string;
|
|
90
|
-
};
|
|
91
|
-
export type GetProductsResponse = StripeProduct[];
|
|
92
84
|
export type RegisterOnboardingResponse = void;
|
|
93
85
|
export type GetUserResponse = User;
|
|
94
86
|
export type UpdateUserResponse = User;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "heartraite",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.217",
|
|
4
4
|
"description": "Heartraite npm package for common functionality",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/agottfredsson/heartraite-npm#readme",
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"firebase": "^11.0.1",
|
|
32
31
|
"react": "^19.0.0",
|
|
33
32
|
"react-dom": "^19.0.0"
|
|
34
33
|
},
|
|
@@ -39,7 +38,6 @@
|
|
|
39
38
|
"@types/node": "^22.9.0",
|
|
40
39
|
"@types/react": "^19.0.2",
|
|
41
40
|
"@types/react-dom": "^19.0.2",
|
|
42
|
-
"firebase": "^11.0.1",
|
|
43
41
|
"jest": "^29.7.0",
|
|
44
42
|
"jest-environment-jsdom": "^29.7.0",
|
|
45
43
|
"ts-jest": "^29.2.5",
|
|
@@ -43,10 +43,6 @@ export enum CloudFunction {
|
|
|
43
43
|
CREATE_REPORT = "report/create-report",
|
|
44
44
|
GET_SELF_AWARENESS = "sa/get-sa",
|
|
45
45
|
ADD_IMAGES = "storage/add-images",
|
|
46
|
-
GET_PRODUCTS = "stripe/get-products",
|
|
47
|
-
STRIPE_WEBWOOK = "stripe/webhook",
|
|
48
|
-
CREATE_BILLING_PORTAL = "stripe/create-billing-portal",
|
|
49
|
-
CREATE_CHECKOUT_SESSION = "stripe/create-checkout-session",
|
|
50
46
|
GET_USER_SURVEYS = "survey/get-user-surveys",
|
|
51
47
|
SUBMIT_USER_SURVEY = "survey/submit-user-survey",
|
|
52
48
|
REGISTER_ONBOARDING = "user/register-onboarding",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* PENDING → user expressed interest, team hasn't reached
|
|
9
9
|
* out yet. Initial state on submit.
|
|
10
10
|
* FOLLOWED_UP → team emailed the user. v1 manual; v2 may be
|
|
11
|
-
* automated after
|
|
11
|
+
* automated after payment.
|
|
12
12
|
* BOOKED → consultation session scheduled (v2 only — v1
|
|
13
13
|
* tracks this only via team-internal notes).
|
|
14
14
|
* COMPLETED → session happened.
|
package/src/index.ts
CHANGED
|
@@ -3,8 +3,6 @@ import {
|
|
|
3
3
|
AddImagesRequest,
|
|
4
4
|
AuthenticateBankIDRequest,
|
|
5
5
|
CollectBankIDRequest,
|
|
6
|
-
CreateBillingPortalRequest,
|
|
7
|
-
CreateCheckoutSessionRequest,
|
|
8
6
|
CreateLikeRequest,
|
|
9
7
|
CreatePLSInputRequest,
|
|
10
8
|
CreatePLSSubmissionRequest,
|
|
@@ -17,7 +15,6 @@ import {
|
|
|
17
15
|
GetAdvancedMatchRequest,
|
|
18
16
|
GetMessagesRequest,
|
|
19
17
|
GetPLSSubmissionRequest,
|
|
20
|
-
GetProductsRequest,
|
|
21
18
|
GetSelfAwarenessRequest,
|
|
22
19
|
GetUserRequest,
|
|
23
20
|
HandleLastMessageSeenRequest,
|
|
@@ -50,8 +47,6 @@ import {
|
|
|
50
47
|
AddImagesResponse,
|
|
51
48
|
AuthenticateBankIDResponse,
|
|
52
49
|
CollectBankIDResponse,
|
|
53
|
-
CreateBillingPortalResponse,
|
|
54
|
-
CreateCheckoutSessionResponse,
|
|
55
50
|
CreateLikeResponse,
|
|
56
51
|
CreatePLSInputResponse,
|
|
57
52
|
CreatePLSSubmissionResponse,
|
|
@@ -65,7 +60,6 @@ import {
|
|
|
65
60
|
GetAdvancedMatchResponse,
|
|
66
61
|
GetMessagesResponse,
|
|
67
62
|
GetPLSSubmissionResponse,
|
|
68
|
-
GetProductsResponse,
|
|
69
63
|
GetSelfAwarenessReponse,
|
|
70
64
|
GetUserResponse,
|
|
71
65
|
HandleLastMessageSeenResponse,
|
|
@@ -293,20 +287,6 @@ export type CloudFunctionTypes = {
|
|
|
293
287
|
response: AddImagesResponse;
|
|
294
288
|
};
|
|
295
289
|
|
|
296
|
-
// stripe
|
|
297
|
-
[CloudFunction.GET_PRODUCTS]: {
|
|
298
|
-
payload: GetProductsRequest;
|
|
299
|
-
response: GetProductsResponse;
|
|
300
|
-
};
|
|
301
|
-
[CloudFunction.CREATE_BILLING_PORTAL]: {
|
|
302
|
-
payload: CreateBillingPortalRequest;
|
|
303
|
-
response: CreateBillingPortalResponse;
|
|
304
|
-
};
|
|
305
|
-
[CloudFunction.CREATE_CHECKOUT_SESSION]: {
|
|
306
|
-
payload: CreateCheckoutSessionRequest;
|
|
307
|
-
response: CreateCheckoutSessionResponse;
|
|
308
|
-
};
|
|
309
|
-
|
|
310
290
|
// user
|
|
311
291
|
[CloudFunction.REGISTER_ONBOARDING]: {
|
|
312
292
|
payload: RegisterOnboardingRequest;
|
|
@@ -214,11 +214,6 @@ export type CreateReportRequest = {
|
|
|
214
214
|
description?: string;
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
-
// stripe
|
|
218
|
-
export type CreateCheckoutSessionRequest = {
|
|
219
|
-
priceId: string;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
217
|
// user
|
|
223
218
|
export type RegisterOnboardingRequest = {
|
|
224
219
|
firstName: string;
|
|
@@ -264,7 +259,3 @@ export type GetPLSScoresRequest = undefined;
|
|
|
264
259
|
|
|
265
260
|
// storage
|
|
266
261
|
export type AddImagesRequest = { images: string[] };
|
|
267
|
-
|
|
268
|
-
// stripe
|
|
269
|
-
export type GetProductsRequest = undefined;
|
|
270
|
-
export type CreateBillingPortalRequest = undefined;
|
|
@@ -7,7 +7,6 @@ import { Event, FullParticipant, FullParticipantWithCS } from "./event.types";
|
|
|
7
7
|
import { UserMatch } from "./match.types";
|
|
8
8
|
import { MatchableUser, MatchCheck } from "./matchmaking.types";
|
|
9
9
|
import { Message } from "./message.types";
|
|
10
|
-
import { StripeProduct } from "./stripe.types";
|
|
11
10
|
import { User } from "./user.types";
|
|
12
11
|
import { OutgoingLike } from "./like.types";
|
|
13
12
|
import { CA } from "./ca.types";
|
|
@@ -123,11 +122,6 @@ export type GetSelfAwarenessReponse = SelfAwareness | { processing: true };
|
|
|
123
122
|
// score
|
|
124
123
|
export type GetPLSScoresResponse = PLSScore[];
|
|
125
124
|
|
|
126
|
-
// stripe
|
|
127
|
-
export type CreateBillingPortalResponse = { url: string };
|
|
128
|
-
export type CreateCheckoutSessionResponse = { url: string };
|
|
129
|
-
export type GetProductsResponse = StripeProduct[];
|
|
130
|
-
|
|
131
125
|
// user
|
|
132
126
|
export type RegisterOnboardingResponse = void;
|
|
133
127
|
export type GetUserResponse = User;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Functions } from "firebase/functions";
|
|
2
|
-
import { CloudFunctionTypes } from "../types";
|
|
3
|
-
interface Params<T extends keyof CloudFunctionTypes> {
|
|
4
|
-
functionName: T;
|
|
5
|
-
functions: Functions;
|
|
6
|
-
payload?: CloudFunctionTypes[T]["payload"];
|
|
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
|
-
*/
|
|
13
|
-
export declare const callCloudFunction: <T extends keyof CloudFunctionTypes>({ payload, functions, functionName, }: Params<T>) => Promise<CloudFunctionTypes[T]["response"]>;
|
|
14
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.callCloudFunction = void 0;
|
|
4
|
-
const functions_1 = require("firebase/functions");
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated This function is deprecated.
|
|
7
|
-
* Use `callCloudFunction` inside application code instead.
|
|
8
|
-
* This function will be removed in future versions.
|
|
9
|
-
*/
|
|
10
|
-
const callCloudFunction = async ({ payload, functions, functionName, }) => {
|
|
11
|
-
const fn = (0, functions_1.httpsCallable)(functions, functionName);
|
|
12
|
-
const res = payload ? await fn(payload) : await fn();
|
|
13
|
-
return res.data;
|
|
14
|
-
};
|
|
15
|
-
exports.callCloudFunction = callCloudFunction;
|
package/dist/firebase/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./function.caller";
|
package/dist/firebase/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./function.caller"), exports);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Functions, httpsCallable } from "firebase/functions";
|
|
2
|
-
import { CloudFunctionTypes } from "../types";
|
|
3
|
-
|
|
4
|
-
// Define the type of parameters for the generic function
|
|
5
|
-
interface Params<T extends keyof CloudFunctionTypes> {
|
|
6
|
-
functionName: T;
|
|
7
|
-
functions: Functions;
|
|
8
|
-
payload?: CloudFunctionTypes[T]["payload"];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated This function is deprecated.
|
|
13
|
-
* Use `callCloudFunction` inside application code instead.
|
|
14
|
-
* This function will be removed in future versions.
|
|
15
|
-
*/
|
|
16
|
-
export const callCloudFunction = async <T extends keyof CloudFunctionTypes>({
|
|
17
|
-
payload,
|
|
18
|
-
functions,
|
|
19
|
-
functionName,
|
|
20
|
-
}: Params<T>): Promise<CloudFunctionTypes[T]["response"]> => {
|
|
21
|
-
const fn = httpsCallable<
|
|
22
|
-
CloudFunctionTypes[T]["payload"],
|
|
23
|
-
CloudFunctionTypes[T]["response"]
|
|
24
|
-
>(functions, functionName);
|
|
25
|
-
|
|
26
|
-
const res = payload ? await fn(payload) : await fn();
|
|
27
|
-
|
|
28
|
-
return res.data;
|
|
29
|
-
};
|
package/src/firebase/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./function.caller";
|