@neocleus/razorpay-firebase-functions 1.0.0 → 1.0.2
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/lib/admin.d.ts +2 -2
- package/lib/callables/subscriptions.d.ts +2 -2
- package/lib/index.d.ts +10 -10
- package/lib/triggers/createCustomer.d.ts +1 -1
- package/lib/triggers/createCustomer.js +1 -1
- package/lib/triggers/createCustomer.js.map +1 -1
- package/lib/triggers/createOrder.d.ts +1 -1
- package/lib/triggers/createSubscription.d.ts +1 -1
- package/lib/triggers/onUserDeleted.d.ts +1 -1
- package/lib/triggers/onUserDeleted.js +1 -1
- package/lib/triggers/onUserDeleted.js.map +1 -1
- package/package.json +11 -7
package/lib/admin.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Razorpay from 'razorpay';
|
|
2
2
|
import { RazorpaySyncConfig, ProductDoc } from './types';
|
|
3
|
-
export declare const buildCreatePlan: (config: RazorpaySyncConfig, rzp: Razorpay) => import("firebase-functions/v2/https").CallableFunction<any, Promise<ProductDoc
|
|
3
|
+
export declare const buildCreatePlan: (config: RazorpaySyncConfig, rzp: Razorpay) => import("firebase-functions/v2/https").CallableFunction<any, Promise<ProductDoc>, unknown>;
|
|
4
4
|
export declare const buildSyncPlans: (config: RazorpaySyncConfig, rzp: Razorpay) => import("firebase-functions/v2/https").CallableFunction<any, Promise<{
|
|
5
5
|
status: string;
|
|
6
6
|
count: number;
|
|
7
7
|
productsCount: number;
|
|
8
|
-
}
|
|
8
|
+
}>, unknown>;
|
|
@@ -2,8 +2,8 @@ import Razorpay from 'razorpay';
|
|
|
2
2
|
import { RazorpaySyncConfig } from '../types';
|
|
3
3
|
export declare const buildCancelSubscription: (config: RazorpaySyncConfig, rzp: Razorpay) => import("firebase-functions/v2/https").CallableFunction<any, Promise<{
|
|
4
4
|
status: "cancelled" | "active" | "pending" | "created" | "expired" | "authenticated" | "halted" | "completed";
|
|
5
|
-
}
|
|
5
|
+
}>, unknown>;
|
|
6
6
|
export declare const buildUpdateSubscriptionPlan: (config: RazorpaySyncConfig, rzp: Razorpay) => import("firebase-functions/v2/https").CallableFunction<any, Promise<{
|
|
7
7
|
plan_id: string;
|
|
8
8
|
status: "cancelled" | "active" | "pending" | "created" | "expired" | "authenticated" | "halted" | "completed";
|
|
9
|
-
}
|
|
9
|
+
}>, unknown>;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { RazorpayUserConfig } from './types';
|
|
2
2
|
export { RazorpayUserConfig, RazorpaySyncConfig } from './types';
|
|
3
3
|
export declare function initializeRazorpay(userConfig: RazorpayUserConfig): {
|
|
4
|
-
createOrder: import("firebase-functions
|
|
4
|
+
createOrder: import("firebase-functions").CloudFunction<import("firebase-functions/firestore").FirestoreEvent<import("firebase-functions/firestore").QueryDocumentSnapshot | undefined, {
|
|
5
5
|
uid: string;
|
|
6
6
|
id: string;
|
|
7
7
|
}>>;
|
|
8
|
-
createSubscription: import("firebase-functions
|
|
8
|
+
createSubscription: import("firebase-functions").CloudFunction<import("firebase-functions/firestore").FirestoreEvent<import("firebase-functions/firestore").QueryDocumentSnapshot | undefined, {
|
|
9
9
|
uid: string;
|
|
10
10
|
id: string;
|
|
11
11
|
}>>;
|
|
12
12
|
createCustomer: import("firebase-functions/v1").CloudFunction<import("firebase-admin/auth").UserRecord>;
|
|
13
13
|
onUserDeleted: import("firebase-functions/v1").CloudFunction<import("firebase-admin/auth").UserRecord>;
|
|
14
14
|
onCustomerDataDeleted: import("firebase-functions/v1").CloudFunction<import("firebase-functions/v1/firestore").QueryDocumentSnapshot>;
|
|
15
|
-
webhookHandler: import("firebase-functions/
|
|
16
|
-
cancelSubscription: import("firebase-functions/
|
|
15
|
+
webhookHandler: import("firebase-functions/https").HttpsFunction;
|
|
16
|
+
cancelSubscription: import("firebase-functions/https").CallableFunction<any, Promise<{
|
|
17
17
|
status: "cancelled" | "active" | "pending" | "created" | "expired" | "authenticated" | "halted" | "completed";
|
|
18
|
-
}
|
|
19
|
-
updateSubscriptionPlan: import("firebase-functions/
|
|
18
|
+
}>, unknown>;
|
|
19
|
+
updateSubscriptionPlan: import("firebase-functions/https").CallableFunction<any, Promise<{
|
|
20
20
|
plan_id: string;
|
|
21
21
|
status: "cancelled" | "active" | "pending" | "created" | "expired" | "authenticated" | "halted" | "completed";
|
|
22
|
-
}
|
|
23
|
-
createPlan: import("firebase-functions/
|
|
24
|
-
syncPlans: import("firebase-functions/
|
|
22
|
+
}>, unknown>;
|
|
23
|
+
createPlan: import("firebase-functions/https").CallableFunction<any, Promise<import("./types").ProductDoc>, unknown>;
|
|
24
|
+
syncPlans: import("firebase-functions/https").CallableFunction<any, Promise<{
|
|
25
25
|
status: string;
|
|
26
26
|
count: number;
|
|
27
27
|
productsCount: number;
|
|
28
|
-
}
|
|
28
|
+
}>, unknown>;
|
|
29
29
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as functions from 'firebase-functions';
|
|
1
|
+
import * as functions from 'firebase-functions/v1';
|
|
2
2
|
import Razorpay from 'razorpay';
|
|
3
3
|
import { RazorpaySyncConfig } from '../types';
|
|
4
4
|
export declare const buildCreateCustomer: (config: RazorpaySyncConfig, rzp: Razorpay) => functions.CloudFunction<import("firebase-admin/auth").UserRecord>;
|
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.buildCreateCustomer = void 0;
|
|
37
37
|
const admin = __importStar(require("firebase-admin"));
|
|
38
|
-
const functions = __importStar(require("firebase-functions"));
|
|
38
|
+
const functions = __importStar(require("firebase-functions/v1"));
|
|
39
39
|
const firestore_1 = require("firebase-admin/firestore");
|
|
40
40
|
const logs_1 = require("../logs");
|
|
41
41
|
const typedFirestore_1 = require("../utils/typedFirestore");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCustomer.js","sourceRoot":"","sources":["../../src/triggers/createCustomer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"createCustomer.js","sourceRoot":"","sources":["../../src/triggers/createCustomer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,iEAAmD;AACnD,wDAAsD;AAGtD,kCAA+B;AAE/B,4DAAyD;AAElD,MAAM,mBAAmB,GAAG,CAAC,MAA0B,EAAE,GAAa,EAAE,EAAE;IAC7E,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,QAAQ,CACjC,KAAK,EAAE,IAAI,EAAiB,EAAE;QAC1B,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;YACxB,WAAI,CAAC,IAAI,CAAC,yEAAyE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;YAC/F,OAAO;QACX,CAAC;QAED,IAAI,CAAC;YACD,WAAI,CAAC,IAAI,CAAC,4CAA4C,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;YAElE,MAAM,cAAc,GAAgD;gBAChE,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,SAAS;gBAC9B,OAAO,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;gBACtC,IAAI,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS;gBACnC,aAAa,EAAE,KAAK;gBACpB,KAAK,EAAE;oBACH,WAAW,EAAE,IAAI,CAAC,GAAG;iBACxB;aACJ,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;YAC5D,WAAI,CAAC,IAAI,CAAC,6BAA6B,QAAQ,CAAC,EAAE,aAAa,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;YAE3E,MAAM,OAAO,GAAG,IAAI,+BAAc,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;YAC9D,MAAM,YAAY,GAAgB;gBAC9B,oBAAoB,EAAE,QAAQ,CAAC,EAAE;gBACjC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI;gBACzB,IAAI,EAAE,IAAI,CAAC,WAAW,IAAI,IAAI;gBAC9B,KAAK,EAAE,IAAI,CAAC,WAAW,IAAI,IAAI;gBAC/B,UAAU,EAAE,sBAAU,CAAC,eAAe,EAAE;gBACxC,UAAU,EAAE,sBAAU,CAAC,eAAe,EAAE;aAC3C,CAAC;YAEF,MAAM,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAE9E,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YAClB,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACpG,WAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,+CAA+C,IAAI,CAAC,GAAG,KAAK,MAAM,EAAE,CAAC,CAAC,CAAC;QAChG,CAAC;IACL,CAAC,CACJ,CAAC;AACN,CAAC,CAAC;AA1CW,QAAA,mBAAmB,uBA0C9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Razorpay from 'razorpay';
|
|
2
2
|
import { RazorpaySyncConfig } from '../types';
|
|
3
|
-
export declare const buildCreateOrder: (config: RazorpaySyncConfig, rzp: Razorpay) => import("firebase-functions
|
|
3
|
+
export declare const buildCreateOrder: (config: RazorpaySyncConfig, rzp: Razorpay) => import("firebase-functions").CloudFunction<import("firebase-functions/v2/firestore").FirestoreEvent<import("firebase-functions/v2/firestore").QueryDocumentSnapshot | undefined, {
|
|
4
4
|
uid: string;
|
|
5
5
|
id: string;
|
|
6
6
|
}>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Razorpay from 'razorpay';
|
|
2
2
|
import { RazorpaySyncConfig } from '../types';
|
|
3
|
-
export declare const buildCreateSubscription: (config: RazorpaySyncConfig, rzp: Razorpay) => import("firebase-functions
|
|
3
|
+
export declare const buildCreateSubscription: (config: RazorpaySyncConfig, rzp: Razorpay) => import("firebase-functions").CloudFunction<import("firebase-functions/v2/firestore").FirestoreEvent<import("firebase-functions/v2/firestore").QueryDocumentSnapshot | undefined, {
|
|
4
4
|
uid: string;
|
|
5
5
|
id: string;
|
|
6
6
|
}>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as functions from 'firebase-functions';
|
|
1
|
+
import * as functions from 'firebase-functions/v1';
|
|
2
2
|
import Razorpay from 'razorpay';
|
|
3
3
|
import { RazorpaySyncConfig } from '../types';
|
|
4
4
|
export declare const buildOnCustomerDataDeleted: (config: RazorpaySyncConfig, rzp: Razorpay) => functions.CloudFunction<functions.firestore.QueryDocumentSnapshot>;
|
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.buildOnUserDeleted = exports.buildOnCustomerDataDeleted = void 0;
|
|
37
37
|
const firestore_1 = require("firebase-admin/firestore");
|
|
38
|
-
const functions = __importStar(require("firebase-functions"));
|
|
38
|
+
const functions = __importStar(require("firebase-functions/v1"));
|
|
39
39
|
const admin = __importStar(require("firebase-admin"));
|
|
40
40
|
const logs_1 = require("../logs");
|
|
41
41
|
const typedFirestore_1 = require("../utils/typedFirestore");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onUserDeleted.js","sourceRoot":"","sources":["../../src/triggers/onUserDeleted.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAsD;AACtD,
|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
2
2
|
"name": "@neocleus/razorpay-firebase-functions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Consumable Firebase Cloud Functions for Razorpay payments and subscriptions integration using the Factory pattern",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/rajivnayanc/firebase-razorpay-extension.git"
|
|
10
|
+
},
|
|
7
11
|
"files": [
|
|
8
12
|
"lib/**/*"
|
|
9
13
|
],
|
|
@@ -23,15 +27,15 @@
|
|
|
23
27
|
"author": "Neocleus",
|
|
24
28
|
"license": "MIT",
|
|
25
29
|
"peerDependencies": {
|
|
26
|
-
"firebase-admin": "^
|
|
27
|
-
"firebase-functions": "^
|
|
30
|
+
"firebase-admin": "^13.10.0",
|
|
31
|
+
"firebase-functions": "^7.2.5"
|
|
28
32
|
},
|
|
29
33
|
"dependencies": {
|
|
30
|
-
"razorpay": "^2.9.
|
|
31
|
-
"@neocleus/razorpay-firebase-types": "^1.0.
|
|
34
|
+
"razorpay": "^2.9.6",
|
|
35
|
+
"@neocleus/razorpay-firebase-types": "^1.0.1"
|
|
32
36
|
},
|
|
33
37
|
"devDependencies": {
|
|
34
|
-
"typescript": "^
|
|
35
|
-
"@types/node": "^
|
|
38
|
+
"typescript": "^6.0.3",
|
|
39
|
+
"@types/node": "^25.9.1"
|
|
36
40
|
}
|
|
37
41
|
}
|