@nimee/shared-types 1.0.34 → 1.0.36

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.
@@ -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
+ }
@@ -9,3 +9,39 @@ export declare enum StatusPaymentEnum {
9
9
  expired = "expired",
10
10
  pending_refund = "pending_refund"
11
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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimee/shared-types",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "Types and interfaces that any service can access if needed",
5
5
  "main": "dist/index.js",
6
6
  "author": "dan goldberg",
@@ -11,7 +11,9 @@
11
11
  "build": "npm run build-ts",
12
12
  "lint": "eslint -c ../../.eslintrc.js --ext .ts src/**",
13
13
  "prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write",
14
- "publish-it": "npm run build && npm publish --scope=nimee --access public"
14
+ "incVersionAndPublish": "npm version patch && npm run publish-it && npm run i-all-workspaces",
15
+ "publish-it": "npm run build && npm publish --scope=nimee --access public",
16
+ "i-all-workspaces": "version=${npm_package_version} npm i @nimee/shared-types@$version --workspace=@nimee/event --workspace=@nimee/user-event --workspace=@nimee/send-notification --workspace=@nimee/user --workspace=@nimee/payment"
15
17
  },
16
18
  "devDependencies": {
17
19
  "@typescript-eslint/eslint-plugin": "^5.18.0",
@@ -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
+ }
@@ -9,3 +9,45 @@ export enum StatusPaymentEnum {
9
9
  expired = "expired",
10
10
  pending_refund = "pending_refund",
11
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
+ }