ggez-banking-sdk 0.0.36 → 0.0.38

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.
@@ -1095,7 +1095,11 @@ export declare enum CurrencyConversionType {
1095
1095
  Two_Step_Conversion = 3,
1096
1096
  No_Conversion_Needed = 4
1097
1097
  }
1098
- export declare enum Variant_ID {
1098
+ export declare enum VariantType {
1099
1099
  UGGEZ1 = "177771",
1100
1100
  UGZ = "177772"
1101
1101
  }
1102
+ export declare enum ValidateType {
1103
+ NoValidate = "0",
1104
+ ValidateOnly = "1"
1105
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Variant_ID = exports.CurrencyConversionType = exports.TransactionClassification = exports.WireTransferType = exports.ProgramTypes = exports.UserTrustLevelRange = exports.SourceApp = exports.CommerceProductSourceType = exports.OrderType = exports.PaymentMethodType = exports.ForgetPasswordSecurityTypes = exports.ForgetUserSecurityTypes = exports.ResponseStatusCode = exports.CountryCode = exports.DocumentType = exports.AccountStatus = exports.UserType = exports.BusinessType = exports.OrganizationRequestTypes = exports.SecurityOperationMethod = exports.TransactionInquiryStatus = exports.DeviceType = exports.TransactionType = exports.SettlementTransactionType = exports.AuthorizationOperationRequestType = exports.TransactionRequestStatus = exports.EntityStatus = exports.OperationStatus = exports.BankBeneficiaryType = exports.BankAccountTypes = exports.SecurityQuestion2 = exports.SecurityQuestion1 = exports.TrustLimits = exports.EntityVerificationStatus = exports.DocumentStatus = exports.IdentificationTypes = exports.AddressType = exports.Gender = exports.ChainRequestType = exports.ServiceProvider = exports.SecurityAuthenticationTypes = exports.ActivityType = exports.EntityData = exports.Entity = exports.ErrorLevel = exports.OrderStatus = exports.RequestStatus = void 0;
3
+ exports.ValidateType = exports.VariantType = exports.CurrencyConversionType = exports.TransactionClassification = exports.WireTransferType = exports.ProgramTypes = exports.UserTrustLevelRange = exports.SourceApp = exports.CommerceProductSourceType = exports.OrderType = exports.PaymentMethodType = exports.ForgetPasswordSecurityTypes = exports.ForgetUserSecurityTypes = exports.ResponseStatusCode = exports.CountryCode = exports.DocumentType = exports.AccountStatus = exports.UserType = exports.BusinessType = exports.OrganizationRequestTypes = exports.SecurityOperationMethod = exports.TransactionInquiryStatus = exports.DeviceType = exports.TransactionType = exports.SettlementTransactionType = exports.AuthorizationOperationRequestType = exports.TransactionRequestStatus = exports.EntityStatus = exports.OperationStatus = exports.BankBeneficiaryType = exports.BankAccountTypes = exports.SecurityQuestion2 = exports.SecurityQuestion1 = exports.TrustLimits = exports.EntityVerificationStatus = exports.DocumentStatus = exports.IdentificationTypes = exports.AddressType = exports.Gender = exports.ChainRequestType = exports.ServiceProvider = exports.SecurityAuthenticationTypes = exports.ActivityType = exports.EntityData = exports.Entity = exports.ErrorLevel = exports.OrderStatus = exports.RequestStatus = void 0;
4
4
  var RequestStatus;
5
5
  (function (RequestStatus) {
6
6
  RequestStatus[RequestStatus["Undefined"] = 0] = "Undefined";
@@ -1152,8 +1152,13 @@ var CurrencyConversionType;
1152
1152
  CurrencyConversionType[CurrencyConversionType["Two_Step_Conversion"] = 3] = "Two_Step_Conversion";
1153
1153
  CurrencyConversionType[CurrencyConversionType["No_Conversion_Needed"] = 4] = "No_Conversion_Needed";
1154
1154
  })(CurrencyConversionType || (exports.CurrencyConversionType = CurrencyConversionType = {}));
1155
- var Variant_ID;
1156
- (function (Variant_ID) {
1157
- Variant_ID["UGGEZ1"] = "177771";
1158
- Variant_ID["UGZ"] = "177772";
1159
- })(Variant_ID || (exports.Variant_ID = Variant_ID = {}));
1155
+ var VariantType;
1156
+ (function (VariantType) {
1157
+ VariantType["UGGEZ1"] = "177771";
1158
+ VariantType["UGZ"] = "177772";
1159
+ })(VariantType || (exports.VariantType = VariantType = {}));
1160
+ var ValidateType;
1161
+ (function (ValidateType) {
1162
+ ValidateType["NoValidate"] = "0";
1163
+ ValidateType["ValidateOnly"] = "1";
1164
+ })(ValidateType || (exports.ValidateType = ValidateType = {}));
@@ -1,4 +1,4 @@
1
- import { AddressType, AuthorizationOperationRequestType, BankAccountTypes, BankBeneficiaryType, DeviceType, DocumentType, Entity, EntityStatus } from "../constants/enum";
1
+ import { AddressType, AuthorizationOperationRequestType, BankAccountTypes, BankBeneficiaryType, DeviceType, DocumentType, Entity, EntityStatus, OrderType, TransactionType, ValidateType } from "../constants/enum";
2
2
  import { CreateDeviceInterface, UpdateDeviceInterface, DeleteDeviceInterface, VerifyDeviceInterface, ConfirmDeviceInterface, LogoutDeviceInterface } from "../interfaces/deviceInterface";
3
3
  import { SignUpInterface, SignUpWithGoogleInterface } from "../interfaces/signInterface";
4
4
  import { DoTransactionInterface, GetTransactionInterface } from "../interfaces/accountInterface";
@@ -2982,42 +2982,36 @@ declare const Data: () => {
2982
2982
  dataOrder: () => {
2983
2983
  dataOrderRequest: (values: IOrderInterface) => {
2984
2984
  info: {
2985
- process_type: string | number;
2985
+ process_type: OrderType;
2986
2986
  };
2987
2987
  items: {
2988
2988
  variant: {
2989
- type: string;
2989
+ type: import("../constants/enum").VariantType;
2990
2990
  };
2991
2991
  custom_form_data: {
2992
- features: {
2993
- delivery_mobile: string;
2994
- delivery_email: string;
2995
- };
2996
- customer_info: number;
2992
+ customer_info: string;
2997
2993
  };
2998
2994
  notes: {
2999
- admin_notes: string;
3000
2995
  user_notes: string;
3001
2996
  };
3002
2997
  }[];
3003
2998
  payment_method: {
3004
- type: string;
2999
+ type: import("../constants/enum").PaymentMethodType;
3005
3000
  account: {
3006
3001
  info: {
3007
- id: string;
3002
+ id: number;
3008
3003
  };
3009
3004
  };
3010
3005
  };
3011
3006
  transaction: {
3012
3007
  info: {
3013
- type: string;
3008
+ type: TransactionType;
3014
3009
  };
3015
3010
  };
3016
3011
  notes: {
3017
- admin_notes: string;
3018
3012
  user_notes: string;
3019
3013
  };
3020
- validate: string;
3014
+ validate: ValidateType;
3021
3015
  geo_coordinates: import("../interfaces").IGeoCoordinates;
3022
3016
  };
3023
3017
  };
@@ -15,45 +15,47 @@ dayjs_1.default.extend(timezone_1.default);
15
15
  const Data = () => {
16
16
  const dataOrder = () => {
17
17
  const dataOrderRequest = (values) => {
18
- let { processType, variantType, deliveryMobile, deliveryEmail, customerInfo, adminNotesItems, userNotesItems, paymentMethodAccountId, paymentMethodType, transactionType, adminNotes, userNotes, validate, geoCoordinates, } = values;
18
+ let { accountId, customerInfo, paymentMethod, userNotes, validate, variantId, geoCoordinates, } = values;
19
19
  let data = {
20
20
  info: {
21
- process_type: processType,
21
+ process_type: enum_1.OrderType.Normal,
22
22
  },
23
23
  items: [
24
24
  {
25
25
  variant: {
26
- type: variantType,
26
+ type: variantId,
27
27
  },
28
28
  custom_form_data: {
29
- features: {
30
- delivery_mobile: deliveryMobile,
31
- delivery_email: deliveryEmail,
32
- },
29
+ // features: {
30
+ // delivery_mobile: deliveryMobile,
31
+ // delivery_email: deliveryEmail,
32
+ // },
33
33
  customer_info: customerInfo,
34
34
  },
35
35
  notes: {
36
- admin_notes: adminNotesItems,
37
- user_notes: userNotesItems,
36
+ // admin_notes: adminNotesItems,
37
+ user_notes: userNotes,
38
38
  },
39
39
  },
40
40
  ],
41
41
  payment_method: {
42
- type: paymentMethodType,
42
+ type: paymentMethod,
43
43
  account: {
44
44
  info: {
45
- id: paymentMethodAccountId,
45
+ id: accountId,
46
46
  },
47
47
  },
48
48
  },
49
49
  transaction: {
50
50
  info: {
51
- type: transactionType,
51
+ type: enum_1.TransactionType.System_User_Purchase,
52
52
  },
53
53
  },
54
54
  notes: {
55
- admin_notes: adminNotes,
56
- user_notes: userNotes,
55
+ // admin_notes: adminNotes,
56
+ user_notes: validate == enum_1.ValidateType.ValidateOnly
57
+ ? "No User Note This is a validate request"
58
+ : userNotes,
57
59
  },
58
60
  validate: validate,
59
61
  geo_coordinates: geoCoordinates,
@@ -1,17 +1,11 @@
1
1
  import { IGeoCoordinates } from "./interface";
2
+ import { PaymentMethodType, ValidateType, VariantType } from "../constants";
2
3
  export interface IOrderInterface {
3
- processType: number | string;
4
- variantType: string;
5
- deliveryMobile: string;
6
- deliveryEmail: string;
7
- customerInfo: number;
8
- adminNotesItems: string;
9
- userNotesItems: string;
10
- paymentMethodType: string;
11
- paymentMethodAccountId: string;
12
- transactionType: string;
13
- adminNotes: string;
4
+ customerInfo: string;
5
+ variantId: VariantType;
14
6
  userNotes: string;
15
- validate: string;
7
+ accountId: number;
8
+ paymentMethod: PaymentMethodType;
9
+ validate: ValidateType;
16
10
  geoCoordinates?: IGeoCoordinates;
17
11
  }
@@ -32,8 +32,7 @@ const useTransaction = (token, userInfo, userId, baseUrl, lang) => {
32
32
  let headers = headerConfig(headersData);
33
33
  return headers;
34
34
  };
35
- const OrderRequest = (values //orderInterface
36
- ) => __awaiter(void 0, void 0, void 0, function* () {
35
+ const OrderRequest = (values) => __awaiter(void 0, void 0, void 0, function* () {
37
36
  var _a, _b, _c;
38
37
  let data = dataOrderRequest(values);
39
38
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",