@nimee/shared-types 1.0.33 → 1.0.35
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/account/account.d.ts +38 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/payment/charge.d.ts +47 -0
- package/dist/payment/charge.js +16 -0
- package/dist/payment/charge.js.map +1 -0
- package/dist/payment/index.d.ts +1 -0
- package/dist/payment/index.js +18 -0
- package/dist/payment/index.js.map +1 -0
- package/package.json +1 -1
- package/src/account/account.ts +40 -0
- package/src/index.ts +1 -0
- package/src/payment/charge.ts +53 -0
- package/src/payment/index.ts +1 -0
|
@@ -40,3 +40,41 @@ export interface AccountModel {
|
|
|
40
40
|
currency: string;
|
|
41
41
|
_id: string;
|
|
42
42
|
}
|
|
43
|
+
export interface IPaymeCreateSellerWebhookPayload {
|
|
44
|
+
seller_payme_id: string;
|
|
45
|
+
seller_created: string;
|
|
46
|
+
seller_first_name: string;
|
|
47
|
+
seller_last_name: string;
|
|
48
|
+
seller_social_id: string;
|
|
49
|
+
seller_birthdate: string;
|
|
50
|
+
seller_date_of_birth: string;
|
|
51
|
+
seller_gender: number;
|
|
52
|
+
seller_email: string;
|
|
53
|
+
seller_contact_email: string;
|
|
54
|
+
seller_phone: string;
|
|
55
|
+
seller_contact_phone: string;
|
|
56
|
+
seller_address_city: string;
|
|
57
|
+
seller_address_street: string;
|
|
58
|
+
seller_address_street_number: string;
|
|
59
|
+
seller_address_country: string;
|
|
60
|
+
seller_inc: number;
|
|
61
|
+
seller_inc_code: string;
|
|
62
|
+
seller_merchant_name: string;
|
|
63
|
+
seller_site_url: string;
|
|
64
|
+
seller_custom_details: string;
|
|
65
|
+
seller_active: boolean;
|
|
66
|
+
seller_approved: boolean;
|
|
67
|
+
seller_market_fee: number;
|
|
68
|
+
seller_currencies: string;
|
|
69
|
+
fee_default_processing_fee: string;
|
|
70
|
+
fee_default_processing_charge: string;
|
|
71
|
+
fee_default_discount_fee: string;
|
|
72
|
+
fee_foreign_processing_fee: string;
|
|
73
|
+
fee_foreign_processing_charge: string;
|
|
74
|
+
fee_forcurr_processing_charge: string;
|
|
75
|
+
seller_public_key: {
|
|
76
|
+
uuid: string;
|
|
77
|
+
description: string;
|
|
78
|
+
is_active: boolean;
|
|
79
|
+
};
|
|
80
|
+
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -18,4 +18,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
__exportStar(require("./account"), exports);
|
|
19
19
|
__exportStar(require("./userEvent"), exports);
|
|
20
20
|
__exportStar(require("./event"), exports);
|
|
21
|
+
__exportStar(require("./payment"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2BAA2B;AAC3B,4CAA0B;AAC1B,8CAA4B;AAC5B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2BAA2B;AAC3B,4CAA0B;AAC1B,8CAA4B;AAC5B,0CAAwB;AACxB,4CAA0B"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare enum StatusPaymentEnum {
|
|
2
|
+
pending = "pending",
|
|
3
|
+
approved = "approved",
|
|
4
|
+
rejected = "rejected",
|
|
5
|
+
cancelled = "cancelled",
|
|
6
|
+
refunded = "refunded",
|
|
7
|
+
paid = "paid",
|
|
8
|
+
failed = "failed",
|
|
9
|
+
expired = "expired",
|
|
10
|
+
pending_refund = "pending_refund"
|
|
11
|
+
}
|
|
12
|
+
export interface IChargeModel {
|
|
13
|
+
error: object;
|
|
14
|
+
status_code?: number;
|
|
15
|
+
status_error_code?: string;
|
|
16
|
+
status_error_details?: string;
|
|
17
|
+
notify_type?: string;
|
|
18
|
+
sale_created?: Date;
|
|
19
|
+
transaction_id?: string;
|
|
20
|
+
price: number;
|
|
21
|
+
currency: string;
|
|
22
|
+
sale_status?: string;
|
|
23
|
+
buyer_card_mask?: string;
|
|
24
|
+
buyer_card_exp?: string;
|
|
25
|
+
buyer_name?: string;
|
|
26
|
+
buyer_email?: string;
|
|
27
|
+
buyer_phone?: string;
|
|
28
|
+
buyer_social_id?: string;
|
|
29
|
+
buyer_key?: string;
|
|
30
|
+
installments?: string;
|
|
31
|
+
sale_paid_date?: Date;
|
|
32
|
+
sale_release_date?: Date;
|
|
33
|
+
is_token_sale?: number;
|
|
34
|
+
sale_invoice_url?: string;
|
|
35
|
+
event: string;
|
|
36
|
+
account: string;
|
|
37
|
+
userEvents: string[];
|
|
38
|
+
tickets: string[];
|
|
39
|
+
paymentProvider: string;
|
|
40
|
+
external_sale_id?: string;
|
|
41
|
+
external_sale_code?: string;
|
|
42
|
+
external_transaction_id?: string;
|
|
43
|
+
external_transaction_card_brand?: string;
|
|
44
|
+
external_transaction_auth_number?: string;
|
|
45
|
+
external_signature?: string;
|
|
46
|
+
status: StatusPaymentEnum;
|
|
47
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusPaymentEnum = void 0;
|
|
4
|
+
var StatusPaymentEnum;
|
|
5
|
+
(function (StatusPaymentEnum) {
|
|
6
|
+
StatusPaymentEnum["pending"] = "pending";
|
|
7
|
+
StatusPaymentEnum["approved"] = "approved";
|
|
8
|
+
StatusPaymentEnum["rejected"] = "rejected";
|
|
9
|
+
StatusPaymentEnum["cancelled"] = "cancelled";
|
|
10
|
+
StatusPaymentEnum["refunded"] = "refunded";
|
|
11
|
+
StatusPaymentEnum["paid"] = "paid";
|
|
12
|
+
StatusPaymentEnum["failed"] = "failed";
|
|
13
|
+
StatusPaymentEnum["expired"] = "expired";
|
|
14
|
+
StatusPaymentEnum["pending_refund"] = "pending_refund";
|
|
15
|
+
})(StatusPaymentEnum = exports.StatusPaymentEnum || (exports.StatusPaymentEnum = {}));
|
|
16
|
+
//# sourceMappingURL=charge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charge.js","sourceRoot":"","sources":["../../src/payment/charge.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;IACrB,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,sDAAiC,CAAA;AACnC,CAAC,EAVW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAU5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./charge";
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./charge"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/payment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
|
package/package.json
CHANGED
package/src/account/account.ts
CHANGED
|
@@ -31,3 +31,43 @@ export interface AccountModel {
|
|
|
31
31
|
currency: string;
|
|
32
32
|
_id: string;
|
|
33
33
|
}
|
|
34
|
+
// {"payme_status":"success","status_error_code":0,"status_code":0,"seller_payme_id":"MPL16720-72349IAE-FRITPXY5-TFLDUEWF","seller_created":"2022-12-26 18:32:29","seller_first_name":"Ron","seller_last_name":"Dahan","seller_social_id":"205569163","seller_birthdate":"1994-07-01","seller_date_of_birth":"1994-07-01","seller_gender":0,"seller_email":"roncho1794@gmail.com","seller_contact_email":"roncho1794@gmail.com","seller_phone":"+972542323517","seller_contact_phone":"+972542323517","seller_address_city":"Tel Aviv","seller_address_street":"Tel Aviv","seller_address_street_number":"12","seller_address_country":"IL","seller_inc":0,"seller_inc_code":"12345","seller_merchant_name":"Ronen","seller_site_url":"www.no.co.il","seller_custom_details":"No existing Isracard MID","seller_active":true,"seller_approved":false,"seller_market_fee":0,"seller_currencies":,"fee_default_processing_fee":"1.50","fee_default_processing_charge":"0.100000000000000000","fee_default_discount_fee":"0.50","fee_foreign_processing_fee":"2.95","fee_foreign_processing_charge":"0.100000000000000000","fee_forcurr_processing_charge":"0.100000000000000000","seller_public_key":{"uuid":"b40a5251-9907-4db1-8f26-c015dd9466df","description":"PayMe-Public-Key","is_active":true},"notify_type":"seller-create"}
|
|
35
|
+
|
|
36
|
+
export interface IPaymeCreateSellerWebhookPayload {
|
|
37
|
+
seller_payme_id: string;
|
|
38
|
+
seller_created: string;
|
|
39
|
+
seller_first_name: string;
|
|
40
|
+
seller_last_name: string;
|
|
41
|
+
seller_social_id: string;
|
|
42
|
+
seller_birthdate: string;
|
|
43
|
+
seller_date_of_birth: string;
|
|
44
|
+
seller_gender: number;
|
|
45
|
+
seller_email: string;
|
|
46
|
+
seller_contact_email: string;
|
|
47
|
+
seller_phone: string;
|
|
48
|
+
seller_contact_phone: string;
|
|
49
|
+
seller_address_city: string;
|
|
50
|
+
seller_address_street: string;
|
|
51
|
+
seller_address_street_number: string;
|
|
52
|
+
seller_address_country: string;
|
|
53
|
+
seller_inc: number;
|
|
54
|
+
seller_inc_code: string;
|
|
55
|
+
seller_merchant_name: string;
|
|
56
|
+
seller_site_url: string;
|
|
57
|
+
seller_custom_details: string;
|
|
58
|
+
seller_active: boolean;
|
|
59
|
+
seller_approved: boolean;
|
|
60
|
+
seller_market_fee: number;
|
|
61
|
+
seller_currencies: string;
|
|
62
|
+
fee_default_processing_fee: string;
|
|
63
|
+
fee_default_processing_charge: string;
|
|
64
|
+
fee_default_discount_fee: string;
|
|
65
|
+
fee_foreign_processing_fee: string;
|
|
66
|
+
fee_foreign_processing_charge: string;
|
|
67
|
+
fee_forcurr_processing_charge: string;
|
|
68
|
+
seller_public_key: {
|
|
69
|
+
uuid: string;
|
|
70
|
+
description: string;
|
|
71
|
+
is_active: boolean;
|
|
72
|
+
};
|
|
73
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export enum StatusPaymentEnum {
|
|
2
|
+
pending = "pending",
|
|
3
|
+
approved = "approved",
|
|
4
|
+
rejected = "rejected",
|
|
5
|
+
cancelled = "cancelled",
|
|
6
|
+
refunded = "refunded",
|
|
7
|
+
paid = "paid",
|
|
8
|
+
failed = "failed",
|
|
9
|
+
expired = "expired",
|
|
10
|
+
pending_refund = "pending_refund",
|
|
11
|
+
}
|
|
12
|
+
export interface IChargeModel {
|
|
13
|
+
error: object;
|
|
14
|
+
status_code?: number; // 0 Status of the request (0 - success, 1 - error)
|
|
15
|
+
status_error_code?: string; // In case of an error, our unique error code
|
|
16
|
+
status_error_details?: string; // In case of an error, the error message
|
|
17
|
+
notify_type?: string; // sale-complete Sale notification types
|
|
18
|
+
sale_created?: Date; // 2016-01-01 15:15:15
|
|
19
|
+
transaction_id?: string; // 12345 Merchant's unique sale ID for correlation with us
|
|
20
|
+
// payme_sale_id: string; // XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX Our unique sale ID
|
|
21
|
+
// payme_sale_code: string; // 12345678 Our unique sale code (for display purposes only)
|
|
22
|
+
// payme_transaction_id: string; // XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX Our unique transaction ID
|
|
23
|
+
price: number; // 1000 Sale final price. For example, if the price is 50.75 (max 2 decimal points) the value that needs to be sent is 5075
|
|
24
|
+
currency: string; // USD Sale currency. 3-letter ISO 4217 name
|
|
25
|
+
sale_status?: string; // completed Sale statuses
|
|
26
|
+
// payme_transaction_card_brand: string; // Visa
|
|
27
|
+
// payme_transaction_auth_number: string; // 01A2B3C Sale authorization number from the credit company
|
|
28
|
+
buyer_card_mask?: string; // 458045******4580 Buyer's credit card mask
|
|
29
|
+
buyer_card_exp?: string; // 0118 Buyer's credit card expiry date
|
|
30
|
+
buyer_name?: string; // First Last Buyer's full name
|
|
31
|
+
buyer_email?: string; // buyer@example.com Buyer's eMail address
|
|
32
|
+
buyer_phone?: string; // 0540000000 Buyer's phone number
|
|
33
|
+
buyer_social_id?: string; // 000000001 Buyer's social id
|
|
34
|
+
buyer_key?: string; // XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX Buyer key for future token payments. This key is returned only if capture_buyer attribute was set in the request (Using Tokens)
|
|
35
|
+
installments?: string; // 1 Amount of installments for the sale
|
|
36
|
+
sale_paid_date?: Date; // 2016-01-01 15:16:15
|
|
37
|
+
sale_release_date?: Date; // 2016-01-08 15:15:15
|
|
38
|
+
is_token_sale?: number; // 0 (0 - false, 1 - true)
|
|
39
|
+
// payme_signature: string; // 75e99dbcb25cdfbe1c62f0b9376f4144
|
|
40
|
+
sale_invoice_url?: string; // https://www.example.com/XXXXXX.pdf Sale invoice URL, if the seller has enabled the invoices
|
|
41
|
+
event: string;
|
|
42
|
+
account: string;
|
|
43
|
+
userEvents: string[];
|
|
44
|
+
tickets: string[];
|
|
45
|
+
paymentProvider: string;
|
|
46
|
+
external_sale_id?: string;
|
|
47
|
+
external_sale_code?: string;
|
|
48
|
+
external_transaction_id?: string;
|
|
49
|
+
external_transaction_card_brand?: string;
|
|
50
|
+
external_transaction_auth_number?: string;
|
|
51
|
+
external_signature?: string;
|
|
52
|
+
status: StatusPaymentEnum;
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./charge";
|